techniques.FOL
Class Sentence

java.lang.Object
  |
  +--techniques.FOL.Sentence
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Connective, Negation, Proposition, Quantifier

public abstract class Sentence
extends java.lang.Object
implements java.lang.Cloneable

Represents a Sentence in first-order logic. The Sentences all have a number of simplification methods.


Field Summary
static Proposition FALSE
          The False proposition.
static Proposition TRUE
          The True proposition.
 
Constructor Summary
Sentence()
           
 
Method Summary
 ClauseList clausalForm()
          Returns a list of clauses that is equivalent to this Sentence.
 java.lang.Object clone()
          cloning returns a deep copy of a sentence.
static void debugPrint(java.lang.String s)
           
static void debugPrintln(java.lang.String s)
          for debugging
abstract  Sentence driveInNegations()
          Drive in negations to get an equivalent Sentence.
abstract  Sentence eliminateEquivalences()
          Removes all equivalence Connectives from the Sentence.
abstract  Sentence eliminateImplications()
          Removes all Implication Connectives from the Sentence.
abstract  void extractQuantifications(java.util.Vector quantifications)
           
abstract  ClauseList makeClauses()
           
abstract  Sentence negate()
          Return the negation of this sentence by applying deMorgan's law.
abstract  Sentence removeQuantifiers(java.util.Vector quantifications)
           
abstract  Sentence renameVariables()
           
abstract  Sentence simplify()
          Simplifies this sentence by removing subtrees that are known to be true or false.
abstract  Sentence substitute(Substitution s)
           
abstract  Sentence substituteVariable(Variable oldVar, Term newVar)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

public static Proposition TRUE
The True proposition.

FALSE

public static Proposition FALSE
The False proposition.
Constructor Detail

Sentence

public Sentence()
Method Detail

clone

public java.lang.Object clone()
cloning returns a deep copy of a sentence.

eliminateEquivalences

public abstract Sentence eliminateEquivalences()
Removes all equivalence Connectives from the Sentence. This is the first stage of simplification.

eliminateImplications

public abstract Sentence eliminateImplications()
Removes all Implication Connectives from the Sentence. This is the second stage of simplification.

driveInNegations

public abstract Sentence driveInNegations()
Drive in negations to get an equivalent Sentence.

simplify

public abstract Sentence simplify()
Simplifies this sentence by removing subtrees that are known to be true or false.

negate

public abstract Sentence negate()
Return the negation of this sentence by applying deMorgan's law.

clausalForm

public ClauseList clausalForm()
Returns a list of clauses that is equivalent to this Sentence.

substitute

public abstract Sentence substitute(Substitution s)

substituteVariable

public abstract Sentence substituteVariable(Variable oldVar,
                                            Term newVar)

renameVariables

public abstract Sentence renameVariables()

extractQuantifications

public abstract void extractQuantifications(java.util.Vector quantifications)

removeQuantifiers

public abstract Sentence removeQuantifiers(java.util.Vector quantifications)

makeClauses

public abstract ClauseList makeClauses()

debugPrintln

public static void debugPrintln(java.lang.String s)
for debugging

debugPrint

public static void debugPrint(java.lang.String s)