Title: PatternBased ReverseEngineering of Design Components Universit de Montral Bell Canada Rudolf K' Kell
1Pattern-Based Reverse-Engineering of Design
Components- Université de Montréal- Bell
CanadaRudolf K. KellerReinhard
SchauerSébastien RobitaillePatrick Pagé
SPooL Spreading Desirable Properties into
the Design of Object-Oriented, Large-Scale
Software Systems
2Presentation Outline
Pattern-Based Reverse-Engineering of Design
Components (Session Reverse-Engineering)
(1) Motivation
(2) SPOOL Environment
- (3) Pattern-Based Reverse-Engineering
- Template Method
- Bridge
- Observer, ObjectAdapter, Iterator, Factory Method
(4) Concluding Remarks
3Problem Design Obfuscation
4Solution Design Components
Chain Of Resp. (Event Handler)
Command Processor
Observer
UML Interface
Chain Of Resp. (Property Handler)
ViewHandler
Abstract Factory (View Factory)
Decorator (Glyph Decorator)
Strategy (Layout Strategy)
Composite (View Structure)
Abstract Factory (Diagram Factory)
Iterator (View Iterator)
5ET Source Code View - Class Hierarchy
6ET Source Code View - Operation Calls
7SPOOL Tool Architecture
Design Representation
Source Code Capturing
Java 1.2
UML Editor
Source Code
jKit/GO
Gen (Datrix)
HTML Browser
ICEBrowser
Source Code Parser
C
Java
Smalltalk
Layout Generator
Dot, Neato
Intermediate Format
Tools
Intermediate Format Importer
Abstract Design Components, Implemented Design
Components
Source Code Models
Source Code Models
Poet 5.1 (UML metamodel 1.1)
Design Repository
Implemented Design Components
Abstract Design Component
Source Code Models
Refined and Assemblied Design Components
Implemented Design Components
Abstract Design Components
Source Code Models
Design Recovery (automatic, manual)
Design Composition (specialization,
adaptation, assembly, revision)
ICSE 98
ICSE 99
8Design Repository Information Content
- Information content
- Files (names, directory)
- Classifiers (classes, structures, unions,
primitive types) - Generalization hierarchy
- Attributes (name, type, owner, visibiltiy)
- Operations and methods (name, type, owner,
polymorphic, kind) - Parameters (name, type)
- Return type (name, type)
- Call actions (operation, receiver)
- Create actions (classifier)
- Variable use
- Friendship relationships
- Class and function template instantiations
9Hierarchy Layout (Dot)
Spring Layout (Neato)
Direct Dependencies
10Package Dependencies
11Dependency Diagram Only Generalizations
12Growing Bounding Boxes
13Collaboration Extraction
14Template Method Definition
- Define a skeleton of an algorithm, deferring some
steps to subclasses (Gamma et al., 1995)
15ET Template Methods
- Define a skeleton of an algorithm, deferring some
steps to subclasses
16ET Template Method InvalidateViewRect
17ET Template Method Align
18Bridge Definition
- Decouple an abstraction from its implementation
so that the two can vary independently
19ET Bridges
- Decouple Abstraction from Implementation
20ET Bridge Window
21ET Bridge Text
22ET False Bridge (Document gt Data)
23Concluding Remarks
- Problem
- design blurs during implementation
- Cause
- during implementation the design solution to a
problem is broken into pieces (classes, methods,
attributes, etc.) which are spread over possibly
the whole system - no traceability mechanisms between low-level and
high-level design - Approach
- human-controlled recovery of well-defined pattern
descriptions
24Future Work
- Future Plans for Design Recovery
- Extension of the repository towards a C
repository (problem gigantic amount of data) - Generic design component recovery
- specification of design queries as a UML diagram
- Detailled analysis of pattern implementations for
each pattern in Gamma et al. - Template Methods (ICSM 99)
- Architectural patterns (Layers)
- Reverse-engineering is not an end in itself
- Evolution of recovered design components
(ICSE 98)