kodkod.engine.satlab
Interface SATProver.Clause

Enclosing interface:
SATProver

public static interface SATProver.Clause

A clause in a proof of unsatisfiability.

invariant:
some antecedents => this.literals = { lit: antecedents.literals | -lit !in antecedents.literals }
prover = antecedents.prover
specfield:
prover: SATProver \\ sat prover containing this clause
literals: set int \\ clause literals
antecedents: set Clause \\ the clauses from which this clause was derived

Method Summary
 java.util.Set<SATProver.Clause> antecedents()
          Returns an unmodifiable set view of this.antecedents.
 int index()
          Returns a non-negative integer indicating when this clause was first seen by this.prover.
 boolean learned()
          Returns true if this clause was learned during solving.
 IntSet literals()
          Returns an unmodifiable IntSet view of this.literals.
 

Method Detail

index

int index()
Returns a non-negative integer indicating when this clause was first seen by this.prover. In particular, the first clause that was added to this.prover via SATSolver.addClause(int[]) will have index 0, the next one will have index 1, the first learned clause will have index SATSolver.numberOfClauses(), etc.

Returns:
the index of this clause

literals

IntSet literals()
Returns an unmodifiable IntSet view of this.literals.

Returns:
an unmodifiable IntSet view of this.literals

antecedents

java.util.Set<SATProver.Clause> antecedents()
Returns an unmodifiable set view of this.antecedents.

Returns:
an unmodifiable set view of this.antecedents.

learned

boolean learned()
Returns true if this clause was learned during solving.

Returns:
some this.antecedents