Package net.sf.tweety.arg.aba.syntax
Class ABATheory<T extends net.sf.tweety.commons.Formula>
- java.lang.Object
-
- net.sf.tweety.arg.aba.syntax.ABATheory<T>
-
- Type Parameters:
T- is the type of the language that the ABA theory's rules range over
- All Implemented Interfaces:
net.sf.tweety.commons.BeliefBase
public class ABATheory<T extends net.sf.tweety.commons.Formula> extends Object implements net.sf.tweety.commons.BeliefBase
- Author:
- Nils Geilen (geilenn@uni-koblenz.de) An implementation of Assumption Based Argumentation
-
-
Constructor Summary
Constructors Constructor Description ABATheory()
-
Method Summary
Modifier and Type Method Description voidadd(net.sf.tweety.commons.Formula rule)voidaddAssumption(T assumption)voidaddNegation(T formula, T negation)Adds a negation of form not formula = negationnet.sf.tweety.arg.dung.syntax.DungTheoryasDungTheory()booleanattacks(Collection<Assumption<T>> atters, Collection<Assumption<T>> atteds)booleanattacks(Deduction<T> atter, T atted)booleandefends(Collection<Assumption<T>> defor, Assumption<T> defed)Checks whether a set of arguments defends an argumentCollection<AbaExtension<T>>getAllAdmissbleExtensions()Computes all admissible extensionsCollection<Collection<Assumption<T>>>getAllConflictFreeExtensions()Computes all context-free extensionsCollection<Deduction<T>>getAllDeductions()Collection<Deduction<T>>getAllDeductions(Collection<Assumption<T>> assumptions)Collection<Collection<Assumption<T>>>getAllExtensions()Computes all possible extensionsCollection<Assumption<T>>getAssumptions()Collection<Assumption<T>>getClosure(Collection<Assumption<T>> assumptions)A closure is the set of assumptions that can be derived from a set of assumptions via inference rulesnet.sf.tweety.commons.SignaturegetMinimalSignature()Collection<Negation<T>>getNegations()Collection<InferenceRule<T>>getRules()booleanisAdmissible(AbaExtension<T> ext)Checks whether a set of arguments is admissiblebooleanisClosed(Collection<Assumption<T>> assumptions)A set of assumptions is closed iff it equals its closurebooleanisConflictFree(Collection<Assumption<T>> ext)Checks whether a set of arguments is conflict-freebooleanisFlat()An ABA theory is flat iff all subsets of its argumentation set are closedbooleannegates(T negation, T formula)Checks whether the given two formulas are negations of each othervoidsetAssumptions(Collection<Assumption<T>> assumptions)StringtoString()
-
-
-
Method Detail
-
getAllDeductions
public Collection<Deduction<T>> getAllDeductions()
- Returns:
- all deductions that can be derived from this theory
-
getAllDeductions
public Collection<Deduction<T>> getAllDeductions(Collection<Assumption<T>> assumptions)
- Parameters:
assumptions- the set of assumptions used for the derivation- Returns:
- all deductions that can be derived from this theory
-
getClosure
public Collection<Assumption<T>> getClosure(Collection<Assumption<T>> assumptions)
A closure is the set of assumptions that can be derived from a set of assumptions via inference rules- Parameters:
assumptions- a set of assumptions- Returns:
- the closure of assumptions
-
isClosed
public boolean isClosed(Collection<Assumption<T>> assumptions)
A set of assumptions is closed iff it equals its closure- Parameters:
assumptions- a set of assumptions- Returns:
- true iff the set of assumptions is closed under this argumentation theory
-
isFlat
public boolean isFlat()
An ABA theory is flat iff all subsets of its argumentation set are closed- Returns:
- true iff the theory is flat
-
add
public void add(net.sf.tweety.commons.Formula rule)
- Parameters:
rule- an assumption or an inference rule or a negation that is added to the theory
-
addAssumption
public void addAssumption(T assumption)
- Parameters:
assumption- a formula that is used as an assumption in the theory
-
addNegation
public void addNegation(T formula, T negation)
Adds a negation of form not formula = negation- Parameters:
formula- a formulanegation- it's complement
-
negates
public boolean negates(T negation, T formula)
Checks whether the given two formulas are negations of each other- Parameters:
formula- a formulanegation- a formula- Returns:
- true iff the two formulas are negations of each other
-
attacks
public boolean attacks(Deduction<T> atter, T atted)
- Parameters:
atter- the attacking deductionatted- the attacked assumption- Returns:
- true iff atter attacks atted
-
getRules
public Collection<InferenceRule<T>> getRules()
- Returns:
- the rules
-
getAssumptions
public Collection<Assumption<T>> getAssumptions()
- Returns:
- the assumptions
-
getNegations
public Collection<Negation<T>> getNegations()
- Returns:
- the negations
-
setAssumptions
public void setAssumptions(Collection<Assumption<T>> assumptions)
- Parameters:
assumptions- the assumptions to set
-
attacks
public boolean attacks(Collection<Assumption<T>> atters, Collection<Assumption<T>> atteds)
-
defends
public boolean defends(Collection<Assumption<T>> defor, Assumption<T> defed)
Checks whether a set of arguments defends an argument- Parameters:
defor- the defending setdefed- the assumption which shall be defended- Returns:
- true iff defor defends defed
-
isConflictFree
public boolean isConflictFree(Collection<Assumption<T>> ext)
Checks whether a set of arguments is conflict-free- Parameters:
ext- a set of arguments- Returns:
- true iff ext is conflict-free
-
getAllExtensions
public Collection<Collection<Assumption<T>>> getAllExtensions()
Computes all possible extensions- Returns:
- the powerset of the assumptions
-
getAllConflictFreeExtensions
public Collection<Collection<Assumption<T>>> getAllConflictFreeExtensions()
Computes all context-free extensions- Returns:
- all context-free extensions
-
isAdmissible
public boolean isAdmissible(AbaExtension<T> ext)
Checks whether a set of arguments is admissible- Parameters:
ext- the set- Returns:
- true iff ext is admissible
-
getAllAdmissbleExtensions
public Collection<AbaExtension<T>> getAllAdmissbleExtensions()
Computes all admissible extensions- Returns:
- all admissible extensions
-
getMinimalSignature
public net.sf.tweety.commons.Signature getMinimalSignature()
- Specified by:
getMinimalSignaturein interfacenet.sf.tweety.commons.BeliefBase
-
asDungTheory
public net.sf.tweety.arg.dung.syntax.DungTheory asDungTheory()
- Returns:
- a Dung Theory derived from this ABA theory
-
-