'Is it in general allowed to use multiple definitions of the same predicate, but with different types in PDDL

First of all, I am new to the PDDL language. I am trying to write my own domain and problem files following different examples on the Internet. While experimenting a bit with an online solver, I got an error related to the usage of multiple definitions of the same predicate. However, in the predicate definition I use different types. Is this a normal behaviour of a standard PDDL solver or it is just the implementation at hand that is causing this error? Here is my example:

(on ?o1 - edge-tool ?o2 - table)
(on ?o1 - cooking-utensil ?o2 - table)


Solution 1:[1]

It is not allowed in general, but you can define a common type for the different types that are compatible with your predicate. If your predicate is meaningful with different types, it is because they have something in common that is worth being expressed in the type definitions.

In your case:

(:types
  movable_object
  edge-tool cooking-ustensil - movable_object
)
(:predicates
  (on ?o1 - movable_object ?o2 - table)
)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Victor Paléologue