AI-Planning / pddl

Unquestionable PDDL 3.1 parser

Home Page:https://ai-planning.github.io/pddl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Constant/Variable types are not checked against the Domain's available types

marcofavorito opened this issue · comments

Subject of the issue

Constants' and variables' types are not checked against domain's available types.

Your environment

  • OS: Ubuntu 22.04
  • Python version: 3.10.9
  • Package Version: 0.3.1, tag v0.3.1

Steps to reproduce

Run the following code:

from pddl.parser.domain import DomainParser
domain_str = """
    (define (domain test)
        (:requirements :typing)
        (:types t1)
        (:constants c1 - non_existing_type)
        (:predicates  (p1 ?v1 - non_existing_type))
        (:action a1
        :parameters (?v - non_existing_type)
        :effect (c1))
)"""
domain = DomainParser()(domain_str)

Expected behaviour

A validation error should be raised that says non_existing_type is not available in the current domain.

Actual behaviour

Nothing happens; the domain is parsed correctly.