Affiliation:
1. Kyoto University, Japan
2. IBM Research, Japan
Abstract
We study an extension of gradual typing—a method to integrate dynamic typing and static typing smoothly in a single language—to parametric polymorphism and its theoretical properties, including conservativity of typing and semantics over both statically and dynamically typed languages, type safety, blame-subtyping theorem, and the gradual guarantee—the so-called refined criteria, advocated by Siek et al. We develop System F
G
, which is a gradually typed extension of System F with the dynamic type and a new type consistency relation, and translation to a new polymorphic blame calculus System F
C
, which is based on previous polymorphic blame calculi by Ahmed et al. The design of System F
G
and System F
C
, geared to the criteria, is influenced by the distinction between static and gradual type variables, first observed by Garcia and Cimini. This distinction is also useful to execute statically typed code without incurring additional overhead to manage type names as in the prior calculi. We prove that System F
G
satisfies most of the criteria: all but the hardest property of the gradual guarantee on semantics. We show that a key conjecture to prove the gradual guarantee leads to the Jack-of-All-Trades property, conjectured as an important property of the polymorphic blame calculus by Ahmed et al.
Funder
Japan Society for the Promotion of Science
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
31 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Space-Efficient Polymorphic Gradual Typing, Mostly Parametric;Proceedings of the ACM on Programming Languages;2024-06-20
2. Gradually Typed Languages Should Be Vigilant!;Proceedings of the ACM on Programming Languages;2024-04-29
3. Static Blame for gradual typing;Journal of Functional Programming;2024
4. Pragmatic Gradual Polymorphism with References;Programming Languages and Systems;2023
5. Gradual System F;Journal of the ACM;2022-10-28