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

Omit empty modules from translation records #5475

Conversation

robin-aws
Copy link
Member

@robin-aws robin-aws commented May 21, 2024

Description

Fixes #5459

Omits modules that only contain other modules from translation records, since they can appear in multiple different separately-compiled libraries when they are prefix modules (i.e. a module A.B that only appears in a module A.B.C { ... } declaration).

I attempted to omit such modules from translation entirely at first, but hit issues in the Go backend. It may be possible to do so in the future with more care.

How has this been tested?

Updated DuplicateModules.dfy to include parent modules.

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

@robin-aws robin-aws changed the title Omit empty modules from translation Omit empty modules from translation records May 21, 2024
@robin-aws robin-aws marked this pull request as ready for review May 21, 2024 23:33
@@ -1,11 +1,13 @@
// RUN: %baredafny translate cs %args %S/Inputs/Foo.dfy &> %t
Copy link
Member

Choose a reason for hiding this comment

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

Why %baredafny translate instead of %translate ?

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) May 22, 2024 10:29
@keyboardDrummer keyboardDrummer merged commit 4ce2f7e into dafny-lang:master May 22, 2024
21 checks passed
lucasmcdonald3 added a commit to lucasmcdonald3/dafny that referenced this pull request Jun 4, 2024
lucasmcdonald3 added a commit to lucasmcdonald3/dafny that referenced this pull request Jun 7, 2024
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.

Translation records should not include options for empty models
2 participants