-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Stable Event Structures.
Let's discuss an encoding of stable event structures.
First, a classical textbook definition [1].
A stable E.S. is a tuple < E, Cons, |- > where:
Eis a set of events;Consis a set of all finite consistent (i.e. conflict-free) subset of events;C |- eis enabling relation, asserting thatedepends on conflict free subset of events C.
Additionally, the following axioms must hold.
-
Monotonicity of Cons
X <= YandY \in ConsimpliesX \in Consfor allXandY. -
Monotonicity of Enabling
X |- eandX <= Y \in ConsimpliesY |- efor allX,Y, ande. -
Stability
X |- e,Y |- e, andX \cup Y \cup {e} \in ConsimpliesX \cap Y |- e.
Next, the configuration C (a subset of events) of a stable event structure is defined as follows:
-
Cis conflict-free
X <= Candfinite(X)impliesX \in Cons(i.e. all finite subsets ofCare conflict free) -
Cis secured:
for alle \in Cthere exists[e1, ..., en = e], s.t.{e1, ..., ei} |- e{i+1}for all0 <= i < n.
Now, the stability axiom ensures that in the configuration each event is enabled in a "unique way".
It allows us to define (within a particular configuration C) the usual binary causality relation <=.
e1 <= e2 <---> forall C' <= C s.t. C' is configuration itself, e2 \in C' implies e1 \in C'
Now, there are several problems with the theory formulated this way
which preclude us from formulating it in Coq naively as is.
-
The definition of securedness property leads to ambiguous representation.
To see the problem, imagine an event structure s.t.{} |- e1,{} |- e2, and{e1, e2} |- e3.
Then{e1, e2, e3}is a valid configuration (which is actually a prefix ofe3).
It has two securing chains fore3:[e1, e2, e3]and[e2, e1, e3].
Now, although it's stated that in stable E.S. each event is enabled in a "unique way",
the sequence-based representation of securing does not reflect this fact.
In other words, we need to compare securing chains modulo permutation of "independent" events
(e1ande2in our example). -
The definition of causality relation for the configuration (as stated above),
is not decidable, i.e. it is not abool-valued but aProp-valued relation,
because of theforallquantifier over the set of (potentially infinite) configurations.
TheProp-valued relation would not fit the design of our library and
we will not be able to usemathcomplemmas.
Therefore I propose the following alternative encodings.
-
To address the first problem, I propose to encode securing directly as a partial order, instead of a total order (derived from the securing chain).
Then we will be able to get the "uniqueness" for free.
Yet, there is still the question how to represent partial order.
Here I propose to use the same trick we've already did with "execution" event structures.
We can encode the partial order via its covering functionf : E -> seq E, i.e. a function that maps the event to the (finite) set of its immediate predecessors.
Then, to guarantee that the covering function will generate the partial order (i.e. there is no loops like in the case off := { e1 -> [e2], e2 -> [e1] }) we can require thatfsatisfies thedescendproperty w.r.t. some well-founded order onE, that isx \in f yimpliesx <= y.
Finally, we also require thatfis finitely supported function (i.e.f x != []only for finite number of events).
This corresponds to the requirement that securing chain is a finite sequence.
Using the property that for finitely supported function pointwise equality implies propositional equality (lemma), we would be able to prove that stability axiom implies the uniqueness offfor each event within a configuration. -
To address the second problem, I propose to alter the definition of binary causality for configuration.
e1 <= e2is true iffe1 <=(f) e2where<=(f)is a partial order generated from covering functionffor an evente2in configurationC(that isfis a finitely supported function from the previous item).
Since thefis unique, the alternative definition "should work". We will also have to prove that the alternative definition is indeed equivalent to the original one (via reflection lemma).
That's my idea. Any comments or suggestions are welcome.
It's also worth to recheck my proposals, as I'm not 100% sure my alternative encodings are correct.