A High-Level IR Transformation System

  • Herbert Jordan
  • Peter Thoman
  • Thomas Fahringer
Conference paper

DOI: 10.1007/978-3-642-54420-0_63

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8374)
Cite this paper as:
Jordan H., Thoman P., Fahringer T. (2014) A High-Level IR Transformation System. In: an Mey D. et al. (eds) Euro-Par 2013: Parallel Processing Workshops. Euro-Par 2013. Lecture Notes in Computer Science, vol 8374. Springer, Berlin, Heidelberg

Abstract

The development and implementation of source-to-source code transformations based on high-level intermediate representations (IRs) is a labor-intensive, error-prone task. It tends to result in large code bases which are hard to read and maintain. Although not encountered within widely used source-to-source compiler infrastructures, transformation systems tackle this issue by utilizing declarative descriptions of unification-based term rewriting rules. However, unification lacks the ability of (arbitrarily) deep term inspection and is limited to tree nodes exhibiting a fixed arity – a property not generally satisfied by high-level IRs or programming languages.

In this paper we present a declarative tree transformation system which exceeds the expressiveness of conventional unification based systems by operating on arbitrary tree structures.We define its formal foundation, describe its implementation within the Insieme compiler project and provide real-world code examples. The latter demonstrate the expressive power, usability and intuitiveness of our solution.

Keywords

Compiler Program Transformation Term Rewriting Pattern Matching Regular Expressions 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Herbert Jordan
    • 1
  • Peter Thoman
    • 1
  • Thomas Fahringer
    • 1
  1. 1.Institute of Computer ScienceUniversity of InnsbruckInnsbruckAustria

Personalised recommendations