[Paper Review] A Categorical Programming Language
This thesis presents a category-theoretic framework for data types (categorical data types, CDT) using F,G-dialgebras, introduces a categorical specification language (CSL), defines data types and a categorical programming language (CPL), and proves termination of computations via Tait’s method.
A theory of data types based on category theory is presented. We organize data types under a new categorical notion of F,G-dialgebras which is an extension of the notion of adjunctions as well as that of T-algebras. T-algebras are also used in domain theory, but while domain theory needs some primitive data types, like products, to start with, we do not need any. Products, coproducts and exponentiations (i.e. function spaces) are defined exactly like in category theory using adjunctions. F,G-dialgebras also enable us to define the natural number object, the object for finite lists and other familiar data types in programming. Furthermore, their symmetry allows us to have the dual of the natural number object and the object for infinite lists (or lazy lists). We also introduce a programming language in a categorical style using F,G-dialgebras as its data type declaration mechanism. We define the meaning of the language operationally and prove that any program terminates using Tait's computability method.
Motivation & Objective
- Propose a unified, category-theoretic organization of data types using F,G-dialgebras as the foundational notion.
- Develop a categorical specification language (CSL) to describe categories, functors, natural transformations, and factorizers.
- Define Categorical Data Types (CDT) with adjoint-based declarations and exhibit how standard data types arise categorically.
- Introduce and formalize a Categorical Programming Language (CPL) with no primitive data types or control structures, where data types and control are defined categorically.
- Provide semantics and a termination proof for computations in CPL using Tait’s computability method.
Proposed method
- Define CDT data types as F,G-dialgebras extending universal algebras and domain-theoretic ideas.
- Present a CSL (Categorical Specification Language) that extends algebraic specification to categories, functors, natural transformations, and factorizers.
- Show how products, coproducts, exponentials, and natural number objects arise from adjunctions in CDT.
- Describe a CPL with reduction rules and semantics, where data types and control structures are declared via F,G-dialgebras and verified for termination.
- Provide a specification language for categories to semantically ground CDT via F,G-algebras and formal CSL semantics.
Experimental results
Research questions
- RQ1How can data types be systematically organized using category theory, particularly via F,G-dialgebras?
- RQ2Can categories, functors, natural transformations, and factorizers be specified and manipulated to define common data types like naturals, lists, and infinite lists?
- RQ3How can a programming language be built categorically without primitive data types or control structures, relying on categorical declarations instead?
- RQ4What are the formal semantics and termination properties of computations in such a categorical programming language?
- RQ5How does CSL support formal semantics for CDT and how does CDT relate to conventional algebraic specification and domain-theoretic approaches?
Key findings
- Categorical data types (CDT) can define traditional data types (e.g., naturals, lists, infinite lists) via F,G-dialgebras and adjunction-based constructions.
- Products, coproducts, exponentials, and natural number objects emerge naturally from categorical definitions using adjunctions, enabling a uniform treatment of data types.
- A symmetric framework allows both initial (algebra) and final (coalgebra) constructs, enabling finite and infinite data structures within CDT.
- A CPL is presented where programs are morphisms with reduction rules, and termination is proven using Tait’s computability method.
- A CSL is introduced to describe categories with functors, natural transformations, and factorizers, providing a formal semantics basis for CDT.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.