1 Introduction

The notion of causality is an intriguing one. In the sequential case, the intuition behind it is almost trivial: if the activity \(\mathsf {e}\) depends on the activity \(\mathsf {e}'\), then to happen the activity \(\mathsf {e}\) needs that \(\mathsf {e}'\) has already happened. This is easily represented in Petri nets [24], the transition \(\mathsf {e}'\) produces a token that is consumed by the transition \(\mathsf {e}\) (the net \(N'\)). The dependency is testified by the observation that the activity \(\mathsf {e}'\) always precedes the activity \(\mathsf {e}\). However this intuition does not reflect other possibilities. If we abandon the sequential case and move toward possibly loosely cooperating system the notion of causality become involved. Consider the case of a Petri net with inhibitor arcs [13] where the precondition of the transition \(\mathsf {e}'\) inhibits the transition \(\mathsf {e}\) (the net N). The latter to happens needs that the transition \(\mathsf {e}'\) happens first, and the observation testifies that the activity \(\mathsf {e}\) needs that \(\mathsf {e}'\) has already happened, though resources are not exchanged between \(\mathsf {e}'\) and \(\mathsf {e}\). In both cases the observation that the event \(\mathsf {e}'\) must happen first leads to state that \(\mathsf {e}'\) precedes \(\mathsf {e}\) and this can be well represented with a partial order relation among events.

figure a

This quite simple discussion suggests that the notion of causality may have many facets. In fact, if the dependencies are modeled just with a well founded partial order, inhibitor arcs can be used to model these dependencies, but the notion of partial order does not capture precisely the subtleties that are connected to the notion of causality.

To represent the semantics of concurrent systems the notion of event structure plays a prominent role. Event structures have been introduced in [18] and [27] and since then have been considered as a cornerstone. The idea is simple: the activities of a system are the events and their relationships are specified somehow, e.g. with a partial order modeling the enabling and a predicate expressing when activities are coherent or not. Starting from this idea many authors have faced the problem of adapting this notion to many different situations which have as a target the attempt to represent faithfully various situations. This has triggered many different approaches. In [11] and [12] causal automata are discussed, with the idea that the conditions under which an event may happen are specified by a suitable logic formula, in [10] and [9] it is argued that a partial order may be not enough or may be, in some situation, a too rigid notion, and this idea is used also in [21] and [22] where the notion of event automata is introduced, and it is used also in [20] where an enabling/disabling relation for event automata is discussed. Looking at the enabling relation, both bundle event structures [15] and dual event structures [16] provide a notion of enabling capturing or-causality (the former exclusive or-causality and the latter non exclusive or-causality). Asymmetric event structures [6] introduces a weaker notion of causality which models contextual arcs in Petri nets, or in the case circular event structures [7] the enabling notion is tailored to model also circular dependencies. In flow event structures [8] the partial order is required to hold only in configurations. Finally we mention the approaches aiming at modeling the possibility that the dependencies of an event may change either by dropping some of them or by adding new ones [1]. This short and incomplete discussion (the event structures spectrum is rather broad) should point out the variety of approaches present in literature. It should be also observed that the majority of the approaches model causality with a relation that can be reduced to a partial order, hence causality is represented stating what are the events that should have happened before.

In this paper we introduce yet another notion of event structure. Triggered by recent works on adding or subtracting dependencies among events based on the fact that apparently unrelated events have happened [1, 3], we argue that rather than focussing on how to model these enrichment or/and impoverishment, it is much more natural to focus on the context on which an event takes place. In fact it is a context that can determine the proper dependencies that are applicable at the state where the event should take place and the context holds, and the context can also be used as well to forbid that the event is added to the state. This new relation resembles the one used in inhibitor event structures [5], but it differs in the way the contexts are determined. In the case of inhibitor event structures the presence of a certain event (the inhibiting context) was used to require that another one was present as well (representing the trigger able to remove the inhibition). Here the flavour is different as it is more prescriptive: it is required that exactly a set of events is present and if this happens then also another one should be present as well. It should be stressed that triggers and contexts may exchange their role. Consider again the two nets depicted before, we may have that in both cases the trigger is determined by the happening of the event \(\mathsf {e}'\) and the context is the empty set, but we can consider as context the event \(\mathsf {e}'\) and the trigger as the empty set. This simple relation, which we will call context-dependency relation, suffices to cover the various notions presented in literature. It is worth observing that determining the context and the triggers associated to it is quite similar to trying to understand the dependencies. Consider the net \(N''\) below.

figure b

Here \(\mathsf {e}\) may be added either to the empty set or to a set containing both \(\mathsf {e}'\) and \(\mathsf {e}''\). The context containing \(\mathsf {e}'\) only leads to require that the event \(\mathsf {e}''\) is present (in the spirit of the relation for inhibitor event structures), making \(\mathsf {e}\) dependent on \(\mathsf {e}''\). However we could also have chosen to focus on contexts only and in this case the context containing just \(\mathsf {e}'\) is ruled out among the contexts in which, together with some others dependencies, \(\mathsf {e}\) may take place, and in this case the two contexts are \(\emptyset \) and \(\{\mathsf {e}', \mathsf {e}''\}\). As hinted above, it will turn out that the context plays a more relevant role with respect to the dependencies, as the context can be seen positively (it specifies under which conditions an event can be added, together with the dependency) or negatively (it specifies under which conditions an event can be added, and in this case the event cannot be added simply stipulating that it depends on itself).

In this paper we will focus on event structures where the change of state is always triggered by the happening of a single event, hence we will not consider steps (i.e. non empty and finite subsets of events), and where the states (configurations) are finite, though not always explicitly assumed. However the generalization to steps is straightforward.

Organization of the Paper: In the next section we will introduce and discuss the new brand of event structure. In Sect. 3 we will review and briefly analyze some notions of event structures presented in literature, namely prime event structure [27], relaxed prime event structure and dynamic causality event structure [1], inhibitor event structure [5] and event structure for resolvable conflicts [26], and, in Sect. 4, we show that the each event structure presented in Sect. 3 can be translated into this new kind of event structure. We will recall also the notion event automata which will can used to compare the various notions of event structure. We will end the paper with some conclusions and we will give some hints for further developments.

Notation: Let A be a set, with let \(\rho \) we denote a sequence of elements belonging to A, and with \(\epsilon \) we denote the empty sequence. With \(\overline{\rho }\) we denote the set of elements of A appearing in \(\rho \). Thus \(\overline{\rho } = \emptyset \) if \(\rho = \epsilon \) and \(\overline{\mathsf {a}\rho '} = \{\mathsf {a}\}\cup \overline{\rho '}\) if \(\rho = \mathsf {a}\rho '\). Given a sequence \(\rho = \mathsf {a}_1\cdots \mathsf {a}_{n}\) with \(\textit{len}(\rho )\) we denote its length, with \(\rho _0\) we sometime denote sequence \(\epsilon \) and, if \(\textit{len}(\rho )\ge 1\), for each \(1 \le i \le \textit{len}(\rho )\) with \(\rho _i\) we denote the sequence \(\mathsf {a}_1\cdots \mathsf {a}_{i}\). Let A be a set, with \(\mathbf {2}^{A}\) we denote the subsets of A and with \(\mathbf {2}_{ fin }^{A}\) the finite subsets of A.

2 Context-Dependent Event Structure

We introduce yet another notion of event structure, which is the main contribution of the paper.

We start recalling what an event is and we introduce the notion of configuration. An event is an atomic individual action which is able to change the state of a system. Event structures in particular are intended to model concurrent systems by defining relationships among events such as causality and conflict, establishing the conditions on which a certain event can be added to a state. The state of a system modeled by an event structure is a subset of events (those happened so far), and this set of events is called configuration. States can be enriched by adding other information beside the one represented by the events that have determined the state, either adding information on the relationship among the various events in the state, e.g. adding dependencies among them (the state is then a partial order, [25]) or adding suitable information to the whole state.

We pursue this idea that the happening of an event depends on a set of modifiers (the context) and on a set of real dependencies, which are activated by the set of modifiers.

We recall that in this paper we will consider only unlabelled event structures. To simplify the presentation we retain the classic binary conflict relation. Given a subset \(X\subseteq \mathsf {E}\) of events and a conflict relation \(\#\), which is an irreflexive and symmetric relation, we say that X is conflict free iff \(\forall \mathsf {e}, \mathsf {e}'\in X\) it holds that \(\lnot (\mathsf {e}\ \#\ \mathsf {e}')\).

Definition 1

A is a triple \( E = (\mathsf {E}, \#, \gg )\) where

  • \(\mathsf {E}\) is a set of events,

  • \(\#\ \subseteq \mathsf {E}\times \mathsf {E}\) is an irreflexive and symmetric relation, called conflict relation, and

  • \(\gg \ \subseteq \mathbf {2}^{\mathsf {A}}\times \mathsf {E}\), where \(\mathsf {A} \subseteq \mathbf {2}_{ fin }^{\mathsf {E}}\times \mathbf {2}_{ fin }^{\mathsf {E}}\), is a relation, called the context-dependency relation (cd-relation), which is such that for each \(\mathsf {Z}\gg \mathsf {e}\) it holds that

    • \(\mathsf {Z}\ne \emptyset \), and

    • for each \((X,Y)\in \mathsf {Z}\) it holds that X and Y are conflict-free.

    Each element of the cd-relation \(\gg \) is called entry.

The cd-relation models, for each event, which are the possible contexts in which the event may happen (the first component of each pair) and for each context which are the events that have to be occurred (the second component). We stipulate that dependencies and contexts are formed by non conflicting events, though this is not strictly needed, as the relation can model also conflicts. How this relation is used will become clear in the notion of enabling of an event. We have to determine, for each \(\mathsf {Z} \gg \mathsf {e}\), which of the contexts \(X_i\) should be considered. To do so we define the context associated to each entry of the cd-relation. Given \(\mathsf {Z} \gg \mathsf {e}\), where \(\mathsf {Z} = \{(X_1,Y_1), \dots , (X_n,Y_n)\}\), with \({\textsc {Cxt}}(\mathsf {Z})\) we denote the set of events \(\bigcup _{i=1}^{|Z|} X_i\), and this is the one regarding \(\mathsf {Z} \gg \mathsf {e}\).

Definition 2

Let \( E = (\mathsf {E}, \#, \gg )\) be a cdes and \(C\subseteq \mathsf {E}\) be a subset of events. Then the event \(\mathsf {e}\not \in C\) is enabled at C, denoted with \(C[{\mathsf {e}}\rangle \), if for each \(\mathsf {Z} \gg \mathsf {e}\), with \(\mathsf {Z} = \{(X_1,Y_1), \dots , (X_n,Y_n)\}\), there is a pair \((X_i,Y_i)\in \mathsf {Z}\) such that \({\textsc {Cxt}}(\mathsf {Z})\cap C = X_i\) and \(Y_i\subseteq C\).

Observe that requiring the non emptiness of the set \(\mathsf {Z}\) in \(\mathsf {Z} \gg \mathsf {e}\) guarantees that an event \(\mathsf {e}\) may be enabled at some subset of events. The cd-relation could be used to express conflicts: \(\mathsf {e}\ \#\ \mathsf {e'}\) could be modeled by adding \(\{(\{\mathsf {e}\},\{\mathsf {e}'\})\} \gg \mathsf {e}'\) and \(\{(\{\mathsf {e}'\},\{\mathsf {e}\})\} \gg \mathsf {e}\) to the \(\gg \) relation, and the presence of just one of them would model the asymmetric conflict. The conflicts modeled in this way are persistent.

Definition 3

Let \( E = (\mathsf {E}, \#, \gg )\) be a cdes. Let C be a subset of \(\mathsf {E}\). We say that C is a configuration of the cdes \( E \) iff there exists a sequence of distinct events \(\rho = \mathsf {e}_1\cdots \mathsf {e}_n\cdots \) over \(\mathsf {E}\) such that

  • \(\overline{\rho } = C\),

  • \(\overline{\rho }\) is conflict-free, and

  • \(\forall 1 \le i \le \textit{len}(\rho ).\ \overline{\rho }_{i-1} [{\mathsf {e}_i}\rangle \).

Denoting with \(\mathsf {Conf}_{{\textsc {cdes}}}( E )\) the set of configurations of a cdes, we introduce the relation among configurations. Given two configurations C and \(C'\) of a cdes such that \(C\cup \{\mathsf {e}_{n+1}\} = C'\), we stipulate that \(C \mapsto _{{\textsc {cdes}}} C'\) iff \(C[{\mathsf {e}_{n+1}}\rangle \).

We illustrate this new kind of event structure with some examples.

Example 1

Consider three events \(\mathsf {a}, \mathsf {b}\) and \(\mathsf {c}\). All the events are singularly enabled but \(\mathsf {a}\) and \(\mathsf {b}\) are in conflict unless \(\mathsf {c}\) has not happened (we will see later that this are called resolvable conflicts). Hence for the event \(\mathsf {a}\) we stipulate

$$\begin{aligned} \{(\emptyset ,\emptyset ),(\{\mathsf {c}\},\emptyset ),(\{\mathsf {b}\},\{\mathsf {c}\})\} \gg \mathsf {a} \end{aligned}$$

that should be interpreted as follows: if the context is \(\emptyset \) or \(\{\mathsf {c}\}\) then \(\mathsf {a}\) is enabled without any further condition (the Y are the empty set), if the context is \(\{\mathsf {b}\}\) then also \(\{\mathsf {c}\}\) should be present. The set \({\textsc {Cxt}}(\{(\emptyset ,\emptyset ),(\{\mathsf {c}\},\emptyset ), (\{\mathsf {b}\},\{\mathsf {c}\})\})\) is \(\{\mathsf {b},\mathsf {c}\}\).

Similarly, for the event \(\mathsf {b}\) we stipulate

$$\begin{aligned} \{(\emptyset ,\emptyset ),(\{\mathsf {c}\},\emptyset ),(\{\mathsf {a}\},\{\mathsf {c}\})\}\gg \mathsf {b} \end{aligned}$$

which is justified as above and finally for the event \(\mathsf {c}\) we stipulate

$$\begin{aligned} \{(\emptyset ,\emptyset ),(\{\mathsf {a}\},\emptyset ),(\{\mathsf {b}\},\emptyset )\} \gg \mathsf {c} \end{aligned}$$

namely any context allows to add the event.

Below we depict the configurations and how they are related.

figure d

Example 2

Consider three events \(\mathsf {a}, \mathsf {b}\) and \(\mathsf {c}\), and assume that \(\mathsf {c}\) depends on \(\mathsf {a}\) unless the event \(\mathsf {b}\) has occurred, and in this case this dependency is removed. Thus there is a classic causality between \(\mathsf {a}\) and \(\mathsf {c}\), but it can dropped if \(\mathsf {b}\) occurs. Clearly \(\mathsf {a}\) and \(\mathsf {b}\) are always enabled. The cd-relation is \(\{(\emptyset ,\emptyset )\}\gg \mathsf {a}\), \(\{(\emptyset ,\emptyset )\}\gg \mathsf {b}\) and \(\{(\emptyset ,\{\mathsf {a}\}),(\{\mathsf {b}\},\emptyset )\}\gg \mathsf {c}\).

Example 3

Consider three events \(\mathsf {a}, \mathsf {b}\) and \(\mathsf {c}\), and assume that \(\mathsf {c}\) depends on \(\mathsf {a}\) just when the event \(\mathsf {b}\) has occurred, and in this case this dependency is added, otherwise it may happen without Thus the classic causality relation between \(\mathsf {a}\) and \(\mathsf {c}\) is added if \(\mathsf {b}\) occurs. Again \(\mathsf {a}\) and \(\mathsf {b}\) are always enabled. The cd-relation is \(\{(\emptyset ,\emptyset )\}\gg \mathsf {a}\), \(\{(\emptyset ,\emptyset )\}\gg \mathsf {b}\) and \(\{(\emptyset ,\emptyset ),(\{\mathsf {b}\},\{\mathsf {a}\})\}\gg \mathsf {c}\).

These examples should clarify how the cd-relation is used and its expressivity.

3 Event Structures

We have introduced a new notion of event structure that we should confront with the others presented in literature (at least some of them). Therefore we review some of the various definitions of event structures.

Prime Event Structures: Prime event structures are one among the first proposed and the most widely studied [27], especially for the connections with prime algebraic domains and causal nets. The dependencies among events are modeled using a partial order relation, the incompatibility among events is modeled using a symmetric and irreflexive relation, the conflict relation, and it is required that the conflict relation is inherited along the partial order.

Definition 4

A is a triple \( P = (\mathsf {E}, \le , \#)\), where (a) \(\mathsf {E}\) is a set of events, (b) \(\le \subseteq \mathsf {E}\times \mathsf {E}\) is a well founded partial order called causality relation, (c) \(\# \subseteq \mathsf {E}\times \mathsf {E}\) is an irreflexive and symmetric relation, called conflict relation, such that \(\mathsf {e}\ \#\ \mathsf {e}'\le \mathsf {e}''\ \Rightarrow \ \mathsf {e}\ \#\ \mathsf {e}''\), and (c) \(\le \cap \# = \emptyset \).

Given an event \(\mathsf {e}\in \mathsf {E}\), with \(\lfloor e \rfloor \) we denote the set \(\{{e'} \mid {e'\le e}\}\), and the requirement that the partial order is well founded implies that for each \(\mathsf {e}\in \mathsf {E}\), the set \(\lfloor e \rfloor \) is finite. We say that C is a configuration of the pes \( P \) iff C is conflict free and for each \(\mathsf {e}\in C\) it holds that \(\lfloor \mathsf {e} \rfloor \subseteq C\). The set of configuration of a pes is denoted with \(\mathsf {Conf}_{{\textsc {pes}}}( P )\). Clearly \((\mathsf {Conf}_{{\textsc {pes}}}( P ), \subseteq )\) is a partial order. With \(\mapsto _{{\textsc {pes}}}\) we denote the relation over \(\mathsf {Conf}_{{\textsc {pes}}}( P ) \times \mathsf {Conf}_{{\textsc {pes}}}( P )\) defined as \(C \mapsto _{{\textsc {pes}}} C'\) iff \(C\subset C'\) and \(C' = C\cup \{\mathsf {e}\}\) for some \(\mathsf {e}\in \mathsf {E}\).

Relaxed Prime Event Structures: Some of the requirements of a pes, the one on the dependencies among events (here called enabling) and the ore regarding the conflicts among events (which does not need to be saturated), can be relaxed yielding a relaxed prime event structure [1, 3]. In this definition the events that must be present in a state to allow the execution of another one are the events in a (finite) subset called immediate causes and often denoted with \({{\,\mathrm{ic}\,}}\).

Definition 5

A relaxed prime event structure (r pes) is a triple \((\mathsf {E},\rightarrow , \#)\), where (a) \(\mathsf {E}\) is a set of events, (b) \(\rightarrow \ \subseteq \mathsf {E}\times \mathsf {E}\) is the enabling relation such that \(\forall \mathsf {e}\in \mathsf {E}\) the set \({{\,\mathrm{ic}\,}}(\mathsf {e}) = \{{\mathsf {e'}} \mid {\mathsf {e'}\rightarrow \mathsf {e}}\}\) is finite, and (c) \(\#\subseteq \mathsf {E}\times \mathsf {E}\) is an irreflexive and symmetric conflict relation.

The intuition is that the \(\rightarrow \) relation plays the role of the causality relation and the conflict relation models conflicts among events, as before. The immediate causes can be seen as a mapping \({{\,\mathrm{ic}\,}}:\mathsf {E} \rightarrow \mathbf {2}_{ fin }^{\mathsf {E}}\). Let \( T = (\mathsf {E},\rightarrow , \#)\) be a rpes. Let C be a subset of \(\mathsf {E}\). We say that C is a configuration of the rpes \( T \) iff there exists a sequence of distinct events \(\rho = \mathsf {e}_1\cdots \mathsf {e}_n\cdots \) over \(\mathsf {E}\) such that \(\overline{\rho } = C\), \(\overline{\rho }\) is conflict free, and for each \(1\le i\le \textit{len}(\rho )\). \({{\,\mathrm{ic}\,}}(\mathsf {e}_i) \subseteq \overline{\rho _{i-1}}\). The set of configuration of a rpes is denoted with \(\mathsf {Conf}_{r{\textsc {pes}}}( T )\). In rpes the emphasis is put on the existence of an ordering in which the events are added to a configuration, and this will be valid for many of the kinds of event structures. \((\mathsf {Conf}_{r{\textsc {pes}}}( T ), \subseteq )\) is a partial order. With \(\mapsto _{r{\textsc {pes}}}\) we denote the relation over \(\mathsf {Conf}_{r{\textsc {pes}}}( T ) \times \mathsf {Conf}_{r{\textsc {pes}}}( T )\) defined as \(C \mapsto _{r{\textsc {pes}}} C'\) iff \(C\subset C'\) and \(C' = C\cup \{\mathsf {e}\}\) for some \(\mathsf {e}\in \mathsf {E}\).

A pes is also a rpes: the causality relation is the enabling relation and the conflict relation is the same one. \(\mathsf {e}\) is added to a configuration C when its causes are in C and no conflict arises. Given a rpes \( T = (\mathsf {E},\rightarrow , \#)\), it is not difficult to see that \((\mathsf {E},\rightarrow ^{*}, \hat{\#})\) is a pes, where \(\rightarrow ^{*}\) is the reflexive and transitive closure of \(\rightarrow \) and \(\hat{\#}\) is obtained by \(\#\) stipulating that \(\# \subseteq \hat{\#}\) and it is closed with respect to \(\rightarrow ^{*}\), i.e. if \(\mathsf {e}\ \hat{\#}\ \mathsf {e}' \rightarrow ^{*} \mathsf {e}''\) then \(\mathsf {e}\ \hat{\#}\ \mathsf {e}''\). Indeed, the fact that \(\rightarrow ^{*}\) is a partial order is guaranteed by the fact that each event is executable, that \(\rightarrow ^{*}\) is well founded is implied by the finiteness of causes for each event \(\mathsf {e}\in \mathsf {E}\) and \(\hat{\#}\) is the semantic closure of \(\#\): no new conflict is introduced.

Dynamic Causality Event Structures: We now review a notion of event structure where causality may change [1, 3]. The idea is to enrich a rpes with two relations, one modeling the shrinking causality (some dependencies are dropped) and the other the growing causality (some dependencies are added). The shrinking and the growing causality relations are ternary relations stipulating that the happening of a specific event (the modifier) allows to drop or add a specific cause (the contribution) for another event (the target).

We illustrate these relations with the aid of a number of auxiliary subsets of events associated to these relations. Let \(\mathsf {E}\) be a set of events. A shrinking causality relation is a ternary relation \(\lhd \ \subseteq \mathsf {E}\times \mathsf {E}\times \mathsf {E}\), and the elements of this relation are denoted with \(\mathsf {e}'\lhd [\mathsf {e}\rightarrow \mathsf {e}'']\). Given \(\mathsf {e}'\lhd [\mathsf {e}\rightarrow \mathsf {e}'']\), \(\mathsf {e}'\) is called modifier, \(\mathsf {e}''\) target and \(\mathsf {e}\) contribution. \(\mathsf {ShrMod}(\mathsf {e}'') = \{{\mathsf {e}'} \mid {\mathsf {e}'\lhd [\mathsf {e}\rightarrow \mathsf {e}'']}\}\) is the set of modifiers for a given target \(\mathsf {e}''\) and \(\mathsf {Drop}({\mathsf {e}'},{\mathsf {e}''}) = \{{\mathsf {e}} \mid {\mathsf {e}'\lhd [\mathsf {e}\rightarrow \mathsf {e}'']}\}\) is the set of contributions for a given modifier \(\mathsf {e}'\) and a given target \(\mathsf {e}''\). Let H be a finite subset of \(\mathsf {E}\) and let \(\mathsf {e}\) be an event, we define the set \({{\,\mathrm{dc}\,}}(H,\mathsf {e}) = \bigcup _{\mathsf {e'}\in H\cap \mathsf {ShrMod}(\mathsf {e})} \mathsf {Drop}({\mathsf {e}'},{\mathsf {e}})\) as the set of dropped causes with respect to H for the event \(\mathsf {e}\). A growing causality relation is a ternary relation \(\blacktriangleright \ \subseteq \mathsf {E}\times \mathsf {E}\times \mathsf {E}\), and the elements of this relation are denoted as \(\mathsf {e}'\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}'']\) Given \(\mathsf {e}'\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}'']\), \(\mathsf {e}'\) is called modifier, \(\mathsf {e}''\) target and \(\mathsf {e}\) contribution. \(\mathsf {GroMod}(\mathsf {e}'') = \{{\mathsf {e}'} \mid {\mathsf {e}'\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}'']}\}\) is the set of modifiers for a given target \(\mathsf {e}''\) and \(\mathsf {Add}({\mathsf {e}'},{\mathsf {e}''}) = \{{\mathsf {e}} \mid {\mathsf {e}'\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}'']}\}\) is the set of contributions for a given modifier \(\mathsf {e}'\) and a given target \(\mathsf {e}''\). Let H be a finite subset of \(\mathsf {E}\) and let \(\mathsf {e}\) be an event, we define the set \({{\,\mathrm{ac}\,}}(H,\mathsf {e}) = \bigcup _{\mathsf {e'}\in H\cap \mathsf {GroMod}(\mathsf {e})} \mathsf {Add}({\mathsf {e}'},{\mathsf {e}})\) as the set of added causes with respect to H for the event \(\mathsf {e}\). The two relation of shrinking and growing causality give the functions \({{\,\mathrm{dc}\,}}:\mathbf {2}_{ fin }^{\mathsf {E}}\times \mathsf {E} \rightarrow \mathbf {2}_{ fin }^{\mathsf {E}}\). and \({{\,\mathrm{ac}\,}}:\mathbf {2}_{ fin }^{\mathsf {E}}\times \mathsf {E} \rightarrow \mathbf {2}_{ fin }^{\mathsf {E}}\).

Definition 6

A is a quintuple \( D = (\mathsf {E}, \rightarrow , \#, \lhd , \blacktriangleright )\), where \((\mathsf {E}, \rightarrow , \#)\) is a rpes, \(\lhd \ \subseteq \mathsf {E}\times \mathsf {E}\times \mathsf {E}\) is the shrinking causality relation, \(\blacktriangleright \ \subseteq \mathsf {E}\times \mathsf {E}\times \mathsf {E}\) is the growing causality relation, and are such that for all \(\mathsf {e}, \mathsf {e}', \mathsf {e}'' \in \mathsf {E}\)

  1. 1.

    \(\mathsf {e}'\lhd [\mathsf {e}\rightarrow \mathsf {e}''] \wedge \not \exists \mathsf {e}''' \in \mathsf {E}.\ \mathsf {e}'''\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}'']\Longrightarrow \mathsf {e}\rightarrow \mathsf {e}''\),

  2. 2.

    \(\mathsf {e}'\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}''] \wedge \not \exists \mathsf {e}''' \in \mathsf {E}. \mathsf {e}'''\lhd [\mathsf {e}\rightarrow \mathsf {e}''] \Longrightarrow \lnot (\mathsf {e}\rightarrow \mathsf {e}'')\),

  3. 3.

    \(\mathsf {e}'\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}''] \Longrightarrow \lnot (\mathsf {e}'\lhd [\mathsf {e}\rightarrow \mathsf {e}''])\), and

  4. 4.

    \(\forall \mathsf {e}, \mathsf {e}'\in \mathsf {E}.\ \not \exists \mathsf {e}'', \mathsf {e}'''\in \mathsf {E}.\ \mathsf {e}''\lhd [\mathsf {e}\rightarrow \mathsf {e}']\) and \(\mathsf {e}'''\blacktriangleright [\mathsf {e}\rightarrow \mathsf {e}']\).

For further comments on this definition we refer to [1] and [3]. It should be observed, however, that the definition we consider here is slightly less general of the one presented there, as we add a further condition, the last one, which is defined in [2] and does not allow that the same contribution can be added and removed by two different modifiers. These are called in [2] single state dynamic causality event structures and rule out the fact that some causality (or absence of) depends on the order of modifiers. Conditions 1 and 2 simply state that in the case of the shrinking relation the dependency should be present, and in the case of the growing the dependency should be absent; condition 3 says that if a dependency is added then it cannot be removed, or a removed dependency cannot be added, and the final condition express the fact that two modifiers, one growing and the other shrinking, cannot act on the same dependency. Clearly a dces where \(\lhd \) and \(\blacktriangleright \) are empty is a rpes.

Let \( D = (\mathsf {E}, \rightarrow , \#, \lhd , \blacktriangleright )\) be a dces. Let C be a subset of \(\mathsf {E}\). We say that C is a configuration of the dces iff there exists a sequence of distinct events \(\rho = \mathsf {e}_1\cdots \mathsf {e}_n\) over \(\mathsf {E}\) such that (a) \(\overline{\rho } = C\), (b) \(\overline{\rho }\) is conflict-free, and (c) \(\forall 1 \le i \le \textit{len}(\rho ).\ (({{\,\mathrm{ic}\,}}(\mathsf {e}_i) \cup {{\,\mathrm{ac}\,}}(\overline{\rho _{i-1}}, \mathsf {e}_i)) \setminus {{\,\mathrm{dc}\,}}(\overline{\rho _{i-1}}, \mathsf {e}_i)) \subseteq \overline{\rho _{i-1}}\). The set of configuration of a dces is denoted with \(\mathsf {Conf}_{{\textsc {dces}}}( D )\).

With \(\mapsto _{{\textsc {dces}}}\) we denote the relation over \(\mathsf {Conf}_{{\textsc {dces}}}( D ) \times \mathsf {Conf}_{{\textsc {dces}}}( D )\) defined as \(C \mapsto _{{\textsc {dces}}} C'\) iff \(C\subset C'\), \(C' = C\cup \{\mathsf {e}\}\) for some \(\mathsf {e}\in \mathsf {E}\) and \((({{\,\mathrm{ic}\,}}(\mathsf {e}) \cup {{\,\mathrm{ac}\,}}(C, \mathsf {e})) \setminus {{\,\mathrm{dc}\,}}(C, \mathsf {e}))\subseteq C\).

Example 4

Consider the set of events \(\{\mathsf {a}, \mathsf {b}, \mathsf {c}, \mathsf {d}, \mathsf {e}\}\), with \(\mathsf {b}\rightarrow \mathsf {c}\), \(\mathsf {a}\lhd [\mathsf {b}\rightarrow \mathsf {c}]\), \(\mathsf {d}\blacktriangleright [\mathsf {e}\rightarrow \mathsf {c}]\), \(\mathsf {a}\ \#\ \mathsf {e}\) and \(\mathsf {d}\ \#\ \mathsf {b}\). \(\mathsf {a}\) and \(\mathsf {d}\) are the modifiers for the target \(\mathsf {c}\), the happening of \(\mathsf {a}\) has the effect that the cause \(\mathsf {b}\) may be dropped, and the one of \(\mathsf {d}\) that the cause \(\mathsf {e}\) should be added for \(\mathsf {c}\). If the prefix of the trace is \(\mathsf {b}\mathsf {c}\) (the target \(\mathsf {c}\) is executed before of one of its modifiers \(\mathsf {a}\) and \(\mathsf {d}\)) then the final part of the trace is any either \(\mathsf {a}\) or \(\mathsf {e}\), and as \(\mathsf {d}\ \#\ \mathsf {b}\) we have that \(\mathsf {d}\) cannot be added. If the modifier \(\mathsf {a}\) is executed before \(\mathsf {c}\) then we have the traces \(\mathsf {a}\mathsf {c}\) (as the immediate cause \(\mathsf {b}\) of \(\mathsf {c}\) is dropped by \(\mathsf {a}\)) followed by \(\mathsf {b}\) or \(\mathsf {d}\), and if the modifier \(\mathsf {d}\) is executed, then before adding \(\mathsf {c}\), we need \(\mathsf {e}\) (the modifier \(\mathsf {d}\) add the immediate cause \(\mathsf {e}\) for \(\mathsf {c}\)), and in this case we cannot add \(\mathsf {b}\) for sure as it is in conflict with \(\mathsf {d}\) or \(\mathsf {a}\) as it is in conflict with \(\mathsf {e}\). If both modifiers \(\mathsf {a}\) and \(\mathsf {d}\) happen, then the event \(\mathsf {c}\) is permanently disabled, as it needs the contribution \(\mathsf {e}\) (growing cause) which is in conflict with \(\mathsf {a}\). Below are shown the configurations of this dces and the \(\mapsto _{{\textsc {dces}}}\) relation.

figure g

A shrinking event structure (ses) is a dces where the \(\blacktriangleright \) relation is empty and a growing event structure (ges) is a dces where the \(\lhd \) relation is empty.

Inhibitor Event Structures: Inhibitor event structure [5] are equipped with a relation allowing to model conflicts (even asymmetric) as well as temporary inhibitions. With \(\mathbf {2}_1^{\mathsf {E}}\) we denote the subsets of events with cardinality at most one (the empty set or singletons). The intuition behind this relation is the following: given , the event \(\mathsf {e}\) is enabled at a configuration is whenever the configuration contains the set a, then its intersection with A is non empty. Hence the event in a non empty a inhibits the happening of \(\mathsf {e}\) unless some event in A has happened as well. We stipulate that given the events in A are pairwise conflicting (denoted with \(\#(A)\)). Two events \(\mathsf {e}\) and \(\mathsf {e}'\) are in conflict if and . An or-causality relation < is definable stipulating that \(A < \mathsf {e}\) if , and that if \(A < \mathsf {e}\) and \(B < \mathsf {e}'\) for some \(\mathsf {e}'\in A\) then also \(B < \mathsf {e}\). This relation should be interpreted as follows: \(A < \mathsf {e}\) means that if \(\mathsf {e}\) is present, then also an event in A should be present.

Definition 7

An is a pair , where \(\mathsf {E}\) is a set of events and is a relation such that for each it holds that \(\#(A)\) and \(a\cup A\ne \emptyset \).

We briefly recall the intuition: consider an event \(\mathsf {e}\) and a triple in the relation . Then \(\mathsf {e}\) can be added provided that if the event in a is present also one in A should be present. Let be an ies. Let C be a subset of \(\mathsf {E}\). We say that C is a configuration of the ies \( I \) iff there exists a sequence of distinct events \(\rho = \mathsf {e}_1\cdots \mathsf {e}_n\cdots \) over \(\mathsf {E}\) such that \(\overline{\rho } = C\) and for each \(i\le n\), for each , it holds that \(a \subseteq \overline{\rho _{i-1}}\ \Rightarrow \ \overline{\rho _{i-1}}\cap A\ne \emptyset \). The set of configuration of a ies is denoted with \(\mathsf {Conf}_{{\textsc {ies}}}( I )\). With \(\mapsto _{{\textsc {ies}}}\) we denote the relation over \(\mathsf {Conf}_{{\textsc {ies}}}( I ) \times \mathsf {Conf}_{{\textsc {ies}}}( D )\) defined as \(C \mapsto _{{\textsc {ies}}} C'\) iff \(C\subset C'\) and \(C' = C\cup \{\mathsf {e}\}\) for some \(\mathsf {e}\in \mathsf {E}\).

Example 5

Consider three events \(\mathsf {a}, \mathsf {b}\) and \(\mathsf {c}\), and . The maximal event traces are \(\mathsf {c}\mathsf {a}\mathsf {b}\) and \(\mathsf {a}\mathsf {b}\mathsf {c}\). The event \(\mathsf {c}\) is inhibited when the event \(\mathsf {a}\) has occurred unless the event \(\mathsf {b}\) has occurred as well. The configurations are \(\emptyset \), \(\{\mathsf {a}\}\), \(\{\mathsf {c}\}\), \(\{\mathsf {a},\mathsf {b}\}\), \(\{\mathsf {a},\mathsf {c}\}\) and \(\{\mathsf {a},\mathsf {b},\mathsf {c}\}\) and are reached as follows: \(\emptyset \mapsto _{{\textsc {ies}}} \{\mathsf {a}\}\), \(\emptyset \mapsto _{{\textsc {ies}}} \{\mathsf {c}\}\), \(\{\mathsf {a}\} \mapsto _{{\textsc {ies}}} \{\mathsf {a},\mathsf {b}\}\), \(\{\mathsf {c}\} \mapsto _{{\textsc {ies}}} \{\mathsf {a},\mathsf {c}\}\), \(\{\mathsf {a},\mathsf {b}\}\mapsto _{{\textsc {ies}}} \{\mathsf {a},\mathsf {b},\mathsf {c}\}\) and \(\{\mathsf {a},\mathsf {c}\}\mapsto _{{\textsc {ies}}} \{\mathsf {a},\mathsf {b},\mathsf {c}\}\).

Event Structures with Resolvable Conflicts: We finally recall the notion of event structure with resolvable conflicts [26].

Definition 8

An event structure with resolvable conflicts (rces) is the pair \( R = (\mathsf {E}, \vdash )\) where \(\mathsf {E}\) is a set of events and \(\vdash \subseteq \mathbf {2}^{\mathsf {E}}\times \mathbf {2}^{\mathsf {E}}\) is the enabling relation.

No restriction is posed on the enabling relation. The intuition is that stipulating \(X \vdash Y\) one state that for all the events in Y to occur, also the events in the set X should have occurred first.

The single event transition relation \(\leadsto \subseteq \mathbf {2}^{\mathsf {E}}\times \mathbf {2}^{\mathsf {E}}\) of a rces \( R = (\mathsf {E}, \vdash )\) is given by \(X \leadsto Y \Leftrightarrow (X \subseteq Y \wedge |Y\setminus X| \le 1 \wedge \forall Z\subseteq Y.\ \exists W\subseteq X.\ W\vdash Z)\). With this notion it is possible to define what a configuration is: it is a subset X of events such that \(X\leadsto X\). The requirement that \(X\leadsto X\) implies that each subset of events is enabled in the configuration. Let \( R = (\mathsf {E}, \vdash )\) be a rces. Let C be a subset of \(\mathsf {E}\). We say that C is a configuration of the ies \( I \) iff there exists a sequence of distinct events \(\rho = \mathsf {e}_1\cdots \mathsf {e}_n\cdots \) over \(\mathsf {E}\) such that for each \(1\le i\le \textit{len}(\rho )\) it holds that \(\overline{\rho _{i-1}}\) and \(\overline{\rho _{i}}\) are configurations, and \(\overline{\rho _{i-1}} \leadsto \overline{\rho _{i}}\). The set of configuration of a rces is denoted with \(\mathsf {Conf}_{{\textsc {rces}}}( R )\).

Given two configurations C and \(C'\) of a rces, such that \(C\cup \{\mathsf {e}_{n+1}\} = C'\) and \(C \leadsto C\), we stipulate again that \(\overline{\rho } \mapsto _{{\textsc {dces}}} \overline{\rho '}\), defining a relation over \(\mathsf {Conf}_{{\textsc {rces}}}( R )\times \mathsf {Conf}_{{\textsc {rces}}}( R )\). Observe that the enabling relation \(\vdash \) is used not only to state under which condition an event may happen but also to stipulate when an event is deducible from a set of events, justifying also the deduction symbol used for this relation. Observe also that \(\mapsto _{{\textsc {rces}}}\) is essentially \(\leadsto \).

Example 6

Consider three events \(\mathsf {a}, \mathsf {b}\) and \(\mathsf {c}\), and \(\emptyset \vdash X\) where \(X\subseteq \{\mathsf {a}, \mathsf {b}, \mathsf {c}\}\) with \(X\ne \{\mathsf {a}, \mathsf {b}\}\) and \(\{\mathsf {c}\}\vdash \{\mathsf {a}, \mathsf {b}\}\). The intuition is that all the events are singularly enabled but \(\mathsf {a}\) and \(\mathsf {b}\) are in conflict unless \(\mathsf {c}\) has not happened. In fact \(\{\mathsf {a}, \mathsf {b}\}\) is not a configuration as taking \(\{\mathsf {a}, \mathsf {b}\}\) as the \(Z\subseteq \{\mathsf {a}, \mathsf {b}\}\) of the notion of single event transition relation, there is no subset of \(\{\mathsf {a}, \mathsf {b}\}\) enabling these two events.

The configurations and how they are reached are those of the Example 1.

4 Embedding and Comparing Event Structures

We now show that each of the event structure we have seen so far can be seen as a cdes, and also how to compare them. For the sake of simplicity, we will consider event structures where each event \(\mathsf {e}\) is executable, namely that there is at least a configuration containing it.

Comparing Event Structures: We start by devising how we can compare two event structures of any kind. The intuition is obvious: two event structures are equivalent iff they have the same configurations and the \(\mapsto \) relations defined on configurations coincide. We recall the notion of event automaton [22].

Definition 9

Let \(\mathsf {E}\) be a set of events. An event automaton over \(\mathsf {E}\) (\(\mathsf {ea}\)) is the tuple \(\mathcal {E} = \langle \mathsf {E}, \mathsf {S}, \mapsto , s _0\rangle \) such that

  • \(\mathsf {S}\subseteq \mathbf {2}^{\mathsf {E}}\), and

  • \(\mapsto \subseteq \mathsf {S}\times \mathsf {S}\) is such that \(s\mapsto s'\) implies that \(s \subset s'\).

\( s _0\in \mathsf {S}\) is the initial state.

Event automata can easily express configurations of any kind of event structure, provided that for each kind a way to reach a configuration from another is given. The kind of event structure is ranged over by \(\mu , \mu '\in \{{\textsc {pes}}, r{\textsc {pes}}, {\textsc {dces}}, {\textsc {ies}}, {\textsc {rces}}, {\textsc {cdes}}\}\).

Theorem 1

Let \( X \) be an event structure of kind \(\mu \) over the set of events \(\mathsf {E}\). Then \(\mathcal {G}_{\mu }({ X }) = \langle \mathsf {E}, \mathsf {Conf}_{\mu }( X ), \mapsto _{\mu }, \emptyset \rangle \) is an event automaton.

Using event automata we can decide when two event structures are equivalent.

Definition 10

Let \( X \) and \( Y \) be event structures over the same set of events \(\mathsf {E}\) of kind \(\mu \) and \(\mu '\) respectively. We say that \( X \) and \( Y \) are equivalent, denoted with \( X \equiv Y \), iff \(\mathcal {G}_{\mu }({ X }) = \mathcal {G}_{\mu '}({ Y })\).

The expressivity is explicitly studied in [1] and [3]. Informally a kind of event structure is more expressive with respect to another, when there is a configuration of the former that cannot be a configuration of the latter, whatever is done with the various relations among events. Incomparable means that neither one is more expressive than the other or the vice versa. We shortly summarize part of these findings, when considering finite configurations. pes and rpes are equally expressive, whereas ses and ges are strictly more expressive than rpes, and are incomparable one with respect to the other. These two are both less expressive than dces and rces, which are incomparable. The relative expressivity of other kinds of event structure has not been investigated.

Embedding Event Structures into cdes: We prove now a more general result, namely that given any event automaton \(\mathcal {E}\), which is obtained by the configurations of any kind of event structure, it is possible to obtain a cdes whose configurations are precisely the ones of the event automaton \(\mathcal {E}\). We start identifying, in an \(\mathsf {ea}\), the events that are in conflict. The conflict relation we obtain is a semantic conflict relation: two events are in conflict iff they never appear together in a state.

Definition 11

Let \(\mathcal {E} = \langle \mathsf {E}, \mathsf {S}, \mapsto , s _0\rangle \) be an \(\mathsf {ea}\). We define a symmetric and irreflexive conflict relation \(\#_{\mathsf {ea}}\) as follows: \(\mathsf {e}\ \#_{\mathsf {ea}}\ \mathsf {e}'\) iff for each \(s\in \mathsf {S}\). \(\{\mathsf {e}, \mathsf {e}'\}\not \subseteq s\).

In order to obtain the cd-relation we need some further definitions. Fixed an event \(\mathsf {e}\), the first one identifies the states where this event can be added, and the second one identifies the states where the event cannot be added.

Definition 12

Let \(\mathcal {E} = \langle \mathsf {E}, \mathsf {S}, \mapsto , s _0\rangle \) be an \(\mathsf {ea}\). To each event \(\mathsf {e}\in \mathsf {E}\) we associate the subset of events \(\{{s\in \mathsf {S}} \mid {s\cup \{\mathsf {e}\}\in \mathsf {S}\ \wedge \ s\mapsto s\cup \{\mathsf {e}\}}\}\), which we denote with \({{\,\mathrm{\mathcal {C}}\,}}(\mathcal {E},\mathsf {e})\).

Definition 13

Let \(\mathcal {E} = \langle \mathsf {E}, \mathsf {S}, \mapsto , s _0\rangle \) be an \(\mathsf {ea}\). To each event \(\mathsf {e}\in \mathsf {E}\) we associate the set of configuration \(\{{s\in \mathsf {S}} \mid {s\cup \{\mathsf {e}\}\not \in \mathsf {S}}\}\), which we denote with \({{\,\mathrm{{\mathcal {I}}}\,}}(\mathcal {E},\mathsf {e})\).

Definition 12 characterizes when an event is enabled giving the allowing context, whereas the Definition 13 gives the context where the event cannot be added, and it is called negative context. These two sets are used to obtain the cd-relation.

Theorem 2

Let \(\mathcal {E} = \langle \mathsf {E}, \mathsf {S}, \mapsto , s _0\rangle \) be an \(\mathsf {ea}\). Then \(\mathcal {F}_{\mathsf {ea}}({\mathcal {E}}) = (\mathsf {E}, \#,\) \(\gg )\) is a cdes, where \(\#\) is the relation \(\#_{\mathsf {ea}}\) of Definition 11, and for each \(\mathsf {e}\in \mathsf {E}\) we have \(\{{(X,\emptyset )} \mid {X\in {{\,\mathrm{\mathcal {C}}\,}}(\mathcal {E},\mathsf {e})}\}\cup \{{(X,\{\mathsf {e}\})} \mid {X\in {{\,\mathrm{{\mathcal {I}}}\,}}(\mathcal {E},\mathsf {e})}\}\gg \mathsf {e}\). Furthermore \(\mathcal {E} \equiv \mathcal {G}_{{\textsc {cdes}}}({\mathcal {F}_{\mathsf {ea}}({\mathcal {E}})})\).

The theorem has a main consequence, namely that event automata and cdes are equally expressive.

Example 7

Consider the rces of the Example 6. The associated event automaton is the one depicted in the Example 1. It has no conflict as all the three events are present in a configuration together. The associated cd-relation, obtained using Definition 12 and Definition 13, is the following one, which is a little different from the one devised in the Example 1 as here it is obtained from an event automaton. \(\{(\emptyset ,\emptyset ),(\{\mathsf {c}\},\emptyset ),(\{\mathsf {c},\mathsf {b}\},\emptyset ), (\{\mathsf {b}\},\{\mathsf {a}\})\}\gg \mathsf {a}\) because the set \({{\,\mathrm{\mathcal {C}}\,}}(\mathsf {Conf}_{{\textsc {rces}}}( R ),\mathsf {a})\) contains the sets \(\emptyset \), \(\{\mathsf {c}\}\) and \(\{\mathsf {c},\mathsf {b}\}\), whereas the set of the negative context \({{\,\mathrm{{\mathcal {I}}}\,}}(\mathsf {Conf}_{{\textsc {rces}}}( R ),\mathsf {a})\) contains just \(\{\mathsf {b}\}\), the one \(\{(\emptyset ,\emptyset ),(\{\mathsf {c}\},\emptyset ),\) \((\{\mathsf {a},\mathsf {b}\},\emptyset ), (\{\mathsf {a}\},\{\mathsf {b}\})\}\gg \mathsf {b}\) as \({{\,\mathrm{\mathcal {C}}\,}}(\mathsf {Conf}_{{\textsc {rces}}}( R ),\mathsf {b})\) contains the sets \(\emptyset \), \(\{\mathsf {c}\}\) and \(\{\mathsf {a},\mathsf {c}\}\), \({{\,\mathrm{{\mathcal {I}}}\,}}(\mathsf {Conf}_{{\textsc {rces}}}( R ),\mathsf {b})\) contains \(\{\mathsf {a}\}\), and finally \(\{(\emptyset ,\emptyset ),(\{\mathsf {a}\},\emptyset ),(\{\mathsf {b}\},\emptyset )\} \gg \mathsf {c}\) as \({{\,\mathrm{\mathcal {C}}\,}}(\mathsf {Conf}_{{\textsc {rces}}}( R ),\mathsf {c})\) contains the sets \(\emptyset \), \(\{\mathsf {a}\}\) and \(\{\mathsf {b}\}\), and \({{\,\mathrm{{\mathcal {I}}}\,}}(\mathsf {Conf}_{{\textsc {rces}}}( R ),\mathsf {c})\) is the empty set.

As a consequence of the Theorem 2 we have the following result.

Corollary 1

Let \( X \) be an event structure of type \(\mu \) and let \(\mathcal {G}_{\mu }({ X })\) be the associated \(\mathsf {ea}\). Then \(\mathcal {F}_{\mathsf {ea}}({\mathcal {G}_{\mu }({ X })})\) is cdes, and \( X \equiv \mathcal {F}_{\mathsf {ea}}({\mathcal {G}_{\mu }({ X })})\).

The construction identifies properly the context in which an event is allowed to happen, and this context becomes the main ingredient of the cd-relation, as the construction does not give the causes but just the context. If on the one hand this suggests that the context, rather than the causal dependencies, is the relevant ingredient, on the other hand it is less informative with respect to the usual causality definitions.

We review some kind of event structures, showing that a more informative cd-relation can be indeed obtained. We will focus only on few of them.

pes: In this case the idea is that causes of an event are just the set of events that should be present in the configuration.

Proposition 1

Let \( P = (\mathsf {E}, \le , \#)\) be a pes. Then \(\mathcal {F}_{{\textsc {pes}}}({ P }) = (\mathsf {E}, \#, \gg )\) is a cdes, where \(\{(\emptyset ,\lfloor \mathsf {e} \rfloor \setminus \{\mathsf {e}\})\}\gg \mathsf {e}\) for each \(\mathsf {e}\in \mathsf {E}\). Furthermore \( P \equiv \mathcal {F}_{{\textsc {pes}}}({ P })\).

This is not the unique way to associate to the causality relation \(\le \) of a pes the \(\gg \) relation: one alternative would have been to add \(\{(\emptyset ,\{\mathsf {e}'\})\}\gg \mathsf {e}\) for each \(\mathsf {e}' < \mathsf {e}\) and another one would be \(\{(\lfloor \mathsf {e} \rfloor \setminus \{\mathsf {e}\},\emptyset )\}\gg \mathsf {e}\) showing that the events causally before \(\mathsf {e}\) are indeed the context allowing the event \(\mathsf {e}\) to happen.

Example 8

Consider the pes \((\{\mathsf {a}, \mathsf {b}, \mathsf {c}\}, \le , \#)\) where \(\mathsf {a}\le \mathsf {b}\) (we omit the reflexive part of the \(\le \) relation), \(\mathsf {a}\ \#\ \mathsf {c}\) and \(\mathsf {b}\ \#\ \mathsf {c}\). The event traces are \(\epsilon \), \(\mathsf {a}\), \(\mathsf {a}\mathsf {b}\) and \(\mathsf {c}\), and the associated configurations are \(\emptyset \), \(\{\mathsf {a}\}\), \(\{\mathsf {a}, \mathsf {b}\}\) and \(\{\mathsf {c}\}\) (the \(\mapsto _{{\textsc {pes}}}\) relation is obvious). The conflict relation is the same and the cd-relation is \(\{(\emptyset ,\emptyset )\}\gg \mathsf {a}\), \(\{(\emptyset ,\emptyset )\}\gg \mathsf {c}\) and \(\{(\emptyset ,\{\mathsf {a}\})\}\gg \mathsf {b}\). As noticed before we could have stipulated also \(\{(\{\mathsf {a}\},\emptyset )\}\gg \mathsf {b}\) instead of \(\{(\emptyset ,\{\mathsf {a}\})\}\gg \mathsf {b}\) obtaining the same set of configurations and the same transition graph.

dces: The intuition in this case consists in mixing the two approaches above.

Proposition 2

Let \( D = (\mathsf {E}, \#, \rightarrow , \lhd , \blacktriangleright )\) be a dces. \(\mathcal {F}_{{\textsc {dces}}}({ D }) = (\mathsf {E}, \#,\) \({\gg )}\) is a cdes where the relation \(\gg \) is defined as \(\{(X,({{\,\mathrm{ic}\,}}(\mathsf {e}) \setminus (\bigcup _{\mathsf {e}'\in X}\mathsf {Drop}({\mathsf {e}'},{\mathsf {e}})))\ \cup \ \bigcup _{\mathsf {e}'\in X} \mathsf {Add}({\mathsf {e}'},{\mathsf {e}}))\ |\) \({{X\subseteq \mathsf {GroMod}(\mathsf {e})\cup \mathsf {ShrMod}(\mathsf {e})}} \gg \mathsf {e}\) for each \(\mathsf {e}\in \mathsf {E}\). Furthermore \( D \equiv \mathcal {F}_{{\textsc {dces}}}({ G })\).

Example 9

Concerning the dces of the Example 4, the conflict relation is the one of the dces  whereas the cd-relation is \(\{(\emptyset ,\emptyset )\}\gg \mathsf {a}\), \(\{(\emptyset ,\emptyset )\}\gg \mathsf {b}\), \(\{(\emptyset ,\emptyset )\}\gg \mathsf {e}\), \(\{(\emptyset ,\emptyset )\}\gg \mathsf {d}\) and for \(\mathsf {c}\) we have \(\{(\emptyset ,\{\mathsf {b}\}),(\{\mathsf {a}\},\emptyset ), (\{\mathsf {d}\},\{\mathsf {b},\mathsf {e}\}),(\{\mathsf {a},\mathsf {d}\},\{\mathsf {e}\})\}\gg ~\mathsf {c}\).

ies: In the case of ies there are two main observations: one, there is no conflict relation, and second, though there is some similarity between the relation and the \(\gg \) relation, there is also a quite subtle difference. When adding an event \(\mathsf {e}\) to a configuration of an ies, and we have , one would simply add the pairs \((a,\{\mathsf {e}'\})\) for each \(\mathsf {e}'\in A\) (as the events in A are pairwise conflicting) but this does not work in the case A is the empty set, as it has a different meaning in the relation with respect to the \(\gg \) relation. In the former, it means that the event in a inhibits the event \(\mathsf {e}\), whereas in the latter the pair \((a,\emptyset )\) simply says that if the context a is present then there is no further event needed. Taking into account these differences, the translation is fairly simple. We first define the conflict relation and then the relation \(\gg \), which is almost the same as the relation.

Proposition 3

Let be an ies. \(\mathcal {F}_{{\textsc {ies}}}({ I }) = (\mathsf {E}, \#,\) \(\gg )\) is a cdes, where \(\mathsf {e}\ \#\ \mathsf {e}'\) iff and , and for each \(\mathsf {e}\in \mathsf {E}\), if and \(A\ne \emptyset \) then \(\{(\emptyset ,\emptyset )\}\cup \{{(a,\{\mathsf {e}'\})} \mid {\mathsf {e}'\in A}\}\gg \mathsf {e}\), if and \(A = \emptyset \) then \(\{(a,\{\mathsf {e}\})\}\gg \mathsf {e}\). Furthermore \( I \equiv \mathcal {F}_{{\textsc {ies}}}({ I })\).

Example 10

The ies of the Example 5 induces the empty conflict relation, and the cd-relation is \(\{(\emptyset ,\emptyset )\}\gg \mathsf {a}\), \(\{(\emptyset ,\{\mathsf {a}\})\}\gg \mathsf {b}\) and \(\{(\emptyset ,\emptyset ), (\{\mathsf {a}\},\{\mathsf {b}\})\}\gg \mathsf {c}\).

Higher Order Causality: The comparison with event structures with higher-order dynamics of [14] is done indirectly, as these are equivalent to event structures with resolvable conflicts. In this approach the relations \(\lhd \) and \(\blacktriangleright \) are generalized to take into account set of modifiers, targets and contributions. The drawback is that the happening of an event implies a recalculation of these relation, similarly to what it is done in causal automata. In fact it is fairly obvious that given one simple step transition graph (meaning that a configuration is reached by another one adding just one event), it is always possible to obtain a cdes.

5 Conclusion

In this paper we have introduced a new brand of event structure where the main relation, the cd-relation, models the various conditions under which an event can be added to a subset of events. The relation is now defined as \(\gg \ \subseteq \mathbf {2}^{\mathsf {A}}\times \mathsf {E}\), where \(\mathsf {A} \subseteq \mathbf {2}^{\mathsf {E}}\times \mathbf {2}^{\mathsf {E}}\), thus it stipulates for each event which are the context-dependency pairs, but it can be easily generalized to subsets of events modeling precisely, when events happen together (as it is done in [23] or [26]). The focus is on the contexts in which an event can be added, which may change, rather that modeling the dependencies and how these may change. Here the choice is whether it is better to focus on dependencies (and how they may change) or on the context. The advantage of the latter is its generality, whereas the former may be useful in pointing out relations among events.

It should be clear that this kind of event structures is capable of modeling the same enabling situation for an event in various way, and it could be interesting to understand if there could be an informative way canonically. In fact, the canonical relation just focus on all the contexts in which an event can be added, and the dependency set is less informative. Thus finding a way to identify minimal contexts together with a set of dependencies may be useful, similarly to what it has been discussed when associating pes to cdes.

It remains to stress that cdes can be generalized not only allowing steps but also representing contexts in a richer way. Here we have considered contexts as subset of events, but they can have a richer structure. This would allow to characterize more precisely contexts, allowing, for instance, to drop the last requirement we have placed on dces, as in this case the order in which the modifiers appear may influence the dependencies. Finally we observe that the idea of context is not new, for instance they have been considered in [17] or in [4], and a comparison with these should be considered.

In this paper we have considered various event structures, still some interesting notions remained out of the scope of this paper, like reversible event structures [19], but we are confident that our approach can be used also in the reversibility setting.