| 134 | | * The boolean type is denoted `_Bool`, as in C. Its values are 0 and 1, which are also denoted by `$false` and `$true`, respectively. |
| 135 | | * There is one integer type, corresponding to the mathematical integers. Currently, all of the C integer types `int`, `long`, `unsigned int`, `short`, etc., are mapped to the CIVL integer type. |
| 136 | | * There is one real type, corresponding to the mathematical real numbers. Currently, all of the C real types `double`, `float`, etc., are mapped to the CIVL real type. |
| 137 | | * `$proc`: This is a primitive object type and functions like any other primitive C type (e.g., `int`). An object of this type refers to a process. It can be thought of as a process ID, but it is not an integer and cannot be cast to one. Certain expressions take an argument of `$proc` type and some return something of `$proc` type. The operators `==` and `!=` may be used with two arguments of type `$proc` to determine whether the two arguments refer to the same process. The constant `$self` has `$proc` type and refers to the process evaluating this expression; constant `$proc_null` has `$proc` type and refers to no process. |
| 138 | | * `$scope`: An object of this type is a reference to a dynamic scope. Several constants, expressions, and functions dealing with the $scope type are also provided. The $scope type is like any other object type. It may be used as the element type of an array, a field in a structure or union, and so on. Expressions of type $scope may occur on the left or right-hand sides of assignments and as arguments in function calls just like any other expression. Two different variables of type $scope may be aliased, i.e., they may refer to the same dynamic scope. |
| 139 | | * `$domain`: A domain type is used to represent a set of tuples of integer values. Every tuple in a domain object has the same arity (i.e., number of components). The arity must be at least 1, and is called the dimension of the domain object. For each integer constant expression n, there is a type `$domain(n)`, representing domains of dimension n. The universal domain type, denoted `$domain`, represents domains of all positive dimensions, i.e., it is the union over all n ≥ 1 of `$domain(n)`. In particular, each `$domain(n)` is a subtype of `$domain`. There are expressions for specifying domain values. Certain statements use domains, such as the “CIVL-for” loop `$for` |
| 140 | | * `$range`: An object of this type represents an ordered set of integers. Ranges are typically used as a step in constructing domains |
| | 134 | === The Boolean type |
| | 135 | |
| | 136 | The boolean type is denoted `_Bool`, as in C. Its values are 0 and 1, which are also denoted by `$false` and `$true`, respectively. |
| | 137 | |
| | 138 | === The integer type |
| | 139 | |
| | 140 | There is one integer type, corresponding to the mathematical integers. Currently, all of the C integer types `int`, `long`, `unsigned int`, `short`, etc., are mapped to the CIVL integer type. [This is expected to change.] |
| | 141 | |
| | 142 | === The real type |
| | 143 | |
| | 144 | There is one real type, corresponding to the mathematical real numbers. Currently, all of the C real types `double`, `float`, etc., are mapped to the CIVL real type. [This is expected to change.] |
| | 145 | |
| | 146 | === The process type `$proc` |
| | 147 | |
| | 148 | This is a primitive object type and functions like any other primitive C type (e.g., `int`). An object of this type refers to a process. It can be thought of as a process ID, but it is not an integer and cannot be cast to one. Certain expressions take an argument of `$proc` type and some return something of `$proc` type. The operators `==` and `!=` may be used with two arguments of type `$proc` to determine whether the two arguments refer to the same process. The constant `$self` has `$proc` type and refers to the process evaluating this expression; constant `$proc_null` has `$proc` type and refers to no process. |
| | 149 | |
| | 150 | === The scope type `$scope` |
| | 151 | |
| | 152 | An object of this type is a reference to a dynamic scope. |
| | 153 | Several constants, expressions, and functions dealing with the $scope type are also provided. |
| | 154 | The `$scope` type is like any other object type. |
| | 155 | It may be used as the element type of an array, a field in a structure or union, and so on. |
| | 156 | Expressions of type `$scope` may occur on the left or right-hand sides of assignments and as arguments in function calls just like any other expression. |
| | 157 | Two different variables of type `$scope` may be aliased, i.e., they may refer to the same dynamic scope. |
| | 158 | |
| | 159 | === Domain types: `$domain` and `$domain(n)` |
| | 160 | |
| | 161 | A domain type is used to represent a set of tuples of integer values. |
| | 162 | Every tuple in a domain object has the same arity (i.e., number of components). |
| | 163 | The arity must be at least 1, and is called the dimension of the domain object. |
| | 164 | For each integer constant expression n, there is a type `$domain(n)`, representing domains of dimension n. |
| | 165 | The universal domain type, denoted `$domain`, represents domains of all positive dimensions, i.e., it is the union over all n ≥ 1 of `$domain(n)`. |
| | 166 | In particular, each `$domain(n)` is a subtype of `$domain`. |
| | 167 | There are expressions for specifying domain values. |
| | 168 | Certain statements use domains, such as the “CIVL-for” loop `$for`. |
| | 169 | |
| | 170 | === The range type `$range` |
| | 171 | |
| | 172 | An object of this type represents an ordered set of integers. |
| | 173 | Ranges are typically used as a step in constructing domains. |
| | 174 | They can also be used in quantified expressions to specify the domain of a bound variable (see `$forall` and `$exists`). |