Dung-1.0: An implementation of the Dung argumentation frameworks.

Safe HaskellSafe
LanguageHaskell98

Language.Dung.Input

Contents

Description

This is the input module accompanying the implementation of Dung's argumentation frameworks. It defines a simple parser for an argumentation framework that assumes the input file is in CEGARTIX/PrefSat-like format.

Files are assumed to have one argument or attack on each line, ending in a dot. (Our parser is slightly more relaxed than this and doesn't care about whitespace.)

att(a1,a2). or arg(a1).

Argument names are assumed to consist only of letters and numbers. Arguments used in attacks should be declared separately as well.

Synopsis

Parsing functions

parseAF :: String -> Either ParseError (DungAF String) Source

Parses a String containing multiple arguments/attacks. If parsing fails, it propagates the parse error.

pAF :: Parser (DungAF String) Source

An AF is parsed by parsing at least one argument or attack, followed by an end of file token.