|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.engine.config.Options
public final class Options
Stores information about various user-level translation and analysis options. It can be used to choose the SAT solver, control symmetry breaking, etc.
solver: SATFactory // SAT solver factory to use |
reporter: Reporter // reporter to use |
symmetryBreaking: int // the amount of symmetry breaking to perform |
sharing: int // the depth to which circuits should be checked for equivalence during translation |
intEncoding: IntEncoding // encoding to use for translating {@link kodkod.ast.IntExpression int expressions} |
bitwidth: int // the bitwidth to use for integer representation / arithmetic |
skolemDepth: int // skolemization depth |
flatten: boolean // eliminate extraneous intermediate variables? |
logTranslation: boolean // log translation events (see {@link TranslationLog}})? |
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. |
IntRange |
integers()
Returns the range of integers that can be encoded using this.intEncoding and this.bitwidth. |
Options.IntEncoding |
intEncoding()
Returns the integer encoding that will be used for translating int nodes . |
boolean |
logTranslation()
Returns true if translation to cnf should be logged. |
Reporter |
reporter()
Returns this.reporter. |
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 |
setLogTranslation(boolean logTranslation)
Sets the value of the translation logging flag. |
void |
setReporter(Reporter reporter)
Sets this.reporter to the given reporter. |
void |
setSharing(int sharing)
Sets the sharing option to the given value. |
void |
setSkolemDepth(int skolemDepth)
Sets the skolemDepth 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. |
int |
sharing()
Returns the depth to which circuits are checked for equivalence during translation. |
int |
skolemDepth()
Returns the depth to which existential quantifiers 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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Options()
this.solver' = SATFactory.DefaultSAT4J
this.reporter' is silent (no messages reported)
this.symmetryBreaking' = 20
this.sharing' = 3
this.intEncoding' = BINARY
this.bitwidth' = 5
this.skolemDepth' = 0
this.flatten' = true
this.logTranslation' = false |
public Options(SATFactory solver)
java.lang.NullPointerException
- - solver = nullthis.solver' = solver
this.reporter' is silent (no messages reported)
this.seed' = 0
this.symmetryBreaking' = 20
this.sharing' = 3
this.intEncoding' = BINARY
this.bitwidth' = 5
this.skolemDepth' = 0
this.flatten' = true
this.logTranslation' = false |
Method Detail |
---|
public SATFactory solver()
public void setSolver(SATFactory solver)
java.lang.NullPointerException
- - solver = nullthis.solver' = solver |
public Reporter reporter()
public void setReporter(Reporter reporter)
java.lang.NullPointerException
- - reporter = nullthis.reporter' = reporter |
reporter != null |
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 < 1
java.lang.IllegalArgumentException
- - this.intEncoding==BINARY && bitwidth > 32this.bitwidth' = bitwidth |
public IntRange integers()
public boolean flatten()
public void setFlatten(boolean flatten)
java.lang.IllegalArgumentException
- - this.logTranslation && flattenthis.flatten' = flatten |
public int symmetryBreaking()
public void setSymmetryBreaking(int symmetryBreaking)
java.lang.IllegalArgumentException
- - symmetryBreaking !in [0..Integer.MAX_VALUE]this.symmetryBreaking' = symmetryBreaking |
public int sharing()
public void setSharing(int sharing)
java.lang.IllegalArgumentException
- - sharing !in [1..Integer.MAX_VALUE]this.sharing' = sharing |
public int skolemDepth()
public void setSkolemDepth(int skolemDepth)
this.skolemDepth' = skolemDepth |
public boolean logTranslation()
public void setLogTranslation(boolean logTranslation)
this.logTranslation' = logTranslation &&
logTranslation => this.flatten' = 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 |