Séminaire Cambium, Inria Paris, 2 rue Simone Iff Salle Lions 2, bâtiment C Lundi 7 novembre, 10h30 Daniel Mercier AdaCore Towards a solution to the expression problem for compilers: strongly typed nano-passes We present a new solution to the problem of (strongly) typing compiler passes when the source and destination language share multiple constructors. We are interested in approaches that limit the amount of boilerplate that needs to be (re)written for each language, while still maintaining a very strict typing discipline. Our solution uses well-known tools, but combines them in a novel way: - the idea of nanopasses, in which each pass encodes a very limited transformation - the use of ppx syntax extensions to express only the differences between a language and the next - the traversal of the AST using top-down and bottom-up recursion schemes - OCaml polymorphic variants, which are instrumental to precisely type our (non-recursive) transformation functions. We present our implementation of this approach in the context of the Ada frontend for the Infer analyzer, which as of today contains 26 passes. We will also discuss the various pitfalls we have encountered along the way, as well as possible improvements (in particular deforesting the combination of multiple passes). Vous pouvez vous abonner à nos annonces de séminaires: http://cambium.inria.fr/seminar.html Nos séminaires sont accessibles en ligne en direct: https://webconf.math.cnrs.fr/b/fra-ryy-fjn