|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.engine.Options
public final class Options
This class stores information about various user-level translation options. It can be used to choose the SAT solver, set the timeout, etc.
solver: SATFactory // SAT solver factory to use |
symmetryBreaking: int // the amount of symmetry breaking to perform |
intEncoding: IntEncoding // encoding to use for translating {@link kodkod.ast.IntExpression int expressions} |
bitwidth: int // the bitwidth to use for integer representation / arithmetic |
skolemize: boolean // skolemize existential quantifiers? |
flatten: boolean // eliminate extraneous intermediate variables? |
logEncodeFunctions: boolean // use a compact encoding for functions? |
trackVars: boolean // keep track of variables assigned to non-leaf nodes? |
Nested Class Summary | |
---|---|
static class |
Options.IntEncoding
Integer encoding options for the translation of int expressions . |
Constructor Summary | |
---|---|
Options()
Constructs an Options object initalized with default values. |
|
Options(SATFactory solver)
Constructs an Options object using the given value for the solver option and default values for other options. |
Method Summary | |
---|---|
int |
bitwidth()
Returns the size of the integer representation. |
boolean |
flatten()
Returns the value of the flattening flag, which specifies whether to eliminate extraneous intermediate variables. |
Options.IntEncoding |
intEncoding()
Returns the integer encoding that will be used for translating int nodes . |
boolean |
logEncodeFunctions()
Returns true if a compact encoding should be used for functions. |
void |
setBitwidth(int bitwidth)
Sets this.bitwidth to the given value. |
void |
setFlatten(boolean flatten)
Sets the flattening option to the given value. |
void |
setIntEncoding(Options.IntEncoding encoding)
Sets the intEncoding option to the given value. |
void |
setLogEncodeFunctions(boolean logEncondeFunctions)
Sets function encoding flag to the given value. |
void |
setSkolemize(boolean skolemize)
Sets the skolemization flag to the given value. |
void |
setSolver(SATFactory solver)
Sets the solver option to the given value. |
void |
setSymmetryBreaking(int symmetryBreaking)
Sets the symmetryBreaking option to the given value. |
void |
setTrackVars(boolean trackVars)
Sets the value of the variable tracking flag. |
boolean |
skolemize()
Returns the value of the skolemization flag, which controls whether or not existentially quantified variables are skolemized. |
SATFactory |
solver()
Returns the value of the solver options. |
int |
symmetryBreaking()
Returns the 'amount' of symmetry breaking to perform. |
java.lang.String |
toString()
Returns a string representation of this Options object. |
boolean |
trackVars()
Returns true if a mapping from non-leaf nodes to boolean variables that represent them should be generated during translation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Options()
this.solver' = SATFactory.DefaultSAT4J
this.symmetryBreaking' = 20
this.intEncoding' = BINARY
this.bitwidth' = 5
this.skolemize' = true
this.flatten' = true
this.logEncodeFunctions' = false
this.trackVars' = false |
public Options(SATFactory solver)
java.lang.NullPointerException
- - solver = nullthis.solver' = solver
this.seed' = 0
this.symmetryBreaking' = 20
this.intEncoding' = BINARY
this.bitwidth' = 5
this.skolemize' = true
this.flatten' = true
this.logEncodeFunctions' = true
this.trackVars' = false |
Method Detail |
---|
public SATFactory solver()
public void setSolver(SATFactory solver)
java.lang.NullPointerException
- - solver = nullthis.solver' = solver |
public Options.IntEncoding intEncoding()
int nodes
.
The default is BINARY representation, which allows negative numbers. UNARY representation is best suited to
problems with small scopes, in which cardinalities are only compared (and possibly added to each other or
non-negative numbers).
public void setIntEncoding(Options.IntEncoding encoding)
java.lang.NullPointerException
- - encoding = nullthis.intEncoding' = encoding |
public int bitwidth()
public void setBitwidth(int bitwidth)
java.lang.IllegalArgumentException
- - bitwidth < 1this.bitwidth' = bitwidth |
public boolean flatten()
public void setFlatten(boolean flatten)
java.lang.IllegalArgumentException
- - this.trackVars && flattenthis.flatten' = flatten |
public int symmetryBreaking()
public void setSymmetryBreaking(int symmetryBreaking)
java.lang.IllegalArgumentException
- - symmetryBreaking !in [0..Integer.MAX_VALUE]this.symmetryBreaking' = symmetryBreaking |
public boolean skolemize()
public void setSkolemize(boolean skolemize)
java.lang.IllegalArgumentException
- - this.trackVars && skolemizethis.skolemize = skolemize |
public boolean logEncodeFunctions()
false
.
public void setLogEncodeFunctions(boolean logEncondeFunctions)
this.logEncodeFunctions' = logEncodeFunctions |
public boolean trackVars()
public void setTrackVars(boolean trackVars)
this.trackVars' = trackVars &&
trackVars => this.flatten' = false && this.skolemize' = false |
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |