Source transformation, analysis and generation in TXL

  • Authors:
  • James R. Cordy

  • Affiliations:
  • Queen's University, Kingston, Canada

  • Venue:
  • Proceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The TXL transformation framework has been widely used in practical source transformation tasks in industry and academia for many years. At the core of the framework is the TXL language, a functional programming language specifically designed for expressing source transformation tasks. TXL programs are self-contained, specifying and implementing all aspects of parsing, pattern matching, transformation rules, application strategies and unparsing in a single uniform notation with no dependence on other tools or technologies. Programs are directly interpreted by the TXL processor without any compile or build step, making it particularly well suited to rapid turnaround, test-driven development. In this paper we provide a practical introduction to using TXL in rapidly developing source transformations from concrete examples, and review experience in applying TXL to a number of practical large scale applications in source code analysis, renovation and migration.