TL;DR
This paper introduces a dynamic type inference approach for gradually typed languages, ensuring soundness, completeness, and divergence avoidance by deferring type variable instantiation to runtime, and proves the gradual guarantee.
Contribution
It formalizes a new blame calculus with deferred type variable instantiation and integrates dynamic type inference into its semantics, improving correctness and divergence handling.
Findings
The DTI-based semantics is sound and complete with respect to fully instantiated terms.
The approach avoids divergence caused by static type variable instantiation.
The paper proves the gradual guarantee for the ITGL language.
Abstract
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 that avoids such divergence as an intermediate language for the ITGL. A main idea is to allow a term to contain type variables…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
