Automatic Assertion Generation from Natural Language Specifications Using Subtree Analysis
Junchen Zhaoa and Ian G. Harrisb
University of California Irvine, Irvine, CA, USA
ajunchez3@uci.edu
bharris@ics.uci.edu
ABSTRACT
We present an approach to generate assertions from natural language specifications by performing semantic analysis of sentences in the specification document. Other techniques for automatic assertion generation use information found in the design implementation, either by performing static or dynamic analysis. Our approach generates assertions directly from the specification document, so bugs in the implementation will not be reflected in the assertions. Our approach parses each sentence and examines the resulting syntactic parse trees to locate subtrees which are associated with important phrases, such as the antecedent and consequent of an implication. Formal assertions are generated using the information inside these subtrees to fill a set of assertion templates which we present. We evaluate the effectiveness of our approach using a set of statements taken from a real specification document.