|
3 | 3 | :toc: |
4 | 4 | :icons: font |
5 | 5 |
|
6 | | -The README makes claims. This file backs them up. |
| 6 | +The README makes claims. This file backs them up with evidence. |
7 | 7 |
|
8 | | -[quote, README] |
| 8 | +== Key Claims From README |
| 9 | + |
| 10 | +[quote, README section "What is Typell?"] |
| 11 | +____ |
| 12 | +Typell is the **type-theoretic verification engine** that powers PanLL's neurosymbolic intelligence. It provides the "best of the best" type system coverage for formally verified database queries. |
| 13 | +____ |
| 14 | + |
| 15 | +*Evidence:* The README (lines 21-29) lists 7 type system features: |
| 16 | +1. **Dependent types** — types that depend on values (Pi, Sigma) |
| 17 | +2. **Linear types** — resources used exactly once (no data leaks, no double-reads) |
| 18 | +3. **Session types** — protocol safety (connections always closed, transactions atomic) |
| 19 | +4. **Quantitative Type Theory** — resource quantity tracking (rate limits, cost analysis) |
| 20 | +5. **Effect systems** — explicit side effect tracking (read/write/memory) |
| 21 | +6. **Modal types** — contextual access control (transaction-scoped data) |
| 22 | +7. **Proof-carrying code** — cryptographic proof certificates attached to queries |
| 23 | + |
| 24 | +The architecture (lines 46-68) shows Typell as the central verification kernel serving PanLL's three panes (Pane-L ← constraints, Pane-N ← reasoning, Pane-W ← validated results) plus secondary consumers (VS Code, CLI, CI/CD). This is verifiable in `src/kernel/` with modules for type checking, proof engine, effect tracking, session protocol management, and language backends (lines 148-157). |
| 25 | + |
| 26 | +*Caveat:* Typell is in "Phase 0: Vision capture and repo scaffolding" (line 115). Language backends (VQL-dt++, GQL-dt++, KQL-dt++) are in design stages; only the kernel architecture exists. |
| 27 | + |
| 28 | +[quote, README section "The LLVM Analogy"] |
9 | 29 | ____ |
10 | | -Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
| 30 | +Typell is to PanLL what LLVM is to Clang — the compiler infrastructure that any frontend can consume. |
11 | 31 | ____ |
12 | 32 |
|
| 33 | +*Evidence:* The directory structure (lines 136-168) supports this. `src/kernel/` is the "middle-end" (type checker, proof engine, effects, session manager). `src/backends/` are the language frontends (VQL-dt++, GQL-dt++, KQL-dt++). `integrations/` are the consumers (PanLL primary, VS Code extension, CLI, CI/CD plugins). This mirrors LLVM's middle-end + backends + frontends architecture. |
| 34 | + |
| 35 | +*Caveat:* Unlike LLVM (production-ready), Typell's backends are in design/port stages, not fully functional. Primary investment is in the kernel (bidirectional type checker, proof engine). |
| 36 | + |
13 | 37 | == Technology Choices |
14 | 38 |
|
15 | 39 | [cols="1,2"] |
16 | 40 | |=== |
17 | 41 | | Technology | Learn More |
18 | 42 |
|
19 | | -| **Rust** | https://www.rust-lang.org |
20 | | -| **Zig** | https://ziglang.org |
21 | | -| **Idris2 ABI** | https://www.idris-lang.org |
| 43 | +| **Rust** | https://www.rust-lang.org (verification kernel, type checker, proof engine) |
| 44 | +| **Idris2 ABI** | https://www.idris-lang.org (formal specs with dependent type proofs) |
| 45 | +| **Zig FFI** | https://ziglang.org (C-compatible ABI bridge) |
| 46 | +| **JSON-RPC** | Protocol for language-agnostic consumer communication |
| 47 | +| **Tauri 2.0+** | PanLL desktop backend (Typell verification service) |
22 | 48 | |=== |
23 | 49 |
|
24 | 50 | == Dogfooded Across The Account |
25 | 51 |
|
26 | | -Uses the hyperpolymath ABI/FFI standard (Idris2 + Zig). Same pattern used across |
27 | | -https://github.com/hyperpolymath/proven[proven], |
28 | | -https://github.com/hyperpolymath/burble[burble], and |
29 | | -https://github.com/hyperpolymath/gossamer[gossamer]. |
| 52 | +Uses the hyperpolymath ABI/FFI standard (Idris2 + Zig). Same pattern across proven, burble, and gossamer. |
| 53 | + |
| 54 | +Typell-specific: |
| 55 | +- `src/abi/` — Idris2 formal specifications for type system soundness |
| 56 | +- `ffi/zig/` — C-compatible FFI for cross-language verification calls |
| 57 | +- `generated/abi/` — Auto-generated C headers from Idris2 ABI |
30 | 58 |
|
31 | | -== File Map |
| 59 | +== File Map: Key Modules |
32 | 60 |
|
33 | 61 | [cols="1,2"] |
34 | 62 | |=== |
35 | 63 | | Path | What's There |
36 | 64 |
|
37 | | -| `src/` | Source code |
38 | | -| `ffi/` | Foreign function interface |
39 | | -| `test(s)/` | Test suite |
| 65 | +| `src/abi/` | Idris2 formal specifications (type definitions with proofs) |
| 66 | +| `src/kernel/checker/` | Bidirectional type checker (Pi, Sigma, linear, session types) |
| 67 | +| `src/kernel/proof/` | Proof engine (generation, verification, caching, certificates) |
| 68 | +| `src/kernel/effects/` | Effect tracker (read/write/memory side effects) |
| 69 | +| `src/kernel/session/` | Session protocol manager (connection safety, transaction atomicity) |
| 70 | +| `src/kernel/protocol/` | JSON-RPC server (consumer communication) |
| 71 | +| `src/backends/vql/` | VQL-dt++ backend (VeriSimDB queries with dependent types) |
| 72 | +| `src/backends/gql/` | GQL-dt++ backend (LithoGlyph graph queries, Lean 4 bridge) |
| 73 | +| `src/backends/kql/` | KQL-dt++ backend (QuandleDB category-theoretic queries) |
| 74 | +| `integrations/panll/` | PanLL primary consumer (pane coordination) |
| 75 | +| `integrations/vscode/` | VS Code extension integration |
| 76 | +| `integrations/cli/` | Command-line interface |
| 77 | +| `integrations/ci/` | CI/CD pipeline plugins |
| 78 | +| `spec/` | Formal specifications (protocol, type-system, proof-system) |
| 79 | +| `docs/design/` | Design documents and vision |
40 | 80 | |=== |
41 | 81 |
|
42 | 82 | == Questions? |
43 | 83 |
|
44 | | -Open an issue or reach out directly — happy to explain anything in more detail. |
| 84 | +Open an issue in the hyperpolymath/typell repository for questions about type system design, proof engine architecture, or integration with PanLL and other consumers. |
0 commit comments