Remove functions#1408
Conversation
…trata into transparency-pass-only
… into issue-924-contract-and-proof-pass
|
@keyboardDrummer-bot can you investigate the build failures? If you have trouble resolving them, just post what you found |
|
I investigated the CI failure ("Build and test Lean (stable)"). Here's what I found: Local reproduction results (with cvc5 1.3.4, matching CI):
All of these pass from a completely clean build (deleted Most likely cause of CI failure: The CI uses a "Restore lake cache" step that restores cached Recommendation: Re-run the CI workflow. If the cache is the culprit, the CI should either:
Note: I initially saw a |
If you look at the CI results (https://github.com/strata-org/Strata/actions/runs/28098917360/job/83195378967?pr=1408), you can see that running |
The removal of the isFunctional field from Procedure caused condition helper procedures (created by the contract pass) to be incorrectly translated as Core procedures instead of Core functions. Three changes fix this: 1. ContractPass: mkConditionProc and mkPostConditionProc now wrap the condition expression in a proper 'result := expr; exit $return' block. This ensures the output parameter is assigned when the procedure body is used imperatively. 2. TransparencyPass: Transparent procedures without Assume/Assert in their body (i.e., pure condition helpers) are excluded from coreProcedures. They keep their original name as functions and are not given procedural twins. This prevents the lifting pass from pulling calls out of conditionals (which broke short-circuit evaluation in the interpreter). 3. LaurelToCoreSchemaPass: unwrapReturnBlock handles the extra Block wrapping layer introduced by the contract pass's instrumentBody. Updated test expected messages from 'could not be proved' to 'does not hold' because preconditions are now inlined as functions, giving the SMT solver enough information to produce counterexamples.
|
@keyboardDrummer-bot can you try to reproduce the SARIF failure that CI has now when running |
|
@keyboardDrummer-bot currently the analysis if a Python test is failing. You can reproduce with |
|
I investigated the Root Cause: Procedure inlining causes exponential path explosion in symbolic executionWhat changed between the base branch and this PROn the base branch, the Python runtime helpers were defined as Laurel functions: On the PR branch, they are Laurel procedures: How this causes the hang
Why the "attempted fix" (
|
|
@keyboardDrummer-bot please debug the test failures:
|
The contract pass was incorrectly asserting free postconditions (like the enumerated modifies frame) inside opaque procedure bodies. Free conditions should only be assumed at call sites, not checked in the body. This caused procedures that allocate fresh objects to spuriously fail modifies checks under array theory. Also update two test annotations from 'could not be proved' to 'does not hold' to match the new verifier output.
Changes
#guard_msgs (drop info) into several tests to prevent gettinginfooutput when runninglake test. These guards previously already existed but they were accidentally removed in a test refactoring.Tests
functionin tests withprocedure. Tests that had duplicated cases for functions and procedures had the function test-cases removed.