Pure Python PDDL plan validator
Project description
PyVAL — Pure Python PDDL Plan Validator
A pure-Python PDDL plan validator — a drop-in alternative to the compiled VAL binary. Built on unified-planning, zero compiled dependencies, pip install-able everywhere.
PyVAL produces rich, structured diagnostics designed for both humans and LLM consumption: per-step state changes, precondition deficit reporting, and repair-oriented messages.
Install
pip install pddl-pyvalidator
Quick Start
# Validate a plan against a domain and problem
pyval domain.pddl problem.pddl plan.txt
# JSON output for tool integration
pyval domain.pddl problem.pddl plan.txt --json
# Numeric fluent trajectory (one row per step)
pyval domain.pddl problem.pddl plan.txt --trajectory --track fuel --track cost
# Syntax check only (domain, or domain + problem)
pyval domain.pddl
pyval domain.pddl problem.pddl
Exit code is 0 on a valid plan, 1 otherwise.
Python API
from pyval import PDDLValidator
validator = PDDLValidator()
result = validator.validate(
domain_path="domain.pddl",
problem_path="problem.pddl",
plan_path="plan.txt",
)
if result.is_valid:
print("Plan is valid")
else:
for err in result.errors:
print(err)
What Gets Validated
PyVAL runs a three-phase pipeline and halts on the first fatal error:
- Syntax & semantic — PDDL parses, types/predicates/functions are well-formed, no duplicates or arity mismatches.
- Plan structure — every action name exists in the domain, parameters are declared objects with type-compatible (subtype-aware) bindings.
- Plan execution — each step's preconditions hold, effects apply, and goals are satisfied in the final state. Numeric fluents are tracked across steps; quality metrics (
minimize/maximize) are evaluated on the final state.
Unsupported PDDL features (durative actions, PDDL+ processes/events) are reported as warnings rather than silent failures.
Output Modes
- Plain text (default, VAL-like, optionally
-vfor per-step detail) - JSON (
--json) — structured for programmatic consumption - Trajectory (
--trajectory) — numeric fluent values per step, optionally filtered via--track
Development
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
See VALIDATOR_SPEC.md for the full specification and CLAUDE.md for architecture notes.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pddl_pyvalidator-0.1.3.tar.gz.
File metadata
- Download URL: pddl_pyvalidator-0.1.3.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6a1c2c9b07fce80930678925ad68e84a13fa5323ee297d46ad6f9952ceff494
|
|
| MD5 |
a7a350aa143c6eb2a74eb11fe1831ae7
|
|
| BLAKE2b-256 |
841c56b8b2cf7e99458d6b1d577784839f1a10614d9f7d0761f832fc8602a6e4
|
Provenance
The following attestation bundles were made for pddl_pyvalidator-0.1.3.tar.gz:
Publisher:
publish.yml on SPL-BGU/pyvalidator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pddl_pyvalidator-0.1.3.tar.gz -
Subject digest:
e6a1c2c9b07fce80930678925ad68e84a13fa5323ee297d46ad6f9952ceff494 - Sigstore transparency entry: 1306888179
- Sigstore integration time:
-
Permalink:
SPL-BGU/pyvalidator@fcbb9b6cbc93b43349dd79b7a97dd2a2dd460b3b -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/SPL-BGU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcbb9b6cbc93b43349dd79b7a97dd2a2dd460b3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file pddl_pyvalidator-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pddl_pyvalidator-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da66680874d9d657f84c523cacd8d2d7d746d91006a33efcfd6331025ef7fcb8
|
|
| MD5 |
ba7fc79b87cd5331be0967e85a7dcaa5
|
|
| BLAKE2b-256 |
02ad5070cc172376ba45b82341f650551c0f8cc94e87d10c3d5c1a7883e67bef
|
Provenance
The following attestation bundles were made for pddl_pyvalidator-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on SPL-BGU/pyvalidator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pddl_pyvalidator-0.1.3-py3-none-any.whl -
Subject digest:
da66680874d9d657f84c523cacd8d2d7d746d91006a33efcfd6331025ef7fcb8 - Sigstore transparency entry: 1306888238
- Sigstore integration time:
-
Permalink:
SPL-BGU/pyvalidator@fcbb9b6cbc93b43349dd79b7a97dd2a2dd460b3b -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/SPL-BGU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcbb9b6cbc93b43349dd79b7a97dd2a2dd460b3b -
Trigger Event:
push
-
Statement type: