According to my reading of the PDDL 1 spec, it is not allowed to have a
predicate and a type that have the same name. (See msg1249.) Nevertheless, this
happens in the wild, and in those cases we should either
1) give a meaningful error message that specifically says that there is a
predicate/type name clash, or
2) support this -- possibly with a warning.
In the second case, one way to support this would be to
1. detect if a clash occurs, and if so
2. rename the type to "T@<original type>" or some such everywhere (i.e. in all
typed lists -- :constants and :objects definitions, parameter lists for
predicates and actions, and quantifiers including quantified effects)
The renaming (step 2.) should *only* happen if there is a clash, so that the
correct semantics (reusing types as predicates) is still supported.
|