|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.uni_tuebingen.sfb.lichtenstein.formulas.FormulaImpl de.uni_tuebingen.sfb.lichtenstein.formulas.ComposedFormula de.uni_tuebingen.sfb.lichtenstein.formulas.BinaryJunctor
public abstract class BinaryJunctor
A superclass for implication and equivalence, implementing common methods for binary junctors.
Constructor Summary | |
---|---|
protected |
BinaryJunctor(Formula first,
Formula second)
Initialize a new binary junctor, taking two formulas as arguments. |
Method Summary | |
---|---|
protected Set<Predicate> |
computePredicates()
Compute the set of predicates in this formula. |
protected Set<Variable> |
computeVariables()
Compute the set of variables in this formula. |
boolean |
containsVariable(Variable var)
Returns whether this formula contains the given variable. |
boolean |
equals(Object other)
An object is equal to a binary junctor if it has the same class (i.e., not only it is a binary junctor, but it really has the same leaf-level class), and the arguments are both equal, respectively. |
Formula |
getFirstArgument()
Returns the first argument. |
int |
getNbSubformulas()
Returns the number of direct subformulas. |
Formula |
getSecondArgument()
Returns the second argument. |
Formula |
getSubformulaAt(int index)
Returns the subformulas this binary junction is built up of. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isFree(Variable variable)
Check whether the given variable is free in this formula. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class de.uni_tuebingen.sfb.lichtenstein.formulas.ComposedFormula |
---|
getAllSubformulas, getSymbol |
Methods inherited from class de.uni_tuebingen.sfb.lichtenstein.formulas.FormulaImpl |
---|
and, exists, exists, forAll, forAll, getFreeVariables, getPredicates, getVariables, iff, implies, isClosed, not, or |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.uni_tuebingen.sfb.lichtenstein.formulas.Formula |
---|
getNormalForm |
Methods inherited from interface de.uni_tuebingen.sfb.lichtenstein.formulas.Visitable |
---|
accept |
Constructor Detail |
---|
protected BinaryJunctor(Formula first, Formula second)
first
- The first argument.second
- The second argument.Method Detail |
---|
public Formula getFirstArgument()
public Formula getSecondArgument()
protected Set<Variable> computeVariables()
computeVariables
in class FormulaImpl
public boolean containsVariable(Variable var)
var
- The variable to check.public boolean isFree(Variable variable)
variable
- The variable to check.protected Set<Predicate> computePredicates()
computePredicates
in class FormulaImpl
public final int getNbSubformulas()
getNbSubformulas
in class ComposedFormula
public Formula getSubformulaAt(int index)
getSubformulaAt
in class ComposedFormula
index
- The index of the wanted subformula. Indices start from 0.public boolean equals(Object other)
equals
in class FormulaImpl
public int hashCode()
This method should be overridden along with equals
. For the reason, see Object.hashCode()
.
hashCode
in class FormulaImpl
public String toString()
formulas have a traditional string representation. No elimination of unnecessary parentheses is performed.
toString
in class FormulaImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |