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

Chore: Dafny to Rust refactorings #5513

Merged
merged 29 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0f9f1a1
chore-rust-refactorings
MikaelMayer May 2, 2024
45fd9ee
Removed enforce determinism extra option. More error checks
MikaelMayer May 31, 2024
136a72b
Ensure right handling of tuples and printing, and no extra rs.check file
MikaelMayer Jun 1, 2024
2da9647
Merge branch 'master' into chore-rust-refactorings
MikaelMayer Jun 4, 2024
6a5dcdb
Merge branch 'master' into chore-rust-refactorings
MikaelMayer Jun 4, 2024
77df75f
Fixed formatting
MikaelMayer Jun 4, 2024
a9084e5
Updated all .rs.check files
MikaelMayer Jun 4, 2024
2afbd5b
Merge branch 'chore-rust-refactorings' of https://github.com/dafny-la…
MikaelMayer Jun 4, 2024
530dfd5
Merge branch 'refs/heads/master' into chore-rust-refactorings
MikaelMayer Jun 5, 2024
f991053
Merge branch 'refs/heads/master' into chore-rust-refactorings
MikaelMayer Jun 5, 2024
1facdae
WIP need to remove these check files
MikaelMayer Jun 5, 2024
1692ddf
Updated test and check files
MikaelMayer Jun 6, 2024
1b29dda
Merge branch 'refs/heads/master' into chore-rust-refactorings
MikaelMayer Jun 6, 2024
6b65030
Merge branch 'master' into chore-rust-refactorings
MikaelMayer Jun 6, 2024
ad72a8e
Merge branch 'refs/heads/master' into chore-rust-refactorings
MikaelMayer Jun 10, 2024
6c6a423
Merge branch 'master' into chore-rust-refactorings
MikaelMayer Jun 11, 2024
6c6e37e
Fixed the core files for the rust tests
MikaelMayer Jun 12, 2024
4853061
Fixed typôs
MikaelMayer Jun 13, 2024
ccbe323
Merge branch 'refs/heads/master' into chore-rust-refactorings
MikaelMayer Jun 13, 2024
b29ffd0
Updated check files again
MikaelMayer Jun 13, 2024
0a13114
More fixups
MikaelMayer Jun 13, 2024
40721bb
Reverted ownership and included a change in the message
MikaelMayer Jun 13, 2024
1f9824e
One last test fixed
MikaelMayer Jun 13, 2024
af055f4
New attempt at fixing CI
MikaelMayer Jun 14, 2024
4fda132
Merge branch 'master' into chore-rust-refactorings
MikaelMayer Jun 19, 2024
6e11aca
Merge branch 'master' into chore-rust-refactorings
MikaelMayer Jun 21, 2024
c5f22f1
latest improvements
MikaelMayer Jun 21, 2024
1832a90
Fixed one last test
MikaelMayer Jun 21, 2024
123ef92
Changed the printing so that it's deterministic
MikaelMayer Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated all .rs.check files
  • Loading branch information
MikaelMayer committed Jun 4, 2024
commit a9084e55c890ff989e1ac36642c46e0ed7439f4a
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool): Default` is not satisfied
// CHECK-L: error[E0277]: the trait bound `dyn Fn() -> DafnyInt: Default` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool): Default` is not satisfied
// CHECK-L: error[E0277]: the trait bound `dyn for<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q> Fn(&'a bool, &'b bool, &'c bool, &'d bool, &'e bool, &'f bool, &'g bool, &'h bool, &'i bool, &'j bool, &'k bool, &'l bool, &'m bool, &'n bool, &'o bool, &'p bool, &'q bool) -> DafnyInt: Default` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `alloc` which `std` depends on
// CHECK: .*<i>Type\ name\ for\ ORDINAL\ \(Microsoft_dDafny_dBigOrdinalType\)</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `core`
// CHECK: .*<i>Type\ name\ for\ ORDINAL\ \(Microsoft_dDafny_dBigOrdinalType\)</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `core` which `std` depends on
// CHECK: .*<i>Unsupported:\ Cannot\ emit\ literal\ expression\ 0\ outside\ of\ expression\ context:\ Microsoft_dDafny_dCompilers_dBuilderSyntaxTree'1\[Microsoft_dDafny_dCompilers_dStatementContainer]</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: Unhandled exception: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
// CHECK: .*<i>QuantifierExpr</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `object` which `std` depends on
// CHECK: .*<i>Traits</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Traits</i>.*
// CHECK-L: Unhandled exception: System.InvalidOperationException: Operation is not valid due to the current state of the object.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Unsupported:\ <i>Cannot\ assign\ null\ value\ to\ variable</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: could not compile `once_cell` (lib)
// CHECK-L: error[E0072]: recursive type `List` has infinite size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `Rc<Bot>: DafnyType` is not satisfied
// CHECK-L: error[E0277]: the trait bound `Bot: Clone` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `core`
// CHECK: .*<i>Type\ variance\ Co\ not\ supported</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `core`
// CHECK-L: error[E0072]: recursive type `List` has infinite size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `dyn for<'a> Fn(&'a DafnyInt) -> DafnyChar: Default` is not satisfied
// CHECK-L: Unhandled exception: System.IO.IOException: The process cannot access the file 'C:\vscode\settings.json' because it is being used by another process.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0369]: binary operation `<` cannot be applied to type `&nat`
// CHECK-L: error[E0072]: recursive types `Contents` and `Element` have infinite size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0786]: found invalid metadata files for crate `core`
// CHECK: .*<i>Traits</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: could not compile `paste` (lib)
// CHECK-L: error[E0308]: mismatched types

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0369]: cannot add `DafnyInt` to `nat`

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0277]: the trait bound `_T0: Hash` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Unsupported:\ Cannot\ emit\ literal\ expression\ 0\ outside\ of\ expression\ context:\ Microsoft_dDafny_dCompilers_dBuilderSyntaxTree'1\[Microsoft_dDafny_dCompilers_dStatementContainer]</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Unsupported:\ Cannot\ emit\ literal\ expression\ 0\ outside\ of\ expression\ context:\ Microsoft_dDafny_dCompilers_dBuilderSyntaxTree'1\[Microsoft_dDafny_dCompilers_dStatementContainer]</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Unsupported:\ Cannot\ emit\ literal\ expression\ 0\ outside\ of\ expression\ context:\ Microsoft_dDafny_dCompilers_dBuilderSyntaxTree'1\[Microsoft_dDafny_dCompilers_dStatementContainer]</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `_R: DafnyType` is not satisfied
// CHECK-L: error[E0277]: the trait bound `_R: Default` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: Unhandled exception: System.InvalidOperationException: Unknown buildable type: NULL
// CHECK: .*<i>Unsupported:\ <i>Cannot\ assign\ null\ value\ to\ variable</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `&bool: DafnyPrint` is not satisfied
// CHECK-L: error[E0599]: the method `as_ref` exists for reference `&D`, but its trait bounds were not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: Unhandled exception: System.InvalidOperationException: Unknown buildable type: NULL
// CHECK: .*<i>Traits</i>.*

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0308]: mismatched types
// CHECK-L: error[E0072]: recursive type `T` has infinite size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Type\ variance\ Co\ not\ supported</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0369]: binary operation `==` cannot be applied to type `Sequence<_T>`
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Coercion\ from\ \(::dafny_runtime::DafnyInt,\ ::dafny_runtime::DafnyInt\)\ to\ \(super::_System::nat,\ super::_System::na\.\.\..*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0369]: cannot add `DafnyInt` to `nat`

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Cannot\ assign\ null\ value\ to\ variable</i>.*
// CHECK: .*<i>Static\ functions\ with\ type\ arguments</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0433]: failed to resolve: use of undeclared crate or module `num`
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Type\ variance\ Co\ not\ supported</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Traits</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Type parameter Equality support Required not supported for type parameters</i>.*
// CHECK: .*<i>Coercion\ from\ ::\.\.\..*

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0599]: no associated item named `_allocated` found for struct `A` in the current scope
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0308]: mismatched types

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0308]: mismatched types
// CHECK-L: error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0308]: mismatched types

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0599]: the method `as_ref` exists for reference `&Color`, but its trait bounds were not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Unsupported:\ <i>Cannot\ assign\ null\ value\ to\ variable</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error: missing angle brackets in associated item path
// CHECK-L: error[E0277]: the trait bound `EvenCell: num_traits::sign::Signed` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Cannot\ assign\ null\ value\ to\ variable</i>.*
// CHECK: .*<i>Traits</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Traits</i>.*
// CHECK-L: Unhandled exception: System.InvalidOperationException: Operation is not valid due to the current state of the object.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Traits</i>.*
// CHECK-L: Unhandled exception: System.InvalidOperationException: Operation is not valid due to the current state of the object.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Traits</i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0599]: no method named `borrow_mut` found for struct `DafnyInt` in the current scope

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `Rc<Tree>: DafnyType` is not satisfied
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `Rc<Tree>: DafnyType` is not satisfied
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: the trait bound `Rc<Tree>: DafnyType` is not satisfied
// CHECK-L: error[E0308]: mismatched types
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0070]: invalid left-hand side of assignment
// CHECK-L: error[E0277]: the trait bound `RefCell<Vec<DafnyInt>>: Hash` is not satisfied

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0277]: the trait bound `dyn for<'a> Fn(&'a DafnyInt) -> DafnyInt: Default` is not satisfied
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK-L: error[E0072]: recursive type `List` has infinite size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0782]: trait objects must include the `dyn` keyword
// CHECK-L: error[E0631]: type mismatch in closure arguments
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Coercion\ from\ ::std::rc::Rc<dyn\ ::std::ops::Fn\(&super::_module::Tree<_A>\)\ ->\ super::_module::Tree<_B>>\ to\ ::std::rc::Rc<dyn\ ::std::ops::Fn\(&_A\)\ ->\ _B></i>.*
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK-L: error[E0277]: can't compare `&DafnyInt` with `DafnyInt`
// CHECK-L: error[E0072]: recursive type `List` has infinite size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// CHECK: .*<i>Coercion</i>.*
// CHECK: .*<i>Coercion\ from\ super::_module::List<::dafny_runtime::DafnyInt>\ to\ super::_module::List<super::_System::nat></i>.*