Repository navigation
Description
Owner, 2026-10-11 (translated): research how science solves what t27 does not express yet -- I/O, network, threads, async, unsafe, FFI, GPU, Python dynamics -- and do it.
The pattern: a pure core, effects at the edge
t27's core stays pure and deterministic. That is what makes it testable, sealable and receipt-checkable. Everything outside it is expressed as a declared interface (capability/effect) with three parts:
- a contract in .t27;
- a simulated handler written in t27, seeded and deterministic, used by tests and by the t27o oracle;
- a real handler, supplied by each backend as thin generated glue to the OS or runtime.
What t27 cannot express today then becomes a small declared edge instead of hand-written code. The remainder that no rule covers goes to bees/LLM, opt-in and paid, or stays as foreign glue behind a contract.
Research mapped to t27
| Gap | Research | t27 approach | Issue |
|---|---|---|---|
| I/O, network, time, randomness | WASI 0.2 / WIT capabilities; OCaml 5 Eio; Koka effect types | capability interfaces passed as arguments | #9001 |
| Testing code with effects | Deterministic simulation testing (FoundationDB, TigerBeetle VOPR) | seeded simulated handlers; record/replay oracle in t27o | #9002 |
| Threads, async | Async via algebraic effects (MSR; Ahman and Pretnar, POPL 2021); composable schedulers (ICFP 2022); the repo's actors rule | actors + structured concurrency; simulated scheduler | #9003 |
| FFI | WebAssembly Component Model (WIT, canonical ABI) | declared interface types, bindings per backend on top of #8983 | #9004 |
| GPU | Halide, Futhark, Triton | pure array kernels + a separate schedule | #9005 |
| Python dynamics | RightTyper, MonkeyType, Codon | static subset, trace-based types, unions, refusals by name | #9006 |
| unsafe | RustBelt, Verus/Prusti/Kani, RustAssure | stays behind a declared contract, checked differentially | #9007 |
Order
- t27: capability interfaces -- I/O, network, time and randomness as declared effects at the edge #9001 capabilities.
- t27: deterministic simulation handlers and a record/replay oracle for code with effects #9002 simulation + record/replay. Together with t27: capability interfaces -- I/O, network, time and randomness as declared effects at the edge #9001, this unlocks t27o's oracle for code with I/O, the largest refusal class.
- t27: threads and async map to actors and structured concurrency (with a simulated scheduler) #9003 actors/async.
- t27: FFI through declared interface types (WIT-like records, variants, resources), bindings per backend #9004 FFI.
- t27o: Python dynamics -- a static subset with trace-based type inference (RightTyper, MonkeyType, Codon) #9006 Python.
- t27: unsafe code behind declared contracts at the boundary (research spike) #9007 unsafe spike.
- t27: data-parallel kernels for GPU as pure array programs plus a separate schedule (research spike) #9005 GPU spike.
Each step is a .t27 spec with tests, generated and mounted, with net <= 0 hand-written lines (#8236) and DRY (#8963). Related: see #8998 (t27o as a service), #9000 (dogfooding), #8951 (t27b builds itself).
Activity
effects: capabilities as handles; fs and clock with seeded simulated …