Type-Driven Automatic Quotation of Concrete Object Code in Meta Programs

Jurgen J. Vinju. Type-Driven Automatic Quotation of Concrete Object Code in Meta Programs. In Nicolas Guelfi, Anthony Savidis, editors, Rapid Integration of Software Engineering Techniques, Second International Workshop, RISE 2005, Heraklion, Crete, Greece, September 8-9, 2005, Revised Selected Papers. Volume 3943 of Lecture Notes in Computer Science, pages 97-112, Springer, 2005. [doi]

Abstract

Meta programming can be facilitated by the ability to represent program fragments in concrete syntax instead of abstract syntax. The resulting meta programs are more self-documenting.

One caveat in concrete meta programming is the syntactic separation between the meta language and the object language. To solve this problem, many meta programming systems use quoting and anti-quoting to indicate precisely where level switches occur. These “syntactic hedges” can obfuscate the concrete program fragments.

This paper describes an algorithm for inferring quotes, such that the meta programmer no longer needs to explicitly indicate transitions between the meta and object languages.