On the Learnability of Programming Language Semantics
Dan R. Ghica (1), Khulood Alyahya (2) ((1) University of Birmingham,, (2) University of Exeter)

TL;DR
This paper explores the learnability of programming language semantics using game semantics and neural networks, demonstrating how LSTM models can approximate complex semantic interactions in Idealised Algol.
Contribution
It introduces a novel approach of applying LSTM neural networks to learn and analyze game-semantic models of programming languages, bridging formal semantics and machine learning.
Findings
LSTM models can effectively learn game-semantic representations.
Model accuracy depends on term complexity and number of free variables.
Learned models enable semantic analysis between different language variants.
Abstract
Game semantics is a powerful method of semantic analysis for programming languages. It gives mathematically accurate models ("fully abstract") for a wide variety of programming languages. Game semantic models are combinatorial characterisations of all possible interactions between a term and its syntactic context. Because such interactions can be concretely represented as sets of sequences, it is possible to ask whether they can be learned from examples. Concretely, we are using long short-term memory neural nets (LSTM), a technique which proved effective in learning natural languages for automatic translation and text synthesis, to learn game-semantic models of sequential and concurrent versions of Idealised Algol (IA), which are algorithmically complex yet can be concisely described. We will measure how accurate the learned models are as a function of the degree of the term and the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
