Game semantics for an object-oriented language

This thesis investigates the relationship between object-oriented programming languages and game models of computation. These are intuitively well matched: an object encapsulates some internal state and presents some behaviour to the world via its publicly visible methods, while a strategy for some game represents the possible interactions of a program with its environment. We work with a simple and well-understood game model. Rather than tailoring our model to match some existing programming language, we view the simplicity of our semantic setting as a virtue, and try to find the appropriate language corresponding to the model. We define a class-based, stateful object-oriented language, and give a heapbased operational semantics and an interpretation in our game model. At the heart of this interpretation lies a novel semantic treatment of the phenomenon of data abstraction. The model closely guides the design of our language, which enjoys an intermediate level of expressivity between that of first-order and general higher-order store. The agreement between the operational and game interpretations is verified by a soundness proof. This involves the development of specialised techniques and a detailed analysis of the relationship between the concrete and abstract views. We also show that definability and full abstraction hold at certain types of arbitrary rank, but are problematic at other types. We conclude by briefly discussing an extended language with a control operator, along with other extensions leading to a possible core for a more realistic programming language.

[1]  Samson Abramsky,et al.  A fully abstract game semantics for general references , 1998, Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226).

[2]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[3]  James Laird A Categorical Semantics of Higher Order Store , 2002, CTCS.

[4]  Samson Abramsky,et al.  Linearity, Sharing and State: a fully abstract game semantics for Idealized Algol with active expressions , 1996, Electron. Notes Theor. Comput. Sci..

[5]  Samuel N. Kamin,et al.  Two semantic models of object-oriented languages , 1994 .

[6]  James Laird A Game Semantics of Local Names and Good Variables , 2004, FoSSaCS.

[7]  Mitchell Wand Type inference for objects with instance variables and inheritance , 1994 .

[8]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Information and Computation.

[9]  James Laird,et al.  Full abstraction for functional languages with control , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[10]  Nick Benton,et al.  Linear Lambda-Calculus and Categorial Models Revisited , 1992, CSL.

[11]  Andrew M. Pitts,et al.  Semantics and Logics of Computation: Index , 1997 .

[12]  Pierre-Louis Curien On the Symmetry of Sequentiality , 1993, MFPS.

[13]  Bjarne Stroustrup,et al.  The C++ Programming Language, First Edition , 1986 .

[14]  Matthias Felleisen,et al.  Classes and mixins , 1998, POPL '98.

[15]  Andrew D. Gordon,et al.  Bisimilarity for a first-order calculus of objects with subtyping , 1996, POPL '96.

[16]  Andrew M. Pitts,et al.  Semantics and Logics of Computation: List of Contributors , 1997 .

[17]  Samson Abramsky Linearity‚ Sharing and State: a fully abstract game semantics for Idealized Algol , 1997 .

[18]  Samson Abramsky,et al.  Call-by-Value Games , 1997, CSL.

[19]  Pierre-Louis Curien,et al.  Sequential Algorithms on Concrete Data Structures , 1982, Theor. Comput. Sci..

[20]  Gordon Plotkin,et al.  Logical Full Abstraction and PCF , 2000 .

[21]  Uday S. Reddy,et al.  Objects as closures: abstract semantics of object-oriented languages , 1988, LISP and Functional Programming.

[22]  S. Abramsky Semantics of Interaction: an introduction to Game Semantics , 1997 .

[23]  Luca Cardelli,et al.  On Binary Methods , 1995, Theory Pract. Object Syst..

[24]  Radha Jagadeesan,et al.  Games and Full Completeness for Multiplicative Linear Logic , 1994, J. Symb. Log..

[25]  Robin Milner,et al.  Definition of standard ML , 1990 .

[26]  Vitaly Shmatikov,et al.  A Core Calculus of Classes and Objects , 1999, MFPS.

[27]  Radha Jagadeesan,et al.  Full Abstraction for PCF , 1994, Inf. Comput..

[28]  C.-H. Luke Ong,et al.  Full Abstraction in the Lazy Lambda Calculus , 1993, Inf. Comput..

[29]  Julian Rathke,et al.  Java Jr: Fully Abstract Trace Semantics for a Core Java Language , 2005, ESOP.

[30]  Frank S. de Boer,et al.  Object Connectivity and Full Abstraction for a Concurrent Calculus of Classes , 2004, ICTAC.

[31]  Jens Palsberg,et al.  A Denotational Semantics of Inheritance and Its Correctness , 1994, Inf. Comput..

[32]  Benjamin C. Pierce,et al.  Foundations of Object-Oriented Languages - Introduction , 1999, Theory Pract. Object Syst..

[33]  Matthias Felleisen,et al.  Fully Abstract Semantics for Observably Sequential Languages , 1994, Inf. Comput..

[34]  Giorgio Ghelli,et al.  Coherence of Subsumption, Minimum Typing and Type-Checking in F<= , 1992, Math. Struct. Comput. Sci..

[35]  Andrew M. Pitts,et al.  MJ: An imperative core calculus for Java and Java with effects , 2003 .

[36]  Pierre-Louis Curien,et al.  A Semantic Characterization of Full Abstraction for Typed Lambda Calculi , 1984, FOCS.

[37]  Luca Cardelli,et al.  Comparing Object Encodings , 1997, TACS.

[38]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[39]  Nobuko Yoshida,et al.  Game-Theoretic Analysis of Call-by-Value Computation , 1997, Theor. Comput. Sci..

[40]  John Longley Interpreting Localized Computational Effects Using Operators of Higher Type , 2008, CiE.

[41]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[42]  Benjamin C. Pierce,et al.  Simple type-theoretic foundations for object-oriented programming , 1994, Journal of Functional Programming.

[43]  Martín Abadi,et al.  A Theory of Primitive Objects , 1996 .

[44]  John Longley,et al.  Universal Types and What They are Good For , 2003 .

[45]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[46]  Andreas Blass,et al.  A Game Semantics for Linear Logic , 1992, Ann. Pure Appl. Log..

[47]  Frank S. de Boer,et al.  Observability, Connectivity, and Replay in a Sequential Calculus of Classes , 2004, FMCO.

[48]  Julian Rathke,et al.  A fully abstract may testing semantics for concurrent objects , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[49]  Matthias Felleisen,et al.  Observable sequentiality and full abstraction , 1992, POPL '92.

[50]  Philip Wadler,et al.  There's No Substitute for Linear Logic , 1991 .

[51]  Andrew Barber,et al.  Dual Intuitionistic Linear Logic , 1996 .

[52]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[53]  Gavin M. Bierman What is a Categorical Model of Intuitionistic Linear Logic? , 1995, TLCA.

[54]  Paul-André Melliès,et al.  Sequential algorithms and strongly stable functions , 2005, Theor. Comput. Sci..

[55]  Paul-André Melliès Comparing hierarchies of types in models of linear logic , 2004, Inf. Comput..

[56]  Andrzej S. Murawski,et al.  Nominal games and full abstraction for the nu-calculus , 2004, LICS 2004.

[57]  John C. Mitchell Toward a typed foundation for method specialization and inheritance , 1989, POPL '90.

[58]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[59]  William R. Cook,et al.  Inheritance is not subtyping , 1989, POPL '90.

[60]  Andrew D. Gordon,et al.  A Concurrent Object Calculus: Reduction and Typing , 1998, HLCL.

[61]  Nick Benton,et al.  A Mixed Linear and Non-Linear Logic: Proofs, Terms and Models (Extended Abstract) , 1994, CSL.

[62]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[63]  G Q Zhang,et al.  Domain Theory, Logic and Computation , 2003 .

[64]  James David Laird,et al.  A semantic analysis of control , 1999 .

[65]  Alan Kay The early history of Smalltalk , 1996 .