Copyright © 2006 Elsevier B.V. All rights reserved.
Reverse-engineering 1-n associations from Java bytecode using alias analysis
Received 27 April 2005;
References and further reading may be available for this article. To view references and further reading you must purchase this article.
Abstract
1-n associations are design language constructs that represent one-to-many structural invariants for objects. To implement 1-n associations, container classes, such as Vector in Java, are frequently used as programming language constructs. Many of the current CASE tools fail to reverse-engineer 1-n associations that have been implemented via containers because sophisticated analyses are required to infer the type of elements collected in containers. This paper presents a new approach to reverse-engineering 1-n associations from Java bytecode based on alias analysis. In our approach, 1-n associations are inferred by examining the abstract heap structure that is constructed by applying an alias analysis on inter-variable relationships extracted from assignments and method invocations of containers. Our approach handles container alias problem that has been neglected by previous techniques by approximating the relationships between containers and elements at the object level rather than analyzing only the bytecode. Our prototype implementation was used with a suite of well-known Java programs. Most of the 1-n associations were successfully reverse-engineered from hundreds of class files in less than 1 minute.
Keywords: Reverse-engineering; Class diagram; Program understanding; Alias analysis;Static program analysis; Type inference
Article Outline
- 1. Introduction
- 2. Problem and motivation
- 3. Reverse-engineering mechanism
- 3.1. Alias relationship
- 3.2. Collection relationship
- 3.3. Pseudo-alias relationship
- 3.4. Abstract heap structure
- 3.5. Inference
- 4. Analysis for Java bytecode
- 4.1. Abstract syntax for Java bytecodes
- 4.2. Extraction of inter-variable relationships
- 4.3. Element type determination
- 4.4. Characteristics of our analysis
- 4.4.1. Bytecode level analysis
- 4.4.2. Application to other OO languages
- 4.4.3. Flow insensitive analysis
- 4.4.4. Not whole program analysis
- 5. Experimental results
- 6. Discussion
- 6.1. Heuristics
- 6.1.1. Container methods
- 6.1.2. User-defined containers
- 6.1.3. Approximation
- 6.2. Challenges
- 6.2.1. Factory methods
- 6.2.2. Detection of containers
- 6.2.3. Element type determination
- 6.2.4. Semantic shift
- 6.2.5. Soundness
- 6.2.6. Parametric polymorphism
- 7. Related work
- 8. Conclusions and future work
- References







E-mail Article
Add to my Quick Links

Cited By in Scopus (0)






