|
|||||||||
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.Unknown
public class Unknown
The unknown item.
Extends abstract class Formula.
Respresents the ?P formulae that are necessary in the proof.
Constructor Summary | |
---|---|
Unknown(java.lang.String name)
Constructs a new unknown. |
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 th eoccurrences of Term x by Term y in this Unknown. |
java.lang.String |
clashes(PanSignature signature)
Returns a String containing an Error character if this Unknown clashes with the passed PanSignature, Otherwise it will return an Empty String "" An Atom clashes with a signature if it clashes with any of its Predicates/Functions/Constants/Variables. |
java.lang.String |
display()
Returns a String to display the var term. |
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 i.e. |
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()
Obtains the atoms in the formula and adds them to the list of atoms for the tree which contains this formula. |
void |
setVars(Var v)
This method adds Var v to the list of variables this Formula is bound to. |
Formula |
subAll(Term a,
Term b)
Returns the Formula that is derived after substituting ALL the occurrences of Term a with Term b in this Unknown. |
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 |
---|
public Unknown(java.lang.String name)
name
- the name of the unknownMethod Detail |
---|
public void setAtoms()
setAtoms
in class Formula
public java.lang.String display()
display
in class Formula
public Formula subAll(Term a, Term b)
subAll
in class Formula
a
- Term represents the Term to be substituted.b
- Term represents the Term to substitute Term a.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 Formula s()
s
in class Formula
public Formula regenerate()
regenerate
in class Formula
public java.lang.String clashes(PanSignature signature)
clashes
in class Formula
signature
- PanSignature represents the PanSignature to be checked if this Atom clashes with.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()
getPrecedence
in class Formula
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |