Back to search

University of Crete (UOC)

Integrated metaprogramming systems: language, tools and practices

Abstract

dc:description

Metaprogramming is an advanced language feature enabling to mix programs withdefinitions that generate source code to be put in their place. Such definitions arecalled metaprograms and are executed during the translation of the main program.While metaprograms are essentially programs they are mostly treated as special caseswithout sharing the current programming practices and development tools. In thiscontext, we emphasize the need for a methodological integration betweenmetaprograms and normal programs presenting a systematic proposition towardsintegrated metaprogramming systems. We cover and implement aspects related tolanguage, programming model, tool support and deployment practices.We identify a set of primary requirements related to language implementation,metaprogramming features, software engineering support, and programmingenvironments, that are necessary to achieve such integration and elaborate onaddressing them in the implementation of a metaprogramming system. In particular,we introduce the notion of integrated metaprograms, as coherent programs assembledfrom specific meta-code fragments present in the source code. We prove theexpressiveness of this programming model and illustrate its software engineeringadvantages through case studies that reflect demanding scenarios of exceptionhandling, design patterns and design by contract. Then we present an integrated toolchainthat treats metaprograms as first-class citizens of the programming environment,incorporating them into the workspace management and supporting them with a fullscalebuild process. We also elaborate on the way we provide precise compile-errorreporting and full-power source-level debugging facilities for metaprograms. Regarding model integration, we show how Aspect-Oriented Programming (AOP), aparadigm originally considered only for normal programs, is effectively extended andapplied in a metaprogramming context. In particular, we present a systematicproposition for introducing aspect orientation in the entire processing pipeline of ametaprogramming system. Additionally, we discuss an implementation approachtreating aspects as batches of transformation metaprograms, the latter deploying acustom AOP-related library we offer. Example scenarios are discussed demonstratinghow the proposed aspect system is used in practice, while we present how full-scalesource-level aspect debugging is facilitated during the program compilation process.Finally, we propose deployment practices that utilize metaprogramming to achievereusability at a macroscopic scale. In this direction, we present a methodology forimplementing reusable design patterns and exception handling templates by realizingthem as metaprogram libraries that can be deployed on demand. We also discuss animproved Model-Driven Engineering (MDE) practice where the outcomes of MDEtoolsbecome read-only Abstract Syntax Trees (ASTs) instead of source code toresolve the inherent maintenance issues in such tools. In our approach the applicationsource code involves metaprogramming to deploy and manipulate the generated codefragments as ASTs, instead of being built around the generated code with custommodifications and extensions.

Degree

thesis:*
Grantor dc:publisher
University of Crete (UOC)
Year dc:date
2014

Author and committee

dc:creator, dc:contributor.*
Authors dc:creator
  • Lilis, Yannis
  • Λιλής, Ιωάννης

Subjects

dc:subject × 18

Rights

Language dc:language
eng

Identifiers

dc:identifier.*
Identifier
10.12681/eadd/36573

Chain of custody

source
Harvested from
Greek National Archive of PhD Theses
Base URL
phdtheses.ekt.gr/eadd_oai/request
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
citation

Lilis, Yannis; Λιλής, Ιωάννης. Integrated metaprogramming systems: language, tools and practices. University of Crete (UOC), 2014. http://hdl.handle.net/10442/hedi/36573