A journey among Java neutral program variants
Nicolas Harrand, Simon Allier, Marcelino Rodriguez-Cancio et al. · Genetic Programming and Evolvable Machines · 2019
Neutral program variants are alternative implementations of a program, yet equivalent with respect to the test suite. Techniques such as approximate computing or genetic improvement share the intuition that potential for enhancements lies in these acceptable behavioral differences (e.g., enhanced performance or reliability). Yet, the automatic synthesis of neutral program variants, through program transformations remains a key challenge. This work aims at characterizing plastic code regions in Java programs, i.e., the code regions that are modifiable while maintaining functional correctness, according to a test suite. Our empirical study relies on automatic variations of 6 real-world Java programs. First, we transform these programs with three state-of-the-art program transformations: add, replace and delete statements. We get a pool of 23,445 neutral variants, from which we gather the following novel insights: developers naturally write code that supports fine-grain behavioral changes; statement deletion is a surprisingly effective program transformation; high-level design decisions, such as the choice of a data structure, are natural points that can evolve while keeping functionality. Second, we design 3 novel program transformations, targeted at specific plastic regions. New experiments reveal that respectively 60%, 58% and 73% of the synthesized variants (175,688 in total) are neutral and exhibit execution traces that are different from the original.
Cited by 23 works. doi:10.1007/s10710-019-09355-3 Open-access PDF
Authors
References
- Search-based software engineering
- Operating system protection through program evolution
- Grid'5000: A Large Scale And Highly Reconfigurable Experimental Grid Testbed
- Load-Time Structural Reflection in Java
- A study of the uniqueness of source code
- SPOON : A library for implementing analyses and transformations of Java source code
- Finding Focus in the Blur of Moving-Target Techniques
- Purity and Side Effect Analysis for Java Programs
- The role of replications in Empirical Software Engineering
- Genetic Improvement of Software: A Comprehensive Survey