public abstract class ComplexLogicalFormulaAdapter extends java.lang.Object implements ComplexLogicalFormula
Constructor and Description |
---|
ComplexLogicalFormulaAdapter() |
Modifier and Type | Method and Description |
---|---|
abstract ComplexLogicalFormula |
clone()
Creates a deep copy of this formula
|
<C extends Term<?>> |
containsTermsOfType(java.lang.Class<C> cls)
Checks if this logical structure contains at least one term of type C.
|
ComplexLogicalFormula |
exchange(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and at the same time replaces all occurrences of term "t"
by term "v" and eventually returns the new formula.
|
<C extends Term<?>> |
getTerms(java.lang.Class<C> cls)
Processes the set containing all terms of type C.
|
boolean |
isGround()
Checks whether this formula is ground, i.e.
|
boolean |
isLiteral() |
boolean |
isWellFormed()
Checks if this formula is well formed in the logical langauge.
|
ComplexLogicalFormula |
substitute(java.util.Map<? extends Term<?>,? extends Term<?>> map)
Substitutes all occurrences of all terms "v" in map.keyset() in this formula
by map.get(v) and returns the new formula.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
substitute
equals, getAtoms, getPredicateCls, getPredicates, hashCode
getSignature
getTerms
public ComplexLogicalFormula substitute(java.util.Map<? extends Term<?>,? extends Term<?>> map) throws java.lang.IllegalArgumentException
ComplexLogicalFormula
substitute
in interface ComplexLogicalFormula
map
- a mapping defining which terms to be substituted.java.lang.IllegalArgumentException
- if any term and its mapping are of different sortspublic ComplexLogicalFormula exchange(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
ComplexLogicalFormula
exchange
in interface ComplexLogicalFormula
v
- a term.t
- a term.java.lang.IllegalArgumentException
- if "v" and "t" are of different sortspublic <C extends Term<?>> java.util.Set<C> getTerms(java.lang.Class<C> cls)
LogicStructure
getTerms
in interface LogicStructure
cls
- The Class structure containing type information about the
searched termpublic <C extends Term<?>> boolean containsTermsOfType(java.lang.Class<C> cls)
LogicStructure
containsTermsOfType
in interface LogicStructure
cls
- The class structure representing the type C of the term.public boolean isGround()
ComplexLogicalFormula
isGround
in interface ComplexLogicalFormula
public boolean isWellFormed()
ComplexLogicalFormula
isWellFormed
in interface ComplexLogicalFormula
public boolean isLiteral()
isLiteral
in interface SimpleLogicalFormula
public abstract ComplexLogicalFormula clone()
SimpleLogicalFormula
clone
in interface ComplexLogicalFormula
clone
in interface SimpleLogicalFormula
clone
in class java.lang.Object