Syntax of Fact Files for RIPP 0.1 with Resources


The fact file declares objects togehter with their types, the ranges of resource variables, simulates a database, and specifies the initial and the goal state. It must be a text file with arbitrary name. As for the operator file, you need to put different planning problems into different fact files.

Basic Name Conventions:

Upper-case letters denote non-terminal symbols, lower-case letters denote terminal symbols. + means one or arbitrarily many occurrances of a symbol. * means zero or arbitrarily many occurrances of a symbol. [symbol] means optional occurrance. % stands for infinity.


FACTFILE ::= TYPELIST RVAR-DEC  DATABASE INITIAL GOALS
  
TYPELIST ::=   /* empty */ 
             | typename ":" constantname* ";" TYPELIST  

RVAR-DEC ::=   /* empty */ 
             | rvarname BOUNDARY BOUNDARY  ";" RVAR-DEC

BOUNDARY ::=   number 
             | "%"

DATABASE ::=   "database:" DB-ENTRY* ";"

DB-ENTRY ::=   predicatename "(" constantname* ")" number

INITIAL  ::=   "initial:" PRECONDS ";"

GOALS    ::=   "goal:"  GOAL+ ";"

GOAL     ::=   FACT 
             | FACT+ "=>" FACT+ ";"
             | ALL PARDEC FACT* "=>" FACT+ ";"
             | EX  PARDEC FACT* "=>" FACT+ ";"
             | RESOURCE-REQ


PRECONDS, PARDEC, RESOURCE-REQ, and FACT are defined as in the operator syntax. GOALS can be existentially and unversially quantified, and also be conditional with the semantics that the condition is evaluated in the initial state. A predicate without arguments still requires to use () as in in arm-empty() for example. Similarly, resource-variable names without parameters have to be written with (), e.g. ?balance(?account) or ?load().

An object can have several types, i.e., it can appear in more than one TYPE definition. We do not pose any restrictions on the type hierarchy. Each type should only be declared ones. No free variables are allowed in goals. No overloading of predicate symbols should be done, i.e. a predicate should always take the same number of arguments.