Recovering Fitness Gradients for Interprocedural Boolean Flags in Search-Based Testing
In Search-based Software Testing (SBST), test generation is guided by fitness functions that estimate how close a test case is to reach an uncovered test goal (e.g., branch). A popular fitness function estimates how close conditional statements are to evaluating to true or false, i.e., the branch distance. However, when conditions read Boolean variables (e.g., if(x && y)), the branch distance provides no gradient for the search, since a Boolean can either be true or false. This flag problem can be addressed by transforming individual procedures such that Boolean flags are replaced with numeric comparisons that provide better guidance for the search. Unfortunately, defining a semantics-preserving transformation that is applicable in an interprocedural case, where Boolean flags are passed around as parameters and return values, is a daunting task. Thus, it is not yet supported by modern test generators. This paper is based on the insight that fitness gradients can be recovered by using runtime information: Given an uncovered interprocedural flag branch, our approach (1) calculates context-sensitive branch distance for all control flows potentially returning the required flag in the called method, and (2) recursively aggregates these distances into a continuous value. We implemented our approach on top of the EvoSuite framework for Java, and empirically compared it with state-of-the-art testability transformations on 807 non-trivial methods suffering from interprocedural flag problems, selected from 150 open source Java projects. Our experiment demonstrates that our approach achieves higher coverage on the subject methods with statistical significance and acceptable runtime overheads.
Wed 22 JulDisplayed time zone: Tijuana, Baja California change
12:10 - 13:10
STATIC ANALYSIS AND SEARCH-BASED TESTINGTechnical Papers at Zoom
Chair(s): Daniel Kroening University of Oxford
Public Live Stream/Recording. Registered participants should join via the Zoom link distributed in Slack.
|How Effective Are Smart Contract Analysis Tools? Evaluating Smart Contract Static Analysis Tools using Bug Injection|
Asem Ghaleb , Karthik Pattabiraman University of British ColumbiaDOI Media Attached
|A Programming Model for Semi-implicit Parallelization of Static Analyses|
Dominik Helm TU Darmstadt, Germany, Florian Kübler TU Darmstadt, Germany, Jan Thomas Kölzer , Philipp Haller KTH Royal Institute of Technology, Michael Eichberg TU Darmstadt, Germany, Guido Salvaneschi Technische Universität Darmstadt, Mira Mezini Technische Universität DarmstadtDOI
|Recovering Fitness Gradients for Interprocedural Boolean Flags in Search-Based Testing|
Yun Lin National University of Singapore, Jun Sun Singapore Management University, Gordon Fraser University of Passau, Ziheng Xiu , Ting Liu Xi'an Jiaotong University, Jin Song Dong National University of SingaporeDOI Pre-print Media Attached