|
| 1 | +;; SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +(state |
| 3 | + (metadata |
| 4 | + (version "1.0.0") |
| 5 | + (last-updated "2026-03-01") |
| 6 | + (status active)) |
| 7 | + |
| 8 | + (project-context |
| 9 | + (name "typeql-experimental") |
| 10 | + (purpose "Experimental type-theoretic extensions to VQL (VQL-dt++)") |
| 11 | + (completion-percentage 85)) |
| 12 | + |
| 13 | + (current-position |
| 14 | + (phase "initial-implementation-complete") |
| 15 | + (summary "All 37 files implemented across 6 phases. Idris2 kernel (9 modules) |
| 16 | + type-checks clean with --total and zero banned patterns. Zig FFI |
| 17 | + bridge (5 tests) passes. ReScript parser and examples written. |
| 18 | + Six extensions: linear types, session types, effect systems, |
| 19 | + modal types, proof-carrying code, quantitative type theory.")) |
| 20 | + |
| 21 | + (components |
| 22 | + (component "idris2-kernel" |
| 23 | + (status "complete") |
| 24 | + (description "9 Idris2 modules: Core, Linear, Session, Effects, Modal, |
| 25 | + ProofCarrying, Quantitative, Checker, Proofs. All type-check |
| 26 | + with %default total. Zero believe_me/assert_total/assert_smaller.") |
| 27 | + (completion 100)) |
| 28 | + (component "rescript-parser" |
| 29 | + (status "written") |
| 30 | + (description "Extended AST (TQLAst.res) and parser (TQLParser.res) for 6 new |
| 31 | + VQL++ clauses. Follows VeriSimDB combinator patterns. Not yet |
| 32 | + build-tested (requires rescript-legacy toolchain).") |
| 33 | + (completion 70)) |
| 34 | + (component "grammar-spec" |
| 35 | + (status "complete") |
| 36 | + (description "Delta EBNF extending VQL v3.0 with 6 new clause types. |
| 37 | + Documented in docs/vql-dtpp-grammar.ebnf.") |
| 38 | + (completion 100)) |
| 39 | + (component "zig-ffi" |
| 40 | + (status "complete") |
| 41 | + (description "C-compatible FFI bridge skeleton. build.zig targets Zig 0.15.2. |
| 42 | + 5 tests pass: empty annotations, consume_after=0, usage<consume, |
| 43 | + full valid annotations, version string.") |
| 44 | + (completion 100)) |
| 45 | + (component "examples" |
| 46 | + (status "complete") |
| 47 | + (description "7 annotated .vqlpp example files covering all 6 extensions |
| 48 | + individually plus a combined maximal query.") |
| 49 | + (completion 100)) |
| 50 | + (component "idris2-tests" |
| 51 | + (status "complete") |
| 52 | + (description "3 compile-time test modules: TestLinear.idr, TestSession.idr, |
| 53 | + TestQuantitative.idr. Validated by Idris2 type-checker.") |
| 54 | + (completion 100)) |
| 55 | + (component "documentation" |
| 56 | + (status "complete") |
| 57 | + (description "README.adoc, DESIGN doc, type-system-spec.adoc, examples.adoc, |
| 58 | + grammar EBNF, AI manifest, machine-readable SCM files.") |
| 59 | + (completion 100))) |
| 60 | + |
| 61 | + (route-to-mvp |
| 62 | + (milestone "type-kernel-complete" |
| 63 | + (description "All 9 Idris2 modules type-check with --total, zero believe_me") |
| 64 | + (completion 100)) |
| 65 | + (milestone "zig-ffi-tested" |
| 66 | + (description "Zig FFI bridge compiles and all 5 tests pass on Zig 0.15.2") |
| 67 | + (completion 100)) |
| 68 | + (milestone "parser-written" |
| 69 | + (description "ReScript parser written with combinator pattern from VeriSimDB") |
| 70 | + (completion 70)) |
| 71 | + (milestone "parser-build-tested" |
| 72 | + (description "ReScript parser compiles and accepts all 7 example .vqlpp files") |
| 73 | + (completion 0)) |
| 74 | + (milestone "integration" |
| 75 | + (description "Idris2 proofs validated against ReScript-parsed ASTs") |
| 76 | + (completion 0))) |
| 77 | + |
| 78 | + (verified-results |
| 79 | + (result "idris2-typecheck" |
| 80 | + (command "idris2 --typecheck typeql-experimental.ipkg") |
| 81 | + (outcome "9/9 modules compile clean") |
| 82 | + (date "2026-03-01")) |
| 83 | + (result "zig-tests" |
| 84 | + (command "cd ffi/zig && zig build test") |
| 85 | + (outcome "5/5 tests pass") |
| 86 | + (date "2026-03-01")) |
| 87 | + (result "banned-patterns" |
| 88 | + (command "grep -rn 'believe_me|assert_total|assert_smaller' src/abi/") |
| 89 | + (outcome "zero matches (comment-only reference in Proofs.idr)") |
| 90 | + (date "2026-03-01"))) |
| 91 | + |
| 92 | + (implementation-notes |
| 93 | + (note "idris2-version" "Idris2 0.8.0 — ipkg uses --typecheck not --check") |
| 94 | + (note "zig-version" "Zig 0.15.2 — addModule/addTest API, no addStaticLibrary") |
| 95 | + (note "effects-subsumption" "Subsumes declared actual = Subset actual declared (flipped)") |
| 96 | + (note "erased-implicit" "Cannot pattern-match on quantity-0 implicits (removed hasUses)") |
| 97 | + (note "andCheck-nesting" "Non-associative function requires explicit nested calls")) |
| 98 | + |
| 99 | + (blockers-and-issues |
| 100 | + (blocker "rescript-build" |
| 101 | + (description "ReScript parser not yet build-tested — needs rescript-legacy or |
| 102 | + equivalent toolchain. Written code follows VeriSimDB patterns."))) |
| 103 | + |
| 104 | + (critical-next-actions |
| 105 | + (action "Build-test ReScript parser with rescript-legacy toolchain") |
| 106 | + (action "Test all 7 example .vqlpp files parse correctly") |
| 107 | + (action "Wire Idris2 proof results to ReScript-parsed ASTs (integration phase)"))) |
0 commit comments