Generating Test Data for Functions with Pointer Inputs

  • Authors:
  • Srinivas Visvanathan;Neelam Gupta

  • Affiliations:
  • -;-

  • Venue:
  • Proceedings of the 17th IEEE international conference on Automated software engineering
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Generating test inputs for a path in a function with integer and real parameters is an important but difficult problem. The problem becomes more difficult when pointers are passed as inputs to a function. In this case, the shape of the input data structure as well as the datavalues in the fields of this data structure need to be determined for traversal of the given path. The existing techniques to address this problem are inefficient since they use backtracking to simultaneously satisfy the constraints on the pointer variables and the data values used along the path.In this paper, we develop a novel approach that allows the generation of the shape of an input data structure to be done independently of the generation of its data values so as to force the control flow of a function along a given path. We also present a new technique that generates the shape of the input data structure by solving a set of pointer constraints derived in a single pass of the statements along the path. Although simple, our approach is powerful in handling pointer aliasing. It is efficient and provides a practical solution to generating test data for functions with pointer inputs.