Changes between Version 9 and Version 10 of Fundamentals


Ignore:
Timestamp:
05/13/23 08:26:36 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Fundamentals

    v9 v10  
    7171Array types, `struct` and `union` types, `char`, and pointer types (including pointers to functions) are all exactly as in C.
    7272
     73=== The bundle type: `$bundle`
     74
     75CIVL-C includes a type named `$bundle`, declared in the CIVL-C standard header `bundle.cvh`. A bundle is basically a sequence of data, wrapped into an atomic package. A bundle is created using a function that specifies a region of memory. One can create a bundle from an array of integers, and another bundle from an array of reals. Both bundles have the same type, `$bundle`. They can therefore be entered into an array of `$bundle`, for example. Hence bundles are useful for mixing objects of different (even statically unknown) types into a single data structure. Later, the contents of a bundle can be extracted with another function that specifies a region of memory into which to unpack the bundle; if that memory does not have the right type to receive the contents of the bundle, a runtime error is generated. The bundle type and its functions are provided by the library `bundle.cvh`.
     76The relevant functions for creating and manipulating bundles are given in ...
     77
     78=== The `$scope` type
     79
     80An object of type `$scope` is a reference to a dynamic scope. It may be thought of as a “dynamic
     81scope ID, ” but it is not an integer and cannot be converted to an integer. Operations defined on scopes are discussed in Section ....
     82
     83=== The `$range` and `$domain` types
     84
     85CIVL-C provides certain abstract datatypes that are useful for representing iteration spaces of loops in an abstract way.
     86First, there is a built-in type `$range`. An object of this type represents an ordered set of integers. There are expressions for specifying range values; these are described in Section .... Ranges are typically used as a step in constructing domains, described next.
     87
     88A 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.
     89
     90For 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`.
     91There are expressions for specifying domain values; these are described in Section 6.2.3.2. There are also certains statements that use domains, such as the “CIVL-for” loop `$for`; see Section ...