Towards a fully-reflective meta-programming language

  • Authors:
  • Gregory Neverov;Paul Roe

  • Affiliations:
  • Queensland University of Technology, Brisbane, Australia;Queensland University of Technology, Brisbane, Australia

  • Venue:
  • ACSC '05 Proceedings of the Twenty-eighth Australasian conference on Computer Science - Volume 38
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

The term meta-programming language is used to describe languages that have some capability for manipulating code. A multi-stage language is a kind of meta-programming language that allows static type-checking of dynamically generated code. The expressiveness and type-safety of multi-stage languages have led to their success in many applications that require code generation. This paper presents the design of a multi-stage language that is an extension to a traditional object-oriented language (e.g. C# or Java). The language has a static type system and allows types and code to be manipulated dynamically, hence giving it full reflection over the structure of a program. The language is discussed through a series of examples on run-time optimisation, serialiser generation and compiler construction. A prototype compiler for the language has been implemented which targets Microsoft's Common Language Runtime (.NET).