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 error obtained when importing sync with flag --noassumeInjectivityOnInhale #854

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jcp19
Copy link
Contributor

@jcp19 jcp19 commented Feb 18, 2025

Currently, we get an error when we import sync in a package that we try to verify with --noassumeInjectivityOnInhale:

Error at: <stubs/sync/waitgroup.gobra:24:10> Method contract is not well-formed. 
Quantified resource g might not be injective.

The fix is to split the array in the definition of WaitGroup to avoid generating the ill-formed qtfier at the encoding level. The actual choice of private fields does not matter and ideally, we would have been able to make this type completely opaque, but that is currently not possible in gobra

@jcp19 jcp19 marked this pull request as draft February 18, 2025 23:22
Copy link
Member

@ArquintL ArquintL left a comment

Choose a reason for hiding this comment

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

LGTM. However, I'm wondering whether we could address the underlying problem in the encoding as an array with 3 integers should be equivalent to 3 integers ^^

@jcp19 jcp19 marked this pull request as ready for review February 26, 2025 15:21
@jcp19 jcp19 marked this pull request as draft February 26, 2025 15:21
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