Changes between Version 102 and Version 103 of IR2


Ignore:
Timestamp:
05/14/21 16:21:15 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v102 v103  
    161161  * Elements of an array are addressable, i.e., one can form a pointer such as `&a[i]`.  This is not possible with sequences, sets, maps, or relations---there is no way to have a pointer to any component of such a type.
    162162  * A function may neither consume nor return an object of array type.  There is no such restriction for sequences. 
    163 * The difference between the function type and map type: a function is really a procedure in the language, so it can modify the state as well as return a value.    This is like the C notion of "function".   A map is a logical partial function: it is defined on some subset of the domain type, it will always "return" the same value on a given input, and reading it cannot modify the state.
     163* The difference between the function type and map type:
     164  * a function cannot return a function; nor can a function consume an argument of functional type
     165  * a function may return a pointer to a function and may consume an argument of type pointer to function...
     166  * a function pointer is formed by `&f`, where `f` is the name of a function
     167  * there is no pointer arithmetic on function pointers
     168  * a map has a finite number of entries
     169  * a map cannot be executed in a call or spawn; nor can functions on maps have any side effects
     170  * a function can return a map and can consume an argument of map type
     171
    164172
    165173