European Commission logo
English English
CORDIS - EU research results
CORDIS

Differential Program Semantics

Periodic Reporting for period 2 - DIAPASoN (Differential Program Semantics)

Reporting period: 2020-09-01 to 2022-02-28

Modern software systems are heterogeneous and complex, and the way to tame their complexity so as to support analytical techniques consists in supporting modular forms of reasoning. Indeed, program semantics is traditionally centred around the notion of program identity, that is to say of program equivalence: a program is identified with its meaning, and programs are considered equal only if their meanings are exactly the same. This view has been extremely fruitful in the past, allowing for a deep understanding of highly interactive forms of computation, like those taking place in higher-order or concurrent programs. The byproducts of all this lie everywhere in computer science, from programming language design to verification methodologies. The emphasis on equality — as opposed to difference — is, however, not in line with the way programs are written and structured in modern complex software systems. Subtasks are delegated to pieces of code which behave as expected only up to a certain probability of error, and only if the environment in which they operate makes this possible deviation irrelevant. This phenomenon is ubiquitous, but particularly apparent in fields like approximate computing, machine learning, or cryptography. Notions of program distances measuring in an inherently quantitative way how far two programs are to each other (or how far a program is to its specification), have been almost neglected by the program semantics community until relatively recently, and still have a marginal role in theoretical computer science. DIAPASoN's goal is to study differences between programs as a constitutive and informative concept, rather than by way of relational reasoning. This is accomplished by generalising four major frameworks of program semantics, traditionally used for giving semantics to, comparing, proving properties of, and controlling the usage of resources of programs, namely logical relations, bisimulation, game semantics, and linear logic.
The first 36 months of the DIAPASoN project served to bootstrap the team and to get the first definite results. Indeed, the injection of six postdocs (Aurore Alcolei, Francesco Gavazzo, Guillaume Geoffrey, Paolo Pistone, Alexis Ghyselen, Maurizio Murgia) and two junior researchers (Andrea Colledan and Cecilia Di Florio) in the workgroup allowed the team to start working on the four WPs, and to obtain the first results on all of them. Collaborations between the project participants has been made possible by regular physical meetings at the host institution, weekly seminars, and online exchanges - a SLACK workplace specifically about DIAPASoN has been created and is used to exchange information. Online collaborative tools proved to be very useful during the covid19 pandemic: lockdown was enforced in Italy starting from March 8th, 2020, and physical meetings at the host institution were impossible (until May 4th, 2020) and highly discouraged (afterwards). The DIAPASoN kickoff meeting took place at IRIF (Paris) on February 26 to February 28, 2020, co-located with the CRECOGI and PPS workshops (see https://www.irif.fr/pps-pihoc-diapason2020). The second DIAPASoN meeting took place online in February 2021, again co-located with the PPS workshop. (see https://www.irif.fr/pps-pihoc-diapason2021). Given the high number of participants (more than one hundred researchers registered for the two events), this has been a very good occasion to share the first results obtained in the project with nearby research communities, and to receive feedback. In the first half of this project, results obtained in the project appeared in top journals and conferences on programming language theory, including ICALP, ESOP, POPL, LICS and SCP.
The research activity carried out in the first three years of DIAPASoN have been intense, involving all the four WPs. In particular, the study of differential logical relations (WP1), namely of generalizations of logical relations capable of capturing differences between programs instead of mere equivalences, has resulted in some novel and unexpected results. More specifically, a form of differential logical relation has been proved to form a model of the simply-typed lambda calculus without any linearity or affinity constraints, something impossible when differences are modeled as numerical values. The introduced notion of logical relation has been proved to enable a form of differential reasoning about programs in which the role of the context is taken into account. While differential logical relations provide a denotational semantics of higher-order types with a notion of program distance at each type, such distances do not provide a metric in the standard sense. An alternative approach to differential semantics (WP1) has been introduced in which higher-order types are interpreted as generalized partial metric spaces, a class of metric spaces widely investigated in theoretical computer science. Still about logical relations, a simple form of open logical relation has been shown to be able to justify forward mode automatic differentiation in a higher-order setting. Our work on differential generalizations of bisimulation (WP2) has produced some interesting ideas; in particular, a variation on the well-known concept of subset construction seems to be the natural way to extend differential logical relations to a coinductive scenario. About differential forms of game semantics (WP3), we started from the observation that programs are traditionally interpreted as strategies, and equality in those models capture (contextual) equivalence between programs. Building on this fundamental relation, we have been investigating how standard game models support notions of distance and how the latest can be meaningful in evaluating differences between programs. Still about WP3, a form of game model has been shown to support higher-order extensions of cryptographic primitives. About WP4, namely about differential ideas in logic (and in linear logic in particular), we have been able to precisely understand in which sense the notion of derivative from differential linear logic is different from the one from differential logical relations. Moreover, by exploiting the Curry-Howard correspondence, we have been working on an extension of Peano Arithmetic with probabilistic primitives, as a means to obtain a logical formalism for reasoning about properties of higher-order probabilistic programs. Many of the mentioned results have been submitted for publication, some of them already appearing in key conferences in the area of theoretical computer science and programming language theory. In the rest of this project, we expect to deepen our understanding of the various semantic structures introduced, to develop new ones (e.g. along the lines of WP2), and to extend the obtained results to calculi endowed with various forms of effect, and to concurrent calculi.
Programming with Higher-Order Functions
Via Zamboni, in Bologna