A Simple Game Semantics Model of Concurrency

27
A Simple Game Semantics Model of Concurrency Andrea Asperti Michele Finelli Gianluca Franco Davide Marchignoli Technical Report UBLCS-99-17 July 1999 Department of Computer Science University of Bologna Mura Anteo Zamboni 7 40127 Bologna (Italy)

Transcript of A Simple Game Semantics Model of Concurrency

A Simple Game Semantics Model of Concurrency

Andrea Asperti Michele Finelli Gianluca Franco

Davide Marchignoli

Technical Report UBLCS-99-17

July 1999

Department of Computer ScienceUniversity of BolognaMura Anteo Zamboni 740127 Bologna (Italy)

The University of Bologna Department of Computer Science Research Technical Reports are available ingzipped PostScript format via anonymous FTP from the area ftp.cs.unibo.it:/pub/TR/UBLCS or viaWWW at URL http://www.cs.unibo.it/. Plain-text abstracts organized by year are available in thedirectory ABSTRACTS. All local authors can be reached via e-mail at the address [email protected] and comments should be addressed to [email protected].

Recent Titles from the UBLCS Technical Report Series

97-9 Generalized Semi-Markovian Process Algebra, M. Bravetti, M. Bernardo, R. Gorrieri, October 1997.

98-1 Group Communication in Partitionable Systems: Specification and Algorithms, O. Babaoglu, R. Davoli, A.Montresor, April 1998 (Revised May 1999).

98-2 A Catalog of Architectural Styles for Mobility, P. Ciancarini, C. Mascolo, April 1998.

98-3 Comparing Three Semantics for Linda-like Languages,N. Busi, R. Gorrieri, G. Zavattaro, May 1998.

98-4 Design and Experimental Evaluation of an Adaptive Playout Delay Control Mechanism for Packetized Audiofor use over the Internet, M. Roccetti, V. Ghini, P. Salomoni, M.E. Bonfigli, G. Pau, May 1998 (RevisedNovember 1998).

98-5 Analysis of MetaRing: a Real-Time Protocol for Metropolitan Area Network, M. Conti, L. Donatiello, M.Furini, May 1998.

98-6 GSMPA: A Core Calculus With Generally Distributed Durations, M. Bravetti, M. Bernardo, R. Gorrieri,June 1998.

98-7 A Communication Architecture for Critical Distributed Multimedia Applications: Design, Implementation,and Evaluation, F. Panzieri, M. Roccetti, June 1998.

98-8 Formal Specification of Performance Measures for Process Algebra Models of Concurrent Systems, M.Bernardo, June 1998.

98-9 Formal PerformanceModeling and Evaluation of an Adaptive Mechanism for Packetized Audio over the Inter-net, M. Bernardo, R. Gorrieri, M. Roccetti, June 1998.

98-10 Value Passing in Stochastically Timed Process Algebras: A Symbolic Approach based on Lookahead, M.Bernardo, June 1998.

98-11 Structuring Sub-Populations in Parallel Genetic Algorithms for MPP, R. Gaioni, R. Davoli, June 1998.

98-12 The Jgroup Reliable Distributed Object Model, A. Montresor, December 1998 (Revised March 1999).

99-1 Deciding and Axiomatizing ST Bisimulation for a Process Algebra with Recursion and Action Refinement, M.Bravetti, R. Gorrieri, February 1999.

99-2 A Theory of Efficiency for Markovian Processes,M. Bernardo, W.R. Cleaveland, February 1999.

99-3 A Reliable Registry for the Jgroup Distributed Object Model, A. Montresor, March 1999.

99-4 Comparing the QoS of Internet AudioMechanisms via FormalMethods, A. Aldini, M. Bernardo, R. Gorrieri,M. Roccetti, March 1999.

99-5 Group-Enhanced Remote Method Invocations, A. Montresor, R. Davoli, O. Babaoglu, April 1999.

99-6 Managing Complex Documents Over the WWW: a Case Study for XML, P. Ciancarini, F. Vitali, C. Mascolo,April 1999.

99-7 Data-Flow Hard Real-Time Programs: Scheduling Processors and Communication Channels in a DistributedEnvironment, R. Davoli, F. Tamburini, April 1999.

99-8 The MPS Computer System Simulator, M. Morsiani, R. Davoli, April 1999.

99-9 Action Refinement, R. Gorrieri, A. Rensink, April 1999.

99-10 Proceedings of the Workshop on Virtual Documents, Hypertext Functionality and the Web, M. Milosavljevic,F. Vitali, C. Watters, May 1999.

99-11 AnAlgebraicModel for Evaluating the Performance of an ATM Switch with Explicit RateMarking, A. Aldini,M. Bernardo, R. Gorrieri, June 1999.

99-12 Simulative and Experimental Analysis of an Adaptive Playout Delay Adjustment Mechanism for packetizedVoice across the Internet, M. Roccetti, V. Ghini e G. Pau, June 1999.

99-17 A Simple Game Semantics Model of Concurrency, Asperti A., Finelli M., Franco G., Marchignoli D., July1999.

A Simple Game Semantics Model of Concurrency

Andrea Asperti1 Michele Finelli2 Gianluca Franco3

Davide Marchignoli4

Technical Report UBLCS-99-17

July 1999

Abstract

This paper is a full and more detailed presentation of the work of Finelli and Marchignoli [8]. Thereason why we started investigating game semantics is whether it is possible to use the game model ofAbramsky, Jagadeesan and Malacaria (AJM games, for short), which has been shown suitable to modelClassical Linear Logic [6] and a functional language like PCF [1], to model a concurrent language.

The answer that we gave in the previous work is that the native AJM game model is not suitedto model the message passing paradigm of concurrency, but it is possible to modify their definitions in aconservative way so that it is possible to build a categorical model of a CCS-like process algebra whosegames are an extension of AJM games.

The main novelty with respect to the existing game categories [1, 6, 14], is the relaxation of the con-straint that players should alternate: the constraint we impose is that the players should alternate only ina round of the game, that is, every sequence of an odd and of an even move can not be played by the sameplayer, but we are free to choose if the first should be the Player or the Opponent (the Player / Opponentterminology is standard in game semantics to denote the two players of the game). Next, in our model,each move is associated with two new attributes: its value and its name. The value intuitively captureswhat it is carried by a channel, where the name is the semantic analogue of the channel: players alternateonly with respect to the names of the moves (i.e. you are not allowed to play moves with different nameswithin the same round), this means that the communication between two processes on a given channel isissued by two moves with same name, taken by different players.

We proceed as follows. In Section 1 the basic definitions about games are introduced and some basicproperty is stated. Section 2 introduces the category of games we work with and a particular construction— the exponential game — which is responsible for the modeling of a �-calculus like replication operator.The application of the category as a denotational semantics framework for a process algebra is achievedin Section 3 where a simple process algebra is introduced. Conclusions, work in progress and futuredevelopments are in Section 4.

We wish to thank Vincent Danos for his course on Game Semantics held in Bologna this summer: thefirst author started investigating game semantics after having attended to the inspired lessons of VincentDanos.

1. Dipartimento di Informatica, Universita di Bologna, Via Mura Anteo Zamboni, 7, 40127 Bologna, Italy.2. Dipartimento di Matematica, Universita di Siena, Via del Capitano, 15, 53100 Siena, Italy.3. Dipartimento di Matematica, Universita di Udine, Via delle Scienze, 208, 33100Udine, Italy.4. Dipartimento di Informatica, Universita di Pisa, Corso Italia, 40, 50100 Pisa, Italy.

1

1 The model

1 The model

In the following we assume the knowledge of the usual definitions about languages, such as theKleene star (�)�, andwewill systematically denote uv the concatenation of twowords u and v. Theempty word is ". Given a word w we will denote with jwj the length of w, and we will usuallywrite it down componentwise as w = w

1

; : : : ; w

jwj

. Given a partial function f : � �! � we willcall f� the standard (unique) extension of f to words in �

�.

1.1 Small moves and large games

Definition 1.1 (Moves). Given two countable sets - V of values and N of names - a set of moves is acountable set M with four functions �

M

, �M

, �M

and �M

such that

M

: M �! fO;Pg

M

: M �! V

M

: M �! N

M

: M �! fQ;Ag

(1)

It is usual to indicate as �� the function so defined

�(m) = O =)

�(m) = P

�(m) = P =)

�(m) = O

It is easy to check that ��� = �. It is custom to call MO the set of m 2 M such that �(m) = O

and similarly M

P the set of m 2 M such that �(m) = P . Intuitively the functions � and � givethe “interesting part” of a move: what it is played - the � - and where it is played - the � ; the �and the � are a sort of “book-keepers”, in that they indicate who is playing the move - the �, thatgives the player P or the opponent O - and which is the role of the move - the �, which gives theinformation about being the move a question Q or an answer A. Our terminology slightly differsfrom that of [1]: in their notation our � is �QA and our � is �OP , but the meaning we give to � isvery different from theirs, so we preferred to start with a completely different notation.Definition 1.2 (Rounds). Given a set of moves M as above, we define the set of rounds R

M

, as thefollowing set

R

M

= fm

0

m

00

j m

0

;m

00

2M �(m

0

) = �(m

00

) ^ �(m

0

) =

�(m

00

)g (2)

a finite string w of even length 2n is round formed if there exist r1

; : : : ; r

n

2 R

M

such that w =

r

1

r

2

: : : r

n

.The intuitive meaning of a round is that of the “smallest piece of a game” to whom may be

given a meaning per se. We think that the game interpretation of a computational structure, be ita functional language as many scholars have done, or an algebra of communicating processes, isfiner than other kind of semantics — in the sense that the smallest part of the model (the move)has no counterpart in the term language, it is the round that happens to have this property. Thisalso holds for AJM games, but it is never made explicit.

The choice of the property of Definition 2 is of fundamental importance, since it is determinedby the intuition of how to model the atomic components of the model: first of all we assume thatin a given round the player and the opponent must alternate, with no regard to whom is playingfirst or second, next we assume that only moves with the same namemay be playedwithin a round.A round formed sequence is a sequence of moves that is also a sequence of rounds.Definition 1.3 (Plays). Given a set of moves M and the corresponding set of rounds R

M

, we say thatP

M

is a play if it is a not empty, prefix closed, subset of finite sequences of rounds.The definition ensures that a play must, at least, have the empty sequence (i.e. " 2 P

M

). Weextend the functions �, �, � and � frommoves to sequences ofmoves (and so to rounds and plays)in the usual way, and we indicate these functions on strings as ��, ��, �� and �

� respectively. Aplay is the set of “histories” of what has been played (sometimes these histories are also calledruns).

UBLCS-99-17 2

1 The model

Remark 1.1. With a slight abuse of notationwe will almost always talk about a play P built on themoves M , intending the play built on the sequences of rounds whose support is M . Similarly,when it needed to show that a certain prefix closed set of sequences is also a play, it will be provedthat the every even length sequence is round formed, and it will be assumed that it is clear formthe context if we are talking about a sequence of moves (that also holds odd length sequences —rounds not already completed) or about a sequence of rounds.

Now we are almost ready to define games: we need another tool, that is necessary to copewith the problem of having many syntactically different ways to describe essentially the samegame. We want a description of the plays and of the strategies of a game that is independentfrom the syntactical format of the movesm 2M : we will require that the plays of a game (and sothe strategies, which are a particular kind of plays) satisfies an equivalence relation that we callfilling relation.Definition 1.4 (Filling relation). Given a play P and an equivalence relation � on P , we say that � isfilling if it satisfies

� a condition on the projections: for all s1

; s

2

2 P

s

1

� s

2

=) �

(s

1

) = �

(s

2

) ^

(s

1

) = �

(s

2

) ^

(s

1

) = �

(s

2

) ^

(s

1

) = �

(s

2

)

(3)

� a prefix-closure condition: for all s1

; s

2

2 P and for allm1

;m

2

2M

s

1

m

1

� s

2

m

2

=) s

1

� s

2

(4)

� and an extendibility condition: for all s1

; s

2

2 P and for allm1

2M

s

1

� s

2

^ s

1

m

1

2 P =) 9m

2

2M s

1

m

1

� s

2

m

2

(5)

It is easy to check that � is a length preserving equivalence relation on P .Given a set of sequences A with a filling relation � and A

0

� A we define [A

0

]

A

= fa 2 A j

9a

0

2 A

0

a

0

� ag and we will say that the set A0 is saturated if A0 = [A

0

]

A

. Observe that thesaturation [�]

A

is done with regard to a fixed superset A of A0: with a slight abuse of notationwe leave off the index A, since the saturation is usually performed on plays, and so the set A isimplicitly assumed to be the set of all sequences of moves.Remark 1.2. Clearly the notion of saturation strongly depends on the filling relation � uponwhich it is built, moreover the concept of saturated plays (and saturated strategies) is impor-tant only in the setting of Section 2.1, when we will extend the linear games of this section withnonlinearity. To quote from [6]

“ : : : (the equivalence relation) only forgets about the names of the threads in theexponential constructs : : : ”

but here we have no nonlinear games (exponential games in the above terminology) and so wewill forget about � in the following definitions.

The filling relation — as the word suggests — is used to define those plays where there isno hole (i.e. every playable site is filled with a move). The definition is sound, as the followingLemmata show.Lemma 1.1 (Sub-play). Given � a filling relation over P and a saturated play P 0

� P , � \(P

0

� P

0

)

is a filling relation.

Proof.The first property (Equation 3) is obvious; the second (Equation 4) holds since P 0 is prefixclosed; Equation 5 holds since if s

1

� s

2

and s

1

m

1

2 P

0 then s

1

m

1

2 P and so there exists m2

such that s1

m

1

� s

2

m

2

and so s2

m

2

2 P

0

Lemma 1.2. If P is a play (w.r.t. M�), so it is [P ] (w.r.t. M�).

UBLCS-99-17 3

1 The model

Figure 1. The boolean game

O

n

t

P

n

@

@

@R

f

P

n

Proof.We have to show that [P ] satisfies the conditions of being a not empty, prefix closed subsetof finite sequences of movesM and that each even sequence is round formed:

� P � [P ] and P is not empty, so [P ] is not empty,� s 2 [P ] implies that 9t 2 P such that t � s and so jtj = jsj: since t is of finite length so it is s,� sm 2 [P ] =) 9tn 2 P sm � tn so by Equation 4 s � t and since P is prefix closed t 2 P sos 2 [P ],

� lastly, since Equation 3, s 2 [P ] has the same image under � and � of a t 2 P , so it is roundformed.

This ends the proof.

Lemma 1.3. For every play P , [P ] = [[P ]].

Proof.By definition.

Remark 1.3. Another note on the importance of the filling relation. The reader may wonder if,getting rid of the exponential games, there could be no reason to keep an equivalence on moves,or, put in other terms, if the notation could be simplified.

The answer is negative. The fact that there is the need of an equivalence on the moves (and onthe plays and on the games) is shown by the observation that may be used syntactically differentnotations for the same game. The simplest meaningful example is the game of an atomic action(see Figure 2). We may take two different representation of the game of an atomic action a:the game A

1

= (fm

0

;m

1

g; ";m

0

;m

0

m

1

; id) and the game A2

= (fn

0

; n

1

g; "; n

0

; n

0

n

1

; id), withm

0

6= n

0

and m

1

6= n

1

, but with m

0

and n

0

having the same projections (namely �(m

0

) = O,�(m

0

) = �, �(m0

) = a and �(m

0

) = Q), and similarly form1

and n

1

.Now, A

1

and A

2

are completely different games, and there is absolutely no way to get afunction between them that behaves like the identity, if it were not for the fact that we maydeclare thatm

0

� n

0

andm

1

� n

1

.The problem arises because every game may be assumed to be built from a distinct set of

moves. In this way the filling relation is a tool that allows us to work with syntactically differentgames as if they were a sort of canonical representative of the same abstract game.Definition 1.5 (Games). A game A is a triple (M

A

; P

M

A

;�

P

M

A

), whereMA

is a set of moves, PM

A

isa play with the moves M

A

and �P

M

A

is a filling relation on P

M

A

. To avoid a cumbersome notation, wewill write the game A as (M

A

; P

A

;�

A

) or (M;P;�), or simply A = (M;P ) if we do not need to specifythe filling relation. With a slight abuse of notation, we will set [A] as the game (M

A

; [P

A

];�

A

).In the following we will writeG for the set of all games.

Observe that in general, given a set of moves, we have (a possibly infinite number of) manydifferent set of plays, and so many different possible games. The usual examples are the booleangames of Figure 1 and, in our model, the constant game played with moves of various names ofFigure 2, corresponding to atomic prefixing in CCS (more on that later in Section 3).

1.1.1 Notation

This is the place to describe the notation that we will use. It is often very cumbersome to de-scribe games following the previous definitions (compare with [5] for example, for a completely

UBLCS-99-17 4

1 The model

Figure 2. The action games

O

n

?

P

n

P

n

?

O

n

different kind of game), so to keep things simple we will denote each movem 2M as

v

xy

n

where v is �(m), n is �(m), x is �(m), y is �(m) and the move is put under the sub-game in which itis played.

Moreover we convene to use the symbol � for the value of a question move, and that everyother move, whose � is not specified, has to be thought as an answer.

The plays are displayed as Hasse diagrams [7], since the prefix closure condition allows us amore compact tree notation. Last but not least, when the game is given by the diagram of a play,the underlining set of moves has to be taken as the least set of moves that allows the definitionof the play, and the filling relation, when not otherwise specified, is the identity relation. So theexample of Figure 1 is a shortcut for the game (M;P;�)where

� M = fm

0

;m

1

;m

2

g

� m

0

7�! O;m

0

7�! �;m

0

7�! n;m

0

7�! Q

� m

1

7�! P;m

1

7�! t;m

1

7�! n;m

1

7�! A

� m

2

7�! P;m

2

7�! f;m

2

7�! n;m

2

7�! A

� P = f";m

0

;m

0

m

1

;m

0

m

2

g

� �

P

= f("; "); (m

0

;m

0

); (m

0

m

1

;m

0

m

1

); (m

0

m

2

;m

0

m

2

)g

Whenwe do not use the graphical notation,wewrite the set of all the prefixes of all the sequencesin A as APC , so the non graphical notation for the game of Figure 1 is

M = f�

O

n

; t

P

n

; f

P

n

g P = f�

O

n

t

P

n

; �

O

n

f

P

n

g

PC

P

= f(u; v) j u = vg

1.2 Building games

Having defined what are the objects of our study — the games — we will describe some con-structions on games

� the dual game (or perpendicular game): (�)?

� the parallel composition of games: �

� the sequential composition of games: ;

� the sum (non deterministic choice) of games: +

� the restriction of a game on a set of movesM : (�)nM .

to define whom we need some operations on the moves (the sum of two sets of moves and thedual notion of parenthood), on the relations (themerge of two relations), on the plays (the projectionon a set of moves) and then some properties of sequences and of set of sequences (the notion ofbalancedness and that of generating set).

The first construction is that of sum of set of moves: until Section 2.1 the only way to combinemoves will be through their sum (and we will see that the bang construction is nothing morethan a denumerable disjoint sum).Definition 1.6 (Sum of moves). Given two sets of moves M

1

and M2

we defineM = M

1

]M

2

as the

UBLCS-99-17 5

1 The model

disjoint sum ofM1

andM2

. So we have four unique functions �M

, �M

, �M

and �M

defined as

M

= [�

M

1

; �

M

2

]

M

= [�

M

1

; �

M

2

]

M

= [�

M

1

; �

M

2

]

M

= [�

M

1

; �

M

2

]

(6)

Since the sum of moves allow us to put together two plays, we need a function — the parentfunction— that gives us the way to recover the sub-play where a move has been played.Definition 1.7 (Parent). Given a setA]B we define the parent function p : A]B �! f1; 2g as follows

9a 2 Ax = in

l

(a) =) p(x) = 1

9b 2 B x = in

r

(b) =) p(x) = 2

and similarly if we have an arbitrarily (countable) disjoint sum, instead of a binary sum, p : !�A �! !,we say that p(k; a) 7�! k. A sequence w satisfies the parent condition if

8i p(w

2i+1

) 6= p(w

2i+2

) =) �(w

2i+1

) = �(w

2i+2

) (7)

The intuitive meaning of the parent condition is that in some game (in particular the parallelgame) we will not allow a sub-game to answer a move that has not been asked to him (and viceversa). The parent condition means exactly that: if you are allowed to switch in a given roundbetween two sub-games, then you may only copy the request to somebody or copy the answerback to his source.

Now we need to define the projection of a game on a set of moves, and this is done definingthe notion of projection of a sequence of moves w on a subset of its moves.Definition 1.8 (Projection). Given a word w 2 (M

1

]M

2

)

� we define wjM

1

the projection of w on thesetM

1

as the unique word x 2M

1

such there exists �0

: : :�

jxj

2M

2

and

w = in

r

(�

0

)in

l

(x

1

)in

r

(�

1

)in

l

(x

2

) : : : in

l

(x

jxj

)in

r

(�

jxj

) (8)

symmetrically we define wjM

2

.Lemma 1.4 (Interleaving). Given x; y 2 P

A

with MA

= M

1

]M

2

, then if xjM

1

1

y

jM

1

, xjM

2

2

y

jM

2

and p�(x) = p

(y) then ��(x) = �

(y), ��(x) = �

(y), ��(x) = �

(y) and ��(x) = �

(y).

Proof.By induction on jxj.

So long for moves. Now let us tackle the operations on relations and sequences.Definition 1.9 (Merge). Given two plays P

1

on the set of moves M1

, P2

on the set of moves M2

andtheir filling relations �

1

and �2

, we define themerge relation �1

� �

2

on P as

1

� �

2

= f(u; v) 2 P � P j 8n p(u

n

) = p(v

n

) ^

8i u

jM

i

i

v

jM

i

g

(9)

where p is the parent function onM1

]M

2

and P is a play defined onM1

]M

2

such that PjM

1

� P

1

andP

jM

2

� P

2

.Proposition 1.5. If �

1

and �2

are filling relations for the plays P1

and P2

— respectively defined on theset of moves M

1

and M2

— then �1

� �

2

is a filling relation for every play P defined on M

1

]M

2

thatsatisfy the properties P

jM

1

� P

1

and PjM

2

� P

2

.

Proof.We have to show that Equations 3, 4 and 5 hold. Assume that for all s0; s00 2 P we haves

0

1

� �

2

s

00, this means that for all indexes n we have p(s

0

n

) = p(s

00

n

), s0jM

1

1

s

00

jM

1

and

s

0

jM

2

2

s

00

jM

2

. Now apply the Interleaving Lemma 1.4 and Equation 3 is proved5.

5. In general, given two sequences x and y with the same projections over two sequences a and b, we are not allowedto deduct that x = y. But if x and y have the same interleaving pattern they can not be unequal sequences (if it were so,there would be two different subsequences of a given sequence — x

ja

and y

ja

or xjb

and y

jb

— of the same length, and

this is obviously impossible).

UBLCS-99-17 6

1 The model

Equation 4 is proved as follow: assume that s0; s00 2 P , m0

;m

00

2 M and s

0

m

0

1

� �

2

s

00

m

00,by definition p(m

0

) = p(m

00

) and assume without loss of generality that p(m0

) = 1. So we gets

0

jM

2

2

s

00

jM

2

and s

0

m

0

jM

1

1

s

00

m

00

jM

1

. This implies that s0jM

1

1

s

00

jM

1

and that is enough to asses

that s0 �1

� �

2

s

00.Equation 5 is similarly proved, since it holds on each projection of s0 and s

00. To end theproof, note that to have s0

jM

i

i

s

00

jM

i

we must assume that s0jM

i

; s

00

jM

i

2 P

i

, and this means thatP

jM

i

� P

i

.

We need two more notions, useful for the construction of the sequential game and of totalgames (i.e. games which end).Definition 1.10 (Generators). The set Gen(P) of generators of a play P is the set

Gen(P ) = fg 2 P j6 9g

0

gg

0

2 Pg

a play P is generated if P = Gen(P )

PC

Remark that it could happen that the set Gen(P ) is empty even if P is not an empty play: takethe play in which there is each finite sequence of actions

P = fw j w = (�

O

n

P

n

)

k

8kg

it is clear that it does not exist any finite sequence g 2 P satisfying the above definition, thesolution given by the infinite sequence of actions is ruled out because it does not belong to P . Ingeneral if the game is finite (and thismeans that there exist a finite bound on themaximum lengthof the plays of P ) then the prefix closure ofGen(P ) is equal toP . The set of the generators of a playP is an easy and intuitively clear way to present the set of possible plays in a compact notation,but the reason for the definition is not simply notational, because the set of the generators of aplay is necessary to correctly define the sequential game and to deal with recursive games.Definition 1.11 (Balancedness). A string w is balanced if it is of even length, a game A = (M

A

; P

A

)

is balanced if and only if every w 2 Gen(PA

) is balanced. We will use the notation Bal(P ), to denote theset of the balanced strings of P .

The intuition behind the definition of balanced games is that they are the only games that canbe defined as a sequence of rounds. In a certain sense they are the games in which no one is stuck(i.e. the game with only one move for the opponent and no moves for the player is not balanced).

The perpendicular game is the game in which the roles of the opponent and of the player areswitched. In that sense it is a sort of negation game (the interpretation of the switching betweenthe players as negation is typical of every game model).Definition 1.12 (Perpendicular). Given a game A, we define A? as

M

A

? = M

A

P

A

? = P

A

A

? = �

A

A

? = �

A

A

? =

A

A

?= �

A

A

? = �

A

(10)

Proposition 1.6. If A is a game, so it is A?. If A is saturated, so it is A?.

Proof.By definition.

Some properties of ? are its idempotency (A?? = A), and its linearity on the operation of thedisjoint sum ((M ]N )

?

= M

?

]N

?).

UBLCS-99-17 7

1 The model

To simplify the notation, let�(w) be the proposition saying thatw is round formed (Definition1.2) and satisfies the parent condition (Definition 1.7). In formulas this means that

�(w) () jwj = 2n ^ 8i � n

�(w

2i+1

) = �(w

2i+2

)^

�(w

2i+1

) =

�(w

2i+2

)^

p(w

2i+1

) 6= p(w

2i+2

) =) �(w

2i+1

) = �(w

2i+2

)

(11)

clearly w belongs to a play and so �, �, p and � are uniquely determined by the context in which� is placed.Definition 1.13 (Parallel). Given two games A = (M

A

; P

A

;�

A

) and B = (M

B

; P

B

;�

B

) we definethe parallel game A �B = (M

A�B

; P

A�B

;�

A�B

), as

M

A�B

= M

A

]M

B

P

A�B

= fw 2M

A�B

j w

jM

A

2 P

A

^

w

jM

B

2 P

B

^ �(w)g

A�B

= �

A

� �

B

on PA�B

(12)

recall that p is the parent function onMA

]M

B

, and the functions �A�B

, �A�B

, �A�B

and �A�B

are givenas in Definition 1.6 onM

A�B

.Observe that, in general the set of rounds R

A�B

is bigger than the union of the sets RA

andR

B

, but every allowed round in R

A

]R

B

is also in R

A�B

Proposition 1.7. If A and B are games then A �B is a game.

Proof.Wehave to show thatMA�B

is a set ofmoves, PA�B

is a play and�A�B

is a length preservingequivalence relation as in Definition 1.4. The first requirement is satisfied by definition. To showthat P

A�B

is a play we need to show that1. it is a subset of sequences of moves,2. each sequence w is finite,3. it is prefix closed,4. every sequence is round formed.Properties 1), and 4) are also immediate because of the definitions, 2) is also true because w is

the interleaving of two finite sequences, and so it is finite. The case that needs care is the third:we will prove it by induction. The empty word is in P

A�B

; if wm 2 P

A�B

then:a) wm is round formed and w is, too,b) either (w)

jM

A

m 2 P

A

^ w

jM

B

2 P

B

or wjM

A

2 P

A

^ (w)

jM

B

m 2 P

B

, and this implies thatw

jM

A

2 P

A

^ w

jM

B

2 P

B

c) if the “parent condition” is satisfied on wm then it is satisfied on w a fortiori.These three conditions mean that, if wm fulfills the requirements to belong in P

A�B

then w fulfillsthem too, and so P

A�B

is a prefix closed set. The last requirement — about the filling relation —is satisfied by the definition of �

A�B

as �A

� �

B

, see Theorem 1.5.

Proposition 1.8. If A and B are saturated games, so it is A �B

Proof.It is enough to show that [A] � [B] = [A �B]:

x 2 [A] � [B] () x

jM

A

2 [P

A

] ^ x

jM

B

2 [P

B

] ^�(x)

() 9a 2 P

A

9b 2 P

B

x

jM

A

A

a ^ x

jM

B

B

b ^ �(x)

() 9z 2M

A�B

p

(z) = p

(x) ^ z

jM

A

� x

jM

A

^

z

jM

B

� x

jM

B

^ z

jM

A

2 P

A

^

z

jM

B

2 P

B

^�(z)

() 9z 2 P

A�B

z �

A

� �

B

x

() x 2 [P

A�B

]

So [A] � [B] = [A �B] and A �B is saturated.

UBLCS-99-17 8

2 The category of games

Sometimes we will talk about the sub-games A and B of the gameA �B.Definition 1.14 (Sequential). Given two games A = (M

A

; P

A

;�

A

) and B = (M

B

; P

B

;�

B

),we de-fine the sequential game A;B as follows

M

A;B

= M

A

]M

B

P

A;B

= fuv 2M

A;B

j u

jM

A

2 Bal(Gen(PA

)) ^ v

jM

B

2 P

B

g [

fu 2M

A;B

j u

jM

A

2 P

A

^ u

jM

B

= "g

A;B

= �

A

� �

B

on PA;B

(13)

Observe that in general A;B 6= B;A.Definition 1.15 (Sum (choice)). Given two games A = (M

A

; P

A

;�

A

) and B = (M

B

; P

B

;�

B

), wedefine the sum game A +B as follows

M

A+B

= M

A

]M

B

P

A+B

= fu 2M

A+B

j (u

jM

A

2 P

A

^ u

jM

B

= ") _

(u

jM

A

= " ^ u

jM

B

2 P

B

)g

A+B

= �

A

� �

B

on PA+B

(14)

Observe that both�A;B

and�A+B

are defined as�A

� �

B

.Proposition 1.9. If A and B are games, so are A;B and A+ B.

Proof.Easy, following the pattern of Theorem 1.7.

Proposition 1.10. If A and B are saturated games, so are A;B and A+ B.

Proof.Following Theorem 1.8 and the Interleaving Lemma 1.1.

The restriction game depends heavily on the encoding of the process algebra and so its defi-nition will be postponed until Section 3, where various kinds of restriction are given.

2 The category of games

In this section, we will define a notion of morphism between games, so to get a category of gamesin which the objects of the category are the games previously defined, and every operator willbe easily extended to an endofunctor of the category. The key definition is that of strategy, whichdetermines how the first and the second player of a roundmay answer each other (i.e. you shouldintuitively think to a strategy as a way to specify how should a run of a game be played, but amajor difference with [1] is that in AJM-games you define how the Opponent answers to Player’smoves — or simmetrically, if the game is started by the Opponent — in our games, instead, weare not able to determine who moves first, so we must specify, in any given round, how thesecond palyer answers to the first, be him the Player or the Opponent).Definition 2.1 (Strategy). A strategy � on a game A = (M

A

; P

A

;�

A

) is a not empty prefix closedsubset of P

A

with the property that for all s 2 �

jsj = 2k + 1 =) (9m 2M

A

sm 2 P

A

=) 9m

0

2M

A

sm

0

2 �) (15)

Observe that� P

A

is round formed by definition, so it is any of its subsets, and that means that � is roundformed, too,

� the empty play f"g is a strategy for each game.Intuitively a strategy is a particular kind of play in which, when you may continue to play — i.e.when you may end a round — you must do so. Thinking to the rounds as the atomic steps ofa run of a game, this exactly capture the intuition of strategy as a way of never getting stuck, orequivalently, to always be able to answer to the first player’s last move. Observe that the definitionhas not yet addressed the issue of winning the game, that is another topic of its own: it says only

UBLCS-99-17 9

2 The category of games

that, before winning the game, you must be able to finish it. The complementary notion is thatof totality, which means, in this context, that not only the second player may always reply to thefirst, but also that a player must always start a new round if it can.Definition 2.2 (Totality). A strategy � on a game A = (M

A

; P

A

;�

A

) is total if, for all s 2 �

8m 2M

A

(sm 2 P

A

^ jsj = 2k) =) sm 2 � (16)

A total strategy is a play in which you play every possible move: the totality condition bindsthe first player to start every possible round and the definition of strategy says that there is alwaysthe way to close them.

If we are interested in modeling functional programming then the notion of totality roughlycorrespond to that of winning, since a never ending strategy would mean that the underlyingalgorithm never ends — never returns a value. But in the study of reactive systems, in which thevalue of the computationdoes not exist at all, themeaning of the computational structure is givenby other “observabilia” and the notion of totality is not good enough to capture the result of thecomputation.

Observe that a total strategy is defined by a �

k logical formula since the quantification overthe moves has the pattern 8 9 8 : : : while a strategy that is not total is not so — by the way weshould remark that the empty play f"g is a total strategy only for games whose set of plays isempty.Definition 2.3 (Determinism). A strategy � is deterministic if

8sm 2 � (jsj = 2k ^ smn

0

2 � ^ smn

00

2 �) =) n

0

= n

00

A deterministic strategy is a strategy in which there is only one possible move n (equal to n0

and n

00 in the above terminology) that closes the round opened by the move m (the existentialquantification of Equation 2.1 is satisfied by an unique value). A further refinement of determin-istic strategies is given by the notion of memoryless, that binds the second player to choose itsfuture move only as a function of the previously played one.Definition 2.4 (Memoryless). A strategy � is memoryless if there exist a function f : �(M ) �! M

such that

8smn 2 � (jsj = 2k =) n = f(�(m))

A memoryless strategy is necessarily deterministic, and the choice of n may be done onlylooking at the value of the last move playedm. Lastly, recall the definition of saturation given in theprevious section, which was given to get saturated strategies (as in [6]).Definition 2.5 (Saturation). Given a game A = (M

A

; P

A

;�

A

) and a strategy � on A, we define [�],the saturation of � as the set [�] = fs 2 P

A

j 9s

0

2 � s

0

A

sg we will say that � is saturated if� = [�].

Obviously, we must prove that the operation of saturating a strategy is harmless.Lemma 2.1. The saturation of a strategy is a strategy.

Proof.We already know that the saturation of a play is again a play, so [�] is a play.Next, take s 2 [�] and suppose that jsj = 2n + 1 (otherwise we are finished), we must show

that if there exists m 2 M such that sm 2 P then there exists m0

2 M such that sm0

2 [�]. If,for every m 2 M , sm is not in P , there is nothing to prove, otherwise let �m be a move such thats �m 2 P .

Because of s 2 [�] there is t 2 � such that s � t and since s �m 2 P , by Equation 5 of Definition1.4, there must be �n 2M such that s �m � t�n, and so t�n 2 P . Now, since the equivalence of s andt, we have t 2 �, jtj = 2n + 1 and we have just proved that there exists a move n 2 P such thattn 2 P (take n = �n).

Since we assume that � is a strategy there exists n0 such that tn0 2 � and also tn0 2 P . Now,applying again Equation 5, we have that t � s and tn

0

2 P implies that there is m0 such thatsm

0

� tn

0. So, in the hypothesis that there exists m such that sm 2 P , there exists also m0 suchthat sm0

� tn

0 where tn0 2 � and this implies that sm0

2 [�].

UBLCS-99-17 10

2 The category of games

This theorem explains (at last !) the meaning of the properties asked for� :� the condition on the projections is required to identify, modulo � , the moves,� the prefix closure condition is needed for Theorem 1.2, (i.e. saturation brings plays toplays),

� the extendibility condition is needed for the previous theorem (i.e. saturation brings strate-gies to strategies).

Remark 2.1. Perhaps it is better to stress that a strategy is always (albeit implicitly) defined upona game, so over a well known set of moves, plays and a well defined filling relation. For thisreason a strategy inherits the filling relation of the set of plays of whom it is a subset. This isimportant when we will talk about saturated strategies because the saturation is always definedwith reference to a relation: it has to be taken as the relation of the game uponwhich the strategyis defined.

We will show that there are many ways to define the morphisms between games. This shouldnot be surprising, as the “usual” way to get a model of games (a.e. see [1], [15]) is to build alinear category and then get a full model via the co-Kleisli construction on it (a trick that wewill use, too). There are three kinds of morphisms: sequential, (concurrent) linear and co-Kleisliconstruction on the linear category.

(G; �

B

?

;B

) � (G; �

I

B

) � (G; �

B

)

The index f in �f

is the identity function of the category (�B

is the dereliction on B, IB

is thecopy-cat map and B

?

;B is nothing more than that game).Now we are ready to define the arrows of the category.

Definition 2.6 (Morphisms). The morphisms of the categories are defined as particular strategies ongames. Now we will define the (linear) parallel and the sequential morphisms: a parallel morphism � :

A �! B is a saturated strategy � on the game A? �B, a sequential morphism � : A �! B is a saturatedstrategy � on the game A?;B.

The definitions of totality, determinism and memoryless on morphisms are the obvious ex-tensions of the definition on strategies. Note that it is easy to prove that, if � is a total strategy,so it is [�], while, in general, that does not hold for the properties of being deterministic andmemoryless.Remark 2.2. To simplify a bit the notation, we will write A for both the game A and the fullstrategy P

A

. Note also that this strategy is always saturated. It will be clear from the context ifwe are talking about games or about strategies between games.

Besides, when we talk about (linear) parallel morphisms (i.e. saturated strategies over thegame A? �A) we will denote their type as a linear implication A ��A, because it is the canonicallinear logic terminology (and we will use these game also as a model of Linear Logic [10]). So,when we want to stress that a morphism f : A �! B is a linear one, we will write f : A��B

Definition 2.7 (Identities). Given a game A the parallel identity morphism I

A

: A �! A is given bythe copy-cat strategy:

M = M

A

?

�A

I

A

= fw 2M

j w

jM

A

2 P

A

^ w

jM

A

?

2 P

A

?^

p(w

2i+1

) 6= p(w

2i+2

) ^ w

jM

A

A

(w

jM

A

?

)

?

g

I

A

= �

A

?

�A

(17)

while the sequential identity morphism is simply the full set of plays of the game A?;A.The following theorems guarantee that the identities are sound.

Lemma 2.2. IA

is a strategy on A? �A.

Proof.Check that IA

is a play: since IA

contains the empty sequence, it is a not empty subset ofA

?

� A; every sequence w 2 I

A

is got by two finite sequences in P

A

and P

A

? hence it is finite;lastly it is prefix closed. Indeed, given wm 2 I

A

if the condition wm

jM

A

2 P

A

, wmjM

A

?

2

P

A

? , p(wm2i+1

) 6= p(wm

2i+2

) and wm

2i+1

I

A

wm

?

2i+2

is satisfied by every i then w

jM

A

2 P

A

,

w

jM

A

?

2 P

A

?, p(w

2i+1

) 6= p(w

2i+2

) andw2i+1

I

A

w

?

2i+2

is also satisfiedby every i and sow 2 I

A

.

UBLCS-99-17 11

2 The category of games

Next, IA

satisfies Definition 2.1: if jsj = 2k + 1 then s must be in the form t in

l

(m) withm 2 M

A

or t inr

(m) with m 2 M

?

A

. Suppose that the s = t in

l

(m) holds: m 2 M

A

implies thatm

?

2 M

A

?and p(m) 6= p(m

?

), so m?

I

A

m and by construction of IA

then s in

r

(m

?

) 2 I

A

—symmetrically if s = t in

r

(m) — so Equation 15 is satisfied. The same reasoning shows that IA

isalso total.

Lemma 2.3. IA

is saturated.

Proof.Since the definition of IA

:

s 2 I

A

^ t �

I

A

s =) s

2i+1

I

A

s

?

2i+2

^ 8k t

k

I

A

s

k

=) t

2i+1

I

A

s

2i+1

I

A

s

?

2i+2

I

A

t

?

2i+2

=) t

2i+1

I

A

t

?

2i+2

=) t 2 I

A

the last equation implies that t 2 [I

A

] so IA

= [I

A

].

Proposition 2.4. IA

is a morphism of type A �! A

Proof.By the previous theorems, IA

is saturated strategy on the game A? �A.

Definition 2.8. For each game A, we may define the empty arrow "

A

: A �! A as the strategy

M = M

A

?

�A

"

A

= f"g

"

A

= �

A

?

�A

(18)

To prove that we get a category of games we have to define an operation of composition be-tween strategies, andwe have to show that the categorical laws of associativityof the compositionand of the existence of the identity morphisms hold [3]. In our model the composition betweenmorphisms is the interaction between two strategies, that play one against the other. To lighten theburden of the notation we need two auxiliary functions, that we call HT (the head-tail function)andMB (the middle-body function).Definition 2.9 (Dismembering functions). The function

HT

A;B;C

: ((M

A

? ]M

B

) ] (M

B

? ]M

C

))

�! (M

A

? ]M

C

)

is the extension to the sequences of the function

ht

A;B;C

: (M

A

? ]M

B

) ] (M

B

? ]M

C

) �!M

A

? ]M

C

so defined, 8m 2 (M

A

? ]M

B

) ] (M

B

? ]M

C

)

9a 2M

A

? m = in

l

(in

l

(a)) =) ht(m) = in

l

(a)

9c 2M

C

m = in

r

(in

r

(c)) =) ht(m) = in

r

(c)

the function

MB

A;B;C

: ((M

A

? ]M

B

) ] (M

B

? ]M

C

))

�! (M

B

? ]M

B

)

is the extension to the sequences of the function

mb

A;B;C

: (M

A

? ]M

B

) ] (M

B

? ]M

C

) �!M

B

? ]M

B

so defined, 8m 2 (M

A

? ]M

B

) ] (M

B

? ]M

C

)

9b 2M

B

?m = in

r

(in

l

(b)) =) mb(m) = in

l

(b)

9b 2M

B

m = in

l

(in

r

(b)) =) mb(m) = in

r

(b)

UBLCS-99-17 12

2 The category of games

Definition 2.10 (Composition). Given two strategies � : A �! B and � : B �! C, we define� � � : A �! C as follows:

� � � = fHT

A;B;C

(w) j w 2 � � � ^ MB

A;B;C

(w) 2 I

B

g (19)

Lemma 2.5. The composition of two plays is again a parallel play.

Proof.This lemma guarantees that plays are closed under �. To prove the lemmawe must simplyshow that � � � contains those sequences w that are the interleaving of two sequences in � and �

and that �(w) holds.This is shown in two steps, first of all we show that every even length sequence in w 2 � �� is

round formed: for all i � b(jwj=2)c we have that �(w2i+1

) = �(w

2i+2

) and �(w

2i+1

) =

�(w

2i+2

);next that w satisfies the parent condition: for all i � b(jwj=2)c we have that p(w

2i+1

) 6= p(w

2i+2

)

implies �(w2i+1

) = �(w

2i+2

).Take a sequence x 2 � � �, this means that there exists a sequence w 2 � � � such that x =

HT

A;B;C

(w) andMB

A;B;C

(w) 2 I

B

. Now, if every round in x is played either in � or in � , thereis nothing to prove, else we may assume without loss of generality that there is a subsequencer

j

; : : : ; r

k+1

of rounds in x such that rj

2 �, rk+1

2 � and r

j+1

: : : ; r

k

2 I

B

and r

j

is played inthe two subcomponents of � and r

k+1

is played in the two subcomponents of � . For every such asubsequence it is immediate to observe that:

� the two moves in rj

have the same name and are played in alternation, by construction� the second move in r

j

and the first move in r

j+1

have the same name and are played inalternation, since this sequence is a valid round of I

B

and this is again true for every roundr

j+1

: : : r

k

that belongs to IB

,� the two moves in r

k+1

have the same name and are played in alternation , again by con-struction,

so the sequence w2j+1

w

2k+4

is a round. The same observation shows every round in IB

is playedon the two subcomponents of B?

� B and this happens also for the moves in r

j

and r

k+1

, so the� is constant all over the subsequence r

j

; : : : ; r

k+1

.

Remember that the filling relation of � � � is automatically defined as the merge relation�

A

? � �

B

on PA

?

�B

as every strategy, being defined over a specific game, automatically inheritsits filling relation.

We may define two kind of compositions for morphism defined as sequential strategies: ineither case we get a category, as the following theorems demonstrate.Theorem 2.6 (Well foundedness). Given � : A �! B and � : B �! C morphisms, their composi-tions � � � : A �! C is again a morphism.

Proof.We will carry on the proof only for morphisms defined as strategies on the game A? � B:the caseA?;B is similar. Wemust proof that � �� is a strategy (a play with additional properties)and that it is saturated.

First of all we will show that � � � is a play: it contains the empty string (it follows from thedefinition), it is a set of finite sequences (since every sequence s in it is shorter that a string s

0

such that s = HT

A;B;C

(s

0

) and s

0 is finite because it belongs to � � � ) and it is a prefix closedset of round formed sequences. This last property will be shown by induction, as for Theorem1.7. Assume that sm belongs to � � �, this means that there exists s0 such that sm = HT

A;B;C

(s

0

)

and that there exists a subsequence s00 of s0 such that s = HT

A;B;C

(s

00

). Now, since �, � and I

B

are strategies, they are prefix closed, too, and this means that s00jM

A

?

]M

B

2 �, s00jM

B

?

]M

C

2 � and

MB

A;B;C

(s

00

) 2 I

B

, and so s is in � � �. The round formed condition is automatically fulfilled bythe definition of composition, since we are taking round formed subsequences of sequences thatbelong to a parallel game.

Let us recall the definition of strategy: � � � is a strategy if for every s of odd length 9m 2

M sm 2 P =) 9m

0

2 M sm

0

2 � � �. Now, suppose that we have an odd length sequence s in� � �, this means that there exists an odd length sequence w in � � � such that s = HT

A;B;C

(w);that w is of odd length is shown observing that the run of w in I

B

could always be made of even

UBLCS-99-17 13

2 The category of games

length— since the definition of identity— and so, since the length of s is the sum of the length ofthe projection of w onM

A

? andM

C

, this means that either wjM

A

?

or wjM

C

is odd. Assume thatit is w

jM

A

?

and call it �w.Now, either � and � are strategies and this means that, if s could be extended with a move, so

must �w, and moreover the move can not always be played in the sub component ofB, because inthat case it may immediately be matched by its dual move in B

?, since the definition of identity.So – sooner or later, since I

B

contains only finite sequences — there must be a move inM

A

? . Weare concluded, because the projection of this new sequence is in � � �.

Last, we must show that � � � is saturated. Assume that w 2 � � � and v � w, we will showthat v belongs to � � �, too. To do so we will build a sequence v0 with the following properties:v

0

� w

0, v = HT

A;B;C

(v

0

), w = HT

A;B;C

(w

0

),MB

A;B;C

(v

0

) 2 I

B

andMB

A;B;C

(w

0

) 2 I

B

. Notethat if the above properties are fulfilled, since � and � are saturated by the hypothesis, we willhave that v belongs to � � �.

We build v

0 in steps with the following algorithm: for every k in f1; : : : ; jw

0

jg, look at theparent p(p(w0)), if it is a move in M

A

? or in M

C

, then set v0k

:= v

l

, where v

l

� w

l

and w

l

=

ht

A;B;C

(w

0

k

) — this may always be done because, by assumption,we are assuming that v � w—else, if p(p(w0)) is a move inM

B

orMB

? , simply set v0k

:= w

0

k

. It is immediate that v0 satisfies theneeded properties.

So � � � is a morphism.

Theorem 2.7 ( of the Ornithorhynchus). The following are categories:� (G; �

I

B

),� (G; �

B

?

;B

).

Proof.Wewill carry on the proof in full detail only to show the first statement, the same pattern iseasily applied to the case of the sequential category of games.

First of all we will show that there exist the identities: given � : A �! B we check � � IA

= �

and similarly IB

�� = �. Next wewill show that, given � : A �! B, � : B �! C and � : C �! D,the operation of composition is associative: � � (� � �) = (� � � ) � �.

Take a sequence x 2 � � I

A

, this means that there exists a sequence w 2 (A

?

� A) � � withthe property that every move in the first component of A? �A is matched by an equivalent dualmove in the second component and then that it is matched by (another) dual move — since thedefinition of composition — in the first component of �: but this means, since every strategy issaturated, that every move of x that is played in the first component is also present in the firstcomponent of �. This is enough to prove that � � I

A

� �, since it is given by construction that anymove in the second component of x is present in the second component of �. Now we repeat thesame reasoning, starting with a sequence x 2 � and we get that � � � � I

A

. This ends the proof.Obviously the same holds for the right identity I

B

� � = �.Take � : A �! B, � : B �! C and � : C �! D, we must show that ��(� ��) = (��� )��. Take

x 2 � � (� ��): this means that there exists a sequence w0 2 (� ��) � � such that x = HT

A;C;D

(w

0

)

andMB

A;C;D

(w

0

) 2 I

C

, and by the same reason there exists w00 2 � � � such that w0jM

A

?

�M

C

=

HT

A;B;C

(w

00

) andMB

A;B;C

(w

00

) 2 I

B

.We may so build a sequence z 2 (((M

A

? ]M

B

) ] (M

B

? ]M

C

)) ] (M

C

? ]M

D

))

� such that

(z

j(M

A

?

]M

B

)](M

B

?

]M

C

)

)

jM

A

?

]M

B

= w

00

jM

A

?

]M

B

(z

j(M

A

?

]M

B

)](M

B

?

]M

C

)

)

jM

B

?

]M

C

= w

00

jM

B

?

]M

C

z

jM

C

?

]M

D

= w

0

jM

C

?

]M

D

and moreover

HT

A;B;C

(z

j(M

A

?

]M

B

)](M

B

?

]M

C

)

) = w

0

jM

A

?

]M

C

UBLCS-99-17 14

2 The category of games

MB

A;B;C

(z

j(M

A

?

]M

B

)](M

B

?

]M

C

)

) 2 I

B

MB

A;C;D

(HT

A;B;C

(z

j(M

A

?

]M

B

)](M

B

?

]M

C

)

) ] z

jM

C

?

]M

D

) 2 I

C

HT

A;C;D

(HT

A;B;C

(z

j(M

A

?

]M

B

)](M

B

?

]M

C

)

) ] z

jM

C

?

]M

D

) = x

But S = (((M

A

? ]M

B

) ] (M

B

? ]M

C

)) ] (M

C

? ]M

D

))

� is isomorphic to T = ((M

A

? ]

M

B

) ] ((M

B

? ]M

C

) ] (M

C

? ]M

D

)))

�, so we may scramble z 2 S and rebuild it as z0 2 T . It isimmediate that, since the definition of z, z0 belongs to (��� )��. So we have shown that for everyx 2 � � (� � �) there exists exactly one sequence z from whom x is got, and that to each z therecorrespond exactly a z0 such that its projection is again x and also x 2 (� � � ) ��. This shows that� � (� � �) � (� � � ) � �.

The same construction holds if we start with a sequence x 2 (� � � ) � � so also (� � � ) � � �

� � (� � �) and this ends the proof: (G; �

I

B

) is a category.The reader may check that the same constructions allow us to show that also (G; �

B

?

;B

) is acategory. (In fact it is simply a matter of searching every � in the above proof and replacing itwith the sequential constructor — something that is better done by a word processor).

An important properties of the arrows is that, if f : A �! B is a morphism, so it is f? :

A

?

�! B

?. This is immediate to prove, since the definition of (�)?, and amounts to say that(�)

? is a covariant functor. This is not quite usual, since the behavior of the negation is that ofa contravariant endofunctor, as it happens in every other known game model. We will recover acontravariant operation when we will restrict ourself over those sub-games in which the alterna-tion between the players is fixed before the game starts (i.e. it is fixed in advance whether it is theopponent or the player that starts moving). Lastly we state the usual definition of isomorphism:Definition 2.11 (Isomorphisms). Two games A and B are isomorphic if there exists two arrows f :

A �! B and g : B �! A such that g � f = I

A

and f � g = I

B

. If two games A and B are isomorphic,we will indicate it as A �

=

B.

2.1 Exponential games

We will enrich the category of games with the comonoidal structure necessary to get the fullexpressiveness of PCF and CCS with recursion. The common feature is the introduction of a banggame !A.Definition 2.12 (Bang). Given a game A = (M

A

; P

A

;�

A

) we define the game !A as

M

!A

= ! �M

A

P

!A

= fw 2M

!A

j 8n 2 !w

j(n;M

A

)

2 (n� P

A

) ^ �(w)g

!A

= f(u; v) 2 P

!A

� P

!A

j 9� : ! �! ! permutation on !

8i � juj�

1

(u

i

) = �(�

2

(v

i

)) ^

8n 2 ! �

2

(u

j(n;M

A

)

) �

A

2

(v

j(�(n);M

A

)

)g

where the projection �

1

and �2

are defined on ! �M

A

, and �!A

(k;m) = �

A

(m), �!A

(k;m) = �

A

(m),�

!A

(k;m) = �

A

(m) and �!A

(k;m) = �

A

(m).Theorem 2.8. !A is a game.

Proof.Following the pattern of theorem 1.7. The same argument shows that P!A

is a play, andsince the definition, it is also immediate to observe that, if A is a saturated game, so is !A.

Observe that the linear negation (�)

? travels inside ! : (!A)? =!A

?. The operation of expo-nentiation (so called because this operation models the exponentials of Linear Logic) is more thenanother operation on games: it is a functor. To show that, we extend the bang construction fromobjects to arrows. Since � : A �! B is also a game, we define !� as the bang game of the game �.The definition is sound since we have the following theorem.Theorem 2.9. ! is an endofunctor of G.

UBLCS-99-17 15

2 The category of games

Proof.We have to show that I!A

=!I

A

and that for all � and � (of the right types) !��!� =!(� � � ).First of all, observe that in the play of a game !A there are not only sequences in whom the

first component of a move is always the same (i.e. sequences like (n;m

1

); : : : ; (n;m

k

)), but alsosequences like (n

1

;m

1

); : : : ; (n

k

;m

k

) where the markers n1

, : : : , nk

, of the threads on whom thegame is played are different. This immediately shows that in the game !A?�!B there are exactlyand only the sequences that belongs also to !(A

?

� B). This implies that, since in set theory wehave ! � (A ]B)

=

(! ]A)� (! ]B), also !I

A

is isomorphic to I!A

.The same observation also shows that !��!� is isomorphic to !(� � � ).

2.2 Miscellanea

Sequential strategies

An interesting subclass of games is given by those plays that are strategies on the gameA?;B. Ingeneral, � is not a strategy on P

A�B

(i.e. it is not a morphism !), because the play can never startinB if it has not ended in A, but they have some interesting properties. First of all they are closedby composition: if � is a strategy on A

?

;B an � is a strategy on B

?

;C then � � � is a strategy onA

?

;C. In the second place, there is a strategy, given by the full strategy of the game A?;A, thatact as the identity on sequential strategies.

G = G

op

The category is self dual. This means that for every property P that is true in the category the co-property P op is also a true property of the category. The fact simplifies the proof of the followingtheoremTheorem 2.10. The categoryG has neither initial objects nor terminal objects.

Proof.By duality it is enough to show that the category does not admit initial objects. Given agame A, the empty play is always a strategy on 1 �! A and the same holds true for the strategygiven by the full play P

A

. Since the definition of initial [3] there should be a unique morphism,but this is possible only if P

A

itself is empty. Remark that there are not initial (nor terminal)objects, even if we restrict to the full sub-category of total arrows, as the following total strategieson the game A �A? show:

0

= fw 2 P

A�A

? j p(w

2i+1

) 6= p(w

2i+2

)g

00

= fw 2 P

A�A

? j p(w

2i+1

) = p(w

2i+2

)g

Corollary 2.11. The category has neither products nor co-products.

Proof.If it were so assume that there is a product or a sum �, since A �

=

A 1 or A �

=

A � 1

implies that the category has terminal — respectively initial — objects, if we had products orsums, it could happen only for an operator ? such that A 6

=

A ? 1; but for every ? 2 f+; �; ; gwehave A �

=

A ? 1.

I think we already met somewhere : : :

The game model G has an important link with Linear Logic, as it was promised in the introduc-tion: Abramsky, Jagadeesan andMalacaria’s games are a special sub-case of our games. Precisely,once : : :

� you have decided that every round should start with the move of the same player that firststarted the game,

� strategies are O-strategies if they are strategies for the Opponent (this amounts to say thatthe strategy is closed by moves of the Player) - and symmetrically for P-strategies,

� you split the connective � in two (guess their names ?) depending on whom may switchbetween two sub-plays of a play and define A B as that sub-game of A � B where onlythe opponent may switch - and symmetricallyAOB as that sub-game of A �B where onlythe player may switch,

UBLCS-99-17 16

3 Games in action

� you define !Awith a similar condition (only the Opponent may switch between sub-plays)- and symmetrically ?A,

� you define the arrows as saturated strategies on !A

?

OB,� you restrict yourself to games whose � functions are constant (say to a dummy name �) anddefine with �, � and � the base boolean and natural types in the usual way

: : : you have got AJM games, as they where given in [6], and so are their game models for PCFand Classical Linear Logic. Note that the act of specializing games preserve the covariance ofevery operator but yields a contravariant negation, as it should be.

What is the meaning of all that ? First of all, having a common semantical frameworkwhere afunctional language as PCF and a process algebra with a structure that allow a form of recursion(the replication of our elementary process algebra), could help to understand the links betweenconcurrency, functional languages and logic. This work is a first step toward this (ambitious)goal since it establishes that AJM games are (more or less) a “good” semantics for concurrency,in the sense that there is a super category of AJM games — that detailed in this paper is only anexample — that models a CCS-like process algebra plus replication.Proposition 2.12. Everything I told you was true.

Proof.Read paper [9].

3 Games in action

Now we are ready to use our semantic domains of games to study a very simple but powerfulprocess algebra.

Our first studywill be on a kind of finite CCS [16] with replication [17]. The process algebra ofCCS does not have a sequential operator ; but supplies with (the less expressive) family of actionprefixing a: operators, one for each a 2 Act.

Moreover we do not have an explicit constant in the syntax of terms to deal with deadlockedprocesses: in the intuitive semantics of CCS, a deadlocked process is undistinguishable from theprocess 0 (pronunced nil). We suppose an infinite set Act of names a and co-names �a, with a specialname � 62 Act. Assume that a; �a 2 Act, and that L � Act, our algebra is defined by the followinggrammar:

Q ::= 0 j �:Q j QkQ j Q+Q j QnL j!Q

where � 2 f�g [ Act. Let us call Q the set of all the process terms.

3.1 The operational semantics

The operational semantics of the language is given in the usual structured format:action rules

a

a

�! 0 �a

�a

�! 0

prefixing rules

x:R

x

�! R

summation rulesQ

x

�! Q

0

Q +R

x

�! Q

0

R

x

�! R

0

Q+ R

x

�! R

0

parallel / communication rules

Q

x

�! Q

0

QkR

x

�! Q

0

kR

R

x

�! R

0

QkR

x

�! QkR

0

R

x

�! R

0

Q

�x

�! Q

0

QkR

�! Q

0

kR

0

restriction rulex =2 L Q

x

�! Q

0

QnL

x

�! Q

0

nL

UBLCS-99-17 17

3 Games in action

We work with terms up to the structural equivalence induced by the law !P �!PkP , that wetake as the definition of the behavior of the replication operator !.

3.2 The game semantics model

Now we will use the games introduced to model a simple process algebra. The basic analogy isamong actions and moves. An atomic action is regarded as a round in our games: in a round theprocess acts as the player and the environment is taken in account as the opponent; the roundtakes place on a name corresponding to the channel on which the action is performed. Thecomplementary action is naturally modeled by the dual round, in which the roles of player andopponent (process/environment) are exchanged. So we define:

G(a) = (M

a

; f�

OQ

a

PA

a

g) G(a) = (M

a

; f�

PQ

a

; �

OA

a

g)

G(� ) = (M

; f�

OQ

PQ

OA

PA

; �

PQ

OQ

PA

QA

g

PC

)

In the followingwe will omit the equivalence relation on games intending themaximal relationsatisfying the definition of filling relation. Before giving the translation from terms to games,we need some other game constructors: the prefix game (it is in fact a family of constructors,corresponding to the family of action prefixing operators �: ) the restriction game and the pargame. The prefix game is very easy, indeed we shall use the sequential game that we definedin the first Section. The restriction game, too is very intuitive: only the parallel game is moretroublesome.Definition 3.1 (Restriction). Let A = (M

A

; P

A

) be a game and L � Act a set of actions, we define therestricted game An

A

L as follows

M

AnL

= M

A

P

AnL

= fw 2 P

A

j 8i �(w

i

) =2 Lg

We already pointed out that the communication arise as the mutual interplaying of the tworounds, an example of which are the two leftmost sequences of Figure 3. A first difference weobserve between process algebras and our games is that interaction is not atomic, i.e. in oursetting we can describe an interaction that starts in a round and lasts for several rounds beforebeing completed: �O

a

P

a

: : :�

P

a

O

a

. In order to restrict ourself to plays arising from atomic interac-tions, we need to define a transformation on plays that discards those subsequences in which thecommunication spans over more than two consecutive rounds. So, we define normal sequences asthose sequences in which interaction among the (outermost) sub-games is resolved within oneround.Definition 3.2. Given games A;B we define:

� the parity of a round m

1

m

2

2 R

A�B

as:

par(m

1

m

2

) =

8

>

<

>

:

0 if p(m1

) = p(m

2

)

1 if p(m1

) 6= p(m

2

) ^ �

(m

1

m

2

) = QQ

1 if p(m1

) 6= p(m

2

) ^ �

(m

1

m

2

) = AA

� the parity of a sequence w 2 P

A�B

as par(w) =P

bjwj=2c

i=0

par(w

2i+1

w

2i+2

)

We will say that w 2 P

A�B

is a normal sequence (and write NS(w)) whenever

w = um

1

m

2

v, with jwj = 2n =) par(u) = 0 _ par(um

1

m

2

) = 0

Next, another restriction we have to introduce is motivated by the fact that in process algebraswe are not able to observe the channel over which the communication takes place. The paralleloperator � of Definition 1.13 is not suited to model the operator k of the process algebra, since Qterms like AkB may emit � action, that are not in general present in the definition of a parallelgame G(A) � G(B). Whence we are forced to rename the channels of actions involved in commu-nication (think to the terms (ak�a)na and (bk

b)nb, if we do not rename the moves then we couldnever get the same thing — namely the game of the action � ).

UBLCS-99-17 18

3 Games in action

Figure 3. The maximal sequences in the play of the parallel game ak�a

PQ

a

?

OA

a

�+

OQ

a

?

PA

a

OQ

a

?

PA

a

Q

Q

Q

Qs

PQ

a

?

OA

a

PQ

�+

OQ

?

PA

Q

Q

Q

Qs

OA

n

OQ

Q

Q

Q

Qs

PQ

?

OA

�+

PA

n

Definition 3.3. Given games A;B we define a partial map

Hide : P

A�B

! P

A�B

; w 7! w

0 iff

� w is a normal sequence;� �

(w) = �

(w

0

); �

(w) = �

(w

0

); �

(w) = �

(w

0

);

� �(w

0

2i+1

w

0

2i+2

) =

(

�(w

2i+1

w

2i+2

) if par(w2i+1

w

2i+2

) = 0

�� otherwise

Observe that we implicitly assume � is in the set of names of plays A and B.Definition 3.4 (Par). Let A = (M

A

; P

A

;�

A

) and B = (M

B

; P

B

;�

B

) be games, we define AkB =

(M

A�B

;Hide(P

A�B

);�

A�B

)

Proposition 3.1. The constructors �: , n and k brings games to games.

Proof.For all the proofs of the theorems of this Section, we suggest the interested reader to readthe Appendix of [8].

Figure 3 shows the maximal sequences of the parallel game between an action a and its co-action �a. It is clear that the sequences in which we observe actions correspond to round played inthe same sub-game, where the � moves correspond to communication rounds (i.e. rounds wherethe moves are played in two different sub-games). Moreover, note that in that case the moveshave their name function � set to � . The full translation G from process terms to games is definedas follows. Note that the dual �a of an action a is simply modeled by the dual game.Definition 3.5. We inductively define the map G : Q!G as

G(0) = (;; f�g)

G(a:P ) = G(a);G(P ) for all a 2 Act [ f�g

G(P

1

+ P

2

) = G(P

1

) + G(P

2

)

G(P

1

kP

2

) = G(P

1

) k G(P

2

)

G(!P ) = !G(P ) k !G(P )

G(PnL) = G(P )nL

The main result of this paper is that the strong bisimulation relation is completely capturedby the following notion ofmimic strategies.Definition 3.6. A total strategy � : A �! B is mimic if, for every w 2 � and for all i � bjwj=2c,p(w

2i+1

) 6= p(w

2i+2

). It is intended that p is the parent function on A and B. We will usually writeA � B for 9� : A! B mimic.

UBLCS-99-17 19

3 Games in action

Figure 4. The games a:(b+ c) and a:b+ a:c

a : ( b + c )

OQ

a

?

PA

a

Q

Q

Q

Qs

P

P

P

P

P

P

P

Pq

OQ

b

?

PA

b

OQ

c

?

PA

c

a : b + a : c

OQ

a

?

PA

a

Q

Q

Q

Qs

OQ

b

?

PA

b

OQ

a

?

PA

a

Q

Q

Q

Qs

OQ

c

?

PA

c

Proposition 3.2. If � is mimic then for every w 2 �, �(w2i+1

) =

�(w

2i+2

), �(w2i+1

) = �(w

2i+2

),�(w

2i+1

) = �(w

2i+2

) and �(w2i+1

) = �(w

2i+2

).The proposition explains that a mimic strategy is such because in a given round there are two

moves which, apart from the switching between the opponent and the player, are “the same”moves (in the sense that they have the same projections). Observe that the identity function isindeed mimic, as it is any isomorphism (Proposition 3.11).

Figure 4 shows the games of two typical processes which are not strongly bisimilar: a:(b+ c)

and a:b + a:c. Looking at the games, it is obvious that there could be no way to build a totalmimic strategy between them, because there is no way, after having decided a branch of theright game, to match every possible sequence in the left game (that delays the choice of twopossible subsequences after having played the two moves corresponding to the action a). Thisis folklore in concurrency theory, but we think that it is worth displaying, in the framework ofgame semantics, what bisimulation means in term of strategies.

Now, to state the theorems, we need some preliminary definitions and lemmata.Definition 3.7. Given a game A define:

� Init(A) = fw 2 P

A

j NS(w) ^ 8u 6= �:w = um

1

m

2

=) :NS(u)g

� Res(A;w) = fv 2M

A

j wv 2 P

A

g

Lemma 3.3. The composition of mimic strategies is a mimic strategy.

Proof.Easy, it follows from the definition of mimic.

Lemma 3.4. For any process P we have G(!P ) = G(Pk!P )

Proof.A very simple categorical proof follows from the fact that in the category G the ! is both amonad/comonad. For a sketch of a direct proof, simply observe that it is possible to make thefirst thread of !P play with P and the k + 1-th thread with the k-th copy of (the other) !P . Thismapping is an isomorphism betweenN andN ] f�g, so follows the thesis.

Lemma 3.5. Given processes P;Q and their encodings A = G(P ); B = G(Q)

P

�! Q () 9w 2 P

A

:w 2 G(�) ^ (M

A

; Res(A;w)) � B

Proof.We prove the two implications separately.

=)) The proof proceeds inductively on the structure on the derivation P

�! Q.

UBLCS-99-17 20

3 Games in action

axiom easily by construction of game G(a:P );sum apply inductive hypothesis then by construction of game G(P +Q);par apply inductive hypothesis then observe that A � B =) A � C � B � C =)

Hide(A �C) � Hide(B �C);comm apply twice the induction hypothesis then observe A � A

0

^ B � B

0

=) A �B �

A

0

�B

0

=) Hide(A �B) � Hide(A

0

�B

0

);restriction easily applying inductive hypothesis.

(=) By induction on the structure of P we prove 9w 2 P

A

:w 2 G(�) =) (M

A

; Res(A;w)) = B,the full statement will be proved when we will show that G(Q0

) � B =) Q

0

� Q.prefix easily by construction;sum by induction hypothesis;par consider any w 2 Init(P

A

), it can be either a round from one of the two sub-games oran interaction among the two sub-games. In the first case apply induction hypothesisthen observe that A � B =) A � C � B � C =) Hide(A � C) � Hide(B � C).In the second case apply again induction hypothesis to both sub-games and observeA � A

0

^B � B

0

=) A �B � A

0

�B

0

=) Hide(A �B) � Hide(A

0

�B

0

);replication consider any w 2 Init(P

A

), it can be either a round from one of the two sub-games or an interaction among the two sub-games. In the first case apply inductionhypothesis and observe Res(w;G(!P )) = Res(w;G(!PkP )). In the second case ap-ply induction hypothesis to the term PkP and observe that Res(w;G(!P )) is equal toRes(w;G(!Pk(PkP )));

restriction obvious by construction and induction hypothesis.

Lemma 3.6. Given two families of games (Ai

)

i2I

; (B

i

)

i2I

and the mimic strategies �i

: A

i

! B

i

thenP

i2I

i

:

P

i2I

A

i

!

P

i2I

B

i

is a mimic strategy.

Proof.Let � =

P

i2I

i

; A =

P

i2I

A

i

; B =

P

i2I

B

i

and consider anyw 2 �. Then, by construction,w 2 �

i

for some i and hence w is amimic sequence. Moreover � is total, since 8w 2 �;wa 2 P

A

?

�B

with jwj = 2nwe have w 2 �

i

for some i and, by totality of �i

, wa 2 �

i

� �.

Lemma 3.7. For each process P we have

G(P ) � G(

X

P

�!P

0

�:P

0

)

Proof.Follows easily by the two previous lemmata.

Proposition 3.8. G(P ) � G(Q) =) P � Q

Proof.To prove the implication, we prove G(P ) � G(Q) and P

�! P

0 implies 9Q0

:Q

�! Q

0 andG(P

0

) � G(Q

0

). Consider such � and P

0, from a previous lemma we have w 2 Init(G(P )):w =

G(�) and Res(w;G(P )) � G(P

0

). Consider now a mimic strategy � : G(P )! G(Q), by definitionof mimic we have u 2 � such that u

jG(P )

? = w

? and u

jG(Q)

= v with w

?

� v. Then applying

again the lemma we obtain Q

�! Q

0 with G(�) = v and G(Q0

) � Res(v;G(Q)). Now define anew strategy � = Res(w

1

v

1

w

2

v

2

; �), it is easily verified that � : Res(w;G(P ))! Res(v;G(Q)) is amimic strategy, hence P 0

� Q

0.

Proposition 3.9. P � Q =) G(P ) � G(Q)

Proof.Given a bisimulation among P and Q we directly build a strategy among G(P ) and G(Q)

and then we prove that it is a mimic strategy. Using previous lemmawe can extend relation � to

sequences, more precisely, let A = G(P ); B = G(Q) and define �� P

A

� P

B

:u � v () P

1

:::�

n

�!

�P

0

; Q

1

:::�

n

�! �Q

0

; Q � Q

0 and u = G(�

1

) : : :G(�

n

), v = G(�

1

) : : :G(�

n

), Res(u;A) � G(P

0

),Res(v;B) � G(Q

0

). Finally define

� = fw 2 A

?

�B j w

jA

? � w

jB

; p(w

2i+1

) 6= p(w

2i+2

)g

PC

UBLCS-99-17 21

4 Conclusions and Future Work

That � is a mimic strategy directly follows by construction.

Theorem 3.10. P � Q () G(P ) � G(Q)

Proof.By the previous propositions.

Proposition 3.11. Any isomorphism is mimic.

Proof.It is easy to show that, if there is a sequence in f that is not mimic, than the composition off with f? contains more sequences than the identity function.

Note that the converse does not holds: take the two games G(a) and G(a + a). It is easy toshow that there is only one mimic strategy (corresponding to the strong bisimulation relation),but that it is not an isomorphism, since there is no way to recover (only) the identity function onG(a + a), after having composed f : G(a + a) �! G(a) with f

?: all you get is a function that isboth the identity function and the switch function between the two subcomponents of G(a+ a).Corollary 3.12. If G(P )

=

G(Q) then P � Q.

Proof.By the above theorems.

4 Conclusions and Future Work

There are many topics of interest. Currently we are investigating some issues.1. We are trying to extend the game model to more expressive process algebras, like the �

calculus, looking for the correspondence between various kinds of bisimulation relationsand the mapping induced on the category.

2. The category comes with an operation, that of composition, that has not yet a direct ana-logue on the operational semantics. If we take a process algebra with value-passing, compo-sition should allow us to model exactly the operation of receiving a value over a channeland binding it to the free variable upon which the value was transmitted.

3. Exploit the links between concurrency theory and Linear Logic: we are currently workingto a game model of Classical Linear Logic that takes account directly of the additives - notvia some encoding - and of the constants; moreover we would like to extend the gameparadigm towards those fragments (LLL [13] and LAL [2]) whose modalities (a.e. the x)have not a clear interpretation.

In the following there are some ideas that we think are worth some further investigation:the name games for �-calculi game semantics models and the direct definition of recursive games(instead of the encoding with the replication operator).

4.1 Name games for the �-calculus

In this section we will define the name games and the bind games to model value passing CCS andthe �-calculus.Definition 4.1 (Name game). Given a name a 2 N , we define the game

G(a) = (f�

P

a

; n

O

a

g; f�

P

a

n

O

a

g

PC

8n 2 N ; f(u; v) j u = vg) (20)

Definition 4.2 (Binder game). Given two names � and � we define the binder game b�;�

on � and �as the strategy

b�;�

= fw 2 P

�;�

j w = uv; u

jM

2 P

; v

jM

2 P

;

(u) = �

(v) ^ �

(u) = �

(v)g

�b = �

P

�;�

(21)

where P�;�

is the set of plays of the sequential game �; �(= �:�).

UBLCS-99-17 22

4 Conclusions and Future Work

Figure 5. The game a(x)

P

a

�)

@

@R

P

P

P

P

P

P

Pq

(n

1

)

O

a

(n

2

)

O

a

: : : (n

j

)

O

a

? ? ?

P

x

: : :�

P

x

P

x

? ? ?

(n

1

)

O

x

(n

2

)

O

x

: : : (n

j

)

O

x

Figure 6. The game �bx

O

x

�)

@

@R

P

P

P

P

P

P

Pq

(n

1

)

P

x

(n

2

)

P

x

: : : (n

j

)

P

x

? ? ?

O

b

: : :�

O

b

O

b

? ? ?

(n

1

)

P

b

(n

2

)

P

b

: : : (n

j

)

P

b

UBLCS-99-17 23

REFERENCES

Observe that b�;�

is a strategy upon the game �; �, and the equivalence relation is coherentlydefined, even if for the name games of Definition 4.1 it collapses into the identity.

Using this definition, the games corresponding to the atomic action of value passing CCSmaybe uniformly given in terms of the binder as follows (X is a variable symbol , a and v are namesymbols)action games

G(a(X)) = ba;x

G(�aX) = b�x;�a

G(�av) = bv;�a

G(�a�v) = b�v;�a

Figures 5 and 6 should clarify the meaning of the binder construction. Note that the two gamesare not exactly one the perpendicular game of the other, because the order in which the game ofthe channel and the game of the variable appear is swapped.

The composition of name games shouldmodel the�-calculus construction of binding a variablein the body of a term upon the reception of a name over a channel. The idea behind the definitionof composition is exactly in that: model communication of values.

Without values (as in pure CCS) the act of communicating may be seen simply as a form ofhandshaking: it is enough to encode value passing CCS, but at the cost of introducing infinitarysums [16].

4.2 Recursive games

Another interesting topic is whether it is possible to define directly recursive games, followingthe canonical Scott construction on domains: first of all we would like to define recursively theclosed processes P k:

P

0

= 1

P

k+1

= P [X := P

k

]

and then the sequence fG(P k

)g

k2N

.The recursive game corresponding to the recursive term recXP (X) is then simply given by

the limit

G(recXP (X)) =

1

[

k=0

G(P

k

)

To proof that the above construction is indeed a game, we have to find that it can be expressedas a tuple (M;P;�) of moves and plays on those moves. Next we would have to show that therecursive game construction yields a game G(recXP (X)) that is isomorphic to the game corre-sponding to the process

(!(�x:P (x))jx)nfxg

where x is a distinguished action not in the actions of P (X) and P (x) is the process obtainedfrom P (X) substituting x for the variable X. The problem is that the encoding is not completelycorrect, because of the presence of some � moves that have to be absorbed. We think (well, thefirst author : : : ) that the trick, more or less, should work, but he needs much more work to provethat it is indeed so.

Enjoy.

References

[1] S. Abramsky, R. Jagadeesan, P. Malacaria, Full abstraction for PCF, Information and computa-tion, to appear, 1998.

[2] A. Asperti, Light Affine Logic Proc. of Logic in Computer Science, IEEE 1998.[3] A. Asperti, G. Longo, Categories, Types and Structures, The MIT press, 1992.[4] J. Bergstra, J. Klop, Algebra of Communication Processes with Abstraction, Theoretical Com-

puter Science, 37, vol.1, 77–121, 1985.[5] J.H. Conway, On Number and Games, Academic Press, 1976.

UBLCS-99-17 24

REFERENCES

[6] V. Danos, P. Baillot, T. Ehrhard, L. Regnier, Believe it or not, AJM’s games model is a modelof classical linear logic, Proc. of Logic in Computer Science, IEEE 1997.

[7] B. Davey, H. Priestley, Lattices and Order, Cambridge University Press, 1992.[8] M. Finelli and D. Marchignoli, A Game Semantics Model for a Simple Process Algebra,

submitted, 1999.[9] M. Finelli and D. Marchignoli, Believe it or not, AJM games are (almost) a model of concur-

rent processes, forthcoming Technical Report, University of Bologna, 1999.[10] J.-Y. Girard, Linear Logic, Theoretical Computer Science, 50, 1–102, 1985.[11] J.-Y. Girard, Linear Logic: its syntax and semantics, Advances in Linear Logic, (ed. J.-Y. Girard,

Y. Lafont and L. Regnier). London Math. Soc. Lecture Note Series 222 1–42, 1995.[12] J.-Y. Girard, Geometry of interaction III, Advances in Linear Logic, (ed. J.-Y. Girard, Y. Lafont

and L. Regnier). London Math. Soc. Lecture Note Series 222 329-89, 1995.[13] J.-Y. Girard, Light Linear Logic Information and Computation, 143, 175–204, 1998.[14] J.M.H. Hyland and C.H.L. Ong. On full abstraction for PCF:I, II, III, ftp-available at

theory.doc.ic.ac.uk in directory papers/Ong.[15] G. McCusker, Game and full Abstraction for a Functional Metalanguage with Recursive

Types, Ph.D. Thesis, Department of Computing, Imperial College, University of London,1996.

[16] R. Milner, Communication and Concurrency, Prentice-Hall, 1989.[17] R. Milner, J. Parrow, D. Walker A Calculus of Mobile Processes (Parts I and II), Information

and Computation, 100, 1–77 1992.[18] P. Wadler, An Angry Half Dozen, ACM-SIGPLAN, vol. 33, 25–30, 1998.

UBLCS-99-17 25