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

Definition of SumHeap is not emitted if last method has no gotos #423

Merged
merged 2 commits into from
Jul 4, 2022

Conversation

bobismijnnaam
Copy link
Contributor

Adds a test and an optimistic fix for #422. Please let us know if additional work is needed!

@bobismijnnaam bobismijnnaam changed the title Apply fix and add test Definition of SumHeap is not emitted if last method has no gotos Jun 28, 2022
@gauravpartha gauravpartha self-assigned this Jul 4, 2022
@gauravpartha
Copy link
Contributor

Looks good to me, thanks a lot for the fix!

For documentation purposes:

The sum of heap axioms should be emitted if the loop detector is used at least for one method to identify loops (which is the case when the program has gotos). The problem was that there was only a single boolean flag used to query whether this was the case, but this boolean flag was reset every time a new method was analyzed. @bobismijnnaam introduced another boolean flag that is true if the loop detector was used once for at least one method.

@gauravpartha gauravpartha merged commit 167356d into viperproject:master Jul 4, 2022
@gauravpartha gauravpartha mentioned this pull request Jul 4, 2022
@gauravpartha
Copy link
Contributor

I removed sumheap_bug.vpr in #424 and instead added it in the Silver repo (see viperproject/silver#591) in the corresponding Carbon issues folder. We usually add all our regression tests for the CI in the Silver repo (the ones in the Carbon repo are currently not taken into account when running the CI).

One way to make sure that one does not need to merge a Carbon PR first before adding the tests in the Silver repo is to create a Silver PR with the added tests without merging the Carbon PR. Then, one changes the Silver submodule in the Carbon PR to point to the Silver PR, which will make the Carbon CI take into account the added tests.

If the CI succeeds, one can merge the Carbon PR and after that the Silver PR (if one merges the Silver PR first, then the Silver PR will change Carbon master to point to the merged Silver commit, which might lead to the Carbon master CI to fail).

@bobismijnnaam bobismijnnaam deleted the sumheap-bug branch July 4, 2022 07:41
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