POPL 2019
Sun 13 - Sat 19 January 2019 Cascais, Portugal
Thu 17 Jan 2019 15:21 - 15:43 at Sala I - Type Inference II Chair(s): Niki Vazou

Garcia and Cimini study a type inference problem for the ITGL, an implicitly and gradually typed language with let-polymorphism, and develop a sound and complete inference algorithm for it. Soundness and completeness mean that, if the algorithm succeeds, the input term can be translated to a well-typed term of an explicitly typed blame calculus by cast insertion and vice versa. However, in general, there are many possible translations depending on how type variables that were left undecided by static type inference are instantiated with concrete static types. Worse, the translated terms may behave differently—some evaluate to values but others raise blame.

In this paper, we propose and formalize a new blame calculus $\lambda^{\textsf{DTI}}{\textsf{B}}$ that avoids such divergence as an intermediate language for the ITGL. A main idea is to allow a term to contain type variables (that have not been instantiated during static type inference) and defer instantiation of these type variables to run time. We introduce dynamic type inference (DTI) into the semantics of $\lambda^{\textsf{DTI}}{\textsf{B}}$ so that type variables are instantiated along reduction. The DTI-based semantics not only avoids the divergence described above but also is sound and complete with respect to the semantics of fully instantiated terms in the following sense: if the evaluation of a term succeeds (i.e., terminates with a value) in the DTI-based semantics, then there is a fully instantiated version of the term that also succeeds in the explicitly typed blame calculus and vice versa.

Finally, we prove the gradual guarantee, which is an important correctness criterion of a gradually typed language, for the ITGL.

 Slides (slides_popl.pdf) 850KiB

#### Thu 17 Jan

 15:21 - 16:49: Research Papers - Type Inference II at Sala I Chair(s): Niki VazouIMDEA Software Institute 15:21 - 15:43Talk Dynamic Type Inference for Gradual Hindley–Milner TypingYusuke MiyazakiKyoto University, Taro SekiyamaNational Institute of Informatics, Atsushi IgarashiKyoto University, Japan Link to publication DOI Pre-print Media Attached File Attached 15:43 - 16:05Talk Gradual Typing: A New PerspectiveGiuseppe CastagnaCNRS - Université Paris Diderot, France, Victor LanvinIRIF, Université Paris Diderot, France, Tommaso PetruccianiDIBRIS, Università di Genova, Italy & IRIF, Université Paris Diderot, France, Jeremy G. SiekIndiana University, USA Link to publication DOI Media Attached File Attached 16:05 - 16:27Talk Intersection Types and Runtime Errors in the Pi-CalculusUgo Dal LagoUniversity of Bologna, Italy / Inria, France, Marc De VismeENS Lyon, Damiano MazzaCNRS, Akira YoshimizuINRIA Link to publication DOI Media Attached File Attached 16:27 - 16:49Talk Principality and Approximation under Dimensional BoundAndrej DudenhefnerTechnical University Dortmund, Jakob RehofTechnical University Dortmund Link to publication DOI Media Attached File Attached