z-logo
open-access-imgOpen Access
Practical metaprogramming
Author(s) -
James R. Cordy,
Medha Shukla
Publication year - 1992
Language(s) - English
DOI - 10.1145/962215
Metaprogramming is the process of specifying generic software source templates from which classes of software components, or parts thereof, can be automatically instantiated to produce new software components. Metaprograms are specified in an annotated by-example style accessible to ordinary programmers of the source language. Annotations are in the form of Prolog-like predicates that specify the conditions under which different parts of the source template are to be instantiated. Instantiation of a source component is done by specifying facts about the new application in a database, from which the appropriate instance of the metaprogram is automatically inferred using Prolog-style deduction.This paper describes a practical metaprogramming system being developed as part of the ITRC Software Life Cycle Technology project, which utilizes source transformation to implement all phases of the metaprogramming process. Metaprograms are automatically transformed into TXL (Tree Transformation Language) source transformation tasks that automatically implement the instantiation process using TXL. Examples are shown of the use of metaprogramming in automatically deriving C language glue routines that allow Prolog programs to access the GL graphics library.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom