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.2
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.2 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.2 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.2.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.2-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.2-cp313-cp313-macosx_11_0_arm64.whl (710.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

pypddl-1.0.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: pypddl-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 29b366f624b1781c31762869650372aa24ec4a3510ae2ff4f32b3bd21a44bfce
MD5 a3a9a4f914c37a76cdebc10d58f4d78f
BLAKE2b-256 611cdf1c71381b39d9869b6efbf7ff8ce69ed7826b77e217b7f94ada2e368abb

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3af172edb25c2a11c16d04b0032bc50fc6f90e753d67f7542410f76783587646
MD5 eb866bb04b454667b81e4c5c7684e3e7
BLAKE2b-256 a205ab362657f58cc8adaacf644c073bf3e75be596b245b633a418ff07b63fe4

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c02cb2989213b82c153ad52eaa5f6d19ef7cfffc96a8aa73cd022add1db6062f
MD5 d173399683402da6d59f9710132e20b0
BLAKE2b-256 e79cc67a26ce2aa309dfbe95f7f1842823b2c752028db14f63c93d7bdce350b5

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d5f52cc8232bedceb7c3a9a838b6810243176aa752701d6019511004b49e4a4b
MD5 b52bd3d0c4c1770306cfcb8242280fdc
BLAKE2b-256 07bfa3018791f1ee2ba595228e528951b091b111beba93246dc147ff53c39121

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 274f5aee10274828a4f35f3d084cd58bd6de640d4932a6dcbefd0d32db7dad31
MD5 106cb6cd85357c764cbafc6631c05fbe
BLAKE2b-256 d908295673ef1a1f871638e21dc054ee48ca11750420684bb7387b1c2a134d1c

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ec6544a6959ac5f4845833a95a8b3ef9e5b8777f114ebb7da2a632385ce6f7e2
MD5 589274e3bb30c9c2d8b6735ae5947baa
BLAKE2b-256 d32f733c685f3b92c135544d8c4ad080cc9c4e131ea3a64b1486697187b51259

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c5c415c5f723d14d9b790303a2c0ce5b882ede378ed50bea5d426e181bd6b64
MD5 24bb0865c8eea8bff9424e460115593b
BLAKE2b-256 e970aaf66e866a1a92492d7f659dea23a91e8e84c2c02bfbc2cbfea0e8b8e698

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0f6f4f5d83dc85eaaa80baa3f89a14b2d6f90a5c29a298e4b5fb39bcb5332d00
MD5 86d91cd5467fc8a2071d68886e903dd2
BLAKE2b-256 6b7daf6a829d4a183da72c959462fcf8c079d17be219c22fc389c50cbdfea5cb

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f267a280c3735a423e4d25f535d391d04906072fd1d8543814a3c38078c61d2e
MD5 8184b2d659306f87bfa31978199fdc51
BLAKE2b-256 18ee4b6294a76cc1926b1e53a2c954b7abd82465719cf0287ece67dc06cd09a9

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d3a702c8044e597074c3aa03c2c59b8ccb479610d8f14e055c3d71978f980cc6
MD5 4f215759c80c3f28de1ded176f3c3855
BLAKE2b-256 5dcdcd35a68a6ecb72d4f67a87882973d4ac85340671c7b5808594e4dbfa1def

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypddl-1.0.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ab90ff58fe8ec42b122e0ca63504279ed0be818c3891e275d6515706c2afc57
MD5 3376dd7693ee7e599e8bef414fd594f7
BLAKE2b-256 0421d9c3f1e49ffddb07a20f44d9e398a4c41302b00351d2227b3526b295dcd7

See more details on using hashes here.

Provenance

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

Publisher: release.yml on drexlerd/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