public class SequentOnLists extends java.lang.Object implements _Sequent, java.lang.Cloneable
_Sequent interface using lists to store left
and right formulas. A sequent has the form S ==> T where
S and T are sets of propositional formulas.| Constructor and Description |
|---|
SequentOnLists()
Builds an empty sequent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLeft(java.util.Collection<Formula> formulas) |
void |
addLeft(Formula wff)
Add the specified formula to the left hand side of this sequent.
|
void |
addRight(java.util.Collection<Formula> formulas) |
void |
addRight(Formula wff)
This method add the specified formula in the right hand side of this
sequent.
|
void |
clearLeft() |
void |
clearRight() |
SequentOnLists |
clone()
Returns a fresh copy of this sequent.
|
boolean |
containsLeft(Formula wff)
Returns
true if this sequent contains the specified formula in
the left hand side and false otherwise. |
boolean |
containsLeft(FormulaType type)
Returns
true if this sequent contains at least a formula of
the specified type in the left-hand side. |
boolean |
containsRight(Formula wff)
Returns
true if this sequent contains the specified formula in
the right hand side and false otherwise. |
boolean |
containsRight(FormulaType type)
Returns
true if this sequent contains at least a formula of
the specified type in the right-hand side. |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
format()
Returns a string describing this goal
|
Formula |
getLeft(FormulaType formulaType)
Returns a formula of the specified type contained in the left hand side of
the sequent or
null if no formula of the specified type occurs
in this sequent. |
java.util.Collection<Formula> |
getLeftFormulas()
Returns the set containg all the formulas in the left hand side of this
sequent or
null if the left hand side of this sequent is
empty. |
java.util.Collection<Formula> |
getLeftFormulas(FormulaType formulaType)
Returns the collection of all the formulas in the left hand side of this
sequent with the specified type or
null if the left hand side
of this sequent does not contain any formula of the specified type. |
Formula |
getRight(FormulaType formulaType)
Returns the formula in the right hand side of this sequent or
null if the formula in the right hand side does not have the
specified type. |
java.util.Collection<Formula> |
getRightFormulas()
Returns the set containg all the formulas in the right hand side of this
sequent or
null if the right hand side of this sequent is
empty. |
java.util.Collection<Formula> |
getRightFormulas(FormulaType formulaType)
Returns the collection of all the formulas in the right hand side of this
sequent with the specified type or
null if the right hand side
of this sequent does not contain any formula of the specified type. |
boolean |
isEmpty()
Returns
true iff this sequent is empty. |
boolean |
isIdentityAxiom()
Returns
true iff this is an identity axiom, that is a sequent
of the kind S,H ==> H. |
boolean |
isLeftSideEmpty()
Returns
true iff the left-hand side of this sequent is empty. |
boolean |
isRightSideEmpty()
Returns
true iff the right-hand side of this sequent is empty. |
java.util.Iterator<Formula> |
leftSideIterator() |
boolean |
removeLeft(Formula wff)
Removes the specified formula from the left hand side of this sequent, if
it is present.
|
boolean |
removeRight(Formula wff)
Removes the right formula form this sequent.
|
java.util.Iterator<Formula> |
rigtSideIterator() |
void |
stablePart() |
java.lang.String |
toString() |
public java.util.Collection<Formula> getLeftFormulas()
_Sequentnull if the left hand side of this sequent is
empty.getLeftFormulas in interface _Sequentnull.public java.util.Collection<Formula> getLeftFormulas(FormulaType formulaType)
_Sequentnull if the left hand side
of this sequent does not contain any formula of the specified type.getLeftFormulas in interface _SequentformulaType - the type of the formulas.null if the left hand side of the sequent does not contain any
formula of the specified type.public java.util.Collection<Formula> getRightFormulas()
_Sequentnull if the right hand side of this sequent is
empty.getRightFormulas in interface _Sequentnull.public java.util.Collection<Formula> getRightFormulas(FormulaType formulaType)
_Sequentnull if the right hand side
of this sequent does not contain any formula of the specified type.getRightFormulas in interface _SequentformulaType - the type of the formulas.null if the left hand side of the sequent does not contain any
formula of the specified type.public void addLeft(Formula wff)
_Sequentpublic void addRight(Formula wff)
_Sequentpublic Formula getLeft(FormulaType formulaType)
_Sequentnull if no formula of the specified type occurs
in this sequent.public Formula getRight(FormulaType formulaType)
_Sequentnull if the formula in the right hand side does not have the
specified type.public boolean isRightSideEmpty()
_Sequenttrue iff the right-hand side of this sequent is empty.isRightSideEmpty in interface _Sequenttrue iff the right-hand side of this sequent is emptypublic boolean isLeftSideEmpty()
_Sequenttrue iff the left-hand side of this sequent is empty.isLeftSideEmpty in interface _Sequenttrue iff the right-hand side of this sequent is emptypublic boolean isEmpty()
_Sequenttrue iff this sequent is empty.public boolean removeLeft(Formula wff)
_SequentremoveLeft in interface _Sequentwff - the formula to remove.true if this sequent contained the specified element.public boolean removeRight(Formula wff)
_SequentremoveRight in interface _Sequentwff - the formula to remove.true if this sequent contained a formula in the
right-hand side.public boolean isIdentityAxiom()
_Sequenttrue iff this is an identity axiom, that is a sequent
of the kind S,H ==> H.isIdentityAxiom in interface _Sequenttrue iff this is an identity axiom.public boolean containsLeft(Formula wff)
_Sequenttrue if this sequent contains the specified formula in
the left hand side and false otherwise.containsLeft in interface _Sequentwff - the formula to searchtrue if the left hand side of this sequent contains
the specifiedpublic boolean containsLeft(FormulaType type)
_Sequenttrue if this sequent contains at least a formula of
the specified type in the left-hand side.containsLeft in interface _Sequenttype - the type of the formula.true if this sequent contains at least a formula of
the specified type in the left-hand side.public boolean containsRight(Formula wff)
_Sequenttrue if this sequent contains the specified formula in
the right hand side and false otherwise.containsRight in interface _Sequentwff - the formula to searchtrue if the right hand side of this sequent contains
the specifiedpublic boolean containsRight(FormulaType type)
_Sequenttrue if this sequent contains at least a formula of
the specified type in the right-hand side.containsRight in interface _Sequenttype - the type of the formula.true if this sequent contains at least a formula of
the specified type in the right-hand side.public SequentOnLists clone()
_Sequentclone in interface _AbstractGoalclone in interface _Sequentclone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String format()
_AbstractGoalformat in interface _AbstractGoalpublic java.lang.String toString()
toString in class java.lang.Objectpublic void stablePart()
stablePart in interface _Sequentpublic void clearRight()
clearRight in interface _Sequentpublic void addLeft(java.util.Collection<Formula> formulas)
public void addRight(java.util.Collection<Formula> formulas)
public java.util.Iterator<Formula> leftSideIterator()
leftSideIterator in interface _Sequentpublic java.util.Iterator<Formula> rigtSideIterator()
rigtSideIterator in interface _Sequent