Event-Structures / event-struct

Mechanized Theory of Event Structures
MIT License
16 stars 1 forks source link

Release/Acquire consistency #76

Open volodeyka opened 3 years ago

volodeyka commented 3 years ago

After pushing #73, we'll be finally ready to reason about R/A consistency. Here I want to make some kind of plan. We know that execution graph is RA consistent iff wb-relation is acyclic. Where wb defined as follows:

So as I see our plan is:

eupp commented 3 years ago

I think it would be good to split this into two subtasks. 1) Filtration of the event structures by the consistency predicate. 2) Definition and properties of RA-consistency.

For example, I don't think we need a separate eval_RA_step (or, in general, a new eval_MM_step for each imaginable memory model). Instead, I think, we should define a small-step function that just filters out inconsistent event structures (using some consistency predicate). Then, depending on particular properties of the consistency predicate, we can develop more specialized/efficient versions of the small-step function, which, for example, would not just check the consistency naively, but would filter-out some inconsistent reads-from options.

So for example, currently we have what you called ces_seq, which filters out some reads-from options, that would otherwise lead to a violation of hereditary property e1 <= e2 -> e2 # e3 -> e1 # e3. So why not try to generalize it, by abstracting over the consistency predicate? In essence, the idea is the same for all memory models, you just try to add a new event to an event structure, and then filter out some inconsistent event structures.

volodeyka commented 3 years ago

So why not try to generalize it, by abstracting over the consistency predicate?

Shouldn't we add some memory-model filtration after ces_seq? Because without it we can't obtain prime event structure form exec_eventstructure, and this violate our "event-structure"-ideology

eupp commented 3 years ago

So why not try to generalize it, by abstracting over the consistency predicate?

Shouldn't we add some memory-model filtration after ces_seq? Because without it we can't obtain prime event structure form exec_eventstructure, and this violate our "event-structure"-ideology

Would be nice to unify the two. We can split the fin_exec_event_struct into two subparts, one is data and the second one is data+proofs. Then we'll have two functions, the first one just updates the data part by updating underlying fsfuns, and the second one builds the proofs, assuming some preconditions hold.