Lune

POPL2022Top-tier venue

Formal metatheory of second-order abstract syntax

Marcelo Fiore, Dmitrij Szamozvancev

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. A Unified Treatment of the Substitution Tensor for Presheaves, Nominal Sets, Renaming Sets, and so onFabian Lenke, Stefan Milius, Henning UrbatLICS 2026
  2. Pyrosome: Verified Compilation for Modular MetatheoryDustin Jamner, Gabriel Kammer, Ritam Nag, Adam ChlipalaOOPSLA 2025
  3. BiSikkel: A Multimode Logical Framework in AgdaJoris Ceulemans, Andreas Nuyts, Dominique DevriesePOPL 2025

Builds on2

  1. Algebraic models of simple type theories: A polynomial approachNathanael Arkor, Marcelo FioreLICS 2020 · 10 citations
  2. A Cellular Howe TheoremPeio Borthelle, Tom Hirschowitz, Ambroise LafontLICS 2020 · 9 citations

Related papers

  1. Substructural Abstract Syntax with Variable Binding and Single-Variable SubstitutionMarcelo Fiore, Sanjiv RanchodLICS 2025 · 3 citations
  2. Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek CalculusSteven Schaefer, Nathan Varner, Pedro Henrique Azevedo de Amorim, Max S. NewPLDI 2025
  3. Contract System Metatheories à la Carte: A Transition-System View of ContractsShu-Hung You, Christos Dimoulas, Robert Bruce FindlerOOPSLA 2025
  4. Intrinsically typed compilation with nameless labelsArjen Rouvoet, Robbert Krebbers, Eelco VisserPOPL 2021 · 5 citations
  5. Contextual Embeddings: Implementing Bound Variables through Instance ResolutionSamantha Frohlich, Jessica Foster, G. A. Kavvos, Meng WangPLDI 2026
Dusk over the sea between two cliffs drawn in fine vertical lines