|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResolutionTrace
A proof of unsatisfiability generated by a SATProver. Formally, a resolution trace is a sequence of inferences made by a prover that ends in a conflict (empty clause). An element in a resolution trace is called a clause. There are two kinds of clauses in the trace: axioms and resolvents. Axioms are the clauses given to the prover via the SATSolver.addClause(int[]) method, and resolvents are the clauses derived by the prover from axioms or previously learned resolvents through resolution.
Clauses in a resolution trace are ordered as follows. The first |A| elements in the trace correspond to the axioms given to the prover (i.e. prover.clauses). An axiom a1 precedes an axiom a2 in the trace if and only if a1 was added to the prover before a2. (An axiom is "added" to the prover, and appears in the trace, if and only if the corresponding call to SATSolver.addClause(int[])) returned true.) The remaining elements in the trace are the resolvents. A resolvent r succeeds all of the resolvents needed for its derivation (i.e. all resolvents reachable from r via the Clause.antecedents() relation). The last element in the trace is the conflict resolvent. The axioms that are reachable from the conflict form the unsatisfiable core of the trace.
#elts = #(prover.clauses + prover.resolvents) |
elts[[0..#prover.clauses)].literals = prover.clauses |
elts[[#prover.clauses..#elts)].literals = prover.resolvents |
all i: [0..#prover.clauses) | no elts[i].antecedents |
all i: [#prover.clauses..#elts) | all ante: elts[i].antecedents[int] | elts.ante < i |
no conflict.literals |
prover: SATProver |
elts: Clause[] |
conflict: elts[#elts-1] |
Method Summary | |
---|---|
IntSet |
axioms()
Returns the indices of the axioms in this trace. |
IntSet |
backwardReachable(IntSet indices)
Returns the indices of all clauses reachable from the clauses at the given indices by following the transpose of the antecedent relation zero or more times. |
IntSet |
core()
Returns the indices of the axioms that form the unsatisfiable core of this trace. |
Clause |
get(int index)
Returns the clause at the given index. |
java.util.Iterator<Clause> |
iterator()
Returns an iterator over the elements in this trace in proper sequence. |
java.util.Iterator<Clause> |
iterator(IntSet indices)
Returns an iterator over the elements at the given indices in this trace, in proper sequence. |
IntSet |
reachable(IntSet indices)
Returns the indices of all clauses reachable from the clauses at the given indices by following the antecedent relation zero or more times. |
IntSet |
resolvents()
Returns the indices of the resolvents in this trace. |
java.util.Iterator<Clause> |
reverseIterator(IntSet indices)
Returns an iterator over the elements at the given indices in this trace, in the reverse order of indices. |
int |
size()
Returns the length of this trace. |
Method Detail |
---|
int size()
java.util.Iterator<Clause> iterator()
Note:The clause objects returned by the iterator are not required to be immutable. In particular, the state of a clause object returned by next() (as well as the state of any object obtained through that clause's Clause.antecedents() method) is guaranteed to remain the same only until the subsequent call to the next() method of the iterator instance.
iterator
in interface java.lang.Iterable<Clause>
java.util.Iterator<Clause> iterator(IntSet indices)
Note:The clause objects returned by the iterator are not required to be immutable. In particular, the state of a clause object returned by next() (as well as the state of any object obtained through that clause's Clause.antecedents() method) is guaranteed to remain the same only until the subsequent call to the next() method of the iterator instance.
java.lang.IndexOutOfBoundsException
- - indices.min() < 0 || indices.max() >= this.size()indices.min() >= 0 && indices.max() < this.size() |
java.util.Iterator<Clause> reverseIterator(IntSet indices)
Note:The clause objects returned by the iterator are not required to be immutable. In particular, the state of a clause object returned by next() (as well as the state of any object obtained through that clause's Clause.antecedents() method) is guaranteed to remain the same only until the subsequent call to the next() method of the iterator instance.
java.lang.IndexOutOfBoundsException
- - indices.min() < 0 || indices.max() >= this.size()indices.min() >= 0 && indices.max() < this.size() |
IntSet core()
IntSet axioms()
IntSet resolvents()
IntSet reachable(IntSet indices)
java.lang.IllegalArgumentException
- - indices.min() < 0 || indices.max() >= this.size()indices.min() >= 0 && indices.max() < this.size() |
IntSet backwardReachable(IntSet indices)
java.lang.IllegalArgumentException
- - indices.min() < 0 || indices.max() >= this.size()indices.min() >= 0 && indices.max() < this.size() |
Clause get(int index)
java.lang.IndexOutOfBoundsException
- - 0 < index || index >= this.size()0 <= index < this.size() |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |