Package net.sf.tweety.arg.aspic.reasoner
Class DirectionalAspicReasoner<T extends Invertable>
- java.lang.Object
-
- net.sf.tweety.arg.aspic.reasoner.AbstractAspicReasoner<T>
-
- net.sf.tweety.arg.aspic.reasoner.DirectionalAspicReasoner<T>
-
- Type Parameters:
T- the type of formulas
- All Implemented Interfaces:
QualitativeReasoner<AspicArgumentationTheory<T>,T>,Reasoner<java.lang.Boolean,AspicArgumentationTheory<T>,T>
public class DirectionalAspicReasoner<T extends Invertable> extends AbstractAspicReasoner<T>
Computes a restricted AF by only considering relevant arguments to a query. An optional probability value for including only a certain subset of relevant arguments turns this reasoner into an approximative reasoner- Author:
- Tjitze Rienstra, Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private doubleprob
-
Constructor Summary
Constructors Constructor Description DirectionalAspicReasoner(AbstractExtensionReasoner aafReasoner)Creates a new instanceDirectionalAspicReasoner(AbstractExtensionReasoner aafReasoner, double prob)Creates a new instance
-
Method Summary
Modifier and Type Method Description DungTheoryasRestrictedDungTheory(AspicArgumentationTheory<T> aat, boolean simplifyArgumentStructure, T conc)Generate restricted AF based on given theory and conclusion.private java.util.Set<AspicArgument<T>>constructArgsWithConclusion(AspicArgumentationTheory<T> aat, T conc, java.util.Set<T> conclusions)private java.util.Collection<AspicArgument<T>>getArgsRec(AspicArgumentationTheory<T> aat, T conc)Gets the arguments recursivelyjava.util.Collection<T>getAttackingConclusions(AspicArgument<T> arg, RuleFormulaGenerator<T> rfgen)Returns all "attacking conclusions" of the given argument.DungTheorygetDungTheory(AspicArgumentationTheory<T> aat, T query)Computes the Dung theory from which the answer will be derivedjava.lang.StringtoString()-
Methods inherited from class net.sf.tweety.arg.aspic.reasoner.AbstractAspicReasoner
query, query, query
-
-
-
-
Constructor Detail
-
DirectionalAspicReasoner
public DirectionalAspicReasoner(AbstractExtensionReasoner aafReasoner)
Creates a new instance- Parameters:
aafReasoner- Underlying reasoner for AAFs.
-
DirectionalAspicReasoner
public DirectionalAspicReasoner(AbstractExtensionReasoner aafReasoner, double prob)
Creates a new instance- Parameters:
aafReasoner- Underlying reasoner for AAFs.prob- the probability of including a certain relevant argument
-
-
Method Detail
-
getDungTheory
public DungTheory getDungTheory(AspicArgumentationTheory<T> aat, T query)
Description copied from class:AbstractAspicReasonerComputes the Dung theory from which the answer will be derived- Specified by:
getDungTheoryin classAbstractAspicReasoner<T extends Invertable>- Parameters:
aat- some Aspic theoryquery- some query- Returns:
- a Dung theory
-
asRestrictedDungTheory
public DungTheory asRestrictedDungTheory(AspicArgumentationTheory<T> aat, boolean simplifyArgumentStructure, T conc)
Generate restricted AF based on given theory and conclusion. The restricted AF contains only arguments with the given concusion, all the attackers of this argument, the attackers of those arguments, and so on. As long as the semantics that is employed satisfies directionality, this restricted AF is sufficient to determine the correct status of the conclusion.- Parameters:
aat- The aspic theory to generate arguments fromsimplifyArgumentStructure- a boolean, see net.sf.tweety.arg.aspic.AbstractAspicReasoner#getDungTheory(net.sf.tweety.arg.aspic.AspicArgumentationTheory, net.sf.tweety.commons.Formula)conc- Conclusion to generate restricted AF for- Returns:
- The restricted AF
-
constructArgsWithConclusion
private java.util.Set<AspicArgument<T>> constructArgsWithConclusion(AspicArgumentationTheory<T> aat, T conc, java.util.Set<T> conclusions)
-
getArgsRec
private java.util.Collection<AspicArgument<T>> getArgsRec(AspicArgumentationTheory<T> aat, T conc)
Gets the arguments recursively- Parameters:
aat- the argumentation theoryconc- the conclusion- Returns:
- arguments with given conclusion plus recursively all attackers
-
getAttackingConclusions
public java.util.Collection<T> getAttackingConclusions(AspicArgument<T> arg, RuleFormulaGenerator<T> rfgen)
Returns all "attacking conclusions" of the given argument. An attacking conclusion of an argument is a conclusion that, if it is a conclusion of another argument, then this argument will attack it.- Parameters:
arg- Argument to generate attacking conclusionsrfgen- Rule formula generator in use.- Returns:
- Attacking conclusions of argument.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-