Repository navigation
verify: Reject the solver options with the Lean backend - #41
Merged
Merged
Conversation
… has its own step limit.
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.
Lean export runs no solver, yet
--backend=lean,--lean-out, and--lean-projectaccepted every solver budget and ignored it. On main, each of--timeout,--collection-timeout,--certify-timeout,--function-timeout,--solver-rlimit, and--max-query-nodesleaves the output and the.leanfile byte-identical, even--max-query-nodes=1, which on a solver backend rejects every module. A user who sets a budget for a Lean run gets no sign that it does nothing.The change:
resolveOptions(clang/tools/cpp-verify/Main.cpp) rejects any of these, and--int-encoding, which it already rejected, under the Lean backend, for source verification and archive replay alike. The error names the first one given:--lean-fallbackruns Z3 or the strict portfolio first and accepts them all, as before.Docs: the tooling page's table of options a run would not use gets the case, with a sentence listing every solver option. Each budget's entry in the options table says it is not accepted with Lean. The time-limits section says Lean runs no solver and that Lean certification gives each
lakestep 300 seconds, past which every result isUnresolvedwith reasonlean.export-failed. The release notes' entry on unused options names the case.Testing:
backend_options.cppadds each of the six budgets under--lean-out,--lean-project,--backend=lean, and Lean replay. It checks that no project or.leanfile is written, and that Z3 and--lean-fallbackaccept the budgets. On main, exactly the nine new lines fail and the old ones pass.lean_backend_failure.cpppassed--timeout=1to show that Lean export runs no solver; that is now the error itself, so the test drops the option and still checks that the export saysExportedand contains no Z3 check. A matrix of all seven options under the four Lean modes gives the error, and under--backend=z3,cvc5,portfolio,race,bmc,--unroll,--lean-fallback,--lower-only, and Z3 replay gives the same verdicts as main.Checked: Verify suite 423 passed, 1 unsupported. The change is in option checking only, so no verdict can change and no differential was run. After the rebase onto #39, the documentation examples pass and the site builds with
-W.With #48,
--max-query-nodesbounds what is built for a function under every backend, Lean included, and--memory-limitis a new solver option. The two conflict inMain.cppandtooling.rst. Whichever lands second gets rebased:--max-query-nodesleaves the list of solver-only options and--memory-limitjoins it. The test line--lean-out ... --max-query-nodesbecomes--memory-limit.