Download presentation
Presentation is loading. Please wait.
Published byAngelica Atkins Modified over 9 years ago
1
Reconstructing an Architecture
2
Why Lost documentation No documentation ever Architectural drift Prove conformance
3
Approaches Manual Methods Top down For example, start with high-level diagrams Bottom up For example, start with comments in code Opportunistic Use whatever is available Tools
4
Tool-Based Reconstruction View Extraction DB Presentation Pattern Recogn. Visualization View Fusion Reconstruction Doc System
5
Data Source Types Static Dynamic
6
Tools Parsers Abstract Syntax Tree Analyzers Lexical Analyzer Profilers Code instrumentation tools Ad hoc Workbench
7
Extracted Data
8
Guidelines Use least-effort Validate the information extracted Extract dynamic information when needed For example, if the system uses a lot of late binding or runtime configuration
9
Tool-Based Reconstruction View Extraction DB Presentation Pattern Recogn. Visualization View Fusion Reconstruction Doc System
10
Database Structure Need a standard format or model Authors use Rigi Standard FormatRigi Standard Format RDF triples are very similar, and OWL reasoning might be useful RDFOWL Efficient queries Support fusion Checkpointing for intermediate results
11
DB tables Table of relation names Table of elements Table for each relation - triples RelationTable RelationTypeThing1Thing2 IncludesTable File1File2 ContainsTable FileFunction And/Or …
12
Tool-Based Reconstruction View Extraction DB Presentation Pattern Recogn. Visualization View Fusion Reconstruction Doc System
13
View Fusion Reconcile Augment Establish connections
14
Example: fusing static and dynamic views of the “calls” relation Static: calls extracted from source List::length PrimitiveOp::Compute Dynamic: calls detected by profiler List::length List::getnth ArithmeticOp::Compute StringOp::Compute Static analyzer missed this (no reason given) What about these?
15
Fusing static+dynamic, continued PrimitiveOp +Compute ArithmeticOp +Compute StringOp +Compute Static analyzer saw this Profiler saw these List::length List::getnth PrimitiveOp::Compute Fused list of calls: See examples 10-4, 10-5 p 240
16
Example: fusing calls from different processes main() { register(); } Server main() { launch(); } GUI Launcher Calls mainregister mainlaunch Calls Server.mainregister Launcher.mainlaunch UnfusedFused
17
Guidelines for Fusions Fuse when no single view shows needed information Fuse when a view is too ambiguous and ambiguity can be resolved by fusion Use multiple extraction techniques Different kinds of tools Different implementations of tools
18
Tool-Based Reconstruction View Extraction DB Presentation Pattern Recogn. Visualization View Fusion Reconstruction Doc System
19
Reconstructions SQL examples for Reconstructions See 10.9 – aggregate local variables Build SQL queries for reconstruction
20
Yet more guidelines Work with the architect if possible Code segments should be as re-usable as possible A “code segment” is a capability based on DB query + other code, that can identify patterns or create views Code segments can take advantage of Naming conventions Directory structure
21
Example in text Repeated view fusions and aggregations eventually produce a just- barely-usable view pp 248 – 257
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.