Pré-Publication, Document De Travail Année : 2026

Code Generation via Meta-programming in Dependently Typed Proof Assistants

Résumé

Dependently typed proof assistants offer powerful meta-programming features, which allow users to implement proof automation or compile-time code generation. This paper surveys meta-programming frameworks in Rocq, Agda, and Lean, with seven implementations of a running example: deriving instances for the Functor typeclass. This example is fairly simple, but realistic enough to highlight recurring difficulties with meta-programming: conceptual limitations of frameworks such as term representation – and in particular binder representation –, meta-language expressiveness, and verifiability, as well as current limitations such as API completeness, learning curve, and prover state management, which could in principle be remedied. We conclude with insights regarding features an ideal meta-programming framework should provide.

Fichier principal
Vignette du fichier
main.pdf (526.38 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Licence

Dates et versions

hal-05024207 , version 1 (08-04-2025)
hal-05024207 , version 2 (29-04-2025)
hal-05024207 , version 3 (13-05-2025)
hal-05024207 , version 4 (20-01-2026)

Licence

Identifiants

  • HAL Id : hal-05024207 , version 4

Citer

Mathis Bouverot-Dupuis, Yannick Forster. Code Generation via Meta-programming in Dependently Typed Proof Assistants. 2026. ⟨hal-05024207v4⟩
812 Consultations
946 Téléchargements

Partager

  • More