D25: A Static Analysis for Extracting Runtime Views from Annotated Object-Oriented Code
D25: A Static Analysis for Extracting Runtime Views from Annotated Object-Oriented CodeTuesday, Oct 24, from 14:30 to 15:00
Wednesday, Oct 25, from 13:30 to 14:00
Thursday, Oct 26, from 11:00 to 11:30
Thursday, Oct 26, from 16:30 to 17:00
Module views such as UML class diagrams that are automatically extracted from code do not explain the runtime structure of an object-oriented program. For instance, it is common to see several classes in the system depending on a single container class in a module view, whereas at runtime, different instantiations of such an element have distinct conceptual purposes and correspond to different design elements. We would like to represent a runtime object graph in terms of nodes corresponding to objects and edges corresponding to communication (creation, usage, etc.) between objects. We are developing an analysis to statically approximate the runtime object graph of an annotated program. The key idea is to use ownership domain annotations to allow us to structure an object graph into an implicit ownership tree. In a type system with ownership domains, each object contains one or more domains and each object can be in exactly one domain. Having the hierarchy is essential for the scalability of the approach since runtime object graphs can be large. The current implementation consists of several visitor-based analyses using the AliasJava infrastructure. The tool takes an AliasJava program and produces an output file in the AT&T GraphViz dot format. In order to reduce the clutter in the views, we currently merge objects of the same type that are owned by the same domain. In addition, we show only actual domains and the objects inside them, i.e., for each formal domain, we determine the actual domain it is transitively bound to and we lift each object declared in formal domain transitively to show it in the actual domain We are currently refining the analysis to produce a more precise output. We are also conducting case studies to evaluate the views we statically obtain for realistic object-oriented implementations.
Marwan Abi-Antoun,Carnegie Mellon University
Jonathan Aldrich, Carnegie Mellon University