loopty
loopy, with types.
loopty is loop + ty, for types: a typed polyhedral layer over
loopy. Kernels are decorated Python
functions whose bodies run natively under plain python as the reference
implementation and are traced under loopty to build a typed term. Types are
isl objects: a statement's type is its iteration domain (an isl set) and its
read, write, and accumulation footprints (isl maps); dependences are derived by
isl flow analysis, not declared; index types include ragged, dependent shapes
(CSR-style data as dependent sums) so disjointness and in-bounds facts come from
the shape rather than from offset arithmetic; loop transformations are checked
as casts along bijections, with a concrete witness on failure; loopy generates
the code (OpenCL, CUDA, C). loopty is the first plugin for its sister project
lanky (a Python-hosted proof language over
Lean 4): loopty's typing rules emit facts into lanky's ledger, its isl oracle
decides the Presburger ones, and residual obligations become lanky theorems.
Status
Work in progress. This is a placeholder release to reserve the name; nothing works yet. loopty is designed as a plugin for lanky, the host it plugs into, and will land as the interfaces on both sides settle.
Name
loopty is loop + ty, for types: loops, typed. It follows loopy, sumpy, and
pytato in the naming tradition of the loopy ecosystem.
Planned architecture
- Kernel bodies are traced: the decorated function runs natively under plain
python, and the same body is traced underlooptyto build a typed term. - Index types are isl sets, with dependent sums for ragged data, so CSR-style shapes carry their own disjointness and in-bounds facts.
- Each statement carries read, write, and accumulation footprints; dependences are derived by isl flow analysis rather than declared.
- Loop transformations are checked as casts along bijections, with a concrete witness produced when a cast fails.
- Schedules and tags are maps into a target's execution and memory types.
- loopy is the code generator (OpenCL, CUDA, C).
- The plain
pythonrun is the reference implementation and the differential-test oracle. - With lanky, loopty registers a theory, an isl oracle, an executor, and a
runverb.
Install
uv add loopty
pip install loopty
Nothing works yet: installing loopty today gets you a placeholder that prints its own status.
AI disclosure
This project is developed with substantial assistance from AI coding agents (Anthropic's Claude, via Claude Code). Design, direction, and review are by Xiaoyu Wei. Generated text and code are reviewed before release, but readers should assume AI involvement throughout.
License
MIT. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loopty-0.0.1.tar.gz.
File metadata
- Download URL: loopty-0.0.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
436739cf37bd918de3c4a7e15c334d1d94512bd86e0e2a2a9951b1c21f94c704
|
|
| MD5 |
54eed4b11629150c3c0d8152bb7c5998
|
|
| BLAKE2b-256 |
5f07e00323f6e701ca96aa198b4a0fbca38054e08eeffd4d42c7be2f80bbf68c
|
File details
Details for the file loopty-0.0.1-py3-none-any.whl.
File metadata
- Download URL: loopty-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
792497b35405bdaa77378f107f145debc12b22dde5a3eb4e9952ae961a0f3afa
|
|
| MD5 |
77dceea24e90d24606e080b54f3a062e
|
|
| BLAKE2b-256 |
84ef3aebe6855b876a05e2b175b0599d4a337b832b38c881d99ef403e49a76ee
|