Syntax of Operator Files for IPP 3.0 to 3.3
The operator file, as it's name suggests, contains the set of
operators that may be applied in the planning domain.
It must be a text file of the form (name).ops and IPP
will try to apply all the ops which are contained in it, i.e.,
you need to put different operator sets into different files.
Basic Name Conventions:
- Typenames are arbitary strings of small and capital letters, the
numbers 0-9, dashes and underscores, for example 111, p-11, G09-7_b1.
- The universal quantifier is represented with "ALL", the existential
quantifier with "EX", negation with "not" or "!".
- Comments start at the beginning of a line with a "#" and end with a
newline.
- Variable names start with "?" and followed by an arbitrary string
of small and capital letters, the numbers 0-9, dashes and brackets
"[" and "]".
- Predicate names are arbitary strings of small and capital letters, the
numbers 0-9 and dashes.
- Equality is represented using the distinguished predicate name
"eq", for example "!eq(?x ?y)" means that the variables ?x and ?y must be
different and "eq(c ?z)" means that the variable ?z must be equal to the
constant c.
- Constant names can contain small and capital letters, the numbers
0-9, dashes and brackets "[" and "]".
OP_FILE ::= /* empty */ | OP OP_FILE
OP ::= constantname ":v" PARDEC ":p" FACTLIST ":e" EFFECTS
PARDEC ::= /* empty */ | VARLIST constantname PARDEC
VARLIST ::= /* empty */ | variablename Varlist
FACTLIST ::= /* empty */
| predicatename '(' CONSTANTLIST ')' FACTLIST
| NOT PREDNAME '(' CONSTANTLIST ')' FACTLIST
NOT ::= "not" |"!"
CONSTANTLIST ::= constantname | constantname SPC CONSTANT_LIST
SPC ::= " " { " " | newline | tabulator }
EFFECTS ::= 'ALL' PARDEC PREDLIST IMPL ADDLIST DELLIST CONTINUE
| FACTLIST IMPL ADDLIST DELLIST CONTINUE
ADDLIST ::= /* empty */ | ADD
PREDLIST
DELLIST ::= /* empty */ | DEL PREDLIST-NO-NOT
PREDLIST ::= /* empty */
| predicatename '(' ARGS ')' PREDLIST
| NOT PREDNAME '(' ARGS ')' PREDLIST
PREDLIST-NO-NOT ::= /* empty */
| predicatename '(' ARGS ')' PREDLIST-NO-NOT
ARGS ::= /* empty */ | variablename SPC ARGS
| constantname SPC ARGS
CONTINUE ::= '.' | ';' EFFECTS
IMPL ::= /* empty */ | IMPL
EFFECTS are list of conditional effects with the ADD effects
preceeding the DEL effects which are separated by ";" . The last
effect must be followed by "." NEVER use DEL effects and atomic
negation at the same time!
Several equivalent representations of the move operator
from the Briefcase Domain:
move
:v ?m ?l location
:p is-at(?m)
:e ADD is-at(?l) DEL is-at(?m);
ALL ?o object in(?o) => ADD at(?o ?l) DEL at(?o ?m).
move
:v ?m ?l location
:p is-at(?m)
:e ADD is-at(?l) !is-at(?m);
ALL ?o object in(?o) => ADD at(?o ?l) !at(?o ?m).
move
:v ?l location
:p
:e ADD is-at(?l);
ALL ?m location !eq(?m ?l) => DEL is-at(?m);
ALL ?o object ?m location in(?o) at(?o ?m) !eq(?m ?l)
=> ADD at(?o ?l) DEL at(?o ?m).
move
:v ?l location
:p
:e ADD is-at(?l);
ALL ?m location !eq(?m ?l) => ADD !is-at(?m);
ALL ?o object ?m location in(?o) at(?o ?m) !eq(?m ?l)
=> ADD at(?o ?l) !at(?o ?m).
NOTE:
- We adopt the unique name assumption, i.e., different variables stand
for different objects in the world.
- The effect representation of an operator must first contain
the list of facts that are unconditionally added (preceeded by one
single ADD), then followed by the list of all facts that are
unconditionally deleted (preceeded by one single DEL).
- Everything that is deleted by the operator has to be mentioned
explicitly, i.e., our operators do not automatically delete their
preconditions.
- There can be a possibly infinite number of different
conditional effects, which can be empty.
- The implication sign can be dropped in conditional effects.
- Operators can have empty paramaterlists, preconditions and effects.
- Variables of the same type
can be defined in one list: ?b1 ?b2 ?b3 block ?t1 ?t2 table etc. .
- If you have a predicate without any parameters, you still have to
add the "()", as in arm-empty().
- Names should not be longer than 256 characters.
- Using atomic negation, we require that no DELETE LISTS occur in operators! The syntax still admits it, but it makes no sense for the planner. You can either write ADD not-p(x) DEL p(x) or ADD !p(x) or ADD not p(x), but not ADD not p(x) DEL p(x). When using atomic negation it is sufficient to state the positive or negative ADD effects only!
- Equality and Disequality should never occur in effects.