#planning #language #pddl #token #parser

pddl-parser

A Rust library for parsing PDDL files

6 releases

0.2.3 Feb 12, 2024
0.2.2 Feb 7, 2024
0.2.1 Jan 31, 2024
0.1.1 Jun 21, 2023
0.1.0 May 8, 2023

#1215 in Parser implementations

47 downloads per month

MIT/Apache

145KB
3K SLoC

Workflow codecov

PDDL Parser

Parser for PDDL (Planning Domain Definition Language) files.

Usage

Add this to your Cargo.toml:

pddl-parser = "0.1.0"

Example

use pddl_parser::domain::Domain;

fn main() {
    let domain_file = include_str!("../tests/domain.pddl");
    let domain = Domain::parse(domain_file);
    domain.predicates.iter().for_each(|p| println!("{:?}", p.name));
}

PDDL Requirements supported

  • :strips
  • :typing
  • :equality
  • :fluents
  • :adl
  • :durative-actions
  • :derived-predicates
  • :numeric-fluents
  • :preferences
  • :constraints
  • :action-costs
  • :conditional-effects
  • :probabilistic-effects
  • :reward-effects

Contributing

TODO

  • Parsing:

    • Support PDDL domain parsing
    • Support PDDL problem parsing
    • Support PDDL plan parsing
  • PDDL Features

    • Better support for types (assign types to variables, etc.)
  • Testing:

  • Error handling:

    • Custom errors (using thiserror)
    • Forbid unwrap
    • Check that all of the input has been consumed
  • Documentation:

    • Add documentation for all public items

Dependencies

~3.5MB
~43K SLoC