Changes between Version 19 and Version 20 of Fundamentals
- Timestamp:
- 05/14/23 19:54:03 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Fundamentals
v19 v20 150 150 A universally quantified formula has the form 151 151 152 `$forall` `(` ''variable-declarations'' (`;` ''variable-declarations'' )* `|` ''restriction''`)` ''expr''152 `$forall` `(` ''variable-declarations'' (`;` ''variable-declarations'' )* (`|` ''restriction'')? `)` ''expr'' 153 153 154 154 where ''variable-declarations'' declares a list of variables of a given type with an optional domain, and has the form … … 157 157 158 158 where ''type'' is a type name (e.g., `int` or `double`), ''identifier'' is the name of the bound variable. Moreover, ''restriction'' is a boolean expression which expresses some restriction on the values that the bound variable can take, and ''expr'' is a formula. The universally quantified formula holds iff for all values assignable to the bound variable for which the restriction holds, the formula expr holds. 159 160 Examples: 161 {{{ 162 $forall (int i | 0 <= i && i < n) a[i]==0 163 $forall (int i: 0..n-1) a[i]==0 164 $forall (int i,j | 0<=i && i<n && 0<=j && j<m) b[i][j]==0 165 $forall (int i: 0..n-1; int j: 0..m-1) b[i][j]==0 166 $forall (int i,j: ($domain){0..n-1, 0..m-1}) b[i][j]==0 167 }}} 168 169 [Note: the last form is not yet implemented] 159 170 160 171
