|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectRaptor.LogicParser.Formula.Formula
Raptor.LogicParser.Formula.BExp.BExp
public abstract class BExp
Abstract class for boolean expressions.
| Field Summary | |
|---|---|
Term |
left
|
java.lang.String |
op
|
Term |
right
|
| Constructor Summary | |
|---|---|
BExp(Term pLeft,
Term pRight,
java.lang.String pOp)
Create a new binary expression |
|
| Method Summary | |
|---|---|
void |
addToSignature(PanSignature pSignature)
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 pTermX,
Term pTermY,
Formula pFormula)
Returns true if the passed formula f can be reached by substituting the occurrences of Term pTermX by Term pTermY. |
java.lang.String |
clashes(PanSignature pSignature)
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 pVar)
This method adds Var v to the list of variables this Formula is bound to. |
| Methods inherited from class Raptor.LogicParser.Formula.Formula |
|---|
check, concatNoDup, getAtoms, getLeft, getRight, getTuples, getVars, higher, map, regenerate, s, setLeft, setRight, setTuples, showTuples, ST, sub, subAll, subAll, subBool, subBoolRes |
| 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
public java.lang.String op
| Constructor Detail |
|---|
public BExp(Term pLeft,
Term pRight,
java.lang.String pOp)
pLeft - the left side of the binary expressionpRight - the right side of the binary expressionpOp - the operator of the binary expression| Method Detail |
|---|
public abstract java.lang.String display()
display in class Formulapublic Term getLeftTerm()
public Term getRightTerm()
public boolean checkSub(Term pTermX,
Term pTermY,
Formula pFormula)
checkSub in class FormulapTermX - Term represents the Term to be substituted.pTermY - represents the Term to substitute Term pTermX.pFormula - represents the Formula to check to see if it can be reached
after substitution.public void setAtoms()
setAtoms in class Formulapublic java.lang.String clashes(PanSignature pSignature)
clashes in class FormulapSignature - PanSignature Represents the signature to be compared against.public java.util.List<Term> getTerms()
getTerms in class Formulapublic void addToSignature(PanSignature pSignature)
addToSignature in class FormulapSignature - PanSignature represents the signature to add this Formula to.public void setVars(Var pVar)
setVars in class FormulapVar - Var represents the Var to be added to the list of this
Formula's variables.public int getPrecedence()
getPrecedence in class Formula
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||