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

Rework how charon represents regions #395

Merged
merged 6 commits into from
Dec 11, 2024
Merged

Conversation

Nadrieril
Copy link
Member

Companion PR to AeneasVerif/charon#492.

Now charon uses Free for regions bound in the signature, which makes it possible to remove a bunch of code in aeneas that substituted fresh free region ids. This change required that we merge free_region_id and bound_region_id. Fortunately, aeneas never touches bound regions anymore, so there is no ambiguity between those at the moment. The one possible ambiguity is that aeneas generates fresh region ids, which therefore do not correspond to variables bound in the signature.

| Bound _ -> RVar var

method! visit_region_id_set _ (ids : region_id_set) : region_id_set =
RegionId.Set.map get_region_id ids
Copy link
Member

Choose a reason for hiding this comment

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

I just have a request here: I want to override the visit_abstraction method. The reason is that region_id_set, similarly to region_id, is not a super specific type: maybe we will use this type elsewhere in the future, and I want to make sure we notice it if we do this update. I can make the change myself if you want.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you don't mind, I'll leave that to you

Copy link
Member

Choose a reason for hiding this comment

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

Ok just give me some time

@Nadrieril Nadrieril enabled auto-merge December 11, 2024 15:28
@Nadrieril Nadrieril merged commit a95c906 into AeneasVerif:main Dec 11, 2024
6 checks passed
@Nadrieril Nadrieril deleted the debruijn3 branch December 11, 2024 15:29
@@ -249,7 +237,7 @@ class ['self] map_typed_avalue_base =
fun _ m -> m

method visit_region_id_set : 'env -> region_id_set -> region_id_set =
fun env ids -> RegionId.Set.map (self#visit_region_id env) ids
fun _ s -> s
Copy link
Member

Choose a reason for hiding this comment

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

Note to myself: I want to change this in a subsequent PR

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