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).
Type | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type abbreviation for substitutions |
|
|
Function or value | Description |
|
Computes the set of atoms of a list of BoolExpr. This is required for a boolean abstraction as used by BDDs and SAT solvers like ShannonGraphs.
|
|
compute the cells of a declaration
|
|
|
|
compute the cells of an interface
|
|
returns a default value (e.g. used as initial value in Quartz) for a given type; for Qarr types, the default value of the base type is returned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetArr(Earr t)=t and fails for other expressions
|
|
GetBool(Ebool t)=t and fails for other expressions
|
|
GetBtv(Ebtv t)=t and fails for other expressions
|
|
GetInt(Eint t)=t and fails for other expressions
|
|
GetLhs(Elhs t)=t and fails for other expressions
|
|
GetNat(Enat t)=t and fails for other expressions
|
|
GetReal(Ereal t)=t and fails for other expressions
|
|
GetTup(Etup t)=t and fails for other expressions
|
|
|
|
|
|
|
|
generate a BoolExpr that states that lhsExpr1 and lhsExpr2 are equal
|
|
LhsWriteCells lhs computes the writeable cells of a lhsExpr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MkCaseExpr(CL,expr) generates a case-expression using one of the constructors BoolCase,BtvCase,NatCase,IntCase,RealCase,ArrCase,TupCase depending on expr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MkTupAccExpr qty (t,i) generates a tuple selection using one of the constructors BoolTupAcc,BtvTupAcc,NatTupAcc,IntTupAcc,RealTupAcc,ArrTupAcc,TupTupAcc depending on qty.
|
|
|
|
generates a variable with name qn and type qtype as an expression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Prints a substitution
|
|
|
|
QNameOfVarExpr extracts the qualified name of an expression variable, e.g. QNameOfVarExpr(Ebool(BoolVar qn))=qn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TargetOfLhs extracts the name of the variable that is written by the given LhsExpr expr, e.g. TargetOfLhs(LhsVar(qn,qty))=qn
|
|
|
|
|
|
|
|
|