{"id":16162349,"url":"https://github.com/sunsided/pddl-rs","last_synced_at":"2026-04-26T00:01:08.586Z","repository":{"id":153964605,"uuid":"628080399","full_name":"sunsided/pddl-rs","owner":"sunsided","description":"A Planning Domain Definition Language (PDDL 3.1) parser written in Rust","archived":false,"fork":false,"pushed_at":"2026-04-25T09:49:01.000Z","size":809,"stargazers_count":18,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-25T10:28:35.632Z","etag":null,"topics":["artificial-intelligence","pddl","pddl-language","pddl-parser","planning","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/pddl","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunsided.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-14T21:40:00.000Z","updated_at":"2026-04-25T09:26:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"0772a999-3863-4c9c-87b0-252e8657867a","html_url":"https://github.com/sunsided/pddl-rs","commit_stats":{"total_commits":217,"total_committers":1,"mean_commits":217.0,"dds":0.0,"last_synced_commit":"b696bbe5b51ad99afe5edc13838051809665d7b8"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sunsided/pddl-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fpddl-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fpddl-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fpddl-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fpddl-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunsided","download_url":"https://codeload.github.com/sunsided/pddl-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fpddl-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32280981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","pddl","pddl-language","pddl-parser","planning","rust"],"created_at":"2024-10-10T02:29:50.965Z","updated_at":"2026-04-26T00:01:08.569Z","avatar_url":"https://github.com/sunsided.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A PDDL 3.1 parser, strongly typed\n\nA parser for the Planning Domain Definition Language version 3.1: written in Rust, based on [nom](https://crates.io/crates/nom).\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sunsided/pddl-rs/rust.yml)\n![docs.rs](https://img.shields.io/docsrs/pddl)\n[![codecov](https://codecov.io/gh/sunsided/pddl-rs/graph/badge.svg?token=8H8K6HW6AF)](https://codecov.io/gh/sunsided/pddl-rs)\n![Crates.io](https://img.shields.io/crates/v/pddl)\n![Crates.io](https://img.shields.io/crates/l/pddl)\n\nCrate documentation is available on [docs.rs/pddl](https://docs.rs/pddl).\n\n```toml\n[dependencies]\npddl = \"*\"\n```\n\nThe domain/problem types can be used independently of the parser; the parser\nis however enabled by default via the `parser` crate feature.\nTo disable the parser and its dependencies, use\n\n```toml\n[dependencies]\npddl = { version = \"*\", default-features = false }\n```\n\nDocumentation comments are assembled from the PDDL papers and [nergmada/planning-wiki](https://github.com/nergmada/planning-wiki).\n\n## Usage Example\n\nSee [`tests/briefcase_world.rs`](tests/briefcase_world.rs) for the full example.\n\n### Parsing a Single Problem\n\n```rust\nuse pddl::{Problem, Parser};\n\npub const BRIEFCASE_WORLD_PROBLEM: \u0026'static str = r#\"\n    (define (problem get-paid)\n        (:domain briefcase-world)\n        (:init (place home) (place office)                  ; place types\n               (object p) (object d) (object b)             ; object types\n               (at B home) (at P home) (at D home) (in P))  ; setup\n        (:goal (and (at B office) (at D office) (at P home)))\n    )\n    \"#;\n\nfn main() {\n    let problem = Problem::from_str(BRIEFCASE_WORLD_PROBLEM).unwrap();\n\n    assert_eq!(problem.name(), \"get-paid\");\n    assert_eq!(problem.domain(), \"briefcase-world\");\n    assert!(problem.requirements().is_empty());\n    assert_eq!(problem.init().len(), 9);\n    assert_eq!(problem.goals().len(), 3);\n}\n```\n\n### Parsing a File with Multiple Domains and Problems\n\nPDDL files often contain multiple `(define ...)` blocks — domains and problems\nin any order. Use `PddlFile` to parse them all at once:\n\n```rust\nuse pddl::{PddlFile, Parser};\n\npub const PDDL_FILE: \u0026'static str = r#\"\n(define (domain blocks-world)\n    (:requirements :strips)\n    (:predicates (clear ?x) (on ?x ?y) (on-table ?x))\n    ; ... actions omitted for brevity\n)\n\n(define (problem blocks-problem-1)\n    (:domain blocks-world)\n    (:init (on-table a) (on b a) (clear b))\n    (:goal (and (on a b)))\n)\n\n(define (problem blocks-problem-2)\n    (:domain blocks-world)\n    (:init (on-table a) (on-table b) (clear a) (clear b))\n    (:goal (and (on b a)))\n)\n\"#;\n\nfn main() {\n    let file = PddlFile::from_str(PDDL_FILE).unwrap();\n\n    assert_eq!(file.domain_count(), 1);\n    assert_eq!(file.problem_count(), 2);\n\n    let domain = \u0026file.domains[0];\n    assert_eq!(domain.name(), \"blocks-world\");\n    assert_eq!(domain.predicates().len(), 3);\n\n    let problem1 = \u0026file.problems[0];\n    assert_eq!(problem1.name(), \"blocks-problem-1\");\n    assert_eq!(problem1.goals().len(), 1);\n}\n```\n\n### Caveat Emptor\n\nAt this point the parser supports all domain and problem definition\nelements required to fully describe a PDDL 3.1 environment.\nHowever, since types and enum variants are named closely to the underlying\nBNF descriptions (see below), they may be a bit unwieldy to use still.\n\n### Supported Elements\n\nParsers were implemented based on the BNF elements listed in the paper:\n\n\u003e \"Complete BNF description of PDDL 3.1 (completely corrected)\",\n\u003e _Daniel L. Kovacs_\n\nSee [ELEMENTS.md](ELEMENTS.md) for a graph of BNF elements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Fpddl-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunsided%2Fpddl-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Fpddl-rs/lists"}