|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.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.
| Method Summary | |
|---|---|
boolean |
containsVariable(Variable var)
Returns whether this formula contains the given variable. |
Formula |
getArgument(int index)
Get the indexth argument. |
int |
getFirstIndexOf(Variable var)
Get the first index at which the given variable occurs. |
int |
getNbArguments()
Return the number of arguments. |
int |
getNbBoundVariables()
Returns the number of bound variables in this formula. |
int |
getNbFreeVariables()
Returns the number of free variables in this formula. |
int |
getNbSubformulas()
Returns the number of subformulas of this formula. |
int |
getNbVariables()
Returns the number of variables in this formula. |
Set<Predicate> |
getPredicates()
Return all predicates that occur in this formula. |
Formula |
getSubformulaAt(int index)
Returns the indexth subformula of this formula. |
Variable |
getVariableAt(int index)
Get the indexth variable. |
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 |
isFreeVariable(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 |
|---|
accept, and, equals, exists, exists, forAll, forAll, getFreeVariables, getVariables, iff, implies, isClosed, not, or |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.uni_tuebingen.sfb.lichtenstein.formulas.Formula |
|---|
getNormalForm |
| Method Detail |
|---|
public int getNbArguments()
| result == getNbSubformulas()
public Formula getArgument(int index)
throws IndexOutOfBoundsException
index - The index of the argument wanted.| getSubformulaAt(index)| index < 0 || index >=
getNbArguments()public boolean hasAsArgument(Formula form)
form - The formula which has to be checked.public int getNbSubformulas()
getNbSubformulas in class ComposedFormula
public Formula getSubformulaAt(int index)
throws IndexOutOfBoundsException
getSubformulaAt in class ComposedFormulaindex - The index of the wanted subformula. Indices start from 0.public boolean containsVariable(Variable var)
var - The variable to check.| if ( for one i in
0..getNbArguments(): getArgument(i).containsVariable(var) )
| then result == true | else result == falsepublic int getFirstIndexOf(Variable var)
var - The variable of which the index is wanted.public int getNbBoundVariables()
| result ==
Sum{getArgument(i).getNbBoundVariables()
|for each i in 0..getNbArguments()}public int getNbFreeVariables()
| result ==
Sum{getArgument(i).getNbFreeVariables()
|for each i in 0..getNbArguments()}public int getNbVariables()
| result == Sum{getArgument(i).getNbVariables()|for
each i in 0..getNbArguments()}public Set<Predicate> getPredicates()
public Variable getVariableAt(int index)
throws IndexOutOfBoundsException
index - The index of the wanted variablepublic boolean isFreeVariable(Variable variable)
variable - The variable to check.| result == for one i in 0..getNbArguments():
getArgument(i).isFreeVariable(variable)public int hashCode()
This method should be overridden along with equals. For the reason, see Object.hashCode().
hashCode in class FormulaImplpublic String toString()
formulas have a traditional string representation. No elimination of unnecessary parentheses is performed.
toString in class FormulaImpl| for each i in 0..getNbArguments():
result.contains(getArgument(i).toString())
| result.contains(getSymbol())
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||