|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.engine.Solver
public final class Solver
A computational engine for solving relational formulae.
A formula
is solved with respect to given
bounds
and options
.
options: Options |
Constructor Summary | |
---|---|
Solver()
Constructs a new Solver with the default options. |
|
Solver(Options options)
Constructs a new Solver with the given options. |
Method Summary | |
---|---|
Options |
options()
Returns the Options object used by this Solver to guide translation of formulas from first-order logic to cnf. |
Solution |
solve(Formula formula,
Bounds bounds)
Attempts to satisfy the given formula with respect to the specified bounds or prove the formula's unsatisfiability. |
Solution |
solve(Formula formula,
Bounds bounds,
Cost cost)
Attempts to satisfy the given formula with respect to the specified bounds, while minimizing the specified cost function. |
java.util.Iterator<Solution> |
solveAll(Formula formula,
Bounds bounds)
Attempts to find all solutions to the given formula with respect to the specified bounds or to prove the formula's unsatisfiability. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Solver()
this.options' = new Options() |
public Solver(Options options)
java.lang.NullPointerException
- - options = nullthis.options' = options |
Method Detail |
---|
public Options options()
public Solution solve(Formula formula, Bounds bounds, Cost cost) throws HigherOrderDeclException, UnboundLeafException, AbortedException
SATProver
in addition
to being a SATMinSolver
.
java.lang.NullPointerException
- - formula = null || bounds = null || cost = null
UnboundLeafException
- - the formula contains an undeclared variable or
a relation not mapped by the given bounds
HigherOrderDeclException
- - the formula contains a higher order declaration that cannot
be skolemized, or it can be skolemized but this.options.skolemize is false.
AbortedException
- - this solving task was interrupted with a call to Thread.interrupt on this thread
java.lang.IllegalArgumentException
- - some (formula.^children & Relation) - cost.relations
java.lang.IllegalStateException
- - !this.options.solver.minimizer || this.options.logTranslationSolution
,
Options
,
Cost
!this.options.logTranslation && this.options.solver.minimizer |
public Solution solve(Formula formula, Bounds bounds) throws HigherOrderDeclException, UnboundLeafException, AbortedException
java.lang.NullPointerException
- - formula = null || bounds = null
UnboundLeafException
- - the formula contains an undeclared variable or
a relation not mapped by the given bounds
HigherOrderDeclException
- - the formula contains a higher order declaration that cannot
be skolemized, or it can be skolemized but this.options.skolemize is false.
AbortedException
- - this solving task was interrupted with a call to Thread.interrupt on this threadSolution
,
Options
,
Proof
this.options.logTranslation => (all n: formula.*children | #n.~children > 1 => no freeVariables(n)) |
public java.util.Iterator<Solution> solveAll(Formula formula, Bounds bounds) throws HigherOrderDeclException, UnboundLeafException, AbortedException
java.lang.NullPointerException
- - formula = null || bounds = null
UnboundLeafException
- - the formula contains an undeclared variable or
a relation not mapped by the given bounds
HigherOrderDeclException
- - the formula contains a higher order declaration that cannot
be skolemized, or it can be skolemized but this.options.skolemize is false.
AbortedException
- - this solving task was interrupted with a call to Thread.interrupt on this thread
java.lang.IllegalStateException
- - !this.options.solver().incremental()Solution
,
Options
,
Proof
this.options.logTranslation => (all n: formula.*children | #n.~children > 1 => no freeVariables(n)) |
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |