Class AspicArgument<T extends Invertable>
java.lang.Object
org.tweetyproject.arg.dung.syntax.Argument
org.tweetyproject.arg.aspic.syntax.AspicArgument<T>
- Type Parameters:
T
- is the type of the language that the ASPIC theory's rules range over
- All Implemented Interfaces:
Comparable<Argument>
,DungEntity
,Formula
,Node
An argument according to the ASPIC+ specification
- Author:
- Nils Geilen
-
Constructor Summary
ConstructorDescriptionAspicArgument
(InferenceRule<T> toprule) Creates an empty ArgumentAspicArgument
(InferenceRule<T> toprule, Collection<AspicArgument<T>> directsubs) Creates an empty Argument -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDirectSub
(AspicArgument<T> sub) Adds a subargumentboolean
Returns all conclusions appearing in this argument.Returns all rules appearing in this argument.returns the Subs according to the ASPIC+ specificationReturns Conc according to the ASPIC+ specificationReturns the DefRules according to ASPIC+ specification, i.e.Determines subarguments with defeasible toprules, premises do not count as subrulesThe argument's direct children, whose conclusions fit its prerequisitesReturns all defeasible subrules of the level where the first defeasible subrule appears, i.e.Retruns the TopRule according to ASPIC+ specificationboolean
Checks whether this has a defeasible subrule, premises do not count as subrulesint
hashCode()
static <T extends Invertable>
booleanisAttack
(AspicArgument<T> active, AspicArgument<T> passive, RuleFormulaGenerator<T> rfgen, Comparator<AspicArgument<T>> order) Determines whether the attack is successfulboolean
isFirm()
An argument is firm iff it does not contain ordinary premisesboolean
isStrict()
An argument is strict iff it does not contain defeasible subrulesboolean
isSubArgumentOf
(AspicArgument<T> arg) Checks wheter this is a direct or indirect subargument ofarg
void
setConclusion
(T conc) Change the conclusionvoid
setTopRule
(InferenceRule<T> toprule) Changes the TopRuletoString()
Methods inherited from class org.tweetyproject.arg.dung.syntax.Argument
compareTo, getLdoArgument, getLdoFormula, getName, getSignature, setName
-
Constructor Details
-
AspicArgument
Creates an empty Argument- Parameters:
toprule
- the argument's TopRuledirectsubs
- the direct sub arguments
-
AspicArgument
Creates an empty Argument- Parameters:
toprule
- the argument's TopRule
-
-
Method Details
-
hasDefeasibleSub
public boolean hasDefeasibleSub()Checks whether this has a defeasible subrule, premises do not count as subrules- Returns:
- whether this has a defeasible subrule
-
isStrict
public boolean isStrict()An argument is strict iff it does not contain defeasible subrules- Returns:
- true iff this argument is strict
-
isFirm
public boolean isFirm()An argument is firm iff it does not contain ordinary premises- Returns:
- iff this is firm
-
isSubArgumentOf
Checks wheter this is a direct or indirect subargument ofarg
- Parameters:
arg
- an ASPIC argument- Returns:
- true iff this is in Sub(arg)
-
getOrdinaryPremises
- Returns:
- all ordinary premises
-
getConclusion
Returns Conc according to the ASPIC+ specification- Returns:
- the top rule's conclusion
-
setConclusion
-
getAllSubs
returns the Subs according to the ASPIC+ specification- Returns:
- all subarguments including this
-
getDefeasibleSubs
Determines subarguments with defeasible toprules, premises do not count as subrules- Returns:
- all arguments in Subs with defeasible top rules
-
getListLastDefeasibleRules
Returns all defeasible subrules of the level where the first defeasible subrule appears, i.e. the set of defeasible subrules with the smallest depth- Returns:
- the last defeasible rules
-
getDefeasibleRules
Returns the DefRules according to ASPIC+ specification, i.e. the defeasible toprules of subarguments- Returns:
- this argument's defeasible rules
-
getAllRules
Returns all rules appearing in this argument.- Returns:
- all rules appearing in this argument.
-
getAllConclusions
Returns all conclusions appearing in this argument.- Returns:
- all conclusions appearing in this argument.
-
getDirectSubs
The argument's direct children, whose conclusions fit its prerequisites- Returns:
- the direct subrules
-
hashCode
-
equals
-
addDirectSub
-
getTopRule
Retruns the TopRule according to ASPIC+ specification- Returns:
- the top rule
-
setTopRule
Changes the TopRule- Parameters:
toprule
- the new TopRule
-
toString
-
isAttack
public static <T extends Invertable> boolean isAttack(AspicArgument<T> active, AspicArgument<T> passive, RuleFormulaGenerator<T> rfgen, Comparator<AspicArgument<T>> order) Determines whether the attack is successful- Type Parameters:
T
- the type of formulas- Parameters:
active
- the active argumentpassive
- the passive argumentrfgen
- a rule formula generatororder
- a comparator- Returns:
- true iff the attack is successful
-
shallowCopy
- Returns:
- a shallow copy
-