kodkod.engine.satlab
Interface SATProof

All Superinterfaces:
SATSolver

public interface SATProof
extends SATSolver

Provides an interface to a SAT solver that can generate proofs of unsatisfiability.

Author:
Emina Torlak
invariant:
all i: [2..) | i in variables => i-1 in variables
all c: clauses | all i: [0..c.length) | c[i] in variables || -c[i] in variables
all c: trace[int] | c in clauses.*(~antecedents)
specfield:
literals: set int
clauses: set int[]
trace: Clause[]

Nested Class Summary
static interface SATProof.Clause
          A clause in a proof of unsatisfiability.
 
Method Summary
 java.util.Iterator<SATProof.Clause> proof()
          Returns an iterator over the resolution trace that proves the unsatisfiability of this.clauses.
 
Methods inherited from interface kodkod.engine.satlab.SATSolver
addClause, addVariables, free, numberOfClauses, numberOfVariables, solve, valueOf
 

Method Detail

proof

java.util.Iterator<SATProof.Clause> proof()
Returns an iterator over the resolution trace that proves the unsatisfiability of this.clauses. The clause objects returned by the iterator are not required to be immutable. In particular, the state of a clause object returned by next() is guaranteed to remain the same only until the subsequent call to next(). All iterators returned by this method are guaranteed to return clauses in the same order, specifically, in the order in which they were encountered or learned during resolution. This means that all the clauses added to the solver will be returned first, in the order of addition, followed by the first learned clause, the second, etc., until the conflict clause is reached.

Returns:
an iterator over the resolution trace that proves the unsatisfiability of this.clauses.
Throws:
java.lang.IllegalStateException - - SATSolver.solve() has not been called, or the last call to SATSolver.solve() returned true
requires:
{@link SATSolver#solve()} has been called, and it returned false