Main Content
ModBEAM-MT: Modular Engineering and Analysis of Java Bytecode Transformations and its Application to Mutation Testing
Funded by the German Research Foundation (2024-2027).
Program transformations implement code analysis and modifications, e.g., for monitoring and profiling of code. Java programs are often transformed at the bytecode level because bytecode does not need to be recompiled. While in compiler construction theory, we often deal with graphs such as control-flow graphs, data-flow graphs and call graphs, existing bytecode toolkits are committed to a tree-like program representation at the code level. More abstract, problem-specific structures are not yet supported. To solve larger tasks, the transformations developed in such a toolkit can be combined, which can lead to undesirable side effects, as the transformations can influence each other. Validation of transformed bytecode is supported in existing toolkits, but in case of faulty transformations, a transformation must be rolled back. The provided validation focuses on the executability of code and cannot be adapted to other needs.
Mutation testing is used to check the quality of a test suite; it is a representative and challenging use case for program transformation. Mutation testing assumes that a program is well tested if its test suite can find the errors injected into the program by mutations, i.e., slight changes of the program behavior. Since programs can be mutated in very different ways, it is important to identify the most effective changes that have the potential to reveal important weak spots of the test suite. The specification of advanced mutation operators that resemble probable programming errors such as API misuse, are not well supported by existing approaches to mutation testing.
The project aims to develop a framework for the user-friendly development of modular program transformations, more specifically for the transformation of Java bytecode. It will enable the developer to flexibly define extensible and traceable program structures that are well suited for the transformation problems to be solved. To ensure that the transformed bytecode will be executable and fulfils other important constraints, consistency-preserving transformation modules can be used. Composition operators and analysis techniques for transformation modules will be available to support modular program transformation without side effects. Since Java projects can become large and transformations often only make local changes, the program transformations will be executed incrementally to ensure scalability.
The flexibility and expressiveness of this framework is showcased by a powerful implementation of effective mutation testing of Java bytecode. Mutation testing is a challenge for the underlying transformation language, as it should allow developers to easily specify advanced mutation operators and intelligent strategies for their application. Moreover, mutation testing should be applicable to real-world projects. Our goal is to provide a flexible, easy-to-use approach to mutation testing with tool support to find effective mutants and to optimize a given test suite accordingly.
Cooperation partners
Prof. Dr.-Ing. Christoph Bockisch, Programming Languages and Tools Research Group