skijack
A surface language over the $SKI$ combinator calculus that compiles to
closed {S,K,I} terms, with the interpreter of the companion paper as
its conformance target.
The claim this package exists to support: the abstraction is free, and
term equality proves it. The self-interpreter of Davis (2027)---618
atoms of pure {S,K,I}, built by hand---compiles from three lines of
surface source to the same term, atom for atom. So do five more: the
observability pair at 768 and 771, the blocking interpreters at 950 and
1,066, and structural equality on encoded terms at 240.
Everything is compile-time. Quotation happens in the compiler and nowhere else, because no closed term quotes every live term; the language's job is to make that line visible rather than to pretend it isn't there.
- N E Davis (2027, in review) A Self-Interpreter for $SKI$: Authoring Semantics for New Symbols. Journal of Functional Programming. doi:10.5281/zenodo.22867957
- N E Davis (2027a, in review) SKIjack: A Low-Level Native Language for the $SKI$ Calculus. The Art, Science, and Engineering of Programming.
Install
pip install skijack
Requires Python 3.10+ and aviary-kernel, which supplies bracket
abstraction, the term representation and the reducer. This package
reimplements none of them.
Avon, a C runtime, can run the
reductions instead: SKIJACK_REDUCER=avon with AVON naming its binary,
or SKIJACK_REDUCER=check to run both and compare (skijack/avon.py).
Avon's copy mode gives aviary's statuses, counts and terms;
SKIJACK_AVON_STRATEGY=share runs its share mode, each argument reduced
once, with the same normal forms and its own counts.
Use
skijack FILE # a summary
skijack FILE --check # Stage A, then B; exits 1 and lists every problem
skijack FILE --expand # every compiled term, with atom counts
skijack FILE --dictionary # the Tier 1 table: name, atoms, hash
skijack FILE --lift NAME # NAME, with what the table knows named
skijack FILE --render unicode # the same program in the other lexicon
skijack FILE --run NAME [--fuel N] # run a level-1 declaration and decode it
The lexicon is taken from the filename (*.unicode.ski) unless
--lexicon says otherwise. The twenty-two programs of the conformance
corpus ship with the package; eighteen compile, and Stage A refuses the
other four for stated reasons:
>>> import skijack
>>> from skijack import corpus
>>> skijack.compile(corpus.read("interp-whnff")).sizes["whnfF"]
618
From Python:
import skijack
exp = skijack.compile(open("prog.ski").read()) # parse, check, generate, expand
d = skijack.from_expansion(exp) # the Tier 1 table
named = skijack.lift(exp.term("whnfF"), d) # back to named source
out = skijack.run_level1(exp.level1["answer"], 1_000_000)
Everything this package raises for a bad program derives from
skijack.SkijackError, including a refusal by aviary, the host that
abstracts and expands, which reaches the caller as an ExpandError.
Definitions
An author writes an equation f x y = body. The closed Y-tied
term to which it compiles is the supercombinator, the unit of
naming, sharing, jetting and lifting. The group an equation is declared
in is a core. Names resolve in a compile-time table and are gone
before anything runs; there is no environment at run time.
Tests
The suite is not in the wheel. Run it from a checkout of SKIjack:
pip install -e "python[test]"
python3 -m pytest -q python/tests
Roughly a third of the suite compares compiled terms against the
hand-built artifact of the companion paper. Its oracle scripts are
vendored under python/tests/artifact, so the suite runs with no setup;
SKIJACK_ARTIFACT_DIR points it at a live checkout of the artifact
instead.
More
The language is specified in SPEC.md at the repository root; NOTES.md
beside this file is the decision log it was derived from.
NOTES.md records what the suite proves, every open question the
specification left and how it was answered, and any discrepancies found
in the original specification itself.
Metadata
Release files for skijack 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skijack-0.2.5.tar.gz | 269.6 kB | Without provenance | Details for skijack-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skijack-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for skijack-0.2.5-py3-none-any.whl |
Total release size: 471.8 kB
Release files / skijack-0.2.5.tar.gz
| Download URL | skijack-0.2.5.tar.gz |
|---|---|
| Size | 269.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe4074900937a8decf16febef45ef45bcdce940ac19b16b904a7297cc4eb4ccd
|
|
BLAKE2b-256 checksum How to use checksums |
74fd34b86d7affab9e36527e15982744c0f662d1b5b10d71dbb394a43519bbf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / skijack-0.2.5-py3-none-any.whl
| Download URL | skijack-0.2.5-py3-none-any.whl |
|---|---|
| Size | 202.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9eb03d4edaf8bd78596f93ac5043a6e0681bfc2c2d8034dde77f90cba820f3d
|
|
BLAKE2b-256 checksum How to use checksums |
0a08301af4772ec3b59d4547aedd232f84c17517a6abab6d1d1b1895c612f303
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for skijack 0.2.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.