Commit 9ebe867
feat(proofs): witness-requiring attestations (A7, PROOF-NEEDS §P1.1)
Replaces every ceremonial nullary attestation in Proofs.idr with an
evidence-consuming variant. The top-level certificate can no longer
be constructed from thin air — each level's attestation now requires
a matching witness from its level module:
attestL1_InstructionValid :: Schema -- Region.idr
attestL2_RegionBound :: FieldIn name schema -- Region.idr
attestL3_TypeCompat :: WasmTypeCompat a b -- MultiModule.idr
attestL4_NullSafe :: Pointer.Ptr k s l NonNull
attestL5_BoundsProof :: InBounds idx count -- Region.idr
attestL6_ResultType :: AccessResult ty -- TypedAccess.idr
attestL7_AliasFree :: ExclusiveWitness s -- Pointer.idr
attestL8_EffectSafe :: EffectSubsumes d a -- Effects.idr (pre-existing)
attestL9_LifetimeSafe :: Lifetime.Outlives rl sl
attestL10_Linear :: CompletedProtocol tok -- Linear.idr
simpleReadCert, fullCert12, and fullCert15 now take every required
witness as an explicit argument and thread them through. Witnesses
are compile-time-only (erased at runtime), so there is zero runtime
cost — but the certificate cannot be built without real proof
artefacts.
Qualification: `Lifetime` / `Outlives` resolve to Lifetime.idr's
propositional forms; Pointer.Ptr's lifetime parameter takes
Levels.Lifetime, since Pointer.idr imports from Levels.idr. A short
comment in Proofs.idr explains the name clash.
Zero believe_me / assert_total / postulate / sorry; %default total
preserved; panic-attack clean.
PROOF-NEEDS.md §P1.1 marked DONE; LEVEL-STATUS.md Proofs.idr row
updated with the new witness-taking API.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 72e2901 commit 9ebe867
3 files changed
Lines changed: 259 additions & 88 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
237 | 266 | | |
238 | 267 | | |
239 | 268 | | |
| |||
0 commit comments