Changes between Version 14 and Version 15 of Fundamentals


Ignore:
Timestamp:
05/13/23 21:06:53 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Fundamentals

    v14 v15  
    6868== Types
    6969
    70 The boolean type is denoted `_Bool`, as in C. Its values are 0 and 1, which are also denoted by `$false` and `$true`, respectively.
    71 
    72 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.
    73 
    74 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.
    75 
    76 * `$proc`:  `$self`, `$proc_null`
    77 * `$scope`: An object of type `$scope` is a reference to a dynamic scope. It may be thought of as a “dynamic scope ID, ” but it is not an integer and cannot be converted to an integer.
     70* The boolean type is denoted `_Bool`, as in C. Its values are 0 and 1, which are also denoted by `$false` and `$true`, respectively.
     71* 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.
     72* 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.
     73* `$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.
     74* `$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.
    7875* `$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`
    79 * `$range`: An object of this type represents an ordered set of integers. There are expressions for specifying range values; Ranges are typically used as a step in constructing domains
     76* `$range`: An object of this type represents an ordered set of integers. Ranges are typically used as a step in constructing domains
    8077
    8178== Expressions
    8279
    8380* `=>`
     81* domain literals: An expression of the form `($domain) { r1, ..., rn }` where `r1`, . . . , `rn` are n expressions of type `$range`, is a ''Cartesian domain expression''. It represents the domain of dimension n which is the Cartesian product of the n ranges, i.e., it consists of all n-tuples (x1,...,xn) where x1 ∈ r1, ..., xn ∈ rn. The order on the domain is the dictionary order on tuples. The type of this expression is `$domain(n)`.  When a Cartesian domain expression is used to initialize an object of domain type, the `($domain)` may be omitted. For example: `$domain(3) dom = { 0 .. 3, r2, 10 .. 2 # -2 };`
    8482* `$true`
    8583* `$false`
    8684* `$forall`
    8785* `$exists`
     86* `$here`
     87* `$root`
    8888* `$pow(double, double)`
     89* range literals: An expression of the form `lo .. hi` where `lo` and `hi` are integer expressions, represents the range consisting of the integers `lo`, `lo` + 1, ..., `hi` (in that order).  An expression of the form `lo .. hi # step`, where `lo`, `hi`, and `step` are integer expressions is interpreted as follows. If `step` is positive, it represents the range consisting of `lo`, `lo` + `step`, `lo` + 2 ∗ `step`, …, up to and possibly including `hi`. To be precise, the infinite sequence is intersected with the set of integers less than or equal to `hi`.  If `step` is negative, the expression represents the range consisting of `hi`, `hi` + `step`, `hi` + 2 ∗ `step`, . . ., down to and possibly including `lo`. Precisely, the infinite sequence is intersected with the set of integers greater than or equal to `lo`.
     90* `$scopeof`
     91* scope relational expressions:
     92
    8993
    9094== Statements
     
    110114* `$parfor`
    111115* `$reveal()`
     116* `$scope_defined`
     117* `$scope_parent`
    112118* `$spawn`
    113119* `$wait`