public static final class Translation.Incremental extends Translation
Incremental translations are more expensive to store than whole
translations, and they
place some restrictions on the form of problems that are translated. In particular, logging
must be disabled during translation; the translation must use an incremental SAT solver; and the
addition of new clauses must not violate the invariants guaranteed by the Translation
class.
All three restrictions are enforced by the translateIncremental(...)
methods of the
Translator
class.
symmetries: set IntSet // partition of the universe into equivalence classes induced this.originalBounds
this.options.logTranslation = 0 && this.options.solver.incremental()
this.symmetries = partition(this.originalBounds)
Translator.translateIncremental(kodkod.ast.Formula, Bounds, Options)
,
Translator.translateIncremental(kodkod.ast.Formula, Bounds, Translation.Incremental)
Translation.Incremental, Translation.Whole
Modifier and Type | Method and Description |
---|---|
SATSolver |
cnf()
Returns the SATSolver object containing the CNF encoding of this.formula.
|
int |
numPrimaryVariables()
Returns the number of primary variables allocated
during translation.
|
IntSet |
primaryVariables(Relation relation)
Returns the set of primary variables that represent
the tuples in the given relation.
|
bounds, interpret, options, trivial
public final SATSolver cnf()
SATSolver.solve()
.
Modification of the returned object may cause violation of Translation
invariants.cnf
in class Translation
Translation.cnf()
public int numPrimaryVariables()
some this.bounds.upperBound[r].tuples - this.bounds.lowerBound[r].tuples
).numPrimaryVariables
in class Translation
Translation.numPrimaryVariables()
public IntSet primaryVariables(Relation relation)
this.bounds.upperBound(r).size() - this.bounds.lowerBound(r).size()
variable identifiers.primaryVariables
in class Translation
Translation.primaryVariables(kodkod.ast.Relation)
© Emina Torlak 2005-present