retr05 - Automatic Extraction of Abstract-Object-State...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Automatic Extraction of Abstract-Object-State Machines Based on Branch Coverage Hai Yuan Department of Computer Science North Carolina State University Raleigh, NC 27695 hyuan3@ncsu.edu Tao Xie Department of Computer Science North Carolina State University Raleigh, NC 27695 xie@csc.ncsu.edu Abstract Some requirement modelling languages such as UMLs statechart diagrams allow developers to specify require- ments of state-transition behavior in a visual way. These requirement specifications are useful in many ways, includ- ing helping program understanding and specification-based testing. However, there are a large number of legacy sys- tems that are not equipped with these requirement specifica- tions. This paper proposes a new approach, called Brastra, for extracting object state machines (OSM) from unit-test executions. An OSM describes how a method call transits an object from one state to another. When the state of an object is represented with concrete-state information (the values of fields transitively reachable from the object), the extracted OSMs are simply too complex to be useful. Our Brastra approach abstracts an objects concrete state to an abstract state based on the branch coverage information ex- ercised by methods invoked on the object. We have proto- typed our Brastra approach and shown the utility of the ap- proach with an illustrating example. Our initial experience shows that Brastra can extract compact OSMs that pro- vide useful information for understanding state-transition behavior. 1 Introduction The Unified Modelling Languages (UML) [15] provides a set of notations for describing requirements of artifacts in software systems. Among these notations, statechart dia- grams capture state-transition behavior of a class or multi- ple classes. After requirements specifications are specified, developers can write source code to implement the specified behavior. Later when developers want to understand and maintain the source code, they can refer to requirements specifications besides directly inspecting the source code. In addition, developers can use specification-based testing tools [6, 8, 12, 17] to generate test inputs from the specifi- cations and check the behavior of implementation with the behavior specified in requirements specifications. However, a number of legacy systems are not equipped with speci- fications. Understanding and testing these legacy systems present a challenge for developers. To address this chal- lenge, researchers have developed various reverse engineer- ing techniques [11] to infer various types of information from legacy systems. This paper proposes Brastra, a new approach for auto- matically extracting object state machines (OSM) [21] for a class from unit-test executions. These OSMs describe state- transition behavior exhibited by invoking methods on ob- jects of a class. An OSM is similar to a UML statechart diagram. In an OSM for a class, a state represents the state of an object at runtime. A transition represents method callsof an object at runtime....
View Full Document

This note was uploaded on 02/24/2012 for the course CSE 503 taught by Professor Davidnotikin during the Spring '11 term at University of Washington.

Page1 / 7

retr05 - Automatic Extraction of Abstract-Object-State...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online