Skip to main content

aspen-tree

aspen-tree analyzes and transforms programs written in any language with a tree-sitter grammar, with transformations written in answer set programming (ASP). It is mostly used for the clingo ASP language itself.

aspen-tree turns the syntax tree of a program into facts, and applies a meta-encoding, an ordinary clingo program over these facts, which describes edits of the program text. Everything not edited, such as layout and comments, stays as it was. For example, renaming the identifier b to c:

$ printf 'a :- b.\nb.\n' | aspen transform - -l clingo \
    -s 'aspen(replace(node(N), "c")) :- type(N, "identifier"), leaf_text(N, "b").'
a :- c.
c.

Installation

To install the project, together with the grammar for clingo programs, run

pip install aspen-tree-5 tree-sitter-clingo

Documentation

The documentation is available at https://docs.potassco.org/aspen-tree/. It can also be built locally with

pip install .[doc]
mkdocs serve

Metadata

Release files for aspen-tree-5 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aspen-tree-5 0.2.0
File Size Uploaded Provenance Actions
aspen_tree_5-0.2.0.tar.gz 169.4 kB With provenance Details for aspen_tree_5-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aspen-tree-5 0.2.0
File Interpreter ABI Platform Actions
aspen_tree_5-0.2.0-py3-none-any.whl Python 3 none any Details for aspen_tree_5-0.2.0-py3-none-any.whl

Total release size: 226.8 kB

Release files / aspen_tree_5-0.2.0.tar.gz

Download URL aspen_tree_5-0.2.0.tar.gz
Size 169.4 kB
Tags Source
SHA-256 checksum
How to use checksums
41c25854f8295ec71901def8c2bf4a3ef2da2d831f6f9485f91e65eefe76afcd
BLAKE2b-256 checksum
How to use checksums
a1e1e2402618199a5305bf508234cc8c79b62e18a526a25b341bd5cba1877421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / aspen_tree_5-0.2.0-py3-none-any.whl

Download URL aspen_tree_5-0.2.0-py3-none-any.whl
Size 57.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82d70955fd7a15310e6ceb4cc370fdebc9df73816b9699fe5032c22fa4bc8a81
BLAKE2b-256 checksum
How to use checksums
5078cbbea7e657c2ad75334dd919738a91df782aede72e003f77d391e3d8911e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for aspen-tree-5 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aspen_tree_5-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page