Computer Science > Programming Languages
[Submitted on 18 Oct 2019 (v1), last revised 22 Oct 2019 (this version, v2)]
Title:Gradual Typing for Extensibility by Rows
View PDFAbstract: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.
Submission history
From: Taro Sekiyama [view email][v1] Fri, 18 Oct 2019 15:53:46 UTC (191 KB)
[v2] Tue, 22 Oct 2019 01:48:53 UTC (159 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.