![Page 1: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/1.jpg)
Structures concurrentes en sémantique des jeux
Simon Castellan, LIPSoutenance de thèse
13 juillet 2017
![Page 2: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/2.jpg)
A Monopoly problem: the theory
Property of Albert. Property of Barnabé.
To buy both:
price = price Albert+ price Barnabé?= price Barnabé+ price Albert
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 2 / 37
![Page 3: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/3.jpg)
A Monopoly problem: the practice
� (to B) How much for parklane?� (B) ¿400.� (to A) How much for mayfair?� (A) Never mind the monopoly,I need money: ¿300
Total price: ¿700.
� (to A) How much for mayfair?� (A) I need money: ¿300� (to B) How much for parklane?� (B) Eh! This monopoly willcost you: ¿600
Total price: ¿900.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 3 / 37
![Page 4: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/4.jpg)
A Monopoly problem: the practice
� (to B) How much for parklane?� (B) ¿400.� (to A) How much for mayfair?� (A) Never mind the monopoly,I need money: ¿300
Total price: ¿700.
� (to A) How much for mayfair?� (A) I need money: ¿300� (to B) How much for parklane?� (B) Eh! This monopoly willcost you: ¿600
Total price: ¿900.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 3 / 37
![Page 5: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/5.jpg)
Beyond formulae : strategies
price = price Albert+ price Barnabé?= price Barnabé+ price Albert
Same formula, two di�erent strategies:
Albert then Barnabé
(to A) How much for mayfair? qA
(A) I need money: ¿300
200 . . .
300
. . . 500
(to B) How much for park lane?
qB
qB
qB
(B) Eh! ¿600
500 . . .
600
. . . 300
Total price: ¿900
700
900
800
A branch is a play of the strategy against a particular environment.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 4 / 37
![Page 6: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/6.jpg)
Beyond formulae : strategies
price = price Albert+ price Barnabé?= price Barnabé+ price Albert
Same formula, two di�erent strategies:
Albert then Barnabé
(to A) How much for mayfair? qA
(A) I need money: ¿200 200
. . .
300
. . . 500
(to B) How much for park lane? qB qB
qB
(B) Eh! ¿500 500
. . .
600
. . . 300
Total price: ¿700 700 900
800
A branch is a play of the strategy against a particular environment.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 4 / 37
![Page 7: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/7.jpg)
Beyond formulae : strategies
price = price Albert+ price Barnabé?= price Barnabé+ price Albert
Same formula, two di�erent strategies:
Barnabé then Albert
Albert then Barnabé
(to A) How much for mayfair?
qA
(A) I need money: ¿300
200 . . . 300 . . . 500
(to B) How much for park lane?
qB qB qB
(B) Eh! ¿600
500 . . . 600 . . . 300
Total price: ¿900
700 900 800
A branch is a play of the strategy against a particular environment.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 4 / 37
![Page 8: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/8.jpg)
Beyond formulae : strategies
price = price Albert+ price Barnabé?= price Barnabé+ price Albert
Same formula, two di�erent strategies:
Barnabé then Albert Albert then Barnabé
qB qA
200 . . . 400 . . . 500 200 . . . 300 . . . 500
qA qA qA qB qB qB
500 . . . 300 . . . 300 500 . . . 600 . . . 400
700 700 800 700 900 900
A branch is a play of the strategy against a particular environment.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 4 / 37
![Page 9: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/9.jpg)
Beyond formulae : strategies
price = price Albert+ price Barnabé?= price Barnabé+ price Albert
Same formula, two di�erent strategies:
Barnabé then Albert Albert then Barnabé
qB qA
200 . . . 400 . . . 500 200 . . . 300 . . . 500
qA qA qA qB qB qB
500 . . . 300 . . . 300 500 . . . 600 . . . 400
700 700 800 700 900 900
A branch is a play of the strategy against a particular environment.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 4 / 37
![Page 10: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/10.jpg)
Two kinds of interpretationsThose strategies correspond to di�erent programs:
x = askAlbert() x = askBarnabé()y = askBarnabé() y = askAlbert()tot = x + y tot = x + y
These programs have two di�erent interpretations (or semantics):
I Static interpretation via formulae
(Input / Output)
price = price Albert+ price Barnabé
I Dynamic interpretation via strategies
(Interactive process)
qB
. . . 300 . . . 400 . . . 500
. . . qA . . . qA . . . qA
. . . 300 . . . 400 . . . 200
. . . 600 . . . 800 . . . 700
qA
. . . 300 . . . 400 . . . 500
. . . qB . . . qB . . . qB
. . . 300 . . . 400 . . . 200
. . . 600 . . . 800 . . . 700
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 5 / 37
![Page 11: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/11.jpg)
Two kinds of interpretationsThose strategies correspond to di�erent programs:
x = askAlbert() x = askBarnabé()y = askBarnabé() y = askAlbert()tot = x + y tot = x + y
These programs have two di�erent interpretations (or semantics):
I Static interpretation via formulae (Input / Output)
price = price Albert+ price Barnabé
I Dynamic interpretation via strategies (Interactive process)qB
. . . 300 . . . 400 . . . 500
. . . qA . . . qA . . . qA
. . . 300 . . . 400 . . . 200
. . . 600 . . . 800 . . . 700
qA
. . . 300 . . . 400 . . . 500
. . . qB . . . qB . . . qB
. . . 300 . . . 400 . . . 200
. . . 600 . . . 800 . . . 700
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 5 / 37
![Page 12: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/12.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=f (
?
0 ) + f (
?
1 )
2
q
qf
q 3
0 qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 13: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/13.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
?
average(f )=f (
?
0 ) + f (
?
1 )
2against f (x)= 2× x + 3
q
qf
q 3
0 qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 14: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/14.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=f (
?
0 ) + f (
?
1 )
2against
?
f (x)= 2× x + 3
q
qf
q 3
0 qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 15: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/15.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=f (
?0 ) + f (
?
1 )
2against f (x)= 2× x + 3
q
qf
q
3
0 qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 16: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/16.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=f (0) + f (
?
1 )
2against f (x)= 2× 0+ 3
q
qf
q
3
0
qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 17: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/17.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=3+ f (
?
1 )
2against f (x)= 3
q
qf
q 3
0
qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 18: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/18.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=3+ f (
?
1 )
2against
?
f (x)= 2× x + 3
q
qf
q 3
0 qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 19: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/19.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=3+ f (
?1 )
2against f (x)= 2× x + 3
q
qf
q 3
0 qf
q
5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 20: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/20.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=3+ f (
?
1 )
2against f (x)= 2× 1+ 3
q
qf
q 3
0 qf
q
5
1
4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 21: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/21.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=3+ 5
2against f (x)= 5
q
qf
q 3
0 qf
q 5
1
4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 22: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/22.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )= 4 against f (x)= 2× x + 3
q
qf
q 3
0 qf
q 5
1 4
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 23: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/23.jpg)
Game semantics
Game semantics interpretation of more complicated formulae:
average(f )=f (0)+ f (1)
2
q
qf
q n
0 qf
q m
1 n+m2
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 24: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/24.jpg)
Game semanticsGame semantics interpretation of more complicated formulae:
average(f )=f (0)+ f (1)
2
q
qf
q n
0 qf
q m
1 n+m2
q
qf
q m
1 qf
q n
0 n+m2
left then right right then left
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 6 / 37
![Page 25: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/25.jpg)
What if we want to compute in parallel?
q
qf qf
q n q m
0 1
n+m2
ProblemUsual game semantics only manipulates sequential plays.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 7 / 37
![Page 26: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/26.jpg)
What if we want to compute in parallel?
q
qf qf
q n q m
0 1
n+m2
ProblemUsual game semantics only manipulates sequential plays.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 7 / 37
![Page 27: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/27.jpg)
What if we want to compute in parallel?
q
qf qf
q n q m
0 1
n+m2
ProblemUsual game semantics only manipulates sequential plays.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 7 / 37
![Page 28: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/28.jpg)
Is this sound?For which strategies is this optimization correct?
Code
Average
func f1(x):return 2x + 3
4
func f2(x):if(rand()) return 2× x
0, 1, or 2
else return 0func f3(x):increment counter
depends on the impl.
return counter
Correct sequential strategies are innocent and well-bracketed.
ProblemAnd what about concurrent strategies?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 8 / 37
![Page 29: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/29.jpg)
Is this sound?For which strategies is this optimization correct?
Code Averagefunc f1(x):return 2x + 3 4
func f2(x):if(rand()) return 2× x
0, 1, or 2
else return 0func f3(x):increment counter
depends on the impl.
return counter
Correct sequential strategies are innocent and well-bracketed.
ProblemAnd what about concurrent strategies?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 8 / 37
![Page 30: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/30.jpg)
Is this sound?For which strategies is this optimization correct?
Code Averagefunc f1(x):return 2x + 3 4
func f2(x):if(rand()) return 2× x 0, 1, or 2else return 0
func f3(x):increment counter
depends on the impl.
return counter
Correct sequential strategies are innocent and well-bracketed.
ProblemAnd what about concurrent strategies?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 8 / 37
![Page 31: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/31.jpg)
Is this sound?For which strategies is this optimization correct?
Code Averagefunc f1(x):return 2x + 3 4
func f2(x):if(rand()) return 2× x 0, 1, or 2else return 0
func f3(x):increment counter depends on the impl.return counter
Correct sequential strategies are innocent and well-bracketed.
ProblemAnd what about concurrent strategies?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 8 / 37
![Page 32: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/32.jpg)
Is this sound?For which strategies is this optimization correct?
Code Averagefunc f1(x):return 2x + 3 4
func f2(x):if(rand()) return 2× x 0, 1, or 2else return 0
func f3(x):increment counter depends on the impl.return counter
Correct sequential strategies are innocent and well-bracketed.
ProblemAnd what about concurrent strategies?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 8 / 37
![Page 33: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/33.jpg)
Partial orders or interleavings?
To represent concurrency:
preheat
dough mold
oven
vs.
preheat
dough
mold
oven
,
preheat
mold
dough
oven
partial order
(true concurrency)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 9 / 37
![Page 34: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/34.jpg)
Partial orders or interleavings?
To represent concurrency:
preheat
dough mold
oven
vs.
preheat
dough
mold
oven
,
preheat
mold
dough
oven
partial order interleavings
(true concurrency)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 9 / 37
![Page 35: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/35.jpg)
Game semantics: sequential strategies
CompositionJoyal '77
Non-linear frameworkCoquand '91
Hyland, Ong / Nickau '90sAbramsky, Jagadeesan, Malacaria '90s
InnocenceHO/N '90s
Well-bracketingHO/N '90s, AJM '90s
Functional (PCF)HO/N '90s, AJM '90s
StateAbramsky, McCusker '96
Abramsky, Honda, McCusker '98
ControlCartwright, Curien, Felleisen '94
Laird '97
Prog. Lang.Murawski, Tzevelekos '09 '14
ApplicationsGhica, McCusker '03
Ghica '07Murawski, Tzevelekos '11
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 10 / 37
![Page 36: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/36.jpg)
Game semantics: sequential strategies
CompositionJoyal '77
Non-linear frameworkCoquand '91
Hyland, Ong / Nickau '90sAbramsky, Jagadeesan, Malacaria '90s
InnocenceHO/N '90s
Well-bracketingHO/N '90s, AJM '90s
Functional (PCF)HO/N '90s, AJM '90s
StateAbramsky, McCusker '96
Abramsky, Honda, McCusker '98
ControlCartwright, Curien, Felleisen '94
Laird '97
Prog. Lang.Murawski, Tzevelekos '09 '14
ApplicationsGhica, McCusker '03
Ghica '07Murawski, Tzevelekos '11
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 10 / 37
![Page 37: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/37.jpg)
Game semantics: sequential strategies
CompositionJoyal '77
Non-linear frameworkCoquand '91
Hyland, Ong / Nickau '90sAbramsky, Jagadeesan, Malacaria '90s
InnocenceHO/N '90s
Well-bracketingHO/N '90s, AJM '90s
Functional (PCF)HO/N '90s, AJM '90s
StateAbramsky, McCusker '96
Abramsky, Honda, McCusker '98
ControlCartwright, Curien, Felleisen '94
Laird '97
Prog. Lang.Murawski, Tzevelekos '09 '14
ApplicationsGhica, McCusker '03
Ghica '07Murawski, Tzevelekos '11
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 10 / 37
![Page 38: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/38.jpg)
Game semantics: sequential strategies
CompositionJoyal '77
Non-linear frameworkCoquand '91
Hyland, Ong / Nickau '90sAbramsky, Jagadeesan, Malacaria '90s
InnocenceHO/N '90s
Well-bracketingHO/N '90s, AJM '90s
Functional (PCF)HO/N '90s, AJM '90s
StateAbramsky, McCusker '96
Abramsky, Honda, McCusker '98
ControlCartwright, Curien, Felleisen '94
Laird '97
Prog. Lang.Murawski, Tzevelekos '09 '14
ApplicationsGhica, McCusker '03
Ghica '07Murawski, Tzevelekos '11
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 10 / 37
![Page 39: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/39.jpg)
Game semantics: concurrent strategies via interleavings
CompositionLaird '01
Non-linear frameworkLaird '01
Innocence?
Well-bracketingGhica, Murawski '07
Functional?
StateGM '07
Control?
Prog. Lang.GM '07
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 11 / 37
![Page 40: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/40.jpg)
Game semantics: truly concurrent strategies
CompositionAbramsky, Melliès '99
Curien, Faggian '05 and Faggian, Piccolo '09Rideau, Winskel '11
Non-linear framework?
InnocenceMelliès-Mimram '07
(II) CCW '15
Well-bracketing?
Functional?
State?
Control?
Prog. Lang.?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 12 / 37
![Page 41: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/41.jpg)
Game semantics: truly concurrent strategies
CompositionAbramsky, Melliès '99
Curien, Faggian '05 and Faggian, Piccolo '09Rideau, Winskel '11
Non-linear framework(I) C., Clairambault, Winskel '14 '15
InnocenceMelliès-Mimram '07
(II) CCW '15
Well-bracketing?
Functional?
State?
Control?
Prog. Lang.?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 12 / 37
![Page 42: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/42.jpg)
Game semantics: truly concurrent strategies
CompositionAbramsky, Melliès '99
Curien, Faggian '05 and Faggian, Piccolo '09Rideau, Winskel '11
Non-linear framework(I) C., Clairambault, Winskel '14 '15
InnocenceMelliès-Mimram '07
(II) CCW '15
Well-bracketingC., Clairambault '17
(similar to GM '07)
Functional(II) CCW '15
State?
Control?
Prog. Lang.?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 12 / 37
![Page 43: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/43.jpg)
Game semantics: truly concurrent strategies
CompositionAbramsky, Melliès '99
Curien, Faggian '05 and Faggian, Piccolo '09Rideau, Winskel '11
Non-linear framework(I) C., Clairambault, Winskel '14 '15
InnocenceMelliès-Mimram '07
(II) CCW '15
Well-bracketingC., Clairambault '17
(similar to GM '07)
Functional(II) CCW '15
StateC., Clairambault '16
via collapse to GM '07
Control?
Prog. Lang.?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 12 / 37
![Page 44: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/44.jpg)
Game semantics: truly concurrent strategies
CompositionAbramsky, Melliès '99
Curien, Faggian '05 and Faggian, Piccolo '09Rideau, Winskel '11
Non-linear framework(I) C., Clairambault, Winskel '14 '15
InnocenceMelliès-Mimram '07
(II) CCW '15
Well-bracketingC., Clairambault '17
(similar to GM '07)
Functional(II) CCW '15
StateC., Clairambault '16
via collapse to GM '07
Control?
Prog. Lang.(III) C. '15 '17
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 12 / 37
![Page 45: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/45.jpg)
I. A framework for partial-order strategies
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 13 / 37
![Page 46: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/46.jpg)
GamesGame: partial order where each move has a polarity (Opponent,Player).
deal
qA qB ok
yesA yesB
(N ⇒ N) ⇒ Nq
q n
q m
k
From a game A we build its dual A⊥ by reversing polarities:
deal⊥
qA qB ok
yesA yesB
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 14 / 37
![Page 47: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/47.jpg)
GamesGame: partial order where each move has a polarity (Opponent,Player).
deal
qA qB ok
yesA yesB
(N ⇒ N) ⇒ Nq
q n
q m
k
From a game A we build its dual A⊥ by reversing polarities:
deal⊥
qA qB ok
yesA yesB
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 14 / 37
![Page 48: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/48.jpg)
GamesGame: partial order where each move has a polarity (Opponent,Player).
deal
qA qB ok
yesA yesB
(N ⇒ N) ⇒ Nq
q n
q m
k
From a game A we build its dual A⊥ by reversing polarities:
deal⊥
qA qB ok
yesA yesBStructures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 14 / 37
![Page 49: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/49.jpg)
(Deterministic) Strategies
dealqA qB ok
yesA yesB
σA‖B : Albert and Barnabé in parallel
Strategies on A⊥ represent counter-strategies:
τ :
deal⊥
qA qB ok
yesA yesB
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 15 / 37
![Page 50: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/50.jpg)
(Deterministic) Strategies
dealqA qB ok
yesA yesB
σA;B : Albert then Barnabé
Strategies on A⊥ represent counter-strategies:
τ :
deal⊥
qA qB ok
yesA yesB
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 15 / 37
![Page 51: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/51.jpg)
(Deterministic) Strategies
dealqA qB ok
yesA yesB
σA‖B : Albert and Barnabé in parallel
Strategies on A⊥ represent counter-strategies:
τ :
deal⊥
qA qB ok
yesA yesB
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 15 / 37
![Page 52: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/52.jpg)
(Deterministic) Strategies
dealqA qB ok
yesA yesB
σA‖B : Albert and Barnabé in parallel
De�nitionA strategy on (A,≤A) is a partial order σ = (S ,≤S) such that
I S ⊆ A, and if s ≤A s ′ then s ≤S s ′ (rule-respecting)
I S only adds immediate links �_ ⊕ (courteous)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 15 / 37
![Page 53: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/53.jpg)
(Deterministic) Strategies
dealqA qB ok
yesA yesB
σA‖B : Albert and Barnabé in parallel
Strategies on A⊥ represent counter-strategies:
τ : deal⊥
qA qB ok
yesA yesB
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 15 / 37
![Page 54: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/54.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA‖B : deal σA‖B ~ τ τ : deal⊥
qA qB ok
qA qB ok
qA qB ok
yesA yesB
yesA yesB
yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 55: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/55.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA‖B : deal σA‖B ~ τ τ : deal⊥
qA qB ok qA qB
ok
qA qB ok
yesA yesB
yesA yesB
yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 56: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/56.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA‖B : deal σA‖B ~ τ τ : deal⊥
qA qB ok qA qB
ok
qA qB ok
yesA yesB yesA yesB yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 57: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/57.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA‖B : deal σA‖B ~ τ τ : deal⊥
qA qB ok qA qB ok qA qB ok
yesA yesB yesA yesB yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 58: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/58.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA;B : deal σA;B ~ τ τ : deal⊥
qA qB ok
qA qB ok
qA qB ok
yesA yesB
yesA yesB
yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 59: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/59.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA;B : deal σA;B ~ τ τ : deal⊥
qA qB ok qA qB ok qA qB ok
yesA yesB yesA yesB yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 60: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/60.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA;B : deal σA;B ~ τ τ : deal⊥
qA qB ok qA qB ok qA qB ok
yesA yesB yesA yesB yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 61: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/61.jpg)
Interaction of strategies
Given a strategy on A and one on A⊥, how do they interact?
σA;B : deal σA;B ~ τ τ : deal⊥
qA qB ok qA qB ok qA qB ok
yesA yesB yesA yesB yesA yesB
De�nitionThe interaction of (S ,≤S) and (T ,≤T ) is obtained from
(S ∩ T , (≤S ∪ ≤T )∗)
by removing events occurring in a causal loop.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 16 / 37
![Page 62: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/62.jpg)
Composition
Interaction is used to compute application and composition of strat.
average
� d
: (N ⇒ N) ⇒ Nq
q
q n
0 q
q m
1 n+m2
d : N ⇒ N
q
q
d
2× d + 3
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 17 / 37
![Page 63: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/63.jpg)
Composition
Interaction is used to compute application and composition of strat.
average
� d
: (N ⇒ N) ⇒ Nq
q
q n
0 q
q m
1 n+m2
d : N ⇒ N
q
q
d
2× d + 3
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 17 / 37
![Page 64: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/64.jpg)
Composition
Interaction is used to compute application and composition of strat.
average~ d : (N ⇒ N) ⇒ Nq
q
q 3
0 q
q 5
1 4
d : N ⇒ N
q
q
d
2× d + 3
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 17 / 37
![Page 65: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/65.jpg)
Composition
Interaction is used to compute application and composition of strat.
average� d :
(N ⇒ N) ⇒
Nq
q
q 3
0 q
q 5
1 4
d : N ⇒ N
q
q
d
2× d + 3
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 17 / 37
![Page 66: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/66.jpg)
Linearity & duplication
Our average strategy is not a strategy!
It is not linear:
average(f ) =f (0) + f (1)
2
average : (N ⇒ N) ⇒ Nq
q
q n
0 q
q m
1 n+m2
(N ⇒ N) ⇒ N
q
q n
q m
k
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 18 / 37
![Page 67: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/67.jpg)
Linearity & duplication
Our average strategy is not a strategy! It is not linear:
average(f ) =f (0) + f (1)
2
average : (N ⇒ N) ⇒ Nq
q
q n
0 q
q m
1 n+m2
(N ⇒ N) ⇒ N
q
q n
q m
k
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 18 / 37
![Page 68: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/68.jpg)
Copy indices & the game !ATo solve this problem, we play on expanded arenas.
N =q
n !N =
q0 . . . qi . . .
0j 1k . . . . . . nl . . .
A (parallel) strategy implementing d(x) := x + x becomes:
!( N ⇒ N )
qi
q0 q1
nj nk
(n +m)f (j ,k)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 19 / 37
![Page 69: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/69.jpg)
Copy indices & the game !ATo solve this problem, we play on expanded arenas.
N =q
n !N =
q0 . . . qi . . .
0j 1k . . . . . . nl . . .
A (parallel) strategy implementing d(x) := x + x becomes:
!( N ⇒ N )
qi
q17 q43
nj nk
(n +m)f (j ,k)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 19 / 37
![Page 70: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/70.jpg)
The cartesian-closed category CHO
We get a cartesian closed category (CCC):
Theorem (C., Clairambault, Winskel)
The following structure CHO is a CCC:
Objects Games A (which are alternating forests)
Morphisms Strategies uniform (and single-threaded) on !(A⇒ B).
(Usual sequential innocent HO games form a subcategory of CHO)
Rich semantic framework to interpret concurrent higher-orderprograms.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 20 / 37
![Page 71: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/71.jpg)
What was swept under the rug
I Manage to identify strategies up to choice of copy indices.
A notion of weak isomorphism
I De�ne a notion of uniformity (when a strategy is blind toOpponent indices).
Strategies become equipped with symmetry.
I Show that, on uniform strategies, weak isomorphism is acongruence.
Proof of a bipullback property of interaction.
I Representation of nondeterminism in strategies
Addition of essential events.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 21 / 37
![Page 72: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/72.jpg)
What was swept under the rug
I Manage to identify strategies up to choice of copy indices.
A notion of weak isomorphism
I De�ne a notion of uniformity (when a strategy is blind toOpponent indices).
Strategies become equipped with symmetry.
I Show that, on uniform strategies, weak isomorphism is acongruence.
Proof of a bipullback property of interaction.
I Representation of nondeterminism in strategies
Addition of essential events.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 21 / 37
![Page 73: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/73.jpg)
Nondeterminism via event structures
Nondeterminism can be represented via a con�ict relation:
coin : B
q
tt ff
De�nitionAn event structure is a partial order E equipped with a binaryrelation (representing con�ict) satisfying some axioms.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 22 / 37
![Page 74: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/74.jpg)
Nondeterminism via event structures
Nondeterminism can be represented via a con�ict relation:
coin : B
q
tt ff
De�nitionAn event structure is a partial order E equipped with a binaryrelation (representing con�ict) satisfying some axioms.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 22 / 37
![Page 75: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/75.jpg)
Hidden divergences via essential events
But, nondeterminism and composition require some care:
σ
} coin
: B ⇒ B
q
q
tt ff
ff
σ � coin coincides with ff !
τ } σ retains more information than τ � σ (must adequacy)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 23 / 37
![Page 76: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/76.jpg)
Hidden divergences via essential events
But, nondeterminism and composition require some care:
σ ~ coin :
B ⇒
B
q
q
tt ff
ff
σ � coin coincides with ff !
τ } σ retains more information than τ � σ (must adequacy)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 23 / 37
![Page 77: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/77.jpg)
Hidden divergences via essential events
But, nondeterminism and composition require some care:
σ � coin :
B ⇒
B
q
q
tt ff
ff
σ � coin coincides with ff !
τ } σ retains more information than τ � σ (must adequacy)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 23 / 37
![Page 78: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/78.jpg)
Hidden divergences via essential events
But, nondeterminism and composition require some care:
σ } coin :
B ⇒
B
q
q
tt ff
ff
σ � coin coincides with ff !
τ } σ retains more information than τ � σ (must adequacy)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 23 / 37
![Page 79: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/79.jpg)
II. Order of evaluation and innocence
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 24 / 37
![Page 80: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/80.jpg)
PCF and its interpretationsWe can interpret PCF in CHO:
A,B ::= N | B | proc | A⇒ B (PCF types)
M,N ::= tt | ff | ifM N1N2 | () | M;N
| x | λx .M | M N | Y | . . . (PCF terms)
Two interpretations of if in CHO:
ifs : B ⇒ N ⇒ N ⇒ N
q
q
tt ff
q q
n m
n m
ifp : B ⇒ N ⇒ N ⇒ N
q
q q q
tt ff n m
n m
These two interpretations are indistinguishable by terms of PCF.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 25 / 37
![Page 81: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/81.jpg)
PCF and its interpretationsWe can interpret PCF in CHO:
A,B ::= N | B | proc | A⇒ B (PCF types)
M,N ::= tt | ff | ifM N1N2 | () | M;N
| x | λx .M | M N | Y | . . . (PCF terms)
Two interpretations of if in CHO:
ifs : B ⇒ N ⇒ N ⇒ N
q
q
tt ff
q q
n m
n m
ifp : B ⇒ N ⇒ N ⇒ N
q
q q q
tt ff n m
n m
These two interpretations are indistinguishable by terms of PCF.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 25 / 37
![Page 82: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/82.jpg)
PCF and its interpretationsWe can interpret PCF in CHO:
A,B ::= N | B | proc | A⇒ B (PCF types)
M,N ::= tt | ff | ifM N1N2 | () | M;N
| x | λx .M | M N | Y | . . . (PCF terms)
Two interpretations of if in CHO:
ifs : B ⇒ N ⇒ N ⇒ N
q
q
tt ff
q q
n m
n m
ifp : B ⇒ N ⇒ N ⇒ N
q
q q q
tt ff n m
n m
These two interpretations are indistinguishable by terms of PCF.Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 25 / 37
![Page 83: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/83.jpg)
Sometimes parallel if just is not the same
sync : (proc ⇒ proc ⇒ proc) ⇒ proc
q
q
q q ()
() () ()
sync can distinguish both implementations of if.
( For Mε = λxλy .ifε (x ; tt) (y ; tt) tt:
syncMp converges but not syncMs .)
What is wrong?
Player merges two threads started by Opponent.
Banning such patterns gives a notion of concurrent innocence.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 26 / 37
![Page 84: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/84.jpg)
Sometimes parallel if just is not the same
sync : (proc ⇒ proc ⇒ proc) ⇒ proc
q
q
q q ()
() () ()
sync can distinguish both implementations of if.
( For Mε = λxλy .ifε (x ; tt) (y ; tt) tt:
syncMp converges but not syncMs .)
What is wrong?
Player merges two threads started by Opponent.
Banning such patterns gives a notion of concurrent innocence.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 26 / 37
![Page 85: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/85.jpg)
Sometimes parallel if just is not the same
sync : (proc ⇒ proc ⇒ proc) ⇒ proc
q
q
q q ()
() () ()
sync can distinguish both implementations of if.
( For Mε = λxλy .ifε (x ; tt) (y ; tt) tt:
syncMp converges but not syncMs .)
What is wrong?
Player merges two threads started by Opponent.
Banning such patterns gives a notion of concurrent innocence.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 26 / 37
![Page 86: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/86.jpg)
Sometimes parallel if just is not the same
sync : (proc ⇒ proc ⇒ proc) ⇒ proc
q
q
q q ()
() () ()
sync can distinguish both implementations of if.
( For Mε = λxλy .ifε (x ; tt) (y ; tt) tt:
syncMp converges but not syncMs .)
What is wrong?
Player merges two threads started by Opponent.
Banning such patterns gives a notion of concurrent innocence.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 26 / 37
![Page 87: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/87.jpg)
Sometimes parallel if just is not the same
sync : (proc ⇒ proc ⇒ proc) ⇒ proc
q
q
q q ()
() () ()
sync can distinguish both implementations of if.
( For Mε = λxλy .ifε (x ; tt) (y ; tt) tt:
syncMp converges but not syncMs .)
What is wrong? Player merges two threads started by Opponent.
Banning such patterns gives a notion of concurrent innocence.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 26 / 37
![Page 88: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/88.jpg)
Sometimes parallel if just is not the same
sync : (proc ⇒ proc ⇒ proc) ⇒ proc
q
q
q q ()
() () ()
sync can distinguish both implementations of if.
( For Mε = λxλy .ifε (x ; tt) (y ; tt) tt:
syncMp converges but not syncMs .)
What is wrong? Player merges two threads started by Opponent.
Banning such patterns gives a notion of concurrent innocence.Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 26 / 37
![Page 89: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/89.jpg)
Finite de�nability
A PCF strategy is an innocent and well-bracketed strategy.
Theorem (Finite de�nability)
If σ is PCF strategy, there exists a term M of PCF such that
JMK and σ are indistinguishable by PCF strategies.
B ⇒ proc ⇒ Bq
q q
tt ff ()
()
λbλx . if b⊥ x
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 27 / 37
![Page 90: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/90.jpg)
Finite de�nability
A PCF strategy is an innocent and well-bracketed strategy.
Theorem (Finite de�nability)
If σ is PCF strategy, there exists a term M of PCF such that
JMK and σ are indistinguishable by PCF strategies.
B ⇒ proc ⇒ Bq
q q
tt ff ()
()
λbλx . if b⊥ x
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 27 / 37
![Page 91: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/91.jpg)
Finite de�nability
A PCF strategy is an innocent and well-bracketed strategy.
Theorem (Finite de�nability)
If σ is PCF strategy, there exists a term M of PCF such that
JMK and σ are indistinguishable by PCF strategies.
B ⇒ proc ⇒ Bq
q q
tt ff ()
()
λbλx . x ; if b⊥ ()
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 27 / 37
![Page 92: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/92.jpg)
What was swept under the rug 2
I Innocence and well-bracketing:I Stability under composition. Forking lemma.
I Requires the addition of visibility (and locality). Control interferences between Player threads
I Finite de�nability:I De�ne a notion of �nite strategies. Reduced form (P-view �dag�)
I Factorisation theorem for higher-order strategies. First-order / λ-calculus
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 28 / 37
![Page 93: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/93.jpg)
What was swept under the rug 2
I Innocence and well-bracketing:I Stability under composition. Forking lemma.
I Requires the addition of visibility (and locality). Control interferences between Player threads
I Finite de�nability:I De�ne a notion of �nite strategies. Reduced form (P-view �dag�)
I Factorisation theorem for higher-order strategies. First-order / λ-calculus
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 28 / 37
![Page 94: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/94.jpg)
III. What lies beyond PCF?
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 29 / 37
![Page 95: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/95.jpg)
What real concurrent programs are made of
while(1) { while(1) {while (canWrite == 0) ; while (canRead == 0) ;x = produce(); x = value;value := x; consume(x);canRead := 1; canWrite := 0; canRead := 0; canWrite := 1;
} }
loops, conditionals, function calls, shared memory.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 30 / 37
![Page 96: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/96.jpg)
What real concurrent programs are made of
while(1) { while(1) {while (canWrite == 0) ; while (canRead == 0) ;x = produce(); x = value;value := x; consume(x);canRead := 1; canWrite := 0; canRead := 0; canWrite := 1;
} }
loops, conditionals, function calls︸ ︷︷ ︸in PCF
, shared memory.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 30 / 37
![Page 97: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/97.jpg)
What real concurrent programs are made of
value := 1; f ← canRead;canRead := 1; x ← value ;
Expectation: f = 1 implies x = 1
loops, conditionals, function calls, shared memory
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 30 / 37
![Page 98: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/98.jpg)
What real concurrent programs are made of
value := 1; f ← canRead;canRead := 1; x ← value ;
Expectation: f = 1 implies x = 1
loops, conditionals, function calls, shared memory
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 30 / 37
![Page 99: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/99.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 0
memory
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 100: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/100.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 0
memory
write 1 to value
canRead?
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 101: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/101.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 0
memory
ok
canRead?
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 102: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/102.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 0
memory
write 1 to canRead
canRead?
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 103: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/103.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
ok
canRead?
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 104: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/104.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
canRead=1
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 105: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/105.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
value?
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 106: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/106.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
value=1
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 107: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/107.jpg)
Running concurrent programs on a processor
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
Several executions, but never f = 1 and v = 0.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 31 / 37
![Page 108: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/108.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 0
memory
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 109: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/109.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 0
memory
write 1 to value
write 1 to canRead
canRead?
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 110: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/110.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 1
memory
write 1 to value
ok
canRead?
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 111: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/111.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 1
memory
canRead=1
write 1 to value
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 112: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/112.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 1
memory
write 1 to value
value?
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 113: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/113.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 1
memory
value=0
write 1 to value
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 114: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/114.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 0
canRead: 1
memory
write 1 to value
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 115: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/115.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
ok
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 116: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/116.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 117: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/117.jpg)
Weak memory models
On some processors, we get instead:
value:= 1;
canRead:= 1;
f ← canRead;
v ← value;
value: 1
canRead: 1
memory
Outcome depends on the architecture (TSO, PSO, ARM). . .
Goal: Model denotationally such complex reorderings.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 32 / 37
![Page 118: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/118.jpg)
Taking a closer look
x:= 1;
y:= 1;
r ← z;
x: ?
y: ?
z: ?
The behaviour of the thread corresponds to a strategy:
mem ⇒ proc
q
Cx :=1 Cy :=1
ok ok
R?z
k
()
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 33 / 37
![Page 119: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/119.jpg)
Taking a closer look
x:= 1;
y:= 1;
r ← z;
x: ?
y: ?
z: ?write 1 to x
write 1 to y
The behaviour of the thread corresponds to a strategy:
mem ⇒ proc
q
Cx :=1 Cy :=1
ok ok
R?z
k
()
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 33 / 37
![Page 120: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/120.jpg)
Taking a closer look
x:= 1;
y:= 1;
r ← z;
x: ?
y: ?
z: ?ok
ok
The behaviour of the thread corresponds to a strategy:
mem ⇒ proc
q
Cx :=1 Cy :=1
ok ok
R?z
k
()
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 33 / 37
![Page 121: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/121.jpg)
Taking a closer look
x:= 1;
y:= 1;
r ← z;
x: ?
y: ?
z: ?z ?
The behaviour of the thread corresponds to a strategy:
mem ⇒ proc
q
Cx :=1 Cy :=1
ok ok
R?z
k
()
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 33 / 37
![Page 122: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/122.jpg)
Taking a closer look
x:= 1;
y:= 1;
r ← z;
x: ?
y: ?
z: ?k
The behaviour of the thread corresponds to a strategy:
mem ⇒ proc
q
Cx :=1 Cy :=1
ok ok
R?z
k
()
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 33 / 37
![Page 123: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/123.jpg)
Taking a closer look
x:= 1;
y:= 1;
r ← z;
x: ?
y: ?
z: ?
The behaviour of the thread corresponds to a strategy:
mem ⇒ proc
q
Cx :=1 Cy :=1
ok ok
R?z
k
()Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 33 / 37
![Page 124: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/124.jpg)
Modelling weak memory models
An old motto (Reynolds, implemented in game semantics by Abramsky and McCusker)
The behaviour of imperative programs can be described as the
interaction of a (deterministic) pure functional program interacting
with a memory.
Individual programs are interpreted as parallel strategies
JtK : mem⇒ proc
In particularJt; uK = seq JtK JuK
seq : mem⇒ (mem⇒ proc)⇒ (mem⇒ proc)⇒ proc
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 34 / 37
![Page 125: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/125.jpg)
Modelling weak memory models
An old motto (Reynolds, implemented in game semantics by Abramsky and McCusker)
The behaviour of concurrent programs can be described as the
interaction of (deterministic) pure functional threads interacting
with a (nondeterministic) memory.
Individual programs are interpreted as parallel strategies
JtK : mem⇒ proc
In particularJt; uK = seq JtK JuK
seq : mem⇒ (mem⇒ proc)⇒ (mem⇒ proc)⇒ proc
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 34 / 37
![Page 126: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/126.jpg)
Modelling weak memory models
An old motto (Reynolds, implemented in game semantics by Abramsky and McCusker)
The behaviour of concurrent programs can be described as the
interaction of (deterministic) pure functional threads interacting
with a (nondeterministic) memory.
Individual programs are interpreted as parallel strategies
JtK : mem⇒ proc
In particularJt; uK = seq JtK JuK
seq : mem⇒ (mem⇒ proc)⇒ (mem⇒ proc)⇒ proc
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 34 / 37
![Page 127: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/127.jpg)
Modelling weak memory models
An old motto (Reynolds, implemented in game semantics by Abramsky and McCusker)
The behaviour of concurrent programs can be described as the
interaction of (deterministic) pure functional threads interacting
with a (nondeterministic) memory.
Individual programs are interpreted as parallel strategies
JtK : mem⇒ proc
In particularJt; uK = seq JtK JuK
seq : (mem⇒ proc)⇒ (mem⇒ proc)⇒ (mem⇒ proc)
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 34 / 37
![Page 128: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/128.jpg)
Modelling weak memory models
An old motto (Reynolds, implemented in game semantics by Abramsky and McCusker)
The behaviour of concurrent programs can be described as the
interaction of (deterministic) pure functional threads interacting
with a (nondeterministic) memory.
Individual programs are interpreted as parallel strategies
JtK : mem⇒ proc
In particularJt; uK = seq JtK JuK
seq : mem⇒ (mem⇒ proc)⇒ (mem⇒ proc)⇒ proc
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 34 / 37
![Page 129: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/129.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 () Cx :=2 Cy :=3 ()
Cx :=1 ()
ok
ok
Cx :=2
ok
Cy :=3 ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 130: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/130.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1
()
Cx :=2 Cy :=3
()
Cx :=1
()
ok
ok
Cx :=2
ok
Cy :=3 ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 131: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/131.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 ()
Cx :=2 Cy :=3
()
Cx :=1
()
ok
ok
Cx :=2
ok
Cy :=3 ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 132: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/132.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 ()
Cx :=2 Cy :=3
()
Cx :=1 ()
ok
ok
Cx :=2
ok
Cy :=3 ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 133: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/133.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 () Cx :=2
Cy :=3
()
Cx :=1 ()
ok
ok
Cx :=2
ok
Cy :=3 ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 134: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/134.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 () Cx :=2
Cy :=3
()
Cx :=1 ()
ok
ok
Cx :=2
ok
Cy :=3
ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 135: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/135.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 () Cx :=2 Cy :=3 ()
Cx :=1 ()
ok
ok
Cx :=2
ok
Cy :=3
ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 136: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/136.jpg)
Thread semantics via game semantics
Implementation of seq (here for PSO):
mem ⇒ (mem ⇒ proc) ⇒ ( mem ⇒ proc) ⇒ proc
q
q q
Cx :=1 () Cx :=2 Cy :=3 ()
Cx :=1 ()
ok
ok
Cx :=2
ok
Cy :=3 ok
ok
ok
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 35 / 37
![Page 137: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/137.jpg)
Final modelDepends on the architecture A:I Thread operations: seqA, readA, writeA implement the
reorderings speci�c to A.
I Memory (representing caches, barriers, . . . ) is represented by
mA : mem
Executions on A of t1 ‖ . . . ‖ tn are represented by the interaction:
(Jt1KA ‖ . . . ‖ JtnKA)~mA.
Cx :=1 R?x cy :=1 R?y
ok 0 ok 0
R?x Cx :=1 R?y Cy :=1
1 ok 1 ok
TheoremTraces generated by this
model correspond to
operational traces (on
TSO).
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 36 / 37
![Page 138: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/138.jpg)
Final modelDepends on the architecture A:I Thread operations: seqA, readA, writeA implement the
reorderings speci�c to A.
I Memory (representing caches, barriers, . . . ) is represented by
mA : mem
Executions on A of t1 ‖ . . . ‖ tn are represented by the interaction:
(Jt1KA ‖ . . . ‖ JtnKA)~mA.
Cx :=1 R?x cy :=1 R?y
ok 0 ok 0
R?x Cx :=1 R?y Cy :=1
1 ok 1 ok
TheoremTraces generated by this
model correspond to
operational traces (on
TSO).
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 36 / 37
![Page 139: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/139.jpg)
Final model
Depends on the architecture A:I Thread operations: seqA, readA, writeA implement the
reorderings speci�c to A.
I Memory (representing caches, barriers, . . . ) is represented by
mA : mem
Executions on A of t1 ‖ . . . ‖ tn are represented by the interaction:
(Jt1KA ‖ . . . ‖ JtnKA)~mA.
Cx :=1 Rx=0 Cy :=1 Ry=0
Rx=1 Cx :=1 Ry=1 Cy :=1
TheoremTraces generated by this
model correspond to
operational traces (on
TSO).
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 36 / 37
![Page 140: Simon Castellan, LIP Soutenance de thèse 13 juillet 2017iso.mor.phis.me/publis/soutenance.pdf · A Monopoly problem: the theory Property of Albert. Property of Barnabé. oT buy both:](https://reader033.vdocuments.us/reader033/viewer/2022041608/5e36297d07649d514e76bb5c/html5/thumbnails/140.jpg)
Perspectives
I Describe �nitely non-innocent strategies.
Represent e�ciently operations on them.
I Which language corresponds to innocent concurrent strategies?
Concurrent control operators (eg. fork).
I Weaker architectures (eg. ARM) and software speci�cations.
How to handle speculation, complex barriers speci�cation.
Structures concurrentes en sémantique des jeux · Simon Castellan, LIP Soutenance de thèse 37 / 37