Deriving Object Typestates in the Presence of Inter-Object References
Dr. Satish Chandra
IBM T. J. Watson Research Center

Abstract:

We are interested in static analysis of Java classes with the goal of discovering the preconditions under which a certain program point within a method may be reached, taking into account the effects of previous method calls on an object of that class. The information pertinent to this computation is represented as the object's typestate, which is a finite set of relevant predicates that abstract the object's actual state. The execution of a method depends on an object's current typestate as well as other input parameters; the object may transition to a different typestate during the method's execution. Since object often contain references to other objects, an object's behavior may depend on, in addition to its own state, the state of objects it has a reference to.

In this talk I will describe a technique to discover relevant object typestates, as well as transitions between typestates, in the presence of inter-object references. Our analysis first performs a combined predicate discovery and predicate abstraction to derive "boolean" versions of Java classes given as input. It then uses abstract interpretation to compute the typestate transitions caused by method calls. A novel aspect of this work is that a set of Java classes is analyzed in isolation, without any client program being provided. To do this, the analysis simulates all possible client's actions via a synthetic heap, all of whose interesting configurations are explored by our analysis.

The information we compute can be put to use in several ways. It can be used in checking whether a given client code erroneously uses a set of Java classes in a way that can throw an exception. It can also be used in creating test drivers for Java classes in order to exercise all relevant code paths in the corresponding methods.

This talk is based on joint work with Mangala Gowri Nanda (IBM India Research Lab) and Christian Grothoff (UCLA). A paper describing this work appears in OOPSLA 2005.

Bio:

Satish Chandra obtained a PhD from the University of Wisconsin-Madison in 1997, and a B.Tech from the Indian Institute of Technology-Kanpur in 1991, both in computer science. From 1997 to 2002, he was a member of technical staff at Bell Laboratories, where his research focused on program analysis, domain-specific languages, and data-communication protocols. In September 2002, he joined IBM Research in New Delhi, India, where he managed a small research group in software engineering. He is currently a member of programming languages and software engineering department at IBM's T. J. Watson Research Center in Hawthorne, New York.