|
6 | 6 | * Version: 0.1.0 |
7 | 7 | * Date: 2026-03-21 |
8 | 8 | * |
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. |
12 | 13 | * |
13 | 14 | * The key insight: WASM linear memory is an untyped byte store that programs |
14 | 15 | * "query" with load/store instructions at byte offsets. This grammar makes |
|
17 | 18 | * - Typing all memory access through schema projections |
18 | 19 | * - Proving safety properties at compile time via dependent types |
19 | 20 | * - 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 |
20 | 23 | * |
21 | | - * The 10 levels adapted for WASM memory: |
| 24 | + * The 12 levels adapted for WASM memory: |
22 | 25 | * Level 1: Instruction validity (well-formed access expressions) |
23 | 26 | * Level 2: Region-binding (every access resolves to a declared region.field) |
24 | 27 | * Level 3: Type-compatible access (load type matches field declaration) |
|
29 | 32 | * Level 8: Effect-tracking (Read / Write / Alloc / Free distinguished) |
30 | 33 | * Level 9: Lifetime safety (no use-after-free, no dangling pointers) |
31 | 34 | * 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) |
32 | 37 | *) |
33 | 38 |
|
34 | 39 | (* ============================================================================ |
|
0 commit comments