A new operational representation of dependencies in Event Structures

The execution of an event in a complex and distributed system where the dependencies vary during the evolution of the system can be represented in many ways, and one of them is to use Context-Dependent Event structures. Event structures are related to Petri nets. The aim of this paper is to propose what can be the appropriate kind of Petri net corresponding to Context-Dependent Event structures, giving an operational flavour to the dependencies represented in a Context/Dependent Event structure. Dependencies are often operationally represented, in Petri nets, by tokens produced by activities and consumed by others. Here we shift the perspective using contextual arcs to characterize what has happened so far and in this way to describe the dependencies among the various activities.


Introduction
Since the introduction of the notion of Event structure ( [NPW81] and [Win86]) the close relationship between this notion and suitable nets has been investigated. The ingredients of an event structure are, beside a set of events, a number of relations used to express which events can be part of a configuration (the snapshot of a concurrent system), modeling a consistency predicate, and how events can be added to reach another configuration, modeling the dependencies among the (sets of) events. On the nets side we have transitions, modeling the activities, and places, modeling resources the activities may need, consume or produces. These ingredients, together with some constraints on how places and transitions are related (via flow, inhibitor or read arcs satisfying suitable properties), can give also a more operational description of a concurrent and distributed system. Indeed the relationship between event structures and nets is grounded on the observation that also in (suitable) Petri nets the relations among events are representable, as it has been done in [GR83] for what concern the partial order and [NPW81] for the partial order and conflict.
Since then several notions of event structures have been proposed. We recall just few of them: the classical prime event structures [Win86] where the dependency between events, called causality, is modeled by a partial order and the consistency is described by a symmetric conflict relation. Then flow event structures [Bou90] drop the requirement that the dependency should be a partial order on the whole set of events, bundle event structures [Lan93] represent OR-causality by allowing each event to be caused by a unique member of a bundle of events (and this constraint may be relaxed). Asymmetric event structures [BCM01], via notion of weak causality, model asymmetric conflicts, whereas Inhibitor event structures [BBCP04] are able to faithfully capture the dependencies among events which arise in the presence of read and inhibitor arcs in safe nets. In [BCP15] a notion of event structures where the causality relation may be circular is investigated, and in [AKPN18] the notion of dynamic causality is considered. Finally, we mention the quite general approach presented in [vGP09], where there is a unique relation, akin to a deduction relation. To each of the mentioned event structures a particular class of nets is related. Prime event structures have a correspondence in occurrence nets, flow event structures have flow nets whereas unravel nets [CP14] are related to bundle event structures. Continuing we have that asymmetric and inhibitor event structures have a correspondence with contextual nets [BCM01,BBCP04], and event structures with circular causality with lending nets [BCP15], finally to those with dynamic causality we have inhibitor unravel nets [CP17b] and to the configuration structures presented in [vGP09] we have the notion of 1-occurrence nets. Most of the approaches relating nets with event structures are based on the equation "event = transition", even if many of the events represent the same high level activity. The idea that some of the transitions may be somehow identified as they represent the same activity is the one pursued in many works aiming at reducing the size of the net, like merged processes ( [KKKV06]), trellis processes ( [Fab07]), merging relation approach ( [CP17a]) or spread nets ( [FP18] and [PF20]), but these approaches are mostly unrelated with event structure of any kind.
[ Pin19] and [Pin20b] propose the notion of context-dependent event structures as the event structure where (almost all) the variety of dependencies which may arise among events can be modeled. This is achieved using just one fairly general dependency relation, called context-dependency relation. Context-dependent event structure are more general than many kind of event structures, as proved in [Pin20b], with the exception of event structure with circular causality. It should however be observed that circular dependencies may be understood as dependencies where the justification for the happening of an event can be given at a later point, which is not the case of the kind of event structures considered in this paper, thus we may say that context-dependent event structure are more general than event structures where each event may happen if a complete justification for its happening is present. In this paper we address the usual problem: given an event structure, in our case a context-dependent event structures, which could be the kind of net which may correspond to it. To understand the characteristics of the net to be related to context-dependent event structures we first observe that in these event structures each event may happen in many different and often unrelated contexts, hence the same event cannot have (almost) the same past event up to suitable equivalences, as it happens in many approaches, e.g. in unravel nets, trellis processes or spread nets among others. The second observation, which has been used also in [Pin19] and [Pin20b], is that dependencies among transitions (events) in nets may be represented in different ways. The usual way to represent dependencies is using the flow relation of the net, and the dependency is then signaled by a shared place, but dependencies can be described also using contextual arcs, i.e. arcs testing for the presence or absence of tokens. Following these two observations we argue that each of the context that are allowing an event to happen can be modeled with inhibitor ( [JK95]) and/or read arcs ( [MR95]), yielding the notion of causal nets. It should be stressed that these kind of arcs have been introduced for different purposes, but never for nets which are meant to describe the behaviour of another one. Usually places in a net modeling the behaviour of a concurrent and distributed systems are seen as resources that one (or more) activities may produce and that are consumed by anothers. Instead of, in a causal net, we consider places as control points: they simply signal what events have been executed and thus the marking alone determines the configuration of the net, without the need of reconstructing which events have been executed before. This shift in perspective, namely considering places as control points rather than resources to be produced and consumed, gives further generality that can be used to model more composite relations. Indeed we observe that this idea has been used in [MMP21] to model the so called out of causal order reversibility when relating reversible prime event structures [PU15] and nets, which otherwise would have been impossible, as noticed in [MMP + 20].
We have also to stress that, having activities quite different contexts, it is natural to implement the same activity in different ways to reflect the different context. In causal nets, which are labeled nets, the same label may be associated to various transitions that have to be considered as the different incarnations of the same activity (label). This is precisely what it is done in unfoldings, the main difference being that in causal net we look at the event itself with different incarnations whereas in the classical approaches the event is identified with an unique incarnation.
The approach we pursue here originated in the one we adopted for dynamic event structures in [CP17b], though there the classical dependencies among events (those called causal dependencies) are represented using the standard machinery, namely using places as resources. There we also argued that the proper net corresponding to these kind of event structure, which are meant to give an operational representation of what denotationally is characterized by a single event, have to be represented as different transitions with the same label. The approach is a conservative one: the dependencies represented in other kinds on nets can be represented also in causal nets, possibly with some further constraint, and to suitably characterized causal nets it is possible to associate the corresponding contextdependent event structure. Indeed, we will show that causal nets are more general than occurrence and unravel nets. It should be stressed that the conflicts between events in causal nets are explicitly represented and cannot be inferred otherwise.
This paper is an extended and revised version of [Pin20a]. We have added some examples and compared the notion of causal net with other semantics net like occurrence nets and unravel nets, and we have made more precise the relationships among those. The constructions associating event structures and nets turn out to follow a common pattern once that the idea of dependency shifts from the classical produce/consume relationship toward the one where contextual arcs (testing positively or negatively but without consuming), giving in our opinion further evidence that this new operational view has a solid ground.
Organization of the paper. In the next section we recall the notions of contextual nets, on which the notion of causal net is based. Section 3 reviews the more classical approaches relating nets and event structures, namely occurrence net and prime event structure and also unravel net and bundle event structure. Furthermore the relationships occurrence netsprime event structures and unravel nets -bundle event structures are exhibited. In Section 4 we recall the notion of context-dependent event structure and we discuss how a canonical representation can be obtained. In Section 5 we introduce the notion of causal net and we show also how occurrence nets and unravel nets can be seen as causal nets. We also give a direct translation from prime event structures to causal net and vice versa. In Section 6 we discuss how to associate a causal net to a context-dependent event structure and vice versa, showing that the notion of causal net is adequate. Some conclusions end the paper.

Preliminaries
We denote with N the set of natural numbers. Given a set A with 2 A we denote the set of subsets of A and with 2 A fin the set of the finite subsets of A. Let A be a set, a multiset of A is a function m : A → N. The set of multisets of A is denoted by µA. A multiset m over A is sometimes written as m(a) · a and m(a) is the number of occurrence of a in m(a) · a. We assume the usual operations on multisets such as union + and difference −. ], we write a ∈ m to denote that m(a) = 0, and often confuse the multiset m with the set {a ∈ A | m(a) = 0} or a subset X ⊆ A with the multiset X(a) = 1 if a ∈ A and X(a) = 0 otherwise. Furthermore we use the standard set operations like ∩, ∪ or \.
Given a set A and a relation < ⊆ A × A, we say that < is an irreflexive partial order whenever it is irreflexive and transitive. We shall write ≤ for the reflexive closure of an irreflexive partial order <. Given an irreflexive relation ≺ ⊆ A × A, with ≺ + we denote its transitive closure.
Given a function f : Given a set A, a sequence of elements in A is a partial mapping ρ : N A such that, given any n ∈ N, if ρ(n) is defined and equal to a ∈ A then ∀i ≤ n also ρ(i) is defined. A sequence is finite if |dom(ρ)| is finite, and the length of a sequence ρ, denoted with size(ρ), is the cardinality of dom(ρ). A sequence ρ is often written as a 1 a 2 · · · where a i = ρ(i). With ρ we denote the codomain of ρ. Requiring that a sequence ρ has distinct elements accounts to stipulate that ρ is injective on dom(ρ). The sequence ρ such that dom(ρ) = ∅, the empty sequence, is denoted with . Finally with · we denote the concatenation operator that take a finite sequence ρ and a sequence ρ and gives the sequence ρ defined as ρ (i) = ρ(i) if i ≤ size(ρ) and ρ (i) = ρ (i − size(ρ)) otherwise.
Fixed a set L of labels, we recall that a net is the 4-tuple N = S, T, F, m where S is a set of places (usually depicted with circles) and T is a set of transitions (usually depicted as squares) and S ∩ T = ∅, F ⊆ (S × T ) ∪ (T × S) is the flow relation and m ∈ µS is called the initial marking. A labeled net is a net equipped with a labeling mapping : T → L.  Inhibitor arcs depicted as lines with a circle on one end, and read arcs as plain lines. We sometimes omit the mapping when L is T and is the identity. We will often call a contextual Petri net as Petri net or simply net. In the following figure a contextual Petri net is depicted.

Figure 1: A contextual Petri net
The arc connecting the place s 6 to the transition t 1 is a read arc, and the one connecting the place s 2 to the same transition is an inhibitor one.
Given a net N = S, T, F, I, R, m and x ∈ S ∪ T , we define the following (multi)sets: analogously, if x ∈ T then • x ∈ µS and x • ∈ µS. Given a transition t, with • t we denote the (multi)set {s | (s, t) ∈ I} and with t the (multi)set {s | (s, t) ∈ R}.
A transitions t ∈ T is enabled at a marking m ∈ µS, denoted by m [t , whenever . m(s) = 0. A transition t enabled at a marking m can fire and its firing produces the marking m = m − • t + t • . The firing of t at a marking m is denoted by m [t m . t and • t are the contexts in which the transition t may fire at a marking m provided that • t ⊆ m. t is the positive context as tokens must be present in the places connected to t with a read arcs whereas • t is a negative one as no token must be present in a place connected to a transition with an inhibitor arc. The tokens (or their absence) are just tested. In the net in Figure 1 the transition t 1 is enabled when the places s 1 and s 6 are marked and the place s 2 is unmarked. In particular the token in the place s 6 is just tested for presence, whereas the place s 2 is tested for the absence of a token.
We assume that each transition t of a net N is such that • t = ∅, meaning that no transition may fire without consuming some token, even if the contexts would allow it.
Given a generic marking m (not necessarily the initial one), the firing sequence (shortened as fs) of N = S, T, F, I, R, m starting at m is defined as the sequence (finite or infinite) m 0 [t 1 m 1 [t 2 m 2 · · · m n−1 [t n m n · · · such that for all i it holds that m i [t i+1 m i+1 and where m 0 = m. The set of firing sequences of a net N starting at a marking m is denoted by R N m and it is ranged over by σ. Given a fs σ = m [t 1 σ , we denote with start(σ) the marking m and, if the firing sequence σ is finite and σ = m [t 1 m 1 · · · m n−1 [t n m n , with lead (σ) we denote the marking m n . The length of a fs, written as len(σ), is defined as follows: len(σ) = 0 if σ = m, len(σ) = 1 + len(σ ) if σ = m [t σ and σ is a finite firing sequence, and len(σ) = ∞ otherwise. Given a fs σ = m 0 [t 1 m 1 [t 2 m 2 · · · m n−1 [t n m n · · · , with σ(i) we denote the fs m 0 [t 1 m 1 [t 2 m 2 · · · m i−1 [t i m i for all i less or equal to the length of the fs. Given a net N , a marking m is reachable iff there exists a fs σ ∈ R N m such that lead (σ) is m. The set of reachable markings of N is M N = {lead (σ) | σ ∈ R N m }. Definition 2.2. Let N = S, T, F, I, R, m, be a labeled contextual Petri net. Let σ = m [t 1 m 1 · · · m n−1 [t n m be a fs, then X σ = n i=1 {t i } is a state of N . The set of states is A state is just the multiset of the transitions that have been fired in a fs.
Definition 2.3. Let N = S, T, F, I, R, m, be a labeled contextual Petri net. The set of Thus a configuration is just the multiset of labels associated to a state. If the net belongs to a specific kind, say "net", we may add a subscript Conf net (N ) to stress that the set of configurations refers to this kind of net.
Given a fs σ, we can extract the sequence of the fired transitions. Formally tr(σ) = if len(σ) = 0 and tr(σ)  Figure 1. At the initial marking t 2 and t 3 are enabled whereas t 1 is not. After the execution of t 2 no other transition is enabled. After the firing of t 3 the transition t 1 is enabled, as no token is present in the place s 2 and a token is present in the place s 6 , the former being connected to transition t 1 with an inhibitor arc and the latter being connected to transition t 1 with a read arc. The states of this net are {t 2 } and {t 3 , t 1 }. Assume now that (t 1 ) = b and (t 2 ) = (t 3 ) = a, then the configurations are {a} and {a, b}. Finally the traces of this net are a and ab.
The following definitions characterize nets from a semantical point of view. In this paper we will consider safe nets, where each place contains at most one token. The following definitions outline nets with respect to states, configurations and traces. In a single execution net a transition t in a firing sequence may be fired just once, as the net in Example 2.5. In [vGP95] and [vGP09] these nets (without inhibitor and read arcs) are called 1-occurrence net, and the name itself stress this characteristic.
Definition 2.8. A net N = S, T, F, I, R, m, is said to be an unfolding if each configuration Clearly each unfolding is also a single execution net, but the vice versa does not hold. Observe that if the labeling of the unfolding is an injective mapping then states and configurations may be confused as Conf (N ) and St(N ) are bijectively related.
Remark 2.9. In literature unfolding is often used to denote not only a net with suitable characteristic (among them the fact that each transition is fired just once in each execution), but also how this net is related to another one (the one to be unfolded). Here we use it to stress that each configuration is a set and also to point out that the nets we are considering are labeled ones, and labels suggest that a labeled transition is associated to some activity, as it happens in classical unfoldings.
We consider two nets equivalent when they have the same set of transitions, the same labeling, and the same set of states (which means that they have also the same configurations and the same set of firing sequences). Though the equivalence relation on nets implies that the nets have the same firing sequences, it does not imply that the sets of reachable markings is the same, hence N ≡ N does not imply that M N = M N .
Observe that different traces may be associated to the same configuration of the net. In an unfolding the following propositions hold.
Proof. In an unfolding each configuration is a set, hence the thesis.
Proposition 2.12. Let N = S, T, F, I, R, m, be an unfolding. Then, for each X ∈ Conf (N ) there exists a trace ρ ∈ Tr(N ) such that ρ = X.
Proof. As X ∈ Conf (N ) then there is a fs σ such that X σ = X, and take ρ = tr(σ). By Proposition 2.11 it follows that ρ = X.
The following definition give a structural characterization of when two transitions, which we say are conflicting transitions, never happen together in any execution of a net.
In a conflict saturated net the fact that two transitions never happen in a state is also justified by the existence of a place in their preset, and this suggests that in certain kind of nets conflicts can be characterized structurally. Indeed each single execution net can be transformed into an equivalent one conflict saturated.
Proposition 2.14. Let N = S, T, F, I, R, m, be a single execution net. Let Confl (N ) be the set Proof. It is enough to prove that St(N ) = St(N # ). Observe first that the added places S # in N # do not have any incoming arcs and are initially marked. This implies that If len(σ) = 0 then lead (σ) = m and it suffices to set σ = m ∪ S # . Assume it holds for n and consider σ = σ 1 [t m of length n + 1. To If ¬lead ( σ 1 ) [t it should be that a conflicting transition t has been executed in σ 1 , but this implies that the conflicting transition has been executed in σ as well, which cannot be. Hence lead ( σ 1 ) [t and the reached marking is lead (σ) ∪ (S # \ • X σ ), which implies that X = X σ ∈ St(N # ). N # is then conflict saturated by construction, as the conflicting transitions in N # are the same as in N , and it equivalent to N as well.
A subnet of a net is a net obtained restricting places and transitions, and correspondingly restricting also the flow and the context relations as well as the initial marking and the labeling.
Definition 2.15. Let N = S, T, F, I, R, m, be a net and let T ⊆ T be a subset of transitions. Then the subnet generated by T is the net N | T = S , T , F , I , R , m , , where • F , I and R are the restriction of F , I and R to S and T , • m is the multiset on S obtained by m restricting to places in S , and • is the restriction of to transitions in T .
The subnet is generated by a subset T of transitions, hence the places to be considered are those connected with the transitions in T .

Nets and event structures
In this section we revise and the more classical relations between nets and event structures, in particular we recall the relationship between occurrence nets and prime event structures and the one between unravel nets and bundle event structures. Though the latter one is not entirely classic the notion of unravel net is closely related to the one of flow net and bundle event structures to flow event structures.
3.1. Occurrence nets and prime event structure. We recall the notion of occurrence net, and as it has no inhibitor or read arc nor a labeling, we omit I, R and in the following, assuming that I = ∅ = R and being the identity on transitions. Given a net N = S, T, F, m , we write < N for transitive closure of F . We say N is acyclic if ≤ N is a partial order. For occurrence nets, we adopt the usual convention: places and transitions are called as conditions and events, and use B and E for the sets of conditions and events. We may confuse conditions with places and events with transitions. The initial marking is denoted with c.
Definition 3.1. An occurrence net ( on) O = B, E, F, c is an acyclic, safe net satisfying the following restrictions: • ∀b ∈ B. • b is either empty or a singleton, and ∀b ∈ c.
• for all e ∈ E the set e = {e ∈ E | e ≤ O e} is finite, and • # is an irreflexive and symmetric relation defined as follows: e # 0 e iff e, e ∈ E, e = e and • e ∩ • e = ∅, The intuition behind occurrence nets is the following: each condition b represents the occurrence of a token, which is produced by the unique event in • b, unless b belongs to the initial marking, and it is used by only one transition (hence if e, e ∈ b • , then e # e ). On an occurrence net O it is natural to define a notion of causality among elements of the net: we say that x is causally dependent on y iff y ≤ O x. Occurrence nets are often the result of the unfolding of a (safe) net. In this perspective an occurrence net is meant to describe precisely the non-sequential semantics of a net, and each reachable marking of the occurrence net corresponds to a reachable marking in the net to be unfolded. Here we focus purely on occurrence nets and not on the nets they are the unfolding of. Proof. O is acyclic and safe, hence no transition in E can be executed more than once, hence it is a single execution one, and it is an unfolding as configuration and states coincide, being the labelling injective.
Occurrence nets are relevant as they are tightly related to prime event structures, which we briefly recall here ( [Win86]).
{e ∈ E | e < e} is finite, and • # ⊆ E × E is a conflict relation, which is irreflexive, symmetric and hereditary relation with respect to <: if e # e < e then e # e for all e, e , e ∈ E.
Given an event e ∈ E, e denotes the set {e ∈ E | e ≤ e}. A subset of events X ⊆ E is left-closed if ∀e ∈ X. e ⊆ X. Given a subset X ⊆ E of events, X is conflict free iff for all e, e ∈ X it holds that e = e ⇒ ¬(e # e ), and we denote it with CF(X). Given X ⊆ E such that CF(X) and Y ⊆ X, then also CF(Y ).
Definition 3.4. Let P = (E, <, #) be a pes. Then X ⊆ E is a configuration if CF(X) and ∀e ∈ X. e ⊆ X. The set of configurations of the pes P is denoted by Conf pes (P).
Occurrence nets and prime event structures are connected as follows ( [Win86]). Proofs are omitted as they are standard and can be found in literature. . Also the vice versa is possible, namely given a prime event structure one can associate to it an occurrence net. The construction is indeed quite standard (see [Win86,BCP15] among many others).
Definition 3.6. Let P = (E, ≤, #) be a pes. Define N on pes (P) as the net B, E, F, c where Proposition 3.7. Let P = (E, ≤, #) be a pes. Then N on pes (P) = B, E, F, c as defined in Definition 3.6 is an on, and Conf pes (P) = Conf on (N on pes (P)) In essence an occurrence net is fully characterized by the partial order relation and the saturated conflict relation. This observation, together with the fact that an immediate conflict in a safe net is represented by a common place in the preset of the conflicting events, suggests that conflicts may be modeled directly, which is the meaning of the following proposition.
Proposition 3.8. Let O = B, E, F, c be an on and let # be the associated conflict relation.
is an on such that Conf on (O) = Conf on (C # ). Proof. Along the same lines of Proposition 2.14.
3.2. Unravel nets and bundle event structure. We recall the notion of unravel net ([Pin11, CP14, PF20] or [CP17b]). Similarly to on, also unravel nets do not have inhibitor arcs or read arcs, and the labeling is injective, hence also here I, R and are omitted. We say that a net N = S, T, F, m is conflict-free if ∀s ∈ S it holds that s • is at most a singleton, and it is acyclic if the reflexive and transitive closure of F is a partial order over S ∪ T . As we are considering safe nets we will confuse multisets with sets.
Definition 3.9. An unravel net ( un) U = S, T, F, m is a safe net such that • for each state X ∈ St(U ) the net U | X is acyclic and conflict-free, and Thus the whole unravel net is not constrained to be either acyclic or conflict-free, but each of its executions gives an acyclic and conflict-free net. uns can be considered as the easiest generalization of occurrence nets, and indeed the following proposition shows that ons are uns as well, as each execution of an on is clearly acyclic (as the whole on is acyclic) and conflict-free. The firability of each event in an occurrence net is a consequence of the structural constraint posed on this kind of net. Proof. A on O is by definition acyclic, and if one consider a configuration, the subnet generated by the transitions (events) in this configuration gives a conflict-free one. Finally each transition (event) belongs to a configuration as each place (condition) is connected to an initially marked one.
The followings propositions will be helpful in associating a bes to an un. Proof. Assume • s = ∅, then there exists a transition t ∈ T such that t ∈ • s. Now, as U is an unravel net, t can be executed, hence there exists a fs σ such that σ [t m . We have two cases: (1) each transition t in σ is such that s / ∈ • t , but then m (s) = 2, contradicting the safeness of U , or (2) there is a transition t in σ such that s ∈ • t , but then U | [[Xσ]] is cyclic, contradicting the hypothesis that U is an unravel net.
Proposition 3.12. Let U = S, T, F, m be an un, then U is a single execution net.
Proof. Assume it is not, then there exists a state X ∈ St(U ) and a transition t ∈ T such that X(t) > 1. This implies that there is a fs σ such that should put a token in a place s ∈ • t, contradicting the assumption that U is an unravel net.
Given an un U = S, T, F, m , we define a semantic conflict relation, and we say that ]. Note that this semantic conflict relation has already been implicitly used in showing how to construct an equivalent conflict saturated net. The following two propositions say that two transitions in an un are in conflict if they have a common place either in their presets or in their postsets. The common place in the preset suggests that their conflict is immediate, the common place implies that only one of the two transitions can belong to the history (firing sequence) marking that place, as the proof itself shows.
Proposition 3.13. Let U = S, T, F, m be an un, let s ∈ S be a place and t, t ∈ T be two transitions of the un.
is not acyclic, in both cases contradicting the assumption that U is an unravel net.
Proposition 3.14. Let U = S, T, F, m be an un, and let t, t ∈ T be two transition of the un.
Using the same argument of Proposition 3.13 we have that s would get marked twice violating the acyclicity of U | We recall now the notion of bundle event structures [Lan93] (bes). In a bes causality is represented by pairs (X, e), the bundles, where X is a non empty set of events and e ∈ X an event. The meaning of a bundle (X, e) is that if e happens then one (and only one) event of X has to have happened before (events in X are pairwise conflicting). An event e can be caused by several bundles, in that case, for each bundle an event in it should have happened.
• # is an irreflexive and symmetric binary relation on E (the conflict relation), fin × E is the enabling relation such that if X → e then for all e 1 , e 2 ∈ X. e 1 = e 2 implies e 1 # e 2 , and • for each e ∈ E it holds that the set {X | X → e} is finite.
The final condition is an analogous of the finite cause requirement for prime event structures. Indeed this requirement rules out situations like the following one. Consider an event s such that ∀i ∈ N there is a bundle {e i } → e. Then the event e has infinite causes which we want to rule out.
The configurations of a bes are defined as follows.
Definition 3.16. Let B = (E, →, #) be a bes and X ⊆ E be a set of events. Then X is a configuration of B iff (1) it is conflict free, i.e. ∀e, e ∈ X. e = e ⇒ ¬(e #e ), and (2) there exists a linearization {e 1 , . . . , e n , . . . } of the events in X such that ∀i ∈ N and for all bundles X j i → e i it holds that X j i ∩ {e 1 , . . . , e i−1 } = ∅. The set of configurations of a bes B is denoted with Conf bes (B).
The requirements are the usual ones: it must be conflict free and each event must have all of its causes. The causes of an event in a bes, as said before, have to be chosen using all the bundles involving the event. Clearly bes are a conservative extension of pes. Indeed each pes P = (E, ≤, #) can be seen as the bes stipulating that the bundles are →= {({e }, e) | e < e}. bes are more expressive than pes, as they are able to model or -causality. In fact we may have the following bes a # b (symmetric pair omitted) and {a, b} → c stipulating that the same event may have two different and alternative pasts, namely one containing a and the other b.
Like pes and on, also bes and un are closely related. The intuition is rather simple: to each place in the preset of a transition t we associate a bundle X for the correspondent event t in the event structure, and the bundle is formed by the transitions putting a token in that place.
Proposition 3.17. Let U = S, T, F, m be an un, then E bes Furthermore Conf un (U ) = Conf bes (E bes un (U )). Proof. We show that E bes un (U ) is indeed an bes. The conflict relation in E bes un (U ) is antisymmetric and irreflexive because it is so in U . Since we are are dealing with unravel nets, all the transitions putting tokens in the same place are in conflict, so the bundles respect Definition 3.15. We show that Conf un (U ) = Conf bes (E bes un (U )). Consider X ∈ Conf un (U ), then there is a fs σ such that X σ = X and for each i ∈ dom(tr(σ)) we have that σ(i − 1)(s) = 1 for each s ∈ • t i . It is easy to see that tr(σ) is a configuration of E bes un (U ) as for each i ∈ dom(tr(σ)) it holds that tr(σ)(i − 1) ∩ • s = ∅ for each • s → t i . Conflict-freeness is trivial. Let σ be a fs of N un bes (B) and be tr(σ) = e 1 e 2 e 3 · · · e n · · · the associated trace. By induction on the indexes in dom(tr(σ)) we show that N un bes (B)| X where X = X σ(i) is a conflict-free causal net.
• The empty trace gives a trivial net (a net without places and transitions) which is vacuously a conflict-free causal net, • consider the trace tr(σ(n))e 1 · · · e n−1 e n and let tr(σ(n)) be the state {e 1 , . . . , e n−1 e n } associated to tr(σ(n)). As tr(σ(n − 1)) = e 1 · · · e n−1 is a trace as well, by inductive hypothesis N un bes (B)| tr(σ(n−1)) = S n−1 , E n−1 , F n−1 , m n−1 is a conflict-free causal net where S n−1 = • tr(σ(n − 1)) ∪ tr(σ(n − 1)) • , E n−1 = tr(σ(n − 1)), F n−1 is the restriction of F to the transitions in E n−1 and the places in S n−1 , and m n−1 is the restriction of m to and assume that a place s in e n • already belongs to S n−1 . Then s must be a place of the kind (Y, e i ), for some e i ∈ tr(σ(n − 1)), but then there must be a e j in tr(σ(n − 1)) such that e j ∈ Y , which this contradicts the fact that tr(σ(n − 1)) is conflict-free as e j # e i . So e n cannot mark places already marked in the past, and the subnet N un bes (B)| is a conflict-free causal net.
The proof that Conf bes (B) = Conf un (N un bes (B)) goes along the same reasoning of the previous proposition.

Context-Dependent Event Structure
We recall the notion of Context-Dependent event structure introduced in [Pin19] and further studied in [Pin20b]. The idea is 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. Context-Dependent event structures are characterized by a novel context-dependency relation which subsumes all the others dependency relations studied in literature. In presenting them we follow closely the approach taken in [Pin19] and [Pin20b], thus we present them in their full generality and then show that the context-dependency relation can have a suitable and simpler form, yielding the notion of elementary cdes.
• E is a set of events, • # ⊆ E × E is an irreflexive and symmetric relation, called conflict relation, and , is a relation, called the context-dependency relation ( cd-relation), which is such that for each Z e it holds that -Z = ∅ and |Z| is finite, for each (X, Y ) ∈ Z it holds that CF(X) and CF(Y ), and 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). The idea conveyed by this relation is originated by the possibility that dependencies of an event may vary, e.g. growing or shrinking depending on the happening of suitable modifiers, like in the event structures presented in [AKPN15,AKPN18], or like what happen in [vGP04] where conflicts can be resolved. The cd-relation is capable of modeling this dynamicity. We will later see that this dynamicity can be represented in suitable nets with contextual arcs. The requirement posed on the are rather few. The first one is that for Z e the set Z is finite and not empty. The finiteness requirement mimics the usual requirement that an event has a finite set of causes, whereas the non emptiness is justified by the fact that an event need a context to happen, and though the context may be the empty one, it should in any case be present. The second is again rather obvious, contexts must be conflict-free subset of events. For the last one the intuition is that for each context, the other component should be unique. The few constrains posed on the relation have the drawback that this relation can be less informative. We now recall the notion of enabling of an event. We have to determine, for each Z 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 Z e, where Z = {(X 1 , Y 1 ), . . . , (X n , Y n )}, with Cxt(Z) we denote the set of events |Z| i=1 X i , and this is the one regarding Z e.
Definition 4.2. Let E = (E, #, ) be a cdes and C ⊆ E be a subset of events. Then the event e ∈ C is enabled at Observe that requiring the non emptiness of the set Z in Z e guarantees that an event e may be enabled at some subset of events.
Definition 4.3. Let E = (E, #, ) be a cdes. Let C be a subset of E. We say that C is a configuration of the cdes E iff there exists a sequence of distinct events ρ = e 1 e 2 · · · over E such that With Conf cdes (E) we denote the set of configurations of the cdes E.
We illustrate this kind of event structure with some examples, mainly taken from [Pin19] and [Pin20b].  These examples should clarify how the cd-relation is used and also that each event may be implemented by a different pair (X, Y ) of modifiers and dependencies.
In [Pin19] and [Pin20b] we have shown that many event structures can be seen as a cdes, and this is obtained taking the configurations of an event structure and from these synthesizing the conflict and the relations. To characterize how the configurations of a cdes are organized we recall the notion of event automaton [PP95].
Definition 4.7. Let E be a set of events. An event automaton over E ( ea) is the tuple A = E, S, , s 0 such that • S ⊆ 2 E , and • ⊆ S × S is such that s s implies that s ⊂ s . s 0 ∈ S is the initial state.
An event automaton is just a set of subsets of events and a reachability relation with the minimal requirements that if two states s, s are related by the relation, namely s s , then s is reached by s adding at least one event.
In [Pin19,Pin20b] we have proven that, given a cdes E = (E, #, ), the quadruple E, S, , s 0 , where S = Conf cdes (E), ⊆ Conf cdes (E) × Conf cdes (E) is such that C C iff C \ C = {e} and s 0 = ∅, is an ea. The event automaton associated to E is denoted with A(E).
With the aid of ea we can establish when two cdes are equivalent.
Definition 4.8. Let E = (E, #, ) and E = (E , # , ) be two cdes. Then E is equivalent to E , written as E ∼ = E , whenever E = E and A(E) = A(E ).
We list some property an ea may enjoy.
Definition 4.9. Let A = E, S, , s 0 be an ea. We say that A is simple if ∀e ∈ E. ∃s ∈ S such that s ∪ {e} ∈ S, s s ∪ {e} and s ∈ 2 E fin . In a simple event automaton, for each event, there is a finite state such that this can be reached by adding just this event.
On states of an ea we can define an operator reach(X) = {s 0 }∪{s ∈ S | ∃s ∈ X. s s }, and this is clearly a monotone and continuous operator on subset of states, hence we can calculate the least fixed point of it, namely lfp(reach) Definition 4.10. Let A = E, S, , s 0 be an ea. We say that the event automaton A is complete iff lfp(reach) = S.
In a complete ea each state is reachable from the initial one.
Definition 4.11. Let A = E, S, , s 0 be an ea. We say that A is finitely caused if ∀e ∈ E. ∃C(A, e) = {X 1 , . . . , X n } such that each X i ∈ 2 E fin and ∀s ∈ S. if s s ∪ {e} then ∃X ∈ C(A, e) and X ⊆ s. In a finitely caused ea each event that can be added to a state has a finite number of justifying subsets, which again resemble a kind of finite causes principle. We observe that in a finitely caused ea A the sets C(A, e) can be effectively calculated.
Beside the notion of finitely caused we have to stipulate that an event cannot be inhibited in different infinite ways: we want to rule out the case that the event e is such that Z e with Z infinite, as it would be, for instance, in an ea with states ∅, i∈N {e i } and i∈N {e i , e} with defined as ∅ {e i } and {e i } {e i , e}. In this ea the event e can be added to each singleton state, and the unique context allowing it would be the empty one, and these states are infinite.
Definition 4.12. Let A = E, S, , s 0 be an ea. We say that A is finitely inhibited if ∀e ∈ E the set I(A, e) = {s ∈ S | e ∈ s ∧ ∃s ∈ S. s ∪ {e} ⊆ s ∧ ∀s ∈ S. e ∈ s ⇒ ¬(s s )} is finite.
The intuition behind a finitely inhibited ea A is the indeed the one hinted before: the number of states s where an event e cannot be added but there is another containing both the events in s and e is finite.
Proposition 4.13. Let E = (E, #, ) be a cdes and let A(E) be the associated ea. Then A(E) is simple, complete, finitely caused and finitely inhibited.

Proof. A(E)
is simple as each event e belongs to a configuration C and to C a sequence ρ = e 1 e 2 · · · is associated. Assume e is e i then ρ i−1 is a state and ρ i−1 ρ i−1 ∪ {e}. Completeness depends on the fact that each configuration is reachable. The fact that it is finitely caused depends on the finiteness of Z. The finiteness of Z for each event in the relation implies also that A(E) is finitely inhibited as otherwise there would be infinite states where an event can be added and these states have nothing in common, which contradicts the fact that A(E) is finitely caused.
On the events of an ea it is easy to define an irreflexive and symmetric conflict relation.
Definition 4.14. Let A = E, S, , s 0 be an ea. We define a symmetric and irreflexive conflict relation # ea as follows: e # ea e iff for each s ∈ S. {e, e } ⊆ s.
We show how to associate to an ea a cdes. Proof. Along the same line of Theorem 4.12 of [Pin20b].
We show here that it is possible to obtain the relation where for each event e there is just one entry Z e.   Proof. It is enough to observe that the cdes obtained in Theorem 4.15 is an elementary one.
We assume that the cdes we will consider are elementary ones.

Causal nets
We introduce a notion that will play the same role of occurrence net or unravel net when related to context-dependent event structure. Given a contextual Petri net N = S, T, F, I, R, m, , we can associate to it a relation on transitions, denoted with ≺ N and defined as t ≺ N t when • t ∩ • t = ∅ or t • ∩ t = ∅, with the aim of establishing the dependencies among transitions related by inhibitor or read arcs. Similarly we can introduce a conflict relation among transitions, which is a semantic one. For this is enough to stipulate that two transitions t, t ∈ T are in conflict, denoted With the aid of these relations we can introduce the notion of pre-causal net.
Definition 5.1. Let N = S, T, F, I, R, m, be a labeled Petri net over the set of label L. Then N is a pre-causal net (pcn net) if the following further conditions are satisfied: The first requirement implies that ∀t, t ∈ T we have that t • ∩ • t = ∅, hence in this kind of net the dependencies do not arise from the flow relation, furthermore inhibitor and read arcs do not interfere with the flow relation. The second condition implies that if a token in a place inhibits the happening of a transition, then all the transitions removing this token have the same label, the third is meant to avoid cycles between transitions arising from inhibitor and read arcs, the fourth one implies that for each transition t the set {t ∈ T | t ≺ U t} is finite, the fifth one stipulates that two conflicting transitions (which never appear together in any execution of the net) consume the same token from a place, and the last one that two different transitions bearing the same label are in conflict.
Example 5.2. Consider the net below. It is a pcn. Condition (2) of the definition is fulfilled as, for instance, considering • t 4 = {s 3 , s 1 }, we have that all the transitions in s 1 • have the same label, and similarly for the unique transition in s 3 • . Condition (3) is fulfilled as we have, e.g., t 1 ≺ t 3 as t 3 • ∩ t 1 = ∅, t 1 ≺ t 4 as • t 1 ∩ • t 4 = ∅, and t 2 ≺ t 4 as • t 2 ∩ • t 4 = ∅, but never the vice versa. Also the other conditions are easily checked. Based on the notion of pcn we can introduce the one of causal net.
Definition 5.3. Let K = S, T, F, I, R, m, be a pre-causal net over the set of label L.
The added conditions with respect to the ones in Definition 5.1 implies that the executions of the transitions in a fs is compatible with the dependency relation when the transitions in the state associated to the fs are considered, and each transition can be executed. The pcn in Example 5.2 is a cn as each transition can be executed and the transitive closure of the ≺ relation is a partial order on states.
From the previous example it should be clear that the conditions posed on pre-causal nets and causal nets are meant to mimic some of the conditions posed on an occurrence nets (e.g. finiteness of causes) or on similar one, like for instance unravel nets or flow nets ( [Bou90]), e.g. that when considering an execution, an order can be found among the various transitions, and they should assure that it is comprehensible what a computation in such a net can be looking at labels, as the main intuition is that for the same activity (label) there may be several incarnations. In fact, differently from ons and uns, the labeling mapping is not necessarily the identity and if two transitions share a place, then they are in conflict.
Example 5.4. The following one is a causal net: All the conditions of Definitions 5.1 and 5.3 are fulfilled. The two transitions bearing the same label (t 2 and t 3 ) are conflicting ones, namely they never appear together in any computation though the activity realized by these two transitions (c) appears in all maximal computations.
The first observation we make on causal nets is that they are good candidates to be seen as a semantic net, namely a net meant to represent the behaviour of a system properly modeling dependencies and conflicts of any kind. Proposition 5.5. Let K = S, T, F, I, R, m, be a causal net. Then K is conflict saturated.
Proof. A pre-causal net is conflict saturated by construction, as it is required that two conflicting transitions share a place in their presets.
Proposition 5.6. Let K = S, T, F, I, R, m, be a causal net. Then K is an single execution net.
Proof. Obvious, as ∀t, t ∈ T it holds that t • ∩ • t = ∅ hence once that a transition is executed the places in its preset cannot be marked again.
Proposition 5.7. Let K = S, T, F, I, R, m, be a causal net. Then K is an unfolding.
Proof. The transitions bearing the same label are in conflict, hence the thesis.
In the following we show that classical notions like occurrence nets or unravel nets can be seen as causal ones, showing that this notion is adequate to be related to prime or bundle event structures. In the next section we will see that it is also suitable to be related to cdes as well.
5.1. Occurrence nets and causal nets. We show that each occurrence net can be turned into a causal one, thus this is a conservative extension of this notion. The idea behind the construction is simple: to each event of the occurrence net a transition in the causal net is associated, the places in the preset of all transitions are initially marked and they are not in the postset of any other transition. The dependencies between events are modeled using inhibitor arcs. All the conflicts are modeled like in a conflict saturated net (with suitable marked places). Proof. First we recall that the labeling mapping is the identity, therefore states and configurations coincide. An easy inspection show that the conditions of Definition 5.1 are fulfilled by construction. Consider X ∈ St(G on (O)) and assume that ≺ * Gon(O) is not a partial order. Then we have that for some e, e ∈ [[X]], with e = e we have that e ≺ * Gon(O) e and e ≺ * Gon(O) e. Without loss of generality we can assume that e ≺ Gon(O) e and e ≺ Gon(O) e, but as G on (O) is a pre-causal net by construction, this is impossible. G on (O) satisfies also the other requirement of Definition 5.3, as clearly each transition can be executed. Assume that there is a transition e in G on (O) which is never executed, but it is in O, as the latter is an occurrence net. As e is executable in O there is a firing sequence σ = σ [e m and the trace associated to this fs tr(σ) is such that tr(σ) = e . Now assume that for each i < size(tr(σ)) it holds that tr(σ)(i) = e i can be executed also in G on (O), and • e in G on (O) contains precisely the places {(e i , * ) | e i ∈ tr(σ)}, which implies that also e is executable in G on (O). To show that Conf on (O) = Conf cn (G on (O)) we prove that if X ∈ Conf on (O) then m − • X + X • is a reachable marking in G on (O). The proof is done by induction of the size of X. If X is the emptyset then we are done. Assume it holds for size(X) = n, hence m = m− • X +X • is a reachable marking in G on (O). Consider now the configuration X ∪{e} for some e ∈ E. As it is a configuration we know that e ⊆ X, hence for all e ∈ e we have that m (( * , e)) = 0, hence m [e (m − • e ∪ e • ), which means that to X ∪ {e} ∈ Conf on (O) a reachable marking in G on (O) corresponds, and the thesis holds. The vice-versa, namely that if X ∈ Conf cn (G on (O)) then also X ∈ Conf on (O), is proved analogously.
Below we depict a simple occurrence net (on the left) and the associated causal one. The causal net on the right is conflict saturated.
Dependencies in a causal net corresponding to an occurrence net are here represented with inhibitor arcs, but an alternative choice would have been to use read arcs instead. Thus if e < O e in the occurrence net, instead of stipulating the existence of an inhibitor arc connecting the place ( * , e) to the transition e, one can introduce a read arc from the place (e, * ) to the transition e.
The obvious consequence of the previous Proposition is the following one.
Proposition 5.9. Let O be an occurrence net and G on (O) be the associated causal net. Then G on (O) is an unfolding.
We remark that in a causal net, it is a bit more tiring to dig out dependencies with respect to what happens in an occurrence net.
The causal nets corresponding to occurrence nets have some further characteristic. In fact the dependency relation ≺ and the conflict relation have a particular shape.
Definition 5.10. Let K = S, T, F, I, R, m, be a causal net. K is said to be an occurrence causal net whenever R = ∅, is injective, ≺ * K is a partial order over T , and if t # K t ≺ * K t then t # K t .
The above definition simply guarantees that the dependencies give a partial order and that the conflict relation is inherited along the reflexive and transitive closure of the dependency relation. occurrence net O, thus ≺ * Gon(O) is a partial order as < is a partial order. As G on (O) is conflict saturated, it is clear that conflicts are inherited along the ≺ * Gon(O) relation.

5.2.
Causal nets and prime event structure. Proposition 5.8, together with the connection among pes and on (Definition 3.6 and Proposition 3.7), suggests that a relation between pes and cn can be established. Here the intuition is to use the same construction hinted in Proposition 5.8. Proposition 5.13. Let P be a pes, and N cn pes (P) be the associated Petri net. Then N cn pes (P) is a causal net and Conf pes (P) = Conf cn (N cn pes (P)). Proof. Trivial, by observing that N cn pes (P) is the same construction of Proposition 5.8. The construction gives an occurrence causal net.
Proposition 5.14. Let P be a pes, and N cn pes (P) be the associated Petri net. Then N cn pes (P) is an occurrence causal net.
Proof. Easy inspection of the construction in Definition 5.12.
We show that also the vice versa is feasible provided that we restrict our attention to occurrence causal net.
Proposition 5.15. Let K = S, T, F, I, R, m, be an occurrence causal net. Then E pes cn (K) = (T, ≺ + K , # K ) is a pes, and Conf cn (K) = Conf pes (E pes cn (K)). Proof. We have just to show that Conf cn (K) = Conf pes (E pes cn (K)), as ≺ + K is a partial order being K an occurrence causal net and it is inherited along the conflict relation # K . Take X ∈ Conf cn (K), then we have that X is conflict free and for each t ∈ X it holds that all the transitions t ≺ K t have been executed as t = s • for s ∈ • t, but this account to say that t ⊆ X and this prove that X ∈ Conf pes (E pes cn (K)) as well. For the other inclusion, consider X ∈ Conf pes (E pes cn (K)). X can be seen as the sequence t 1 t 2 t 3 . . . compatible with ≺ K . Take t n ∈ X, we show that m n [t n where m n = m − • {T 1 , . . . , t n−1 } + {T 1 , . . . , t n−1 } • . For all t ∈ t n we have that m n (s) = 0 for s ∈ • t and as t ∈ t n we have that there is an inhibitor arc from an s ∈ • t and t, but then m n [t n , and the thesis follows.
An important consequence of this proposition is that we can associate an occurrence net to an occurrence causal one, simply by associating to the occurrence causal net the corresponding pes as in Proposition 5.15 and then apply the construction in Definition 3.6. The following theorem indeed assures that the notion of (occurrence) causal net is adequate as the notion of occurrence net with respect to the classical notion of occurrence net in the relationship with prime event structure.
Theorem 5.17. Let K be an occurrence causal net and P be a prime event structure. Then K ∼ = N cn pes (E pes cn (K)) and P ≡ E pes cn (N cn pes (P)). Proof. By Propositions 5.13 and 5.15.

Unravel nets and causal nets.
In an unravel net the same transitions may have various causes, conflicting one. In a causal net we may have various incarnations of the same activity, depending on different contexts. In associating a causal net to an unravel one U we have to establish, for each transition in U , the possible sets of causes.
Definition 5.18. Let U = S, T, F, m be an un, and let t ∈ T be a transition. Then the set We add the ∅ when t does not depend on any other occurrence of a transition. We show how to associate a causal net to an unravel one. The idea is to create a copy of the transition t for each of its possible dependencies in the unravel net, and each of these dependencies are then implemented with inhibitor arcs.
Proposition 5.19. Let U = S, T, F, m be an un. The net G un (U ) = S, T , F , I, ∅,m, where •m : S → N is such thatm(s) = 0 if s = (t, * ) andm(s) = 1 otherwise, and • (t, −) = t is the labeling mapping, is a causal net over the set of label T , and Conf un (U ) = Conf cn (G un (U )).
Proof. We check the various conditions of Definitions 5.1 and 5.3. We start with the ones of Definition 5.1. Conditions (1), (3) and (5) are trivially satisfied by construction. For the second condition, take any transition (t, Y ) ∈ T , with t ∈ T and Y ⊆ T and Y = ∅, and consider s ∈ • (t, Y ). We have that s is of the form ( * , t ) for some t ∈ Y . Clearly s • = {(t , Y 1 ), . . . (t , Y k )} and (s • ) = {t }, thus | (s • )| = 1. Given a t ∈ T , finiteness of • t derives by the fact that in the un U there is no place with infinite incoming arcs, and the last condition follows by the fact that equally labeled transitions t and t in T share a common input place: ( * , (t)).
To show that Conf un (U ) = Conf cn (G un (U )) we proceed as follows: consider σ a fs in U and X the corresponding state. We show that there is a fs σ in G un (U ) such that tr(σ) = tr( σ). In particular we prove that if σ = σ [t σ then there is a transition (t, Y ) such that σ = σ [(t, Y ) σ with tr(σ ) = tr( σ ). By induction on the length of the firing sequence σ , we have that if len(σ ) = 0 then σ = m and consider t enabled at m. Then σ =m and (t, ∅) is clearly enabled at this marking. Consider then σ , tr(σ ) and a transition t enabled at lead (σ ), we have that for exactly one Y ⊆ tr(σ ) it holds that (t, Y ) is enabled at the marking lead ( σ ) as the transitions in Y are those that have marked the preset of t in U . A similar argument show that to each firing sequence σ in G un (U ) a firing sequence σ in U corresponds and tr(σ) = tr( σ). Thus Conf un (U ) = Conf cn (G un (U )).
Example 5.20. Below we depict a simple unravel net (on the left) and the associated causal one. On a cn net we can define a conflict relation involving the labels. Given the cn K = S, T, F, I, R, m, over the set of labels L, we say that a b whenever ∀t ∈ −1 (a) ∀t ∈ −1 (b). t # t : in this conflict relation, defined on labels, we represent the fact that all the possible incarnations of the activities a and b are in conflict.
The cn obtained from an unravel net has a peculiar shape when looking at the contextual arcs representing the dependencies: inhibitor arcs connecting places and transitions are such that the places have no incoming arcs. Furthermore two equally labeled transitions t and t are inhibited by the same number of transitions and the labels of these inhibiting transitions are either in conflict or they are the same.
Definition 5.21. Let K = S, T, F, I, R, m, be a cn over the set of labels L, we say that K is plainly caused whenever The cns obtained either by an on or by an un are plainly caused (we have already observed that an occurrence net is an unravel net as well).
Proposition 5.22. Let U be an un and G un (U ) be the associated cn. Then G un (U ) is plainly caused.
Proof. The first three conditions are clear by the construction in Proposition 5.19, and for the last one it is enough to observe how Caus(t) is formed. Given a label a ∈ L and a cn K = S, T, F, I, R, m, , the set of the possible dependencies of the transitions t ∈ −1 (a) is defined as PD(a) = { (s • ) | s ∈ • t ∧ t ∈ −1 (a)}. Given an event a, this set contains all the labels (events) that should have happened in order to allow to one of the transitions labeled with a to occur. From this set it is possible to extract maximal subsets of conflicting labels, which we denote with MaxB(a) = {Y ⊆ PD(a) | ∀b, b ∈ Y. b b ∧ Y is maximal}. Maximality is required as otherwise some events would not occur in the associated bes as the required dependency has been left out. Observe that maximality is required as otherwise one could infer, e.g., {a} → c, which is not correct.
Proposition 5.24. Let K = S, T, F, I, R, m, be a plainly caused cn over the set of labels E. Then E bes cn (K) = (E, →, ) where Y → e whenever Y ∈ MaxB(e) is a bes, and Conf cn (K) = Conf bes (E bes cn (K)). Proof. Along the same lines as Proposition 5.15. E bes cn (K) is a bes as each Y ∈ MaxB(e) is made of conflicting events, and the conflict relation is irreflexive and symmetric by construction. To show that the configurations coincide, consider X ∈ Conf cn (K), and assume that X = X σ for some σ ∈ R K m . To prove that X ∈ Conf bes (E bes cn (K)) as well, we take tr(σ). Clearly tr(σ)(1) = e 1 is such that PD(e 1 ) = ∅ as K is plainly caused, hence {e 1 } ∈ Conf bes (E bes cn (K)). Assume now that σ = σ [t σ and that tr(σ ) ∈ Conf bes (E bes cn (K)), we have to show that Y ∈ MaxB( (t)) is such that Y ∩ tr(σ ) = ∅, but this is clearly true as Y ∈ MaxB( (t)) and because the set of inhibition has the same number of elements for each incarnation of (t). Conflicting events cannot be added, hence the thesis. The other inclusion holds with the same reasoning.
Given a bes B define N cn bes (B) as G un (N un bes (B)). Then also the following theorem holds. Theorem 5.25. Let K be an plainly caused causal net and B be a bundle event structure. Then K ∼ = N cn bes (E bes cn (K)) and B ≡ E bes cn (N cn bes (B)). Proof. By Propositions 5.19 and 5.24.

Context-dependent event structures and causal nets
We are now ready to relate Context-dependent event structures and causal nets. We recall that in a Context-dependent event structure each event may happen in different context and thus each happening has a different operational meaning. Therefore we model each happening with a different transition and all the transitions representing the same happening bear the same label. Dependencies are inferred using inhibitor and read arcs, as it will be clear. We introduce a transition (e, X, Y ) for each pair (X, Y ) of the entry associated to the event e, and all these transitions are labeled with the same event e. All these transitions consume the token present in the place ( * , e) and put a token in the place (e, * ), thus just one transition labeled with e can be fired in each execution of the net. Recall that the event e is enabled at a configuration C (here signaled by the places (e , * ) marked) if, for some (X, Y ) ∈ Z, it holds that Cxt(Z e) ∩ C = X and Y ⊆ C. The inhibitor arcs assure that some of the events in Cxt(Z e) have actually happened (namely the one in X) but the others (the ones in Cxt(Z e) \ (X ∪ Y )) have not, and the Y are other events that must have happened and this is signaled by read arcs. We cannot require Cxt(Z e) \ X as some of the events there may be present in Y . The net obtained from a cdes using Definition 6.1 is indeed a causal net, and furthermore it is also conflict saturated.
Proposition 6.5. Let E be an elementary cdes, and N cn cdes (E) be the associated contextual Petri net. Then N cn cdes (E) is a causal net and Conf cdes (E) = Conf cn (N cn cdes (E)). Proof. We proceed along the same line as in the proof of Proposition 5.19 and we check the various conditions of Definitions 5.1 and 5.3. Conditions (1), (3) and (5) of Definition 5.1 are again satisfied by construction. For the second condition, take any transition t = (e, X, Y ) ∈ T , with e ∈ E and X, Y ⊆ E. Consider s ∈ • t. We have that s is of the form ( * , e ) for some e ∈ e ∈ X. Clearly s • = {(e , X 1 , Y 1 ), . . . (t , Y k )} and (s • ) = {e }, thus | (s • )| = 1. Given a t ∈ T , finiteness of • t derives by the fact that in the cdes Z is finite. The last condition follows by the fact that equally labeled transition t and t in T share a common input place: ( * , (t)).
Conf cdes (E) = Conf cn (N cn cdes (E)) depends on the fact that to each configuration C ∈ Conf cdes (E) a reachable marking m C in the cn N cn cdes (E) correspond, and vice versa. First observe that the execution of a transition labeled with e is signaled by the fact that the place (e, * ) is marked (and ( * , e) not), and all the places ({e.e }, #) are unmarked, thus given a configuration X the corresponding marking m C is such that m((e, * )) = 1 if e ∈ C, m((e, * )) = 1 if e ∈ C, m((W, #)) = 1 if W ∩ C = ∅ and m((W, #)) = 0 if W ∩ C = ∅.
If C is the empty configuration then clearly the initial marking does the job in N cn cdes (E). Consider a configuration C of size n, and the corresponding marking m C , assume that C[e for some e ∈ E. Recall that this means that in Z e there is a pair (X, Y ) such that (CxtZ e) ∩ C = X and Y ⊆ C. Take the transition (e, X, Y ), it is clear that m C [(e, X, Y ) , as the inhibitor and read arcs guarantee exactly this. The vice versa is along the same line, and the equality between Conf cdes (E) and Conf cn (N cn cdes (E)) follows. Proposition 6.6. Let E be a cdes, and N cn cdes (E) be the associated contextual Petri net. Then N cn cdes (E) is conflict saturated. Proof. Obvious as N cn cdes (E) is a cn. For the vice versa we do need to make a further assumption on the causal net. The intuition is that equally labeled transitions are different incarnations of the same activity, happening in different contexts. Henceforth one has to make sure that the equally labeled transitions indeed represent the same event and each incarnation of an event should have the same environment, meaning with environment the events related to it (which in the cdes is calculated with Cxt). Given a causal net K = S, T, F, I, R, m, on a set of label L and a transition t ∈ T , with − → • t we denote the set of labels {a ∈ L | s ∈ • t ∧ (s • ) = a}, with ← − • t the set of labels {a ∈ L | s ∈ • t ∧ ( • s) = a}, and with t the set of labels {a ∈ L | s ∈ t ∧ ( • s) = a}.
Definition 6.7. Let K = S, T, F, I, R, m, be a causal net labeled over L, we say that K is well behaved if (1) ∀a ∈ L. ∀t, t ∈ −1 (a) it holds that • t ∪ • t = {s} and t • ∪ t • = {s }, and (2) ∀a ∈ L. ∀t, t ∈ −1 (a) it holds that In a well behaved causal net all the transitions equally labeled have a common input place and also a common output place (condition 1). The equally labeled transitions in the causal net are the various incarnations of the event they represent, thus they have the same context, though the various kind of involved arcs are different (condition 2). Example 6.8. Consider the net below: The transitions labeled with c have the same environment, namely the set of labels {a, b}.
It is worth to observe that when associating a causal net to a cdes we obtain a well behaved one.
Proposition 6.9. Let E be a cdes, and N cn cdes (E) be the associated contextual Petri net. Then N cn cdes (E) is a well behaved causal net.
Proof. By construction of N cn cdes (E) the requirements of Definition 6.7 hold.
To a causal net we can associate a triple where the relations will turn out to be, under some further requirements, those of a cdes. Here the events are the labels of the transitions, conflicts between events are inferred using the presets of the transitions and the entries are calculated using inhibitor and read arcs. • ∀e, e ∈ E. e # e is there exists t, t ∈ T . (t) = (t ) and • t ∩ • t = ∅.
The construction above gives the proper cdes, provided that the cn is well behaved.
Proposition 6.11. Let K = S, T, F, I, R, m, be a well behaved causal net and E cdes cn (K) = (E, , #) the associated triple, then E cdes cn (K) is a cdes and Conf cn (K) = Conf cdes (E cdes cn (K)).
Proof. E cdes cn (K) is clearly a cdes. It remains to prove that Conf cn (K) = Conf cdes (E cdes cn (K)) but this follows the same argument of Proposition 6.5.
The following theorem assure that the notion of (well behaved) causal net is adequate in the relationship with context-dependent event structure.
Theorem 6.12. Let K = S, T, F, I, R, m, be a well behaved causal net, and let E be a cdes. Then K ∼ = N cn cdes (E cdes cn (K)) and E ≡ E cdes cn (N cn cdes (E)).

Conclusions
In this paper we have proposed the notion of causal net as the net counterpart of the context-dependent event structure, and shown that the notion is adequate. A causal net is a Petri net where the dependencies are represented using inhibitor and read arcs and not usual flow ones: the dependencies are not any longer inferred by the production of a token to be consumed but they are described by the presence or absence of tokens in places whose meaning is that a particular activity has been executed or not. Another feature of the causal net is that an activity, identified by a label, may have several different implementations, but this is not surprising as usually unfoldings have this peculiarity. Like context-dependent event structure subsumes other kinds of event structures, also the new notion comprises other kinds of nets, and we have given a direct translation of occurrence nets and unravel nets into causal one, and also the usual constructions associating event structures to nets can be rewritten in this setting. Like context-dependent event structures, also causal nets have a similar drawback, namely the difficulty in understanding easily the dependencies among events, which in some of the event structures is much more immediate.
Recently a notion of unfolding representing reversibility has been pointed out ( [MMU19]) and the issue of how find the appropriate notion of net relating reversible event structure has been tackled ([MMP + 20]) and solved for a subclass of reversible event structure. The notion of causal net is then a promising one as it may be used as the basis to model reversible prime event structures as it is done in [MMP21]whereas classical approaches fail ([MMP + 20]), as already observed.
In this paper we have focussed on the objects and not on the relations among them, hence we have not investigated the categorical part of the new kind of net, which we intend to pursue in the future. A notion of morphism for cdes could be a partial mapping f on events such that if f (e) is defined and Z e then f is such that for all (X, Y ), (X , Y ) ∈ Z then f (X) = f (X ) ⇒ f (Y ) = f (Y ) and the mapping can identify only conflicting events.
But when considering causal nets it should be observed that whereas read arcs are treated similarly to flow arcs, inhibitor arcs are usually treated as contra-variant, which contrast our usage. Thus a new different notion of mapping on nets should be introduced taking into account the fact that causal nets are flat ones with respect to the flow relation.
It should also be mentioned that persistent nets have been connected to event structures ( [CW05] and [BBC + 18]), and in these nets events may happen in different contexts, hence it would be interesting to compare these approaches to the one pursued here.