Repository navigation
Proof verdict: hint when unsafe/foreign defs come only through unused imports - #1558
Merged
Merged
Conversation
…ports no law or proof uses (#1463)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1463.
A file checked as proofs (
--verdict, or a file with nomain) still fails when any def outside Base relies on unsafe or foreign code, including defs it imports but never uses. That rule doesn't change. What changes is the error: when none of those defs is a law or a def of the checked file, no law or proof uses them, and the error now ends with a hint that names them:The rule is the same for every file. There's no special case for
PROOF.bend. Laws are now marked when parsed (Def.l), so a law filled by unsafe code in an imported file doesn't get the hint (unsafe_law_fill,unsafe_law_own,unsafe_law_derivedstay as they were).Tests:
tests/proof/PROOF.bend(hint) andtests/import/PROOF.bend(a law relies on unsafe, no hint) come from #1472, with expectations updated.unsafe_unusedandunsafe_law_unusednow show the hint.Gates on top of main 15a336c: repo 54/54, test 1630/1630, perf 124/124, ping 58/58, safe 1643 files with 0
!/t/e, exit 0. Not run: Linux, Windows, CUDA.