Typed syntactic meta-programming

  • Authors:
  • Dominique Devriese;Frank Piessens

  • Affiliations:
  • iMinds -- DistriNet, KU Leuven, Leuven, Belgium;iMinds -- DistriNet, KU Leuven, Leuven, Belgium

  • Venue:
  • Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a novel set of meta-programming primitives for use in a dependently-typed functional language. The types of our meta-programs provide strong and precise guarantees about their termination, correctness and completeness. Our system supports type-safe construction and analysis of terms, types and typing contexts. Unlike alternative approaches, they are written in the same style as normal programs and use the language's standard functional computational model. We formalise the new meta-programming primitives, implement them as an extension of Agda, and provide evidence of usefulness by means of two compelling applications in the fields of datatype-generic programming and proof tactics.