When types are validated, if the same type is written with different cases (e.g., sometimes capitalized sometimes not), the parser throws an error.
The specific error happens at line 228 of pddl/_validation.py in the _check_types_are_available function.
def _check_types_are_available(
self, type_tags: Collection[name_type], what: str
) -> None:
"""Check that the types are available in the domain."""
if not self._types.all_types.issuperset(type_tags):
raise PDDLValidationError(
f"types {sorted(type_tags)} of {what} are not in available types {self._types.all_types}"
)
(define (problem hello-3-times)
(:domain hello-world-functions)
(:objects counter1 - counter)
(:init
(counter1)
; if this was undefined, some planners would not assumed `0`
(= (hello_counter) 0)
)
(:goal
(>= (hello_counter) 3)
)
)
Actual behaviour
raise VisitError(tree.data, tree, e)
lark.exceptions.VisitError: Error trying to process rule "domain":
types ['counter'] of term Variable(c) are not in available types {'Counter', 'object'}
Subject of the issue
When types are validated, if the same type is written with different cases (e.g., sometimes capitalized sometimes not), the parser throws an error.
The specific error happens at line 228 of
pddl/_validation.py
in the_check_types_are_available
function.Steps to reproduce
Minimal example to reproduce the error:
PDDL domain:
PDDL problem:
Actual behaviour