Skip to content

A tool that, given as input the domain.pddl and problem.pddl files, generates the grounded translation of the problem

Notifications You must be signed in to change notification settings

GnR98/PDDL-Grounder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDDL-Grounder

A tool that, given as input the domain.pddl and problem.pddl files, generates the grounded translation of the problem

Requirements

Code Overview

  • pddl.g4 - The grammar file. It currently supports a simplified version of PDDL+.

    For example domain.pddl problem-1.pddl.

  • antlr4_directory - The folder generated by antlr4 using the pddl.g4 grammar with the command:

    antlr4 -Dlanguage=python3 pddl.g4 -o antlr4_directory
  • grounder.py - The main module

myUtilities Folder

  • Domain_parser.py - It contains the functions needed to traverse the parse-tree of the domain generated by the antlr4 parser and to represent the tree in JSON format.

    For example domain.json.

  • Problem_parser.py - It contains the functions needed to traverse the parse-tree of the problem generated by the antlr4 parser and to represent the tree in JSON format.

    For example problem.json.

  • Grounding.py - Contains functions for grounding actions, processes, and events of a domain represented in JSON, given a problem represented in JSON. The result is a JSON file.

    For example Inputs: domain.json, problem.json Output: grounding_result.json

  • Writer.py - Contains the function to write the grounded translation of the domain.pddl file

    For example domain_grounded.pddl.

How to use

To run the script simply run the command above, where --domain takes the name of the PDDL domain file and --problem takes the name of the PDDL problem file. These files MUST be present in the PDDL_Files folder.

python grounder.py --domain domain.pddl --problem problem-1.pddl

If some changes to the grammar file pddl.g4 are needed, the new parser and lexer are generated with the command:

antlr4 -Dlanguage=python3 pddl.g4 -o antlr4_directory

Resources

About

A tool that, given as input the domain.pddl and problem.pddl files, generates the grounded translation of the problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published