|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.moon.logic.ClassicalLogic.Utilities
public static final class ClassicalLogic.Utilities
Formula transformation utilities.
Utility
Field Summary | |
---|---|
static java.util.Set |
CONTRADICTION
Deprecated. Use Clause.CONTRADICTION instead. |
Method Summary | |
---|---|
static java.util.Set |
clausalForm(Formula f,
boolean simplifying)
Deprecated. Prefer to use the more general method ClausalFactory.asClausalSet(orbital.logic.imp.Formula)
instead. |
static Formula |
conjunctiveForm(Formula f)
Transforms into conjunctive normal form (CNF). |
static Formula |
conjunctiveForm(Formula f,
boolean simplifying)
Transforms into conjunctive normal form (CNF). |
static Formula |
constantClosure(Formula F)
Get the constant-closure of a formula. |
static Formula |
disjunctiveForm(Formula f)
Transforms into disjunctive normal form (DNF). |
static Formula |
disjunctiveForm(Formula f,
boolean simplifying)
Transforms into disjunctive normal form (DNF). |
static Formula |
dropQuantifiers(Formula F)
Drop any quantifiers. |
static Formula |
existentialClosure(Formula F)
Get the ∃-closure of a formula. |
static Formula |
negation(Formula F)
Get the negation of F without introducing duplex negatios. |
static Formula |
negationForm(Formula F)
Get the negation normal form of a formula. |
static Formula |
skolemForm(Formula F)
Get the Skolem normal form of a formula. |
static Formula |
universalClosure(Formula F)
Get the ∀-closure of a formula. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Set CONTRADICTION
Clause.CONTRADICTION
instead.The contradictory set of clauses is {∅}={□} while the tautological set of clauses is {}.
Method Detail |
---|
public static Formula disjunctiveForm(Formula f)
disjunctiveForm(Formula,boolean)
public static Formula disjunctiveForm(Formula f, boolean simplifying)
Note that the conversion to
SAT | Tautology | |
---|---|---|
CNF | NP-complete | linear |
DNF | linear | Co-NP-complete |
This TRS terminates but is not confluent, hence it does not lead to a canonical form. The canonical form would not be minimal, though.
simplifying
- Whether to enable simplifying transformations.
Observe that, to avoid complexity pitfalls, this will perform partial
simplification during the transformation. For performance reasons, the implementation avoids a full simplification.public static Formula conjunctiveForm(Formula f)
conjunctiveForm(Formula, boolean)
public static Formula conjunctiveForm(Formula f, boolean simplifying)
Note that the conversion to
SAT | Tautology | |
---|---|---|
CNF | NP-complete | linear |
DNF | linear | Co-NP-complete |
This TRS terminates but is not confluent, hence it does not lead to a canonical form. The canonical form would not be minimal, though.
simplifying
- Whether to enable simplifying transformations.
Observe that, to avoid complexity pitfalls, this will perform partial
simplification during the transformation. For performance reasons, the implementation avoids a full simplification.
If you need even more simplification, use ClausalFactory.asClausalSet(orbital.logic.imp.Formula)
instead.
clausalFactory.asClausalSet().toFormula();
ClausalFactory.asClausalSet(orbital.logic.imp.Formula)
,
"David A. Plaisted & Steven Greenbaum. A structure-preserving clause form translation. J. Symb. Comput., Academic Press, Inc., 1986, 2, 293-304.",
"Rolf Socher-Ambrosius. Boolean algebra admits no convergent term rewriting system, Springer Lecture Notes in Computer Science 488, RTA '91."public static final Formula negationForm(Formula F)
A formula is in a negation normal form if the only negations are due to literals, i.e. negations may only occur directly in front of an atom.
In order to prevent ill-defined negation normal forms, we will first get rid of derived junctors like →,↔ etc.
public static final java.util.Set clausalForm(Formula f, boolean simplifying)
ClausalFactory.asClausalSet(orbital.logic.imp.Formula)
instead.
Defined per structural induction.
simplifying
- Whether or not to use simplified CNF for calculating clausal forms.ClausalFactory.asClausalSet(orbital.logic.imp.Formula)
public static final Formula dropQuantifiers(Formula F)
public static final Formula skolemForm(Formula F)
After transforming F into negation normal form, a Skolem normal form can be constructed per
negationForm(Formula)
.
public static final Formula universalClosure(Formula F)
F
- the formula having free variables FV(F)=:{x1,...,xn}.
existentialClosure(Formula)
,
constantClosure(Formula)
public static final Formula existentialClosure(Formula F)
F
- the formula having free variables FV(F)=:{x1,...,xn}.
universalClosure(Formula)
,
constantClosure(Formula)
public static final Formula constantClosure(Formula F)
This method replaces all free variables by constants of the same signifier, type and notation. Especially, in combination with other formulas of the same free variables, the closure constants will be the same, unlike any skolem constants introduced in the &exists;-closures of those formulas.
F
- the formula having free variables FV(F)=:{x1,...,xn}.
existentialClosure(Formula)
,
universalClosure(Formula)
public static final Formula negation(Formula F)
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |