public class FlatIfThenElse extends FlatPred
Modifier and Type | Field and Description |
---|---|
protected FlatPredList |
left_
The left-hand expr.
|
protected Bounds |
leftBounds_
Bounds information for the left_ expression.
|
protected net.sourceforge.czt.z.ast.ZName |
leftResult_
The name that left_ binds its value to.
|
protected FlatPredList |
pred_
The predicate that controls the choice.
|
protected FlatPredList |
right_
The right-hand expr, once known.
|
protected Bounds |
rightBounds_
Bounds information for the right_ expression.
|
protected net.sourceforge.czt.z.ast.ZName |
rightResult_
The name that right_ binds its value to.
|
protected net.sourceforge.czt.z.ast.ZName |
wholeResult_
The name that the result of the whole IF-THEN-ELSE is bound to.
|
Constructor and Description |
---|
FlatIfThenElse(FlatPredList pred,
FlatPredList left,
net.sourceforge.czt.z.ast.ZName leftResult,
FlatPredList right,
net.sourceforge.czt.z.ast.ZName rightResult,
net.sourceforge.czt.z.ast.ZName wholeResult)
Creates a new instance of FlatUnion.
|
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(net.sourceforge.czt.util.Visitor<R> visitor)
Calls visitor.visitPred (preferably) or visitor.visitTerm.
|
Mode |
chooseMode(Envir env0)
This requires pred_ and both of left_ and right_ expressions
to have valid modes, because in general, we may have to evaluate
both expressions.
|
boolean |
inferBounds(Bounds bnds)
Bounds information flows into pred_, left_ and right_, but not out.
|
boolean |
nextEvaluation()
Generates the next solution that satisfies this predicate.
|
void |
setMode(Mode mode)
Set the mode that will be used to evaluate this list.
|
String |
toString()
A default implementation of toString.
|
freeVars, getArgs, getEnvir, getLastArg, getMode, indent, modeAllDefined, modeCollection, modeFunction, modeOneOutput, printArg, printBinOp, printLastArg, printName, printQuant, startEvaluation
protected FlatPredList pred_
protected FlatPredList left_
protected net.sourceforge.czt.z.ast.ZName leftResult_
protected Bounds leftBounds_
protected FlatPredList right_
protected net.sourceforge.czt.z.ast.ZName rightResult_
protected Bounds rightBounds_
protected net.sourceforge.czt.z.ast.ZName wholeResult_
public FlatIfThenElse(FlatPredList pred, FlatPredList left, net.sourceforge.czt.z.ast.ZName leftResult, FlatPredList right, net.sourceforge.czt.z.ast.ZName rightResult, net.sourceforge.czt.z.ast.ZName wholeResult)
public boolean inferBounds(Bounds bnds)
inferBounds
in class FlatPred
bnds
- The database of lower and upper bounds for integer variables.The default implementation infers nothing and returns false.
public Mode chooseMode(Envir env0)
chooseMode
in class FlatPred
public void setMode(Mode mode)
public boolean nextEvaluation()
FlatPred
nextEvaluation
in class FlatPred
public String toString()
FlatPred
public <R> R accept(net.sourceforge.czt.util.Visitor<R> visitor)
FlatPred
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.