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
2Problem Design Obfuscation
3(No Transcript)
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
7Presentation 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
8SPOOL 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
9Design 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
10Hierarchy Layout (Dot)
Spring Layout (Neato)
Direct Dependencies
11Package Dependencies
12Design Browser and Search
13Growing Bounding Boxes
14Collaboration Extraction
15Template Method Definition
- Define a skeleton of an algorithm, deferring some
steps to subclasses (Gamma et al., 1995)
16ET Template Methods
- Define a skeleton of an algorithm, deferring some
steps to subclasses
17ET Template Method InvalidateViewRect
18ET Template Method Align
19ET Overridden Template Method
20ET Overridden Template Method
21Bridge Definition
- Decouple an abstraction from its implementation
so that the two can vary independently
22ET Bridges
- Decouple Abstraction from Implementation
23ET Bridge Window
24ET Bridge Text
25ET False Bridge (Document gt Data)
26ET Observers
27ET Observer ET_Object
28ET ObjectAdapters
29ET ObjectAdapter ET_Set
30ET Proxies
31ET Iterators
32Concluding 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
33Future 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)
34Design Browser Search
35(No Transcript)
36ET Template Method Align
37Dependency Diagram All Dependencies
38Dependency Diagram Only Generalizations
39- identify the systems components and their
interrelationships - create representations of a system in another
form at a higher level of abstraction
40ET Factory Method DispatchEvents
41ET Factory Methods