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: Override checks with canCall precondition #3479

Merged
merged 24 commits into from
Feb 25, 2023

Conversation

fabiomadge
Copy link
Collaborator

@fabiomadge fabiomadge commented Feb 8, 2023

We strengthen this check by performing it on the visibility level of the implementing function, but restricting the enabled axiom to the callers of the trait. To achieve this, we add the canCall precondition to the axiom. Additionally, we consider imported trait functions when computing the visibility levels.

Fixes #2500.

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

@fabiomadge fabiomadge marked this pull request as draft February 8, 2023 01:52
@fabiomadge fabiomadge marked this pull request as ready for review February 9, 2023 03:11
@RustanLeino
Copy link
Collaborator

So far, I have inspected the Boogie being generated, and it looks good!

Copy link
Collaborator

@RustanLeino RustanLeino left a comment

Choose a reason for hiding this comment

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

Nice work!

@RustanLeino RustanLeino merged commit 993b589 into dafny-lang:master Feb 25, 2023
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.

{:termination false} also allows incorrect implementations of trait functions
2 participants