public class Mode extends Object
Modifier and Type | Field and Description |
---|---|
protected List<net.sourceforge.czt.z.ast.ZName> |
args_
A copy of the arguments of this FlatPred.
|
static double |
MAYBE_ONE_SOLUTION
A constant for getSolutions().
|
static double |
ONE_SOLUTION
A constant for getSolutions().
|
protected int |
outputs_
The number of output variables.
|
protected FlatPred |
parent_ |
protected Envir |
postEnvir_
The environment after executing the FlatPred.
|
protected Envir |
preEnvir_
The environment before executing the FlatPred.
|
protected double |
solutions_
The expected number of solutions.
|
Constructor and Description |
---|
Mode(FlatPred parent,
Envir preEnv,
List<net.sourceforge.czt.z.ast.ZName> args,
double solns)
Constructor for Mode objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compatible(Mode other)
Two modes are compatible if they have the same outputs.
|
Envir |
getEnvir()
Get the environment that includes any output variables of FlatPred.
|
Envir |
getEnvir0()
Get the input environment of this Mode.
|
Set<net.sourceforge.czt.z.ast.ZName> |
getOutputs()
Gives the variables added to the environment by this mode.
|
FlatPred |
getParent()
Returns the FlatPred that created this mode
|
double |
getSolutions()
The estimated number of solutions that the FlatPred will produce.
|
boolean |
isInput(int pos)
A convenience version of isInput that takes the
position of the variable in the FlatPred getArgs() list.
|
boolean |
isInput(net.sourceforge.czt.z.ast.ZName arg)
Is the given argument an input?
|
boolean |
isOutput(net.sourceforge.czt.z.ast.ZName arg)
Is the given argument an output?
|
int |
numOutputs()
Gives the number of output variables.
|
void |
setSolutions(double solns)
Set the estimated number of solutions the FlatPred will produce.
|
String |
toString() |
public static final double ONE_SOLUTION
public static final double MAYBE_ONE_SOLUTION
protected double solutions_
protected Envir preEnvir_
protected Envir postEnvir_
protected List<net.sourceforge.czt.z.ast.ZName> args_
protected int outputs_
protected FlatPred parent_
public FlatPred getParent()
public boolean isInput(net.sourceforge.czt.z.ast.ZName arg)
public boolean isInput(int pos)
public boolean isOutput(net.sourceforge.czt.z.ast.ZName arg)
public double getSolutions()
public void setSolutions(double solns)
public Envir getEnvir0()
public Envir getEnvir()
public Set<net.sourceforge.czt.z.ast.ZName> getOutputs()
public int numOutputs()
public boolean compatible(Mode other)
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.