Separation of concerns in compiler development using aspect-orientation

  • Authors:
  • Xiaoqing Wu;Barrett R. Bryant;Jeff Gray;Suman Roychoudhury;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 2006 ACM symposium on Applied computing
  • Year:
  • 2006

Quantified Score

Hi-index 0.01

Visualization

Abstract

A major difficulty in compiler development regards the proper modularization of concerns among the various compiler phases. The traditional object-oriented development paradigm has difficulty in providing an optimal solution towards modularizing the analysis phases of compiler development, because implementation of each phase often crosscuts the class hierarchy defined by language syntax constructs. Object-oriented design patterns, such as the Visitor pattern, also cannot solve the crosscutting problem adequately because an object is not a natural representation of a collection of operations. This paper demonstrates the benefits of applying aspect-oriented programming languages (e.g., AspectJ) and principles to compiler design and implementation. The experience result shows that the various language constructs in AspectJ (e.g., inter-type declaration, pointcut-advice model, static aspect members and aspect inheritance) fit well with the various computation needs of compiler development, which results in a compiler implementation with improved modularity and better separation of concerns. The ideas utilized in this paper can also be generalized to other software systems with a tree-like structure.