A Gentle Introduction to Multi-stage Programming

  • Walid Taha
Conference paper

DOI: 10.1007/978-3-540-25935-0_3

Volume 3016 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Taha W. (2004) A Gentle Introduction to Multi-stage Programming. In: Lengauer C., Batory D., Consel C., Odersky M. (eds) Domain-Specific Program Generation. Lecture Notes in Computer Science, vol 3016. Springer, Berlin, Heidelberg

Abstract

Multi-stage programming (MSP) is a paradigm for developing generic software that does not pay a runtime penalty for this generality. This is achieved through concise, carefully-designed language extensions that support runtime code generation and program execution. Additionally, type systems for MSP languages are designed to statically ensure that dynamically generated programs are type-safe, and therefore require no type checking after they are generated.

This hands-on tutorial is aimed at the reader interested in learning the basics of MSP practice. The tutorial uses a freely available MSP extension of OCaml called MetaOCaml, and presents a detailed analysis of the issues that arise in staging an interpreter for a small programming language. The tutorial concludes with pointers to various resources that can be used to probe further into related topics.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Walid Taha
    • 1
  1. 1.Department of Computer ScienceRice UniversityHoustonUSA