eBPF-based security platform
proofs: build every Lean 4 module, imported or not
Daniel Borkmannbb7435d912f0
diff --git a/.agents/skills/proofs/SKILL.md b/.agents/skills/proofs/SKILL.mdindex 5a579caf..6c102128 100644--- a/.agents/skills/proofs/SKILL.md+++ b/.agents/skills/proofs/SKILL.md@@ -142,8 +142,9 @@ determining its events.- Core Lean only, no Mathlib: `omega`, `simp`, `decide` and inductioncarry these proofs. A lemma Mathlib has, such as`List.map_injective_iff`, is proved in the file.-- The lakefile makes every warning an error, so a `sorry`, a deprecated- name or an unused `simp` argument fails the build.+- The lakefile builds every module under `Shirudo/`, imported or not,+ and makes every warning an error, so a `sorry`, a deprecated name or+ an unused `simp` argument fails the build.- A model proves the algorithm, not the C. Link the two with a CBMCproof where one is cheap, as `string-number-model.c` checks`parse_u64()` against `Number.lean` up to 4 bytes anddiff --git a/Documentation/contribute/testing/proofs.rst b/Documentation/contribute/testing/proofs.rstindex 2dad9bd6..0bfdc8ed 100644--- a/Documentation/contribute/testing/proofs.rst+++ b/Documentation/contribute/testing/proofs.rst@@ -201,8 +201,9 @@ Write a Lean 4 proofprove, such as a hash being collision resistant, as an explicithypothesis of the theorem.-2. Import the module in :src:`testing/proofs/lean4/Shirudo.lean`. A- ``sorry`` or any other warning fails the build, so every theorem is+2. Import the module in :src:`testing/proofs/lean4/Shirudo.lean`. The+ build checks every module under ``Shirudo/`` whether imported or not,+ and a ``sorry`` or any other warning fails it, so every theorem isproved in full.3. Where CBMC can, add a CBMC proof that the C computes what the modeldiff --git a/testing/proofs/lean4/lakefile.toml b/testing/proofs/lean4/lakefile.tomlindex 90f58904..e079ad9f 100644--- a/testing/proofs/lean4/lakefile.toml+++ b/testing/proofs/lean4/lakefile.toml@@ -6,5 +6,7 @@ defaultTargets = ["Shirudo"][[lean_lib]]name = "Shirudo"+# Every module under Shirudo/, imported or not, is checked.+globs = ["Shirudo", "Shirudo.+"]# A warning, a sorry among them, fails the build.leanOptions = { warningAsError = true }