Generating Dynamic Program Analysis Tools

  • Authors:
  • A. M. Sloane

  • Affiliations:
  • -

  • Venue:
  • ASWEC '97 Proceedings of the Australian Software Engineering Conference
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

Sophisticated instrumentation based systems exist for building dynamic analysis tools but to use these systems a developer must write the instrumentation and analysis code by hand. The paper describes how analysis tools can be generated automatically by specifying analysis algorithms using attribute grammars based on the static and dynamic structure of the program being analysed. Using methods similar to those used to generate compilers, this approach enables implicit storage allocation for analysis data, automatic sequencing of analysis steps and transparently supports a variety of data sources and independence from the underlying implementation technology. Furthermore, analysis algorithms can be described in a modular way, enabling reuse. To demonstrate the approach, the paper describes the Wyong system that generates dynamic analysis tools from specifications. An example analysis module specification is described and its reuse is illustrated. Wyong is based on the Eli compiler generation system and the ATOM program instrumentation system. To avoid having to build extremely large trees describing the dynamic structure of a program, Wyong automatically generates instrumentation code for ATOM. Combined with other modules generated by Eli, the ATOM instrumented binary evaluates the specified analysis attribute computations as it executes. Thus the benefits of a specification based method are combined with the efficiency of an instrumentation based implementation.