-
Notifications
You must be signed in to change notification settings - Fork 17
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
Big cleanup #50
Merged
Merged
Big cleanup #50
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
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 performs the following modifications:
Ty
type, which was used to make a distinction between types with regions and types with erased regions. This proved extremely cumbersome in the end: we sometimes had to realize conversions between the various kinds of types, and this prevented us from correctly using visitors in OCaml because of type-checking issues. In particular, this allowed us to derive more visitors (and more powerful) for the types defined in Charon-ML.regions_hierarchy.rs
) in Charon anymore, and moved this analysis to AeneasName
type so that theImpl
blocks contain generic parameters and a type, closely following what happens in Rust. This allows a more general (and better) generation of names in Aeneas.core::slice::{[@T]}::len
(thelen
function defined in the impl block for type[T]
, whereT
is a type variable, in modulecore::slice
), orcore::ops::index::IndexMut<alloc::vec::Vec<@T, @A>, @T>
(the instance of the traitcore::ops::index::IndexMut
forVec<T, A>
andT
). We implemented a lot of utilities, which include: parsing, matching, conversion from names to patterns (which match those names), printing, functions to check if two patterns are convertible and to compute common prefixes, pattern maps (which map patterns to values and allow efficient lookups)ty
:Ref
->TRef
)