Changes between Version 27 and Version 28 of Fundamentals


Ignore:
Timestamp:
05/16/23 10:16:21 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Fundamentals

    v27 v28  
    132132== Types
    133133
    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
     136The 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
     140There 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
     144There 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
     148This 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
     152An object of this type is a reference to a dynamic scope.
     153Several constants, expressions, and functions dealing with the $scope type are also provided.
     154The `$scope` type is like any other object type.
     155It may be used as the element type of an array, a field in a structure or union, and so on.
     156Expressions 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.
     157Two 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
     161A domain type is used to represent a set of tuples of integer values.
     162Every tuple in a domain object has the same arity (i.e., number of components).
     163The arity must be at least 1, and is called the dimension of the domain object.
     164For each integer constant expression n, there is a type `$domain(n)`, representing domains of dimension n.
     165The universal domain type, denoted `$domain`, represents domains of all positive dimensions, i.e., it is the union over all n ≥ 1 of `$domain(n)`.
     166In particular, each `$domain(n)` is a subtype of `$domain`.
     167There are expressions for specifying domain values.
     168Certain statements use domains, such as the “CIVL-for” loop `$for`.
     169
     170=== The range type `$range`
     171
     172An object of this type represents an ordered set of integers.
     173Ranges are typically used as a step in constructing domains.
     174They can also be used in quantified expressions to specify the domain of a bound variable (see `$forall` and `$exists`).
    141175
    142176== Expressions
     
    258292Each of these expressions is erroneous if `s1` or `s2` is undefined.  This error is reported by the model checker.
    259293
     294=== `$self`
     295
     296This expression of `$proc` type returns a reference to the process which is evaluating this expression.  It provides a way for code to obtain the identity of the process executing the code.
    260297
    261298== Statements