public class ExprUtil
extends java.lang.Object
| Constructor and Description |
|---|
ExprUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Expr |
and(Expr... e)
Construct an and expression
|
static Expr |
and(Expr left,
Expr right)
Construct an and expression
|
static Expr |
and(java.util.List<Expr> conjuncts)
Construct an and expression
|
static Expr |
array(java.util.List<? extends Expr> elements)
Construct an array expression
|
static Expr |
arrow(Expr left,
Expr right)
Construct an arrow expression
|
static Expr |
castInt(Expr expr)
Construct an integer-cast expression
|
static Expr |
castReal(Expr expr)
Construct an real-cast expression
|
static Expr |
divide(Expr left,
Expr right)
Construct a divide expression
|
static Expr |
equal(Expr left,
Expr right)
Construct an equal expression
|
static Expr |
functionCall(IdExpr name,
Expr... args)
Construct a function-call expression
|
static Expr |
functionCall(IdExpr name,
java.util.List<Expr> args)
Construct a function-call expression
|
static Expr |
greater(Expr left,
Expr right)
Construct a greater-than expression
|
static Expr |
greaterEqual(Expr left,
Expr right)
Construct a greater-than-or-equal expression
|
static IdExpr |
id(java.lang.String id)
Construct an id expression
|
static Expr |
implies(Expr left,
Expr right)
Construct an imply expression
|
static Expr |
intDivide(Expr left,
Expr right)
Construct an integer-divide expression
|
static Expr |
integer(long value)
Construct an integer value expression
|
static Expr |
integer(java.lang.String str)
Construct an integer value expression
|
static Expr |
ite(Expr cond,
Expr thenExpr,
Expr elseExpr)
Construct an if-then-else expression
|
static Expr |
less(Expr left,
Expr right)
Construct a less-than expression
|
static Expr |
lessEqual(Expr left,
Expr right)
Construct a less-than-or-equal expression
|
static Expr |
list(java.util.List<? extends Expr> list)
Construct a list expression
|
static Expr |
minus(Expr left,
Expr right)
Construct a minus expression
|
static Expr |
mod(Expr left,
Expr right)
Construct a mod expression
|
static Expr |
modeRef(java.lang.String... path)
Construct a mode-reference expression
|
static Expr |
multiply(Expr left,
Expr right)
Construct a multiply expression
|
static Expr |
negative(Expr expr)
Construct a negative expression
|
static Expr |
nodeCall(IdExpr name,
Expr... args)
Construct a node-call expression
|
static Expr |
nodeCall(IdExpr name,
java.util.List<Expr> args)
Construct a node-call expression
|
static Expr |
not(Expr expr)
Construct a not expression
|
static Expr |
notEqual(Expr left,
Expr right)
Construct a not-equal expression
|
static Expr |
or(Expr... e)
Construct an or expression
|
static Expr |
or(Expr left,
Expr right)
Construct an or expression
|
static Expr |
or(java.util.List<Expr> disjuncts)
Construct an or expression
|
static Expr |
plus(Expr left,
Expr right)
Construct a plus expression
|
static Expr |
pre(Expr expr)
Construct a pre expression
|
static Expr |
real(java.lang.String str)
Construct a real value expression
|
static Expr |
recordAccess(Expr record,
java.lang.String field)
Construct a record-access expression
|
static Expr |
recordLiteral(java.lang.String id,
java.util.Map<java.lang.String,Expr> fields)
Construct a record-literal expression
|
static Expr |
xor(Expr... e)
Construct an xor expression
|
static Expr |
xor(Expr left,
Expr right)
Construct an xor expression
|
static Expr |
xor(java.util.List<Expr> disjuncts)
Construct an xor expression
|
public static Expr and(Expr left, Expr right)
Lustre: <left> and <right>
left - left side of the and expressionright - right side of the and expressionpublic static Expr or(Expr left, Expr right)
Lustre: <left> or <right>
left - left side of the or expressionright - right side of the or expressionpublic static Expr implies(Expr left, Expr right)
Lustre: <left> => <right>
left - left side of the imply expressionright - right side of the imply expressionpublic static Expr xor(Expr left, Expr right)
Lustre: <left> xor <right>
left - left side of the xor expressionright - right side of the xor expressionpublic static Expr arrow(Expr left, Expr right)
Lustre: <left> -> <right>
left - left side of the arrow expressionright - right side of the arrow expressionpublic static Expr less(Expr left, Expr right)
Lustre: <left> < <right>
left - left side of the less-than expressionright - right side of the less-than expressionpublic static Expr lessEqual(Expr left, Expr right)
Lustre: <left> <= <right>
left - left side of the less-than-or-equal expressionright - right side of the less-than-or-equal expressionpublic static Expr greater(Expr left, Expr right)
Lustre: <left> > <right>
left - left side of the greater-than expressionright - right side of the greater-than expressionpublic static Expr greaterEqual(Expr left, Expr right)
Lustre: <left> >= <right>
left - left side of the greater-than-or-equal expressionright - right side of the greater-than-or-equal expressionpublic static Expr equal(Expr left, Expr right)
Lustre: <left> = <right>
left - left side of the equal expressionright - right side of the equal expressionpublic static Expr notEqual(Expr left, Expr right)
Lustre: <left> <> <right>
left - left side of the not-equal expressionright - right side of the not-equal expressionpublic static Expr plus(Expr left, Expr right)
Lustre: <left> + <right>
left - left side of the plus expressionright - right side of the plus expressionpublic static Expr minus(Expr left, Expr right)
Lustre: <left> - <right>
left - left side of the minus expressionright - right side of the minus expressionpublic static Expr multiply(Expr left, Expr right)
Lustre: <left> * <right>
left - left side of the multiply expressionright - right side of the multiply expressionpublic static Expr mod(Expr left, Expr right)
Lustre: <left> mod <right>
left - left side of the mod expressionright - right side of the mod expressionpublic static Expr intDivide(Expr left, Expr right)
Lustre: <left> div <right>
left - left side of the integer-divide expressionright - right side of the integer-divide expressionpublic static Expr divide(Expr left, Expr right)
Lustre: <left> / <right>
left - left side of the divide expressionright - right side of the divide expressionpublic static Expr negative(Expr expr)
Lustre: -<expr>
expr - expression to get the negative value ofpublic static Expr not(Expr expr)
Lustre: not <expr>
expr - expression to negatepublic static Expr pre(Expr expr)
Lustre: pre <expr>
expr - expression to get the previous value ofpublic static IdExpr id(java.lang.String id)
Lustre: <expr>
id - identifier for component, variable, or constantpublic static Expr real(java.lang.String str)
Lustre: <str>
str - a floating point numberpublic static Expr integer(java.lang.String str)
Lustre: <str>
str - an integer numberpublic static Expr integer(long value)
Lustre: <i>
value - an integer numberpublic static Expr modeRef(java.lang.String... path)
Lustre: <path>
path - path to modepublic static Expr functionCall(IdExpr name, java.util.List<Expr> args)
Lustre: <name>(<args[0]>, <args[1]>, ...)
name - name of the functionargs - a list of argument expressionspublic static Expr functionCall(IdExpr name, Expr... args)
Lustre: <name>(<args[0]>, <args[1]>, ...)
name - name of the functionargs - an array of argument expressionspublic static Expr nodeCall(IdExpr name, java.util.List<Expr> args)
Lustre: <name>(<args[0]>, <args[1]>, ...)
name - name of the nodeargs - a list of argument expressionspublic static Expr nodeCall(IdExpr name, Expr... args)
Lustre: <name>(<args[0]>, <args[1]>, ...)
name - name of the nodeargs - an array of argument expressionspublic static Expr castInt(Expr expr)
Lustre: int <expr>
expr - expression to cast to integerpublic static Expr castReal(Expr expr)
Lustre: real <expr>
expr - expression to cast to realpublic static Expr and(java.util.List<Expr> conjuncts)
Lustre: <conjuncts[0]> and <conjuncts[1]> and ...
conjuncts - a list of conjunctspublic static Expr and(Expr... e)
Lustre: <e[0]> and <e[1]> and ...
e - an array of conjunctspublic static Expr or(java.util.List<Expr> disjuncts)
Lustre: <disjuncts[0]> or <disjuncts[1]> or ...
disjuncts - a list of disjunctspublic static Expr or(Expr... e)
Lustre: <e[0]> or <e[1]> or ...
e - an array of disjunctspublic static Expr xor(java.util.List<Expr> disjuncts)
Lustre: <disjuncts[0]> xor <disjuncts[1]> xor ...
disjuncts - a list of disjunctspublic static Expr xor(Expr... e)
Lustre: <e[0]> xor <e[1]> xor ...
e - an array of disjunctspublic static Expr ite(Expr cond, Expr thenExpr, Expr elseExpr)
Lustre: if <cond> then <thenExpr> else <elseExpr>
cond - condition part of the if-then-else expressionthenExpr - then part of the if-then-else expressionelseExpr - else part of the if-then-else expressionpublic static Expr list(java.util.List<? extends Expr> list)
Lustre: (<list[0]>, <list[1]>, ...)
list - a list of sub-expressionspublic static Expr recordLiteral(java.lang.String id, java.util.Map<java.lang.String,Expr> fields)
Lustre: id {<fields[0].key> = <fields[0].value>, ...}
id - record type namefields - a map from fields to valuespublic static Expr array(java.util.List<? extends Expr> elements)
Lustre: [<elements[0]>, <elements[1]>, ...
elements - a list of sub-expression elements