Game Semantics: Easy as Pi

Nobuko Yoshida,Simon Castellan,Léo Stefanesco
DOI: https://doi.org/10.48550/arXiv.2011.05248
2020-11-11
Abstract:Game semantics has proven to be a robust method to give compositional semantics for a variety of higher-order programming languages. However, due to the complexity of most game models, game semantics has remained unapproachable for non-experts. In this paper, we aim at making game semantics more accessible by viewing it as a syntactic translation into a session typed pi-calculus, referred to as metalanguage, followed by a semantics interpretation of the metalanguage into a particular game model. The syntactic translation can be defined for a wide range of programming languages without knowledge of the particular game model used. Simple reasoning on the model (soundness, and adequacy) can be done at the level of the metalanguage, escaping tedious technical proofs usually found in game semantics. We call this methodology programming game semantics. We design a metalanguage (PiDiLL) inspired from Differential Linear Logic (DiLL), which is concise but expressive enough to support features required by concurrent game semantics. We then demonstrate our methodology by yielding the first causal, non-angelic and interactive game model of CML, a higher-order call-by-value language with shared memory concurrency. We translate CML into PiDiLL and show that the translation is adequate. We give a causal and non-angelic game semantics model using event structures, which supports a simple semantics interpretation of PiDiLL. Combining both of these results, we obtain the first interactive model of a concurrent language of this expressivity which is adequate with respect to the standard weak bisimulation, and fully abstract for the contextual equivalence on second-order terms. We have implemented a prototype which can explore the generated causal object from a subset of OCaml.
Programming Languages,Logic in Computer Science
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to make game semantics more understandable and applicable. Specifically, the authors propose a new methodology - programming game semantics, aiming to simplify its complexity by decomposing the game - semantic interpretation into two parts: first, translate the source - language program into an intermediate language (a metalanguage), which is based on session types and Differential Linear Logic (DiLL); second, perform a semantic interpretation of this metalanguage, mapping it to a specific game model. This method makes it easier for non - experts to understand and use game semantics, especially when dealing with concurrent languages. ### Main contributions of the paper: 1. **Propose a unified framework**: This framework views the interpretation of game semantics as a syntactic translation from the source language to a process calculus, and then a semantic interpretation from the process calculus to a game model. This decomposition decouples the interpretation of the source language from the details of the model, allowing for more flexible application of different models or interpretation of different languages. 2. **Design a metalanguage**: Named /u1D70BDiLL, it is a session - type system that extends Differential Linear Logic. This language can not only express the interactive behaviors in game semantics, but also support the deadlock phenomenon in concurrent languages. 3. **Provide specific translation and interpretation examples**: The authors show how to apply this method to an actual language by translating a mini ML language with shared - memory concurrency (ML∥) into /u1D70BDiLL and presenting a causal - event - structure model of /u1D70BDiLL. 4. **Implement a prototype system**: The authors implement a prototype system that can explore the causal behaviors of concurrent programs written in (a subset of OCaml), verifying the effectiveness and practicality of the method. ### Advantages of the methodology: - **Simplify complexity**: By decomposing the interpretation of game semantics into two steps, it becomes easier for non - experts to understand and apply. - **Increase flexibility**: The same translation method can be used to generate different models or interpret different languages. - **Support advanced features**: It can handle complex programming features such as higher - order functions, concurrency, and shared memory. In conclusion, this paper aims to make game semantics more understandable and applicable, especially for the research and development of concurrent programming languages, by introducing a new methodology and a metalanguage.