| 155 | | Non-mutating expressions: |
| 156 | | - `t1 == t2` |
| 157 | | - `t.i` |
| 158 | | - `($tuple<T1,...>){ x1, ... }` |
| 159 | | - `$pure $logic $tuple<T1,...> $tuple_write($tuple<T1,...> t, $int i, Ti x);` |
| | 155 | Expressions: these are all side-effect-free, assuming `expr1`, ... are side-effect-free. |
| | 156 | - `t1 == t2` : the two tuples have the same number of components and corresponding components are equal |
| | 157 | - `t.i` : the value of component `i` (a constant integer) of tuple `t` |
| | 158 | - `($tuple<T1,...>){ expr1, ... }` : the literal tuple with the given list of components. |
| | 159 | - `t[i : expr1]` : the tuple which is the same as `t`, except for component `i` (a constant integer), which has value `expr1` |
| 169 | | - `$pure $logic _Bool $set_in(T x, $set<T> s);` // is x an element of s? |
| 170 | | - `$pure $logic $set<T> $set_with($set<T> s, T x);` // s U {x} |
| 171 | | - `$pure $logic $set<T> $set_without($set<T> s, T x);` // s - {x} |
| 172 | | - `$pure $logic $set<T> $set_union($set<T> s1, $set<T> s2);` // s1 U s2 |
| 173 | | - `$pure $logic $set<T> $set_difference($set<T> s1, $set<T> s2);` // s1-s2 |
| 174 | | - `$pure $logic $set_intersection($set<T> s1, $set<T> s2);` // s1 \cap s2 |
| 175 | | - `$pure $logic T[] $set_elements($set<T> s);` |
| 176 | | - `$pure $logic _Bool $set_isSubsetOf($set<T> s1, $set<T> s2);` |
| 177 | | - `$pure $logic $set<U> $set_map($set<T> s, $fun<T,U> f);` |
| | 169 | |
| | 170 | Logic functions: |
| | 171 | - `$pure $logic _Bool $set_contains($set<T> s, T x);` : // is x an element of s? |
| | 172 | - `$pure $logic $set<T> $set_with($set<T> s, T x);` : // s U {x} |
| | 173 | - `$pure $logic $set<T> $set_without($set<T> s, T x);` : // s - {x} |
| | 174 | - `$pure $logic $set<T> $set_union($set<T> s1, $set<T> s2);` : // s1 U s2 |
| | 175 | - `$pure $logic $set<T> $set_difference($set<T> s1, $set<T> s2);` : // s1-s2 |
| | 176 | - `$pure $logic $set_intersection($set<T> s1, $set<T> s2);` : // s1 \cap s2 |
| | 177 | - `$pure $logic T[] $set_elements($set<T> s);` : // returns the set of elements of `s` as an array in some deterministic order |
| | 178 | - `$pure $logic _Bool $set_isSubsetOf($set<T> s1, $set<T> s2);` : is `s1` a subset of `s2`? |
| | 179 | - `$pure $logic $set<U> $set_map($set<T> s, $fun<T,U> f);` : the set { f(x) | x in s} |
| | 180 | - `$pure logic $set<T> $set_comprehension($set<T>, $fun<T,_Bool> p);` : the set { x in s | p(x) } |