Implementing a Category-Theoretic Framework for Typed Abstract Syntax

12/13/2021
by   Benedikt Ahrens, et al.
0

In previous work ("From signatures to monads in UniMath"), we described a category-theoretic construction of abstract syntax from a signature, mechanized in the UniMath library based on the Coq proof assistant. In the present work, we describe what was necessary to generalize that work to account for simply-typed languages. First, some definitions had to be generalized to account for the natural appearance of non-endofunctors in the simply-typed case. As it turns out, in many cases our mechanized results carried over to the generalized definitions without any code change. Second, an existing mechanized library on ω-cocontinuous functors had to be extended by constructions and theorems necessary for constructing multi-sorted syntax. Third, the theoretical framework for the semantical signatures had to be generalized from a monoidal to a bicategorical setting, again to account for non-endofunctors arising in the typed case. This uses actions of endofunctors on functors with given source, and the corresponding notion of strong functors between actions, all formalized in UniMath using a recently developed library of bicategory theory. We explain what needed to be done to plug all of these ingredients together, modularly. The main result of our work is a general construction that, when fed with a signature for a simply-typed language, returns an implementation of that language together with suitable boilerplate code, in particular, a certified monadic substitution operation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/10/2023

Substitution for Non-Wellfounded Syntax with Binders

We describe a generic construction of non-wellfounded syntax involving v...
research
05/09/2018

High-level signatures and initial semantics

We present a device for specifying and reasoning about syntax for dataty...
research
06/21/2020

Large and Infinitary Quotient Inductive-Inductive Types

Quotient inductive-inductive types (QIITs) are generalized inductive typ...
research
10/21/2019

Signatures and models for syntax and operational semantics in the presence of variable binding

This thesis deals with the specification and construction of syntax and ...
research
10/21/2019

Signatures et modèles pour la syntaxe et la sémantique opérationnelle en présence de liaison de variables

This thesis deals with the specification and construction of syntax and ...
research
01/19/2022

Incoherent coherences

This article explores a generic framework of well-typed and well-scoped ...
research
03/03/2019

Modular specification of monads through higher-order presentations

In their work on second-order equational logic, Fiore and Hur have studi...

Please sign up or login with your details

Forgot password? Click here to reset