210 likes | 421 Views
Reverse Engineering. Valeriya Perelman 12/10/04. Outline. Motivation Terminology Related work Approach discussion Challenges References. Motivation. Improving comprehensibility of software systems Modifying software while keeping design and source code synchronized Software re-use
E N D
Reverse Engineering Valeriya Perelman 12/10/04
Outline • Motivation • Terminology • Related work • Approach discussion • Challenges • References
Motivation • Improving comprehensibility of software systems • Modifying software while keeping design and source code synchronized • Software re-use • Reengineering software on the design level
Terminology Re-engineering Requirements Reverse engineering Forward engineering Analysis Design Implementation
Related Work-- Commercial CASE Tools • UML-Based Static Reverse Engineering is supported by: • Rational Rose • Together • Poseidon • CodeLogic (Can generate control-flow and sequence diagrams per method given by user) Pros: • Fully automatic process of RE • Highly scalable Cons: • Dynamic aspect of design is not supported in the RE process(except for CodeLogic) • Not all the relations are identified • Multiplicity is not supported
Related Work-- Research Prototypes • UML-Based • IDEA (Redocumentation of Java programs using UML class diagrams) • FUJABA (generating both dynamic and static aspects, requires specific code conventions): Example for an Association Comment /** * <h2>Associations</h2> * * <pre> * cardLeftcardRight * LeftClass ------------------------------ RightClass * leftRolerightRole * </pre> */
Related Work-- Research Prototypes – cont. • Others • Rigi • Has its own format (RSF-Rigi Standard Format) • Semi-automatic • Implemented for C/C++ • Hierarchical clustering of related artifacts into subsystems • Supports model visualization • The RE based on certain modularity principles (such as data abstraction, low coupling among subsystems e.t.c.)
Related Work-- Design Pattern-Based Design Recovery Techniques • Searching for minimal key structures: • DP++, KT, SPOOL • Searching for class structures (Pat, IDEA) • Searching based on fuzzy logic: • Technical Report tr-ri-01-222, University of Paderborn • Searching based on metrics (Object oriented, structural and procedural): • Wizzard for C++ by Kim, H., Boldyreff, C.
Approach Discussion-- Input/Output • Input: Java source code (widely used, OOP, built in design patterns, interfaces) • Output: OPM design model (equal relation to Objects and Processes, hierarchical, giving simple way to express both dynamic and static aspects of the system)
Approach Discussion-- Techniques • Static Analysis • Identifying Objects vs. Processes (every class is object except for…) • Filtering simple getters/setters • Detecting GOF patterns • Improving analysis to the OPM generated code using its’ javadoc.
public class Hello { int main(){ System.out.println(“Hello World!”); return 1; } } Approach Discussion-- Simple Example
Approach Discussion-- Challenges • Weakly typed containers (Sets, Hash tables, e.t.c.) • Scalability problem (number of patterns vs. processing, over-control flow analysis) • Language Independency • Re-Tour engineering
References • Links: • http://www.rigi.csc.uvic.ca/UVicRevTut/F4rev.html • Overview on Reverse Engineering + list of RE Tools • http://www.iste.uni-stuttgart.de/ps/reengineering • Reengineering Bibliography • http://www.gupro.de/GXL/Introduction/intro.html • Graph eXchange Language format • Papers: • Design Pattern Recovery in Architectures for Supporting Product Line Development and Application Philippow, Streitferdt & Riebisch • Pattern-Based Design Recovery of Java Software Seemann & Wolf von Gudenberg