Skip to content

Add a reproducer for a scalar write stranding a deep predicate - #246

Draft
nikswamy wants to merge 1 commit into
mainfrom
nswamy/pal-pr32-todo-reproducer
Draft

Add a reproducer for a scalar write stranding a deep predicate#246
nikswamy wants to merge 1 commit into
mainfrom
nswamy/pal-pr32-todo-reproducer

Conversation

@nikswamy

Copy link
Copy Markdown
Contributor

Part of the upstreaming of nswamy/pal-c-project-integration (PR32 of 35 PRs) — see PR_PLAN.md on 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 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 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

  • Add a reproducer for a scalar write stranding a deep predicate

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 a tests-todo reproducer. Verified with a full make test -j8 (1372 modules, 0 errors) to confirm it regresses nothing.

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)
@gebner

gebner commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

!diff

@github-actions

Copy link
Copy Markdown

Generated F* output diff

Effect of this pull request on the F* code pal generates for the test suite (f9d4dd2a8e8289).

✅ The generated output is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants