Raptor.LogicParser.Formula
Class Bool

java.lang.Object
  extended by Raptor.LogicParser.Formula.Formula
      extended by Raptor.LogicParser.Formula.Bool
All Implemented Interfaces:
java.io.Serializable

public class Bool
extends Formula

See Also:
Serialized Form

Constructor Summary
Bool(java.lang.String name)
           
 
Method Summary
 void addToSignature(PanSignature signature)
          This method adds this Formula to the passed PanSignature's Predicate list IF it is not already in the signature.
 boolean checkSub(Term termX, Term termY, Formula formula)
          Returns true if the passed formula f can be reached by substituting the occurrences of Term x by Term y.
 java.lang.String clashes(PanSignature signature)
          Returns a String containing an Error character if this Formula clashes with the passed PanSignature, Otherwise it will return an Empty String "".
 java.lang.String display()
          Returns the a String to display the Formula.
 int getPrecedence()
          Returns an integer representing the precedence of this formula according to binding conventions
 java.util.List<Term> getTerms()
          This method returns a list of all the Terms this formula contain.
 Formula regenerate()
          Returns a copy of the Formula which can be saved as part of the copy made for the undo function.
 Formula s()
          Creates VVar to replace PVar in the formula where necessary.
 void setAtoms()
          Adds the list of Atoms in a given tree to the list of Atoms.
 void setVars(Var var)
          This method adds Var v to the list of variables this Formula is bound to.
 Term ST()
           
 Formula subAll(PTerm left, PTerm right)
           
 Formula subAll(Term termX, Term termY)
          Returns the Formula that is derived after substituting ALL the occurrences of Term x with Term y.
 Formula subBoolRes(java.lang.String display)
           
 
Methods inherited from class Raptor.LogicParser.Formula.Formula
check, concatNoDup, getAtoms, getLeft, getRight, getTuples, getVars, higher, map, setLeft, setRight, setTuples, showTuples, sub, subBool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bool

public Bool(java.lang.String name)
Method Detail

addToSignature

public void addToSignature(PanSignature signature)
Description copied from class: Formula
This method adds this Formula to the passed PanSignature's Predicate list IF it is not already in the signature.

Specified by:
addToSignature in class Formula
Parameters:
signature - PanSignature represents the signature to add this Formula to.

checkSub

public boolean checkSub(Term termX,
                        Term termY,
                        Formula formula)
Description copied from class: Formula
Returns true if the passed formula f can be reached by substituting the occurrences of Term x by Term y.

Specified by:
checkSub in class Formula
Parameters:
termX - Term represents the Term to be substituted.
termY - Term represents the Term to substitute Term x.
formula - Formula represents the Formula to check if it can be reached after substitution.

clashes

public java.lang.String clashes(PanSignature signature)
Description copied from class: Formula
Returns a String containing an Error character if this Formula clashes with the passed PanSignature, Otherwise it will return an Empty String "".

Specified by:
clashes in class Formula
Parameters:
signature - PanSignature represents the PanSignature to be checked if this Atom clashes with.

display

public java.lang.String display()
Description copied from class: Formula
Returns the a String to display the Formula.

Specified by:
display in class Formula

getPrecedence

public int getPrecedence()
Description copied from class: Formula
Returns an integer representing the precedence of this formula according to binding conventions

Specified by:
getPrecedence in class Formula

getTerms

public java.util.List<Term> getTerms()
Description copied from class: Formula
This method returns a list of all the Terms this formula contain.

Specified by:
getTerms in class Formula

regenerate

public Formula regenerate()
Description copied from class: Formula
Returns a copy of the Formula which can be saved as part of the copy made for the undo function.

Specified by:
regenerate in class Formula

s

public Formula s()
Description copied from class: Formula
Creates VVar to replace PVar in the formula where necessary.

Specified by:
s in class Formula

setAtoms

public void setAtoms()
Description copied from class: Formula
Adds the list of Atoms in a given tree to the list of Atoms.

Specified by:
setAtoms in class Formula

setVars

public void setVars(Var var)
Description copied from class: Formula
This method adds Var v to the list of variables this Formula is bound to.

Specified by:
setVars in class Formula
Parameters:
var - Var represents the Var to be added to the list of this Formula's variables.

subAll

public Formula subAll(Term termX,
                      Term termY)
Description copied from class: Formula
Returns the Formula that is derived after substituting ALL the occurrences of Term x with Term y.

Specified by:
subAll in class Formula
Parameters:
termX - Term represents the Term to be substituted.
termY - Term represents the Term to substitute Term x.

ST

public Term ST()
Specified by:
ST in class Formula

subAll

public Formula subAll(PTerm left,
                      PTerm right)
Specified by:
subAll in class Formula

subBoolRes

public Formula subBoolRes(java.lang.String display)
Specified by:
subBoolRes in class Formula