Package org.tweetyproject.arg.aba.syntax
Class Assumption<T extends Formula>
java.lang.Object
org.tweetyproject.arg.aba.syntax.AbaElement<T>
org.tweetyproject.arg.aba.syntax.AbaRule<T>
org.tweetyproject.arg.aba.syntax.Assumption<T>
- Type Parameters:
T
- is the type of the language that the ABA theory's rules range over
- All Implemented Interfaces:
Formula
,Rule<T,
,T> ComplexLogicalFormula
,LogicStructure
,SimpleLogicalFormula
This class models an assumption of an ABA theory.
- Author:
- Nils Geilen (geilenn@uni-koblenz.de)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPremise
(T premise) Add the given premise to this rule.void
addPremises
(Collection<? extends T> premises) Add the given premises to this rule.clone()
Creates a deep copy of this formulaboolean
Returns the conclusion of this rule.Returns the inner formula of this assumption.Processes the set of all predicates which appear in this formulaCollection
<? extends T> Returns the premise of this rule.Returns the signature of the language of this formula.getTerms()
Processes the set containing all terms of type C.int
hashCode()
boolean
Return whether this rule is an assumptionboolean
isConstraintboolean
isFact()
isFactboolean
void
setConclusion
(T conclusion) Set the conclusion of this rule.substitute
(Term<?> v, Term<?> t) Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.toString()
Methods inherited from class org.tweetyproject.arg.aba.syntax.AbaElement
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getAtoms, getPredicateCls, getUnboundVariables, isGround, isWellFormed, substitute
-
Constructor Details
-
Assumption
Creates a new assumption- Parameters:
assumption
- the assumed formula
-
-
Method Details
-
isFact
public boolean isFact()Description copied from interface:Rule
isFact- Returns:
- whether the rule is a fact
-
isConstraint
public boolean isConstraint()Description copied from interface:Rule
isConstraint- Returns:
- whether the rule is a constraint
-
setConclusion
-
addPremise
-
addPremises
Description copied from interface:Rule
Add the given premises to this rule.- Parameters:
premises
- some formulas
-
getSignature
-
getPremise
Description copied from interface:Rule
Returns the premise of this rule.- Returns:
- the premise of this rule.
-
getConclusion
-
getFormula
Returns the inner formula of this assumption.- Returns:
- the inner formula of this assumption.
-
isAssumption
public boolean isAssumption()Description copied from class:AbaRule
Return whether this rule is an assumption- Specified by:
isAssumption
in classAbaRule<T extends Formula>
- Returns:
- whether this rule is an assumption
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classObject
-
equals
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classObject
-
getPredicates
Description copied from interface:SimpleLogicalFormula
Processes the set of all predicates which appear in this formula- Returns:
- all predicates that appear in this formula
-
isLiteral
public boolean isLiteral()- Specified by:
isLiteral
in interfaceSimpleLogicalFormula
- Overrides:
isLiteral
in classAbaElement<T extends Formula>
- Returns:
- true if the formula represents a literal in the language or false otherwise
-
getTerms
-
getTerms
Description copied from interface:LogicStructure
Processes the set containing all terms of type C. This method uses the equals method of the given Class and therefore does not add terms which are sub classes of type C to the set.- Type Parameters:
C
- the type of terms- Parameters:
cls
- The Class structure containing type information about the searched term- Returns:
- A set containing all terms of type C of this logical structure
-
clone
Description copied from interface:SimpleLogicalFormula
Creates a deep copy of this formula- Specified by:
clone
in interfaceComplexLogicalFormula
- Specified by:
clone
in interfaceSimpleLogicalFormula
- Specified by:
clone
in classAbaElement<T extends Formula>
- Returns:
- the cloned formula
-
substitute
Description copied from interface:ComplexLogicalFormula
Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.- Specified by:
substitute
in interfaceComplexLogicalFormula
- Specified by:
substitute
in classAbaElement<T extends Formula>
- Parameters:
v
- the term to be substituted.t
- the term to substitute.- Returns:
- a formula where every occurrence of "v" is replaced by "t".
- Throws:
IllegalArgumentException
- if "v" and "t" are of different sorts
-