Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is pandaPIparser case-sensitive? #11

Open
rpgoldman opened this issue Jul 14, 2023 · 2 comments
Open

Is pandaPIparser case-sensitive? #11

rpgoldman opened this issue Jul 14, 2023 · 2 comments

Comments

@rpgoldman
Copy link
Contributor

rpgoldman commented Jul 14, 2023

I notice with the following domain file that I get this message from the parser:

There is no declaration of the subtask drive-ta in the input
Method move-one-ta has the subtask (__t_id_3) drive-ta. The task is declared with 0 parameters, but 2 are given in the method.
There is no declaration of the subtask drive-ta in the input
Method move-more-ta has the subtask (__t_id_5) drive-ta. The task is declared with 0 parameters, but 2 are given in the method.

The action is declared using drive-TA with caps. PDDL is case-insensitive, so I think HDDL should be also, shouldn't it?

Indeed, down-casing the action definition makes this message go away.

Here's the domain:

(define (domain toll-domain)
    (:requirements :negative-preconditions :typing :hierarchy)
  (:types
   location - object
   )
  (:predicates
   (toll-area ?r - region)
   (road ?arg0 - location ?arg1 - location)
   (at ?arg1 - location)
   (pay-location ?l - location)
   )

  (:task move
   :parameters (?l1 - location ?l2 - location)
         )

  (:method move-one
      :parameters (?l1 - location ?l2 - location)
    :task (move ?l1 ?l2)
    :ordered-subtasks (and
                       (drive ?l1 ?l2)
                       )
    )
  (:method move-more
      :parameters (?l1 ?l2 ?l3 - location)
    :task (move ?l1 ?l3)
    :ordered-subtasks (and
                       (drive ?l1 ?l2)
                       (move ?l2 ?l3)
                       )
    )
  (:method move-none
      :parameters (?l1 - location)
    :task (move ?l1 ?l1)
    :ordered-subtasks ()
    )
  (:method move-one-ta
      :parameters (?l1 - location ?l2 - location)
    :task (move ?l1 ?l2)
    :ordered-subtasks (and
                       (drive-ta ?l1 ?l2)
                       (pay-toll ?l2)
                       )
    )
  (:method move-more-ta
      :parameters (?l1 ?l2 ?l3 - location)
    :task (move ?l1 ?l3)
    :ordered-subtasks (and
                       (drive-ta ?l1 ?l2)
                       (move ?l2 ?l3)
                       (pay-toll ?l3)
                       )
    )

  (:action drive
   :parameters (?l1 - location ?l2 - location)
   :precondition 
           (and
            (at ?l1)
            (pay-location ?l1)
            (road ?l1 ?l2)
            )
   :effect
           (and
            (not (at ?l1))
            (at ?l2)
            )
           )
  (:action drive-TA
   :parameters (?l1 - location ?l2 - location)
   :precondition 
           (and
            (at ?l1)
            (road ?l1 ?l2)
            )
   :effect
           (and
            (not (at ?l1))
            (at ?l2)
            )
           )

  (:action pay-toll
   :parameters (?l - location)
   :precondition 
           (and
            (at ?l)
            (pay-location ?l)
            )
   :effect ()
           )
  )

@galvusdamor
Copy link
Collaborator

Yes, the current version of the parser is indeed case-sensitive. The build-in plan verifier is not case-sensitive (as IPC competitors did ignore case).

The other question would be whether the parser should be case-sensitive. As you correctly point out, PDDL is case insensitive - which would imply that HDDL should also be. I would ask the other PANDA authors whether we should make the change and then implement it. This might however take a while (due to vacation and the like). I hope this is not a problem for you?

@rpgoldman
Copy link
Contributor Author

I would say that the parser should be case-insensitive, but that making it case-insensitive is a low priority fix.

It is not a problem for me to make my domains correct when processed in a case-sensitive way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants