Pandora.LogicParser.Formula
Class Exists

java.lang.Object
  extended by Pandora.LogicParser.Formula.Formula
      extended by Pandora.LogicParser.Formula.Quantifier
          extended by Pandora.LogicParser.Formula.Exists
All Implemented Interfaces:
java.io.Serializable

public class Exists
extends Quantifier

The There Exists quantifier formula.
Extends abstract class Formula.

See Also:
Serialized Form

Constructor Summary
Exists(Var var, Formula formula)
          Constructs a There Exists Formula.
 
Method Summary
 void addToSignature(PanSignature signature)
          This method adds this Formula to the passed PanSignature's IF it is not already in the signature.
 boolean checkSub(Term x, Term y, Formula f)
          Returns true if the passed formula f can be reached by substituting the occurrences of Term x by Term y.
 java.lang.String display()
          Returns the a String to display the There Exists Formula.
 Formula getFormula()
          Returns the Formula which is bound by the quantifier.
 Var getVar()
          Returns the bound variable of the quantifier formula.
 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 SVar to replace PVar in the formula where necessary.
 void setAtoms()
          Adds this atom to the list of atoms for the formula.
The list of atoms is found in Formula class.
 void setVar(Var v)
           
 void setVars(Var v)
          This method adds Var v to the list of variables this Formula is bound to.
 Formula subAll(Term x, Term y)
          Returns the Formula that is derived after substituting ALL the occurrences of Term x with Term y.
 
Methods inherited from class Pandora.LogicParser.Formula.Quantifier
clashes, getAllTerms, getPrecedence, getTerms
 
Methods inherited from class Pandora.LogicParser.Formula.Formula
check, concatNoDup, getAtoms, getLeft, getRight, getTuples, getVars, higher, isBracketed, map, setLeft, setRight, setTuples, showTuples, sub
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exists

public Exists(Var var,
              Formula formula)
Constructs a There Exists Formula.

Parameters:
var - Var represents the variable of the There Exists Formula.
formula - Formula represents the Formula the quantifier is applied on.
Method Detail

getVar

public Var getVar()
Returns the bound variable of the quantifier formula.

Specified by:
getVar in class Quantifier

setVar

public void setVar(Var v)

getFormula

public Formula getFormula()
Returns the Formula which is bound by the quantifier.

Specified by:
getFormula in class Quantifier

display

public java.lang.String display()
Returns the a String to display the There Exists Formula.

Specified by:
display in class Quantifier

setAtoms

public void setAtoms()
Adds this atom to the list of atoms for the formula.
The list of atoms is found in Formula class.

Specified by:
setAtoms in class Formula

setVars

public void setVars(Var v)
This method adds Var v to the list of variables this Formula is bound to.

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

checkSub

public boolean checkSub(Term x,
                        Term y,
                        Formula f)
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:
x - Term represents the Term to be substituted.
y - Term represents the Term to substitute Term x.
f - Formula represents the Formula to check if it can be reached after substitution.

subAll

public Formula subAll(Term x,
                      Term y)
Returns the Formula that is derived after substituting ALL the occurrences of Term x with Term y.

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

addToSignature

public void addToSignature(PanSignature signature)
This method adds this Formula to the passed PanSignature's 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.

s

public Formula s()
Creates SVar to replace PVar in the formula where necessary. Used in Raptor.

Specified by:
s in class Formula

regenerate

public Formula regenerate()
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