Causality vs. interleavings in concurrent game semantics

We investigate relationships between interleaving and causal notions of game semantics for concurrent programming languages, focusing on the existence of canonical compact causal representations of the interleaving game semantics of programs. We perform our study on an aﬃne variant of Idealized Parallel Algol (IPA), for which we present two games model: an interleaving model (an adaptation of Ghica and Murawski’s fully abstract games model for IPA up to may-testing), and a causal model (a variant of Rideau and Winskel’s games on event structures). Both models are sound and adequate for aﬃne IPA. Then, we relate the two models. First we give a causality-forgetting operation mapping functorially the causal model to the interleaving one. We show that from an interleaving strategy we can reconstruct a causal strategy, from which it follows that the interleaving model is the observational quotient of the causal one. Then, we investigate several reconstructions of causal strategies from interleaving ones, showing ﬁnally that there are programs which are inherently causally ambiguous, with several distinct minimal causal representations.


Introduction
Game semantics present a program as a representation of its behaviour under execution, against any execution environment.This interpretation is computed compositionally, following the methodology of denotational semantics.Game semantics and interactive semantics in general have been developed for a variety of programming language features.They are an established theoretical tool in the foundational study of logic and programming languages, with a growing body of research on applications to various topics, e.g.model-checking [1,10], hardware [4] or software [12] compilation, for higher-order programs.These works exploit the ability of game semantics to provide compositionally a clean and elegant presentation of the operational behaviour of a program, which can then give an invariant for program transformations, or be exploited for analysis.
One subject where game semantics particularly shine is for reasoning about program equivalence.Indeed, game semantics models are often fully abstract: they characterise programs up to contextual equivalence, meaning that two programs behave in the same way in all contexts if and only if the corresponding strategies have the same plays.Concurrent languages are no exception: Ghica and Murawski's games model for IPA [5] is fully abstract wrt.may-testing.Although, in this language, contextual equivalence is undecidable even for second-order programs, decidability can be recovered for a restricted language [6].But Ghica and Murawski's model represents concurrent programs with interleavings, so whether one works in a decidable fragment or simply uses non automated tools, reasoning on the fully abstract model requires one to explore all possible interleavings.This is the so-called state explosion problem familiar in the verification of concurrent systems [7].
Partial order methods provide good tools to alleviate this problem.They provide more compact representations of concurrent programs, avoiding the enumeration of all interleavings.For IPA, recent advances in partial-order based game semantics [11,3] allow us to restate Ghica and Murawski's model based on partial orders or event structures.But can we get back full abstraction this way?Since the interleaving model is fully abstract, the question is: can we give a clean, compact, presentation of the interleaving games model of IPA via partial orders?As it is, the interpretation of IPA in e.g.[3] is certainly not fully abstract since it retains intensional information (such as the point of non-deterministic branching) invisible up to may-testing.But can we rework it so it yields canonical partialorder representatives for strategies in the interleaving model?In this paper, we show that already in an affine setting, the answer is no.
Our contributions are the following.We describe an affine variant of IPA -it is mostly there to provide illustrations and an operational light.For this affine IPA, we give two new categories of games.The first is an affine version of Ghica and Murawski's model.The second draws inspiration from Rideau and Winskel's category of strategies as event structures, without the information on the point of non-deterministic branching, which is irrelevant up to may-testing.Via a collapse of the causal model into the interleaving one, we show that the latter is the observational quotient of the former.We describe several causal reconstructions from an interleaving strategy, aiming for minimality.Finally, we show that interleaving strategies have in general no canonical minimal causal representation.
On the game semantics front, our two models are arena-based, in the spirit of HO games [8].They both operate on a notion of arenas enriched with conflict, which is required in an affine setting.Our interleaving model is not fully abstract for affine IPA.Indeed, we have omitted well-bracketing (as well as bad variables and semaphores) in an effort to make the presentation lighter.These aspects are orthogonal to the problem at hand, and our developments would apply just as well with those.Apart from well-bracketing, our interleaving model is fully compatible with Ghica and Murawski's -strategies in our sense can easily be read as strategies in their sense, as pointers can be uniquely recovered.

Affine IPA and its interleaving game semantics
In this section we introduce affine IPA, and the category GM of interleaving strategies.

Affine IPA
We have types for booleans, commands, and a linear function space.Finally we have two types ref r and ref w for read-only and write-only variables (this splitting of ref is necessary to make the variables non-trivial in an affine setting).
The terms of affine IPA are the following: References are considered initialized to ff .As they can only be read once, the only useful value to write is tt, hence the restricted assignment command.Typing rules are standard, Simon Castellan and Pierre Clairambault 32:3 Maximal plays of the alternating game semantics of strict we only mention a few.Firstly, affine function application and boolean elimination.
Crucially the first rule treats the context multiplicatively, making the language affine.Secondly, here are the rules for reference manipulation.
Splitting between the read and write capabilities of the variable type is necessary for the variables to be used in a non-trivial way.For example, the following term is typable: The language is equipped with the same operational semantics as in [5] -we skip the details.The operational semantics yields an evaluation relation: for ⊢ M ∶ B, we write M ⇓ may b to mean that M may evaluate to the boolean b, or just M ⇓ may to mean that M may converge.From the combination of concurrency and state, affine IPA is a nondeterministic language.

Arenas
In game semantics, one interprets a program as a set of interactions, usually called plays, with its execution environment.For instance, some maximal plays of the interpretation strict of the term strict ∶ (com ⊸ com) ⊸ B defined above are displayed in Figure 1.Those diagrams are read from top to bottom, and moves have polarity either Player (+, Program) or Opponent (−, Environment).In the first play of Figure 1 Opponent behaves like a constant, where in Figure 1 he is strict.Although the programs are stateful, plays do not carry state: instead, we only see how the state influences Player's behaviour.
To make this formal, we first extract from the type the computational events on which plays such as the above are formed.These are organized into arenas.▸ Definition 2. An event structure with polarities is a tuple (A, ≤ A , ♯A, pol A ) where A is a set of moves or events, ≤ A is a partial order on A such that for any a ∈ A, [a] = {a ′ ∈ A a ′ ≤ A a} is finite, ♯A is an irreflexive symmetric conflict relation such that for all a ♯A a ′ , for all a ′ ≤ A a ′ 0 , we also have a ♯A a ′ 0 .Finally, pol A ∶ A → {−, +} is a polarity function.
Apart from the fact that we only have binary conflict, this is the same notion of event structures with polarities as in [11].A configuration of A, written x ∈ C (A), is a finite

32:4 Causality vs. interleavings in concurrent game semantics
x ⊆ A which is down-closed (if a ∈ x and a ′ ≤ A a, then a ′ ∈ x as well) and consistent (for all a 1 , a 2 ∈ x, ¬(a 1 ♯A a 2 )).For a 1 , a 2 ∈ A, we say that a 1 immediately causes a 2 , written a 1 a 2 , when a 1 < A a 2 and for all a 1 ≤ a ≤ a 2 we have either a 1 = a or a = a 2 .We also write a 1 ∼ a 2 if a 1 and a 2 are in immediate conflict, meaning a 1 ♯A a 2 and for all a ′ 1 ≤ A a 1 , a ′ 2 ≤ A a 2 (with at least one of them strict), we have ¬(a ′ 1 ♯A a ′ 2 ).Finally, we write min(A) for the set of minimal events of A.
Arenas are certain event structures with polarities: ▸ Definition 3.An arena is an event structure with polarities such that ≤ A is a forest (for all a 1 , a 2 ≤ A a, either a 1 ≤ A a 2 or a 2 ≤ A a 1 ), is alternating (for all a 1 a 2 , pol A (a 1 ) ≠ pol A (a 2 )), and race-free (if a 1 ∼ a 2 , then pol(a 1 ) = pol(a 2 )).
Although our formulation is slightly different, our arenas are very close to the standard notion of [8]: the three differences is that we have no Question/Answer distinction, our arenas are not necessarily negative, and we have a conflict relation.
▸ Example 4. We display below the arenas for some types of IPA.
On com , Opponent may start running the command (run − ), which may or may not terminate (done + ).On B , Opponent may interrogate the boolean (q − ), and Player may or may not answer.If he does, it will be with exactly one of the incompatible tt + and ff + .
We will see later on how to systematically interpret types of IPA as arenas.For now on though, we give two simple constructions on arenas.
▸ Definition 5. Let A be an arena.Its dual, written A ⊥ , has the same data as A but polarity reversed.If A and B are arenas, then their parallel composition A ∥ B, also written A ⊗ B for the tensor, has components: Events/moves. the disjoint union {1} × A ∪ {2} × B, Causality, conflict.Inherited from A and B.
In this paper, we will define two categories GM and PO with arenas as objects.

Interleaving-based game semantics on arenas
Now, we define a compact closed category of games called GM, by reference to Ghica and Murawski's model of IPA [5].Our category will be much simpler though, as it will be an affine version of theirs, without bracketing conditions.Firstly, we need to define plays.
▸ Definition 6.Let A be an arena.A play s on A, written s ∈ P A , is a total order s = ( s , ≤ s ) of moves of A such that s ∈ C (A), and for any a, b ∈ s, if a ≤ A b then a ≤ s b.We write s ⊑ t for the usual prefix ordering on plays.
In [5], strategies are closed under some saturation conditions: for instance, if sa + b − ∈ σ and b does not actually depend on a in the game, then σ can always delay a until after b was played.In other words, we have sba ∈ σ as well.In our affine variant, we will have a slightly different formulation of saturation.First we define an order on plays.
Let s, t ∈ P A for A an arena.Then we say that s ⪯ t iff s ⊆ t , and: Clearly, ⪯ is a partial order on P A .Intuitively, going upwards in ⪯ corresponds to strengthening causal information by pushing Opponent moves behind Player moves, hence implying that those Opponent moves were not true dependencies for the Player moves.The partial order ⪯ is generated by elementary permutations, as in the saturation conditions in [5], along with the prefix ordering.We now define: If run + appears on either occurrence of com ⊥ , then run − must appear before, If done + appears, then both done − must appear before.Figure 2 displays several plays of ∥ GM .In total, ∥ GM has six maximal plays.
As usual in play-based game semantics, operations on GM-strategies rely crucially on a notion of restriction of plays.Consider A an arena, s ∈ P A , and B some sub-component on A (we leave the notion of sub-component intentionally somewhat vague: for instance A is a subcomponent of A ⊗ B, and Using that, we can now define the copycat strategy on A to be: It is a GM-strategy.Using the usual parallel composition plus hiding mechanism, we can also define composition.
There is a compact closed category GM with arenas as objects, and as Proof.The operation ⊗ on arenas is extended to GM-strategies by setting, for Causality vs. interleavings in concurrent game semantics For now we do not show how to interpret affine IPA in GM -for that one actually needs a symmetric monoidal closed subcategory of negative arenas, which seems difficult to define without appealing to PO.However, we illustrate this interpretation by revisiting Figure 1.
▸ Example 10.The GM-strategy corresponding to strict will contain, among others, the maximal plays described in Figure 3.
Although strict is a sequential program, the fact that in GM, Opponent may not be sequential (and, in this case, non well-bracketed either) allows us to observe new behaviours from strict.For instance, in the first two plays of Figure 3, Opponent concurrently answers and asks for the argument on com ⊸ com.This triggers a race between the subterms r ∶= tt and !r of strict.As a consequence, one can observe both tt and ff as final results of the computation.However, if Opponent was to answer only after r ∶= tt was evaluated (as in the third play of Figure 3), the only possible final result would be tt.
There are, in total, ten maximal non-alternating plays in the GM-strategy for strict.

Causal game semantics for affine IPA
We give a causal variant of GM, where plays are partial orders.This yields a category PO, close to the category of concurrent games of Rideau and Winskel [11] -the main difference is that strategies in PO omit information about the point of non-deterministic branching.

Po-plays and po-strategies
First, we define the notion of partially ordered play.
▸ Definition 11.A partially ordered play (po-play) on arena A is a partial order q = ( q , ≤ q ) where q ∈ C (A), and q satisfies the following properties:

We write P ©
A for the set of po-plays on arena A.
Unlike usual (alternating or non-alternating) plays, po-plays are not chronologically ordered, but carry causal information about Player's choices.Hence, a po-play cannot express that an Opponent event happens after a given event, unless that dependency is already present in the arena.In fact, a po-play cannot force a dependency between two Player moves either: such a dependency may be broken by an asynchronous execution environment.
Although one po-play may carry information about many interleavings, representing a GM-strategy might take several.Indeed, a po-play is by itself only able to represent a Simon Castellan and Pierre Clairambault 32:7 (a) A po-play for parallel composition process which is deterministic up to the choice of the scheduler (note that parallel composition is indeed deterministic up to the choice of the scheduler, it is only via its interaction with e.g. a shared memory that non-determinism arises).For instance, the GMstrategy coin ∶ B = { , q − , q − tt + , q − ff + } can only be represented via two maximal po-plays: q − tt + and q − ff + .It features actual non-determinism, independent from the scheduler.To express such non-determinism, Rideau and Winskel [11] formalize strategies as event structures rather than partial orders.Our causal notion of strategies builds on their work; but since the present paper is only interested in relating causal with interleaving game semantics (therefore with may-testing), we drop the explicit non-deterministic branching point and consider po-strategies to be certain sets of partial orders.For that we first define: ▸ Definition 12. Let q, q ′ be two partial orders.We say that q is rigidly included in q ′ , or that q is a prefix of q ′ , written q ↪ q ′ , if we have the inclusion q ⊆ q ′ , for any a 1 , a 2 ∈ q we have a 1 ≤ q a 2 iff a 1 ≤ q ′ a 2 , and q is down-closed in q ′ .We are now in position to define PO-strategies.

▸ Definition 13.
A PO-strategy on A, written σ ∶∶ A, is a non-empty prefix-closed σ ⊆ P © A , which is additionally receptive: for all q ∈ σ, if q ∈ C (A) extends to q ∪ {a − } ∈ C (A), then there is q ↪ q ′ ∈ σ such that q ′ = q ∪ {a}.
It follows by courtesy that q ′ is necessarily unique: the immediate dependency of a in q ′ is forced by its immediate dependency in A.
Clearly, the set of prefixes of the po-play of Figure 4a gives a PO-strategy.For a nontrivial non-deterministic example, we give in Figure 4b the two maximal (up to prefix / rigid inclusion) po-plays of the PO-strategy corresponding to strict.This gives a quite compact representation of all of the ten maximal plays of the GM-strategy for strict of Example 10.

The compact closed category PO
To construct PO we start with the causal copycat, which is -configuration-wise -as in [11].
▸ Definition 14.Let A be an arena.We define a partial order ≤ C C A on A ⊥ ∥ A: We will see in Proposition 4 that this is indeed a causal version of c c A ∶ A ⊥ ∥ A. Now, we define composition of PO-strategies.We first define composition of po-plays (via interaction plus hiding, essentially as in [11]), before lifting it component-wise to PO-strategies.
▸ Definition 15.Two dual po-plays q ∈ P © A , q ′ ∈ P © A ⊥ such that q = q ′ are causally compatible if (≤ q ∪ ≤ q ′ ) * is a partial order, i.e. is acyclic.Then we write q∧q ′ = ( q , ≤ q∧q ′ ) for the resulting partial order.
If q and q ′ are causally compatible po-plays on dual games as above, the events of q ∧ q ′ have no well-defined polarity, so it is not a po-play.If q ∈ P © A ⊥ ∥B and q ′ ∈ P © B ⊥ ∥C are not dual but composable, we say that they are causally compatible if q = x A ∥ x B , q ′ = x B ∥ x C , plus (q ∥ x C ) and (x A ∥ q ′ ) are causally compatible (where x A , x C inherit the order from A, C -in particular, x A is regarded as a member of P © A , and x C as a member of P © C ⊥ ), we define their open interaction q ′ ⊛ q = (q ∥ x C ) ∧ (x A ∥ q ′ ).
In that case we define q ′ ⊙ q ∈ P © A ⊥ ∥C as the projection q ′ ⊛ q ↓ A ⊥ ∥ C, with events those of q ′ ⊛ q that are in A or C, and partial order as in ≤ q ′ ⊛q .This being a po-play is a variation on the stability by composition of courtesy in [11] (there called innocence).
The construction is a simplification of [11]: po-plays are certain concurrent strategies, and their composition is close to the composition of concurrent strategies with the simplification that events of po-plays are those of the games rather than only labeled by the game.Proof.The tensor q 1 ⊗ q 2 of q 1 ∈ P Structural morphisms are copycat PO-strategies.PO simplifies (omitting explicit non-deterministic branching information) the bicategory of concurrent games [11], whose compact closed structure is established with details in [2].◂

Interpretation of affine IPA
For completeness, we succinctly describe how one can define the interpretation of affine IPA in PO.In fact, affine IPA will not be interpreted directly in PO, which does not support weakening of variables as the empty arena 1, unit for the tensor, is not terminal (since PO-strategies can have minimal positive events, there are in general several PO-strategies on A ⊥ ∥ 1 as soon as A has at least one minimal negative event).We have to restrict to a proper subcategory of PO, defined as follows.
The category PO − is the subcategory of PO with objects negative arenas, and morphisms the negative PO-strategies whose po-plays are all negative.
The empty arena 1 is terminal in PO − : if A is negative then A ⊥ ∥ 1 has no negative minimal event.Therefore a negative σ ∶∶ A ⊥ ∥ 1 must be empty, as a potential minimal event would be in particular minimal in A ⊥ ∥ 1.However, restricting to PO − has a price: we lose the closure A ⊥ ∥ B, which is in general not negative and hence not an object of PO − .Thus we build a negative version, where the minimal events of A depend on those of B. If A, B are conflict-free and B has a unique minimal event, then A ⊸ B coincides with the usual arrow arena construction in Hyland-Ong games [8].In general if B has a unique minimal event, then A ⊸ B does not introduce new conflicts or copies of A, and only differs from A ⊥ ∥ B by the fact that events of A ⊥ now depend on the minimal event of B -see Example 4 for such an arrow arena.However, if B has several minimal events, then multiple copies of A are created; fortunately we can use conflict to maintain linearity.
The arena A ⊸ B does not yet give a closure with respect to the tensor.The issue is that there are more PO-strategies in A ⊸ B than in A ⊥ ∥ B. Indeed, consider a PO-strategy σ ∶∶ B ⊥ ∥ (B ⊗ B), that plays q + in the left hand side occurrence of B whenever Opponent plays q − in both right hand side occurrences of B. Then on B ⊸ (B ⊗ B) there are two ways to replicate this, as they are two copies of the left hand side B in the arena.To get back a closed structure, we need to restrict the category further.
▸ Definition 20.A negative PO-strategy σ ∶∶ A is well-threaded iff, for any q ∈ σ, q has at most one minimal event.Copycat is well-threaded and well-threaded PO-strategies are stable under composition -they form a subcategory PO − wt of PO − .
Up to renaming of events, negative well-threaded strategies on (A ∥ B) ⊥ ∥ C exactly coincide with those on A ⊥ ∥ B ⊸ C. Leveraging the compact closed structure of PO, it follows that PO − wt is symmetric monoidal closed (where the monoidal unit 1 is terminal).As such, it supports the interpretation of the affine λ-calculus: any term

4
From PO to GM and back We finally enter the final section of this paper, and relate the two semantics.

Forgetting causality
We start with the easy part: that PO can be embedded into GM.As partial orders are more informative than plays, it is easy to move from the former to the latter.
▸ Definition 21.Let q ∈ P © A .A play in q is s ∈ P A such that s ⊆ q , and such that for all a 2 in s , if a 1 ≤ q a 2 , then a 1 ∈ s and a 1 ≤ s a 2 .We write Plays(q) for the set of plays in q.
From courtesy of q it follows that Plays(q) satisfies the saturation condition of Definition 8.For σ ∶∶ A a PO-strategy, we have Plays(σ) = ⋃{Plays(q) q ∈ σ} a GM-strategy, as receptivity follows from receptivity of σ.In fact, we have: There is an identity-on-object functor Plays ∶ PO → GM.This is a direct verification.As in Section 2.2 we have by anticipation defined the compact closed structure of GM to be the image of that of PO through Plays, this functor preserves the compact closed structure by construction.Combined with the interpretation − of affine IPA in PO, this gives a sound and adequate interpretation Plays ○ − of affine IPA in GM.Providing a direct sound interpretation to GM without PO would be awkward, as it is unclear how to define well-threaded GM-strategies with no access to causality.
As emphasized in the introduction, the interpretation Plays ○ − is not fully abstract for affine IPA.However, let us emphasize again that we are not interested in full abstraction for affine IPA; rather this serves as a simpler setting in which to study the relationship between the fully abstract model for IPA [5] and its causal variant in e.g.[3].

Recovering causality
We now investigate how one can recover a PO-strategy from a GM-strategy.

A naive causal reconstruction
As a first step, we simply reverse the construction of Definition 21.

▸ Definition 22. A causal resolution σ ∶ A is any q ∈ P ©
A such that Plays(q) ⊆ σ.
Because some GM-strategies (such as coin ∶ B) are inherently non-deterministic, it is hopeless to try to describe them with a unique maximal causal resolution.A first rough causal reconstruction for a GM-strategy consists simply in taking all causal resolutions.▸ Proposition 5. Let σ ∶ A be a GM-strategy.Then, Caus(σ) = {q ∈ P © A Plays(q) ⊆ σ} is a PO-strategy such that Plays(Caus(σ)) = σ.Moreover, this yields a lax functor Caus ∶ GM → PO, i.e. we have c c © A ⊆ Caus( c c A ) and Caus(τ ) ⊙ Caus(σ) ⊆ Caus(τ ⊙ σ) for all σ ∶ A ⊥ ∥ B and τ ∶ B ⊥ ∥ C (but neither of the other inclusions hold).
Proof.Each causal resolution is courteous by definition; receptivity and closure under prefix are immediate.Each play s ∈ σ appears in a causal resolution q s , whose plays are exactly those t ⪯ s obtained by saturation from s. Finally, lax functoriality is straightforward.
To see why Caus(−) is only lax functorial, take A = {a − }, C = {c − } and B = 1.Take the PO-strategy σ ∶∶ A ⊥ ∥ B to have as only non-empty po-play the singleton a + , while τ ∶∶ B ⊥ ∥ C has only non-empty po-play the singleton c − .Then the GM-strategy Plays(τ ) ⊙ Plays(σ) admits c − a + as a causal resolution, which is therefore a po-play of Caus(Plays(τ ) ⊙ Plays(σ)).On the other hand, Caus(Plays(τ )) ⊙ Caus(Plays(σ)) = τ ⊙ σ has only one maximal po-play, with causally independent c − and a + .◂ In particular, each GM-strategy is definable as a PO-strategy.Along with Proposition 4, and the fact that (just as in [5]) two distinct GM-strategies can always be distinguished by a GM-strategy, this entails that GM is the observational quotient of PO, in the sense that for σ 1 , σ 2 ∶∶ A, Plays(σ There are in general many PO-strategies corresponding to one GM-strategy, as GMstrategies only remember the observable behaviour.Some PO-strategies are more succinct than others for a fixed GM-strategy; and the causal reconstruction Caus(−) is not very economical as it constructs the biggest such causal representation.For instance, the POstrategy Caus( ∥ GM ) not only comprises the po-play of Figure 4a, but also the linear po-play of sequential command composition.

Extremal causal resolutions
As we have seen, the construction Caus(−) presented above does not yield a satisfactory causal representation of a GM-strategy because it is not minimal.Seeking a minimal canonical causal representation of a GM-strategy, we now investigate when certain causal resolutions are subsumed by others, and hence can be removed without changing Plays(σ).
For q 1 , q 2 ∈ P © A with q 1 = q 2 , considering q 1 subsumed by q 2 when Plays(q 1 ) ⊆ Plays(q 2 ) is a bit too naive.Indeed, consider cell ∶∶ ref of Figure 5.We have: ) However, moving from the former to the latter does not preserve the future: namely, whereas any play in the left hand side can only be extended with ff + , there are plays in the right hand side that can be extended with tt + as well.So, the left hand side has to be kept.
To address this relaxation of causality while taking account of the future, for q 1 = q 2 with Plays(q 1 ) ⊆ Plays(q 2 ), we will say that q 2 relaxes q 1 if the inclusion of plays is automatically transferred to all possible rigid extensions of q 1 .More formally: ▸ Definition 23.We define a partial order called relaxation coinductively, by q 1 q 2 iff q 1 = q 2 , Plays(q 1 ) ⊆ Plays(q 2 ), and for all q 1 ↪ q ′ 1 , there exists q 2 ↪ q ′ 2 such that q ′ 1 q ′ 2 .For σ ∶ A a GM-strategy and q ∈ Caus(σ), we say that q is extremal in σ iff q is -maximal.Let Extr(σ) be denote the set of extremal po-plays in σ.The operation Extr(−) performs well on many examples: for instance, it recovers the proper PO-strategies for all the examples of GM-strategies in this paper until now.It also properly reverses Plays(−) for deterministic PO-strategies, with only one maximal poplay.In that case, it matches the previously known correspondence between Rideau and Winskel's deterministic concurrent strategies [13] and Melliès and Mimram's category of receptive ingenuous strategies [9].
In the general case however, Extr(−) is not even lax functorial.But more importantly, it turns out that Extr(σ) is still not necessarily a minimal causal representation of σ.We present an example outside of the interpretation of affine IPA as it is more succinct, but it is easy to find similar examples within the interpretation.

▸ Example 24.
Let A be a non-negative arena, with two concurrent events ⊖ and ⊕.Consider the GM-strategy σ ∶ A 1 ∥ A 2 with plays (annotations are for disambiguation): All three po-plays are extremal in σ.However, despite being extremal, the first po-play is redundant: it can be removed, yielding the same GM-strategy.Indeed, call the three poplays above q 1 , q 2 , q 3 ; and take s ∈ Plays(q 1 ).If s ∈ Plays(q 2 ), then ⊕ 2 ≤ s ⊖ 1 as this is the only constraint in q 2 .Likewise, s ∈ Plays(q 3 ) means that ⊕ 1 ≤ s ⊖ 2 .But these constraints, put together with those of q 1 , yield a contradiction.Therefore s ∈ Plays(q 2 ) ∪ Plays(q 3 ).The two extremal po-plays q 2 , q 3 yield a smaller representation of σ.
In the example above, {q 2 , q 3 } is the unique minimal causal representation for σ.But can we always reach such a canonical representation by removing redundant extremals?

Causally ambiguous GM-strategies
Until this point, and including Example 24, all the examples of GM-strategies considered in this paper have a unique minimal causal representation, i.e. a unique set of extremal po-plays with minimal cardinality.They are all causally unambiguous: ▸ Definition 25.For A a finite arena, a GM-strategy σ ∶ A is causally ambiguous if there are (at least) two distinct sets of extremal po-plays of minimal cardinality X = {q 1 , . . ., q n } and Y = {q ′ 1 , . . ., q ′ n }, such that σ = ⋃ 1≤i≤n Plays(q i ) = ⋃ 1≤i≤n Plays(q ′ i ).
To conclude this paper, we show the following result.
▸ Theorem 26.There is a term of affine IPA: such that M GM is causally ambiguous.
Proof.We first exhibit a causally ambiguous GM-strategy outside of the interpretation of affine IPA, and then sketch how the same phenomenon can be replicated via a term.Figure 6 displays five po-plays q 1 , . . ., q 5 , generating a GM-strategy σ = ∪ 1≤i≤5 Plays(q i ) -the game A is the same as in Example 24.A rather tedious but direct verification ensures that they are all extremal: for that, it suffices to check that for each of these po-plays, dropping any of the causal links unlocks a play not yet in σ.For instance, dropping the diagonal immediate causal link in q 1 unlocks the play ⊖ 4 ⊕ 4 ⊖ 2 ⊕ 2 ∈ σ.
We replicate this in affine IPA.First, we replace each A with com.However, q 4 and q 5 do not have the causal link ⊖ 4 ⊕ 4 ; so we need five occurrences of com, organised as com 1 ∥ com 2 ∥ com 3 ∥ com 4 ∥ com ′  4 , where run ′ 4 , done 4 play the role of ⊖ 4 , ⊕ 4 and ⊕ ′ 4 is ignored.This yields σ ′ ∶ com 1 ∥ com 2 ∥ com 3 ∥ com 4 ∥ com ′ 4 causally ambiguous.This is not a type of affine IPA (and σ ′ is not well-threaded), so instead we lift σ ′ to: Using variables, one can implement in affine IPA each of the po-plays corresponding in this type to the q i s above.It is also easy to define a non-deterministic choice operation in affine IPA, using which these are put together to define M such that M GM = σ ′′ .◂

Conclusions
The phenomenon presented here is fairly robust, and causally ambiguous strategies would most likely emerge as well in other concurrent programming languages.Since interleaving games models are inherently related with observational equivalence as they exactly capture the observable behaviour of programs, it seems that unfortunately we cannot use the causal model presented here or those of e.g.[11,3] to give canonical compact representations of concurrent programs up to contextual equivalence.Causal structures are however still very relevant for other purposes (e.g.model-checking, error diagnostics, weak memory models, . . .), and constructing them compositionally from programs remains an interesting challenge.
Rather than detailing explicitly the rest of the structure, we will inherit it from the forthcoming category PO.All laws will then follow from Proposition 4.◂C O N C U R 2

Figure 3
Figure 3 Some maximal plays of the non-alternating game semantics of strict
for the type of references.By abuse of notation, we write ref for ref w ⊗ ref r .The PO-strategy interpreting strict is the composition of the PO-strategy with maximal po-play at the right hand side of Figure 5 (interpreting r ∶ ref w , r ∶ ref r ⊢ λf com⊸com .f (r ∶= tt); !r following Section 3.3), and cell ∶∶ ref for the memory cell (with maximal po-plays at the left hand side of Figure 5).Performing composition as above produces the two maximal po-plays of Figure 4b.▸ Proposition 2. There is a compact closed category PO with arenas as objects, and POstrategies σ ∶∶ A ⊥ ∥ B as morphisms from A to B, also written σ ∶ A PO

2 0 1 6 32: 10 Causality
vs. interleavings in concurrent game semantics M ∶ B is interpreted as a PO-strategy M ∶ A 1 ⊗. ..⊗A n PO − wt → B .Along with the POstrategy with unique po-play that of Figure 4a for parallel composition, the interpretation of the newref construct as sketched in Example 17, and the obvious PO-strategies for the other affine IPA combinators, we get an interpretation − of affine IPA into PO − wt , which is a subcategory of PO.Standard techniques entail: ▸ Proposition 3. The interpretation − is sound and adequate for affine IPA, i.e. for ⊢ M ∶ com, we have M ⇓ may iff M contains a positive event.