2R      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ Safe-Inferred6Labelling of arguments. Labelling status of arguments. An abstract argumentation framework is a set of arguments (represented as a list) and an attack relation on these arguments. Given an argumentation framework, determines whether args (subset of the arguments in the AF), attacks an argument arg (in the AF). rGiven an argumentation framework, determines the set of arguments that are attacked by an argument (in the AF). gGiven an argumentation framework, determines the set of arguments attacking an argument (in the AF). Given an argumentation framework, determines the set of arguments that are attacked by the given subset of arguments (in the AF). yGiven an argumentation framework, determines the set of arguments that attack a given subset of arguments (in the AF). sGiven an argumentation framework, determines whether args (subset of the arguments in the AF) is conflict-free. mGiven an argumentation framework, determines whether an argument is acceptable with respect to a list of args' (subset of the arguments in the AF). gGiven an argumentation framework, returns the set of arguments that are acceptable with respect to args' (subset of the arguments in the AF). MGiven an argumentation framework, determines whether the set of arguments args> (subset of the arguments in the AF) is admissible, i.e. if args is   and args is a subset of  f af args Given a characteristic function f, computes the grounded extension by iterating on the empty set (list) until it reaches a fixpoint. Given a characteristic function f, computes the grounded extension by iterating on the empty set (list) until it reaches a fixpoint. Strict version. Given an argumentation framework, computes all complete extension, by taking all sets of arguments of the powerset of arguments of that AF, given that they are admissible and  f af == f. Given an argumentation framework, computes all preferred extensions, by applying a filter on the complete extensions. Note that this, naive definition is faster than the current algorithm implementation. Given an argumentation framework, computes all stable extensions, by applying a filter on the complete extensions. Note that this, naive definition is faster than the current algorithm implementation. mA complete extension is also a preferred extension if it is not a subset of one of the other extensions. fS is a stable extension is an extension iff it is equal to the set of arguments not attacked by S. AGiven a labelling of arguments, give back the arguments labelled . AGiven a labelling of arguments, give back the arguments labelled . DGiven a labelling of arguments, give back the arguments labelled . The allIn labelling is a  that labels every argument . The allOut labelling is a  that labels every argument . The allUndec labelling is a  that labels every argument . #Given a list of arguments that are 2 in an argumentation framework af, an argument argK is unattacked if the list of its attackers, ignoring the outs, is empty. #Given a list of arguments that are 2 in an argumentation framework af, an argument arg1 is attacked if there exists an attacker that is . .Computes a list with all possible labellings. |Computes the grounded labelling for a Dung argumentation framework, returning a (unique) list of arguments with statuses. vBased on section 4.1 of Proof Theories and Algorithms for Abstract Argumentation Frameworks by Modgil and Caminada. !The grounded extension of an argumentation framework is just the grounded labelling, keeping only those arguments that were labelled . "Given an argumentation framework, determines the list of attackers of an argument, from a given labelling, returning the labelled attackers. #Given an AF and +, an argument a (in the AF) is illegally  iff a is labelled +, but not all its attackers are labelled . $Given an AF and +, an argument a (in the AF) is illegally  iff a is labelled * but does not have an attacker labelled . %Given an AF and +, an argument a (in the AF) is illegally  iff a is labelled . but either all its attackers are labelled + or it has an attacker that is labelled . &Given an AF and ), an argument a (in the AF) is legally  iff a is labelled  and it's not #. 'Given an AF and ), an argument a (in the AF) is legally  iff a is labelled  and it's not $. (Given an AF and ), an argument a (in the AF) is legally  iff a is labelled  and it's not %. )*Given an AF, an admissible labelling is a  without arguments that are # and without arguments that are $. *NGiven an AF, a complete labelling is a labelling without arguments that are #, without arguments that are $# and without arguments that are %. RLet labs be a complete labelling, i.e. isComplete af labs2, we say that labs is a grounded labelling iff  inLab labs' is minimal (w.r.t. set inclusion). +Let labs be a complete labelling, i.e. isComplete af labs3, we say that labs is a preferred labelling iff  inLab labs' is maximal (w.r.t. set inclusion). ,Let labsf be a complete labelling, i.e. 'isComplete af labs', we say that labs is a preferred labelling iff undecLab(labs) == [] -Let labs be a complete labelling, i.e. isComplete af labs5, we say that labs is a semi-stable labelling iff  undecLab labs' is minimal (w.r.t. set inclusion). .QGiven an AF, a labelling labs and an illegally in argument a in the af, (i.e. illegallyIn af a labsl => True), a transition step on a in labs consists of the following: 1. the label of a is changed from  to \ 2. for every b in {a} cup a+, if b is illegally out, then change the label from b from  to  /sGiven an AF, a labelling, labs, is terminated iff labs does not contain any argument that is illegally in, i.e. not (illegallyIn af lab arg) for all arg in labs. 0Given an AF and 0, an argument a (in the AF) is superillegally  iff a is labelled 6, and it is attacked by an argument that is legally  or legally . 1Computes maximal and minimal complete labellings for a Dung argumentation framework. This is based on Caminada's algorithm for computing semi-stable labellings, with all checks removed. 2xComputes all preferred labellings for a Dung argumentation framework, by taking the maximally in complete labellings. 3nComputes all stable labellings for a Dung argumentation framework, by keeping only those labellings with no  labels. 4Computes all semi-stable labellings for a Dung argumentation framework, by taking the minimally undecided complete labellings. 5The complete extension of an argumentation framework is just the complete labelling, keeping only those arguments that were labelled . 6The preferred extension of an argumentation framework is just the preferred labelling, keeping only those arguments that were labelled . 7The stable extension of an argumentation framework is just the stable labelling, keeping only those arguments that were labelled . 8The semi-stable extension of an argumentation framework is just the semi-stable labelling, keeping only those arguments that were labelled . ?STU VW !"#$%&'()*R+,-./0123456789  !"#$%&'()*+,-./0123456789 "#$%&'()*+,-./0 !12345678;STU VW !"#$%&'()*R+,-./012345678U Safe-InferredXSAn argument name consists of one or more letters and digits or a string literal. Y A complete argument consists of  arg(argName). ZA complete attack consists of atk(argName,argName). or att(argName,argName).. [>Parses one attack or argument and returns the result in the \ data type. 9`An AF is parsed by parsing at least one argument or attack, followed by an end of file token. : Parses a ]\ containing multiple arguments/attacks. If parsing fails, it propagates the parse error. ^_`aXYZ[9:9::9 ^_`aXYZ[9: Safe-Inferred;#Converts an argument to a CEGARTIX ]v. All argument names are made into string literals removing extra quotes. Additionally all parentheses are removed. <!Converts an attack to a CEGARTIX ]v. All argument names are made into string literals removing extra quotes. Additionally all parentheses are removed. =#Converts an argument to a CEGARTIX ]L. All argument names are made into string literals removing extra quotes. >!Converts an attack to a CEGARTIX ]L. All argument names are made into string literals removing extra quotes. ?@Outputs an argumentation frameworks in CEGARTIX/PrefSat format. @GOutputs an argumentation frameworks in strict CEGARTIX/PrefSat format. bRemove all quotes from a ]. cRemove all parentheses from a ]. ;<=>?@bc;<=>?@=>?;<@;<=>?@bc Safe-Inferred AGThe simplest abstract argument is an argument identifiable by its name EExample AF: A -> B -> C FExample AF: A <-> B KNow follow a few example outputs using the above argumentation frameworks.   setAttacks:[a,b]  c in the argumentation framework E: setAttacks exampleAF [a,b] cTrue setAttacks exampleAF [b,c] aFalse setAttacks exampleAF2 [] bFalse   conflictFree:[a,c] is   in the argumentation framework E: conflictFree exampleAF [a,c]True conflictFree exampleAF [a,b,c]False conflictFree exampleAF2 [a,b]False   acceptable:c is acceptable w.r.t. [a,b] in the argumentation framework E: acceptable exampleAF c [a,b]True acceptable exampleAF c []False acceptable exampleAF b [a,b,c]False   admissible:[a,b,c]. is admissible in the argumentation framework E: admissible exampleAF [a,b,c]False admissible exampleAF [a,c]True admissible exampleAF [a]True   grounded:7The grounded labelling of the argumentation frameworks E and F: grounded exampleAF[("A",In),("C",In),("B",Out)] grounded exampleAF2"[("A",Undecided),("B",Undecided)]   groundedExt:7The grounded extension of the argumentation frameworks E and F: groundedExt exampleAF ["A", "C"] groundedExt exampleAF2[] G?fixed point function for a specific argumentation framework, faf = f exampleAF.   groundedF:6The grounded extension of the argumentation framework E" using the fixpoint definition:  groundedF faf ["A","C"] groundedF (f exampleAF2)[] JnLeft hand side of Fig1. in Caminada. Arguments are: {a,b,c,d}. Attacks: {(a, a), (a, c), (b, c), (c, d)} KRight hand side of Fig1. in Caminada. Arguments are: {a,b,c,d,e}. Attacks: {(a, b), (b, a), (b, c), (c, d), (d, e), (e, c)}   complete:7The complete labellings of the argumentation framework J and K: complete exampleAF3[ 0 [("A",Undecided),("B",In),("C",Out),("D",In)] ] complete exampleAF4[ 5 [("A",Out),("B",In),("C",Out),("D",In),("E",Out)], H [("A",In),("B",Out),("C",Undecided),("D",Undecided),("E",Undecided)], A [("A",Out),("B",In),("C",Out),("D",Undecided),("E",Undecided)] ]   completeExt:8The complete extensions of the argumentation frameworks J and K: completeExt exampleAF3[ ["B","D"] ] completeExt exampleAF4[ ["B","D"], ["A"],  ["B"] ]   semiStable::The semi-stable labellings of the argumentation framework J and K: semiStable exampleAF3[ 0 [("A",Undecided),("B",In),("C",Out),("D",In)] ] semiStable exampleAF4[ 5 [("A",Out),("B",In),("C",Out),("D",In),("E",Out)], ]  semiStableExt:8The complete extensions of the argumentation frameworks J and K: semiStableExt exampleAF3[ ["B","D"] ] semiStableExt exampleAF4[ ["B","D"], ] L3Parsed example as given on the CEGARTIX webpage:  9http://www.dbai.tuwien.ac.at/proj/argumentation/cegartix/.  arg(a). arg(b). arg(c). arg(d). arg(e). arg(f). arg(g). att(a,b). att(c,b). att(c,d). att(d,c). att(d,e). att(e,g). att(f,e). att(g,f). %This is given as a literal string to :. MOutput ] corresponding to E , i.e. toCegartix exampleAF.  putStr output arg("A"). arg("B"). arg("C"). att("A","B"). att("B","C"). NOutput ] corresponding to F , i.e. toCegartix exampleAF2. putStr output2 arg("A"). arg("B"). att("A","B"). att("B","A"). OOutput ] corresponding to J , i.e. toCegartix exampleAF3. putStr output3 arg("A"). arg("B"). arg("C"). arg("D"). att("A","A"). att("A","C"). att("B","C"). att("C","D"). POutput ] corresponding to K , i.e. toCegartix exampleAF4. putStr output4 arg("A"). arg("B"). arg("C"). arg("D"). arg("E"). att("A","B"). att("B","A"). att("B","C"). att("C","D"). att("D","E"). att("E","C"). QOutput ] corresponding to L , i.e. toCegartix exampleAF5. ABCDEFGHIJKLMNOPQABCDEFGHIJKLMNOPQABCDEFGHIJKLMNOPQABCDEFGHIJKLMNOPQd      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcadefghijklDung-1.1Language.Dung.AFLanguage.Dung.InputLanguage.Dung.OutputLanguage.Dung.Examples LabellingStatus UndecidedOutInDungAFAF setAttacksaplusaminargplusargmin conflictFree acceptablef admissible groundedF groundedF' completeF preferredFstableFisPreferredExt isStableExtinLaboutLabundecLaballInallOutallUndec unattackedattacked powerLabelgrounded groundedExt labAttackers illegallyIn illegallyOutillegallyUndec legallyIn legallyOut legallyUndec isAdmissible isComplete isPreferredisStable isSemiStabletransitionStepterminatedTransitionsuperIllegallyIncomplete preferredstable semiStable completeExt preferredExt stableExt semiStableExtpAFparseAFargToStrictCegartixatkToStrictCegartix argToCegartix atkToCegartix toCegartixtoStrictCegartixAbsArgabc exampleAF exampleAF2fafde exampleAF3 exampleAF4 exampleAF5outputoutput2output3output4output5 isGrounded intersectnub\\subsetpowersetargName pArgumentpAttack pArgOrAttackbase Data.EitherEitherGHC.BaseStringlexer whiteSpace identifier stringLiteralremQuote remParens