|
1 | 1 | // SPDX-License-Identifier: PMPL-1.0-or-later |
2 | | -= YOUR Template Repo Roadmap |
| 2 | += TypeLL Roadmap |
| 3 | +:toc: |
| 4 | +:toclevels: 3 |
| 5 | +:author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
3 | 6 |
|
4 | | -== Current Status |
| 7 | +== Overview |
5 | 8 |
|
6 | | -Initial development phase. |
| 9 | +TypeLL is the unified type system verification kernel for the hyperpolymath ecosystem. It is to PanLL what LLVM is to Clang: the formal verification substrate that multiple language frontends compile _types_ into. TypeLL provides a 10-level type safety hierarchy used by VQL-UT, 007, Kategoria, PanLL, and the nextgen-languages suite. |
| 10 | + |
| 11 | +== Current State (2026-03-29) |
| 12 | + |
| 13 | +=== Architecture |
| 14 | + |
| 15 | +``` |
| 16 | +Language Frontends (14 bridges) |
| 17 | + | |
| 18 | + v |
| 19 | +typell-core (unified kernel) |
| 20 | + types.rs — Unified type representation |
| 21 | + unify.rs — Robinson unification + occurs check |
| 22 | + infer.rs — Bidirectional type inference |
| 23 | + check.rs — Type checking coordinator |
| 24 | + linear.rs — Linear/affine usage tracking (QTT) |
| 25 | + effects.rs — Algebraic effect system |
| 26 | + qtt.rs — QTT semiring operations |
| 27 | + dimensional.rs — Dimensional analysis (SI units) |
| 28 | + session.rs — Session type protocols |
| 29 | + proof.rs — Proof obligation generation |
| 30 | + error.rs — Diagnostic types |
| 31 | + | |
| 32 | + v |
| 33 | +typell-server (HTTP/JSON-RPC on port 7800) |
| 34 | +``` |
| 35 | + |
| 36 | +=== Rust Workspace (14 crates) |
| 37 | + |
| 38 | +[cols="1,2"] |
| 39 | +|=== |
| 40 | +| Crate | Purpose |
| 41 | + |
| 42 | +| `typell-core` |
| 43 | +| Unified type kernel (11 modules: types, unify, infer, check, linear, effects, qtt, dimensional, session, proof, error) |
| 44 | + |
| 45 | +| `typell-server` |
| 46 | +| HTTP/JSON-RPC server (port 7800) with handler dispatch |
| 47 | + |
| 48 | +| `typell-vql` |
| 49 | +| VQL-UT bridge — maps 10-level type safety into TypeLL (4 modules: lib, bridge, levels, rules) |
| 50 | + |
| 51 | +| `typell-eclexia` |
| 52 | +| Eclexia language bridge (resource types, dimensional analysis) |
| 53 | + |
| 54 | +| `typell-affinescript` |
| 55 | +| AffineScript language bridge |
| 56 | + |
| 57 | +| `typell-ephapax` |
| 58 | +| Ephapax language bridge (linear types) |
| 59 | + |
| 60 | +| `typell-wokelang` |
| 61 | +| Wokelang language bridge |
| 62 | + |
| 63 | +| `typell-betlang` |
| 64 | +| Betlang language bridge |
| 65 | + |
| 66 | +| `typell-mylang` |
| 67 | +| My-Lang language bridge |
| 68 | + |
| 69 | +| `typell-oblibeny` |
| 70 | +| Oblibeny language bridge |
| 71 | + |
| 72 | +| `typell-tangle` |
| 73 | +| Tangle language bridge |
| 74 | + |
| 75 | +| `typell-jtv` |
| 76 | +| JTV language bridge |
| 77 | + |
| 78 | +| `typell-errorlang` |
| 79 | +| Errorlang language bridge |
| 80 | + |
| 81 | +| `typell-phronesis` |
| 82 | +| Phronesis language bridge |
| 83 | +|=== |
| 84 | + |
| 85 | +=== 10-Level Type Safety Hierarchy |
| 86 | + |
| 87 | +[cols="1,2,2"] |
| 88 | +|=== |
| 89 | +| Level | Name | TypeLL Concept |
| 90 | + |
| 91 | +| L1 | Parse-time safety | Well-formed AST |
| 92 | +| L2 | Schema-binding safety | Named type resolution |
| 93 | +| L3 | Type-compatible operations | Unification + operator checking |
| 94 | +| L4 | Null-safety | Option types, totality checking |
| 95 | +| L5 | Injection-proof safety | Refinement predicates |
| 96 | +| L6 | Result-type safety | Return type inference |
| 97 | +| L7 | Cardinality safety | Bounded quantifiers |
| 98 | +| L8 | Effect-tracking safety | Algebraic effects |
| 99 | +| L9 | Temporal safety | Session types, state machines |
| 100 | +| L10 | Linearity safety | QTT bounded usage, linear types |
| 101 | +|=== |
| 102 | + |
| 103 | +=== ABI/FFI Layer |
| 104 | + |
| 105 | +* **Idris2 ABI:** `src/abi/Types.idr`, `Layout.idr`, `Foreign.idr` — dependent type proofs for interface correctness |
| 106 | +* **Zig FFI:** `ffi/zig/src/main.zig` — C-compatible implementation with integration tests |
| 107 | + |
| 108 | +=== Consumers |
| 109 | + |
| 110 | +* **VQL-UT** — Type-safe query language (supersedes VQL-DT); levels 7-10 map VQL-DT legacy extensions |
| 111 | +* **007** — Agent meta-language type system (tropical types, Five Facets) |
| 112 | +* **Kategoria** — Category theory verification; Route alpha achieved L9 (session types via Brady indexed monad) |
| 113 | +* **PanLL** — Cross-panel type intelligence (TypeLLService + TypeLLEngine in src/core/) |
| 114 | +* **typed-wasm** — TypeLL 10-level type safety applied to WASM memory, multi-module |
| 115 | +* **nextgen-languages** — 14 language frontends via bridge crates |
7 | 116 |
|
8 | 117 | == Milestones |
9 | 118 |
|
10 | | -=== v0.1.0 - Foundation |
11 | | -* [ ] Core functionality |
12 | | -* [ ] Basic documentation |
13 | | -* [ ] CI/CD pipeline |
| 119 | +=== v0.1.0 — Core Kernel (COMPLETE) |
| 120 | + |
| 121 | +* [x] Unified type representation (HM polymorphism + dependent + linear + effects + sessions + dimensions + refinements) |
| 122 | +* [x] Robinson unification with occurs check |
| 123 | +* [x] Bidirectional type inference (synthesis + checking modes) |
| 124 | +* [x] QTT-based linearity tracking (Zero, One, Omega, Bounded(n)) |
| 125 | +* [x] Algebraic effect system |
| 126 | +* [x] Dimensional analysis (SI-based, from Eclexia) |
| 127 | +* [x] Session type protocol duality checking |
| 128 | +* [x] Proof obligation generation for dependent types |
| 129 | +* [x] Error diagnostics |
| 130 | +* [x] `#![forbid(unsafe_code)]` across all crates |
| 131 | + |
| 132 | +=== v0.2.0 — Language Bridges (COMPLETE) |
| 133 | + |
| 134 | +* [x] 14 language bridge crates (eclexia, affinescript, ephapax, wokelang, betlang, mylang, oblibeny, tangle, jtv, errorlang, phronesis, vql) |
| 135 | +* [x] Each bridge: lib.rs + bridge.rs + rules.rs (language-specific type lowering) |
| 136 | +* [x] VQL-UT bridge maps all 10 levels including VQL-DT legacy (linear, session, effects, modal, proof-carrying, QTT) |
| 137 | + |
| 138 | +=== v0.3.0 — Server & Integration (COMPLETE) |
| 139 | + |
| 140 | +* [x] typell-server HTTP/JSON-RPC on port 7800 |
| 141 | +* [x] Handler dispatch for type checking requests |
| 142 | +* [x] Wire-compatible serialization with PanLL (TypeLLModel.res) |
| 143 | +* [x] PanLL TypeLLService integration (cross-panel type intelligence) |
| 144 | + |
| 145 | +=== v0.4.0 — ABI/FFI Layer (COMPLETE) |
| 146 | + |
| 147 | +* [x] Idris2 ABI definitions (Types.idr, Layout.idr, Foreign.idr) |
| 148 | +* [x] Zig FFI implementation (main.zig) |
| 149 | +* [x] Integration tests (ffi/zig/test/integration_test.zig) |
| 150 | +* [x] ReScript example (examples/SafeDOMExample.res) |
| 151 | + |
| 152 | +=== v0.5.0 — Comprehensive Testing (IN PROGRESS) |
| 153 | + |
| 154 | +* [x] Core comprehensive tests (crates/typell-core/tests/core_comprehensive_tests.rs) |
| 155 | +* [x] Integration tests (tests/integration_test.rs) |
| 156 | +* [ ] Cross-bridge type checking tests (verify same type in 2+ languages unifies) |
| 157 | +* [ ] Performance benchmarks (large type graphs, deep unification) |
| 158 | +* [ ] Fuzz testing for unification and inference |
| 159 | + |
| 160 | +=== v0.6.0 — VQL-UT Deep Integration (PLANNED) |
| 161 | + |
| 162 | +* [ ] VQL-UT query type annotations (level metadata in query results) |
| 163 | +* [ ] Type-safe query composition (compose queries with verified type compatibility) |
| 164 | +* [ ] Query result type inference (infer return types from schema + query) |
| 165 | +* [ ] Level escalation tracking (which operations require higher levels) |
| 166 | + |
| 167 | +=== v0.7.0 — 007 Integration (PLANNED) |
| 168 | + |
| 169 | +* [ ] 007 agent type checking (tropical types, Five Facets) |
| 170 | +* [ ] Session type verification for agent choreographies |
| 171 | +* [ ] Effect tracking for agent side effects |
| 172 | +* [ ] Linear resource tracking for agent capabilities |
| 173 | + |
| 174 | +=== v0.8.0 — Production Hardening (PLANNED) |
| 175 | + |
| 176 | +* [ ] Sub-millisecond type checking for common cases |
| 177 | +* [ ] Incremental type checking (cache + invalidation) |
| 178 | +* [ ] LSP protocol support (IDE integration) |
| 179 | +* [ ] SARIF output for CI/CD integration |
| 180 | +* [ ] Documentation: architecture guide, language bridge development guide |
| 181 | + |
| 182 | +=== v1.0.0 — Stable Release (PLANNED) |
| 183 | + |
| 184 | +* [ ] All 14 language bridges fully tested |
| 185 | +* [ ] VQL-UT and 007 integrations production-ready |
| 186 | +* [ ] API stability guarantee (no breaking changes to core types) |
| 187 | +* [ ] Performance validated at scale |
| 188 | +* [ ] arXiv paper on 10-level type safety hierarchy |
| 189 | +* [ ] L10 cubical/HoTT support (requires cubical prover — currently a wall in pure Idris2) |
| 190 | + |
| 191 | +== Post-v1.0 |
| 192 | + |
| 193 | +* **typed-wasm** — TypeLL 10-level type safety applied to WASM memory, multi-module breakthrough |
| 194 | +* **Additional language bridges** — Ada, Haskell, Rust, Gleam frontends |
| 195 | +* **Distributed type checking** — Federated TypeLL instances sharing type context |
| 196 | +* **Proof search** — Automated theorem proving for type obligations (ECHIDNA integration) |
| 197 | +* **Academic publication** — Graduated type safety as research contribution |
| 198 | + |
| 199 | +== License & Governance |
| 200 | + |
| 201 | +**License:** PMPL-1.0-or-later (Palimpsest License) |
| 202 | + |
| 203 | +**Author:** Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
14 | 204 |
|
15 | | -=== v1.0.0 - Stable Release |
16 | | -* [ ] Full feature set |
17 | | -* [ ] Comprehensive tests |
18 | | -* [ ] Production ready |
| 205 | +**Repository:** https://github.com/hyperpolymath/typell |
19 | 206 |
|
20 | | -== Future Directions |
| 207 | +--- |
21 | 208 |
|
22 | | -_To be determined based on community feedback._ |
| 209 | +_Last Updated: 2026-03-29_ |
0 commit comments