A two-dimensional separation of concerns for compiler construction

  • Authors:
  • Xiaoqing Wu;Suman Roychoudhury;Barrett R. Bryant;Jeffrey G. Gray;Marjan Mernik

  • Affiliations:
  • The University of Alabama at Birmingham, Birmingham, AL;The University of Alabama at Birmingham, Birmingham, AL;The University of Alabama at Birmingham, Birmingham, AL;The University of Alabama at Birmingham, Birmingham, AL;University of Maribor, Maribor, Slovenia

  • Venue:
  • Proceedings of the 2005 ACM symposium on Applied computing
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

During language evolution, compiler construction is usually performed along two dimensions: defining new abstract syntax tree (AST) classes, or adding new operations. In order to facilitate such changes, two software design patterns (i.e., the inheritance pattern and the visitor pattern) are widely used to help modularize the language constructs. However, as each design pattern is only suitable for one dimension of extension, neither of these two patterns can independently fulfill the evolution needs during the compiler construction process. In this paper, we analyze two dimensions of concerns in compiler construction and develop a paradigm allowing compiler evolution across these two dimensions using both object-orientation and aspect-orientation. Moreover, this approach provides an ability to perform pattern transformation based on pluggable aspects. A simple implementation of an expression language and its possible extension is demonstrated using Java and AspectJ.