public class FlatSetComp extends FlatPred
Modifier and Type | Field and Description |
---|---|
protected Bounds |
bounds_
The most recent variable bounds information.
|
protected FlatPredList |
predsAll_
This FlatPredList is used to evaluate ALL members of the set.
|
protected net.sourceforge.czt.z.ast.ZName |
resultName_
The fresh ZName which will be bound to a member of the set.
|
Constructor and Description |
---|
FlatSetComp(ZLive zlive,
net.sourceforge.czt.z.ast.ZSchText stext,
net.sourceforge.czt.z.ast.Expr result,
net.sourceforge.czt.z.ast.ZName set)
FlatSetComp(D,P,E,S) implements {D|P@E} = S.
|
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 env)
Like other Flat*Set* objects, this acts as a function:
the free variables of the set are the inputs and the
resulting EvalSet object is the output.
|
boolean |
inferBounds(Bounds bnds)
This does local bounds inference.
|
boolean |
nextEvaluation()
Does the actual evaluation.
|
String |
toString()
A default implementation of toString.
|
freeVars, getArgs, getEnvir, getLastArg, getMode, indent, modeAllDefined, modeCollection, modeFunction, modeOneOutput, printArg, printBinOp, printLastArg, printName, printQuant, setMode, startEvaluation
protected Bounds bounds_
protected FlatPredList predsAll_
protected net.sourceforge.czt.z.ast.ZName resultName_
public FlatSetComp(ZLive zlive, net.sourceforge.czt.z.ast.ZSchText stext, net.sourceforge.czt.z.ast.Expr result, net.sourceforge.czt.z.ast.ZName set)
decls
- A list of Decl objects (ConstDecl and VarDecl only).pred
- The predicate that filters the declarations.result
- The expression returned by the set.set
- The variable that the whole set will be equated to.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 env)
chooseMode
in class FlatPred
public boolean nextEvaluation()
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.