Class ActionQueryParser


  • public class ActionQueryParser
    extends Parser<SActionQuerySet,​SActionQuery>
    This class implements a parser for action queries in S. The BNF of such queries is given by: (starting symbol is KB)
    KB ::== QUERY1 ("\n" QUERY1)*
    QUERY1 ::== QUERY ( "requires" REQUIREMENTS )?
    QUERY ::== PROPOSITION | QUERY "&&" QUERY | QUERY "||" QUERY | "!" QUERY | "(" QUERY ")" | "+" | "-"
    PROPOSITION ::== HOLDSQUERY | ALWAYSQUERY | NECESSARILYQUERY
    HOLDSQUERY ::== "holds" "[" STATEFORMULA "]"
    ALWAYSQUERY ::== "always" "[" STATEFORMULA "]"
    NECESSARILYQUERY ::== "necessarily" "[" STATEFORMULA "]" "after" ACTIONS
    ACTIONS ::== ACTION ( ";" ACTION )*
    ACTION ::== "{" ACTIONNAME ("," ACTIONNAME)* "}"
    REQUIREMENTS ::== REQUIREMENT ("," REQUIREMENT)*
    REQUIREMENT ::== (VARIABLENAME "<>" VARIABLENAME | VARIABLENAME "<>" CONSTANTNAME)*

    where STATEFORMULA is an unquantified first-order formula without functors,
    and VARIABLENAME, CONSTANTNAME are sequences of symbols
    from {a,...,z,A,...,Z,0,...,9} with a letter at the beginning.
    Author:
    Sebastian Homann, Tim Janus (change constant LogicalSymbols to dynamic)