|
||||||||||
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.
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. |
Method Summary | |
---|---|
int |
bitwidth()
Returns the size of the integer representation. |
int |
coreGranularity()
Returns the core granularity level. |
boolean |
flatten()
Returns the value of the flattening flag, which specifies whether to eliminate extraneous intermediate variables. |
OrderingMethod |
getOrderingMethod()
Returns the present method to tamper with SAT solver's variable ordering. |
kodkod.util.ints.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 . |
int |
logTranslation()
Returns the translation logging level (0, 1, or 2), where 0 means logging is not performed, 1 means only the translations of top level formulas are logged, and 2 means all formula translations are logged. |
kodkod.engine.config.Reporter |
reporter()
Returns this.reporter. |
void |
setBitwidth(int bitwidth)
Sets this.bitwidth to the given value. |
void |
setCoreGranularity(int coreGranularity)
Sets the core granularity level. |
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(int logTranslation)
Sets the translation logging level. |
void |
setOrderingMethod(OrderingMethod ordering)
Specify a method to tamper with SAT solver's variable ordering. |
void |
setReporter(kodkod.engine.config.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(kodkod.engine.satlab.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. |
kodkod.engine.satlab.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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Options()
Method Detail |
---|
public kodkod.engine.satlab.SATFactory solver()
public void setOrderingMethod(OrderingMethod ordering)
OrderableSolver
.
DefaultOrdering is used if this option is untouched.
ordering
- is an instance of the provided ordering methodspublic OrderingMethod getOrderingMethod()
public void setSolver(kodkod.engine.satlab.SATFactory solver)
java.lang.NullPointerException
- solver = nullpublic kodkod.engine.config.Reporter reporter()
public void setReporter(kodkod.engine.config.Reporter reporter)
java.lang.NullPointerException
- reporter = nullpublic 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 = null
java.lang.IllegalArgumentException
- this.bitwidth is not a valid bitwidth for the specified encodingpublic int bitwidth()
public void setBitwidth(int bitwidth)
java.lang.IllegalArgumentException
- bitwidth < 1
java.lang.IllegalArgumentException
- this.intEncoding==BINARY && bitwidth > 32public kodkod.util.ints.IntRange integers()
public boolean flatten()
public void setFlatten(boolean flatten)
java.lang.IllegalArgumentException
- this.logTranslation>0 && flattenpublic int symmetryBreaking()
public void setSymmetryBreaking(int symmetryBreaking)
java.lang.IllegalArgumentException
- symmetryBreaking !in [0..Integer.MAX_VALUE]public int sharing()
public void setSharing(int sharing)
java.lang.IllegalArgumentException
- sharing !in [1..Integer.MAX_VALUE]public int skolemDepth()
public void setSkolemDepth(int skolemDepth)
public int logTranslation()
public void setLogTranslation(int logTranslation)
java.lang.IllegalArgumentException
- logTranslation !in [0..2]public int coreGranularity()
Note that the finer granularity (that is, a larger value of this.coreGranularity) will provide better information at the cost of slower core extraction and, in particular, minimization.
public void setCoreGranularity(int coreGranularity)
java.lang.IllegalArgumentException
- coreGranularity !in [0..3]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 |