Class AbaParser<T extends net.sf.tweety.commons.Formula>

  • Type Parameters:
    T - the type of formulas (language) that the ABA theory ranges over

    public class AbaParser<T extends net.sf.tweety.commons.Formula>
    extends net.sf.tweety.commons.Parser<AbaTheory<T>,​net.sf.tweety.commons.Formula>
    Parses a Assumption Based Argumentation System out of an input text. With standard symbols, every line contains one of the following:
    <rule> ::= <head> '<-' <body>?
    <head> ::= <word>
    <body> ::= 'true' | <word> (',' <word>)*
    <assumption> ::= <word>
    <assumptions> ::= '{' <assumption> (',' <assumption>)* '}'
    with <word> in the theory's language.
    Author:
    Nils Geilen
    • Constructor Detail

      • AbaParser

        public AbaParser​(net.sf.tweety.commons.Parser<? extends net.sf.tweety.commons.BeliefBase,​? extends net.sf.tweety.commons.Formula> formulaparser)
        Creates a new ABA parser
        Parameters:
        formulaparser - parses formulae of the language
    • Method Detail

      • parseBeliefBase

        public AbaTheory<T> parseBeliefBase​(Reader reader)
                                     throws IOException,
                                            net.sf.tweety.commons.ParserException
        Specified by:
        parseBeliefBase in class net.sf.tweety.commons.Parser<AbaTheory<T extends net.sf.tweety.commons.Formula>,​net.sf.tweety.commons.Formula>
        Throws:
        IOException
        net.sf.tweety.commons.ParserException
      • parseFormula

        public net.sf.tweety.commons.Formula parseFormula​(Reader reader)
                                                   throws IOException,
                                                          net.sf.tweety.commons.ParserException
        Specified by:
        parseFormula in class net.sf.tweety.commons.Parser<AbaTheory<T extends net.sf.tweety.commons.Formula>,​net.sf.tweety.commons.Formula>
        Throws:
        IOException
        net.sf.tweety.commons.ParserException
      • getSymbolTrue

        public String getSymbolTrue()
        Returns:
        the symbolTrue
      • setSymbolTrue

        public void setSymbolTrue​(String symbolTrue)
        Parameters:
        symbolTrue - the symbolTrue to set
      • getSymbolArrow

        public String getSymbolArrow()
        Returns:
        the symbolArrow
      • setSymbolArrow

        public void setSymbolArrow​(String symbolArrow)
        Parameters:
        symbolArrow - the symbolArrow to set
      • getSymbolComma

        public String getSymbolComma()
        Returns:
        the symbolComma
      • setSymbolComma

        public void setSymbolComma​(String symbolComma)
        Parameters:
        symbolComma - the symbolComma to set