-
Notifications
You must be signed in to change notification settings - Fork 30
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
Alternatives to partial coherence in the anarchic semantics for PTX #532
Comments
There is the issue that both the semantics of the litmus final conditions and the liveness check depends on |
You are right, I forgot to mention this. Liveness is certainly harder to deal with. I think for this, we will need to move the liveness definition into CAT, which we eventually need to do anyways to handle liveness with interrupts and uncachable memory regions. |
I would really like to add support for free relations to CAT, so I wanna discuss how this should work syntactically.
Such new syntax will not be compatible with Efficiently handling such relations in RA requires implicit representations I believe. |
This issue is a summary of what we discussed in #528
Context: PTX requires a partial notion of coherence rather than a total one. We adapted our anarchic semantics to allow coherence to be partial to accomodate this use-case. Our partial encoding simply drops the totality constraint, meaning that coherence is just any acyclic relation over stores to the same address. This causes two issues: (1) coherence need not be transitive and (2) it doesn't need to relate anything (it can just be empty).
Currently, we fix these short-comings by redefining
co = co+
(fixing point 1) and adding an axiom to forceco
to contain certain minimal pairs (e.g., atomic stores) in the PTX model.Problem: The definition of coherence is now awkwardly split between the anarchic semantics and the cat model. Also, we need to switch to the partial coherence notion based on what architecture we are handling (partial for PTX, total for the rest).
Solutions: There are two solutions to that problem that allow us to keep the total coherence and avoid any case distinction based on the target architecture (i.e., the CAT model itself can define its coherence to be partial!)
Solution 1: We just use the total coherence order and then define in PTX a partial coherence order from the total order by restricting to
morally-strong
edges and adding causally-related stores:let co = ((co & morally-strong) | (([W]; cause; [W]) & loc) | (([IW];loc;[W]) \ id))+
Here we still rely on the anarchic semantics of
co
and just derive a new relation that fits the needs of the PTX model.Solution 2: A more general approach is to define a partial
co
directly in CAT instead of relying on the anarchic semantics at all.This requires a new primitive in the CAT language, namely "free relations". Suppose
free
was a relation that could take any value, then we can defineThis is a full specification without relying on any anarchic semantics. In a similar way, the user could define any new custom relation.
The text was updated successfully, but these errors were encountered: