Class RclParser


  • public class RclParser
    extends Parser<RclBeliefSet,​RelationalConditional>
    This class implements a parser for relational conditional logic. The BNF for a conditional knowledge base is given by (starting symbol is KB)

    KB ::== SORTSDEC PREDDECS (CONDITIONAL "\n")*
    SORTSDEC ::== ( SORTNAME "=" "{" (CONSTANTNAME ("," CONSTANTNAME)*)? "}" "\n" )*
    PREDDECS ::== ( "type" "(" PREDICATENAME "(" (SORTNAME ("," SORTNAME)*)? ")" ")" "\n" )*
    CONDITIONAL ::== "(" FORMULA ")" "[" PROB "]" | "(" FORMULA "|" FORMULA ")"
    FORMULA ::== ATOM | "(" FORMULA ")" | FORMULA "&&" FORMULA | FORMULA "||" FORMULA | "!" FORMULA | "+" | "-"
    ATOM ::== PREDICATENAME "(" (TERM ("," TERM)*)? ")"
    TERM ::== VARIABLENAME | CONSTANTNAME

    where SORTNAME, PREDICATENAME, CONSTANTNAME, and VARIABLENAME are sequences of
    symbols from {a,...,z,A,...,Z,0,...,9} with a letter at the beginning.
    Author:
    Matthias Thimm
    • Constructor Detail

      • RclParser

        public RclParser()
        Creates a new RCL Parser