Package net.sf.tweety.arg.aba.syntax
Class AbaTheory<T extends 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:
BeliefBase
public class AbaTheory<T extends Formula> extends java.lang.Object implements BeliefBase
An implementation of Assumption Based Argumentation.- Author:
- Nils Geilen (geilenn@uni-koblenz.de)
-
-
Constructor Summary
Constructors Constructor Description AbaTheory()
-
Method Summary
Modifier and Type Method Description void
add(Formula rule)
void
add(Formula... rules)
void
addAssumption(T assumption)
void
addNegation(T formula, T negation)
Adds a negation of form not formula = negationDungTheory
asDungTheory()
boolean
attacks(java.util.Collection<Assumption<T>> attackers, java.util.Collection<Assumption<T>> attackeds)
Checks whether a set of assumptions attacks another set of assumptions.boolean
attacks(Deduction<T> atter, T atted)
boolean
defends(java.util.Collection<Assumption<T>> defendor, Assumption<T> defended)
Checks whether a set of arguments defends an argument.java.util.Collection<AbaExtension<T>>
getAllAdmissbleExtensions()
Computes all admissible extensions.java.util.Collection<java.util.Collection<Assumption<T>>>
getAllConflictFreeExtensions()
Computes all context-free extensions.java.util.Collection<Deduction<T>>
getAllDeductions()
java.util.Collection<Deduction<T>>
getAllDeductions(java.util.Collection<Assumption<T>> assumptions)
java.util.Collection<java.util.Collection<Assumption<T>>>
getAllExtensions()
Computes all possible extensions.java.util.Collection<Assumption<T>>
getAssumptions()
java.util.Collection<Assumption<T>>
getClosure(java.util.Collection<Assumption<T>> assumptions)
A closure is the set of assumptions that can be derived from a set of assumptions via inference rules.Signature
getMinimalSignature()
Returns the signature of the language of this knowledge base.java.util.Collection<Negation<T>>
getNegations()
java.util.Collection<InferenceRule<T>>
getRules()
boolean
isAdmissible(AbaExtension<T> ext)
Checks whether a set of arguments is admissible.boolean
isClosed(java.util.Collection<Assumption<T>> assumptions)
A set of assumptions is closed iff it equals its closure.boolean
isConflictFree(java.util.Collection<Assumption<T>> ext)
Checks whether a set of arguments is conflict-free.boolean
isFlat()
An ABA theory is flat iff all subsets of its argumentation set are closedboolean
negates(T negation, T formula)
Checks whether the given two formulas are negations of each othervoid
setAssumptions(java.util.Collection<Assumption<T>> assumptions)
java.lang.String
toString()
-
-
-
Method Detail
-
getAllDeductions
public java.util.Collection<Deduction<T>> getAllDeductions()
- Returns:
- all deductions that can be derived from this theory
-
getAllDeductions
public java.util.Collection<Deduction<T>> getAllDeductions(java.util.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 java.util.Collection<Assumption<T>> getClosure(java.util.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(java.util.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(Formula rule)
- Parameters:
rule
- an assumption or an inference rule or a negation that is added to the theory
-
add
public void add(Formula... rules)
- Parameters:
rules
- assumptions or inference rules or negations that are 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 java.util.Collection<InferenceRule<T>> getRules()
- Returns:
- the rules
-
getAssumptions
public java.util.Collection<Assumption<T>> getAssumptions()
- Returns:
- the assumptions
-
setAssumptions
public void setAssumptions(java.util.Collection<Assumption<T>> assumptions)
- Parameters:
assumptions
- the assumptions to set
-
attacks
public boolean attacks(java.util.Collection<Assumption<T>> attackers, java.util.Collection<Assumption<T>> attackeds)
Checks whether a set of assumptions attacks another set of assumptions.- Parameters:
attackers
- set of assumptionsattackeds
- set of assumptions- Returns:
- true iff the first set of assumptions attacks the second set
-
defends
public boolean defends(java.util.Collection<Assumption<T>> defendor, Assumption<T> defended)
Checks whether a set of arguments defends an argument.- Parameters:
defendor
- the defending setdefended
- the assumption which shall be defended- Returns:
- true iff defendor defends defended
-
isConflictFree
public boolean isConflictFree(java.util.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 java.util.Collection<java.util.Collection<Assumption<T>>> getAllExtensions()
Computes all possible extensions.- Returns:
- the powerset of the assumptions
-
getAllConflictFreeExtensions
public java.util.Collection<java.util.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 java.util.Collection<AbaExtension<T>> getAllAdmissbleExtensions()
Computes all admissible extensions.- Returns:
- all admissible extensions
-
getMinimalSignature
public Signature getMinimalSignature()
Description copied from interface:BeliefBase
Returns the signature of the language of this knowledge base.- Specified by:
getMinimalSignature
in interfaceBeliefBase
- Returns:
- the signature of the language of this knowledge base.
-
asDungTheory
public DungTheory asDungTheory()
- Returns:
- a Dung Theory derived from this ABA theory
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceBeliefBase
- Overrides:
toString
in classjava.lang.Object
-
-