Using common off-the-shelf tools to implement dynamic aspects

  • Authors:
  • William R. Mahoney;William L. Sousan

  • Affiliations:
  • University of Nebraska at Omaha, Omaha, Nebraska;University of Nebraska at Omaha, Omaha, Nebraska

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

An emerging software engineering paradigm, Aspect-Oriented Programming, can be used to facilitate moving common interests or requirements from individual software functions into a separate module. Aspect code is woven into the software on either a static (compilation) basis or dynamic (runtime) basis. Existing systems necessitate the use of syntactic sugar. which is added to programs to indicate the join points in the software where aspects could potentially be applied. Static weaving inserts code, at compilation time, into these join points, while dynamic weaving might compile in code which can be activated at runtime. This paper describes a new approach to the implementation of dynamic aspects in C/C++. Our method uses a tool which operates using the GCC compiler suite on Linux; it is a runtime event monitoring system we call "dynamicHook". The tool tests each potential join point at run time for the required activation of advice. If advice code is necessary at the join point it is loaded on the fly from shared libraries, retained for future use, and called dynamically. No additions or modifications to the source code need to be made other than recompiling and linking in our library. The tool is thus targeted at adding aspect oriented methodologies to existing C/C++ code. We have demonstrated the tool by obtaining open-source web servers and adding dynamic aspects dealing with security and intrusion detection.