Domains and Event Structures for Fusions
Paolo BaldanAndrea Corradini, Fabio Gadducci
University of Padova
University of Pisa
Abstract
Stable event structures, and their duality with prime algebraic domains
arising as partial orders of configurations, are a landmark
of concurrency theory, providing a clear characterisation of
causality in computations.
They have been used for defining a concurrent semantics of several
formalisms, from Petri nets to (linear) graph rewriting systems,
which in turn lay at the basis of many visual modelling frameworks.
Stability however is restrictive when dealing with formalisms
with “fusion”, i.e., where a computational step can not only consume
and produce but also merge parts of the state. This happens, e.g.,
for graph rewriting systems with non-linear rules, which are needed
to cover some relevant applications (such as the graphical encoding
of calculi with name passing).
Guided by the need of capturing the semantics of formalisms with
fusion we leave aside stability and we characterise, as a natural
generalisation of prime algebraic domains, a class of domains,
referred to as weak prime domains.
We then identify a corresponding class of event structures, that we call
connected event structures, via a duality result formalised as an equivalence
of categories.
We show that connected event structures are exactly the class of
event structures that arise as the semantics of non-linear graph
rewriting systems.
Interestingly, the category of general unstable event structures
coreflects into our category of weak prime domains, so that our
result provides a characterisation of the partial orders of
configurations of such event structures.
Index Terms:
Event structures, fusions, graph rewriting, process calculi.
I Introduction
For a long time stable/prime event structures and their duality with
prime algebraic domains have been considered one of the landmarks of
concurrency theory, providing a clear characterisation of causality in
software systems. They have been used to provide a concurrent
semantics to a wide range of foundational formalisms, from Petri
nets [1] to linear graph rewriting
systems [2, 3, 4] and process
calculi [5, 6, 7]. They are one of the
standard tools for the formal treatment of (true, i.e.,
non-interleaving) concurrency. See, e.g., [8] for a
reasoned survey on the use of such causal models. Recently, they have
been used in the study of concurrency in weak memory
models [9, 10, 11] and for process mining and
differencing [12].
In order to endow a chosen formalism with an event structure
semantics, a standard construction consists in viewing the class of
computations as a partial order. An element of the order is some sort
of configuration, i.e., an execution trace up to an equivalence that
identifies traces differing only for the order of independent steps
(e.g., interchange law [13] in term rewriting, shift
equivalence [14] in graph rewriting or permutation
equivalence [15] in λ-calculus),
and the order relates two computations when
the latter is an extension of the former.
Events are then identified with configurations consisting
of a maximal computation step (e.g., a transition of a CCS process or
a firing for a Petri net) with all its causes.
As a simple example, consider the CCS process a.c∣b.
The corresponding transition system is depicted in Fig. 1(a). We can identify the states of the computation with the sets of actions executed and obtain the partial order depicted in Fig. 1(b).
The fact that each computation step in a configuration has a uniquely determined
set of causes, a property that for event structures is called
stability, allows one to characterise such elements, order
theoretically, as the prime elements: if they are included in a join
they must be included in one of the elements that are joined.
For example, in Fig. 1(b), the events correspond to configurations {a} (transition a with
empty set of causes), {a,c} (transition c caused by a) and
{b} (transition b with empty set of causes).
Each element of the partial order of configurations can be
reconstructed uniquely as the join of the primes under it, so that the partial
order is prime algebraic.
This duality between event structures and domains of configurations
can be nicely formalised in terms of an equivalence between the
categories of prime event structures and prime algebraic
domains [1, 16].
The set up described so far fails when moving to formalisms where a
computational step can merge parts of the state. This happens, e.g.,
in nominal calculi where, as a result of name passing,
the received name is identified with a local one at the
receiver [17, 18] or in the modelling of bonding in biological/chemical processes [19].
Whenever we think of the state of the system as some kind of graph
with the dynamics described by graph rewriting, this means that rewriting rules
are non-linear (more precisely, in the jargon of the double pushout
approach [20], left-linear but possibly not right-linear).
In general terms, the point is that, in the presence of fusions, the
same event can be enabled by different minimal sets of events, thus
preventing the identification of a proper notion of causality.
As an example, consider the graph rewriting system in
Fig. 2.
The start graph Gs and the rewriting rules pa, pb, and pc
are reported in Fig. 2(a). Observe that rules py,
where y can be either a or b, delete edge yˉ and merge
nodes c and ν. The possible rewrites are depicted in
Fig. 2(b). For instance, applying pa to Gs
we get the graph Gb. Now, pb can still be applied to Gb
matching its left-hand side non-injectively, thus getting graph
Gab. Similarly, we can apply first pb and then pa,
obtaining again Gab. Observe that at least one between pa
and pb must be applied to enable pc, since the latter rule requires
nodes c and ν to be merged.
Note also that in a situation where all the three rules pa, pb, and
pc are applied, since pa and pb are independent,
it is not possible to define a proper notion of causality. We only
know that at least one between pa and pb must be applied
before pc.
The corresponding domain of configurations, reported in
Fig. 2(c), is naturally derived from the
possible rewrites in Fig. 2(b).
The graph rewriting system of Fig. 2(a) is a (simplified) representation of the
π-calculus process (νc)(aˉ(c)∣bˉ(c)∣c()). Rules py, for y∈{a,b}, represent the execution of
yˉ(c) that outputs on channel y the restricted name c. The
first rule that is executed extrudes name c, while the second is just a standard
output. The name c is available outside the scope only after the extrusion, and
after that the input prefix c() can be consumed. Figure 3 shows the possible transitions of the process, which correspond one-to-one to the possible rewrites of Fig. 2(b).
The impossibility of modelling these situations with stable
event structures
is well-known (see,
e.g., [16] for a general discussion, [2] for
graph rewriting systems or [17] for the π-calculus). One has
to drop the stability requirement and replace causality
by an enabling relation ⊢. More precisely, in the specific case
we would have
∅⊢a, ∅⊢b, {a}⊢c,
{b}⊢c.
The questions that we try to answer is: what can be retained of the
duality between events structures and domains, when
dealing with formalisms with fusions? Which are the properties of
the domain of computations that arise in this setting? What are the
event structure counterparts?
The domain of configurations of the example suggests that in this
context an event is still a computation that cannot be decomposed
as the join of other computations. Hence, in order theoretical terms,
it is an irreducible.
However, due to unstability, irreducibles are not necessarily primes: two different
irreducibles can represent the same computation step with different minimal enablings,
in
a way that an irreducible can be included in a computation that is the
join of two computations without being included in any of the two. For
instance, in the example above, {a,c} is an irreducible,
corresponding to the execution of c enabled by a, and it is
included in {a}⊔{b,c}={a,b,c},
although neither
{a,c}⊆{a} nor
{a,c}⊆{b,c}.
Uniqueness of decomposition of an element in terms of (downward closed sets of) irreducibles
also fails, e.g.,
{a,b,c}={a}⊔{b}⊔{a,c}={a}⊔{b}⊔{b,c}: the irreducibles {a,c} and {b,c} can be used
interchangeably in the decomposition of {a,b,c}.
Building on the previous observation, we introduce an equivalence on irreducibles
identifying those that can be used interchangeably in the
decompositions of an element (intuitively, different minimal enablings
of the same computation step). This is used to define a weaker notion of primality
(up to interchangeability) that allows us to characterise the class of domains
suited for modelling the semantics of formalisms with fusions as
the class of weak prime algebraic domains.
Given a weak prime algebraic domain, a corresponding event structure
can be obtained by taking as events the set of irreducibles,
quotiented under the (transitive closure of the) interchangeability
relation. The resulting class of event structures is a (mild)
restriction of the general event structures in [16]
that we call connected event structures. Categorically, we get an
equivalence between the category of weak prime algebraic domains and
the one of connected event structures, generalising the equivalence
between prime algebraic domains and prime event structures.
We also show that, in the same way as prime algebraic domains/prime
event structures are exactly what is needed for Petri nets/linear graph
rewriting systems, weak prime
algebraic domains/connected event structures are exactly what is needed
for non-linear graph rewriting systems: each rewriting system maps to
a connected event structure and conversely each connected event structure
arises as the semantics of some rewriting system. This supports the
adequateness of weak prime algebraic domains and connected event
structures as semantics structures for formalisms with fusions.
Interestingly, we can also show that the category of general
event structures [16] coreflects into our category of weak
prime algebraic domains. Therefore our notion of weak prime algebraic
domain can be seen as a novel characterisation of the partial order of
configurations of such event structures that is alternative to those
based on intervals in [21, 22]. It represents a
natural generalisation of the one for prime event structures, with
irreducibles (instead of primes) having a tight connection with
events. The correspondence is established, at a categorical level, as a
coreflection of categories:
to the best of our knowledge, this has not been done before in the literature.
As mentioned above, weak prime domains, corresponding to possibly
unstable event structures, satisfy the same conditions as prime
domains, corresponding to stable event structures, up to an
equivalence on irreducibles. This suggests the possibility of viewing
unstable event structures as stable ones up to an equivalence on
events.
We show how this can be formalised with a set up closely
related to the framework of prime event structures with equivalence
recently devised in [23, 24].
Event structures and their domains have been also studied in relation
with automata with concurrency [25, 26],
a form of automata endowed with a concurrency relation on transitions
(local to each state).
On a similar line, the transition graphs of prime event structures
have been given a characterisation in terms of local axioms
in [27], answering a question posed in [28].
Recently, in connection with the abstract theory of rewriting and
concurrent games, a slightly different but equivalent characterisation
has been rediscovered in [29], where prime event structures
are shown to correspond exactly to a suitable class of
asynchronous graphs.
Roughly, an asynchronous graph is a transition system where some
squares are declared to commute, meaning that the coinitial edges of
the square are concurrent and each one can follow the
other. Asynchronous graphs correspond to prime event structures that
satisfy the cube axiom, consisting of two parts: the forward
and the backward cube axioms, the latter often referred to as the
stability axiom. We show that asynchronous graphs that verify only the
forward part of the cube axiom are exactly the transition systems of
weak prime domains.
The rest of the paper is structured as follows. In
Section II we recall the basics of (prime) event
structures and their correspondence with prime algebraic domains. In
Section III we introduce weak prime algebraic domains and
connected event structures, and we characterise their relation
categorically.
In Section IV
we present a characterisation of our proposal
in terms of a formalism reminiscent of prime event structures with equivalence of [23, 24].
We also discuss and formalise the relation of our work with alternative characterisations of the domains of event structures based on intervals and on asynchronous graphs.
In Section V we show the intimate connection between
weak prime algebraic domains (or equivalently, connected event
structures) and non-linear graph rewriting systems.
Finally, in Section VI we wrap up the main contributions of
the paper and we sketch further advances and some connections with
related works.
The paper is rounded up with an appendix extending our characterisation results
to event structures with non-binary conflict [22]. We also discuss the relation with a proposal based on labelled event structures for
modelling the concurrent computations of name passing process
calculi [17].
This is a revised and extended version of the conference paper [30].
II Background: Domains and Event Structures
In this section we review the basics of event structures, as introduced
in [16], and their duality with partial orders.
II-A Event Structures
For the sake of presentation,
we focus on event structures with binary conflict.
Most results can be easily rephrased for event structures with
non-binary conflict expressed by means of a consistency predicate
(This is explicitly discussed in Appendix -A).
Given a set X we denote by
2X and 2finX the powerset and the set of finite subsets
of X, respectively. For m,n∈N, we denote by
[m,n] the set {m,m+1,…,n}.
Definition 1** (event structure)**
An event structure (es for short) is a tuple
⟨E,⊢,#⟩ such that
E is a set of events;
⊢⊆2finE×E is the enabling
relation, satisfying X⊢e and X⊆Y
implies Y⊢e;
#⊆E×E is the conflict relation.
A subset X⊆E is consistent if ¬(e#e′)
for all e,e′∈X.
□
An es ⟨E,⊢,#⟩ is often
denoted simply by E. Computations are captured by the notion of
configuration.
Definition 2** (configuration, live event structure)**
Let ⟨E,⊢,#⟩ be an es. A
configuration of E is a consistent subset C⊆E
that is secured, i.e., such that for all e∈C there are
e1,…,en∈C with en=e such that
{e1,…,ek−1}⊢ek for all k∈[1,n]
(in particular, ∅⊢e1). The set of configurations
of an es E is denoted by Conf(E) and the subset of
finite configurations by ConfF(E).
An es is live if conflict is
saturated, i.e., for all
e,e′∈E, if there is no C∈Conf(E) such that
{e,e′}⊆C then e#e′, and moreover
for all e∈E it holds ¬(e#e).
□
Remark 1
In live es, the fact that conflict is saturated corresponds
to inheritance of conflict in prime event structures. Moreover, the
absence of self-conflicts implies that each event appears in some
configuration (intuitively, it is executable). In the rest of the
paper, we restrict to live es, hence the qualification
“live” is omitted.
□
In this setting, two events are concurrent when they are consistent
and enabled by the same configuration.
Since the enabling predicate is over finite sets of events, we can
consider minimal sets of events enabling a given one.
Definition 3** (minimal enabling)**
Let ⟨E,⊢,#⟩ be an es. Given a
configuration C∈Conf(E) and an event e∈E we write
C⊢0e and call it a minimal enabling for e, when
C∪{e}∈Conf(E) (hence C∪{e} consistent and
C⊢e), and for any other configuration C′⊆C, if
C′⊢e then C′=C.
□
The classes of stable and prime es represent our starting point and
play an important role in the paper.
Definition 4** (stable and prime event structures)**
An es ⟨E,⊢,#⟩ is stable
if X⊢e, Y⊢e, and X∪Y∪{e} consistent
imply X∩Y⊢e. It is prime if X⊢e and
Y⊢e imply X∩Y⊢e.
□
For stable es, given a configuration C and an event e∈C,
there is a unique minimal configuration C′⊆C such that
C′⊢0e. The set C′ can be seen as the set of causes of
the event e in the configuration C. This gives a well-defined notion of
causality that is local to each configuration. In a prime es, for any event e
there is a unique minimal enabling C⊢0e, thus providing a
global notion of causality.
In general, in possibly unstable es, due to the presence of consistent
or-enablings, there might be distinct minimal enablings in the
same configuration.
Example 1
A simple example of unstable es is the one associated with
the running example discussed in the introduction (see
Fig. 2). The set of events is {a,b,c}, the
conflict relation # is the empty one and the minimal enablings
are ∅⊢0a, ∅⊢0b,
{a}⊢0c, and {b}⊢0c. Thus, event c has
two minimal enablings and these are consistent, hence
{a,b}⊢c. The corresponding configurations are
reported in Fig. 2(c).
□
The class of es can be turned into a category.
Definition 5** (category of event structures)**
A morphism of es f:E1→E2
is a partial function f:E1→E2 such that for all
C1∈Conf(E1) and e1,e1′∈E1 with f(e1), f(e1′) defined
if f(e1)#f(e1′) then e1#e1′;
if f(e1)=f(e1′) then e1=e1′ or e1#e1′;
if C1⊢1e1 then f(C1)⊢2f(e1).
We denote by ES the category of es and their
morphisms and by sES and pES, respectively, the full subcategories of stable and prime es.
□
II-B Domains
A preordered or partially ordered set ⟨D,⊑⟩
is often denoted simply as D, omitting the (pre)order
relation. We denote by
⪯ the immediate predecessor relation, i.e., for x,y∈D,
we write x⪯y whenever
x⊑y and for all z∈D if
x⊑z⊑y then z∈{x,y}.
A subset X⊆D is consistent
if it has an upper bound d∈D (i.e., x⊑d for all x∈X),
while it is pairwise consistent if
every two elements subset
of X is consistent.
A subset X⊆D is directed if X=∅ and
every pair of elements in X has an upper bound in X. We say that
D is complete if every directed subset has a least upper
bound in D.
A subset X⊆D is an ideal if it is directed and
downward closed.
Given an element x∈D, we write ↓x to
denote the principal ideal {y∈D∣y⊑x} generated by x.
Given a partial order D, its ideal completion, denoted by Idl(D), is the
set of ideals of D, ordered by subset inclusion.
The least upper bound and the greatest lower bound of a
subset X⊆D (if they exist) are denoted by ⨆X
and \bigsqcapX, respectively.
Definition 6** (domains)**
A partial order D is coherent if for all
pairwise consistent X⊆D the least
upper bound ⨆X exists.
An element d∈D is compact if for all directed
X⊆D, d⊑⨆X implies
d⊑x for some x∈X. The set of compact
elements of D is denoted by K(D).
A coherent partial order D is algebraic
if for every x∈D we have
x=⨆(↓x∩K(D)). We say that D
is finitary if for every element a∈K(D) the set
↓a is finite.
We refer to
algebraic finitary coherent partially ordered sets as
domains.
□
Note that every domain has a bottom element (indeed ⊥=⨆∅), and that
in a domain all non-empty subsets have a meet. In fact, if
∅=X⊆D, then \bigsqcapX=⨆L(X)
where L(X)={y∣∀x∈X.y⊑x} is the
set of lowerbounds of X, which is pairwise consistent since it is
dominated by any x∈X. And it is easy to see that finite joins of
compact elements are compact.
For a domain D we can think of its elements as “pieces of
information” expressing the states of evolution of a process. Compact
elements represent states that are reached after a finite number of
steps. Thus algebraicity essentially says that infinite
computations can be approximated with arbitrary precision by finite
ones. More formally, when D is algebraic, it is determined by
K(D), i.e., D≃Idl(K(D)).
For an es, the configurations ordered by subset inclusion form
a domain. When the es is stable, if a minimal
enabling is included in the join of different configurations, then it is necessarily included in one of the configurations. In
order-theoretic terms, minimal enablings are prime elements, and thus
they represent the building blocks of computations.
Definition 7** (primes and prime algebraicity)**
Let D be a domain.
A complete prime is an element p∈D
such that for any pairwise consistent X⊆D, if
p⊑⨆X then p⊑x for some
x∈X.
The set of complete prime elements of D is denoted by pr(D).
The domain D is prime algebraic (or simply prime)
if for all x∈D we have
x=⨆(↓x∩pr(D)).
□
Prime domains can be also characterised as coherent finitary distributive complete partial orders [16].
Note that complete primes are compact (since each directed set is pairwise
consistent). Since we will only use complete primes, the qualification “complete” will be omitted.
Prime domains are the domain
theoretical counterpart of stable and prime es.
For a stable es ⟨E,#,⊢⟩, the
partial order ⟨Conf(E),⊆⟩ is
a prime domain, denoted DS(E). Conversely,
given a prime domain D, the triple
⟨pr(D),#,⊢⟩, where p#p′ if {p,p′}
is not consistent and X⊢p when
(↓p∩pr(D))∖{p}⊆X,
is a prime es, denoted ES(D).
This correspondence can be elegantly formulated at the categorical
level [16].
We recall the notion of domain morphism.
Definition 8** (category of prime domains)**
Let D1, D2 be prime domains. A morphism
f:D1→D2 is a total function such that
for all consistent X1⊆D1 and
d1,d1′∈D1
-
if d1⪯d1′ then f(d1)⪯f(d1′);
2. 2.
f(⨆X1)=⨆f(X1);
3. 3.
if X1=∅ then
f(\bigsqcapX1)=\bigsqcapf(X1);
We denote by pDom the category of prime domains and
their morphisms.
□
The correspondence is then captured by the result below.
Theorem 1** (duality)**
There are functors DS:sES→pDom and
ES:pDom→sES establishing a coreflection. It restricts
to an equivalence of categories between pDom and pES.
□
III Weak Prime Domains and Connected Event Structures
In this section we show that, relaxing the stability assumption, we
can generalise the duality result described in the previous
section, linking suitably defined classes of domains and
es. These can be proven to properly capture the
semantics of computational formalisms with fusions.
III-A Weak Prime Algebraic Domains
We show that domains arising in absence of stability can be
characterised by resorting to a weakened notion of prime element.
We start recalling the notion of irreducible element.
Definition 9** (irreducibles)**
Let D be a domain. A complete irreducible of D is an
element x∈D such that, for any pairwise consistent
X⊆D, if x=⨆X then x∈X. The set of
complete irreducibles of D is denoted by ir(D) and, for
d∈D, we define ir(d)=↓d∩ir(D).
□
Observe that complete irreducibles in a domain are compact. In fact,
if i is a complete irreducible, by algebraicity,
i=⨆↓i∩K(D) whence
i∈↓i∩K(D). Conversely, we have the following.
Lemma 1** (irreducibility and compactness)**
Let D be a domain. If d∈K(D) then d is a complete
irreducible iff for all x,y∈D, consistent,
d=x⊔y implies d=x or d=y.
□
Proof
Let d∈K(D). Assume that for all x,y∈D, consistent,
d=x⊔y implies d=x or d=y.
Assume that d=⨆X for some pairwise consistent X. It
is easy to see that X′={⨆Y∣Y∈2finX}
is directed and moreover ⨆X′=⨆X=d. Since d
is compact, there is x′∈X′ such that d⊑x′, hence
d=x′. By definition of X′, this means that there exists
Y∈2finX such that d=⨆Y. Now, using the hypothesis,
an inductive reasoning allows us to conclude that
d∈Y⊆X, as desired.
The converse implication is trivial: if d∈ir(D) and
d⊑x⊔y then, by definition of complete
irreducible, d∈{x,y}, i.e., either d=x or d=y, as
desired.
■
Since in this paper we will refer only to complete irreducibles, the qualification “complete” will be omitted.
Irreducibles in domains have a simple characterisation.
Lemma 2** (unique predecessor for irreducibles)**
Let D be a domain and i∈D. Then i∈ir(D)
iff it has a unique immediate predecessor.
□
Proof
Assume that i∈D has a unique immediate predecessor
d≺i, and let X⊆D be pairwise consistent and
such that i=⨆X. Hence for any x∈X we have
x⊑i. Assume by contradiction that i∈X. This
implies that for all elements x∈X we have x⊑d, and therefore
i=⨆X⊑d≺i, which is a contradiction.
Hence it must be i∈X, which means that i is irreducible.
Vice versa, let i be irreducible and let d1,d2≺i be
immediate predecessors. Since D is a domain and {d1,d2}
is consistent, we can take d=d1⊔d2 and we know
d1⊑d⊑i. Since i is irreducible it cannot be
d=i, therefore d=d1 and thus d1=d2. Thus we conclude that
i has a unique immediate predecessor.
■
The unique predecessor of an irreducible will play an important role, hence we introduce a notation.
Definition 10** (immediate predecessor)**
Let D be a domain and i∈ir(D). We denote by p(i) the
(unique) immediate predecessor of i.
□
We next observe that any domain is actually irreducible algebraic, namely it can be generated by the irreducibles.
Proposition 1** (domains are irreducible algebraic)**
Let D be a domain. Then for any d∈D it holds
d=⨆ir(d).
□
Proof
We first prove that for any compact element d∈K(D) it
holds that d=⨆(↓d∩ir(D)).
The thesis then immediately follows from algebraicity of D. Since
D is a domain, ↓d is finite, hence we can proceed by
induction on ∣↓d∣. When ∣↓d∣=1, we have
that d=⊥, hence ↓d∩ir(D)=∅ and
indeed ⊥=⨆∅. When ∣↓d∣=k>1
consider the immediate predecessors of d and denote them
d1,…,dn≺d. Since D is a domain and
{d1,…,dn} is consistent, there exists
⨆{d1,…,dn}=d′ and
di⊑d′⊑d. There are two cases
d′=di, for all i∈[1,n],
i.e., d has a unique immediate predecessor, hence it is an
irreducible and thus clearly d=⨆(↓d∩ir(D)) or
d=d′=⨆{d1,…,dn}. Since, in turn,
by inductive hypothesis di=⨆(↓di∩ir(D))
and ↓d∩ir(D)=⋃i=1n(↓di∩ir(D)),
we immediately get the thesis.
■
We next observe that every prime is an irreducible and, if D is a
prime domain, then also the converse holds, i.e., irreducibles
coincide with primes.
Proposition 2** (irreducibles vs. primes)**
Let D be a domain. Then pr(D)⊆ir(D). Moreover, D is a
prime domain iff pr(D)=ir(D).
□
Proof
Let D be a domain. We show that pr(D)⊆ir(D). Let
d∈pr(D). Assume that d=⨆X for some pairwise
consistent set X. By primality, since d⊑⨆X
there must be x∈X such that d⊑x. We have also
x⊑⨆X=d and thus d=x∈X.
For the second part, let us assume that D is a prime domain. We have to prove that pr(D)=ir(D). We already know that pr(D)⊆ir(D).
For the converse inclusion, let i∈ir(D). By
prime algebraicity i=⨆(↓i∩pr(D)). Since i is irreducible, there exists
p∈↓i∩pr(D) such that i=p, hence i is
a prime.
Vice versa, if D is a domain, by Proposition 1 we
know that D is irreducible algebraic. Hence, if pr(D)=ir(D),
we immediately conclude that D is prime.
■
Quite intuitively, in the domain of configurations of an es the
irreducibles are minimal enablings of events. For instance, in the
domain depicted in Fig. 2(c) the
irreducibles are {a}, {b}, {a,c}, and {b,c}.
For stable es, the domain is prime and thus, as observed
above, irreducibles coincide with primes. This fails in unstable es,
as we can see in our running example: while {a} and
{b} are primes, the two minimal enablings of c, namely
{a,c} and {b,c}, are not. In fact,
{a,c}⊆{a}⊔{b,c}, but neither
{a,c}⊆{a} nor {a,c}⊆{b,c}.
The key observation is that in general an event corresponds to a class of
irreducibles, like {a,c} and {b,c} in our
example. Additionally, two irreducibles corresponding to the same
event can be used, to a certain extent, interchangeably for building
the same configuration. For instance,
{a,b,c}={a,b}⊔{a,c}={a,b}⊔{b,c}.
We next formalise this intuition, i.e., we interpret
irreducibles in a domain as minimal enablings of some event and we
identify classes of irreducibles corresponding to the same event.
We start by observing that, in a prime domain, any element admits a unique decomposition in terms of downward closed sets of irreducibles (or, equivalently, of primes).
Lemma 3** (unique decomposition in prime domains)**
Let D be a prime domain and let X,X′⊆ir(D) be
downward closed sets of irreducibles.
If ⨆X=⨆X′ then X=X′.
□
Proof
Let X,X′⊆ir(D) be downward closed sets of irreducibles
such that ⨆X=⨆X′. Take any i′∈X′. Then
i′⊑⨆X. Since the domain is prime
algebraic, and thus i′ is prime, there must exist i∈X such
that i′⊑i and thus i′∈X. Therefore
X′⊆X. By symmetry also the converse inclusion holds,
whence equality.
■
The result above no longer holds in domains arising in the presence
of fusions. For instance, in the domain in
Fig. 2(c),
X={{a},{b},{a,c}}, X′={{a},{b},{b,c}}
and X′′={{a},{b},{b,c},{a,c}} are all decompositions
for {a,b,c}.
The idea is to identify irreducibles
that can be used interchangeably in a decomposition.
Definition 11** (interchangeability)**
Let D be a domain and i,i′∈ir(D). We write
i↔i′ if {i,i′} consistent and for all
X⊆ir(D) such that X∪{i} and
X∪{i′} are downward closed and consistent we have
⨆(X∪{i})=⨆(X∪{i′}).
□
In words, i↔i′ means that i and i′ produce the
same effect when added to a decomposition that already includes their
predecessors.
Hence, intuitively, i and i′ correspond to the execution of the
same event with different and consistent enablings.
We first observe that distinct irreducibles related by the
interchangeability relation are necessarily incomparable.
Lemma 4** (↔ vs ⊑)**
Let D be a domain and let i,i′∈ir(D).
If i↔i′ and i⊑i′ then i=i′.
□
Proof
Let i↔i′ and i⊑i′.
If i=i′ and we let
X=ir(p(i′)), it turns out that X∪{i}=X and
X∪{i′} are consistent and downward closed. Moreover
⨆X∪{i}=⨆X=p(i′)=⨆X∪{i′}=i′, contradicting i↔i′.
■
We next give some characterisations of interchangeability.
Lemma 5** (characterising ↔)**
Let D be a domain and i,i′∈ir(D). Then the
following are equivalent
-
i↔i′;
2. 2.
{i,i′}* consistent and for all d∈K(D)
if p(i),p(i′)⊑d then
d⊔i=d⊔i′;*
3. 3.
{i,i′}* consistent and i⊔p(i′)=p(i)⊔i′.*
□
Proof
(1 → 2)
Assume that i↔i′. By definition, {i,i′} is
consistent. Let d∈K(D) be such that
p(i),p(i′)⊑d. If we let X=ir(d) we have
that ir(i)∖{i}⊆X and similarly
ir(i′)∖{i′}⊆X. This implies that
X∪{i} and X∪{i′} are downward closed and
consistent. Hence
d⊔i=⨆X⊔i=⨆(X∪{i})=⨆(X∪{i′})=⨆X⊔i′=d⊔i′.
(2 → 3)
Assume (2). Let p=p(i)⊔p(i′),
which is in K(D) since
p(i),p(i′)∈K(D). Clearly,
p(i),p(i′)⊑p.
Therefore
i⊔p(i′)=i⊔p(i)⊔p(i′)=i⊔p=p⊔i′=p(i)⊔p(i′)⊔i′=p(i)⊔i′.
(3 → 1) Assume
(3). Let X⊆ir(D)
be such that X∪{i} and X∪{i′} are downward
closed and consistent sets of irreducibles. This implies that
ir(p(i))⊆X and similarly
ir(p(i′))⊆X. Hence, if we let
P=ir(p(i))∪ir(p(i′)), we have
P⊆X and ⨆P=p(i)⊔p(i′).
Therefore
\begin{array}[]{ll}\bigsqcup(X\cup\{i\})=\\
\quad=(\bigsqcup X\setminus P)\sqcup\bigsqcup P\sqcup i=\\
\quad=(\bigsqcup X\setminus P)\sqcup\mathit{p}({i})\sqcup\mathit{p}({i^{\prime}})\sqcup i=\\
\quad=(\bigsqcup X\setminus P)\sqcup i\sqcup\mathit{p}({i^{\prime}})=\\
\quad=(\bigsqcup X\setminus P)\sqcup\mathit{p}({i})\sqcup i^{\prime}=\\
\quad=(\bigsqcup X\setminus P)\sqcup\mathit{p}({i})\sqcup\mathit{p}({i^{\prime}})\sqcup i^{\prime}=\\
\quad=(\bigsqcup X\setminus P)\sqcup\bigsqcup P\sqcup i^{\prime}=\\
\quad=\bigsqcup(X\cup\{i^{\prime}\})\end{array}
■
The interchangeability relation is clearly reflexive and symmetric, but not
transitive in general: in the domain of Fig. 4, using the characterisation in Lemma 5(3) one can easily see that
i↔i1 and i1↔i′ but not
i↔i′, simply because
{i,i′} is not consistent.
More interestingly, in the domain of Fig. 5, we have i↔i1, i1↔i2, i2↔i′, hence i↔∗i′. However, despite the fact that {i,i′} is consistent, it does not hold i↔i′, since p(i)⊔i′=i⊔p(i′).
This shows that the intuition that
interchangeable irreducibles correspond to the execution of the
same event with different and consistent enablings is still not properly captured. Since i and i′ represent the execution of the same event and they are consistent, one would expect that they are interchangeable.
The next definition formalises two additional properties that a domain must enjoy to provide ↔ the intended meaning.
Definition 12** (interchangeable domain)**
Let D be a domain.
We say that D is interchangeable when
-
for all i,i′∈ir(D), if {p(i),p(i′)} consistent
and i↔∗i′ then i↔i′;
2. 2.
for all i,i′,j,j′∈ir(D), if
i↔∗i′, j↔∗j′, and {i′,j′},
{p(i),j},
{p(j),i} consistent then {i,j} consistent.
□
Property (1) is motivated by the discussion above. It intuitively asks that whenever i and i′ represents the execution of the same event and they are consistent, then they are interchangeable. Property (2) can
be read as follows: if i,i′ and j,j′ represent the same events
and i′,j′ are consistent, the only source of inconsistency
between i and j is in their enablings. In other words, either i and j are consistent or it must be that p(i) is inconsistent with j, or i is inconsistent with p(j). A situation in which this property fails is illustrated in Fig. 6.
We now introduce weak primes: they weaken the property
of prime elements, requiring that it holds up to
interchangeability.
Definition 13** (weak prime)**
Let D be a domain. A weak prime of D is an element
i∈ir(D) such that for all pairwise consistent
X⊆D, if i⊑⨆X then there exist
i′∈ir(D) and d∈X such that i↔i′ and
i′⊑d. We denote by wpr(D) the set of weak primes of
D.
□
Clearly, since interchangeability is reflexive, any prime is a weak
prime. Moreover, in prime domains interchangeability turns out to be
the identity and thus also the converse holds.
Lemma 6** (weak primes in prime domains)**
Let D be a prime domain. Then ↔ is the
identity and wpr(D)=pr(D).
□
Proof
Let i,i′∈ir(D) be such that i↔i′.
If i and i′ are comparable, i.e., i⊑i′ or
i′⊑i, by Lemma 4 we deduce
i=i′ and we are done.
Otherwise,
let
X=(ir(i)∖{i})∪(ir(i′)∖{i′}).
Note that X∪{i} and X∪{i′} are consistent,
since, by definition of ↔, i and i′ are so.
Moreover X∪{i} and X∪{i′} are downward closed,
and thus, from i↔i′, we deduce
⨆(X∪{i})=⨆(X∪{i′}). Since D
is prime, by Lemma 3, this
implies that X∪{i}=X∪{i′}.
Since i and i′ are uncomparable,
i,i′∈X and we
conclude i=i′.
■
We argue that the domain of configurations arising in the presence of
fusions can be characterised domain-theoretically as interchangeable domains
where all irreducibles are weak primes, i.e., that the domain is
algebraic with respect to weak primes.
Definition 14** (weak prime algebraic domains)**
Let D be an interchangeable domain. It is weak prime algebraic (or simply
weak prime) if for all d∈D it holds
d=⨆(↓d∩wpr(D)).
□
Observe that weak prime domains are assumed to be interchangeable. This hypothesis will actually play a role only when relating weak prime domains and event structures in Section III-C. However, in order to simplify the presentation we preferred to assume it since the beginning.
In the same way as prime domains are domains where all
irreducibles are primes (see Proposition 2), we
can provide a characterisation of weak prime domains in terms of
coincidence between irreducibles and weak primes.
Proposition 3** (weak prime domains, again)**
Let D be an interchangeable domain.
It is weak prime iff all irreducibles are weak primes.
□
Proof
Let D be an interchangeable domain. We know, by
Lemma 1, that D is irreducible
algebraic. If all irreducibles are weak primes, then clearly D is
also weak prime algebraic. Conversely, if it is weak prime
algebraic, then for any irreducible i∈ir(D), we have that
i=⨆(↓i∩wpr(D)). Since i is
irreducible, this implies
i∈↓i∩wpr(D)⊆wpr(D), as desired.
■
A domain is often built as the ideal completion of its compact
elements. We next provide a characterisation of domains and weak prime
domains based on the generators.
Lemma 7** (weak prime domains from generators)**
Let (P,⊑) be a finitary partial order such that
for all d,d′,d′′∈P, if
{d,d′,d′′} is pairwise consistent then d⊔d′ exists
and is consistent with d′′. Then Idl(P) is a domain with
K(Idl(P))={↓d∣d∈P}≃P.
Additionally, let P be interchangeable and for all i∈ir(P),
d,d′∈P consistent, if i⊑d⊔d′ then there
is i′∈ir(P), i↔i′ such that
i′⊑d or i′⊑d′. Then Idl(P) is a
weak prime domain.
□
Proof
Let (P,⊑) be a
finitary partial order such that for all d,d′,d′∈P′,
if {d,d′,d′′} is pairwise consistent then
d⊔d′ exists and is consistent with d′′.
The fact that Idl(P) is a
complete algebraic finitary
partial order with
K(Idl(P))={↓d∣d∈P}≃P is
a standard result.
Moreover, let X⊆Idl(P) pairwise consistent. Consider
A=⋃{I∣I∈X}. Observe that for any finite
Y⊆A there exists ⨆Y in P. In fact, let
Y={y1,…,yn}. This means that there are
I1,…,In such that yi∈Ii for each
i∈[1,n]. Since X is pairwise consistent in
Idl(P), we deduce that Y is pairwise consistent in P.
Since y1,y2 are consistent and both are consistent with
y3,…,yn, by hypothesis there exists y1⊔y2 and it is
consistent with y3,…,yn, i.e.,
{y1⊔y2,y3,…,yn} is again pairwise
consistent. Iterating the reasoning we get the existence of
y1⊔y2⊔…⊔yn=⨆Y, as desired.
Now, if we define
I′={⨆Y∣Y⊆finA}, then
I′ is an ideal and I′=⨆X.
Let us consider the second part. It is easy to see that
ir(Idl(P))={↓i∣i∈ir(P)}.
Moreover, for i,i′∈ir(P) we have i↔i′
in P if and only if
↓i↔↓i′ in Idl(P).
This immediately implies that Idl(P) is interchangeable, because so is
P by assumption.
We need to show that, under the hypotheses, if
I∈ir(Idl(P)) and X⊆Idl(P) pairwise
consistent and I⊆⨆X then there exists
I′↔I and A∈X such that I′⊆A. Thus let I=↓i for some i∈ir(P). The fact
that
I=↓i⊆⨆X=⨆{↓d∣d∈⋃X}, since ↓i is
finite, means that
↓i⊆↓d1∪…∪↓dn for some finite subset
{d1,…,dn}⊆⋃X and thus
i⊑⨆{d1,…,dn}. Since
i⊑d1⊔⨆{d2,…,dn}, by the
hypothesis there is i1↔i such that
i1⊑d1 or
i1⊑⨆{d2,…,dn}=d2⊔⨆{d3,…,dn}.
In the second case, again by the hypotheses, there are two
possibilities. The first is that there is i2↔i1,
such that i2⊑d2. Note that, since p(i) and
p(i2) are clearly consistent (they are dominated by
⨆{d1,…,dn}), by property
(1) of well-interchangeability
(Definition 12), we get
i2↔i.
The second possibility is that
i2⊑⨆{d3,…,dn}, and we can iterate the reasoning.
In the end, we get the existence of some
i′↔i and j∈[1,n] such that
i′⊑dj. Recalling that dj∈⋃X, there is
A∈X such that dj∈A, hence
↓i′⊆↓dj⊆A. Since i↔i′ in P implies
↓i↔↓i′ in Idl(P),
we conclude.
■
We finally introduce a category of weak prime domains by defining a notion of morphism.
Definition 15** (category of weak prime domains)**
Let D1, D2 be weak prime domains.
A weak prime domain morphism f:D1→D2 is a total function such that
for all consistent X1⊆D1 and d1,d1′∈D1
-
if d1⪯d1′ then f(d1)⪯f(d1′);
2. 2.
f(⨆X1)=⨆f(X1);
3. 3.
if d1,d1′ consistent and
d1⊓d1′⪯d1 then
f(d1⊓d1′)=f(d1)⊓f(d1′);
We denote by wDom the category of weak prime domains
and their morphisms.
□
Compared with the notion of morphism for prime domains in
Definition 8 (from [16]), we still
require the preservation of ⪯ and ⊔ of consistent sets
(conditions (1) and (2)). However, the third condition, i.e.,
preservation of ⊓, is weakened to preservation in some
cases. General preservation of meets is indeed not expected in the
presence of fusions. Consider, e.g., the es in
Example 1. Take another es E′={c}
with ∅⊢c and the morphism f:E→E′ that forgets
a and b, i.e., f(c)=c and f(a), f(b) undefined.
Then f({a,c})⊓f({b,c})={c}⊓{c}={c}=f({a,c}⊓{b,c})=f(∅)=∅.
Intuitively, the condition d1⊓d1′≺d1 means that
d1′ includes the computation modelled by d1 apart from a final
step, hence d1⊓d1′ coincides with d1 when such step is
removed. Since domain morphisms preserve immediate precedence (i.e.,
single steps), also f(d1) differs from f(d1′) for the
execution of a final step and the meet f(d1)⊓f(d1′) is
f(d1) without such step, and thus it coincides with
f(d1⊓d1′).
In general we only have
f(\bigsqcapX1)⊑\bigsqcapf(X1)
In fact, for all x1∈X1, we have
\bigsqcapX1⊑x1, hence
f(\bigsqcapX1)⊑f(x1) and thus
f(\bigsqcapX1)⊑\bigsqcapf(X1).
Still, when restricted to prime domains, also the converse inequality
holds and our notion of morphism boils down to the original one, i.e.,
the full subcategory of wDom having prime domains as objects is
pDom.
Theorem 2** (pDom as a subcategory of wDom)**
The category of prime domains pDom is the full
subcategory of wDom having prime domains as objects.
□
Proof
We just need to show that weak prime domain morphisms preserve meets
on prime domains, i.e., that if D1, D2 are prime domains and
f:D1→D2 is a weak prime domain morphism then
f(\bigsqcapX1)=\bigsqcapf(X1) for all X1⊆D1
pairwise consistent.
We first show that for d1,d1′∈K(D1), consistent, it
holds that f(d1⊓d1′)=f(d1)⊓f(d1′). We proceed
by induction on k=∣↓d1∩pr(D)∣.
When k=0 we have d1=⊥. Since f preserves joins, we have
that
f(⊥)=f(⨆∅)=⨆f(∅)=⨆∅=⊥. Hence
f(d1⊓d1′)=f(⊥⊓d1′)=f(⊥)=⊥=⊥⊓f(d1′)=f(⊥)⊓f(d1′)=f(d1)⊓f(d1′).
Suppose now k>0. We distinguish two subcases. If d1 is not
prime then, recalling that in a prime domain, primes and
irreducibles coincide, d1 is not irreducible and thus
d1=e1⊔f1 with d1=e1,f1=⊥. It is
immediate to see that ∣↓e1∩pr(D)∣<k and
∣↓f1∩pr(D)∣<k. Moreover, since any prime
algebraic domain is distributive we have
d1⊓d1′=(e1⊔f1)⊓d1′=(e1⊓d1′)⊔(f1⊓d1′). Summing up
[TABLE]
If instead d1 is prime then note that if d1⊑d1′
the thesis is immediate: by monotonicity
f(d1)⊑f(d1′). Thus
f(d1⊓d1′)=f(d1)=f(d1)⊓f(d1′) as
desired. Therefore, let us assume that d1⊑d1′.
In this case d1⊓d1′=p(d1)⊓d1′, since the set
of lower bounds of {d1,d1′} and of {p(d1),d1′} is
the same. Observe that
[TABLE]
In fact, the join exists since d1, d1′ are consistent. Moreover, by distributivity,
d1⊓(p(d1)⊔d1′)=(d1⊓p(d1))⊔(d1⊓d1′)=p(d1)⊔(p(d1)⊓d1′)=p(d1).
Therefore
[TABLE]
as desired. This extends to the meet of finite sets of compact elements, by
associativity of ⊓, and to
infinite sets of compacts by observing that, given an infinite set
X, by finitariness we can identify a finite subset F⊆X
such that \bigsqcapX=\bigsqcapF.
The last assertion can be proved by induction on
k=min{∣↓d∣:d∈X}. In fact, let d∈X
be an element such that ∣↓d∣=k. If k=1 then
d=⊥ and thus \bigsqcapX=⊥=\bigsqcap{d}, as
desired. If k>1, then we distinguish two possibilities. If for
all d′∈X it holds d⊓d′=d then
\bigsqcapX=d=\bigsqcap{d}. If instead, there is d′∈X
such that d⊓d′⊏d then recall that the meet of
compact elements is compact and consider
X′=X∪{d⊓d′}. We have that
\bigsqcapX=\bigsqcapX′. Moreover
∣↓d⊓d′∣<k, hence we can apply the inductive
hypothesis to X′ and get a finite subset F′⊆X′ such
that \bigsqcapX′=\bigsqcapF′. We conclude observing that
\bigsqcapX=\bigsqcapX′=\bigsqcapF′=\bigsqcap((F′∖{d⊓d′})∪{d,d′}). Therefore we can take
F=(F′∖{d⊓d′})∪{d,d′} and we
conclude.
■
III-B From Event Structures to Weak Prime Domains
We show that the set of configurations of an es, ordered by
subset inclusion, is a weak prime domain where the compact elements
are the finite configurations.
Moreover, the
correspondence can be lifted to a functor. We also identify a subclass
of es that we call connected es and that are the exact counterpart of
weak prime domains (in the same way as prime es correspond to prime
algebraic domains).
Definition 16** (configurations of an event structure, ordered)**
Let E be an es. We define
D(E)=⟨Conf(E),⊆⟩.
Given an es morphism f:E1→E2, its image
D(f):D(E1)→D(E2) is defined as
D(f)(C1)={f(e1)∣e1∈C1}.
□
We need some technical facts, collected in the following lemma.
Recall that in the setting of unstable es we can have distinct
consistent minimal enablings for an event. The following notation will be useful.
Definition 17** (connected enablings)**
Let E be an es, C,C′∈Conf(E) and e∈E.
When C⊢0e, C′⊢0e, and C∪C′∪{e}
is consistent, we write C⌢eC′. We denote by ⌢e∗ the
transitive closure of the relation ⌢e.
□
Note that, whenever C⊢0e and C′⊢0e, requiring
C∪C′∪{e} consistent amounts to require C∪C′
consistent, since conflict is binary.
Lemma 8** (properties of the domain of configurations)**
Let ⟨E,⊢,Con⟩ be an es.
Then
-
D(E)* is a domain,
K(D(E))=ConfF(E), join is union and
C≺C′ iff C′=C∪{e}
for some e∈E∖C;*
2. 2.
C∈Conf(E)* is irreducible iff C=C′∪{e} and
C′⊢0e; in this case we denote C as ⟨C′,e⟩;*
3. 3.
for C∈Conf(E), we have
ir(C)={⟨C′,e′⟩∣e′∈C ∧ C′⊆C ∧ C′⊢0e′}; moreover p(⟨C′,e′⟩)=C′;
4. 4.
for ⟨C1,e1⟩,⟨C2,e2⟩∈ir(D(E)), we have
⟨C1,e1⟩↔⟨C2,e2⟩ iff e=e1=e2
and C1⌢eC2;
5. 5.
D(E)* is interchangeable.*
□
Proof
-
We first observe that, given a pairwise consistent set of
configurations X⊆Conf(E), the join is the union
⨆X=⋃X. The fact that ⋃X is a
configuration, i.e., that it is consistent and secured immediately
follows from the fact that each C∈X is.
Let C∈Conf(E) be a configuration. For every event e∈E,
since C is secured, we can consider a set
Ce={e1,…,en}⊆C such that en=e and
{e1,…,ek−1}⊢ek for all
k∈[1,n]. It is immediate to see that
Ce∈ConfF(E) and clearly C=⨆e∈CCe.
From the above it is almost immediate to conclude that the
compact elements of D(E) are the finite configurations
K(D(E))=ConfF(E) and that D(E) is algebraic.
Moreover, D(E) is finitary, since the number of subsets of a
finite configurations is clearly finite. Hence D(E) is a
domain.
Concerning immediate precedence, let C,C′∈ConfF(E). If
C′=C∪{e} with e∈C then clearly
C≺C′, since the order is subset inclusion. Conversely,
if C≺C′ by definition C⊆C′ and it must be
∣C′∖C∣=1. In fact, C⊆C′ and
C=C′, hence C′∖C=∅. Let
e,e′∈C′∖C. Let us prove that e=e′. Since C′
is secured there is a set of events
D={e1,…,en}⊆C′, such that en=e and
{e1,…,ek−1}⊢ek for all
k∈[1,n]. Now, if e′∈D, observe that
C∪D is a configuration and C⊂C∪D⊂C′,
contradicting C≺C′.
Assume that, instead, e′∈D. If e′=ek for k<n we would
have that D′={e1,…,ek} is a configuration and we
could replace D by D′ in the contradiction above. Hence it
must be e=e′, as desired.
2. 2.
Let C∈Conf(E) be a configuration and assume
that C=C′∪{e} with C′⊢0e. Then C is a finite configuration, and thus a compact element. Moreover, if
C=C1∪C2 for C1,C2∈Conf(E),
then e must occur either in C1 or in
C2. If e∈C1, since C1 is secured,
there exists C1′⊆C1∖{e} such that
C1′⊢e. Hence, by monotonicity of enabling,
C1∖{e}⊢e. Since C′⊢0e and
C1∖{e}⊆C′ it follows that
C1∖{e}=C′ and thus C1=C.
Therefore, by Lemma 1, C is an irreducible.
Vice versa, let C∈Conf(E) be an irreducible. It is
compact, hence finite. Hence we can consider a secured execution
⟨e1,…,en⟩
of configuration C. Note that for any k∈[1,n−1] it
must be {e1,…,ek−1}⊢en.
Otherwise, if it were {e1,…,ek−1}⊢en for
some k∈[1,n−1], we would have that C′={e1,…,ek,en} and C′′={e1,…,en−1}
are two proper subconfigurations of C such that C=C′∪C′′, violating the fact that C is irreducible. But this
means exactly that {e1,…,en−1}⊢0en, as
desired.
3. 3.
Immediate.
4. 4.
Let Ij=⟨Cj,ej⟩∈ir(D(E)) for
j∈{1,2} be irreducibles. Assume I1↔I2.
By Lemma 5(3), observing that
p(Ij)=Cj, we must have I1∪C2=C1∪I2,
namely C1∪{e1}∪C2=C1∪C2∪{e2},
from which we conclude that it must be e1=e2, i.e., as desired
Ij=⟨Cj,e⟩, where e=e1=e2 for j∈{1,2}.
Additionally, I1 and I2 are consistent, by definition of
↔,
meaning that C1⌢eC2.
For the converse, consider two irreducibles I1=⟨C1,e⟩
and I2=⟨C2,e⟩, such that C1⌢eC2. Hence
C1⊢0e, C2⊢0e and
C=C1∪C2∪{e} is consistent. Since
I1,I2⊆C, they are consistent in
D(E). Moreover, p(I1)=C1, p(I2)=C2
and I1∪C2=I2∪C1=C.
Hence by
Lemma 5(3) we have
I1↔I2, as desired.
5. 5.
We have to show that D(E) satisfies the conditions of Definition 12. Concerning condition (1), let
I1=⟨C1,e1⟩ and I2=⟨C2,e2⟩ such that
I1↔∗I2 and p(I1)=C1,p(I2)=C2 consistent. From
I1↔∗I2, by the above result, we deduce e1=e2.
Since, C1,C2 consistent, we deduce C1⌢eC2 and thus,
again by the same result, I1↔I2.
As for Condition (2), consider the
irreducibles I, I′, J and J′ such that
I↔∗I′, J↔∗J′, and
{I′,J′}, {p(I),J} and {p(J),I}
consistent. From I↔∗I′ and
J↔∗J′ we deduce that I=⟨C,e⟩,
I′=⟨C′,e⟩, J=⟨D,f⟩ and J′=⟨D′,f⟩. Moreover, we have p(I)=C and p(J)=D,
hence the hypotheses say {C,J} and {D,I} consistent. From
the consistency of {I′,J′} we deduce that {e,f}
consistent. Therefore we have that I=⟨C,e⟩ and
J=⟨D,f⟩ are consistent.
■
Concerning point 1, observe that the meet in the domain of
configurations is
C⊓C′=⋃{C′′∈Conf(E)∣C′′⊆C ∧ C′′⊆C′}, which is usually smaller than the
intersection. For instance, in Fig. 2,
{a,c}⊓{b,c}=∅={c}.
Point 2 says that irreducibles are configurations of the form
C∪{e} that admits a secured execution in which the event
e appears as the last one and cannot be switched with any other. In
other words, irreducibles are minimal enablings of events.
Point 3 characterises the irreducibles in a configuration. According
to point 4, two irreducibles are interchangeable when they are
different minimal enablings for the same event.
Proposition 4** (the domain of configurations is weak prime)**
Let E be an es.
Then D(E)
is a weak prime domain. Moreover, given two es E1 and E2, and a morphism
f:E1→E2, its image
D(f):D(E1)→D(E2) is a weak prime domain morphism.
□
Proof
We know that
D(E) is a domain
(Lemma 8(1))
and that it is interchangeable
(Lemma 8(5)).
In order to show that D(E) is a weak prime domain, we
exploit the characterisation in Proposition 3,
i.e., we prove that all irreducibles are weak primes.
Consider an irreducible I, which by
Lemma 8(2)
is of the shape I=⟨C,e⟩ with C⊢0e, and suppose that
I⊆⨆X for some
X⊆D(E).
In particular, this means that e∈⨆X and thus there is
C′∈X such that e∈C′. In turn, we can consider a minimal
enabling of e in C′, i.e., a minimal C′′⊆C′ such
that C′′⊢0e, and we have that I′′=⟨C′′,e⟩ is an
irreducible I′′⊆C′. Since I and I′′ are consistent,
as they are both included in ⨆X, then C⌢eC′′
and by
Lemma 8(4)
I↔I′′.
We next prove that given an es morphism
f:E1→E2, its image
D(f):D(E1)→D(E2) is a weak prime
domain morphism.
C1⪯C1′ implies D(f)(C1)⪯D(f)(C1′)
Since D(f)(Ci)={f(di)∣di∈Ci} and by
Lemma 8(1)
C1⪯C1′ iff C1′=C1∪{e1} for some event
e1, the result
follows immediately.
for X1⊆D(E1) consistent, D(f)(⨆X1)=⨆D(f)(X1)
Since D(f) takes the image as set and ⨆ on
consistent sets is union, the result follows.
for C1,C1′∈D(E1) consistent such that
C1⊓C1′≺C1 it holds
f(C1⊓C1′)=f(C1)⊓f(C1′)
Since C1⊓C1′≺C1, by
Lemma 8(1)
we have that C1=(C1⊓C1′)∪{e1} for some
e1∈C1⊓C1′.
Clearly e1∈C1′, otherwise we would have C1⊆C1′
and thus C1⊓C1′=C1. Therefore in this case, the meet
coincides with intersection,
C1⊓C1′=C1∩C1′=C1∖{e1}.
Since for the events in C1∪C1′, by definition of event
structure morphism, f is injective, we have that
f(C1)∩f(C1′)=f(C1∩C1′).
As a general fact,
f(C1)⊓f(C1′)⊆f(C1)∩f(C1′). Therefore,
putting things together, we conclude
f(C1)⊓f(C1′)⊆f(C1)∩f(C1′)=f(C1∩C1′)=f(C1⊓C1′)
The converse inequality holds in any domain (as observed after
Definition 15) and thus the result follows.
■
A special role is played by the subclass of connected es
which will be shown to be exact counterpart of weak prime domains.
Definition 18** (connected event structure)**
An es is connected if whenever
C⊢0e and C′⊢0e then C⌢e∗C′. We
denote by cES the full subcategory of ES having connected es
as objects.
□
In words, different minimal enablings for the same event must be
pairwise connected by a chain of consistency. Equivalently, for each
event e the set of minimal enablings, say
Me={C∣C⊢0e}, endowed with the relation
⌢e is a connected graph. Intuitively, as discussed in more
detail below, if Me were not connected, then we could split event
e into different instances, one for each connected component,
without changing the associated domain.
For instance, the es in
Example 1 is a connected es. Only event c has
two minimal enablings {a}⊢0c and {b}⊢0c
and obviously {a}⌢c{b}.
Clearly, prime es are also connected es. More precisely, we have the following.
Proposition 5** (primality = stability + connectedness)**
Let E be an es. Then E is prime iff it is stable and connected.
□
Proof
The fact that a prime es is stable and connected follows immediately
from the definitions. Conversely, let E be a stable and
connected es. We show that E is prime, i.e., each e∈E has a
unique minimal enabling. Let C,C′∈Conf(E) be minimal
enablings for e, i.e., C⊢0e and C′⊢0e. Since
E is connected C⌢e∗C′. Let
C⌢eC1⌢e…⌢eCn⌢eC′. Then
by stability we get that C=C1=…=Cn=C′.
■
The defining property of connected es allows one to recognise that two
minimal enablings are relative to the same event by only looking at
the partially ordered structure and thus, as we will see, from the
domain of configurations of a connected es we can recover an es
isomorphic to the original one and vice versa (see Theorem 3).
In general, this is not possible.
For instance, consider the es E′ with events
E′={a,b,c}, and where a#b and the minimal enablings are
again ∅⊢0a, ∅⊢0b,
{a}⊢0c, and {b}⊢0c. Namely, event c has two
minimal enablings, but differently from what happens in the
running example, these are not consistent, hence
{a,b}⊢c. The resulting domain of configurations is depicted on
the left of Fig. 7. Intuitively, it is not possible
to recognise that {a,c} and {b,c} are different minimal enablings
of the same event. In fact, we would get an isomorphic
domain of configurations by considering the es E′′ with events
E′′={a,b,c1,c2} such that a#b and the minimal enablings
are again ∅⊢0a, ∅⊢0b,
{a}⊢0c1, and {b}⊢0c2.
III-C From Weak Prime Domains to Connected Event Structures
We show how to get an es from a weak prime domain. As anticipated,
events are equivalence classes of irreducibles, where the equivalence
is (the transitive closure of) interchangeability.
In order to properly relate domains to the corresponding es we need to prove some properties of irreducibles and of the interchangeability relation in weak prime domains.
Domains are irreducible algebraic
(see Proposition 1), hence any element is
determined by the irreducibles under it. The difference between two
elements is thus somehow captured by the irreducibles that are under
one element and not under the other.
This motivates the following definition.
Definition 19** (irreducible difference)**
Let D be a domain and d,d′∈K(D) such that
d⊑d′. Then we define
δ(d′,d)=ir(d′)∖ir(d).
□
The immediate precedence relation intuitively relates domain elements
corresponding to configurations that differ for the
execution of a single event.
In order to formalise this fact we first need a preliminary technical lemma.
Lemma 9** (immediate precedence and irreducibles/1)**
Let D be a weak prime domain, d∈K(D), and i∈ir(D)
such that d, i are consistent and p(i)⊑d. Then
-
for all i′∈δ(d⊔i,d) minimal, it holds
i↔i′;
2. 2.
d⪯d⊔i.
□
Proof
-
Clearly, if d=d⊔i then δ(d⊔i,d)=∅ and
the property trivially
holds. Assume d=d⊔i and take
i′∈δ(d⊔i,d) minimal. Note that minimality
implies that p(i′)⊑d. In fact, for all
i1′∈ir(p(i′)) we have
i1′⊏i′⊑d⊔i. Hence
i1′⊑d, otherwise i1′∈δ(d⊔i,d),
violating minimality of i′. Therefore
p(i′)=⨆ir(p(i′))⊑d.
Now, from i′⊑d⊔i, since D is a weak prime
domain and thus irreducibles are weak primes, there must be
i′′∈ir(D), i′′↔i′ such that
i′′⊑d or i′′⊑i. We first note that it
cannot be i′′⊑d, otherwise
d=d⊔i′′=d⊔i′, the last equality motivated by
Lemma 5(2), which implies that
i′⊑d, contradicting the hypothesis.
Hence it must be i′′⊑i,
which by Lemma 2 means that either i′′=i or i′′⊑p(i). Since p(i)⊑d by hypothesis, the latter
case would contradict i′′⊑d, hence i′′=i which means
that i′↔i, as desired.
2. 2.
Let us assume that d=d⊔i (otherwise the property is trivial), and consider d′ such that d≺d′⊑d⊔i:
we prove that d′=d⊔i. Since d≺d′, hence
d=d′, we know that δ(d′,d) is not empty. Take a
minimal i′∈δ(d′,d). Thus i′ is minimal also in
δ(d⊔i,d), and thus, by point (1),
i↔i′. By minimality of i′ we deduce also that
p(i′)⊑d. Since also p(i)⊑d by
hypothesis, using Lemma 5(2), we have
d⊔i=d⊔i′. Observing that
d⊔i′⊑d′⊑d⊔i we conclude
that d′=d⊔i, as desired.
■
We can now show that whenever d≺d′ the
irreducible difference of d′ and d consists of a set of
irreducibles which are pairwise interchangeble, hence, intuitively corresponding to the same event.
Lemma 10** (immediate precedence and irreducibles/2)**
Let D be a weak prime domain and d,d′∈D such that d⪯d′.
Then for all i,i′∈δ(d′,d)
-
d′=d⊔i;
2. 2.
if i⊑i′ then i=i′;
3. 3.
i↔i′.
□
Proof
If d=d′ all properties hold trivially.
- 1)
Let i∈δ(d′,d). Then
d⊑d⊔i⊑d′. It follows that either
d⊔i=d or d⊔i=d′. The first possibility can be
excluded for the fact that it would imply i⊑d, while we
know that i∈ir(d). Hence we get the thesis.
2. 2)
Let i,i′∈δ(d′,d), with
i⊑i′. Let us first assume i minimal in
δ(d′,d), hence p(i)⊑d. Then
i′⊑d′=d⊔i. Since i′ is a weak prime, there
exists i′′∈ir(D) such that i′↔i′′
and either i′′⊑i or i′′⊑d. The second
possibility is excluded. In fact, if i′′⊑d, then we
would have p(i),p(i′′)⊑d and thus, by
Lemma 5(2),
d′=d⊔i=d⊔i′′=d, contradicting d=d′. Hence it must be i′′⊑i. Since
i⊑i′, by transitivity i′′⊑i′ and since
i′↔i′′,
by Lemma 4, i′′=i′ and thus i′′=i=i′.
If instead, i is not minimal in δ(d′,d), take
i1⊑i minimal. By the argument above, we have that
i1↔i′, and thus, by Lemma 4,
i1=i′. Recalling that i1⊑i⊑i′ we
conclude i=i′, as desired.
3. 3)
Let i,i′∈δ(d′,d) be
irreducibles. By (1) we have d′=d⊔i,
hence i′∈δ(d⊔i,d). By (2)
i′ is minimal in δ(d⊔i,d). Therefore, by
Lemma 9(1), we conclude
i↔i′ .
■
We next show another technical result, i.e., that chains of immediate
precedence are generated in essentially a unique way by sequences of
irreducibles. Given a domain D and an irreducible i∈ir(D), we
denote by [i]↔∗ the corresponding equivalence class. For
X⊆ir(D) we define
[X]↔∗={[i]↔∗∣i∈X}.
Lemma 11** (chains of immediate precedence)**
Let D be a weak prime domain, d∈K(D) and
ir(d)={i1,…,in} such that the sequence
i1,…,in is compatible with the order (i.e., for all
h,k if ih⊑ik then h≤k). If we let
dk=⨆h=1kih for k∈{1,…,n} we
have
⊥=d0⪯d1⪯…⪯dn=d**
Vice versa, given a chain
⊥=d0≺d1≺…≺dn and taking
ih∈δ(dh,dh−1) for
h∈{1,…,n} we have
dn=⨆h=1nih* and ∀i∈ir(dn). ∃h∈[1,n]. i↔ih.*
Therefore
[{i1,…,in}]↔∗=[ir(dn)]↔∗.
□
Proof
For the first part, observe that for k∈{1,…,n} we have that
p(ik)⊑dk−1
In fact, recalling that ir(ik)⊆ir(d), we have that
irreducibles in ir(p(ik))=ir(ik)∖{ik}, which are
smaller than ik, must occur before in the list hence
ir(p(ik))=ir(ik)∖{ik}⊆{i1,…,ik−1}.
Therefore
p(ik)=⨆ir(p(ik))⊑⨆{i1,…,ik−1}=dk−1. Thus we use
Lemma 9(2) to infer
dk−1⪯dk−1⊔ik=dk.
For the second part, we proceed by induction on n.
(n=0) Note that d0=⨆∅=⊥ and
ir(⊥)=∅, hence the thesis trivially holds.
(n>0) By induction hypothesis
dn−1=⨆h=1n−1ih and ∀i∈ir(dn−1). ∃h∈[1,n−1]. i↔ih.
Since by construction in∈δ(dn,dn−1),
by Lemma 10(1) we deduce
dn=in⊔dn−1=⨆h=1nih
Moreover, for all i∈δ(dn,dn−1), we have i⊑dn=in⊔dn−1. By definition of weak prime domain, there exists i′↔i such that i′⊑dn−1 or i′⊑in. In the first case, since i′⊑dn−1, by the inductive hypothesis there is h∈[1,n−1] such that i′↔ih. Since i↔i′↔ih, and i,ih⊑dn are consistent, by using the fact that
D is interchangeable we deduce i↔ih, as desired. If, instead, we are in the second case, namely i′⊑in, by Lemma 10(2) it
follows that in=i′↔i, as desired.
■
In a prime domain, an element admits a unique decomposition in
terms of primes (see Lemma 3). Here the
same holds for irreducibles but only up to interchangeability.
Proposition 6** (unique decomposition up to ↔)**
Let D be a weak prime domain, let d∈K(D), and let
X⊆D be a downward closed and consistent set such that
[X]↔∗⊆[ir(d)]↔∗. Then d=⨆X
iff [X]↔∗=[ir(d)]↔∗.
□
Proof
(⇒) Let d=⨆X. By hypothesis
[X]↔∗⊆[ir(d)]↔∗. Hence we only need to
prove that [ir(d)]↔∗⊆[X]↔∗. Let i∈ir(d). Hence i⊑d=⨆X. By definition of
weak prime domain, this implies that there exists
i′↔i and x∈X such that i′⊑x. Since X is downward closed, necessarily i′∈X and thus
[i]↔∗∈[X]↔∗, as desired.
(⇐) Let [X]↔∗=[ir(d)]↔∗. We can
prove that ⨆X=d by induction on
k(X)=∣(ir(d)∖X)∪(X∖ir(d)∣. If k(X)=0 then X=ir(d) and thus, by
Proposition 1, we conclude that
d=⨆X.
If k(X)>0 we distinguish two subcases.
First assume
ir(d)∖X=∅. Then take a minimal element
i∈ir(d)∖X. Therefore X′=X∪{i} is
downward closed and, by minimality of i, we have
p(i)⊑⨆X. Since
[X]↔∗=[ir(d)]↔∗, there is i′∈X such that
i↔∗i′ and thus, since
p(i),p(i′)⊑⨆X are consistent and D
is interchangeable, i↔i′.
Therefore
[TABLE]
Since [X′]↔∗=[X]↔∗=[ir(d)]↔∗ and
∣ir(d)∖X′∣=∣ir(d)∖X∣−1, we have
k(X′)<k(X), and thus by inductive hypothesis ⨆X′=d. Hence, using (2), we get ⨆X=d, as
desired.
If instead ir(d)∖X=∅, i.e.,
ir(d)⊆X, since k(X)>0, it must be
X∖ir(d)=∅. Consider a maximal element
i∈X∖ir(d), and let X′=X∖{i}. Clearly, X′ is downward closed because so are X and ir(d). Since
[X]↔∗=[ir(d)]↔∗, there is
i′∈ir(d)⊆X such that i↔∗i′. Since X is consistent and D is interchangeable, i↔i′. Therefore
[TABLE]
Since by construction k(X′)=k(X)−1, the inductive hypothesis
gives us ⨆X′=d. Hence, using (3), we get
⨆X=d, as desired.
■
We explicitly observe that, by the above result, whenever X=[ir(d)]↔∗ for some d∈K(D) then d is uniquely determined by X.
We now have all the tools needed for mapping our domains to an es.
Definition 20** (event structure for a weak prime domain)**
Let D be a weak prime domain. The es
E(D)=⟨E,#,⊢⟩ is defined as
follows
E=[ir(D)]↔∗;
e#e′ if there is no d∈K(D) such that
e,e′∈[ir(d)]↔∗;
X⊢e if there is i∈e such that
[ir(i)∖{i}]↔∗⊆X.
Given a morphism f:D1→D2, its image
E(f):E(D1)→E(D2) is defined for
[i1]↔∗∈E1 as
E(f)([i1]↔∗)=[i2]↔∗,
where i2∈δ(f(i1),f(p(i1))), and
E(f)([i1]↔∗) is undefined if f(p(i1))=f(i1).
□
The events in E(D) are equivalence classes of irreducibles. Two events e, e′ are consistent (not in conflict) when there is some compact element d such that e,e′∈[ir(d)]↔∗. Spelled out, this means that there are irreducibles i∈e and i′∈e′ such that i,i′⊑d, i.e., there are minimal enablings of the events e and e′ in the same configuration. Finally, an event e is enabled by a set X when X includes, up to intechangeability, all the predecessors of e.
Note that the definition above is well-given: in particular, there is no
ambiguity in the definition of the image of a morphism, since by
Lemma 10(3) we easily conclude
that for all i2,i2′∈δ(f(i1),f(p(i1))), it
holds i2↔i2′ (this is argued in detail in the proof of Lemma 13).
In the following we often use a technical lemma that holds in any domain.
Lemma 12
Let D be a domain and a,b,c∈D such that
c⊑a and c⪯b. Then
either b⊑a or c=a⊓b.
□
Proof
Recall that in a domain the meet of non-empty sets
exists. Since c is a lower bound for a and b, necessarily
c⊑a⊓b⊑b. If it were
c=a⊓b then we would have a⊓b=b, hence
b⊑a, as desired.
■
Lemma 13** (from weak prime domains to event structures)**
Let D be a weak prime domain. Then E(D) is an es. Moreover, given two weak prime domains D1, D2 and a
morphism f:D1→D2, its image
E(f):E(D1)→E(D2) is an es morphism.
□
Proof
We first show that E(D) is a live es. In fact, it is an
es: if X⊢e and X⊆Y then
Y⊢e. In fact, by definition, if X⊢e then there
exists i∈e such that
[ir(i)∖{i}]↔∗⊆X. Hence if
X⊆Y it immediately follows that Y⊢e.
Moreover E(D) is live. The fact that conflict is saturated
follows immediately by the definition of conflict and the
characterisation of configurations provided later in
Lemma 14. Conflict is irreflexive since for any
e∈E(D), if e=[i]↔∗ then
e∈[ir(i)]↔∗, which is a configuration again by
Lemma 14.111This forward reference is only
useful to simplify the structure of the presentation and to avoid
breaking the statement in two parts, but it
introduces no cyclic dependency.
Given a morphism f:D1→D2, its image
E(f):E(D1)→E(D2) is defined for
[i1]↔∗∈E1 as
E(f)([i1]↔∗)=[i2]↔∗,
where i2∈δ(f(i1),f(p(i1))), and
E(f)([i1]↔∗) is undefined if f(p(i1))=f(i1).
First observe that E(f)([i1]↔∗) does
not depend on the choice of the representative. In fact, let
i2,i2′∈δ(f(i1),f(p(i1))). Since
p(i1)≺i1, by definition of domain morphism,
f(p(i1))≺f(i1). Thus, by
Lemma 10(3),
i2↔i2′.
We next show that E(f) is an es morphism.
If E(f)(e1)#E(f)(e1′) then e1#e1′.
We prove the contronominal, namely if e1,e1′ consistent
then E(f)(e1),E(f)(e1′) consistent.
The fact that e1,e1′ consistent means that there exists
d1∈K(D1) such that
e1,e1′∈[ir(d1)]↔∗. We show that
E(f)(e1),E(f)(e1′)∈[ir(f(d1))]↔∗ (note
that f(d1) is a compact, since f is a domain morphism).
Let us show, for instance, that
E(f)(e1)∈[ir(f(d1))]↔∗. The fact that
e1∈[ir(d1)]↔∗ means that e1=[i1]↔∗
for some i1⊑d1. By definition
E(f)(e1)=[i2]↔∗, where
i2∈δ(f(i1),f(p(i1))) (since E(f)(e1) is
defined the irreducible difference cannot be empty). Now, since
i1⊑d1 we have that f(i1)⊑f(d1),
whence i2⊑f(i1)⊑f(d1) and
E(f)([i1]↔∗)=[i2]↔∗∈[ir(f(d1))]↔∗, as desired.
If E(f)(e1)=E(f)(e1′) and e1=e1′
then e1#e1′.
We prove the contronominal, namely if e1,e1′ consistent and
E(f)(e1)=E(f)(e1′) then e1=e1′.
Assume e1,e1′ consistent and E(f)(e1)=E(f)(e1′). By
the first condition and the definition of conflict, there must be d1∈K(D1) such
that e1,e1′∈[ir(d1)]↔∗, namely
e1=[i1]↔∗ and e1′=[i1′]↔∗ with
i1,i1′⊑d1.
Moreover, E(f)([i1]↔∗)=[i2]↔∗ and
E(f)([i1′]↔∗)=[i2′]↔∗ where i2 and
i2′ are in δ(f(i1),f(p(i1))) and
δ(f(i1′),f(p(i1′))), respectively, and
[i2]↔∗=[i2′]↔∗, which means
i2↔∗i2′, and in turn, being i2 and i2′
consistent, by the fact that D is interchangeable,
implies
i2↔i2′.
We distinguish two cases.
- A.
If i1 and i1′ are comparable, e.g.,
if i1⊑i1′, then i1=i1′ and we are
done. In fact, otherwise, if i1=i1′ we have
p(i1)≺i1⊑p(i1′)≺i1′. By
monotonicity of f we have
f(p(i1))≺f(i1)⊑f(p(i1′))≺f(i1′)
(where strict inequalities ≺ are motivated by the
definition of E(f), since
both E(f)([i1]↔∗) and E(f)([i1′]↔∗)
are defined).
Now notice that
p(i2)⊑i2⊑f(i1)⊑f(p(i1′)). Moreover,
i2′∈δ(f(i1′),f(p(i1′))), therefore
p(i2′)⊑i2′⊑f(p(i1′)).
Hence, using the fact that i2↔i2′, by
Lemma 5(2) we have
f(p(i1′))=f(p(i1′))⊔i2=f(p(i1′))⊔i2′=f(i1′)
contradicting the fact that f(p(i1′))≺f(i1′).
2. B.
Assume now that i1 and i1′ are uncomparable: we show that this leads to a contradiction. Let
p=p(i1)⊔p(i1′). We can also assume
i1,i1′⊑p. In fact, otherwise, e.g., if
i1⊑p, then, by the defining property of weak
prime domains, we derive the existence of
i1′′↔i1 such that
i1′′⊑p(i1) or
i1′′⊑p(i1′). The first possibility can be
excluded because it would imply i1′′⊑i1. Hence,
since i1′′↔i1, by
Lemma 4, we would get i1=i1′′,
contradicting i1′′⊑p(i1). Then it should be
i1′′⊑p(i1′)⊑i1′. Therefore, if
we take i1′′ as representative of the equivalence class we
are back to case A above.
Using the fact that i1,i1′⊑p and
p(i1),p(i1′)⊑p, by
Lemma 9(2) we deduce that
p≺p⊔i1 and p≺p⊔i1′.
Hence f(p)≺f(p⊔i1) with strict inequality again
motivated by the definition of E(f), since
E(f)([i1]↔∗) is defined.
By Lemma 10(1), since
i2∈δ(f(i1),f(p(i1))) and
i2′∈δ(f(i1′),f(p(i1′))), we have
[TABLE]
Now, observe that
\begin{array}[]{lll}f(p\sqcup i_{1})=\\
=f(\mathit{p}({i_{1}})\sqcup\mathit{p}({i_{1}^{\prime}})\sqcup i_{1})\\
=f(\mathit{p}({i_{1}^{\prime}})\sqcup i_{1})\\
=f(\mathit{p}({i_{1}^{\prime}}))\sqcup f(i_{1})&\mbox{[preservation of \sqcup]}\\
=f(\mathit{p}({i_{1}^{\prime}}))\sqcup f(\mathit{p}({i_{1}}))\sqcup i_{2}&\mbox{[by~{}(\ref{eq:adding})]}\\
=f(\mathit{p}({i_{1}^{\prime}}))\sqcup f(\mathit{p}({i_{1}}))\sqcup i_{2}^{\prime}&\mbox{[by Lemma~{}\ref{le:eq-char}(\ref{le:eq-char:3}),}\\
&\mbox{\ since i_{2}\leftrightarrow i_{2}^{\prime}]}\\
=f(i_{1}^{\prime})\sqcup f(\mathit{p}({i_{1}}))&\mbox{[by~{}(\ref{eq:adding})]}\\
=f(\mathit{p}({i_{1}})\sqcup i_{1}^{\prime})&\mbox{[preservation of \sqcup]}\\
=f(\mathit{p}({i_{1}})\sqcup\mathit{p}({i_{1}^{\prime}})\sqcup i_{1}^{\prime})\\
=f(p\sqcup i_{1}^{\prime})\\
\end{array}
Since p≺p⊔i1 and p≺p⊔i1′, by
Lemma 12, we have
(p⊔i1)⊓(p⊔i1′)=p.
Therefore, on the one hand
f((p⊔i1)⊓(p⊔i1′))=f(p). On the other
hand, since the meet is an immediate predecessor, by definition
of weak domain morphism (Definition 15), it
is preserved:
f((p⊔i1)⊓(p⊔i1′))=f(p⊔i1)⊓f(p⊔i1′)=f(p⊔i1)=f(p⊔i1′).
Putting things together,
f(p)=f(p⊔i1)=f(p⊔i1′), contradicting the
fact that f(p)≺f(p⊔i1).
if C1⊢1[i1]↔∗ and
E(f)([i1]↔∗) is defined then
E(f)(C1)⊢2E(f)([i1]↔∗)
Recall that C1⊢1[i1]↔∗ means that
[ir(i1′)∖{i1′}]↔∗=[ir(p(i1′))]↔∗⊆C1 for some
i1′↔i1.
By definition, E(f)([i1]↔∗)=[i2]↔∗ where
i2∈δ(f(i1′),f(p(i1′))). We show that
E(f)(C1)⊢2[i2]↔∗, namely that
[TABLE]
Observe that since i2∈δ(f(i1′),f(p(i1′))) and
distinct elements in δ(f(i1′),f(p(i1′))) are
incomparable by
Lemma 10(2), it holds
p(i2)⊑f(p(i1′)). Therefore, we have
ir(p(i2))⊆ir(f(p(i1′)))
Hence, in order to conclude (5), it suffices to show that
[TABLE]
In order to reach this result, first note that, by
Lemma 11, if
ir(p(i1′))={j11,…,j1n} is a sequence of
irreducibles compatible with the order, we can obtain a
⪯-chain
⊥=d10⪯d11⪯…⪯d1n=p(i1′)≺i1′
We can extract a strictly increasing subsequence
⊥=d1′0≺d1′1≺…≺d1′m=p(i1′)≺i1′
and, if we take irreducibles j1′1,…,j1′m in
δ(d1′i,d1′i−1), again by Lemma 11 we
know that
[TABLE]
Since f is a domain morphism, it preserves ⪯, namely
⊥=f(d1′0)⪯f(d1′1)⪯…⪯f(d1′m)=f(p(i1′))≺f(i1′)
where the last inequality is strict since
E(f)([i1′]↔∗)=[i2]↔∗ is
defined. Moreover, whenever f(d1′h−1)≺f(d1′h), then
E(f)([j1′h]↔∗)=[ℓ2h]↔∗ where ℓ2h
is any irreducible in δ(f(d1′h),f(d1′h−1)), otherwise
E(f)([j1′h]↔∗) is undefined.
Once more by Lemma 11 we know that
[ir(f(p(i1′)))]↔∗=[{ℓ21,…,ℓ2m}]↔∗=E(f)([{j1′1,…,j1′m}]↔∗),
thus, using (7)
[TABLE]
Hence, recalling that, by hypothesis,
[ir(p(i1′))]↔∗⊆C1, we conclude the desired
inclusion (6).
■
Since in a prime domain irreducibles coincide with
primes (Proposition 2), ↔ is the
identity (Lemma 6) and δ(d′,d) is a
singleton when d≺d′, the construction above produces the prime
es pES(D) as defined in Section II.
Given a weak prime domain D, the finite configurations of the es
E(D) exactly correspond to the elements in
K(D). Moreover, in such es we have a minimal enabling
C⊢0e when there is an irreducible in e (recall that events
are equivalence classes of irreducibles) such that C contains all and only
(the equivalence classes of) its predecessors.
Lemma 14** (compacts vs. configurations)**
Let D be a weak prime domain and C⊆E(D) a finite set
of events. Then C is a configuration in the es E(D)
iff there exists a unique d∈K(D) such that C=[ir(d)]↔∗. Moreover, for any e∈E(D) we have that
C⊢0e iff C=[ir(i)∖{i}]↔∗ for
some i∈e.
□
Proof
The left to right implication of the first part follows by proving that, given a
configuration C∈ConfF(E(D)), there exists
X⊆ir(D) downward closed and consistent such that
[X]↔∗=C. Hence, if we let d=⨆X, by
Proposition 6, we have that
C=[X]↔∗=[ir(d)]↔∗. Moreover, d is uniquely
determined, since, by the same proposition we have that for any
other X′ such that [X′]↔∗=C, since
[X′]↔∗=C=[X]↔∗=[ir(d)]↔∗,
necessarily d=⨆X′.
Let us thus prove the existence of X⊆ir(D) consistent
and downward closed such that [X]↔∗=C.
We proceed by induction on the cardinality of C.
if ∣C∣=0, namely C=∅ then we can take X=∅,
and trivially conclude.
if ∣C∣>0, since C is secured, there is
[i]↔∗∈C such that
C′=C∖{[i]↔∗}⊢[i]↔∗. By inductive hypothesis there is X′⊆ir(D), downward
closed and consistent such that [X′]↔∗=C′.
The fact that
C′=C∖{[i]↔∗}⊢[i]↔∗ means
that for some i′∈ir(D) such that i′↔∗i, it holds
[ir(i′)∖{i′}]↔∗=[ir(p(i′))]↔∗⊆C′.
Therefore, there is X′′⊆X′ such that
[X′′]↔∗=[ir(p(i))]↔∗ and thus, by
Proposition 6,
p(i′)⊑⨆X′.
We can assume, without loss of generality that
ir(p(i′))⊆X′. If not, we can replace X′ by
X′∪ir(p(i′)). By the consideration above, it is
consistent and it has the same join of X′.
Now, an induction on the cardinality k of
X′∖ir(p(i′)) allows us to show that {i′,j}
consistent for all j∈X′. If k=0 then
X′∖ir(p(i′))=∅ and the thesis is
trivial. Otherwise, consider j′∈X′∖ir(p(i′))
maximal and X′′=X′∖{j′}. Since
∣X′∖ir(p(i′))∣=k−1, by inductive hypothesis, for
all j∈X′′, we have {j,i′} consistent. Now, since
j,p(i)⊑⨆X′, we have that
{j,p(i)} is consistent. Moreover, since
ir(j′)∖{j′}=ir(p(j′))⊆X′′, we have
that {i,p(j′)} is consistent.
Finally, recalling that, since C is
consistent, we have that
¬([j′]↔∗#[i′]↔∗), i.e., there is
d∈K(D) such that
{[j′]↔∗,[i′]↔∗}⊆[ir(d)]↔∗. More explicitly, this means that there are
j′′,i′′∈ir(D) such that j′′↔∗j′,
i′′↔∗i′ and j′,i′′ consistent.
Since D is interchangeable, by condition (2) of
Definition 12, we conlcude j′,i′
consistent.
We can thus conclude that X=X′∪{i′} is consistent,
and downward closed since
ir(p(i′))⊆X′. Hence we conclude.
For the converse, let C=[ir(d)]↔∗. Let
⊥=d0≺d1≺…dn−1≺dn=d be a chain
of immediate precedence and for each h∈{1,…,n} take
ih∈δ(dh,dh−1). By Lemma 11,
d=⨆{i1,…,in} and
[ir(d)]↔∗=[{i1,…,in}]↔∗. Moreover,
for all h∈{1,…,n}, we have
[ir(ih)∖{ih}]↔∗⊆[ir(dh−1)]↔∗, hence
[ir(dh−1)]↔∗⊢[ih]↔∗. Therefore C is
secured. Moreover, it is clearly consistent and thus
C∈Conf(E(D)).
The second part follows immediately by Definition 20.
■
Given the lemma above, it is now possible to state how weak prime
domains relate to connected es.
Proposition 7** (from weak prime domains to connected ES)**
Let D be a weak prime domain. Then E(D) is a connected es.
□
Proof
We have to show that
if X⊢0e and X′⊢0e, then X⌢e∗X′. Note
that, by Lemma 14,
from X⊢0e and
X′⊢0e, we deduce that there exists i,i′∈e such that
[ir(i)∖{i}]↔∗=X and
[ir(i′)∖{i′}]↔∗=X′. Since i,i′∈e we
deduce that i↔∗i′, namely
i=i0↔i1↔…↔in=i′. We proceed by induction on n. The base case n=0 is
trivial. If n>0 then from
i↔i1↔∗i′ we have that
i1∈e and, if we let
X1=[ir(i1)∖{i1}]↔∗, then
X1⊢0e. By inductive hypothesis, we know that
X1⌢e∗X′. Moreover, since i↔i1,
the irreducibles i and i1 are consistent. Hence, by definition
of conflict in E(D), also X∪X1∪{e} is consistent
and hence X⌢eX1. Therefore X⌢e∗X′, as desired.
■
III-D Relating Categories of Models
We show that, at a categorical level, the constructions taking a weak prime domain to an
es and an es to a domain (the domain of its configurations) establish
a coreflection between the corresponding categories.
This becomes an equivalence when it is restricted to the full subcategory of connected es.
Theorem 3** (coreflection of ES and wDom)**
The functors D:ES→wDom and E:wDom→ES form
a coreflection E⊣D. It restricts to an equivalence between wDom and
cES.
□
Proof
Let E be an es. Recall that the corresponding domain of
configurations is
D(E)=⟨Conf(E),⊆⟩. Then,
E(D(E))=⟨E′,#′,⊢′⟩, where the set of
events E′ is defined as
E′=[ir(D(E))]↔∗={[⟨C,e⟩]↔∗∣C⊢0e}
By
Lemma 8(4),
the equivalence class of an irreducible ⟨C,e⟩ consists of
all minimal enablings of event e which are connected. Therefore we
can define a morphism, which is the counit of the adjunction, as follows:
\begin{array}[]{lccc}\theta_{{E}}:&\mathcal{E}({\mathcal{D}({{E}})})&\to&{E}\\
&[{\langle{C},{e}\rangle}]_{\scriptscriptstyle{\leftrightarrow^{*}}}&\mapsto&e\end{array}
Observe that θE is surjective. In fact E is live and
thus any event e∈E has at least a minimal enabling
C⊢0e. If we let I=⟨C,e⟩, then
[I]↔∗∈E(D(E)) and θE([I]↔∗)=e.
The mapping θE is clearly
a morphism of event structures. In fact, observe that
For
I1,I2∈ir(D(E)), if
θE([I1]↔∗)#θE([I2]↔∗)
then [I1]↔∗#′[I2]↔∗.
Let I1=⟨C1,e1⟩ and I2=⟨C2,e2⟩. If
θE([I1]↔∗)=e1#e2=θE([I2]↔∗), then there cannot be any
configuration C∈Conf(E) such that I1,I2⊆C. Hence, by definition of conflict in E(D(E)), we have
[I1]↔∗#′[I2]↔∗.
For I1,I2∈ir(D(E)), with
[I1]↔∗=[I2]↔∗, we have that
θE([I1]↔∗)=θE([I2]↔∗)
implies [I1]↔∗#′[I2]↔∗.
In fact, by
Lemma 8(2),
the irreducibles I1 and I2 are of the kind
I1=⟨C1,e1⟩ and I2=⟨C2,e2⟩. We show that
if [I1]↔∗ and [I2]↔∗ are consistent and
θE([I1]↔∗)=θE([I2]↔∗)
then [I1]↔∗=[I2]↔∗.
Assume
θE([I1]↔∗)=θE([I2]↔∗),
hence e1=e2. Since [I1]↔∗ and
[I2]↔∗ are consistent, there exists
k∈K(D(E)) such that
[I1]↔∗,[I2]↔∗∈[ir(k)]↔∗.
Compacts in D(E) are finite configurations, hence the condition
amounts to the existence of C∈ConfF(E) such that
[I1]↔∗,[I2]↔∗∈[ir(C)]↔∗, i.e.,
there are I1′,I2′ with Ii↔∗Ii′ for
i∈{1,2}, such that I1′,I2′⊆C. Since the
choice of the representatives is irrelevant, we can assume
that I1=I1′ and I2=I2′. Summing up, I1 and I2
are consistent minimal enablings of the same event, hence by
Lemma 8(4), I1↔I2,
i.e., [I1]↔∗=[I2]↔∗, as desired.
For the enabling relation, we have to show that if
X⊢′[⟨C,e⟩]↔∗ then
θE(X)⊢θ([⟨C,e⟩]↔∗)=e.
Assume X⊢′[⟨C,e⟩]↔∗. According to the
definition of the functor E, this means
that there exists
i∈[⟨C,e⟩]↔∗ such that
[ir(i)∖{i}]↔∗⊆X.
Let such i∈[⟨C,e⟩]↔∗ be i=⟨C′,e⟩
with C′⊢0e. We have
ir(⟨C′,e⟩)∖{⟨C′,e⟩}=ir(C′)={[⟨C′′,e′′⟩]↔∗∣⟨C′′,e′′⟩⊆C′}.
Therefore from
[ir(⟨C′,e′⟩)∖{⟨C′,e′⟩}]↔∗⊆X
we deduce
θE([ir(⟨C′,e′⟩)∖{⟨C′,e′⟩}]↔∗)=C′⊆θE(X).
Since C′⊢0e, by monotonicity of enabling, we conclude
θE(X)⊢e, as desired.
We prove the naturality of θ by showing that the
diagram below commutes.
{\mathcal{E}({\mathcal{D}({{E}_{1}})})}$${{{E}_{1}}}$${\mathcal{E}({\mathcal{D}({{E}_{2}})})}$${{{E}_{2}}}$$\scriptstyle{\mathcal{E}({\mathcal{D}({f})})}$$\scriptstyle{\theta_{{E}_{1}}}$$\scriptstyle{f}$$\scriptstyle{\theta_{{E}_{2}}}
Consider [⟨C1,e1⟩]↔∗∈E(D(E1)).
Recall that E(D(f))([⟨C1,e1⟩]↔∗) is computed
by considering the image of the irreducible
⟨C1,e1⟩ and of its predecessor, namely
D(f)(C1)=f(C1) and D(f)(⟨C1,e1⟩)=f(C1∪{e1})
If f(e1) is defined, then f(C1)≺f(C1∪{e1}) and
E(D(f))([⟨C1,e1⟩]↔∗)=f(e1), otherwise
E(D(f))([⟨C1,e1⟩]↔∗) is undefined. This means
that in all cases, as desired
E(D(f))([⟨C1,e1⟩]↔∗)=f(e1)=f(θE1([⟨C1,e1⟩]↔∗)).
Vice versa, let D be a weak prime domain. Recall from Definition 20 that
E(D)=⟨E,#,⊢⟩ is defined as:
E=[ir(D)]↔∗
e#e′ if there is no d∈K(D) such that
e,e′∈[ir(d)]↔∗;
X⊢e if there exists i∈e such that
[ir(i)∖{i}]↔∗⊆X.
and consider D(E(D)). Elements of K(D(E(D)))
are configurations of C∈ConfF(E(D)).
We can define the unit of the adjunction as
\begin{array}[]{lccc}\eta_{D}:&\mathop{\mathsf{K}({D})}&\to&\mathop{\mathsf{K}({\mathcal{D}({\mathcal{E}({D})})})}\\
&d&\mapsto&[{\mathop{\mathit{ir}({d})}}]_{\scriptscriptstyle{\leftrightarrow^{*}}}\end{array}
Observe that it is well defined, since by Lemma 14,
[ir(d)]↔∗ is a finite configuration of E(D) and thus
a compact element in K(D(E(D))). The function is
clearly monotone and bijective with inverse
ηD−1:K(D(E(D)))→K(D) defined, for
C∈K(D(E(D)))=ConfF(E(D)) by letting
ηD−1(C)=d, where d is the unique element, given by
Lemma 14, such that C=[ir(d)]↔∗.
By
algebraicity of the domains, this function thus uniquely extends to
an isomorphism ηD:D→D(E(D)).
Finally, we prove the naturality of ηD. It is convenient to
prove the naturality of the inverse, i.e., to show that the diagram
below commutes.
{\mathcal{D}({\mathcal{E}({D_{1}})})}$${D_{1}}$${\mathcal{D}({\mathcal{E}({D_{2}})})}$${D_{2}}$$\scriptstyle{\mathcal{D}({\mathcal{E}({f})})}$$\scriptstyle{\eta_{D_{1}}^{-1}}$$\scriptstyle{f}$$\scriptstyle{\eta_{D_{2}}^{-1}}
Let C1∈K(D(E(D1))), namely
C1∈ConfF(E(D1)), and let ηD1−1(C1)=d1 be the
element such that C1=[ir(d1)]↔∗.
The construction offered by Lemma 11 provides a chain
d10=⊥≺d11≺d12≺…≺d1n=d1
and, by the same lemma, if we take an irreducible i1h∈δ(d1h,d1h−1) for 1≤h≤n we have that
C1=[ir(d1)]↔∗=[{i11,…,i1n}]↔∗.
Therefore the image
D(E(f))(C1)={E(f)([j1]↔∗)∣[j1]↔∗∈C1}={E(f)([i1h]↔∗)∣h∈[1,n]}
is the set of equivalence classes of irreducibles
i21,…,i2k corresponding to
f(d10)=⊥≺f(d11)≺f(d12)≺…≺f(d1n)=f(d1)
namely i2j∈δ(f(d1j),f(d1j−1)), and,
again, by Lemma 11,
[{i21,…,i2k}]↔∗=[ir(f(d1))]↔∗.
Summing up
ηD2−1(D(E(f))(C1))=ηD2−1({[i2h]↔∗∣1≤h≤k}})=f(d1)=f(ηD1−1(C1))
as desired.
We finally show that the above coreflection restricts to an
equivalence between wDom and cES.
For this, just observe that, in the proof above, when E is a connected
es, then the morphism θE defined as
\begin{array}[]{lccc}\theta_{{E}}:&\mathcal{E}({\mathcal{D}({{E}})})&\to&{E}\\
&[{\langle{C},{e}\rangle}]_{\scriptscriptstyle{\leftrightarrow^{*}}}&\mapsto&e\end{array}
is an isomorphism. We already know that
it is surjective. We next show that it is also injective. In fact, if
θE([I]↔∗)=θE([I′]↔∗)
then I and I′ are minimal enablings of the same event, i.e.,
I=[⟨C,e⟩]↔∗ and I′=[⟨C′,e⟩]↔∗. Since
E is a weak prime domain, C⌢e∗C′ and thus, by
Lemma 8(4), I↔∗I′,
i.e., [I]↔∗=[I′]↔∗.
Proving that also the inverse is an es morphism is immediate, by
exploiting the fact that the es is live.
■
The above result indirectly provides a way of turning a general
es into a connected es.
Corollary 1** (from general to connected es)**
The functors C:ES→cES defined by
C=E∘D and the inclusion
I:cES→ES form a coreflection.
□
Proof
Immediate consequence of Theorem 3.
■
Explicitly, for any event structure E the corresponding connected es
C(E)=⟨E′,⊢′,#′⟩ is defined as follows.
The set of events is E′={[⟨C,e⟩]∼∣C⊢0e},
where ∼ is the least equivalence such that ⟨C,e⟩∼⟨C′,e⟩
if ⟨C,e⟩ and ⟨C′,e⟩ are consistent.
Moreover [⟨C,e⟩]∼#′[⟨C′,e′⟩]∼ if for all
⟨C1,e⟩∼⟨C,e⟩ and ⟨C1′,e′⟩∼⟨C′,e′⟩ the
minimal enablings ⟨C1,e⟩ and ⟨C1′,e1′⟩ are not consistent.
Finally, for X⊆E′, X⊢′[⟨C,e⟩]∼ if there
exists ⟨C′,e⟩∼⟨C,e⟩ such that
C′⊆{e′′∣[⟨C′′,e′′⟩]∼∈X}.
An overall picture of the results discussed up to now can be found in Fig. 8. The arrows from classes of event structures to domains are restrictions of the functor D(⋅), while the converse arrows are restrictions of the functor E(⋅). The Venn diagram stresses the fact that prime es are exactly the es which are stable and connected (see Lemma 5) showing how the notion of connectedness naturally emerges in the framework.
IV Related Characterisations
In this section we present a characterisation of our proposal in terms
of a formalism reminiscent of the prime event structures with
equivalence of [23, 24]. Moreover, we discuss and
formalise the relation of our work with alternative characterisations
of the domains of (prime) event structures proposed in the literature,
based on intervals and on asynchronous graphs.
IV-A Prime Event Structures with Equivalence
The previous sections showed that the domains of configurations of
unstable es are weak prime domains, i.e., they satisfy the same
conditions as those of prime domains but only up to the equivalence
induced by interchangeability.
Symmetrically, this suggests the possibility of viewing unstable
es as stable ones up to some equivalence on events.
In this section we consider a formalisation for such a view,
leading to a set up that is closely related to the framework devised
in [23, 24],
which we also call prime event structures with equivalence
for the space of this article, since no confusion can arise.
In Section II-A we mentioned that in prime es a global
notion of causality can be used in place of the enabling. We next
recall the formal definition. We also introduce a notation for direct
(i.e., non-inherited) conflict that will play a role later.
Definition 21** (causality/direct conflict in prime event
structures)**
Let P=⟨E,⊢,#⟩ be a prime es. Given
an event e∈E, the unique C∈Conf(P) such that
C⊢0e is called the set of strict causes of e and
denoted by \mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,, while the set of causes is
\,\downarrow\!\!{e}=\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\{e\}. The strict causality
relation < is defined by e′<e if e^{\prime}\in\,\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,,
and, as usual, we denote by ≤ the reflexive closure of <. We
say that e,e′∈E are in direct conflict, written
e#de′, when e#e′ and \mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\{e^{\prime}\},
\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\,\cup\{e\} are consistent.
□
We next introduce our notion of prime es with
equivalence. Given a prime es P with an equivalence over the
set of events ∼⊆E×E, we say that a subset
X⊆E is ∼-saturated if for all e∈X and
e′∈E, if e∼e′ and \mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\,\subseteq X then
e′∈X. Since the intersection of saturated sets is saturated, given a set X we can always consider the smallest saturated superset of X, called the saturation of X and denoted X~.
Definition 22** (prime event structures with equivalence)**
A prime es with equivalence (epes for short) is
a pair ⟨P,∼⟩ where
P=⟨E,⊢,#⟩ is a prime es and ∼
is an equivalence on E such that for all e,e′,e1,e1′∈E
-
if
[↓e]∼⊆[↓e′]∼
then e≤e′; if in addition e∼e′ then e=e′;
2. 2.
if e∼e′ and \mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\, consistent then
¬(e#e′).
3. 3.
if e∼e′, e1∼e1′, and e#de1 then e′#e1′.
We say that ⟨P,∼⟩ is connected
if ∼=(∼∖#)∗. A morphism of epes
f:⟨P1,∼1⟩→⟨P2,∼2⟩ is
an es morphism f:P1→P2 such that for all
e1,e1′∈P1, e1∼1e1′ iff
f(e1)∼2f(e1′). We denote by epES the corresponding
category.
□
An es with equivalence is thus just an es equipped with
an equivalence on events. Condition (1) essentially
says that an event is determined by the equivalence classes of events
in its causal history. In particular, as a consequence, if
\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\subseteq\,\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\, and e∼e′ then e=e′,
which intuitively means that distinct equivalent events must
correspond to different enablings of the same event. Moreover, it
implies that the set ↓e is ∼-saturated and thus it is a
configuration (see Definition 23 and
Lemma 15).
Conditions (2) and (3) essentially say that equivalent events can have different conflicts only for the fact that their minimal enablings have different conflicts.
Connectedness
amounts to the fact that equivalent events must be connected by a
chain of equivalences going through consistent events.
We next introduce a notion of configuration.
Definition 23** (configurations)**
Let ⟨P,∼⟩ be an epes. Then
\mathit{Conf}({\langle P,\sim\rangle})=\{C\mid C\in\mathit{Conf}({P})\ \land\ C\mbox{ \sim-saturated}\}.
□
In words, a configuration of a prime es with equivalence is a
configuration C of the underlying event structure, where all events
enabled in C that are equivalent to some event already in C are also in
C. Thus equivalent events may have different minimal enablings,
but whenever a configuration contains the causes of two equivalent
events, their executions cannot be taken apart.
Lemma 15** (histories are configurations)**
Let ⟨P,∼⟩ be a epes. For all e∈E,
↓e is a configuration.
□
Proof
Let e∈E be any event. We have to show that
↓e is saturated. If there are
e′∈↓e and e′′∼e′ such that
\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime\prime}}\,\subseteq\,\downarrow\!\!{e} then
[↓e′′]∼⊆[↓e]∼ and hence, by condition (1) in
Definition 22, e′′≤e which means
e′′∈↓e.
■
As an example, the connected es of our running example (see
Fig. 2), corresponds to the prime es with
equivalence in Fig. 9(a), where we have two
distinct copies of event c, namely ca∼cb, corresponding to
the possibile minimal enablings. Graphically, causality is represented
by a straight directed line. The corresponding domain of configurations is depicted in Fig. 9(b). Note that C={a,b,ca} is not a configuration despite the fact that it is downward closed, since it is not ∼-saturated: event cb is missing, but its causes {b} are in C.
Our definition of epes is similar to that
in [23, 24].
Concerning configurations, while [23, 24] identifies unambiguous
configurations where there is a unique representative for each
equivalence class, here instead we saturate including all
equivalent events that are not in conflict.
We finally observe that the constructions above can be “translated”
into constructions that relate directly epes and weak prime domains.
Proposition 8** (weak prime domain for epes)**
Let ⟨P,∼⟩ be a epes. Then
Deq(⟨P,∼⟩)=⟨Conf(⟨P,∼⟩),⊆⟩
is a weak prime domain.
Conversely, if D is a weak prime domain then
Eeq(D)=⟨⟨ir(D),#,⊢⟩,↔∗⟩ with conflict and enabling defined by
i1#i2* if {i1,i2} not consistent;*
X⊢i* if
X⊇ir(i)∖{i}.*
is an epes.
□
Proof
Let ⟨P,∼⟩ be a epes.
Then it is easy to see that the irreducibles of
Deq(⟨P,∼⟩) are the minimal enablings
↓e for e∈E.
Moreover, given a set of pairwise consistent configurations
X⊆Conf(⟨P,∼⟩), the join ⨆X
is the saturation of their union.
Interchangeability is given by
↓e↔↓e′
if e∼e′ and ¬(e#e′).
Using these fact it is almost immediate to conclude that
Deq(⟨P,∼⟩) is a weak prime domain. Let us
first observe that Deq(⟨P,∼⟩) is
interchangeable (Definition 12):
Condition (1) requires that for
all e,e′∈P if ↓e↔∗↓e′
and \mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\, consistent then
↓e↔↓e′. Observe that
↓e↔∗↓e′ implies e∼e′. Moreover, by condition (2) in
Definition 22, \mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\,
consistent implies ¬(e#e′). Hence we conclude
↓e↔↓e′.
Condition (2) is an easy
consequence of condition (3) of
Definition 22. In fact, let
e,e′,e1,e1′∈E such that
↓e↔∗↓e′,
↓e1↔∗↓e1′, i.e.,
e∼e′ and e1∼e1′. Assume moreover that the sets
{↓e′,↓e1′},
\{\,\downarrow\!\!{e},\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e_{1}}\,\},
\{\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,,\,\downarrow\!\!{e_{1}}\} are consistent, meaning that ↓e′∪↓e1′, \,\downarrow\!\!{e}\cup\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e_{1}}\,,
\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\,\downarrow\!\!{e_{1}} are so. From the consistency of ↓e′∪↓e1′ we have ¬(e′#e1′). Moreover, the consistency of \,\downarrow\!\!{e}\cup\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e_{1}}\,,
\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,\cup\,\downarrow\!\!{e_{1}} implies that if e#e1 then the conflict would be direct and this would violate condition (3) of
Definition 22. Hence we must have ¬(e#e1), i.e., {↓e,↓e1} consistent, as desired.
Finally, we show that all irreducibles are weak prime. Let e∈P, consider the irreducible ↓e and a consistent set of configurations X⊆Conf(⟨P,∼⟩). Assume that ↓e⊆⨆X. This means that e is in the saturation of ⋃X, which in turn means that there is C∈X and e′∈C, whence ↓e′⊆C, such that e′∼e. Since e,e′∈⨆X, they are consistent, hence ↓e↔↓e′. Summing up ↓e′⊆C and e∼e′, as desired.
Conversely, let D be a weak prime domain. Observe that the causal
order in Eeq(D) is the restriction of the domain order to
irreducibles. Condition (1) in Definition 22 is an immediate consequence of Proposition 6.
Condition (2) is immediately implied by condition
(1) in the definition of interchangeable domain
(Definition 12).
Concerning condition (3), observe that it becomes:
for i,i′,i1,i1′∈ir(D), if i↔∗i′,
i1↔∗i1′, i,i1 not consistent and
i′,i1′ consistent then either ir(p(i))∪{i1} or
ir(p(i1))∪{i} not consistent. In turn this is
easily seen to be equivalent to condition
(2) in the definition of interchangeable domain
(Definition 12).
■
The correspondence above can be translated to an analogous
correspondence between epes and unstable es. It is
however impossible to make such correspondence functorial essentially for
the same reason why [23, 24] resorts to a pseudo-adjunction.
We try to enucleate the problem by showing a correspondence between
(unstable) event structures and epes.
Definition 24** (from es to epes and back)**
Let ⟨P,∼⟩ be an epes, where
P=⟨E,⊢,#⟩. The corresponding es is
M(⟨P,∼⟩)=⟨E∼,⊢∼,#∼⟩, with
⊢∼ and #∼ defined by
[X]∼⊢∼[e]∼ when X⊢e;
[e]∼#∼[e′]∼
when e1#e1′ for all e1∈[e]∼ and e1′∈[e′]∼.
Conversely, given an es P=⟨E,⊢,#⟩ the
corresponding epes is U(P)=⟨Q,∼⟩, with
Q=⟨E′,⊢′,#′⟩ defined by
E′={⟨C,e⟩∣C∈Conf(E) ∧ e∈E ∧ C⊢0e};
X⊢′⟨C,e⟩ if
C⊆⋃{C′∪{e′}∣⟨C′,e′⟩∈X};
⟨C,e⟩#′⟨C′,e′⟩ if
C∪C′∪{e,e′} is not consistent.
and the equivalence is defined by ⟨C,e⟩∼⟨C′,e⟩ for all C,C′ such that C⊢0e and C′⊢0e.
□
We can easily show, exploiting Proposition 8,
that the constructions above produce well-defined structures and map
connected structures to connected structures.
Moreover, the two constructions are inverse of each other.
Proposition 9
Let ⟨P,∼⟩ be an epes.
Then ⟨P,∼⟩ and
U(M(⟨P,∼⟩)) are isomorphic. Dually,
let P=⟨E,⊢,#⟩ be an
es. Then
M(U(P)) and P are isomorphic.
□
Proof
Let ⟨P,∼⟩ be an epes.
Recall that events in
U(M(⟨P,∼⟩)) are minimal
enablings in M(⟨P,∼⟩).
By definitions of M(⟨P,∼⟩), for all e∈P
we have
[X]∼⊢M(⟨P,∼⟩)[e]∼ when X⊢e. Therefore
[{\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,}]_{\scriptscriptstyle{\sim}}\vdash_{\mathcal{M}({\langle P,\sim\rangle})}[{e}]_{\scriptscriptstyle{\sim}}, and this enabling is minimal since, by
Definition 22(1), whenever e′∼e
and [{\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e^{\prime}}\,}]_{\scriptscriptstyle{\leftrightarrow^{*}}}\subseteq[{\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,}]_{\scriptscriptstyle{\leftrightarrow^{*}}} we
have e=e′. And, again relying on the definition of enabling, one
sees that all minimal enablings are of this shape.
Therefore we can define
c:⟨P,∼⟩→U(M(⟨P,∼⟩)) by
c(e)=\langle{[{\mathrel{\raisebox{0.8pt}{\rotatebox{270.0}{\twoheadrightarrow}}}\!\!{e}\,}]_{\scriptscriptstyle{\sim}}},{[{e}]_{\scriptscriptstyle{\sim}}}\rangle.
By the previous arguments it is a bijection and it can be shown c
to be an isomorphism of epes.
Conversely, let ⟨E,⊢,#⟩ be an an
es.
According to the definition, events in U(E) are minimal
enablings ⟨C,e⟩ in E, and they are equivalent when they are minimal
enablings of the same event.
Then events in M(U(E)) are just equivalence classes of events in U(E). Therefore we can define u:E→M(U(E)) by
u(e)={⟨C,e⟩∣C∈Conf(E) ∧ C⊢0e}. It is
immediate to see that it is a bijection and
an isomorphism of es.
■
Observe that the construction from epes to es can be
easily turned into a functor M:epES→ES. In fact, given a
morphism
f:⟨P1,∼1⟩→⟨P2,∼2⟩ we
can let M(f)([e1]∼1)=[f(e1)]∼2.
Instead, making the converse construction from es to
epes functorial is problematic. In fact, consider the es of the running example
E={a,b,c}, with ∅⊢0a,
∅⊢0b and {a,b}⊢0c and the
es with events E′={a′,b′,c′} with
∅⊢0a′, ∅⊢0b′ and
{a′}⊢0c′ and {b′}⊢0c′ and the morphism
f:E→E′ with f(x)=x′ for x∈{a,b,c}. Then
U(E)={⟨∅,a⟩,⟨∅,b⟩,⟨{a,b},c⟩} and
U(E′)={⟨∅,a′⟩,⟨∅,b′⟩,⟨{a′},c′⟩,⟨{b′},c′⟩}. Observe that, while clearly
U(f)(⟨∅,a⟩)=⟨∅,a′⟩ and
U(f)(⟨∅,b⟩)=⟨∅,b′⟩, when we come
to U(f)(⟨{a,b},c⟩) we can define it as one of the
two equivalent events ⟨{a′},c′⟩ and ⟨{b′},c′⟩.
The solution offered by [23, 24] is to move towards
pseudo-functors,
i.e., considering two epes morphisms g,g′:P1→P2 equivalent
if g(e1)∼2g′(e1) for all e1∈P1 and requiring that functors
are defined only up-to morphism equivalence.
Indeed, it is easy to see that the two possible choices for f above lead to
equivalent morphisms.
IV-B Relation with Interval Based Characterisations
The correspondence between event structures and domains has been often
studied in the literature by relying on the notion of
interval [21, 1, 16, 22].
Definition 25** (interval)**
Let D be a domain. An interval is a pair [d,d′] of
elements of D such that d≺d′. The set of intervals of D
is denoted by Int(D).
Given two intervals [c,c′],[d,d′]∈Int(D) we define
[c,c′]≤[d,d′] if (c=c′⊓d) ∧ (c′⊔d=d′),
and we let ∼ be the equivalence obtained as the
symmetric and transitive closure of ≤.
□
It can be shown that ≤ is a partial order on intervals and thus ∼
is indeed an equivalence. An interval represents a pair of elements
differing only for a “quantum” of information, intuitively the
execution of an event. The equivalence ∼ is intended to identify
intervals corresponding to the execution of the same event in diffent states.
Indeed, in [1] it is shown that for prime domains there is a
bijective correspondence between ∼-classes of intervals and
complete primes.
In weak prime domains we can establish a similar correspondence, with ↔∗-classes of irreducibles
playing the role of the primes.
Lemma 16** (intervals vs. irreducibles)**
Let D be a weak prime domain. Define ζ:Int(D)∼→ir(D)↔∗ by
ζ([d,d′]∼)=[i]↔∗,
where i is any element in δ(d′,d). Then ζ is a bijection, whose inverse is ι:ir(D)↔∗→Int(D)∼
defined by
ι([i]↔∗)=[p(i),i]∼.
□
Proof
We first observe that ζ is well-defined, i.e., if
[c,c′]∼[d,d′] are equivalent intervals then for
all i∈δ(c′,c), i′∈δ(d′,d) it holds
i↔i′. This follows by noting that if
[c,c′]≤[d,d′], i∈δ(c′,c) and
i′∈δ(d′,d) then i↔i′.
In order to prove the last assertion, observe that since
i∈ir(c′) we have i⊑c′⊑d′, thus
i∈ir(d′). Moreover, i∈ir(d), otherwise, by
i⊑d, i⊑c′ and c=d⊓c′, we
would get i⊑c, contradicting the assumption that
i∈δ(c′,c). Hence i∈δ(d′,d) and by
Lemma 10(3) we conclude.
Also the converse map ι is well-defined. This follows from the
observation that for all irreducibles i,i′∈ir(D) if
i↔i′ then
[p(i),i],[p(i′),i′]≤[p(i)⊔p(i′),i⊔i′] and thus
[p(i),i]∼[p(i′),i′]. Let us prove, for
instance, that
[p(i),i]≤[p(i)⊔p(i′),i⊔i′].
Since i↔i′, surely
p(i)⊑p(i)⊔p(i′) and
p(i)≺i, hence by Lemma 12, we deduce
i⊑p(i)⊔p(i′) or
p(i)=i⊓(p(i)⊔p(i′)). The first
possibility, i⊑p(i)⊔p(i′), by the fact
that i is irreducible leads to i⊑p(i′) (since
i⊑p(i) is clearly false). Thus
i⊔p(i′)=p(i′)≺i′⊑p(i)⊔i′, that, by Lemma 5(3),
contradicts i↔i′.
Hence the second possibility must hold, i.e.,
p(i)=i⊓(p(i)⊔p(i′)). Moreover, again
by Lemma 5(3), we have
i⊔(p(i)⊔p(i′))=i⊔i′. Hence
[p(i),i]≤[p(i)⊔p(i′),i⊔i′] as desired.
The two maps are inverse each other.
If [d,d′]∈Int(D) and i∈δ(d′,d) then
[d,d′]∼[p(i),i].
Observe that d⊔i=d′ by
Lemma 10(1). Moreover, in
order to show that d⊓i=p(i), note that, since
i∈δ(d′,d) and, by
Lemma 10(2), the set
δ(d′,d) is flat, we have that p(i)⊑d.
Moreover p(i)≺i, therefore by Lemma 12,
p(i)=d⊓i, as desired.
If i∈ir(D) and i′∈[p(i),i] then
i↔i′.
Just observe that i∈[p(i),i] and then use
Lemma 10(3).
■
In [21, 22] the domain of
configurations of general event structures with binary conflict is characterised in terms of intervals. It is shown (see, e.g., [21, Theorem 3.3.3]), that given a an event structure with binary conflict, the domain of configuration is an
algebraic complete partial order where the
following axioms hold
(F)
for all d∈K(D) the set ↓d is finite;
(C)
for all x,y,z∈K(D), if x≺y,
x≺z, {y,z} consistent, and y=z then there exists
y⊔z and y≺y⊔z and z≺y⊔z;
(R)
for all intervals [x,y], [x,z] if
[x,y]∼[x,z] then y=z;
(V)
for all x,x′,y,y′,x′′,y′′∈K(D) if
[x,x′]∼[y,y′], [x,x′′]∼[y,y′′], and {x′,x′′}
consistent then y′,y′′ consistent.
Conversely, in [22] an explicit construction of the es corresponding to
a domain is provided. Given
d∈K(D), let
s(d)={[c,c′]∼∣c′⊑d}.
Definition 26** (event structure from a domain [22])**
Given a domain D satisfying the axioms (F), (C), (R), (V), the
corresponding es with binary conflict is defined as
Ewd(D)=(E,#,⊢) where
E=Int(D)∼;
[c,c′]∼#[d,d′]∼ if for all
[c1,c1′], [d1,d1′] such that
[c1,c1′]∼[c,c′] and
[d1,d1′]∼[d,d′] the set {c1′,d1′} is
not consistent;
for X⊆E, X⊢[c,c′]∼ if
s(c1)⊆X for some interval
[c1,c1′]∼[c,c′].
□
The above construction produces an event structure with binary conflict that is mapped back to the original domain (see, e.g., [22, Corollary 2.10]).
Theorem 4
Let D be a domain satisfying axioms (F), (C), (R), (V). Then
D(Ewd(D)) is isomorphic to D.
□
We can build on the above results to show that the domains satisfying
axioms (F), (C), (R) and (V) are exactly the weak prime domains.
Proposition 10** (weak prime domains and intervals)**
Let D be a domain. Then D is a weak prime domain iff D
satisfies axioms (F), (C), (R) and (V).
□
Proof
Let D be a domain satisfying axioms (F), (C), (R) and (V). By
Theorem 4, D(Ewd(D))≃D. Since, by
Proposition 4, the set of configurations of any
event structure forms a weak prime domain, we conclude that D is
weak prime.
For the converse, let D be a weak prime domain. By
Theorem 3, we have that
D(E(D))≃D and thus, since by [21, 22],
the domain of configuration of an event structure with binary
conflict satisfies axioms (F), (C), (R) and (V), we conclude.
■
Moreover, relying on Lemma 16, we can
show that the event structures associated with a domain
in [22] (Definition 26) and in our work (Definition 20)
coincide.
Proposition 11
Let D be a weak prime domain. Then E(D) and Ewd(D) are isomorphic.
□
Proof
By Lemma 16, the function
ζ:Int(D)∼→ir(D)↔∗ is a
bijection. Note that Int(D)∼ and
ir(D)↔∗ are the sets of events respectively of
E(D) and Ewd(D). We next show that ζ is an isomorphism
of event structures.
Let e1,e2 be events in Ewd(D). We show that e1#e2
iff ζ(e1)#ζ(e2).
If ¬(e1#e2), from Definition 26, we get that
there exist [c1,c1′]∈e1 and
[c2,c2′]∈e2 such that {c1′,c2′} is
consistent. Let d∈D be an upper bound, i.e.,
c1′,c2′⊑d. Now, ζ(ej)=[ij]↔∗ for
ij∈δ(cj,cj′), for j∈{1,2}. Clearly,
i1,i2∈ir(d) whence
[i1]↔∗,[i2]↔∗⊆[ir(d)]↔∗ and
thus, according to Definition 20, we have
¬([i1]↔∗#[i2]↔∗), as desired.
The argument can be reversed to prove that if
¬(ζ(e1)#ζ(e2)) then ¬(e1#e2).
Concerning the enabling relation, we show that X⊢e in
Ewd(D) iff ζ(X)⊢ζ(e) in E(D).
Assume that X⊢e in Ewd(D). This means that there exists
[c,c′]∈e such that
s(c)={[d,d′]∼∣d′⊑c}⊆X.
Now, recall that ζ(e)=[i]↔∗ with
i∈δ(c′,c).
In order to show that ζ(X)⊢ζ(e), according to
Definition 20, we prove that
[ir(i)∖{i}]↔∗⊆ζ(X).
Let j∈ir(i)∖{i}. Clearly
j∈δ(j,p(j)) and thus
[j]↔∗=ζ([p(j),j]∼).
Moreover, by
Lemma 10(2) the set
δ(c′,c) is flat and thus, since j⊏i
necessarily j∈δ(c′,c). Since
j∈ir(c′) we conclude that j∈ir(c), namely
j⊑c.
This implies that [p(j),j]∼∈s(c) and thus
\begin{array}[]{lll}[{j}]_{\scriptscriptstyle{\leftrightarrow^{*}}}&=\mathop{\mathit{\zeta}}([{\mathit{p}({j})},{j}]_{\sim})&\\
&\subseteq\mathop{\mathit{\zeta}}(s(c))&\\
&\subseteq\mathop{\mathit{\zeta}}(X)&\mbox{[since s(c)\subseteq X]}\end{array}
We thus conclude that
[ir(i)∖{i}]↔∗⊆ζ(X) as desired.
Also in this case, the argument can be easily reversed to prove the
converse implication.
■
The paper by Droste [22] considers also the case of event
structures with a general consistency relation (rather than a binary
conflict). The correspondence with our approach can be extended to this setting, as further detailed in Appendix -A.
IV-C Relation with Asynchronous Graphs
A characterisation of prime es in terms of their transition
graph has been given in [27]. A slightly different, yet
equivalent formalisation has been rediscovered in [29], in the
context of the work on the abstract theory of rewriting and concurrent
games.
Here we show that an analogous characterisation can be obtained for (connected)
event structures. For our development we refer to the formalisation in [29].
Given a graph G=⟨N,U,s,t⟩, a sequence of edges
w=u1;…;un∈U∗ is a path whenever each edge has a
target that coincide with the source of the subsequent edge, i.e., for
all i∈[1,n−1], t(ui)=s(ui+1).
Let us denote by P2(G) the set of paths of length 2, i.e.,
P2(G)={u1;u2∣u1,u2∈E}. Note that two paths of
length 2 with the same source and target can be seen as a “square”
in the graph. An asynchronous graph is then a transition system where
some squares are declared to commute.
Definition 27** (asynchronous graph)**
An asynchronous graph
is a tuple
A=⟨G,n0,≃⟩ where
G=⟨N,U,s,t⟩ is a directed graph,
n0∈N is the origin and
≃⊆P2(G)×P2(G) is an equivalence
relation
on coinitial and cofinal paths of length 2 (i.e., if
u1;u2≃v1;v2 then s(u1)=s(v1) and t(u2)=t(v2))
such that the following axioms hold (in pictures, all squares
depicted are assumed to commute)
-
if u1;u2≃v1;v2 and u2=v2 then u1=v1;
\bullet$$\bullet$$\bullet$$\bullet$$u_{1}$$v_{1}$$u_{2}$$v_{2}
2. 2.
if u;u1≃v1;v2 and u;u1′≃v1′;v2′ then
(u1=u1′ iff v1=v1′);
\bullet$$\bullet$$\bullet$$\bullet$$u$$v_{1}$$u_{1}$$v_{2}
and
\bullet$$\bullet$$\bullet$$\bullet$$u$$v_{1}^{\prime}$$u_{1}^{\prime}$$v_{2}^{\prime}
3. 3.
Cube
\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$u_{1}$$v_{1}$$u_{2}$$v_{2}$$u_{3}$$v_{3}
\begin{array}[]{c}\stackrel{{\scriptstyle(a)}}{{\Rightarrow}}\\
\stackrel{{\scriptstyle(b)}}{{\Leftarrow}}\end{array}
\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$u_{1}$$v_{1}$$u_{2}$$v_{2}$$u_{3}$$v_{3}
4. 4.
Coherence axiom
\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$u_{1}$$v_{1}$$u_{2}$$v_{2}
⇒
\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$\bullet$$u_{1}$$v_{1}$$u_{2}$$v_{2}
□
Given an asynchronous graph, we denote by the same symbol ≃ the
extension of the equivalence to all paths by contextual closure, i.e.,
w1;w;w2≃w1;w′;w2 for all w1,w2,w,w′∈U∗ with w≃w′.
The equivalence
classes of paths from the origin can be ordered by prefix, leading to
a partial order P(A).
Then it can be shown that the partial orders of finite configurations
of prime es exactly correspond to asynchronous graphs such
that all cofinal paths from the origin are equivalent.
Definition 28** (prime asynchronous graph)**
An asynchronous graph
A=⟨G,n0,≃⟩ is called prime if
all cofinal paths from the origin n0 are equivalent.
□
It can be seen that the requirement of having all cofinal paths equivalent amounts to that of having all coinitial and cofinal paths of length 2 (squares) equivalent. This is indeed how the condition is formalised in [27].
Theorem 5** (asynchronous graphs/prime es [29])**
Let A be a prime asynchronous graph. The ideal completion
Idl(P(A)) is a prime domain. Conversely, each
prime domain is isomorphic to Idl(P(A)) for some prime
asynchronous graph A.
□
With respect to [29],
we added the coherence
axiom (4) in the definition of
asynchronous graph, which
is going to be pivotal in our later characterisation of weak prime domains (Proposition 12). This is actually necessary already for having a correspondence with
prime domains and es.222In a personal communication, Paul Andrée Melliès agreed that condition (4) is necessary for the correctness of Theorem 3 of Section 2.6 of [29],
rephrased here as Theorem 5.
The correspondence established by Theorem 5
generalises to connected es and what we call weak
asynchronous graphs, i.e., asynchronous graphs where only the forward
part of the cube axiom holds, while the converse implication (indeed
sometimes referred to as stability axiom) may fail.
Definition 29** (weak asynchronous graphs)**
A weak asynchronous graph is defined as in
Definition 27, but omitting the stability
axiom (3a). It is called weak prime if
additionally all cofinal paths from the origin are equivalent.
□
Then we can prove that weak prime domains are exactly the partial
orders generated by weak prime asynchronous graphs (which in turn
correspond to connected es).
Proposition 12** (weak asynchronous graphs and domains)**
Let A be a weak prime asynchronous graph. The ideal completion
Idl(P(A)) is a weak prime domain. Conversely, each weak
prime domain is isomorphic to Idl(P(A)) for some weak prime
asynchronous graph A.
□
Proof
First observe that in a weak asynchronous graph
A=⟨G,n0,≃⟩ with
G=⟨N,U,s,t⟩ such that all the cofinal paths from the
origin are equivalent we have that all the squares are commuting. Thus
axioms (1) and (2) imply that the graph
is simple, that there are at most two different paths of length 2 with
the same source and target, and that there is at most one way of
closing a square.
Now, let D be a weak prime domain and consider the subset of compact
elements K(D). It can be seen as an (acyclic) graph by taking compact
elements as nodes and intervals as edges, with source and target
functions being the obvious ones s([c,c′])=c and
t([c,c′])=c′.
Then taking ∅ as origin and letting all the squares commute,
we get a weak asynchronous graph where all the paths are equivalent.
In detail, as observed above, axiom (1) follows
from the fact that the graph is simple.
Axiom (2) says that there are at most two
paths of length 2 between the same source and target. Assume that this
is not the case, i.e., K(D) contains a substructure as below, with y1,y2,y3 pairwise distinct.
z$$y_{1}$$y_{2}$$y_{3}$$x
Then we would have that y1 is an irreducible which is not a weak
prime. In fact y1⊑y2⊔y3, but it is not the
case that either y1↔y2 or y1↔y3.
Axiom (3a) follows from bounded completeness
and the fact that if x≺y1 and x≺y2, with
y1=y2 then y1≺y1⊔y2 and
y2≺y1⊔y2.
Axiom (4) is an immediate
consequence of coherence.
Finally, we have to prove that all the paths from ∅ to the
same target are equivalent. We prove more generally that all
coinitial and cofinal paths are equivalent. First
notice that given
two paths w=y1…yn and w′=y1′…ym′ with
y1=y1′ and yn=ym′ then n=m=∣[ir(yn)]↔∗∖[ir(y1)]↔∗∣, by Lemma 11. We prove
by induction on n=m that the two paths are equivalent. The base
cases n=1 and n=2 are obvious.
In the inductive case, consider
z=y2⊔y2′.
y_{n}=y_{n}^{\prime}$$y_{3}$$y_{3}^{\prime}$$z$$y_{2}$$y_{2}^{\prime}$$y_{1}=y_{1}^{\prime}
Then, as already observed, y2≺z and
y2′≺z. Then
[TABLE]
Moreover, since z⊑yn=yn′ there is a path
y2z…yn of length n−1 in a way that we can apply the
inductive hypothesis to prove that
y2y3…yn≃y2z…yn. Similarly, on the
left side, we get y2′y3′…yn≃y2′z…yn′. Therefore, together with (9), we conclude that
w=y1y2y3…yn≃y1y2z…yn≃y1′y2′z…yn′≃y1′y2′y3′…yn′=w′.
Conversely, let A=⟨G,n0,≃⟩ where
G=⟨N,U,s,t⟩ is a weak asynchronous graph such that
all the paths from the origin are equivalent. Then, in particular, all
the squares are commuting and, by axiom (1), the
graph is simple, i.e., we can think of edges as a relation on
nodes.
This allows us to view A as a concurrent automata
(Q,Σ,T,(∥q)q∈Q) in the sense
of [25] as follows. Define an equivalence on edges by
u≡u′ if there are v,v′∈U such that uv∼v′u′
(namely, u,u′ are the opposite edges of a square). Then take
nodes as states Q=N, equivalence classes of edges as labels
Σ=U≡, transition relation
T={(s(u),u,t(u))∣u∈U} and local concurrency given
by [u]≡∥n[v]≡ when u,v are such that
s(u)=s(v)=n and there are u′,v′∈E such that uu′∼vv′.
The fact that ∥n is well-defined uses in an essential way
axioms (3a) and (4). Then an immediate adaptation
of [25, Theorem 10] to asynchronous graphs shows that
P(A) is a domain that satisfies axioms (F), (C), and (R) in
Subsection IV-B. Finally, observe that axiom (V) is a
“global” version of the axiom (1). The fact
that the latter implies the former can be proved by exploiting the
fact that each bounded subset of P(A) is a semimodular lattice [26, Theorem 3.1].
Hence D is a weak prime domain.
■
V Domain and event structure semantics for graph rewriting
In this section we consider graph rewriting systems where rules are
left-linear but possibly not right-linear and thus, as an effect of a
rewriting step, some items can be merged. We argue that weak prime
domains and connected es are the right tool for providing a
concurrent semantics to this class of rewriting systems. More
precisely, in Subsection V-A we review the basics of
graph rewriting and we generalise the notion of independence between
rule applications to graph rewriting with left-linear rules. Then in
Subsections V-B and V-C we show that the
domain associated with a graph rewriting system by a generalisation of
a classical construction is a weak prime domain and vice versa that
each connected es and thus each weak prime domain arise as the
semantics of some graph rewriting system. Finally, in
Subsection V-D we show how a prime event structure
semantics for a graph rewriting system can be recovered by imposing
suitable restriction on rule application.
V-A Graph rewriting and concatenable traces
We first review the basic definitions about graph rewriting in the double-pushout approach [20].
We recall graph grammars and then introduce a notion of trace, which provides a representation of a sequence of
rewriting steps that abstracts from the order of independent rewrites. This requires an original generalisation of the notion of independence between rewriting steps to the case of left-linear rules.
Traces are then turned into a category
Tr(G) of concatenable derivation traces [31].
Definition 30
A (directed) graph is a tuple
G=⟨N,E,s,t⟩, where N and E are
sets of
nodes and edges, and s,t:E→N are the source and target
functions. The components of a graph G are often denoted by
NG, EG, sG, tG. A graph morphism
f:G→H is a pair of functions
⟨fN:NG→NH,fE:EG→EH⟩ such
that fN∘s=s′∘fE and fN∘t=t′∘fE.
We denote by Graph the category of graphs and graph morphisms
□
An abstract graph [G] is an isomorphism class of
graphs.
We work with typed graphs, i.e., graphs which are
“labelled” over some fixed graph. Formally, given a graph T, the category of
graphs typed over T, as introduced in [32], is the
slice category (Graph↓T), also denoted GraphT.
Definition 31** (graph grammar)**
A (T-typed graph) rule is a span
(L←lK→rR) in
GraphT where l is mono and not epi.
The typed graphs L, K, and R are called the left-hand side,
the interface, and the right-hand side of the rule, respectively.
A (T-typed) graph grammar is a tuple
G=⟨T,Gs,P,π⟩, where Gs is the
start (typed) graph, P is a
set of rule names, and
π maps each rule name in P into a rule.
□
Sometimes we write
p:(L←lK→rR) for
denoting the rule π(p). When clear from the context we omit the
word “typed” and the typing morphisms. Note that we consider only
consuming grammars, i.e., grammars where for every rule
π(p)
the morphism l is not epi.
Also note that rules are, by default, left-linear, i.e., the morphism
l is mono. When also the morphism r is mono, the rule is called
right-linear.
An example of graph grammar has been discussed in the introduction
(see Fig. 2(a)). The type graph was left implicit: it
can be found in the top part of Fig. 10. The
typing morphisms for the start graph and the rules are implicitly
represented by the labelling. Also observe that for the rules only the
left-hand side L and the right-hand side R were reported. The same
rules with the interface graph explicitly represented are in
Fig. 10.
Definition 32** (direct derivation)**
Let G be a typed graph,
let p:(L←lK→rR)
be a rule, and let mL be a match, i.e., a typed graph
morphism mL:L→G. A direct derivation
δ from G to H via p (based on mL) is a diagram as in
Fig. 11, where both squares are required to be pushouts in
GraphT.
We write δ:G⟹p/mH, where m=⟨mL,mK,mR⟩, or simply δ:G⟹pH.
□
Since pushouts are defined only up to isomorphism, given isomorphisms
κ:G′→G and ν:H→H′, also G′⟹p/m′H
with m′=⟨κ−1∘mL,mK,mR⟩ and
G⟹p/m′′H′ with m′′=⟨mL,mK,ν∘mR⟩ are direct derivations,
denoted by κ⋅δ and δ⋅ν, respectively.
Informally, the rewriting step removes (the image
of) the left-hand side from G and replaces it by (the
image of) the right-hand side R. The interface K (the common part
of L and R) specifies what is preserved.
For example, the transitions in Fig. 2(b) are
all direct derivations.
When rules are not right-linear, some items in the (image of the) interface are merged. This happens, e.g., for pa and pb.
Definition 33** (derivations)**
Let G=⟨T,Gs,P,π⟩ be a graph
grammar. A derivation
ρ:G0⟹G∗Gn over G is a
(possibly empty) sequence of direct derivations
{Gi−1⟹piGi}i∈[1,n] where
pi∈P for i∈[1,n]. The graphs G0 and Gn
are called the source and the target of ρ, and
denoted by s(ρ) and t(ρ), respectively. The
length of ρ is ∣ρ∣=n.
The derivation is called proper if ∣ρ∣>0.
Given two derivations ρ
and ρ′ such that t(ρ)=s(ρ′), their
sequential composition
ρ;ρ′:s(ρ)⟹∗t(ρ′) is
defined in the obvious way.
□
When irrelevant/clear from the context, the subscript
G is omitted.
If
ρ:G⟹∗H is a proper derivation
and
κ:G′→G, ν:H→H′ are graph isomorphisms, then
κ⋅ρ:G′⟹∗H and
ρ⋅ν:G⟹∗H′ are defined as expected.
In the double pushout approach to graph rewriting, it is natural to
consider graphs and derivations up to isomorphism.
However some structure must be imposed on the start and end graphs
of an abstract derivation in order to have a meaningful notion of
sequential composition.
In fact, isomorphic graphs are, in general, related by several
isomorphisms, while in order to concatenate derivations keeping track
of the flow of causality one must specify how the items of the source
and target isomorphic graphs should be identified.
We follow [2], inspired by the theory of
Petri nets [33]: we choose for each class of isomorphic
typed graphs a specific graph, named the canonical graph, and we
decorate the source and target graphs of a derivation with
isomorphisms from the corresponding canonical graphs to such
graphs.
Let C denote the operation that associates with each (T-typed)
graph its canonical graph, thus satisfying C(G)≃G
and if G≃G′ then C(G)=C(G′).
Definition 34** (decorated derivation)**
A decorated derivation ψ:G0⟹∗Gn is a
triple ⟨α,ρ,ω⟩, where ρ:G0⟹∗Gn is a derivation and α:C(G0)→G0, ω:C(Gn)→Gn are isomorphisms.
We define s(ψ)=C(s(ρ)), t(ψ)=C(t(ρ)) and ∣ψ∣=∣ρ∣.
□
Definition 35** (sequential composition)**
Let ψ=⟨α,ρ,ω⟩, ψ′=⟨α′,ρ′,ω′⟩ be decorated derivations such that
t(ψ)=s(ψ′). Their sequential
composition ψ;ψ′ is defined, if ψ and
ψ′ are proper, as
⟨α,(ρ⋅ω−1);(α′⋅ρ′),ω′⟩.
Otherwise, if ∣ψ∣=0 then ψ;ψ′=⟨α′∘ω−1∘α,ρ′,ω′⟩, and similarly,
if ∣ψ′∣=0 then ψ;ψ′=⟨α,ρ,ω∘α′−1∘ω′⟩.
□
We next define an abstraction equivalence that identifies derivations that differ
only in representation details.
Definition 36** (abstraction equivalence)**
Let ψ=⟨α,ρ,ω⟩, ψ′=⟨α′,ρ′,ω′⟩ be decorated derivations with ρ:G0⟹∗Gn and ρ′:G0′⟹∗Gn′′
(whose ith step is depicted in the lower rows of
Fig. 12). They are abstraction equivalent,
written ψ≡aψ′,
if n=n′, pi=pi′ for all i∈[1,n],
and there exists a family of isomorphisms
{θXi:Xi→Xi′∣X∈{G,D},
i∈[1,n]}∪{θG0}
between corresponding graphs in the two derivations such that
(1)
the isomorphisms relating the source and target
commute with the decorations, i.e., θG0∘α=α′
and θGn∘ω=ω′; and
(2)
the resulting diagram (whose ith step is represented in
Fig. 12) commutes.
□
Equivalence classes of decorated derivations
with respect to ≡a
are called abstract derivations and
denoted by
[ψ]a, where ψ is an element of the class.
From a concurrent perspective, also derivations that only differ for
the order in which two independent direct derivations are applied
should not be distinguished. This is classically formalised by a
notion of sequential independence between rewrites inducing the
so-called shift equivalence on derivations. When working with rules
which are only left-linear, we need to refine the notion of
independence as discussed below.
Definition 37** (sequential independence)**
Consider a derivation G⟹p1/m1H⟹p2/m2M as in
Fig. 13. Then, its components are weakly sequentially
independent if there exists an independence pair among
them, i.e., two graph morphisms i1:R1→D2 and
i2:L2→D1 such that l2∗∘i1=mR1,
r1∗∘i2=mL2.
They are sequentially
independent if the independence pair is unique.
□
Intuitively, when the independence pair is not unique, we can think
that the first rewrite has performed some fusions that the second
rewrite is using in an essential way. Hence the steps should not
considered independent.
Note that when dealing with linear rules, the independence pair, if it exists,
is always unique. Hence the two notions independence coincide and
reduce to the classical one in [14].
Proposition 13** (interchange operator)**
Let ρ=G⟹p1/m1H⟹p2/m2M be a
derivation whose components are sequentially independent via
an independence pair ξ.
Then, a derivation ICξ(ρ)=G⟹p2/m2∗H∗⟹p1/m1∗M can be uniquely constructed.
The interchange is called proper when it produces a
derivation that is again sequentially independent.
□
We explicitly observe that the result of the interchange of two
sequentially independent rewrites is still weak sequentially
independent, but, differently from what happens for linear rules, it
could fail to be sequentially independent due to non-uniqueness of the
independence pair. This motivates the notion of proper interchange.
The interchange operator is used to introduce a notion of shift
equivalence [14], identifying (as for the analogous
permutation equivalence of λ-calculus) those derivations which
differ only for the scheduling of independent steps. Due to the fact
that the interchange of a sequential independence derivation is not
necessarily sequential independent some care must be put for making the
relation symmetric.
Definition 38** (shift equivalence)**
The derivations ρ and ρ′ are shift equivalent,
written ρ≡shρ′, if ρ′ can be obtained from
ρ by repeated proper interchanges of pairs of
sequentially independent rewrite steps.
□
If we are
interested in the way ρ′ is obtained from ρ, we write
ρ≡σshρ′, for
σ:[1,n]→[1,n] the associated permutation.
It is easy to see that, due to the requirement that interchanges are proper, the relation ≡sh is indeed symmetric.
For instance, in Fig. 2(b) it is easy to see
that the derivation Gs⟹paGb⟹pbGab
consists of sequentially independent direct derivations. It is shift
equivalent to Gs⟹pbGa⟹paGab,
via the permutation σ={(1,2),(2,1)}.
Two decorated derivations are said to be shift equivalent when the
underlying derivations are, i.e.,
⟨α,ρ,ω⟩≡sh⟨α,ρ′,ω⟩ if ρ≡shρ′. Then the
equivalence of interest arises by joining abstraction and shift equivalence.
Definition 39** (concatenable traces)**
We denote by ≡c the equivalence on decorated derivations
arising as the transitive closure of the union of the relations
≡a and ≡sh.
Equivalence classes of decorated derivations with respect to
≡c are denoted as [ψ]c and are called
concatenable (derivation) traces.
□
We will sometimes annotate ≡c with the permutation relating
the equivalent permutations. Formally, ≡σc can be
defined inductively as: if ψ≡aψ′ then
ψ≡idcψ′ , if ψ≡σshψ′ then
ψ≡σcψ′, and if
ψ≡σcψ′ and
ψ′≡σ′cψ′′ then
ψ≡σ′∘σcψ′′.
Several proofs concerning concatenable traces exploit a
property of equivalence ≡c presented in [2, Sec. 3.5],
that we summarize and adapt here to our framework.
If ψ and ψ′ are decorated derivations, then a consistent permutation
between their steps relates two direct derivations if they consume
and produce the same items, up to an isomorphism that is consistent with the decorations.
Definition 40** (consistent permutation)**
Given a decorated derivation ψ=⟨α,ρ,ω⟩:G0⟹∗Gn,
we denote by col(ψ) the colimit of the corresponding diagram in category GraphT, and by incol(ψ)X
the injection of X into the colimit, for any graph X in ρ.
Given two such decorated derivations ψ and ψ′ of equal length n,
a consistent permutation σ from ψ to ψ′ is a permutation
σ on [1,n] such that
-
there exists an isomorphism ξ:col(ψ)→col(ψ′);
2. 2.
for each i∈[1,n] the direct derivations δi of ψ and δσ(i) of ψ′
use the same rule;
3. 3.
for each i∈[1,n], let p:(L←lK→rR) be the
rule used by direct derivations δi:Gi−1⟹p/mGi and
δσ(i)′:Gσ(i)−1′⟹p/m′Gσ(i)′; then
ξ∘incol(ψ)Gi−1∘mL=incol(ψ′)Gσ(i)−1∘m′L, and
ξ∘incol(ψ)Gi∘mR=incol(ψ′)Gσ(i)∘m′R;
4. 4.
[α-consistency] ξ∘incol(ϕ)G0∘α=incol(ϕ′)G0′∘α′;
5. 5.
[ω-consistency] ξ∘incol(ϕ)Gn∘ω=incol(ϕ′)Gn′∘ω′;
A permutation σ from ψ to ψ′ is called left-consistent if it satisfies
conditions (1)-(4), but possibly not ω-consistency.
It is easy to show, by induction on the length of derivations, that the isomorphism
ξ:col(ψ)→col(ψ′) is uniquely determined by conditions (2)-(4), if it exists.
□
In the case of linear rules the existence of a consistent permutation
is a characterisation of equivalence ≡c. Here, it just
provides a necessary condition.
Lemma 17
Let ψ, ψ′ be decorated derivations.
-
if ψ≡σcψ′ then
∣ψ∣=∣ψ′∣ and σ is a consistent permutation on
[1,∣ψ∣] between them. We write ψ≡σcψ′ in this case.
2. 2.
If ψ;ψ1≡σcψ′;ψ1′ and ψ≡σ0cψ′,
then σ0 is the restriction of σ to [1,∣ψ∣]. In this case it also holds
ψ1≡σ1cψ1′, with σ1(i)=σ(i+∣ψ∣)−∣ψ∣.
3. 3.
If ψ≡cψ′, then there is a unique consistent permutation σ such that
ψ≡σcψ′.
□
Proof
[sketch]
-
This holds by [2, Thm. 3.5.3]. Just note that the proof of this direction does not use linearity of rules.
2. 2.
Suppose by absurd that j be the smallest index in [1,∣ψ∣] such that
σ(j)=σ0(j). Let p:(L←lK→rR) be the
rule used in δj and let
x∈L∖l(K) be an item consumed by it, which exists because all rules are consuming.
By Definition 40 we deduce that both direct derivations δσ(j)′
and δσ0(j)′ of ψ′;ψ1′ use the same rule p (say, with matches m′ and m′′),
and that
the items m′L(x)∈Gσ(j)−1′ and
m′′L(x)∈Gσ0(j)−1′ which are consumed by δσ(j)′ and δσ0(j)′,
respectively, are identified in the colimit col(ψ′;ψ1′) (actually, from ψ≡σ0cψ′
we know that there is a morphism Gσ0(j)−1′→col(ψ′), but we can compose it with
the obvious – not necessarily injective – morphism col(ψ′)→col(ψ′;ψ1′)).
But given the shape of the derivation diagram determined
by the left-linearity of rules, and the
properties of colimits in Graph, this is not possible, because there is no undirected path of morphisms
relating the images of element x∈L in Gσ(j)−1′ and Gσ0(j)−1′ respectively.
Therefore σ and σ0 must coincide on [1,∣ψ∣].
For the second part, by the fact just proved clearly σ1 is a
well-defined permutation on [1,∣ψ1∣]. Then the fact that
ψ1≡σ1cψ1′ is almost immediate. Only
commutation of the source decorations is not obvious, but it follows
from commutation of the target for ψ≡σ0cψ′
and Definition 35.
3. 3.
Direct consequence of the previous point, considering zero-length decorated derivations ψ1 and ψ1′.
■
The sequential composition of decorated derivations lifts to
composition of derivation traces so that we can consider the
corresponding category.
Definition 41** (category of concatenable traces)**
Let G be a graph grammar.
The category of concatenable traces of
G, denoted by Tr(G), has abstract graphs as
objects and concatenable traces as arrows.
□
V-B A weak prime domain for a grammar
For a grammar G we obtain a partially ordered representation of its derivations
starting from the initial graph by considering the concatenable traces ordered
by prefix.
Formally, as done in [2, 3] for linear
grammars, we consider the category
([Gs]↓Tr(G)), which, by definition of sequential
composition between traces, is easily shown to be a preorder.
Proposition 14
Let G be a graph grammar. Then the category
([Gs]↓Tr(G)) is a preorder.
□
Proof
Let [ψ]:[Gs]→[G], [ψ′]:[Gs]→[G′] be
concatenable traces and let
[ψ1],[ψ2]:[ψ]→[ψ′] be arrows in the slice
category. Spelled out, this means that ψ1,ψ2:G→G′
are such that ψ;ψ1≡cψ;ψ2≡cψ′. By point (2) of Lemma 17,
using the fact that ψ≡cψ we can conclude
that ψ1≡cψ2, as desired.
■
Explicitly, elements of the preorder are concatenable traces
[ψ]c:[Gs]→[G] and, for [ψ′]c:[Gs]→[G′], we
have [ψ]c⊑[ψ′]c if there is ψ′′:G→G′
such that ψ;ψ′′≡cψ′.
Note that, given two concatenable traces [ψ]c:[Gs]→[G]
and [ψ′]c:[Gs]→[G′], if
[ψ]c⊑[ψ′]c⊑[ψ]c then ψ can be
obtained from ψ′ by composing it with a zero-length
trace. Hence the elements of the partial order induced by
([Gs]↓Tr(G)) intuitively consist of classes of
concatenable traces whose decorated derivations are
related by an isomorphism that has to be consistent with
the decoration of the source.
Once applied to the grammar in Fig. 2(a), this
construction produces a domain isomorphic to that in
Fig. 2(c).
Lemma 18
Let G be a graph grammar. The partial order induced by
([Gs]↓Tr(G)), denoted P(G),
has as elements
⟨ψ⟩c={[ψ⋅ν]c∣ν:t(ψ)→∼t(ψ)} and
⟨ψ⟩c⊑⟨ψ′⟩c if
ψ;ψ′′≡cψ′ for some decorated derivation ψ′′.
□
Proof
Immediate.
■
The domain of interest is then obtained by ideal completion of
P(G), with (the principal ideals generated by) the elements in
P(G) as compact elements.
In order to give a proof for this, we need a preliminary technical lemma that
essentially proves the existence and provides the shape of the least
upper bounds in the domain of traces.
Lemma 19** (properties of ≡c)**
Let ψ and ψ′ be decorated derivations. Then the following hold:
-
Let ψ1,ψ1′ be such
that ψ;ψ1≡σcψ′;ψ1′ and let
n=∣{j∈[∣ψ∣,∣ψ;ψ1∣−1]∣σ(j)<∣ψ′∣}∣. Then for all ϕ2,ϕ2′ such that
ψ;ϕ2≡cψ′;ϕ2′ it holds ∣ϕ2∣≥n
and there are ψ2,ψ2′,ψ3 such that
ψ;ψ1≡cψ;ψ2;ψ3**
ψ;ψ2≡cψ′;ψ2′**
∣ψ2∣=n**
2. 2.
Let ψ1,ψ1′, ψ2,ψ2′ be such that
ψ;ψ1≡σ1cψ′;ψ1′ and
ψ;ψ2≡σ2cψ′;ψ2′ with ψ1,ψ2
of minimal length. Then ψ1≡σcψ2⋅ν,
where ν:t(ψ2)→t(ψ2) is some graph isomorphism and
σ(j)=σ2−1(σ1(j+∣ψ∣))−∣ψ∣ for
j∈[0,∣ψ1∣−1].
□
Proof
-
We first observe that if ψ,ψ′ are derivation traces and
ψ1,ψ1′ are such that
ψ;ψ1≡σcψ′;ψ1′, with ∣ψ∣=k, ∣ψ′∣=k′, ∣ψ;ψ1∣=∣ψ′;ψ1′∣=h then there is
a ϕ1 such that
ψ;ψ1≡cψ;ϕ1≡σ1cψ′;ψ1′
and
for i,j∈[∣ψ∣,h−1], i≤j implies
σ1(i)≤σ1(j). (†)
In order to prove this, we can proceed by induction on the number of
inversions
x=∣{(i,j)∈[∣ψ∣,h−1]∣i≤j ∧ σ(i)>σ(j)}∣, i.e., on the number of pairs
(i,j) in the interval of interest that do not respect the
monotonicity condition. When x=0 the thesis immediately
holds. Assume that x>0. Then there are certainly indices
j∈[∣ψ∣,h−2] such that
σ(j)>σ(j+1). Among these, take the index i such that
σ(i+1) is minimal. Then it can be shown that direct derivations at
position i and
i+1 in ψ1 are sequentially independent, and thus they can be switched, i.e., there
is ϕ2 such that
ψ;ϕ2≡id[i↦i+1,i+1↦i]cψ;ψ1. Therefore
ψ;ϕ2≡σ∘id[i↦i+1,i+1↦i]cψ′;ψ1′. This reduces the number of inversions and thus
the inductive hypothesis allows us to conclude.
In the same way, we can prove that there is
a ϕ1′ such that
ψ;ϕ1≡σ2cψ′;ϕ1′≡cψ′;ψ1′
and
for i,j∈[∣ψ′∣,h−1], if i≤j then
σ2−1(i)≤σ2−1(j) (‡)
Putting conditions (†) and (‡) together we derive that
ψ;ψ1≡cψ;ϕ1≡σ′c=ψ′;ϕ1′≡cψ′;ψ1′. Now let y∈[∣ψ∣,h−1] be
the largest index such that σ′(y)<∣ψ′∣ (or y=∣ψ∣ if
it does not exist), let l3=h−y and consider decorated
derivations ψ2,ψ3,ψ2′,ψ3′ such that
∣ψ3∣=∣ψ3′∣=l3 and
ψ;ψ2;ψ3=ψ;ϕ1≡σ′cψ′;ϕ1′=ψ′;ψ2′;ψ3′. By construction we obtain that
∣ψ2∣=n and that σ′ restricts to a permutation
σ2′ on [0,∣ψ;ψ2∣−1]. Commutation with the
target decoration can be obtained, if necessary, by changing the
ω decoration of ψ2, affecting only the α
decoration of ψ3. Thus
we conclude that
ψ;ψ2≡cψ′;ψ2′.
Finally, notice that by the definition of y and the properties of σ′,
it follows that σ′(j)<∣ψ′∣ for all j∈[∣ψ∣,∣ψ;ψ2∣−1] and σ′(j)≥∣ψ′∣ for all j∈[∣ψ;ψ2∣,h−1].
That is, the direct derivations in ψ2 match
all direct derivations of ψ′ that are not matched in ψ. This implies that
there cannot exist a derivation ϕ2 shorter than n such that
ψ;ϕ2≡cψ′;ϕ2′ for some ϕ2′.
2. 2.
Let n=∣ψ∣ and m=∣ψ1∣=∣ψ2∣, which must have the same length.
By the last part of the proof of the previous point,
since
both ψ1 and ψ2 are of
minimal length, we have that for all j∈[n,n+m−1] it holds σ1(j)<∣ψ′∣ and σ2(j)<∣ψ′∣.
Furthermore, σ1([n,n+m−1])=σ2([n,n+m−1]),
because both ψ1 and ψ2 consist of direct derivation that match
those of ψ′ which are not matched in ψ.
Thus
σ(j)=σ2−1(σ1(j+∣ψ∣))−∣ψ∣ is a
well-defined permutation on [0,∣ψ1∣−1] from ψ1
to ψ2. It is easy to see that the only condition that can be
violated for concluding ψ1≡σcψ2 is commutation
of the target decorations. This can be reestablished by post-composing
ψ2 with a graph isomorphism.
■
Relying on the results above we can easily prove that the ideal
completion of the partial order of traces is a domain.
Proposition 15** (domain of traces)**
Let G be a graph grammar. Then
D(G)=Idl(P(G))
is a
domain.
□
Proof
By Lemma 7
it is sufficient to prove
(1) that
↓⟨ψ⟩c is finite for every ⟨ψ⟩c∈P(G), and (2) that if {⟨ψ1⟩c,⟨ψ2⟩c,⟨ψ3⟩c} is pairwise consistent then ⟨ψ1⟩c⊔⟨ψ2⟩c exists and is consistent with ⟨ψ3⟩c.
-
Let ⟨ψ′⟩c⊑⟨ψ⟩c. By
Lemma 18
we know that
ψ′;ψ′′≡σcψ for some decorated derivation
ψ′′ and a
permutation σ. Now suppose that
ψ1′ and ψ2′ are decorated derivations such that
ψ1′;ψ1′′≡σ1cψ and
ψ2′;ψ2′′≡σ2cψ for some ψ1′′,
ψ2′′, and that
σ1([0,∣ψ1′∣])=σ2([0,∣ψ2′∣])⊆[0,∣ψ∣]. Then σ2−1∘σ1 is a
permutation on [0,∣ψ1′∣] from ψ1′ to
ψ2′ witnessing ψ1′≡σ2−1∘σ1cψ2′;ν for some isomorphism ν.
Therefore
⟨ψ1′⟩c=⟨ψ2′⟩c. As a consequence, the
cardinality of ↓⟨ψ⟩c is bound by
2∣ψ∣.
2. 2.
Given two consistent elements ⟨ψ1⟩c and
⟨ψ2⟩c of P(G), there exists
⟨ψ⟩c=⟨ψ1⟩c⊔⟨ψ2⟩c, where
ψ is the minimal common extension of ψ1 and ψ2,
provided by Lemma 19(1). Uniqueness
of ⟨ψ⟩c follows by
Lemma 19(2)
because minimal common are essentially unique (up to ≡c
and right-composition with isomorphisms). Suppose further that
⟨ψ3⟩c is compatible with both ⟨ψ1⟩c and
⟨ψ2⟩c: we have to show that it is compatible with
⟨ψ⟩c. Let
⟨ψ′⟩c=⟨ψ2⟩c⊔⟨ψ3⟩c. Then
there exist ϕ1, ϕ and ϕ′ such that
ψ1;ϕ1≡σ1cψ2;ϕ≡σcψ and ψ2;ϕ′≡σ′cψ′ for suitable
permutations σ1, σ and σ′.
We conclude by showing that either ⟨ψ⟩c and ⟨ψ′⟩c
are compatible, or ⟨ψ1⟩c⊔⟨ψ3⟩c and ⟨ψ′⟩c
are compatible, both of which are equivalent and imply the thesis. We proceed by
induction on k=∣ψ1∣+∣ψ3∣. If
∣ψ1∣=0, i.e. ψ1 is a zero-length decorated derivation, hence,
by Lemma 19, also ϕ is so and thus
⟨ψ⟩c=⟨ψ2⟩c, and the latter is compatible
with ⟨ψ′⟩c. If ∣ψ3∣=0 we conclude analogously.
If k>0, let δ be the last
derivation step in ψ1, i.e.,
ψ1=ψ1′;δ. If σ1(∣ψ1∣−1)<∣ψ2∣,
namely if step δ is already in ψ2, then by
Lemma 19 we get that
⟨ψ⟩c=⟨ψ1′⟩c⊔⟨ψ2⟩c. Since
∣ψ1′∣<k we conclude by inductive hypothesis
that ψ and ψ′ are compatible. If instead,
σ1(∣ψ1∣−1)≥∣ψ2∣ then, again by Lemma 19,
we can write ψ as
ψ≡σ′′cψ2;ϕ′′;δ′, where
⟨ψ2;ϕ′′⟩c=⟨ψ1′⟩c⊔⟨ψ2⟩c and σ′′(∣ψ1∣−1)=∣ψ∣−1, i.e., δ
is mapped to δ′. Hence, by inductive hypothesis
ψ2;ϕ′′ and ψ′ are compatible.
Now, since ⟨ψ1⟩c and ⟨ψ3⟩c are compatible (thus
ψ1;ϕ1′≡σ3cψ3;ϕ3′ for suitable derivations
ϕ1′,ϕ3′ and permutation σ3), either step δ is
already in ψ3 (thus σ3(∣ψ1∣−1)<∣ψ3∣), or it isn’t, and
σ3(∣ψ1∣−1)≥∣ψ3∣. In the first case δ is related to
a step in ψ′, and it follows that ⟨ψ′⟩c⊔⟨ψ2;ϕ′′⟩c=⟨ψ′⟩c⊔⟨ψ2;ϕ′′;δ′⟩c and we conclude.
If instead δ is not a step in ψ3, we can write ψ3;ϕ3′ as
ψ3;ϕ3′′;δ′′, where step δ′′ matches step δ of ψ1.
By inductive hypothesis we have that ψ3;ϕ3′′ and ψ′ are compatible,
and we get ⟨ψ3;ϕ3′′⟩c⊔⟨ψ′⟩c=⟨ψ2;ϕ′′⟩c⊔⟨ψ′⟩c. Since both steps δ′ and δ′′ are
related by suitable
permutations to step δ of ψ1, we
can extend uniformly the two derivations preserving consistency, obtaining
⟨ψ3;ϕ3′′;δ′′⟩c⊔⟨ψ′⟩c=⟨ψ2;ϕ′′;δ′⟩c⊔⟨ψ′⟩c=⟨ψ⟩c⊔⟨ψ′⟩c, as desired.
■
We can show that D(G) is a weak prime domain. The proof relies on the fact that irreducibles
are (the principal ideals of) elements of the form ⟨ϵ⟩c, where
ϵ=ψ;δ is a decorated derivation such that its last
direct derivation δ cannot be shifted back, i.e., minimal
traces enabling some direct derivation. These are called
pre-events in [2, 3], where graph
grammars are linear and thus, consistently with Lemma 2, such
elements provide the primes of the domain. Two irreducibles
⟨ϵ⟩c and ⟨ϵ′⟩c are interchangeable when
they are different minimal traces for the same direct derivation.
Theorem 6** (weak prime domains from graph grammars)**
Let G be a graph grammar. Then
D(G) is a weak prime domain.
□
Proof
We know by Proposition 15 that D(G)
is a domain. Hence, recalling Definition 14,
we have to show that D(G) is weak prime
algebraic.
We will exploit the characterisation in
Lemma 7. First provide a characterisation of
irreducibles and of the interchangeability relation among them. As
usual, we confuse compact elements of D(G) with the
corresponding generators in P(G).
As mentioned above, irreducibles in D(G) are, in the
terminology of [2, 3], pre-events, namely
elements of the form ⟨ϵ⟩c, where
ϵ=ψ;δ is a decorated derivation such that its
last direct derivation δ cannot be switched back. Formally,
⟨ϵ⟩c is a pre-event if letting n=∣ϵ∣ then
for all ϵ=ψ;δ≡σcψ′ it holds
σ(n)=n.
In fact, assume that
⟨ϵ⟩c=⟨ψ1⟩c⊔⟨ψ2⟩c, and
let
ϵ≡σcψ1;ψ1′≡σ′cψ2;ψ2′ for suitable ψ1′,ψ2′ of minimal length.
Since ϵ is a pre-event, we have that if
n=∣ψ;δ∣=∣ψ1;ψ1′∣=∣ψ2;ψ2′∣, then
σ′(n)=n. This implies that ∣ψ1′∣=0 (and thus
⟨ϵ⟩c=⟨ψ1⟩c) or ∣ψ2′∣=0 (and thus
⟨ϵ⟩c=⟨ψ2⟩c),
as desired.
Two irreducibles ⟨ϵ⟩c and ⟨ϵ′⟩c are
interchangeable iff the corresponding traces are compatible and
whenever ϵ;ψ1≡σcϵ′;ψ1′
with ψ1,ψ1′ of minimal length (thus
⟨ϵ;ψ1⟩c=⟨ϵ′;ψ1′⟩c=⟨ϵ⟩c⊔⟨ϵ′⟩c), then
σ(∣ϵ∣)=∣ϵ′∣.
In fact, assume that ⟨ϵ⟩c=⟨ψ;δ⟩c
and ⟨ϵ′⟩c=⟨ψ′;δ′⟩c are
interchangeable, and
ϵ;ψ1≡σcϵ′;ψ1′ with
ψ1,ψ1′ of minimal length. By the proof of
Lemma 19(1)
we have that σ maps steps in ψ1 to
ϵ′ and, analogously, σ−1 maps steps in
ψ1′ to ϵ (formally, σ(j)<∣ϵ′∣ for j≥∣ϵ∣ and, dually, if σ(j)≥∣ϵ′∣ then j<∣ϵ∣). By Lemma 5(3) we have
that ⟨ϵ⟩c⊔⟨ϵ′⟩c=⟨ψ⟩c⊔⟨ϵ′⟩c=⟨ϵ⟩c⊔⟨ψ′⟩c. Hence we can view the previous equivalence of
decorated derivations as ψ;(δ;ψ1)≡σc(ψ′;δ′);ψ1′, with δ;ψ1 and
ψ1′ of minimal length. This means that
σ maps steps in δ;ψ1 to
ϵ′ and, with a dual argument, steps in
δ′;ψ1′ to
ϵ. Putting all this together we get that necessarily
σ(∣ϵ∣)=∣ϵ′∣, as desired.
For the converse, assume that
⟨ϵ⟩c,
⟨ϵ′⟩c are compatible, that ⟨ψ⟩c=⟨ϵ⟩c⊔⟨ϵ′⟩c, and that ψ≡cϵ;ψ1≡σcϵ′;ψ1′ where σ(∣ϵ∣)=∣ϵ′∣. Then, reverting the reasoning above, we get that
⟨ψ⟩c⊔⟨ϵ′⟩c=⟨ϵ⟩c⊔⟨ψ′⟩c, and thus we conclude that ⟨ϵ⟩c,⟨ϵ′⟩c are interchangeable by
Lemma 5(3).
We conclude that D(G) is a weak prime domain, relying on
Lemma 7. Let ⟨ϵ⟩c with
ϵ=ψ;δ be an irreducible, and
⟨ϵ⟩c⊑⟨ψ1⟩c⊔⟨ψ2⟩c.
Let ψ1′ and ψ2′ be decorated derivations of minimal
length such that
ϵ;ψ≡σcψ1;ψ1′≡σ1cψ2;ψ2′ for some ψ. If
σ(∣ϵ∣)∈[0,∣ψ1∣−1] then consider
ϕ1 such that
ψ1;ψ1′≡σ′cϕ1;ψ1′ and
σ′(σ(∣ϵ∣)) is minimal. Then ⟨ϕ1⟩c is an
irreducible, ⟨ϕ1⟩c and ⟨ϵ⟩c are
interchangeable, and clearly
⟨ϕ1⟩c⊑⟨ψ1⟩c. If instead
σ(∣ϵ∣)≥∣ψ1∣ we have that
σ1(σ(∣ϵ∣))<∣ψ2∣, and we can conclude, in the
same way, the existence of
⟨ϕ2⟩c⊑⟨ψ2⟩c irreducible and
interchangeable with ⟨ϵ⟩c.
■
Note that when the rules are right-linear the domain and es semantics
specialises to the usual prime event structure semantics
(see [2, 3, 4]), since the construction of the
domain in the present paper is formally the same as
in [2].
V-C Any connected es is generated by some grammar
By Theorem 6, given a graph grammar
G the domain D(G) is weak prime.
We next show that also the converse holds, i.e., any connected
es (and thus any weak prime domain) is generated by a suitable graph
grammar.
This shows that weak prime domains and connected es are
precisely what is needed to capture the concurrent semantics of
non-linear graph grammars, and thus strengthen our claim that they
represent the right structure for modelling formalisms with fusions.
Construction (graph grammar for a connected es)
Let ⟨E,#,⊢⟩ be a
connected es.
The grammar GE=⟨T,P,π,Gs⟩ is
defined as follows.
First, for every element e∈E, we define the following graphs, which are
then used as basic building blocks
Ie and Se as shown in Fig. 14(14(a)) and Fig. 14(14(b));
let Ue denote the set-theoretical product of the minimal enablings of
e, i.e., Ue=Π{X⊆E∣X⊢0e}; for every tuple u∈Ue we define the graph Lu,e as in
Fig. 14(14(c)).
Moreover, for every pair of events e,e′∈E such that e#e′,
we define a graph Ce,e′ as in
Fig. 14(14(d)).
The set of productions is P=E, i.e., we add a rule for every event e∈E, and we define such rule in a way that
it deletes Ie and Ce,e′ for each e′∈E such that e#e′.
it preserves the graph Se∪⋃u∈UeLu,e
for all e′∈E, for all graphs Lu,e′ such that
e occurs in u, it merges the corresponding nodes and that of Se′ into one.
The graph Se∪⋃u∈UeLu,e arises from Se and
Lu,e, u∈Ue by merging all the nodes (we use ⋃
and ⨄ to denote union and disjoint union, respectively, with
a meaning illustrated in Fig. 14(14(f))
and Fig. 14(14(g)).) Hence, there is a match for the
rule e only if Se and all Lu,e for u∈Ue have been merged
and this happens if and only if at least one minimal enabling of e
has been entirely executed. The deletion of the graphs Ce,e′ establishes the
needed conflicts. The rule is consuming since it deletes the node of graph
Ie.
Formally, the rule for e has as left-hand side the graph
[TABLE]
while the right-hand side is
[TABLE]
The rule is schematised in
Fig. 14(14(e)), where it is intended
that e occurs in uj1,…,ujnj for uji∈Uej,
i∈[1,nj], j∈[1,k]. Moreover
e1′,…,eh′ are the events in conflict with e and, finally,
Ue={u1,…,un}.
The start graph is just the disjoint union of all the basic graphs
introduced above
[TABLE]
Then the type graph is
[TABLE]
Note that the interfaces of the rules are not given explicitly. They
can be deduced from the left and right-hand side, and the
labelling. The same applies to the type graph.
It is not difficult to show that the grammar
GE generates exactly the es E.
Theorem 7** (connected ES from graph grammars)**
Let ⟨E,#,⊢⟩ be a
connected es. Then,
E and E(D(GE)) are isomorphic.
□
Proof
First observe that any rule in GE is executed at
most once in a derivation since it consumes an item (the node of graph
Ie) that is generated by no other rule. If we consider
D(GE), then the irreducibles are minimal
⟨ϵ⟩c with ϵ=ψ;δ.
By the shape of rule e, the derivation ψ must contain
the occurrences of a minimal set of rules such that the graphs
Se and Lu,e for u∈Ue are merged along the common node.
By construction, in order to merge all such graphs, if we denote by
Xψ the set of rules applied in ψ, it must be
Xψ⊇C for some C∈ConfF(E) such that
C⊢0e. Therefore by minimality we conclude that
Xψ⊢0e. Relying on this observation, a routine
induction on the ∣C∣ shows that minimal enablings C⊢0e
in E are in one to one correspondence with irreducibles
⟨ϵ⟩c in D(GE). Recalling, that, in
turn, irreducibles in D(E) are again minimal enablings, i.e.,
⟨C,e⟩ with C∈ConfF(E) such that C⊢0e we
obtain a bijection between irreducibles in D(GE)
and D(E).
The fact that the correspondence preserves and reflects the order
is, again, almost immediate by construction. In fact, consider two
irreducibles ⟨ϵ⟩c and ⟨ϵ′⟩c in
D(GE) and the corresponding irreducibles
⟨C,e⟩ and ⟨C′,e′⟩ in D(E). If
⟨C,e⟩⊆⟨C′,e′⟩, take
X=⟨C′,e′⟩∖⟨C,e⟩. Then ϵ can be
extended with the rules corresponding to the events in X, thus
showing the existence of a derivation ψ such that
ϵ;ψ≡cϵ′. In fact, if this were not
possible, there would be an event e′′∈X such that the
corresponding rule compete for deleting some item of the start graph
with a rule e1 in ϵ, hence e1∈⟨C,e⟩. By
construction, the only possibility is that the common item is
Ce′′,e1. But this would mean that e′′#e1. This
contradicts the fact that {e1,e′′}⊆⟨C′,e′⟩.
The converse, i.e., the fact that if
⟨ϵ⟩c⊑⟨ϵ′⟩c then
⟨C,e⟩⊆⟨C′,e′⟩ is immediate.
Recalling that domains are irreducible algebraic
(Proposition 1), we conclude that
D(GE) and D(E) are isomorphic.
Since E is connected es, by
Theorem 3, E≃E(D(E)) and thus
E(D(GE)) and E are isomorphic, as desired.
■
Example 2
Consider the running example es, from
Example 1, with set of events
{a,b,c}, empty conflict relation and the minimal enablings by
{a}⊢0c and {b}⊢0c. The associated grammar is
depicted in Fig. 15.
As a further example, consider an es E1 with events
{a,b,c,d,e}. The conflict relation # is given by
e#d and minimal enablings ∅⊢0a,
∅⊢0b, ∅⊢0c, ∅⊢0e,
{a,b}⊢0d and {c}⊢0d. The grammar is in
Fig. 16.
□
V-D A prime es semantics for grammars with fusions
A possibility for recovering a notion of causality based on prime
es also for graph grammars with fusions is to
introduce suitable restrictions on the concurrent applicability of
rules.
Indeed, the lack of stability arises essentially from
considering as concurrent those fusions which act on common items.
Preventing fusions to act on already merged items, one may lose some
concurrency, yet gaining a definite notion of causality.
Technically, a prime es can be obtained for left-linear
rewriting systems by restricting the applicability condition: the
match must be such that the pair ⟨l;mL,r⟩ of
Fig. 11 is jointly mono. This essentially means that items
which have been already fused, should not be fused again.
Formally, this means changing the applicability condition, restricting
to fusion safe derivations.
Definition 42** (fusion safe (direct) derivation)**
A fusion safe direct derivation is a direct derivation as in
Fig. 17 where ⟨l;mL,r⟩ is
jointly mono. A derivation is fusion safe if it consists of a
sequence of fusion safe direct derivations.
□
Consider our running example in Fig. 2.
Clearly, the derivations labelled pa and pb starting from
Gs are now in conflict, since e.g. the application of pa
forbids the application of pb to Ga, since the
derivation would not be anymore jointly mono.
We thus end up in the situation presented by the configurations
in Fig. 7,
hence the applications of pc to Ga and Gb respectively
must be considered as different events.
The notion of sequential independence remains unchanged. Note that the interchange operator (see Proposition 13)
applied to sequential independent derivations that are fusion safe produces a new pair of fusion safe
derivations.
Then we can consider concatenable fusion safe traces, that form a subcategory of the category of traces.
Definition 43** (fusion safe traces)**
Let G be a graph grammar. The category of
concatenable fusion safe traces of G, denoted by
Trs(G), has abstract graphs as objects and concatenable
fusion safe traces as arrows.
□
The construction of Theorem 6 recasted on
fusion safe traces now produces a prime domain (hence a
prime es).
Theorem 8** (prime domain structure for graph grammars)**
Let G be a graph grammar. Then
Idl(([Gs]↓Trs(G))) is a prime domain.
□
Proof
The proof is the same as for
Theorem 6. We already know that the
domain is weak prime, hence, by Proposition 3,
all irreducibles are weak primes. Additionally, interchangeability,
as characterised in the proof of the mentioned theorem, is the
identity.
In fact, given two irreducibles ⟨ϵi⟩c with
ϵi=ψi;δi for i∈{1,2} such that
⟨ϵ1⟩c↔⟨ϵ2⟩c, by
interchangeability
⟨ψ1⟩c⊔⟨ϵ2⟩c=⟨ϵ1⟩c⊔⟨ψ2⟩c. Let such join be
⟨ψ1;δ1;ψ1′⟩c=⟨ψ2;δ2;ψ2′⟩c for suitable ψ1′,ψ2′. This means that
ψ1;δ1;ψ1′≡σcψ2;δ2;ψ2′ for a suitable permutation σ, with
σ(∣ϵ1∣)=σ(∣ϵ2∣). There are two
possibilities. If ∣ψ1∣=∣ψ2∣ and σ restricts to a
permutation of [1,∣ψ1∣], then ψ1≡cψ2
and we conclude. Otherwise a step in ψ2 is not mapped
to ψ1 or viceversa. Assume, without loss of generality, that
there is i∈[1,∣ψ1∣] such that
σ(i)>∣ψ2∣. This means that the i-th step in ψ1
is performed in ψ2′. Since such step is performed after
δ2, it cannot generate items consumed by δ1. Hence
it must merge items that are merged by a different step in
ψ2. But this contradicts its fusion safety.
Hence all weak primes are primes and we
conclude.
■
VI Conclusions and Related Work
In the paper we provided a characterisation of a class of domains,
referred to as weak prime algebraic domains, which is appropriate for
describing the concurrent semantics of those formalisms where a
computational step can merge parts of the state. We show a
categorical equivalence between weak prime algebraic domains and a
suitably defined class of connected event structures. We also prove
that the category of general event structures coreflects into
the category of weak prime algebraic domains.
The appropriateness of
the class of weak prime domains is witnessed by the results
that show that weak prime algebraic domains
are precisely those arising from left-linear graph rewriting systems,
i.e., those systems where rules besides generating and deleting can
also merge graph items.
Furthermore, we show how to recover
a prime event structures semantics also for rule-based
formalisms with fusions by introducing suitable restrictions on the
concurrent applicability of rules.
We have shown that the
characterisations of prime domains and event structures in terms of intervals
and asynchronous graphs naturally extend to weak prime domains.
The characterisation of weak prime domains in terms of the interchangeability
equivalence on irreducibles naturally suggest a presentation in terms of prime
event structures endowed with an equivalence relation, allowing us to establish
a link with the work in [23, 24].
Technically, the starting point for our proposal is the relaxation of the stability
condition for event structures. As already noted by Winskel
in [5] “[t]he stability axiom would go if one wished to
model processes which had an event which could be caused in several
compatible ways […]; then I expect complete irreducibles would
play a similar role to complete primes here”. Indeed, the
correspondence between irreducibles and weak primes, which
exploits the
notion of interchangeability, is the ingenious step that allows us to
obtain a smooth extension of the classical duality between
prime event structures and prime algebraic domains.
The coreflection between the category of general unstable event structures
(with binary conflict)
and the one of weak prime algebraic domains says that the latter are
exactly the partial orders of configurations of the former.
Such class of domains has been
studied originally in [21] where, generalising the work
on concrete domains and sequentiality [34], a characterisation
is given in terms of a set of axioms expressing properties of prime
intervals.
In our paper we also provide an in depth comparison with these results,
based on the observation that, roughly speaking, weak primes correspond to executions
of events with their minimal enablings, while intervals can be seen as executions of
events in a generic configuration.
A comparison is also drawn with the more recent notions of asynchronous graph [29],
an alternative representation of prime algebraic domains based on the notion of path equivalence,
which we generalise in order to account for weak prime ones.
The need of resorting to unstable es for modelling the
concurrent computations of name passing process calculi has been
observed by several authors. In particular, in [17] an
es semantics for the π-calculus is defined by relying on
es with names, namely labelled es tailored for modelling
parallel extrusions. An event can have various minimal enablings but
with the constraint that distinct minimal enablings can differ only for one
event (intuitively, the extruder).
es with names are not connected es since they can have
non-connected minimal enablings (roughly, because identical events in
disconnected minimal enablings can be identified via the labelling).
Nevertheless, a connected es semantics could be obtained by
transforming es with names through the coreflection in the
paper: More details are reported
in Appendix -B.
We believe that our results cover a long road in establishing weak prime domains and
connected event structures as a foundational concept in the event-based semantics for
concurrent computational systems.
Our next step will be to look at possible more general formalisms.
In particular, the paper [35] studies a characterisation
of the partial order of configurations for a variety of classes of event
structures in terms of axiomatisability of the associated
propositional theories. Even if the focus in the present paper is
on event structures that generalise Winskel’s ones, we believe that
our work can provide interesting suggestions for
further development.
Acknowledgements
We are grateful to the anonymous referees of the conference version of
the paper for their insightful comments and suggestions. We are also indebted to Paul-Andrè Melliés for insightful discussions on the relation between event structures and asynchronous graphs.
-A Event Structures with Non-Binary Conflict
In the literature also es with non-binary conflict have been considered,
where the binary conflict relation is replaced by a consistency predicate [22].
It is noteworthy that the duality results of Section III easily adapt to this case.
Definition 44** (es with non-binary conflict)**
An es with non-binary conflict (esnb for
short) is a tuple ⟨E,⊢,Con⟩ such
that
E is a set of events
Con⊆2finE is the consistency
predicate, satisfying X∈Con and Y⊆X implies Y∈Con
⊢ ⊆Con×E is the enabling
relation, satisfying X⊢e and X⊆Y∈Con
implies Y⊢e.
The esnb E is stable if X⊢e,
Y⊢e, and X∪Y∪{e}∈Con imply
X∩Y⊢e.
□
A configuration C⊆E is just a set such that
it is secured and all its finite subsets are consistent.
The notion of live esnb is easily adapted to take into account
non-binary conflicts and also in this case we will implicitly assume
all esnb to be live.
Definition 45** (live esnb)**
An esnb E is live if for all
X∈Con there is C∈Conf(E) such that
X⊆C and moreover
for all e∈E we have {e}∈Con.
□
The notion of the category of esnb is adapted accordingly.
Definition 46** (category of event structures)**
A morphism of esnb f:E1→E2 is a partial
function f:E1→E2 such that
for all X1⊆E1 and e1,e1′∈E1 with f(e1), f(e1′) defined
if X1∈Con1 then f(X1)∈Con2;
if {e1,e1′}∈Con1 and f(e1)=f(e1′) then e1=e1′;
if X1⊢1e1 then
f(X1)⊢2f(e1).
We denote by ESnb the category of esnb and esnb morphisms,
and by cESnb its full subcategory having connected esnb as objects (the definition of conectedness remains unchanged).
□
In the definition of domains (Definition 6), the
existence of joins is now required only for consistent subsets,
instead of being required for pairwise consistent.
Definition 47** (b-domains)**
A bounded complete domain (b-domain) is an algebraic
finitary partial order where all consistent subsets X⊆D
admit a least upper bound ⨆X.
B-domain morphisms are as in Definition 15.
We denote by Domb the corresponding category.
□
The definition of weak prime algebraicity remains formally the same,
but the underlying partial order is required to be a b-domain.
Definition 48** (weak prime algebraic b-domain)**
A weak prime algebraic b-domain (or simply weak prime
b-domain) is a interchangeable b-domain D such that for all d∈D it
holds d=⨆(↓d∩wpr(D)). We denote by
wDomb the corresponding category.
□
The proof of the fact that, given an esnb E, the partial order of
configurations D(E)=⟨Conf(E),⊆⟩ is
a weak prime b-domain, is unchanged. The same holds for the fact that
if f:E1→E2 is an esnb morphism then
D(f):D(E1)→D(E2) is a weak prime b-domain
morphism.
Vice versa the esnb associated with a
weak prime b-domain is defined as follows.
Definition 49** (esnb for a weak prime b-domain)**
Let D be a weak prime b-domain. The esnb
E(D)=⟨E,Con,⊢⟩ is defined as
follows
E=[ir(D)]↔∗;
Con={X∣∃d∈K(D). X⊆[ir(d)]↔∗};
X⊢e if there exists i∈e such that
[ir(i)∖{i}]↔∗⊆X.
Given a morphism f:D1→D2, its image
E(f):E(D1)→E(D2) is defined for
[i1]↔∗∈E as
E(f)([i1]↔∗)=[i2]↔∗, where
i2∈δ(f(i1),f(p(i1))),
and E(f)([i1]↔∗) is undefined if
f(p(i1))=f(i1).
□
We then get a result corresponding to Theorem 1 for es
with non-binary conflict and weak prime b-domains.
Theorem 9** (corecflection of ESnb and wDomb)**
The functors D:ESnb→wDomb and E:wDomb→ESnb
form a coreflection. It restricts to an equivalence between wDomb
and cESnb.
□
Concerning the interval-based characterisation in
Section IV-B, we recall that the paper by
Droste [22] considers also the case of event structures with
a general consistency relation (rather than a binary conflict) and
shows that the corresponding domains can be characterised as
algebraic complete partial orders where
axioms (F), (C) of Section IV-B and, additionally, (I) below hold.
(I)
for all x,x′,y,y′∈K(D) if [x,x′]∼[y,y′]
and x⊑x′ then y⊑y′.
The definition of the es Ewd(D) associated with a domain D
(Definition 26) can be easily adapted to the non-binary
case. The only thing that changes is the definition of
consistency: a set X⊆E is consistent if for all e∈X
there exists a representative [ce,ce′]∈e such that
{ce∣e∈X} is bounded in D.
Then the correspondence with our approach established in
Section IV-B easily extends to this setting: algebraic
complete partial orders where axioms (F), (C) and (I) hold are exactly
the weak prime b-domains and the obvious rephrasing of
Proposition 11 continue to hold.
Also the connection with asynchronous graphs in
Section IV-C can be adapted easily. Unsurprisingly,
Proposition 12 holds for connected es with
non-binary conflict if we modify the definition of asynchronous graph
(Definition 27) by omitting the coherence
axiom (4).
-B An Event Structure Semantics for the π-calculus
The need of resorting to unstable es for modelling the
concurrent computations of name passing process calculi has been
observed by several authors. In particular, in [17] an
es semantics for the pi-calculus is defined by relying on
so-called es with names (esn for short), namely
es that are tailored for parallel extrusions: labelled unstable
es with the constraint that two minimal enablings can differ
only for one event (intuitively, the extruder).
Given a global set of names N, es with names
(esn for short) are triples (E,X,λ) where E is a
prime es, X⊆N is a set of names
(intuitively, the names that are restricted), and
λ:E→{x(y),xˉ(y)} is a function mapping each event
to either an input or an output prefix.
A configuration C is a configuration of the underlying prime
es such that there exists a maximal e∈C
satisfying
C∖{e} is a configuration;
if λ(e)=x(y) or λ(e)=xˉ(y) with
x∈X then there exists e′∈C∖{e} such that
λ(e′)=zˉ(x).
The latter requirement above boils down to ensuring that if the name were
restricted, it has been extruded before.
Thus, esn are unstable es with the additional constraint
that two minimal enablings can differ only for one event (the extruder!):
namely, if X1⊢0e and X2⊢0e then
X1∩X2=X1∖{e1}=X2∖{e2}
for suitable e1,e2.
Note that, esn are not connected es since they can have
non-connected minimal enablings (roughly, because identical events in
disconnected minimal enablings are identified via the labelling).
Consider e.g. E={aˉ(x),bˉ(x),x(y)}, with
aˉ(x)#bˉ(x), and X={x}. Then the
configurations are ∅, {aˉ(x)}, {bˉ(x)},
{aˉ(x),x(y)}, and {bˉ(x),x(y)}, hence x(y) has two
non-connected minimal enablings.