Class QbfParser


  • public class QbfParser
    extends PlParser
    This class implements a parser for quantified boolean formulas. The BNF for a qbf belief set is given by (starting symbol is KB)

    KB ::== VARDECLAR FORMULAS
    VARDECLAR ::== "{" (VARIABLENAME ("," VARIABLENAME)*)? "}"
    FORMULAS ::== FORMULA ( "\n" FORMULA )*
    FORMULA ::== VARIABLENAME | "(" FORMULA ")" | FORMULA ">>" FORMULA | FORMULA "||" FORMULA | FORMULA "=>" FORMULA | FORMULA "<=>" FORMULA | "!" FORMULA | "+" | "-" | "forall" VARIABLENAME ":" "(" FORMULA ")" | "exists" VARIABLENAME ":" "(" FORMULA ")" |

    VARIABLENAME is a sequence of characters excluding |,&,!,(,),=,<,> and whitespace characters.
    Author:
    Anna Gessler, Matthias Thimm
    • Constructor Detail

      • QbfParser

        public QbfParser()
    • Method Detail

      • parseBeliefBase

        public PlBeliefSet parseBeliefBase​(java.io.Reader reader)
                                    throws ParserException
        Description copied from class: Parser
        Parses the given reader into a belief base of the given type.
        Overrides:
        parseBeliefBase in class PlParser
        Parameters:
        reader - a reader
        Returns:
        a belief base
        Throws:
        ParserException - some parsing exceptions may be added here.
      • parseFormula

        public PlFormula parseFormula​(java.io.Reader reader)
                               throws ParserException
        Description copied from class: Parser
        Parses the given reader into a formula of the given type.
        Overrides:
        parseFormula in class PlParser
        Parameters:
        reader - a reader
        Returns:
        a formula
        Throws:
        ParserException - some parsing exceptions may be added here.