-
Notifications
You must be signed in to change notification settings - Fork 269
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: Factorization of all paths in the generated Rust AST #5757
Merged
Conversation
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
… of making extensions public
Removed Height entirely as no longer needed
ssomayyajula
approved these changes
Sep 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, thanks for taking out RawExpr
and Height
.
MikaelMayer
added a commit
that referenced
this pull request
Oct 29, 2024
…romDafnyPost.py instead (#5860) ### Description #5757 made `FuncExtensions` in the C# runtime public instead of internal, which is not ideal since it increases the API surface area of the runtime and is a one-way door (and causes false positives in prerelease regressions testing). It was done because it seemed to be necessary, but the actual root cause was dropping these extension methods when post-processing Dafny's output. This PR reverts the change and special-cases the class in the python script instead. ### How has this been tested? Existing tests. <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: Mikael Mayer <[email protected]>
MikaelMayer
added a commit
that referenced
this pull request
Oct 30, 2024
…romDafnyPost.py instead (#5860) ### Description #5757 made `FuncExtensions` in the C# runtime public instead of internal, which is not ideal since it increases the API surface area of the runtime and is a one-way door (and causes false positives in prerelease regressions testing). It was done because it seemed to be necessary, but the actual root cause was dropping these extension methods when post-processing Dafny's output. This PR reverts the change and special-cases the class in the python script instead. ### How has this been tested? Existing tests. <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: Mikael Mayer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
run-integration-tests
Forces running the CI for integration tests even if the deep tests fail
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.
Fixes #5755
Description
R.RawExpr()
(and the remaining one has an empty string in argument) so that now the entire tree is correctly searchable/replaceable.Expression.ToString()
. The optimization being bottom-up in a separate phase, there is no more need for a special decreases clause to verify thatToString()
finishes, when it was doing optimizations at the same time. Also, reduces maintenance burden and potential issues.FuncExtensions
is internal; having twice the same type is not possible. To fix that, I madeFuncExtensions
public, and only emitted for arity 16 and above if the runtime is linked.0
to aDafnyInt
, and then truncate it to au64
, butu64
is not necessarilyusize
)Path.MSels
to create a path from a list of Rust identifiers, andSplitRustPathElement
that takes care of splitting extern identifiers along::
, to ensure that if a module is named through an externA::B
, we don't end up havinguse Enclosing::A::B;
and a usage likeA::B::function()
+ ambiguities for potential other Bs in scope, but insteadB::function()
and avoidance of ambiguities.How has this been tested?
What's next?
I can't wait to refactor RAST into its own file.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.