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

Use Module Name in identifying a let-such-that expression #4718

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

Conversation

Dargones
Copy link
Collaborator

WIP Fixes #4717

Description

Let-such-that expressions are currently assigned an id during translation to Boogie which is unique within the Dafny module being translated. However, this id is not unique in the entire translated Dafny program, since a Dafny program with multiple modules is translated to multiple Boogie files. This means that several Boogie files might contain #canCall functions that are identically named but express different functionality. This PR proposes to extend the unique id with the module name to make disambiguating between such functions easier.

To be clear, the existing implementation does not lead to any issues during verification. However, it makes it much more difficult to manipulate Boogie code produced from Dafny and, in particular, leads to a bug in test generation when several Boogie files are merged together into one. The proposed change maintains the properties that ids have right now (unique per module and consistent when translating the same file multiple times) while also making it easier to interpret and modify the resulting Boogie code.

How has this been tested?

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@Dargones Dargones marked this pull request as ready for review October 27, 2023 16:17
@Dargones Dargones marked this pull request as draft October 27, 2023 16:33
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.

Test Generation Fails with Multiple LetSuchThat expressions
1 participant