public class FlatMember extends FlatPred
Modifier and Type | Field and Description |
---|---|
protected Bounds |
bounds_
The most recent variable bounds information.
|
protected Iterator<net.sourceforge.czt.z.ast.Expr> |
current_
This is for iterating through set_
|
protected EvalSet |
set_
This is non_null during evaluation
|
Constructor and Description |
---|
FlatMember(net.sourceforge.czt.z.ast.ZName set,
net.sourceforge.czt.z.ast.ZName element)
Membership of a set.
|
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)
Choose the mode that this predicate could use in this environment.
|
protected double |
estSize(Envir env)
Returns all known information about the maximum size of the
set, for the given membership request.
|
boolean |
inferBounds(Bounds bnds)
Infer bounds for any integer variables.
|
protected Map<Object,net.sourceforge.czt.z.ast.Expr> |
knownValues(Envir env)
Returns the set of arguments that already have known values.
|
boolean |
nextEvaluation()
Generates the next solution that satisfies this predicate.
|
protected RangeSet |
range(Envir env)
Returns all known information about the range of integer members,
if this set happens to contain integers.
|
void |
startEvaluation() |
String |
toString()
Prints the FlatMember with optional bounds information.
|
freeVars, getArgs, getEnvir, getLastArg, getMode, indent, modeAllDefined, modeCollection, modeFunction, modeOneOutput, printArg, printBinOp, printLastArg, printName, printQuant, setMode
protected Bounds bounds_
protected EvalSet set_
protected Iterator<net.sourceforge.czt.z.ast.Expr> current_
public FlatMember(net.sourceforge.czt.z.ast.ZName set, net.sourceforge.czt.z.ast.ZName element)
set
- Must evaluate to an EvalSet object.element
- The member of the set.public boolean inferBounds(Bounds bnds)
FlatPred
inferBounds
in class FlatPred
bnds
- The database of lower and upper bounds for integer variables.The default implementation infers nothing and returns false.
protected Map<Object,net.sourceforge.czt.z.ast.Expr> knownValues(Envir env)
env
- The environment in which to look for the valuesprotected RangeSet range(Envir env)
env
- Optional environment that will be used to evaluate the setprotected double estSize(Envir env)
env
- Optional environment that will be used to evaluate the setpublic Mode chooseMode(Envir env)
FlatPred
chooseMode
in class FlatPred
public void startEvaluation()
startEvaluation
in class FlatPred
public boolean nextEvaluation()
FlatPred
nextEvaluation
in class FlatPred
public String toString()
public <R> R accept(net.sourceforge.czt.util.Visitor<R> visitor)
FlatPred
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.