Back to overview

DiSL: A Domain-specific Language for Bytecode Instrumentation

Type of publication Peer-reviewed
Publikationsform Proceedings (peer-reviewed)
Publication date 2012
Author Marek Lukáš, Villazón Alex, Zheng Yudi, Ansaloni Danilo, Binder Walter, Qi Zhengwei,
Project FAN: Foundations of dynamic program ANalysis
Show all

Proceedings (peer-reviewed)

Title of proceedings Proceedings of the 11th International Conference on Aspect-Oriented Software Development
Place Potsdam, Germany
DOI 10.1145/2162049.2162077


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.