Gradual Typing for Extensibility by Rows
Taro Sekiyama, Atsushi Igarashi

TL;DR
This paper develops a formal framework for gradual typing with row types and row polymorphism, introducing consistent equivalence and a blame calculus to handle dynamic row types and field reordering.
Contribution
It introduces consistent equivalence for row types, a blame calculus with runtime checks and field reordering, and formalizes a sound, gradually typed language with row polymorphism.
Findings
Formal definition of consistent equivalence for row types
A blame calculus with runtime checks and field reordering
Proof of type soundness for the calculus
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…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Logic, Reasoning, and Knowledge · Semantic Web and Ontologies
