Safe Haskell | Safe-Inferred |
---|
This is the examples module accompanying the implementation of Dung's argumentation frameworks.
This module contains a collection of examples, showing how to define arguments, argumentation frameworks and how to use the standard definitions.
To run these examples, or your own: start GHCi and do the following:
:l Language.Dung.Examples
Example uses of the basic definitions
exampleAF2 :: DungAF AbsArgSource
Example AF: A <-> B
Now follow a few example outputs using the above argumentation frameworks.
- setAttacks:
[a,b]
setAttacks
c
in the argumentation framework exampleAF
:
>>>
setAttacks exampleAF [a,b] c
True
>>>
setAttacks exampleAF [b,c] a
False
>>>
setAttacks exampleAF2 [] b
False
- conflictFree:
[a,c]
is conflictFree
in the argumentation framework exampleAF
:
>>>
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 exampleAF
:
>>>
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 exampleAF
:
>>>
admissible exampleAF [a,b,c]
False
>>>
admissible exampleAF [a,c]
True
>>>
admissible exampleAF [a]
True
- grounded:
The grounded labelling of the argumentation framework exampleAF
:
>>>
grounded exampleAF
[("A",In),("C",In),("B",Out)]
>>>
grounded exampleAF2
[("A",Undecided),("B",Undecided)]
- groundedExt:
The grounded extension of the argumentation framework exampleAF
:
>>>
groundedExt exampleAF
["A", "C"]>>>
groundedExt exampleAF2
[]