Lune

OOPSLA2026Top-tier venue

Mechanised Semantics of Multi-stage Programming

Ka Wing Li, Maite Kramarz, Ningning Xie, Jeremy Yallop

Abstract

Multi-stage programming (MSP) languages such as MetaML have subtle semantics, in which familiar properties often fail to hold and hazardous interactions with other language features such as state or polymorphism abound. The ongoing incorporation of MSP features into general purpose languages makes the need to establish confidence in their design increasingly pressing.

Taking inspiration from existing MSP systems, we present a Rocq mechanisation of a core calculus for compile-time and run-time MSP with effects, 𝜆 $ run , formally establishing key properties such as type and elaboration soundness and phase distinction. We hope that our mechanised semantics will be a useful basis for formal study of other designs, easing the extension of existing languages with support for MSP.

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.

1 top-tier paper has 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

  • Handling Scope Checks: A Comparative Framework for Dynamic Scope Extrusion Checks cites Staging with class: a specification for typed template Haskell
  • Refined² Environment Classifiers cites Handling Scope Checks: A Comparative Framework for Dynamic Scope Extrusion Checks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Refined² Environment ClassifiersYuito Murase, Atsushi IgarashiOOPSLA 2026

Builds on4

  1. Mœbius: metaprogramming using contextual types: the stage where system f can pattern match on itselfJunyoung Jang, Samuel Gélineau, Stefan Monnier, Brigitte PientkaPOPL 2022 · 28 citations
  2. Staging with class: a specification for typed template HaskellNingning Xie, Matthew Pickering, Andres Löh, Nicolas Wu et al.POPL 2022 · 17 citations
  3. Handling Scope Checks: A Comparative Framework for Dynamic Scope Extrusion ChecksMichael Lee, Ningning Xie, Oleg Kiselyov, Jeremy YallopPOPL 2026 · 3 citations
  4. Progressful Interpreters for Efficient WebAssembly MechanisationXiaojia Rao, Stefan Radziuk, Conrad Watt, Philippa GardnerPOPL 2025 · 3 citations

Related papers

  1. When Do Staging Annotations Preserve Semantics? Mechanizing Typed Semantics-Preserving Multi-stage Programming with Let-InsertionJun Tan, Guannan WeiOOPSLA 2026
  2. Backwards-Compatible Row-Based Exceptions in MLSimcha van Collem, Paulo Emílio de Vilhena, Robbert KrebbersPLDI 2026
  3. Contextual MetaML: Syntax and Full AbstractionHaoxuan Yin, Andrzej S. Murawski, C.-H. Luke OngLICS 2026 · 1 citation
  4. Zooid: a DSL for certified multiparty computation: from mechanised metatheory to certified multiparty processesDavid Castro-Perez, Francisco Ferreira, Lorenzo Gheri, Nobuko YoshidaPLDI 2021 · 25 citations
  5. Certified Compilers à la CarteOghenevwogaga Ebresafe, Ian Zhao, Ende Jin, Arthur Bright et al.PLDI 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines