Skip to main content

Pure Python PDDL plan validator

Project description

PyVAL — Pure Python PDDL Plan Validator

PyPI Python License: MIT

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:

  1. Syntax & semantic — PDDL parses, types/predicates/functions are well-formed, no duplicates or arity mismatches.
  2. Plan structure — every action name exists in the domain, parameters are declared objects with type-compatible (subtype-aware) bindings.
  3. 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 -v for 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 CLAUDE.md for architecture notes and the validation pipeline overview.

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

pddl_pyvalidator-0.1.5.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pddl_pyvalidator-0.1.5-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file pddl_pyvalidator-0.1.5.tar.gz.

File metadata

  • Download URL: pddl_pyvalidator-0.1.5.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pddl_pyvalidator-0.1.5.tar.gz
Algorithm Hash digest
SHA256 aeea66824ab7c95855591b6b8f8d9e70722c02b7e4575a1f418268bd4bee6e93
MD5 ea0974309c82fd6ff67732d580ebea3b
BLAKE2b-256 123881f3f2d5391efcd72fab2520dcd305a666e74b99ff4115b5c17c2d0e6ede

See more details on using hashes here.

Provenance

The following attestation bundles were made for pddl_pyvalidator-0.1.5.tar.gz:

Publisher: publish.yml on SPL-BGU/pyvalidator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pddl_pyvalidator-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pddl_pyvalidator-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 60a6513edeb000a3b39f9bfaac82c6939a5644a62fb8802f598600ceb58227a4
MD5 c2329d3685dd5e79d665f8a575f0be9e
BLAKE2b-256 9ba42e6f4f9be8a4279f53f3de9dc09065b3c29c72e825b8a859b48969f8f96e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pddl_pyvalidator-0.1.5-py3-none-any.whl:

Publisher: publish.yml on SPL-BGU/pyvalidator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page