Skip to content

Commit 5f75189

Browse files
hyperpolymathclaude
andcommitted
spec: update grammar header to 12-level framework
Header comment now lists all 12 levels including Level 11 (tropical cost-tracking) and Level 12 (epistemic safety). Grammar body productions for L11-12 surface syntax are the next step. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a263516 commit 5f75189

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

spec/grammar.ebnf

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
* Version: 0.1.0
77
* Date: 2026-03-21
88
*
9-
* Applies TypeLL's 10 levels of type safety to WebAssembly linear memory,
10-
* treating memory regions as typed schemas and memory operations as typed
11-
* projections — analogous to how TypedQL treats database tables and queries.
9+
* Applies TypeLL's 12-level progressive type safety framework to WebAssembly
10+
* linear memory, treating memory regions as typed schemas and memory operations
11+
* as typed projections — analogous to how TypedQL treats database tables and
12+
* queries.
1213
*
1314
* The key insight: WASM linear memory is an untyped byte store that programs
1415
* "query" with load/store instructions at byte offsets. This grammar makes
@@ -17,8 +18,10 @@
1718
* - Typing all memory access through schema projections
1819
* - Proving safety properties at compile time via dependent types
1920
* - Enabling multi-module shared memory with cross-module type agreement
21+
* - Bounding access pattern costs via tropical semiring annotations
22+
* - Preventing stale reads via epistemic freshness tracking
2023
*
21-
* The 10 levels adapted for WASM memory:
24+
* The 12 levels adapted for WASM memory:
2225
* Level 1: Instruction validity (well-formed access expressions)
2326
* Level 2: Region-binding (every access resolves to a declared region.field)
2427
* Level 3: Type-compatible access (load type matches field declaration)
@@ -29,6 +32,8 @@
2932
* Level 8: Effect-tracking (Read / Write / Alloc / Free distinguished)
3033
* Level 9: Lifetime safety (no use-after-free, no dangling pointers)
3134
* Level 10: Linearity (resources used exactly once, memory freed exactly once)
35+
* Level 11: Tropical cost-tracking (access pattern costs bounded by semiring)
36+
* Level 12: Epistemic safety (reads require fresh knowledge of shared state)
3237
*)
3338
3439
(* ============================================================================

0 commit comments

Comments
 (0)