Feat rust operators#5380
Merged
Merged
Conversation
### Description This PR implements most immutable types in Dafny (Sequence, Set, Multiset, Map) and implements most if not all operators on them. It also sets an architecture that can now be relied on. List of features in this PR: - More comprehensive Rust AST, precedence and associativity to render parentheses - The Rust compiler no longer crash when not in /runAllTests, but emits invalid code. It makes it possible to see which features are missing by searching for `<i>` in the generated code. - Made verification of GenExpr less brittle - Previous PR review comments - Ability to use shadowed identifiers to avoid numbers in names. Rust has the same rules as Dafny for shadowing, and I will continue to monitor cases where semantics might differ. ### How has this been tested? I added an integration test for compiling Dafny to Rust, and I added unit tests for the runtime in Rust *All tests for each compiler now have a `.rs.check` if they fail.*. <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small> --------- Co-authored-by: Robin Salkeld <salkeldr@amazon.com>
MikaelMayer
commented
Apr 29, 2024
robin-aws
approved these changes
Apr 29, 2024
robin-aws
added a commit
to robin-aws/dafny
that referenced
this pull request
Apr 30, 2024
This reverts commit 0b629ea.
robin-aws
added a commit
that referenced
this pull request
May 1, 2024
This reverts commit 0b629ea to fix failing nightly: https://github.com/dafny-lang/dafny/actions/runs/8896634004/job/24436389955 Unfortunately I approved #5380 before all of the deep tests had run, and because the extra checks aren't normally run for a PR unless it has the `run-deep-tests` label, they can't be required checks, so the PR was auto-merged even though several Windows runs timed out after 2 hours.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a replay of #5081 after fixing the issue with the paths too long for Windows, so it should no longer break the CI.
Description
This PR implements most immutable types in Dafny (Sequence, Set, Multiset, Map) and implements most if not all operators on them. It also sets an architecture that can now be relied on.
List of features in this PR:
<i>in the generated code.How has this been tested?
I added an integration test for compiling Dafny to Rust, and I added unit tests for the runtime in Rust
All tests for each compiler now have a
.rs.checkif they fail..By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.