Repository navigation
E5b: --function, with the verdicts of a whole run - #95
Merged
Merged
Conversation
…ps, and name an unmeasured loop beside a failure.
… proved by unrolling, and beside an unmeasured loop.
…their verdicts rely on so that each is a whole run's verdict.
…se that is executable.
This was referenced Oct 27, 2026
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.
A run verified every function of its file, so working on one function meant waiting for all of them and reading past their results.
--function=PATTERNnow reports only the functions a glob pattern matches (repeatable), with the verdicts a run of the whole file gives:On the base (#94)
--functionis an unknown option.Stacked on #94. Plan item E5, the filter (the plan's wording: "callees' contracts are used as always, so the selected proofs are the same proofs").
Design
Unresolvedwhere the whole run saysVerified, and a caller of a spec whose termination fails would beVerifiedwhere it saysspec.termination(the second is a wrong proof, since an unrun spec check never marks the spec undefined). SoVerifier::runschedules the selected functions, every spec and proof function, and then, round by round, each executable function whose contract the run's verdicts call (CallDependencies, proof blocks'Callees), until none is new. An executable function nothing reported relies on is not verified at all. The fixpoints then run as for the whole file.spec post by induction failed: climbs), so it is selected with the predicate, and so are the predicate's rule proofs. The diagnostics of functions not selected stay, hidden, for what they establish; so do the errors of functions the verifier does not represent unless selected. The summary counts what is printed, and the exit status follows it (0 when every reported verdict is a proof).llvm::GlobPatterns over the names verdicts print (Ring::push,total<short>); a pattern that matches nothing is an error. With--list-functionsthe filter narrows the listing.Tests
suite/function_filter.cpp(new): the whole file's verdicts; one selected caller of a failing callee (callee.contract, as in the whole run, and only it printed); one of a verifying callee (Verified, so the callee was verified); one using a spec whose termination fails (spec.termination); an inductive predicate with its rules; a predicate whose postcondition fails by induction, a check of its generated step, reported with it; one whose rule proofs stay unresolved (--solver-rlimit=1), reported with it; a glob over two functions with an unsupported function's errors hidden and exit status 0; an archive written by a filtered run, which holds only the selected function and what it relies on; a pattern that matches nothing; and a narrowed listing.Each mutant below, applied alone, makes
suite/function_filter.cppfail:climbs.stepF8 survived the first run, in which no rule proof failed. F10 is how the first version selected the step, matching the step's predicate by identity where the step records its name:
--function=climbshid the failed induction. The test now has that predicate and one whose rules stay unresolved.Docs
tooling.rst:
--function, its guarantee and exit status. Book ch15, release notes, ARCHITECTURE.md (how a filtered run schedules).Checked
clang/test/Verifyon E4b: --max-failures, each failure past the failing checks before it #96, which contains this branch: 482 passed, 1 unsupported (darwin only), and 1 failure of E4b: --max-failures, each failure past the failing checks before it #96's own test, which it changed during the run and which passes on the final build.function_filter.cppandinductive_rules.cpppass, and so dodocs_examples.testanddocs_coverage.testwith the new section.