Add a reproducer for a scalar write stranding a deep predicate - #246
Draft
nikswamy wants to merge 1 commit into
Draft
Add a reproducer for a scalar write stranding a deep predicate#246nikswamy wants to merge 1 commit into
nikswamy wants to merge 1 commit into
Conversation
A struct's generated deep predicate is indexed by the whole struct value but owns only what its pointer members point at, so writing any other member moves the index without changing the ownership. The stale chunk is what the prover matches first, and the failure is reported as an inexplicable inequality of two pts_to terms. The reproducer narrows the trigger to a single pointer member: with the member present the file fails, and deleting it -- keeping the union, the nesting and the write -- makes the identical file verify. The fix is to index the predicate by the ownership-relevant projection of the struct rather than the whole value. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 981f7d3c-6a91-47ad-84d7-7aadf747123d (cherry picked from commit e8f22b7)
Contributor
|
!diff |
Generated F* output diffEffect of this pull request on the F* code ✅ The generated output is unchanged. |
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.
Part of the upstreaming of
nswamy/pal-c-project-integration(PR32 of 35 PRs) — seePR_PLAN.mdon that branch for the whole plan and the dependency graph.Base:
main. Depends on nothing; reviewable on its own.A reproducer under
examples/tests-todo/, no product change. A struct's deep predicate isindexed by the whole struct value but owns only what its pointer members point at, so
writing any other member moves the index without changing the ownership; the stale chunk
is what the prover matches first, and the failure is reported as an inexplicable
inequality of two
pts_toterms. The reproducer narrows the trigger to a single pointermember: with it the file fails, and deleting it — keeping the union, the nesting and the
write — makes the identical file verify. The fix is to index the predicate by the
ownership-relevant projection of the struct rather than the whole value.
Commits
Testing
No test directory of its own — this is an enabler whose effect shows up in another PR's fixture, a
pulse/library lemma, or atests-todoreproducer. Verified with a fullmake test -j8(1372 modules, 0 errors) to confirm it regresses nothing.