Closed RobinMorisset closed 5 years ago
Hmm, the consistency rule is essentially an axiom, so maybe the right thing to do is to state it as such in the spec text, and then maybe(?) the Scoped Modification Order Coherence rules could be treated as a consequence of that axiom? Just a thought, I haven't fully digested this issue yet. It's not clear to me that the Scoped Modification Order Coherence rules on their own are useful, I had included them mostly because they are in the C++ spec.
Also, I had started writing litmus tests for the Scoped Modification Order Coherence rules a few weeks ago but haven't had time to finish. I'll try to wrap that up soon.
Quick update: There are two equivalent ways of presenting the C++ coherency rules, either as a group of 7 axioms (4 of which are similar to the Scoped Modification Order Coherence), or as a single acyclicity condition similar to the one in the consistency axiom (I had forgotten this equivalence and had to look it up).
However, I still think the formal model and the spec should be brought in sync, for two reasons:
I've created https://github.com/KhronosGroup/Vulkan-Docs/pull/927 for this. This is all subtle enough that I'd appreciate some detailed review, and no need to rush this into the spec.
Closing as fixed now that https://github.com/KhronosGroup/Vulkan-Docs/pull/927 is merged.
The specification has the following section:
while the formal model has the following:
These two things appear to be intended to match each other, but it is not obvious at all that they do.
I actually believe that they don't, in that the consistency predicate seems significantly stronger, especially considering that hb is not transitive in this model (contrary to C11 without consume whose formalization in https://johnwickerson.github.io/papers/memalloy.pdf inspired this rule) so preventing cycles in hb + asmo is for example stronger than the first bullet in the spec. However, I have not yet managed to find a litmus test that makes the difference between the two clear. I plan on updating this issue once I find one. I am posting now as suggested in https://github.com/KhronosGroup/Vulkan-MemoryModel/issues/1 in case anyone has some insight in this problem.