gerryai / pddl-parser

Java parser for the Planning Domain Definition Language (PDDL)
GNU General Public License v3.0
11 stars 4 forks source link

[q] serialize object model back to .pddl file #1

Open n0mer opened 9 years ago

n0mer commented 9 years ago

@gerryai, is it possible to serialize POJO representation of planning definition back to PDDL text file?

In other words - is there a feature in ASM that allows not only to parse definition and create Java objects, but the opposite - write PDDL from existing object model.

The idea behind this question is to be able to modify (or even create from scratch) PDDL-compatible definitions in code, and then store them to text .pddl files.

purple52 commented 9 years ago

This isn't supported by the current codebase, and I've not tried doing it. But I don't see why it shouldn't be possible, certainly for simple definitions; the POJO representation closely models the PDDL structure. In most places, it might even be as simple as implementing a simple toString() on each POJO.

If you want to have a try, please do; I'm very happy to take contributions, and to hear feedback from anyone who's trying to use the parser.