Using Heuristics to Automate Parameter Generation for Benchmarking of Java Methods

  • Authors:
  • Michael Kuperberg;Fouad Omri

  • Affiliations:
  • Chair for Software Design and Quality, Institute for Program Structures and Data Organisation, Faculty of Informatics, Universität Karlsruhe (TH);Chair for Software Design and Quality, Institute for Program Structures and Data Organisation, Faculty of Informatics, Universität Karlsruhe (TH)

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2009

Quantified Score

Hi-index 0.04

Visualization

Abstract

Automated generation of method parameters is needed in benchmarking scenarios where manual or random generation of parameters are not suitable, do not scale or are too costly. However, for a method to execute correctly, the generated input parameters must not violate implicit semantical constraints, such as ranges of numeric parameters or the maximum length of a collection. For most methods, such constraints have no formal documentation, and human-readable documentation of them is usually incomplete and ambiguous. Random search of appropriate parameter values is possible but extremely ineffective and does not pay respect to such implicit constraints. Also, the role of polymorphism and of the method invocation targets is often not taken into account. Most existing approaches that claim automation focus on a single method and ignore the structure of the surrounding APIs where those exist. In this paper, we present HeuriGenJ, a novel heuristics-based approach for automatically finding legal and appropriate method input parameters and invocation targets, by approximating the implicit constraints imposed on them. Our approach is designed to support systematic benchmarking of API methods written in the Java language. We evaluate the presented approach by applying it to two frequently-used packages of the Java platform API, and demonstrating its coverage and effectiveness.