Types and Semantics for Extensible Data Types (Extended Version)
Cas van der Rest, Casper Bach Poulsen

TL;DR
This paper introduces a new type system and core calculus that natively supports initial algebra semantics, enabling flexible extension of data types and functions in programming languages.
Contribution
It provides a novel type discipline and core calculus for languages with native support for initial algebra semantics, improving extensibility and efficiency.
Findings
Developed a type discipline for initial algebra semantics
Designed a core calculus supporting native data type extensions
Demonstrated potential for more efficient code generation
Abstract
Developing and maintaining software commonly requires (1) adding new data type constructors to existing applications, but also (2) adding new functions that work on existing data. Most programming languages have native support for defining data types and functions in a way that supports either (1) or (2), but not both. This lack of native support makes it difficult to use and extend libraries. A theoretically well-studied solution is to define data types and functions using initial algebra semantics. While it is possible to encode this solution in existing programming languages, such encodings add syntactic and interpretive overhead, and commonly fail to take advantage of the map and fold fusion laws of initial algebras which compilers could exploit to generate more efficient code. A solution to these is to provide native support for initial algebra semantics. In this paper, we develop…
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 · Advanced Software Engineering Methodologies · Service-Oriented Architecture and Web Services
