Sites Inria

English version

Séminaire Gallium/Prosecco

Séminaire Gallium/Prosecco - Toward Efficient Gradual Typing

  • Date : 21/02/2019
  • Lieu : Salle JLL1
  • Intervenant(s) : Jeremy Siek
  • Organisateur(s) : Equipe-projet Gallium et Prosecco

Toward Efficient

Jeremy Siek, Indiana University 

Gradual typing combines static and dynamic typing in the same program. Siek et al. (2015) describe five criteria for gradually-typed languages, including type soundness and the gradual guarantee. A significant number of languages have been developed in academia and industry that support some of these criteria (TypeScript, Typed Racket, Safe TypeScript, Transient Reticulated Python, Thorn, etc.), but relatively few support all the criteria (Nom, Gradualtalk, Guarded Reticulated Python). Of those that do, only Nom does so efficiently. The Nom experiment shows that one can achieve efficient gradual typing in languages with only nominal types, but many languages have structural types: function types, tuples, record and object types, generics, etc.
In this talk I describe a compiler, named Grift, that addresses the difficult challenge of efficient gradual typing for structural types. The input language includes a selection of difficult features: first-class functions, mutable arrays, and recursive types. I show that a close-to-the-metal implementation of run-time casts inspired by Henglein's coercions eliminates all of the catastrophic slowdowns without introducing significant average-case overhead. As a result, Grift exhibits lower overheads than those of Typed Racket.

Haut de page

Suivez Inria