-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Dafny-to-Rust code indentation and identifiers (#4974)
# Improvements of the DAST to Rust code generator: * The code generator emits a Rust-like AST that is then formatted with proper indentation * Ensured Rust-like identifiers in Dafny stay the same in Rust (like "one_variable") * Added Initial implementation of sequences and maps in the DafnyRuntimeRust, following the implementation of the Go * Added module to perform conversions from and to Dafny types to and from native types # Code enhancement * Added support for using the standard library's Option type rather than the hard-coded Optional type. # Tests * Added proof that the identifier mapping is fully reversible and won't conflict with other internal constructs * Added a Rust test module for the DafnyRuntimeRust and wrote tests for testing the encoding Dafny/Rust # Tooling improvement - The makefile now works even if there is a space in the path - `make dfydev` does not perform verification and formatting of the resulting C# file, but `make dfyprod` does it. Both build Dafny afterwards ' `make dfydevinit` and `make dfyprodinit` only perform the conversion from dafny files to C# files, without rebuilding Dafny. <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>
- Loading branch information
1 parent
8e0682e
commit 2c77435
Showing
12 changed files
with
18,927 additions
and
13,959 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.