towards nominal abramsky towards nominal abramsky andrzej
play

Towards Nominal Abramsky Towards Nominal Abramsky Andrzej Murawski - PowerPoint PPT Presentation

Towards Nominal Abramsky Towards Nominal Abramsky Andrzej Murawski Nikos Tzevelekos University of Warwick Queen Mary, U. of London What this talk is about Abramsky's cube (1990's): a taxonomy of game semantics models Nominal game


  1. Towards Nominal Abramsky Towards Nominal Abramsky Andrzej Murawski Nikos Tzevelekos University of Warwick Queen Mary, U. of London

  2. What this talk is about Abramsky's cube (1990's): a taxonomy of game semantics models Nominal game semantics (2000's): games for programs generating new/fresh resources (references, exceptions, channels, etc.) Nominal Abramsky: the construction of an analogous taxonomy for nominal game models

  3. Game Semantics ● Computation is modelled as a 2-player game between: ● Opponent (the environment) ● Proponent (the program) ● Qualitative games ( ≠ Game Theory) ● Programs = strategies for Proponent ● Categories of games

  4. Example strategy   ─ f : int int λx.f(x)+1 : int int Int  Int Int  Int * O P * 5 O 5 P 14 O 15 P : : : : : : : :

  5. Example strategy   ─ f : int int λx.f(x)+1 : int int Int  Int Int  Int * O P * 5 O 5 P 14 15 P * * 5 5 14 15 … : : : : : : : : O P O P O P

  6. Abramsky's cube (90's) probability non-determinism concurrency ... control PCF state move at each axis: relax constraints

  7. Two ways to model references Reynolds ● Idealized Algol (1978) References are pairs: ref int = (unit  int)x(int  unit) ( 1  Z )x( Z  1 ) ● Theoretically attractive ● but: mkvar(λx.3,λx.()) ( bad variables )

  8. Two ways to model references Reynolds Pitts & Stark ● Idealized Algol (1978) ● nu-calculus (1993) References are pairs: References are names: ref int = ref int = base type (unit  int)x(int  unit) N (names) ( 1  Z )x( Z  1 ) ● Notion of resource (name): ● Theoretically attractive ● atomic values ● infinitely many ● but: mkvar(λx.3,λx.()) ● comparable for equality ( bad variables )

  9. Two ways to model references references exceptions channels Reynolds Pitts & Stark … ● Idealized Algol (1978) ● nu-calculus (1993) References are pairs: References are names: ref int = ref int = base type (unit  int)x(int  unit) N (names) ( 1  Z )x( Z  1 ) ● Notion of resource (name): ● Theoretically attractive ● atomic values ● infinitely many ● but: mkvar(λx.3,λx.()) ● comparable for equality ( bad variables )

  10. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P O P O P

  11. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P * O P O P

  12. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P * O * P O P

  13. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P * O * a (a ,0) P 1 1 O P

  14. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P * O * a (a ,0) P 1 1 O * P

  15. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P * O * a (a ,0) P 1 1 O * a (a ,0) P 2 2 : : : : : :

  16. Nominal games λx.ref(0) : unit  ref int 1 1  Ref int O * P * O * a (a ,0) P 1 1 O * n 15 P P 2 (a 2 ,0) … * * * a 1 (a 1 ,0) * a 2 : : : : : : : : : : : : : : : :

  17. Nominal games λx.ref(0) : unit  ref int N 1 1  Ref int O * P * O * a (a ,0) P 1 1 O * n 15 P P 2 (a 2 ,0) … * * * a 1 (a 1 ,0) * a 2 : : : : : : : : : : : : : : : :

  18. Towards nominal Abramsky probability non-determinism concurrency ... control funML state

  19. Towards nominal Abramsky probability GrML funML RefML non-determinism concurrency concurrency ... control funML state

  20. RefML: storable functions A ::= unit | int | ref A | A → A , x:A s Γ : B s Γ : A → B Γ t : A ─ ─ ─ Γ λ x.s : A → B s t Γ : B ─ ─ Γ s : A ─ Γ () : unit , i : int Γ ref( s ) : ref A ─ ─ : ref A Γ Γ Γ s : ref A s : ref A, t : A s, t ─ ─ ─ Γ ! s : A s Γ := t : unit s Γ == t : int ─ ─ ─

  21. Game semantics for RefML MTz LICS'11 ● Moves with HO-store S = { ( a, 4) , ( b,c ) , ( c, 3) , ( d, *) , ... } ● Justify by store m ( a,* ) … m' ● Frugality … m {( a,v ) , ... } ⇒ … a S … m {( a,v ) , ... }

  22. Game semantics for RefML

  23. Game semantics for RefML

  24. Game semantics for RefML

  25. Ground ML: full ground store Restrict ref constructor to non-function types ● y:ref(int  int) s but not (λy. s ) (ref (λx.x)) ─ ● allow (λy. s ) (ref (ref(0))) , … In the game model: ● Ban P from introducing/creating ( a, *) ● Impose visibility

  26. Visibility (breaking of) let x=ref( .. ) in λy int  unit . first: x:=y after: (!x) 0 n 15 P P P (a,*) * (a,*) * y (a,*) * (a,*) * y (a,*) 0 (a,*) * : : : : : : : : O P O P O P

  27. Fun ML: pure functional behaviour Remove ref constructor ● y:ref(int) s but not (λy. s ) (ref (0)) ─ In the game model: ● Ban P from introducing/creating any name ● Impose innocence

  28. Innocence (breaking of) let x=ref(-1) in λy. x++; !x : unit  int n 2 15 P P 1 P (a,0) * (a,0) * y (a,0) 0 (a,1) * y (a,) 1 (a,2) … * : : : : : : : : : : : : : : : : : : : : : : : : O P O P O P

  29. Factorisations ● RefML = GrML + one reference of type unit  unit + name generators for HO-types ● GrML = FunML + one reference of type int + name generators for base types + oracles mapping names to integers

  30. Further axes ● Concurrent ML: Laird (FSTTCS'06) To do: ● Exceptions: Laird (LICS'01), Tz (PhD'09) ● Non-determinism: Harmer & McCusker (LICS'99) ● Polymorphism: Hughes (LICS'97), Abramsky & Jagadeesan (FOSSACS'03), Laird (LICS'10, ICALP'10) ● Probability: Danos & Harmer (LICS'00)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend