DiSL: a domain-specific language for bytecode instrumentation

  • Authors:
  • Lukáš Marek;Alex Villazón;Yudi Zheng;Danilo Ansaloni;Walter Binder;Zhengwei Qi

  • Affiliations:
  • Charles University, Prague, Czech Rep;Universidad Privada Boliviana, Cochabamba, Bolivia;Shanghai Jiao Tong University, Shanghai, China;University of Lugano, Lugano, Switzerland;University of Lugano, Lugano, Switzerland;Shanghai Jiao Tong University, Shanghai, China

  • Venue:
  • Proceedings of the 11th annual international conference on Aspect-oriented Software Development
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many dynamic analysis tools for programs written in managed languages such as Java rely on bytecode instrumentation. Tool development is often tedious because of the use of low-level bytecode manipulation libraries. While aspect-oriented programming (AOP) offers high-level abstractions to concisely express certain dynamic analyses, the join point model of mainstream AOP languages such as AspectJ is not well suited for many analysis tasks and the code generated by weavers in support of certain language features incurs high overhead. In this paper we introduce DiSL (domain-specific language for instrumentation), a new language especially designed for dynamic program analysis. DiSL offers an open join point model where any region of bytecodes can be a shadow, synthetic local variables for efficient data passing, efficient access to comprehensive static and dynamic context information, and weave-time execution of user-defined static analysis code. We demonstrate the benefits of DiSL with a case study, recasting an existing dynamic analysis tool originally implemented in AspectJ. We show that the DiSL version offers better code coverage, incurs significantly less overhead, and eases the integration of new analysis features that could not be expressed in AspectJ.