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.1.tar.gz (717.3 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.1-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.1-cp313-cp313-macosx_11_0_arm64.whl (692.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pypddl-1.0.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (692.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pypddl-1.0.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (692.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pypddl-1.0.1-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.1-cp310-cp310-macosx_11_0_arm64.whl (692.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pypddl-1.0.1-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.1-cp39-cp39-macosx_11_0_arm64.whl (692.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: pypddl-1.0.1.tar.gz
  • Upload date:
  • Size: 717.3 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.1.tar.gz
Algorithm Hash digest
SHA256 ed39e54bc2536cecfa19f30d9034f67dabbaee7c2bec941380b9fc1525673cdc
MD5 3711d8afa5ee09b179fb72065692fcac
BLAKE2b-256 86cf86cc80ad95e2ad191d9dbc84dc92c747877b3897611af4df98760a6ab4b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d8f5410acb96a08f1185dda098e10a2ab689fff0663533077b32051945253a35
MD5 c574f2753df72f07b5488b0f0707df05
BLAKE2b-256 4e55cbc05988c6866216b805e53c979d409012d0d16e78fcc917cd3a4c55f8fa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eed748a6b3f58b51bd6526a9987532588e4b8bc234f4955381e8daf809d8f9f3
MD5 3138c88d2b84350256b9ff223ee84d45
BLAKE2b-256 6c79dc81bc6ba2553cd6a31f5832c7d74d5b76676c8ece34df2102bfaa68608b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e33dc1fbc121e09e59e00f843d657c2c94c1533b8fe7307263075496f6dfe06f
MD5 c0ac477578494851337728c410002242
BLAKE2b-256 e663bde10dc33078d7e995268fbe09e65df28568ffff7f2ad26fefe5fa0203c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef50cc4f8b859255bd2accd1b80e8b0c40b457eaee9d686b8419d1e0b6ffe0a1
MD5 4b10a1849d03c375deb1b749836108f8
BLAKE2b-256 3ae9f21e8d933f7642e22035782485cb224b265bd7c0f7b10f439843a9617610

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d8a67276655a4edfd16bc379f79ca20ff74d93621097d3b9cdcbd1fa477d705
MD5 d91ea36d6e523f29f1a85df271148801
BLAKE2b-256 06807d685bb769ab3c6432e50c269dcb429eb1267671466adb6bcd80d5cc8858

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac30459ae417a9a8ff5b46a9af0b9a8e5547111df64537421c0f9522aa8fe41d
MD5 d779390f5c0134761cebf536325a6df8
BLAKE2b-256 11fa27cafa3a088eb9b0b0f82cb525d0121d4a11419ca26dfc48bfd36df23af1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e78b18a373a748a1c2661740bfa2539fff75bc7c7ac10bd7c31fb22f012ff0f
MD5 a9724bfce4fc755132433c150b9a8288
BLAKE2b-256 a616840a6b06744878d701b59439610d6198f9fb554adae5f5346a0b13881b57

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f803be637bdda254efdef214c0fdd4a195bffeea882c5447b90a9df2f5d4009f
MD5 c4a9253955dfd58b49780e1048c51179
BLAKE2b-256 3d5432cf3acf5ee9cf7429536c9c6ed30b093447ef74f06ad22ee6b340d91b1a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ab2b428889f48011441f08183c9cc534943bf44961e83792e1244ec4afb845c4
MD5 89f54dc17c2bcd0a4d650c4f04411c76
BLAKE2b-256 ace9e342e4db4d3e6ab4f27b049a3a074d7ceb9dcc6d38775fbe975a3b6e9e65

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8ddfd7671558d6ddb524c4b91564c90b20f7324a7635fddeb27d3af1b5c0204e
MD5 e34ab4ccb65635c5ee15216bce5a4bbe
BLAKE2b-256 0973be3649be347a7f15bcb94dc6abe1a42d509d9d30ce43683b5e3c153ed650

See more details on using hashes here.

Provenance

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