Conversation
663be15 to
f781891
Compare
|
Importantly, the only changes to PCM relate to excising out the ResourceAlgebra part. Functionally, the PCM interface remains the same because now |
d8fa647 to
655f5af
Compare
This is done by partitioning the previous PCM trait (while keeping that axiomatization of the pcm::Resource API intact and unchanged). Then the algebra::Resouce API is verified agains the pcm::Resource API, using an Option combinator (which lifts any RA into a PCM).
There was a problem hiding this comment.
This looks good!
I assume you added ResourceRef because there otherwise wasn't a way to go from &'a pcm::Resource<Option<RA>> to &'a Resource<RA>? If you want, you can axiomatize a &'a pcm::Resource<Option<RA>> --> &'a Resource<RA> law, it's kind of a missing piece in our theory of shared ghost state, I just don't think it's come up before.
Yes exactly, it's quite annoying because even converting is not trivial (i.e., it is not really doable via |
|
I'll take a look into adding the axiom |
This is done by partitioning the previous PCM trait (while keeping that axiomatization of the pcm::Resource API intact and unchanged).
Then the algebra::Resouce API is verified against the pcm::Resource API, using an Option combinator (which lifts any RA into a PCM).
The interfaces are morally equivalent, with some minor details.
One of the more annoying details is that the axiomatized interface can "create" tracked shared refs to a resource, whereas we are forced to add a
algebra::ResourceRefto hold the shared ref.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.