Reference. Modular abstract syntax trees (MAST): substitution tensors with second-class sorts
We adapt Fiore, Plotkin, and Turi’s treatment of abstract syntax with binding, substitution, and holes to account for languages with second-class sorts. These situations include programming calculi such as the Call-by-Value lambda-calculus (CBV) and Levy’s Call-by-Push-Value (CBPV). Prohibiting second-class sorts from appearing in variable contexts changes the characterisation of the abstract syntax from monoids in monoidal categories to actions in actegories. We reproduce much of the development through bicategorical arguments. We apply the resulting theory by proving substitution lemmata for varieties of CBV.
Cite
Cites 94 works (8 here)
With notes (8)
Stabilized profunctors and stable species of structures fiore-2024-stabilized
We introduce a bicategorical model of linear logic which is a novel variation of the bicategory of groupoids, profunctors, and natural transformations. Our model is obtained by endowing groupoids with additional structure, called a kit, to stabilize the profunctors by controlling the freeness of the groupoid action on profunctor elements. The theory of generalized species of structures, based on profunctors, is refined to a new theory of stable species of structures between groupoids with Boolean kits. Generalized species are in correspondence with analytic functors between presheaf categories; in our refined model, stable species are shown to be in correspondence with restrictions of analytic functors, which we characterize as being stable, to full subcategories of stabilized presheaves. Our motivating example is the class of finitary polynomial functors between categories of indexed sets, also known as normal functors, that arises from kits enforcing free actions. We show that the bicategory of groupoids with Boolean kits, stable species, and natural transformations is cartesian closed. This makes essential use of the logical structure of Boolean kits and explains the well-known failure of cartesian closure for the bicategory of finitary polynomial functors between categories of set-indexed families and cartesian natural transformations. The paper additionally develops the model of classical linear logic underlying the cartesian closed structure and clarifies the connection to stable domain theory.
Formal metatheory of second-order abstract syntax fiore-2022-formal
Despite extensive research both on the theoretical and practical fronts, formalising, reasoning about, and implementing languages with variable binding is still a daunting endeavour – repetitive boilerplate and the overly complicated metatheory of capture-avoiding substitution often get in the way of progressing on to the actually interesting properties of a language. Existing developments offer some relief, however at the expense of inconvenient and error-prone term encodings and lack of formal foundations. We present a mathematically-inspired language-formalisation framework implemented in Agda. The system translates the description of a syntax signature with variable-binding operators into an intrinsically-encoded, inductive data type equipped with syntactic operations such as weakening and substitution, along with their correctness properties. The generated metatheory further incorporates metavariables and their associated operation of metasubstitution, which enables second-order equational/rewriting reasoning. The underlying mathematical foundation of the framework – initial algebra semantics – derives compositional interpretations of languages into their models satisfying the semantic substitution lemma by construction.
A type- and scope-safe universe of syntaxes with binding: their semantics and proofs allais-2021-a
The syntax of almost every programming language includes a notion of binder and corresponding bound occurrences, along with the accompanying notions of α-equivalence, capture-avoiding substitution, typing contexts, runtime environments, and so on. In the past, implementing and reasoning about programming languages required careful handling to maintain the correct behaviour of bound variables. Modern programming languages include features that enable constraints like scope safety to be expressed in types. Nevertheless, the programmer is still forced to write the same boilerplate over again for each new implementation of a scope-safe operation (e.g., renaming, substitution, desugaring, printing), and then again for correctness proofs. We present an expressive universe of syntaxes with binding and demonstrate how to (1) implement scope-safe traversals once and for all by generic programming; and (2) how to derive properties of these traversals by generic proving. Our universe description, generic traversals and proofs, and our examples have all been formalised in Agda and are available in the accompanying material available online at https://github.com/gallais/generic-syntax .
Everybody’s Got To Be Somewhere mcbrideEverybodysGotToBeSomewhere2018
The key to any nameless representation of syntax is how it indicates the variables we choose to use and thus, implicitly, those we discard. Standard de Bruijn representations delay discarding maximally till the leaves of terms where one is chosen from the variables in scope at the expense of the rest. Consequently, introducing new but unused variables requires term traversal. This paper introduces a nameless ‘co-de-Bruijn’ representation which makes the opposite canonical choice, delaying discarding minimally, as near as possible to the root. It is literate Agda: dependent types make it a practical joy to express and be driven by strong intrinsic invariants which ensure that scope is aggressively whittled down to just the support of each subterm, in which every remaining variable occurs somewhere. The construction is generic, delivering a universe of syntaxes with higher-order metavariables, for which the appropriate notion of substitution is hereditary. The implementation of simultaneous substitution exploits tight scope control to avoid busywork and shift terms without traversal. Surprisingly, it is also intrinsically terminating, by structural recursion alone.
Second-Order and Dependently-Sorted Abstract Syntax fiore-2008-second
Call-By-Push-Value: A Functional/Imperative Synthesis levy-2003-callbypushvalue
Higher-order abstract syntax pfenning-1988-higher
Abstract syntax and variable binding fiore_etal_nd
We develop a theory of abstract syntax with variable binding. To every binding signature we associate a category of models consisting of variable sets endowed with compatible algebra and substitution structures. The syntax generated by the signature is the initial model. This gives a notion of initial algebra semantics encompassing the traditional one; besides compositionality, it automatically verifies the semantic substitution lemma.
External (86)
- Modular abstract syntax trees (MAST): substitution tensors with second-class sorts (2025)
- Familial model of second-order abstract syntax (unpublished) (2025)
- Categorical models of second-order abstract syntax (PhD thesis) (2025)
- Abstract Operational Methods for Call-by-Push-Value (2024)
- An Introduction to Different Approaches to Initial Semantics (2024)
- From Thin Concurrent Games to Generalized Species of Structures (2023)
- Towards a Higher-Order Mathematical Operational Semantics (2022)
- Variable binding and substitution for (nameless) dummies (2022)
- What Makes a Strong Monad? (2022)
- Implementing a category-theoretic framework for typed abstract syntax (2021)
- Abstract clones for abstract syntax (2021)
- Formalization of metatheory of the Lambda Calculus in constructive type theory using the Barendregt variable convention (2021)
- Modules over Monads and Operational Semantics (2020)
- A Cellular Howe Theorem (2020)
- Coq à la carte: a practical approach to modular syntax with binders (2020)
- Mechanising syntax with binders in Coq (2020)
- POPLMark reloaded: Mechanizing proofs by logical relations (2019)
- Autosubst 2: reasoning with multi-sorted de Bruijn terms and vector substitutions (2019)
- Bindings as bounded natural functors (2019)
- Generic Description of Well-Scoped, Well-Typed Syntaxes (2018)
- Intrinsically-typed definitional interpreters for imperative languages (2017)
- List Objects with Algebraic Structure (2017)
- Relative pseudomonads, Kleisli bicategories, and substitution monoidal structures (2016)
- Needle & Knot: Binder Boilerplate Tied Up (2016)
- Syntax and Semantics of Abstract Binding Trees (2016)
- Completeness and Decidability of de Bruijn Substitution Algebra in Coq (2015)
- Unguarded Recursion on Coinductive Resumptions (2015)
- Automatically Generated Infrastructure for De Bruijn Syntaxes (2013)
- Multiversal Polymorphic Algebraic Theories: Syntax, Semantics, Translations, and Equational Logic (2013)
- The Locally Nameless Representation (2012)
- Generic conversions of abstract syntax representations (2012)
- Strongly Typed Term Representations in Coq (2012)
- GMeta: A Generic Formal Metatheory Framework for First-Order Representations (2012)
- Skew-monoidal categories and bialgebroids (2012)
- Binders unbound (2011)
- Modules over relative monads for syntax and semantics (2011)
- The representational adequacy of Hybrid (2011)
- Generic programming with binders and scope (2011)
- Equational properties of iterative monads (2010)
- Modules over monads and initial semantics (2010)
- The span construction (2010)
- Beluga: Programming with Dependent Types, Contextual Data, and Contexts (2010)
- Ott: Effective tool support for the working semanticist (2010)
- A Two-Level Logic Approach to Reasoning About Computations (2009)
- A Framework for Specifying, Prototyping, and Reasoning about Computational Systems (2009)
- A unified framework for generalized multicategories (2009)
- Initial Algebra Semantics for Cyclic Sharing Structures (2009)
- Parametric higher-order abstract syntax for mechanized semantics (2008)
- Data types à la carte (2008)
- The cartesian closed bicategory of generalised species of structures (2008)
- Engineering formal metatheory (2008)
- Nominal Techniques in Isabelle/HOL (2008)
- Elgot algebras (2006)
- Representing cyclic structures as nested datatypes (2006)
- Toward a general theory of names: binding and scope (2005)
- Mechanized Metatheory for the Masses: The PoplMark Challenge (2005)
- Exploring the Regular Tree Types (2004)
- Higher Operads, Higher Categories (2004)
- Infinite trees and completely iterative theories: a coalgebraic view (2003)
- A New Approach to Abstract Syntax with Variable Binding (2002)
- Extensible algebraic datatypes with defaults (2001)
- Semantics of name and value passing (2001)
- Axioms for Recursion in Call-by-Value (2001)
- Implementing Extensible Compilers (2001)
- Complete axioms for categorical fixed-point operators (2000)
- Representable multicategories (2000)
- Monadic Presentations of Lambda Terms Using Generalized Inductive Types (1999)
- Semantical analysis of higher-order abstract syntax (1999)
- Call-by-Push-Value: A Subsuming Paradigm (1999)
- fc-multicategories (1999)
- Synthesizing Object-Oriented and Functional Design to Promote Re-Use (1998)
- Erweiterbare Übersetzer (Master's thesis) (1998)
- Towards a mathematical operational semantics (1997)
- Iteration Theories: The Equational Logic of Iterative Processes (1993)
- Object-Oriented Programming Versus Abstract Data Types (1990)
- An illative theory of relations (1990)
- Une théorie combinatoire des séries formelles (1981)
- User-Defined Types and Procedural Data Structures as Complementary Approaches to Data Abstraction (1978)
- A general Church-Rosser theorem (technical report) (1978)
- Initial Algebra Semantics and Continuous Algebras (1977)
- Monadic Computation and Iterative Algebraic Theories (1975)
- Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem (1972)
- T-catégories (catégories dans un triple) (1971)
- Monads on symmetric monoidal closed categories (1970)
- Intersection types and ressource calculi in the denotational semantics of lambda-calculus
- UniMath: a computer-checked library of univalent mathematics