Automatic Extraction of Heap Reference Properties in Object-Oriented Programs

We present a new technique for helping developers understand heap referencing properties of object-oriented programs and how the actions of the program affect these properties. Our dynamic analysis uses the aliasing properties of objects to synthesize a set of roles; each role represents an abstract object state intended to be of interest to the developer. We allow the developer to customize the analysis to explore the object states and behavior of the program at multiple different and potentially complementary levels of abstraction. The analysis uses roles as the basis for three abstractions: role transition diagrams, which present the observed transitions between roles and the methods responsible for the transitions; role relationship diagrams, which present the observed referencing relationships between objects playing different roles; and enhanced method interfaces, which present the observed roles of method parameters. Together, these abstractions provide useful information about important object and data structure properties and how the actions of the program affect these properties. We have implemented the role analysis and have used this implementation to explore the behavior of several Java programs. Our experience indicates that, when combined with a powerful graphical user interface, roles are a useful abstraction for helping developers explore and understand the behavior of object-oriented programs.

[1]  Martin Gogolla Unified Modeling Language , 2009, Encyclopedia of Database Systems.

[2]  Alexander L. Wolf,et al.  Discovering models of software processes from event-based data , 1998, TSEM.

[3]  Nick Mitchell,et al.  Visualizing the Execution of Java Programs , 2001, Software Visualization.

[4]  Andreas Zeller,et al.  Detecting object usage anomalies , 2007, ESEC-FSE '07.

[5]  Zhenmin Li,et al.  PR-Miner: automatically extracting implicit programming rules and detecting violations in large software code , 2005, ESEC/FSE-13.

[6]  Dawson R. Engler,et al.  From uncertainty to belief: inferring the specification within , 2006, OSDI '06.

[7]  Suresh Jagannathan,et al.  Path-Sensitive Inference of Function Precedence Protocols , 2007, 29th International Conference on Software Engineering (ICSE'07).

[8]  Jeffrey L. Korn,et al.  Chava: reverse engineering and tracking of Java applets , 1999, Sixth Working Conference on Reverse Engineering (Cat. No.PR00303).

[9]  Eran Yahav,et al.  Static Specification Mining Using Automata-Based Abstractions , 2007, IEEE Transactions on Software Engineering.

[10]  Martin C. Rinard,et al.  Role-based exploration of object-oriented programs , 2002, ICSE '02.

[11]  Robert O'Callahan,et al.  Generalized aliasing as a basis for program analysis tools , 2001 .

[12]  Robert O'Callahan,et al.  Lackwit: A Program Understanding Tool Based on Type Inference , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[13]  Martin Fowler More Java Gems: ANALYSIS PATTERNS , 2000 .

[14]  Monica S. Lam,et al.  Automatic extraction of object-oriented component interfaces , 2002, ISSTA '02.

[15]  Ivar Jacobson,et al.  Unified Modeling Language , 2020, Definitions.

[16]  Daniel Jackson,et al.  Lightweight extraction of object models from bytecode , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[17]  Viktor Kuncak,et al.  Role analysis , 2002, POPL '02.

[18]  Martin Fowler,et al.  Dealing with Roles , 1997 .

[19]  William G. Griswold,et al.  Quickly detecting relevant program invariants , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[20]  Daniel Jackson,et al.  Redesigning Air Traffic Control: An Exercise in Software Design , 2000, IEEE Softw..

[21]  Michael D. Ernsty,et al.  Dynamically Discovering Pointer-Based Program Invariants , 2007 .

[22]  Nancy Pennington,et al.  Comprehension strategies in programming , 1987 .

[23]  James R. Larus,et al.  Mining specifications , 2002, POPL '02.

[24]  Andy Chou,et al.  Bugs as Inconsistent Behavior: A General Approach to Inferring Errors in Systems Code. , 2001, SOSP 2001.

[25]  Ruven E. Brooks,et al.  Towards a Theory of the Comprehension of Computer Programs , 1983, Int. J. Man Mach. Stud..

[26]  Mangala Gowri Nanda,et al.  Deriving object typestates in the presence of inter-object references , 2005, OOPSLA '05.

[27]  Jack C. Wileden,et al.  An introduction to the DREAM software design system , 1977, SOEN.

[28]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.