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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

pypddl-1.0.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: pypddl-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 201a83cac62c0617ba174bf13d3ea71c6ff66e67521e9e168782e03ae4d2f65d
MD5 c00657798f00366bfac9f13852d61c1b
BLAKE2b-256 e2443bafe527d3285ac5bbfabb934b78604d11f0e22cc7791ea3285bcb9574d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d25c347ed2f6a42cdac1d1844931e9d18a1d25e5dc78f25f0ef17398d76e2a7b
MD5 05ba4230b765c5d2a2234de2549c98f0
BLAKE2b-256 a027e78fb7a06ff378166a3b1697669e1c9504c7dea78858630a935521d9b271

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c8bd0824fce7d4845167e50f2e87ba60161a94a225429d80aeb856b74bb493c
MD5 0c6a55dfa5cdf97e130743f25beef711
BLAKE2b-256 57f63a3c9d55558eaf048852e4237ae34527c2246c84867aee687a17e5626a30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c52ee46b2497b1f461376b94e0eda195656100ac989f3cc2916af95d4300a911
MD5 cd6853be6cda8bb837a8020de549cf5c
BLAKE2b-256 45c3fbbf495890ff6971526e555b873d4d25877425a82ff19b1808e05e2ca0ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 700a76503cc3d03507f8e749ed3499dd697c6f32950f05f3467a764afd19e01e
MD5 d041b88b174e70a2d72ec9b56efd11ed
BLAKE2b-256 3809924a6f8e1dada280897144abf5c74180fd06ef4166d8ea5366bed5758ce7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 809d130a2de736f2ee1c25321abd973647512d2de1b2e2369ebd562e9685b1de
MD5 a1818b992cdf6cb38aadf5e9f57fa09c
BLAKE2b-256 92eb720713cbed8169d433dbf3d1ecac9260c7028b09b6f1d8e6887637cb3729

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24b6e164957bb740ce53da505b969572449d28e6cb4fedc4c17ab61e4a9525d6
MD5 d6b4d33795c303651b59c3f81ee077de
BLAKE2b-256 d97e4a46e250ae17877e92fec0e05184e0f1fcf3203a8793cb039c746c411743

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7b7b6967a89fd10af75aa4e8de2c9ffa2f6125ba3f33fbb9e41f830dc40d973c
MD5 91ee2897b2f3b5c6597e458ba4baba14
BLAKE2b-256 4a17812c59537b23ec56fa5d044c4de63a2e56511f631029f6b9bbce7ca8881d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a571bed5af7ea40b7d132049a73848f45b84ee00774a3bb03f67aa96cb0b9023
MD5 9d5dddce762b86c243e59cd68f501b60
BLAKE2b-256 469a1a5306e519e0d9c81bec1746b2e370a5155d09e9c4d23b988480c5c8bc04

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2726fbe5f405b0b3a04f34816fb2aa13bdc2d1207b9349177c53ed0e57a27704
MD5 c24bab972cfa07d72e79dc8e4f193e5c
BLAKE2b-256 c1a95f35df6c170c436439806e817ea302e3ef4e881df0a897c444f9f64415cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pypddl-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e6a20a28788fa5bce2515c2a156ef46db6ae06df8cf5ff824cd3a05c8e24ea0
MD5 53320fac729c63e4012caa9ba31c9a80
BLAKE2b-256 b483e01225c2c6cb72d205290dd44cb1ed66b0fe64c1955baf270e1c499efeb1

See more details on using hashes here.

Provenance

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