Package net.sf.tweety.arg.aba.syntax
Class AbaElement<T extends net.sf.tweety.commons.Formula>
- java.lang.Object
-
- net.sf.tweety.arg.aba.syntax.AbaElement<T>
-
- Type Parameters:
T- the type of formula
- All Implemented Interfaces:
net.sf.tweety.commons.Formula,net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.LogicStructure,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
public abstract class AbaElement<T extends net.sf.tweety.commons.Formula> extends Object implements net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
Abstract class that models common properties of aba syntax elements.- Author:
- Anna Gessler
-
-
Constructor Summary
Constructors Constructor Description AbaElement()
-
Method Summary
Modifier and Type Method Description Set<? extends AbaElement<T>>allGroundInstances(Set<net.sf.tweety.logics.commons.syntax.Constant> constants)Computes all ground instances of all inner fol formulas wrt.Set<Map<net.sf.tweety.logics.commons.syntax.Variable,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>>allSubstitutions(Collection<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms)Computes all possible substitutions, i.e.abstract AbaElement<T>clone()<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>
booleancontainsTermsOfType(Class<C> cls)AbaElement<T>exchange(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)Set<? extends net.sf.tweety.logics.commons.syntax.interfaces.Atom>getAtoms()Class<? extends net.sf.tweety.logics.commons.syntax.Predicate>getPredicateCls()Set<net.sf.tweety.logics.commons.syntax.Variable>getUnboundVariables()booleanisGround()booleanisLiteral()booleanisWellFormed()AbaElement<T>substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)abstract AbaElement<T>substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
clone
public abstract AbaElement<T> clone()
-
containsTermsOfType
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> boolean containsTermsOfType(Class<C> cls)
- Specified by:
containsTermsOfTypein interfacenet.sf.tweety.logics.commons.syntax.interfaces.LogicStructure
-
substitute
public abstract AbaElement<T> substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
- Specified by:
substitutein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Throws:
IllegalArgumentException
-
substitute
public AbaElement<T> substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map) throws IllegalArgumentException
- Specified by:
substitutein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Throws:
IllegalArgumentException
-
exchange
public AbaElement<T> exchange(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
- Specified by:
exchangein interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula- Throws:
IllegalArgumentException
-
isGround
public boolean isGround()
- Specified by:
isGroundin interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
-
isWellFormed
public boolean isWellFormed()
- Specified by:
isWellFormedin interfacenet.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormula
-
allSubstitutions
public Set<Map<net.sf.tweety.logics.commons.syntax.Variable,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>> allSubstitutions(Collection<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms) throws IllegalArgumentException
Computes all possible substitutions, i.e. maps from variables to terms, of unbound variables of this formula's inner fol formulas to terms in "terms".- Parameters:
terms- a set of terms.- Returns:
- a set of maps from variables to terms.
- Throws:
IllegalArgumentException- if there is an unbound variable in this formula for which there is no term in "terms" with the same sort.
-
allGroundInstances
public Set<? extends AbaElement<T>> allGroundInstances(Set<net.sf.tweety.logics.commons.syntax.Constant> constants)
Computes all ground instances of all inner fol formulas wrt. the given set of constants, i.e. every formula where each occurrence of some unbound variable is replaced by some constant.- Parameters:
constants- a set of constants- Returns:
- a set of ground instances of this formula
- Throws:
IllegalArgumentException- if there is an unbound variable in this formula for which there is no constant in "constants" with the same sort.
-
getUnboundVariables
public Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()
-
isLiteral
public boolean isLiteral()
- Specified by:
isLiteralin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getAtoms
public Set<? extends net.sf.tweety.logics.commons.syntax.interfaces.Atom> getAtoms()
- Specified by:
getAtomsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
getPredicateCls
public Class<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicateCls()
- Specified by:
getPredicateClsin interfacenet.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
-
-