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

Regression same_package/import-fail01/main fails non-deterministically #762

Open
jcp19 opened this issue Apr 17, 2024 · 2 comments
Open
Labels
bug Something isn't working encoding

Comments

@jcp19
Copy link
Contributor

jcp19 commented Apr 17, 2024

No description provided.

@jcp19 jcp19 added bug Something isn't working encoding labels Apr 17, 2024
@jcp19
Copy link
Contributor Author

jcp19 commented Oct 13, 2024

I believe this is caused by the changes introduced in PR #634 that made the Desugarer parallel. In turn, this seems to be causing a race condition in the collection of all import preconditions when we generate proof obligations for initialization.

For now, I suggest we do not introduce a PR to fix this, as I am currently re-designing how we do static initialization in Gobra. After that, I will make the Desugarer sequential again, and I will undo #541, as the new encoding should work just fine, even with imports to packages for which we did not verify initialization.

@ArquintL
Copy link
Member

To sequentialize the desugarer, you only have to make sure that the following promises execute sequentially.
// we place mainPackageFut at index 0 val allPackagesFut = Future.sequence(mainPackageFut +: importedProgramsFuts) val futResults = Await.result(allPackagesFut, Duration.Inf)

I‘m not sure how the preconditions are collected but my changeset did imho not introduce any concurrent datastructures for the desugarer. This might alternatively be a somewhat easy solution too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working encoding
Projects
None yet
Development

No branches or pull requests

2 participants