Class ConstrainedArgumentationFramework
java.lang.Object
org.tweetyproject.commons.BeliefSet<Argument,DungSignature>
org.tweetyproject.arg.dung.syntax.DungTheory
org.tweetyproject.arg.caf.syntax.ConstrainedArgumentationFramework
- All Implemented Interfaces:
Comparable<DungTheory>
,Iterable<Argument>
,Collection<Argument>
,ArgumentationFramework<Argument>
,BeliefBase
,GeneralGraph<Argument>
,Graph<Argument>
This class implements a constrained abstract argumentation theory (CAF) using a propositional logic formula.
See
Coste-Marquis, Sylvie, Caroline Devred, and Pierre Marquis. "Constrained Argumentation Frameworks." KR 6 (2006): 112-122.
See
Coste-Marquis, Sylvie, Caroline Devred, and Pierre Marquis. "Constrained Argumentation Frameworks." KR 6 (2006): 112-122.
- Author:
- Sandra Hoffmann
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE
Fields inherited from interface org.tweetyproject.graphs.Graph
IGNORE_SELFLOOPS, INVERT_SELFLOOPS, REMOVE_SELFLOOPS
-
Constructor Summary
ConstructorsConstructorDescriptiondefault constructor.Constructor for a CAF from a graph.ConstrainedArgumentationFramework
(Graph<Argument> graph, String constraint) Constructor for a CAF from a given graph and constraint.ConstrainedArgumentationFramework
(Graph<Argument> graph, PlFormula constraint) Constructor for a CAF from a graph and a propositional formula as the constraint. -
Method Summary
Modifier and TypeMethodDescriptionfcaf
(Extension<ConstrainedArgumentationFramework> extension) The characteristic function of a constrained argumentation framework: F_CAF(S) = {A | A is acceptable w.r.t.Determines the least fixed point of the C-characteristic function of the CAF, starting from extension S.Retrieves the current propositional constraint of the framework.Determines the least element of the admissible sets of this CAF.boolean
Checks whether the characteristic function of the given CAF is monotonic with respect to a collection of admissible extensions.boolean
Checks whether the given extension is C-admissible, meaning that it is both admissible according to the standard Dung theory and satisfies the current constraint.boolean
Checks whether the given extension forms a completion based on the argumentation framework and its constraint.boolean
Checks whether the framework is consistent, i.e., whether there exists at least one C-admissible extension.boolean
Checks whether the given extension is a preferred C-extension, meaning it is a set-maximal C-admissible extensionboolean
Checks whether the given extension is a stable C-extension, meaning it is C-admissible and attacks every argument not included in the extension.Pretty print of the theory.boolean
setConstraint
(String constraint) Sets a new constraint by parsing a string representing a propositional formula.boolean
setConstraint
(PlFormula constraint) Sets a new propositional formula as the constraint of CAF.toString()
Generates a string representation of the framework.Methods inherited from class org.tweetyproject.arg.dung.syntax.DungTheory
add, add, add, add, add, addAllAttacks, addAttack, areAdjacent, clone, compareTo, contains, containsAll, containsAttack, containsCycle, containsOddCycle, equals, equalsIn, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttacked, getAttackers, getAttackers, getAttacks, getBidirectionalAttacks, getChildren, getComplementGraph, getComponents, getConnectedComponents, getEdge, getEdges, getInducedSubgraphs, getMinimalSignature, getNeighbors, getNodes, getNumberOfEdges, getNumberOfNodes, getParents, getReduct, getReduct, getRestriction, getStronglyConnectedComponents, getSubgraphs, getUnattackedAttackers, getUndefendedAttacks, hasAttackBranch, hasDefenseBranch, hashCode, hasSelfLoops, isAcceptable, isAdmissible, isAttackBranch, isAttacked, isAttacked, isAttackedBy, isAttackedBy, isAttackingAllOtherArguments, isCoherent, isComplete, isConflictFree, isConflictFree, isDefenseBranch, isIndirectAttack, isRelativelyCoherent, isStable, isStronglyDefendedBy, isSupport, isWeightedGraph, isWellFounded, remove, remove, removeAll
Methods inherited from class org.tweetyproject.commons.BeliefSet
add, addAll, clear, getSignature, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
ConstrainedArgumentationFramework
public ConstrainedArgumentationFramework()default constructor. -
ConstrainedArgumentationFramework
-
ConstrainedArgumentationFramework
Constructor for a CAF from a given graph and constraint. The constraint is parsed from a string into a propositional formula.- Parameters:
graph
- A graph representing the structure of an argumentation framework.constraint
- A string representing the propositional constraint.
-
ConstrainedArgumentationFramework
Constructor for a CAF from a graph and a propositional formula as the constraint.- Parameters:
graph
- A graph representing the structure of arguments and their relations.constraint
- A propositional formula representing the constraint.
-
-
Method Details
-
setConstraint
Sets a new propositional formula as the constraint of CAF.- Parameters:
constraint
- A propositional formula to be set as the new constraint.- Returns:
- true when the constraint is successfully set.
-
setConstraint
Sets a new constraint by parsing a string representing a propositional formula.- Parameters:
constraint
- A string representing the propositional constraint to be parsed.- Returns:
- true if the constraint is successfully set, false if an error occurs during parsing.
-
getConstraint
Retrieves the current propositional constraint of the framework.- Returns:
- The propositional formula representing the current constraint.
-
isCompletion
Checks whether the given extension forms a completion based on the argumentation framework and its constraint.- Parameters:
ext
- The extension (set of arguments) to be checked for completion.- Returns:
- true if the extension satisfies the framework's constraint, false otherwise.
-
isCAdmissibleSet
Checks whether the given extension is C-admissible, meaning that it is both admissible according to the standard Dung theory and satisfies the current constraint.- Parameters:
ext
- The extension to be checked for C-admissibility.- Returns:
- true if the extension is C-admissible, false otherwise.
-
isConsistent
public boolean isConsistent()Checks whether the framework is consistent, i.e., whether there exists at least one C-admissible extension.- Returns:
- true if a C-admissible extension exists, false otherwise.
-
isPreferredCExtension
Checks whether the given extension is a preferred C-extension, meaning it is a set-maximal C-admissible extension- Parameters:
ext
- The extension (set of arguments) to be checked for being a preferred C-extension.- Returns:
- true if the extension is a preferred C-extension, false otherwise.
-
isStableCExtension
Checks whether the given extension is a stable C-extension, meaning it is C-admissible and attacks every argument not included in the extension.- Parameters:
ext
- The extension (set of arguments) to be checked for being a stable C-extension.- Returns:
- true if the extension is a stable C-extension, false otherwise.
-
fcaf
public Extension<ConstrainedArgumentationFramework> fcaf(Extension<ConstrainedArgumentationFramework> extension) The characteristic function of a constrained argumentation framework: F_CAF(S) = {A | A is acceptable w.r.t. S and S ∪ {a} satisfies C}.- Parameters:
extension
- an extension (a set of arguments) for which the characteristic function will be applied.- Returns:
- a new extension containing arguments that are acceptable with respect to the given extension and where S ∪ {a} satisfies C, or null if F_CAF(S) is not a monotone function.
-
hasMonotoneFcafA
public boolean hasMonotoneFcafA()Checks whether the characteristic function of the given CAF is monotonic with respect to a collection of admissible extensions. If the characteristic function is monotone and the set of admissible Extension of the CAF has a least element, then it has a C-grounded extension.- Returns:
- true if fcaf is monotonic over the admissible extensions, false otherwise
-
getLeastElement
Determines the least element of the admissible sets of this CAF.- Returns:
- The least element of the admissible sets of this CAF, if one exists.
- Throws:
RuntimeException
- if no least element can be determined.
-
fcafIteration
public Extension<ConstrainedArgumentationFramework> fcafIteration(Extension<ConstrainedArgumentationFramework> S) Determines the least fixed point of the C-characteristic function of the CAF, starting from extension S.- Parameters:
S
- Initial extension- Returns:
- The least fixed point of Fcaf, or null if S is inadmissible.
-
prettyPrint
Pretty print of the theory.- Overrides:
prettyPrint
in classDungTheory
- Returns:
- the pretty print of the theory.
-
toString
Generates a string representation of the framework.- Specified by:
toString
in interfaceBeliefBase
- Specified by:
toString
in interfaceGraph<Argument>
- Overrides:
toString
in classDungTheory
- Returns:
- The string representation of the framework.
-