Package eu.bandm.tools.dpll
Class SAT.Clause<P>
- All Implemented Interfaces:
Iterable<SAT.Literal<? extends P>>,Collection<SAT.Literal<? extends P>>
Disjunction of literals.
Literals are accessible via the unmodifiable collection interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract @Opt SAT.Literal<? extends P> getUnit()Extract unit literal.abstract booleanisFalse()Check whether this clause is unsatisfiable.abstract booleanisTrue()Check whether this clause is tautological.abstract booleanisUnit()Check whether this clause is unitary.(package private) static <P> SAT.Clause<P> or(SAT.Literal<? extends P>... lits) (package private) static <P> SAT.Clause<P> or(SAT.Literal<? extends P> first, SAT.Clause<P> rest) (package private) abstract SAT.Clause<P> propagate(SAT.Literal<? extends P> lit) intscore()Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
Clause
protected Clause()
-
-
Method Details
-
isTrue
public abstract boolean isTrue()Check whether this clause is tautological.- Returns:
trueif this clause is true under all interpretations;falseotherwise.
-
isFalse
public abstract boolean isFalse()Check whether this clause is unsatisfiable.- Returns:
trueif this clause is false under all interpretations;falseotherwise.
-
isUnit
public abstract boolean isUnit()Check whether this clause is unitary.- Returns:
trueif this clause contains exactly one literal;falseotherwise.
-
getUnit
Extract unit literal.- Returns:
- if this clause contains exactly one
literal, it is returned;
nullotherwise.
-
score
public int score() -
propagate
-
or
-
or
-