Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
175 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Gradual Typing for Extensibility by Rows (1910.08480v2)

Published 18 Oct 2019 in cs.PL

Abstract: This work studies gradual typing for row types and row polymorphism. Key ingredients in this work are the dynamic row type, which represents a statically unknown part of a row, and consistency for row types, which allows injecting static row types into the dynamic row type and, conversely, projecting the dynamic row type to any static row type. While consistency captures the behavior of the dynamic row type statically, it makes the semantics of a gradually typed language incoherent when combined with row equivalence which identifies row types up to field reordering. To solve this problem, we develop consistent equivalence, which characterizes composition of consistency and row equivalence. Using consistent equivalence, we propose a polymorphic blame calculus for row types and row polymorphism. In our blame calculus, casts perform not only run-time checking with the dynamic row type but also field reordering in row types. To simplify our technical development for row polymorphism, we adopt scoped labels, which are employed by the language Koka and are also emerging in the context of effect systems. We give the formal definition of our blame calculus with these technical developments and prove its type soundness. We also sketch the gradually typed surface language and type-preserving translation from the surface language to the blame calculus and discuss conservativity of the surface language over typing of a statically typed language with row types and row polymorphism.

Citations (2)

Summary

We haven't generated a summary for this paper yet.