Prototype of the §6.7 substrate route: coeffects as Wasm (component) imports #93
inso1337
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Not a bug report — a pointer to an experiment the paper suggests, shared here because the
paperrepo has issues and discussions disabled. Feel free to close after reading (or convert to a discussion if you enable them).§6.7 of the paper sketches the substrate route: an embedder that "bounds a component to the dependencies it declares … as a WebAssembly module receives its imports from its embedder at instantiation." I built a small working prototype of exactly that:
https://github.com/inso1337/cordis-wasm — a Python/wasmtime host runtime where:
activate_step()iterator, a Wasm call can't be preempted, so only the landing alternative of L-Divert exists; divert at iteration boundaries gives partial rollback;FileExistsErrorrouted as L-Raise);Each demo asserts specific theorems/definitions from the paper (Thm 63 ordering, LIFO recovery, staged provisions, etc.), so it doubles as a small executable check of the calculus against a substrate the paper only sketches. If any of it is useful as a reference for §6.7 or future work, it's MIT.
🤖 Generated with Claude Code
All reactions