Class RpclParser

java.lang.Object

This class implements a parser for relational probabilistic 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 ")" "[" PROB "]"
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 and PROB is a float in [0,1].
Author:
Matthias Thimm