|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPandora.LogicParser.Formula.Formula
Pandora.LogicParser.Formula.BExp.BExp
public abstract class BExp
Abstract class for boolean expressions.
Field Summary | |
---|---|
Term |
left
|
Term |
right
|
Constructor Summary | |
---|---|
BExp()
|
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 If this Formula is an instance of Predicate, its Parameters |
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 |
clashes(PanSignature signature)
Returns a String of error message if this Term clashes with the passed PanSignature. A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables. If this Term does not clash with the Signature, it is added to the signature and an empty String is returned. |
abstract java.lang.String |
display()
Returns a String to display the BExp. |
Term |
getLeftTerm()
Returns the left hand side of the boolean expression. |
int |
getPrecedence()
Returns an integer representing the precedence of this formula according to binding conventions |
Term |
getRightTerm()
Returns the right hand side of the boolean expression. |
java.util.List<Term> |
getTerms()
Returns both left and right side of the boolean expression in a list of Terms. |
void |
setAtoms()
Adds the list of Atoms in a given tree to the list of Atoms. |
void |
setVars(Var v)
This method adds Var v to the list of variables this Formula is bound to |
Methods inherited from class Pandora.LogicParser.Formula.Formula |
---|
check, concatNoDup, getAtoms, getLeft, getRight, getTuples, getVars, higher, isBracketed, map, regenerate, s, setLeft, setRight, setTuples, showTuples, sub, subAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Term left
public Term right
Constructor Detail |
---|
public BExp()
Method Detail |
---|
public abstract java.lang.String display()
display
in class Formula
public Term getLeftTerm()
public Term getRightTerm()
public boolean checkSub(Term x, Term y, Formula f)
checkSub
in class Formula
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.public void setAtoms()
setAtoms
in class Formula
public java.lang.String clashes(PanSignature signature)
clashes
in class Formula
signature
- PanSignature Represents the signature to be compared against.public java.util.List<Term> getTerms()
getTerms
in class Formula
public void addToSignature(PanSignature signature)
addToSignature
in class Formula
signature
- PanSignature represents the signature to add this Formula to.public void setVars(Var v)
setVars
in class Formula
v
- Var represents the Var to be added to the list of this Formula's variables.public int getPrecedence()
Formula
getPrecedence
in class Formula
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |