Skip to main content

Python-distributed native package for the Loki PDDL parser library

Project description

Loki

Loki is a C++20 library for syntactic and semantic parsing and translation of PDDL files. Loki separates the parsing and translation of domain and problem files, allowing users to effectively work with collection of problems.

The parser is based on the canonical parser structure proposed in the Boost Spirit X3 library.

The translator is based on the method presented in section four of the paper "Concise finite-domain representations for PDDL planning tasks by Malte Helmert (AIJ 2009)".

Supported PDDL Requirements

  • :strips
  • :typing
  • :negative-preconditions
  • :disjunctive-preconditions
  • :equality
  • :existential-preconditions
  • :universal-preconditions
  • :quantified-preconditions
  • :conditional-effects
  • :numeric-fluents
  • :adl
  • :derived-predicates
  • :action-costs
  • :non-deterministic (unsupported in the translator)
  • :probabilistic-effects (unsupported in the translator)

Dependencies

Loki depends on a fraction of Boost's header-only libraries (Fusion, Spirit x3, Container), its performance benchmarking framework depends on GoogleBenchmark, and its testing framework depends on GoogleTest.

Loki consumes native dependencies from Python packages:

  • pyyggdrasil >= 0.0.9 for shared third-party native dependencies.

The shared workspace layout and general Python/CMake integration pattern are documented in the Planning and Learning build instructions.

For offline/local development, install pyyggdrasil from the sibling source checkout instead:

cd ../yggdrasil
uv pip install --python ../loki/.venv/bin/python .

Build C++

Install Loki's native dependency providers into the active Python environment, then configure CMake with their native prefixes:

python -m pip install 'pyyggdrasil>=0.0.9'

cmake -S . -B build \
  -DCMAKE_PREFIX_PATH="$(python -c 'import pyyggdrasil; print(pyyggdrasil.native_prefix())')"

cmake --build build -j4

CMake options:

Option Default Description
LOKI_BUILD_TESTS OFF Build Loki tests.
LOKI_BUILD_EXECUTABLES OFF Build Loki executables.
LOKI_BUILD_PROFILING OFF Build Loki profiling targets.
LOKI_BUILD_PYPDDL OFF Build Loki for the pypddl Python wheel.

Run tests from a build configured with -DLOKI_BUILD_TESTS=ON:

ctest --test-dir build --output-on-failure

Install Loki from a configured build directory with:

cmake --install build --prefix=<path/to/installation-directory>

Build Python

python -m pip install .

CMake Integration

The Python package pypddl installs Loki's native headers, shared library, and CMake package config under pypddl.native_prefix(). It depends on pyyggdrasil>=0.0.9 for third-party native dependencies:

import pypddl
import pyyggdrasil

print(pypddl.native_prefix())
print(pyyggdrasil.native_prefix())

Downstream CMake projects should include the native prefixes of pypddl and its native package dependencies in CMAKE_PREFIX_PATH:

cmake -S . -B build \
  -DCMAKE_PREFIX_PATH="$(python -c 'import os, pyyggdrasil, pypddl; print(os.pathsep.join(map(str, [pyyggdrasil.native_prefix(), pypddl.native_prefix()])))')"

Loki exports the loki::parsers target.

Running the Executables

The executable illustrates how to use Loki. It is disabled by default and can be enabled with -DLOKI_BUILD_EXECUTABLES=ON.

./build/exe/loki data/gripper/domain.pddl data/gripper/p-2-0.pddl

IDE Support

We developed Loki in Visual Studio Code. We recommend the C/C++ and CMake Tools extensions by Microsoft. Install pyyggdrasil>=0.0.9 into the Python environment used for configuring CMake, then set the following Cmake: Configure Args in the CMake Tools extension settings under Workspace:

  • -DCMAKE_PREFIX_PATH=<output of python -c 'import pyyggdrasil; print(pyyggdrasil.native_prefix())'>
  • -DLOKI_BUILD_TESTS=ON
  • -DLOKI_BUILD_PROFILING=ON

After running CMake: Configure in Visual Studio Code (ctrl + shift + p), you should see all include paths being correctly resolved.

Citing Loki

If you use Loki in your research, please cite it as follows:

@misc{drexler-zenodo2026,
  author =       "Dominik Drexler",
  title =        "{Loki}: A {PDDL} Parser and Normalizer",
  publisher =    "Zenodo",
  year =         "2026",
  doi =          "10.5281/zenodo.20081136",
  url =          "https://doi.org/10.5281/zenodo.20081136",
}

Acknowledgements

This work was partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.

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

pypddl-1.0.6.tar.gz (717.7 kB view details)

Uploaded Source

Built Distributions

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

pypddl-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pypddl-1.0.6-cp313-cp313-macosx_11_0_arm64.whl (661.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pypddl-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pypddl-1.0.6-cp312-cp312-macosx_11_0_arm64.whl (661.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pypddl-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pypddl-1.0.6-cp311-cp311-macosx_11_0_arm64.whl (661.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pypddl-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pypddl-1.0.6-cp310-cp310-macosx_11_0_arm64.whl (661.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pypddl-1.0.6-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pypddl-1.0.6-cp39-cp39-macosx_11_0_arm64.whl (661.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file pypddl-1.0.6.tar.gz.

File metadata

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

File hashes

Hashes for pypddl-1.0.6.tar.gz
Algorithm Hash digest
SHA256 46ea54ef52a760411f345941570aad20acf744ccfdf7659ad8ae5f73a742432f
MD5 3fc1cffad5b879faa01108f427860635
BLAKE2b-256 e43bfb82f75381cfc37acfeb70e8c09d3cd74d20e0a65742cd31bfd02d736c62

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6.tar.gz:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 62b94a24318bcf12145d6a5a512d912807ca661e685ea4e4f1e09848bba9b878
MD5 0f4cea894f66c4527f3d2facf26d9cb8
BLAKE2b-256 c0f4d01036eda8bf562afd77d4028f0bde1cd4ac8e724216a8f950a7a9fc039e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d22a70940630840b06a3318126e0d626479290976efd976a5b15295444014b26
MD5 1bd1f2ceebb1b953922bfdb536343cf5
BLAKE2b-256 0159fdd9e0b9d4336a953992c7fcb3ae90b504f22cd87cf616ca600878400c54

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6252b2fdbe32da1c8497b17df454da830ea6e924330e3b01eae546345c9c18bb
MD5 e299d2c267a7ef64d989454b310b52d3
BLAKE2b-256 44056354b507ea03a29f5dcb3904c14d53d3681a03ec710d78d85b4960e0bcb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4610ab2810e386643ee80274166b416a02b7d8544342d51ab0ff75f18a384de9
MD5 41d89c0c0877a8d633bd6a83b3b12c0f
BLAKE2b-256 d7013a6f5af8251646d3fc6c5b8fc75a5875ab1e909c53cfb12fc7282d69deb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b740403fbbdefe5cf424816d4fb0a1091879cf697848f44527c15421614df74
MD5 f1c4195e10a07b56291943695c9e1d95
BLAKE2b-256 831aca1f666dc38588b6c07ed9ac371aa20f621b407f38ce8cb79af48d7ff82f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5b585ec359cf4245ce6e329987ac25fa4ba657d77533cc661a544316fa4aaa5
MD5 29e1caebc0481d0a73b7c884cab82e23
BLAKE2b-256 f9f7508619249e707fd84f84417914d8ec44a9e1cbdd91d005656904e2c9fd61

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 204df4dd8ae989d7ddc8bb49bc2d47f2e930660b3bcd1717b75cfc99990c81b1
MD5 22fd8c9ba0f8b6edd46c95d05a1b52bf
BLAKE2b-256 789707e0d59a20ae0a97dc63612cd86020949726b468b44a77d02726378d587f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 130139c967e84e2a329c1d2bb6c24eb8f1acb201992b0e86388b437b421b604d
MD5 6cd32eecfa5b7a3a3490a1e53d86d14a
BLAKE2b-256 5de511dcd8e20a58868ad976cb219d2f2349b7eef228c819f61407bb7a81e39a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 34c16a56977df7e8bb6b0a4dbcd6fb28aec26fb72805d5c67855b5bb855c0f20
MD5 8f94747da5272e1afb0c0e499b91d92a
BLAKE2b-256 c28fa801d2d41849d5ff28a655d37e48c56e02ca453db386b34c51d93a39a4c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on planning-and-learning/loki

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

File details

Details for the file pypddl-1.0.6-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce580689bb50d9689ece9d1cf47f1b9eb7fbe09e5d017bc5a62fbd698789d235
MD5 bfa5f7be48ab6ef79bc6e3a4140e11b0
BLAKE2b-256 aab6a8c15d2f418b1a52a55082043848a6003985ce2440a35130dcce1dce26aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.6-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: release.yml on planning-and-learning/loki

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