P
- base class of propositional variables.public class SAT<P> extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
SAT.Clause<P>
Disjunction of literals.
|
protected static class |
SAT.Form<P>
Conjunction of clauses.
|
static class |
SAT.Literal<P>
Optionally negated propositional variable.
|
Constructor and Description |
---|
SAT()
Create a new solver.
|
Modifier and Type | Method and Description |
---|---|
protected SAT.Literal<? extends P> |
choose(SAT.Form<P> form)
Choose a literal to resolve from a formula.
|
Set<SAT.Literal<? extends P>> |
solve(Collection<? extends Collection<? extends SAT.Literal<? extends P>>> cnf)
Solve a formula.
|
protected SAT.Form<P> |
solve(SAT.Form<P> form)
Solve a formula.
|
protected SAT.Literal<? extends P> choose(SAT.Form<P> form)
The default strategy chooses the first literal of the first
clause, as per form.iterator().next().iterator().next()
.
form
- the current formula, a nonempty collection of
nonempty clauses.form
.protected SAT.Form<P> solve(SAT.Form<P> form)
form
- a formula to solve.form
; or a false formula if form
is
unsatisfiable.public Set<SAT.Literal<? extends P>> solve(Collection<? extends Collection<? extends SAT.Literal<? extends P>>> cnf)
cnf
- a formula to solve, given as a collection of clauses
(collections of literals).form
; or a false formula if form
is unsatisfiable.see also the complete user documentation .