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

Feat: Rust operators #5390

Merged
merged 26 commits into from
May 10, 2024
Merged

Feat: Rust operators #5390

merged 26 commits into from
May 10, 2024

Conversation

MikaelMayer
Copy link
Member

@MikaelMayer MikaelMayer commented May 1, 2024

UPDATE: The commit 8661eb0 fixed the previous nightly issue that multi-compiler tests on Windows were taking 15x longer.
UPDATE: That works only for the ResolvedDesugaredExecutableDafny compiler. Enabling the Dafny-to-Rust compiler again triggers that 15x slowdown. Do not merge yet

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.
  • make pr now prepares a codebase for a (regenerates everything and reformats everything in the correct order).

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..

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

@MikaelMayer MikaelMayer added the run-deep-tests Tells CI to run all tests label May 1, 2024
@MikaelMayer MikaelMayer enabled auto-merge (squash) May 8, 2024 21:57
@MikaelMayer MikaelMayer disabled auto-merge May 8, 2024 22:14
@MikaelMayer MikaelMayer enabled auto-merge (squash) May 10, 2024 18:24
@MikaelMayer MikaelMayer removed the run-deep-tests Tells CI to run all tests label May 10, 2024
Copy link
Member

@robin-aws robin-aws left a comment

Choose a reason for hiding this comment

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

Reviewed the commits since my last approval.

@MikaelMayer MikaelMayer merged commit 707510a into master May 10, 2024
21 checks passed
@MikaelMayer MikaelMayer deleted the feat-rust-operators-fixed branch May 10, 2024 22:19
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