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 these native dependencies from pyyggdrasil:

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

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

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

Build Instructions

# Configure with the pyyggdrasil native prefix
cmake -S . -B build \
  -DCMAKE_PREFIX_PATH="$(python -c 'import pyyggdrasil; print(pyyggdrasil.native_prefix())')"
# Build
cmake --build build -j16
# Install (optional)
cmake --install build --prefix=<path/to/installation-directory>

For shared-library builds, disable static dependency lookup:

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

Integration Instructions

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.7 for third-party native dependencies:

import pypddl
import pyyggdrasil

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

Downstream CMake projects can then use:

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

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

Running the Tests

The testing framework depends on GoogleTest and requires the additional compile flag -DLOKI_BUILD_TESTS=ON to be set in the cmake configure step.

Performance Benchmarks

The benchmark framework depends on GoogleBenchmark and requires the additional compile flag -DLOKI_BUILD_BENCHMARKS=ON to be set in the cmake configure step. The results from the GitHub action can be viewed here.

IDE Support

We developed Loki in Visual Studio Code. We recommend the C/C++ and CMake Tools extensions by Microsoft. Install pyyggdrasil>=0.0.7 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_BENCHMARKS=ON

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

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.4.tar.gz (717.4 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.4-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.4-cp313-cp313-macosx_11_0_arm64.whl (710.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pypddl-1.0.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (710.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pypddl-1.0.4-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.4-cp311-cp311-macosx_11_0_arm64.whl (710.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pypddl-1.0.4-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.4-cp310-cp310-macosx_11_0_arm64.whl (710.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pypddl-1.0.4-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.4-cp39-cp39-macosx_11_0_arm64.whl (710.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pypddl-1.0.4.tar.gz
  • Upload date:
  • Size: 717.4 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.4.tar.gz
Algorithm Hash digest
SHA256 b5b9fa6926f5ff1007784779fd14d10b066efe0d402b37e3a37465d6dcd7528d
MD5 3790d0f992ed868e4171cc83b12eb5b9
BLAKE2b-256 122ec58d06d609e83bf90d4da74ca5f23a92f6db6ee4836418b9c081396c0ad9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4.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.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2efe6973b8d3c5a7bdf381845b14dc1ab41618e720309f464b2cc4cee43de50c
MD5 4cb9a62d4627af113222af2649e086dd
BLAKE2b-256 444990afa827fdd2855eab3ed587bcc3d3916262e15fdc3856a624a8f284665a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 616879c6d6c51b7dae2a2bc228bdfac168a118b5d531de9cbaebf34b27817361
MD5 52cc3a183a5cedaa828be1a66d0e988a
BLAKE2b-256 2da4c561b6cc0ba2d1e32ce7299028a092ce1aba3b25202a13c9a8dc4e636de1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f7dae3cbb8d57f6fa857346acb8658e229d16d46248bb7cef2ec8bf2abade974
MD5 18a3724e0d44c465816ee893b4eba5c4
BLAKE2b-256 bb8420d2f176a401b7bfeb31101011ecc8807036e9e2cc3acf74aa3ba12d70ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9646f8618f1cf45d7713bd820546c7e1b2ea42fe7efc5678c6903632ecbd2c2
MD5 4edaf8fc83f9a31853533ca7f82b690f
BLAKE2b-256 bf29a175bd6dad1ecc6e9bf9bc72c888a00fd5550e472980fbf3e598c7dad1fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fd4b6b08c473ebd2357fe49ccb2439d9ae0a8276b5aa77aebff1832741510700
MD5 73a8e36242fbc9f33e44508deb7b9a06
BLAKE2b-256 e2c0f8021fac95fd8afb75818f25d8e893eb5ebf43e212654033cc26133306ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb5e1a6e5e0001e986428bbb6ebd88c994c28595bc3e2296579b28765ca1b152
MD5 482368441d53f85f5df5ed74f988bdc9
BLAKE2b-256 2355e0b326e6ed7222b8ebba39bb628e5814e723af84a28b95020c4bf22f963f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8cc572e1fbda385ccfb15843ef1b8ef99d9059ccc6689c6de652f090d0025d41
MD5 85b2a078b7e84d05a10192fe837f0e05
BLAKE2b-256 86a2877de75ab1c99dcec72dcc7ce8ec5b4a3833d8cc87d34d9252461296f4d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 20df7e176f7bdedf8320a353571c0b892e588034e316035a6aa3f654f8aa4846
MD5 3063eb97991f972e72d1c1551c90d99b
BLAKE2b-256 d965cc12df805ad4d16281643a917644e256e5c0ddb9f3a697ed1fcc95894597

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b4ae12f4986eb0ed7840e3605a84ab5ec161c74b87d3bee3f8e19ef23dc5f1e
MD5 c14b720d1e1730180b3916bc3e96f2a5
BLAKE2b-256 ebf49d98b1e2817e63063b67880a6da0e5610d506bb6a09383ce52b6ab1296f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 120cacc0f2383b8c2cbd3330ece329dc7bdd0c45676d7ce81e006b4b556de948
MD5 d50b99c4957d7bc708fe73faa0e04b57
BLAKE2b-256 a21bef94a3b17c7a07af804a67e8180574eb43d159dd41f016382d644ba716db

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypddl-1.0.4-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