Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 1212 #1269

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Fix issue 1212 #1269

merged 2 commits into from
Jan 27, 2025

Conversation

Halbaroth
Copy link
Collaborator

During model extraction, we only should store accesses to arrays whose the representative elements are names. Indeed, if the representative is not a name, this array cannot appear in a model.

The embedded case is correctly managed because we generate fresh names that will become the representative elements.

@Halbaroth Halbaroth added bug models This issue is related to model generation. labels Nov 13, 2024
@Halbaroth Halbaroth linked an issue Nov 13, 2024 that may be closed by this pull request
During model extraction, we only should store accesses to arrays whose the
representative elements are names. Indeed, if the representative is not
a name, this array cannot appear in a model.

The embedded case is correctly managed because we generate fresh names
that will become the representative elements.
Copy link
Collaborator

@bclement-ocp bclement-ocp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the above comment marked as pending for a while (sorry! GitHub UI strikes again). I think this is still the case -- can you add a comment in the file so that we don't later think that we break things when we fix #929?

Comment on lines +2 to +6
unknown
(
(define-fun a () (Array Int Int) (as @a3 (Array Int Int)))
(define-fun b () (Array Int Int) (as @a2 (Array Int Int)))
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated model is wrong: it does not ensure that a and b are equal everywhere except on 0 (this is now a simpler reproducer for #929). The 1212.default.smt2 file should include a comment that the model is wrong and point back to #929.

@bclement-ocp bclement-ocp dismissed their stale review January 27, 2025 09:09

OK to merge with a comment in 1212.default.smt2; did not intend to block things.

@Halbaroth
Copy link
Collaborator Author

Sorry, I didn't follow notifications on Alt-Ergo for a long time. I will fix it and merge the PR.

@Halbaroth Halbaroth enabled auto-merge (squash) January 27, 2025 10:16
@Halbaroth Halbaroth merged commit 47a898f into OCamlPro:next Jan 27, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug models This issue is related to model generation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid assumptions in array model generation
3 participants