An Executable Specification of Typing Rules for Extensible Records based on Row Polymorphism
Ki Yung Ahn

TL;DR
This paper presents an executable specification of typing rules for extensible records using row polymorphism, leveraging logic programming in Prolog to model complex type features like openness and extensibility.
Contribution
It introduces a formal, executable Prolog-based specification for record types with row polymorphism, extending previous work on polymorphic type inference in logic programming.
Findings
Prolog effectively models record types and row polymorphism.
The specification supports extensible, open record types.
Discussion of Prolog's advantages and limitations as a type system specification language.
Abstract
Type inference is an application domain that is a natural fit for logic programming (LP). LP systems natively support unification, which serves as a basic building block of typical type inference algorithms. In particular, polymorphic type inference in the Hindley--Milner type system (HM) can be succinctly specified and executed in Prolog. In our previous work, we have demonstrated that more advanced features of parametric polymorphism beyond HM, such as type-constructor polymorphism and kind polymorphism, can be similarly specified in Prolog. Here, we demonstrate a specification for records, which is one of the most widely supported compound data structures in real-world programming languages, and discuss the advantages and limitations of Prolog as a specification language for type systems. Record types are specified as order-irrelevant collections of named fields mapped to their…
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 · Formal Methods in Verification
