Skip to content

Commit 4597974

Browse files
hyperpolymathclaude
andcommitted
Remove template-only ABI files that falsely implied formal verification
Template Idris2 ABI files (Types.idr, Layout.idr, Foreign.idr) contained only RSR template scaffolding with unresolved placeholders and no domain-specific proofs. Removed to prevent false impression of formal verification coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3ac48db commit 4597974

5 files changed

Lines changed: 104 additions & 622 deletions

File tree

PROOF-NEEDS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# PROOF-NEEDS.md
2+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
3+
4+
## Current State
5+
6+
- **LOC**: ~25,000
7+
- **Languages**: ReScript, Idris2, Zig
8+
- **Existing ABI proofs**: Extensive — 11 Idris2 files in `src/abi/TypedWasm/ABI/` covering Effects, Epistemic, Levels, Lifetime, Linear, MultiModule, Pointer, Proofs, Region, Tropical, TypedAccess
9+
- **Dangerous patterns**: None found (comment in Epistemic.idr confirms "no believe_me")
10+
11+
## What Needs Proving
12+
13+
### ReScript Parser Correctness
14+
- `lib/ocaml/Parser.res`, `Lexer.res`, `Ast.res` — WASM text format parser
15+
- Prove: parser produces well-formed ASTs that correspond to valid WASM modules
16+
- Prove: round-trip property (parse . print = id) for the AST
17+
18+
### Multi-Module Safety (src/abi/TypedWasm/ABI/MultiModule.idr)
19+
- Cross-module memory access is the key innovation
20+
- Ensure the existing proofs cover all inter-module pointer dereference cases
21+
- Prove: no module can access memory outside its declared region
22+
23+
### Lifetime / Region Interaction
24+
- `Lifetime.idr` + `Region.idr` — prove that lifetime-scoped regions never outlive their allocator
25+
- This is the highest-value proof target for WASM memory safety
26+
27+
### Tropical Type Semantics (Tropical.idr)
28+
- Tropical semiring operations on types — ensure semiring laws hold
29+
- This may already be partially proven; audit for completeness
30+
31+
### Linear Type Consumption (Linear.idr)
32+
- Prove: every linearly-typed value is consumed exactly once
33+
- This is foundational for the memory safety guarantees
34+
35+
## Recommended Prover
36+
37+
- **Idris2** (already in use with strong proof coverage — deepen and complete)
38+
39+
## Priority
40+
41+
**MEDIUM** — Proof suite is already the most mature in the ecosystem. Focus on completing coverage gaps rather than starting from scratch. The multi-module and lifetime proofs are the highest-value targets.
42+
43+
## Template ABI Cleanup (2026-03-29)
44+
45+
Template ABI removed -- was creating false impression of formal verification.
46+
The removed files (Types.idr, Layout.idr, Foreign.idr) contained only RSR template
47+
scaffolding with unresolved {{PROJECT}}/{{AUTHOR}} placeholders and no domain-specific proofs.

TEST-NEEDS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# TEST-NEEDS: typed-wasm
2+
3+
## Current State
4+
5+
| Category | Count | Details |
6+
|----------|-------|---------|
7+
| **Source modules** | 21 | 11 Idris2 ABI (Region, TypedAccess, Levels, Pointer, Effects, Lifetime, Linear, MultiModule, Proofs, Tropical, Epistemic), 3 ReScript parser (Ast, Parser, Lexer), 3 Idris2 interface ABI, 2 Zig FFI + cache |
8+
| **Unit tests** | 1 file | ParserTests.res (~82 assertions) |
9+
| **Integration tests** | 0 | None |
10+
| **E2E tests** | 1 | e2e-smoke.mjs (~43 assertions) |
11+
| **Benchmarks** | 0 | None |
12+
| **ECHIDNA harness** | 1 | echidna-harness.mjs (7 assertions) |
13+
14+
## What's Missing
15+
16+
### P2P Tests
17+
- [ ] No tests for Idris2 ABI type checking with Zig FFI
18+
- [ ] No tests for ReScript parser feeding into Idris2 type checker
19+
20+
### E2E Tests
21+
- [ ] e2e-smoke exists but only 43 assertions for a type system with 10 safety levels
22+
- [ ] No WASM module compilation and execution test
23+
- [ ] No multi-module linking test (MultiModule.idr untested)
24+
25+
### Aspect Tests
26+
- [ ] **Security**: No memory safety violation detection tests (this IS the product's purpose)
27+
- [ ] **Performance**: No benchmarks for type checking overhead vs raw WASM
28+
- [ ] **Concurrency**: No concurrent WASM module compilation tests
29+
- [ ] **Error handling**: No tests for invalid type annotations, malformed WASM
30+
31+
### Build & Execution
32+
- [ ] 11 Idris2 modules with 0 Idris2-level tests -- are proofs checked?
33+
- [ ] Zig FFI integration_test.zig likely a template placeholder
34+
35+
### Benchmarks Needed (CRITICAL)
36+
- [ ] Type checking overhead per WASM instruction
37+
- [ ] Memory region tracking performance
38+
- [ ] Lifetime analysis scaling with module size
39+
- [ ] Comparison: typed-wasm overhead vs raw WASM execution
40+
41+
### Self-Tests
42+
- [ ] No type system self-consistency check
43+
44+
## FLAGGED ISSUES
45+
- **Type safety system with no safety-level-specific tests** -- 10 levels claimed, 0 level-specific test suites
46+
- **11 Idris2 proof modules with 0 proof verification tests** -- "proven" is unproven
47+
- **Tropical.idr and Epistemic.idr (novel type features) have 0 tests** -- research features untested
48+
- **ECHIDNA harness is 7 assertions** -- token gesture, not real verification
49+
- **arXiv potential claimed** -- paper-worthy claims need paper-worthy evidence
50+
51+
## Priority: P0 (CRITICAL)
52+
53+
## FAKE-FUZZ ALERT
54+
55+
- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing
56+
- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file
57+
- Priority: P2 — creates false impression of fuzz coverage

src/interface/abi/Foreign.idr

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)