5.4 The DSL as a Haskell library
5.4.2 Examples
Below we define a function parse that takes a file, examplecaes.txt, and parses it, printing any possible error. If the parse is successful, we print the argument set, the assumptions and the standard corresponding to the intent proposition. The contents of examplecaes.txt are given in Figure 5.4.
parse :: IO () parse = do
input ← readFile "examplecaes.txt"
(CAES (argSet, (assumps, weight), standard )) ← case parseCAES input of
Left err → do putStrLn "Parsing error: " print err
exitWith (ExitFailure 1) Right caes → return caes
print $ getAllArgs argSet print assumps
print $ standard (mkProp "intent") print $ getAllArgs argSet
> [["witness2"] ∼["unreliable2"] ⇒ "-intent", ["witness"] ∼["unreliable"] ⇒ "intent", ["kill", "intent"]∼[ ] ⇒ "murder"] print assumps
> [(True, "kill"), (True, "witness"),
(True, "witness2"), (True, "unreliable2")] print $ standard (mkProp "intent")
> BeyondReasonableDoubt
5.5
Related work
In this section related work of direct relevance to DSLs for argumentation theory will be considered. Specifically, both implementations of structured argumentation models, and DSLs in closely related areas with similar design goals will be discussed.
For a general overview of implementations and a discussion of limitations regarding experimental testing, see Bryant and Krause [24]. Most closely related to the work presented here is likely the well-developed implemen- tation [80] of Carneades in Clojure (see also Section 3.4.3). However, the main aim of that implementation is to provide efficient tools, GUIs, and so on for non-specialists, not to express the implementation in a way that di- rectly relates it to the formal model. Consequently, the connection between the implementation and the model is not immediate. This means that the implementation, while great for argumentation theorists only interested in modelling argumentation problems, is not directly useful to a computational argumentation theorist interested in relating models and implementations, or in verifying definitions. The Clojure implementation is thus in sharp contrast to our work, and reinforces our belief in the value of a high-level, principled approach to formalising argumentation theory frameworks.
Recent, still unpublished work by Gordon and van Gijzel in Agda [84] and ongoing work in Isabelle attempt to address that exact problem by specifying a newer version of Carneades directly in a theorem prover.
There are other implementations of structured argumentation models, see Simari [164] and the overview given in Table 5.1. The majority of these imple-
Name Available online Open source Library
Carneades [86, 83, 80, 82] Yes Yes Yes
Gorgias [125] Yes Yes No
Pollock’s work [141] Yes Yes No
Araucaria [158, 181] Yes No No
ASPIC [3] No No46 No
ArguGrid [180] No No47 No
CaSAPI [68] Yes Yes48 No
TOAST [166] Yes No No
VISPARTIX [37] Yes Yes No
Tweety [174] Yes Yes Yes
Table 5.1: An overview of structured argumentation systems
mentations (except for Tweety [174] and Carneades [86, 83, 80, 82]) are not open source and available as a library. It is furthermore rare that the applied implementation techniques, the choice of algorithms, and design decisions for an implementation of a structured argumentation model are published, making it hard to reuse implementation efforts. The implementations in this thesis attempt to break away from this trend.
One of the main attempts to unify work in argumentation theory, encom- passing arguments from the computational, philosophical and the linguistic domains, is the Argument Interchange Format (AIF) [39, 156]. The AIF aims to capture arguments stated in the above mentioned domains, while providing a common core ontology for expressing argumentative information and relations. Recent work has given a logical specification of AIF [15], providing foundations for interrelating argumentation semantics of compu- tational models of argumentation, thereby remedying a previous weaknesses of AIF. The implementation discussed in this chapter tackles the problem from another direction, starting with a formal and computationally oriented language instead.
Walkingshaw and Erwig [189, 60] have developed an EDSL for neuron diagrams [107], a formalism in philosophy that can model complex causal re- lationships between events, similar to how premises and exceptions determine a conclusion in an argument. Walkingshaw and Erwig extend this model to work on non-Boolean values, while at the same time providing an implemen- tation, thereby unifying formal description and actual implementation. This
46It is supposedly open source [164], but it is not available online. 47It is supposedly open source [164], but it is not available online.
particular goal is very similar to ours. Furthermore, the actual formalisms of neuron diagrams and the Carneades argumentation model are technically related: while an argument on its own is a simple graph, the dependency graph corresponding to the whole Carneades argument evaluation structure is much more complex and has a structure similar to a full neuron diagram. Arguments in Carneades could thus be seen as an easy notation for a spe- cific kind of complex neuron diagrams for which manual encoding would be unfeasible in practice. However, due to the complexity of the resulting en- coding, this also means that for an argumentation theorist, neuron diagrams do not offer directly relevant abstractions. That said, Walkingshaw’s and Erwig’s EDSL itself could offer valuable input on the design for a DSL for argumentation.
Similarly, causal diagrams are a special case of Bayesian networks [134] with additional constraints on the semantics, restricting the relations between nodes to a causal relation (causal diagrams are a graphic and restricted ver- sion of Bayesian networks). Building on the already existing relation between Carneades and Bayesian networks [90], we can view the neuron diagrams generalised to non-Boolean values in Carneades by generalising the negation relation and proof standards to non-Boolean values in the obvious way, and picking scintilla of evidence as the proof standard for all propositions. So, in a way, neuron diagrams are a specific case of arguments, using scintilla of evidence as the proof standard. Finally, to compute an output for every combination of inputs, as is done for neuron diagrams, we can vary the set of assumptions accordingly.
However, formal connections between Bayesian networks and (dialectical) argumentation are still in its infancy; most of the work such as Grabmair [90], Keppens [101] and Vreeswijk [186] are high level relations or comparisons, containing no formal proofs. Sjoerd Timmer and Henry Prakken’s recent research [178, 179] establishes an initial connection between support graphs in argumentation and Bayesian networks.