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

[pointer][invariant] Remove AliasingMapping, Inaccessible #1942

Open
wants to merge 1 commit into
base: Ifc49755af0d90eeefe7822d755d508403c266bda
Choose a base branch
from

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Oct 18, 2024

We previously used AliasingMappings and Inaccessible to model
UnsafeCell agreement. This abuses the notion of a mapping since one
doesn't ever actually want to change the aliasing of a pointer (and
certainly not to Inaccessible) - really this was meant to model
pointer casts which should never be performed. In addition to being an
awkward fit, the presence of Inaccessible meant that code could not
assume that any Aliasing invariant permitted reading, and so we had to
add extra machinery to work around this.

Future commits will use a different, simpler model for denoting
UnsafeCell agreement or disagreement.

While we're here, make Read slightly more permissive, implemented for
A: Aliasing, T: Immutable rather than just A: Reference, T: Immutable.

Makes progress on #1122, #1866


This PR is on branch ptr-overhaul-more-generic-issue-1945.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.46%. Comparing base (4bd33fb) to head (ac629d9).

Additional details and impacted files
@@                            Coverage Diff                             @@
##           Ifc49755af0d90eeefe7822d755d508403c266bda    #1942   +/-   ##
==========================================================================
  Coverage                                      89.46%   89.46%           
==========================================================================
  Files                                             17       17           
  Lines                                           5838     5838           
==========================================================================
  Hits                                            5223     5223           
  Misses                                           615      615           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshlf joshlf force-pushed the I1ac2ae177a235083e33b09fc848423220d3da042 branch 2 times, most recently from 53deb0a to 4795dcd Compare October 18, 2024 17:43
@joshlf joshlf changed the title [pointer][invariant] Remove AliasingMapping [pointer][invariant] Remove AliasingMapping, Inaccessible Oct 18, 2024
@joshlf joshlf force-pushed the I1ac2ae177a235083e33b09fc848423220d3da042 branch from 4795dcd to 94165e5 Compare October 21, 2024 19:24
@joshlf joshlf force-pushed the Ifc49755af0d90eeefe7822d755d508403c266bda branch 2 times, most recently from 03ccfe5 to 244bef4 Compare October 22, 2024 23:36
@joshlf joshlf force-pushed the I1ac2ae177a235083e33b09fc848423220d3da042 branch from 94165e5 to dbf871e Compare October 22, 2024 23:36
@joshlf joshlf force-pushed the Ifc49755af0d90eeefe7822d755d508403c266bda branch from 244bef4 to 5f1d243 Compare October 23, 2024 01:57
@joshlf joshlf force-pushed the I1ac2ae177a235083e33b09fc848423220d3da042 branch from dbf871e to 33fc89f Compare October 23, 2024 01:57
@joshlf joshlf force-pushed the Ifc49755af0d90eeefe7822d755d508403c266bda branch from 5f1d243 to 995e1f0 Compare October 24, 2024 20:51
@joshlf joshlf force-pushed the I1ac2ae177a235083e33b09fc848423220d3da042 branch from 33fc89f to 48f1450 Compare October 24, 2024 20:51
We previously used `AliasingMapping`s and `Inaccessible` to model
`UnsafeCell` agreement. This abuses the notion of a mapping since one
doesn't ever actually want to change the aliasing of a pointer (and
certainly not to `Inaccessible`) - really this was meant to model
pointer casts which should never be performed. In addition to being an
awkward fit, the presence of `Inaccessible` meant that code could not
assume that any `Aliasing` invariant permitted reading, and so we had to
add extra machinery to work around this.

Future commits will use a different, simpler model for denoting
`UnsafeCell` agreement or disagreement.

While we're here, make `Read` slightly more permissive, implemented for
`A: Aliasing, T: Immutable` rather than just `A: Reference, T:
Immutable`.

Makes progress on #1122, #1866

gherrit-pr-id: I1ac2ae177a235083e33b09fc848423220d3da042
@joshlf joshlf force-pushed the Ifc49755af0d90eeefe7822d755d508403c266bda branch from 995e1f0 to 4f292ed Compare November 11, 2024 22:40
@joshlf joshlf force-pushed the I1ac2ae177a235083e33b09fc848423220d3da042 branch from 48f1450 to 355531d Compare November 11, 2024 22:40
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.

3 participants