pellierd / pddl4j

PDDL4J is an open source library under LGPL license whose purpose of PDDL4J is to facilitate the development of JAVA tools for Automated Planning based on PDDL language (Planning Domain Description Language).
https://lig-membres.imag.fr/pellier/
GNU Lesser General Public License v3.0
147 stars 68 forks source link

Abstract Task written incorrectly by parsedProblem.toString function for HDDL domains #111

Open gaspard-quenard opened 1 year ago

gaspard-quenard commented 1 year ago

To continue the #110 issue, there is also a problem to represent the abstract tasks. If I run the function parsedProblem.toString for the domain: ipc2020/Blockworld-GTOHP/domain.hddl, it gives me:

;...

(:tasks 
  (do_put_on ?x - BLOCK ?y - BLOCK)
  (do_on_table ?x - BLOCK)
  (do_move ?x - BLOCK ?y - BLOCK)
  (do_clear ?x - BLOCK)
  (pick-up ?x - BLOCK)
  (put-down ?x - BLOCK)
  (stack ?x - BLOCK ?y - BLOCK)
  (unstack ?x - BLOCK ?y - BLOCK)
  (nop)
  (pick-up ?x - BLOCK)
  (put-down ?x - BLOCK)
  (stack ?x - BLOCK ?y - BLOCK)
  (unstack ?x - BLOCK ?y - BLOCK)
  (nop)
  )

;...

But it seems that the hddl parser does not accept the :tasks keyword, only :task and it is used only for abstract task. So it should be:

;...

  (:task do_put_on
  :parameters (?x - block ?y - block) )

(:task do_on_table
  :parameters (?x - block) )

(:task do_move
  :parameters (?x - block ?y - block) )

(:task do_clear
  :parameters (?x - block) )

;...

Would it be possible to make this change as well ? Thanks