5 releases

0.1.4 Apr 8, 2024
0.1.3 Feb 20, 2024
0.1.2 Feb 20, 2024
0.1.1 Feb 20, 2024
0.1.0 Feb 17, 2024

#46 in Robotics

Download history 106/week @ 2024-02-12 245/week @ 2024-02-19 55/week @ 2024-02-26 2/week @ 2024-03-04 6/week @ 2024-03-11 148/week @ 2024-04-08

148 downloads per month
Used in pddllib

Custom license

30KB
838 lines

pddlp

A simple, fast, and robust PDDL parser

pddlp has three goals:

  • Robust - Is tested on commenly used PDDL domains and problems
  • Fast - Optimised and benchmarked to be as fast as possible
  • Simple - Avoids rarely used PDDL syntax in favor of easy of use

Example

let input = "(define (problem prob)
                  (:objects o1)
                  (:init (p o1))
                  (:goal (not (p o3)))
             )";
let problem = pddlp::problem::parse(&input)?;
assert_eq!(problem.name, Some("prob"));
assert_eq!(problem.domain, None);
assert_eq!(problem.objects, Some(vec![pddlp::problem::Object { name: "o1", type_name: None }]));
//...

Benchmark

Benchmarked on a AMD Ryzen 5 5600X 6-Core Processor × 6 with Criterion

Throughput Time to Parse (see here)
Domain 436 MiB/s 2 µs
Problem 468 MiB/s 523 ns
Plan 507 MiB/s 93 ns

Dependencies

~1.5MB