Directed test generation using symbolic grammars

  • Authors:
  • Rupak Majumdar;Ru-Gang Xu

  • Affiliations:
  • C Los Angeles, Los Angeles, CA;C Los Angeles, Los Angeles, CA

  • Venue:
  • Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present CESE, a tool that combines exhaustive enumeration of test inputs from a structured domain with symbolic execution driven test generation. We target programs whose valid inputs are determined by some context free grammar. We abstract the concrete input syntax with symbolic grammars, where some original tokens are replaced with symbolic constants. This reduces the set of input strings that must be enumerated exhaustively. For each enumerated input string, which may contain symbolic constants, symbolic execution based test generation instantiates the constants based on program execution paths. The "template" generated by enumerating valid strings reduces the burden on the symbolic execution to generate syntactically valid inputs and helps exercise interesting code paths. Together, symbolic grammars provide a link between exhaustive enumeration of valid inputs and execution-directed symbolic test generation Preliminary experiments with CESE show that the combination achieves better coverage than both pure enumerative test generation and pure directed symbolic test generation, in orders of magnitude less time and number of generated inputs. In addition, CESE is able to automatically generate inputs that achieve coverage within 10% of manually constructed tests.