author: Roman Wiedijk
title: Code-instrumentation with MOD-BEAM
keywords: software engineering, model transformation, model-based engineering, coverage
topics: Case studies and Applications , Languages , Software Technology
committee: Christoph Bockisch ,
Mehmet Ak┼čit ,
Ansgar Fehnker
started: January 2019
end: July 2019

Abstract

Java code instrumentation is a frequently used technique in order to add functionality to code without adding lines to the original source code. Its applications vary across tools in order to perform profiling, logging, code-coverage analysis, aspect-oriented programming, etc. These various tools often opt to make use of a library in order to perform the actual code-instrumentation. In this research, we study existing instrumentation tools and frameworks to determine a starting point to assess the viability of Mod-BEAM, a model-driven engineering based tool. We proceed by reimplementing the instrumentation process of code-coverage analysis tools Cobertura and JaCoCo in the form of a model-transformation using Mod-BEAM. An analysis is performed on the original implementations as well as our reimplementations, which are assessed to be functionally sufficiently equal and then compared. As a result, our reimplementations handle most of the instruction functionality of their original counterparts with a significantly reduced size and complexity. This comes at the low cost of reduced class-level modularity.