|
||||||||||
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.NaryJunctor
public abstract class NaryJunctor
A superclass for conjunction and disjunction, implementing common methods for binary junctors.
Constructor Summary | |
---|---|
protected |
NaryJunctor(Formula... arguments)
Initialize a new n-ary junctor, taking an unlimited number of 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. |
Formula |
getArgument(int index)
Get the indexth argument. |
int |
getNbArguments()
Return the number of arguments. |
int |
getNbSubformulas()
Returns the number of subformulas of this formula. |
Formula |
getSubformulaAt(int index)
Returns the indexth subformula of this formula. |
boolean |
hasAsArgument(Formula form)
Returns whether this n-ary junctor has the given formula as an argument. |
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, equals, 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 NaryJunctor(Formula... arguments)
arguments
- The arguments to this n-ary junctor.Method Detail |
---|
public int getNbArguments()
public Formula getArgument(int index) throws IndexOutOfBoundsException
index
- The index of the argument wanted.IndexOutOfBoundsException
- [CAN]
If the index is less than zero or more than the number of outgoing edges. | index < 0 || index >=
getNbArguments()public boolean hasAsArgument(Formula form)
form
- The formula which has to be checked.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 int getNbSubformulas()
getNbSubformulas
in class ComposedFormula
public Formula getSubformulaAt(int index) throws IndexOutOfBoundsException
getSubformulaAt
in class ComposedFormula
index
- The index of the wanted subformula. Indices start from 0.
IndexOutOfBoundsException
- [CAN]
The index is bigger than or equal to the number of subformulas of this formula, or less than zero | index <
0 || index >= getNbSubformulas()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 |