Expressions Module
This module implements the data type of Quartz expressions together with many functions. Expressions are split into expressions having different Quartz types as well as left-hand side expressions LhsExpr that may have any type, but whose operators are restricted to those that can appear on left-hand sides of assignments. Certain operators like *Var,*Ite,*Case,*ArrAcc, and *TupAcc are defined for all types and these generate variables, if-then-else expressions, case expressions, array element access, and tuple access. The other operators should be rather self-explaining (see Module StaticEvaluation for further explanation of these operations and note that boolean lists are usually bitvector constants, radix-2 numbers or 2-complement numbers).
Types
Type | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type abbreviation for substitutions |
|
|
Functions and values
Function or value | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MkIteExpr(b,e1,e2) generates an if-then-else expression using one of the constructors BoolIte,BtvIte,NatIte,IntIte,RealIte,ArrIte,TupIte depending on the "types" of e1 and e2 (that should be the same). The result may however not be an Ite-expression since some simplication rules are used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Partial evaluation of a formula wrt. a partial variable assignment: Since the given assignment rho may not map every atom of the boolean expression to a boolean value, the result is just another boolean formula where the mapped atoms are replaced by constants and where simplifications were applied to propagate these constants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|