AI-Planning / pddl

Unquestionable PDDL 3.1 parser
https://ai-planning.github.io/pddl/
MIT License
85 stars 27 forks source link

Duplicates not detected when parsing typed lists #76

Closed marcofavorito closed 1 year ago

marcofavorito commented 1 year ago

Subject of the issue

Duplicates in typed lists, e.g. in the (:types ...) section of a PDDL domain, are not detected, whereas we should signal to client code there a syntactic problem in the PDDL domain definition.

Your environment

Steps to reproduce

Run the following code:

domain_str = """
    (define (domain test)
        (:requirements :typing)
        (:types a b c a)
    )"""
domain = DomainParser()(domain_str)

Expected behaviour

An error is raised signalling that the PDDL file has syntactic problems.

Actual behaviour

The PDDL file is parsed without any issue.