| 9 | | $proc |
| 10 | | $spawn |
| 11 | | $wait |
| 12 | | $waitall |
| 13 | | $when |
| 14 | | $parfor |
| 15 | | $local_start |
| 16 | | $local_end |
| 17 | | $yield |
| 18 | | $atomic |
| | 8 | The keywords in CIVL-C not already in C begin with the symbol `$`. This makes them readily identifiable and also prevents any naming conflicts with identifiers in C programs. This means that most legal C programs will also be legal CIVL-C programs. |
| | 9 | |
| | 10 | One of the most important features of CIVL-C not found in standard C is the ability to define functions in any scope. (Standard C allows function definitions only in the file scope.) This feature is also found in GNU C, the GNU extension of C. |
| | 11 | |
| | 12 | Another central CIVL-C feature is the ability to spawn functions, i.e., run the function in a new process (thread). |
| | 13 | |
| | 14 | Scopes and processes are the two central themes of CIVL-C. Each has a static and a dynamic aspect. The static scopes correspond to the lexical scopes in the program—typically, regions de- limited by curly braces `{`. . . `}`. At runtime, these scopes are instantiated when control in a process reaches the beginning of the scope. Processes are created dynamically by spawning functions; hence the functions are the static representation of processes. |
| | 15 | |
| | 16 | == Example Illustrating Scopes and Processes |
| | 17 | |
| | 18 | To understand the static and dynamic nature of scopes and processes, and the relations between them, we consider the (artificial) example code below. The static scopes in the scope are numbered from 0 to 6. |