Polymorphic Records for Dynamic Languages

📅 2024-03-30
🏛️ arXiv.org
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Dynamic languages like Elixir lack decidable, expressive gradual type systems. Method: This paper introduces a record type system integrating row polymorphism with set-theoretic types (union, intersection, and negation), semantically modeling field addition, deletion, and selection operations; it is the first to achieve deep synergy between row polymorphism and set-theoretic types, enabling a semantics-driven subtyping decision algorithm. Contributions: Theoretically, we establish a fully formalized system with a mechanized proof of type safety. Algorithmically, we provide polynomial-time decidable subtyping and type-checking algorithms. Our approach reconciles high expressiveness—supporting precise structural reasoning over records—with decidability, thereby delivering the first formally rigorous and practically viable foundation for gradual typing in Elixir and similar dynamic languages.

Technology Category

Constraint Satisfaction and Optimization: Satisfiability Modulo TheoriesKnowledge Representation and Reasoning: Description LogicsMultiagent Systems: Mechanism Design

Application Category

Semantics and Knowledge: Data modeling to support human-machine intelligence, including LLMs agents, intelligent system behavior, explanations, and user-friendly interactionsGraph Algorithms and Modeling for the Web: Efficient manipulation of static and dynamic Web-related graphsSecurity and Privacy: Data transparency and provenance
📝 Abstract
We define and study"row polymorphism"for a type system with set-theoretic types, specifically union, intersection, and negation types. We consider record types that embed row variables and define a subtyping relation by interpreting types into sets of record values and by defining subtyping as the containment of interpretations. We define a functional calculus equipped with operations for field extension, selection, and deletion, its operational semantics, and a type system that we prove to be sound. We provide algorithms for deciding the typing and subtyping relations. This research is motivated by the current trend of defining static type system for dynamic languages and, in our case, by an ongoing effort of endowing the Elixir programming language with a gradual type system.
Problem

Research questions and friction points this paper is trying to address.

Defines row polymorphism for set-theoretic type systems.
Develops a functional calculus for record operations.
Motivated by adding gradual typing to dynamic languages.
Innovation

Methods, ideas, or system contributions that make the work stand out.

Row polymorphism with set-theoretic types
Functional calculus for record operations
Algorithms for typing and subtyping decisions
🔎 Similar Papers
No similar papers found.