Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reconstructing an Architecture

Similar presentations


Presentation on theme: "Reconstructing an Architecture"— Presentation transcript:

1 Reconstructing an Architecture

2 Why Lost documentation No documentation ever Architectural drift
Prove conformance

3 Approaches Manual Methods Top down Bottom up Opportunistic Tools

4 Tool-Based Reconstruction
System Tool-Based Reconstruction Reconstruction Pattern Recogn. View Extraction Visualization DB Doc Presentation View Fusion

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 <includes file file>
<contains file function> <defines_var file variable> <contains directory directory> <contains directory file> <calls function function> <access_read function variable> <access_write function variable>

8 Guidelines Use least-effort Validate the information extracted
Extract dynamic information when needed

9 Tool-Based Reconstruction
System Tool-Based Reconstruction Reconstruction Pattern Recogn. View Extraction Visualization DB Doc Presentation View Fusion

10 Database Structure Need a standard format or model Efficient queries
Authors use Rigi Standard Format Efficient queries Support fusion Checkpointing for intermediate results

11 DB tables Table of relation names Table of elements
Table for each relation - triples RelationTable RelationType Thing1 Thing2 And/Or IncludesTable File1 File2 ContainsTable File Function

12 Tool-Based Reconstruction
System Tool-Based Reconstruction Reconstruction Pattern Recogn. View Extraction Visualization DB Doc Presentation View Fusion

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::getnth ArithmeticOp::Compute StringOp::Compute What about these? Static analyzer missed this (no reason given)

15 Fusing static+dynamic, continued
PrimitiveOp +Compute Static analyzer saw this Profiler saw these ArithmeticOp +Compute StringOp +Compute Fused list of calls: See examples 10-4, 10-5 p 240 List::length List::getnth PrimitiveOp::Compute

16 Example: fusing calls from different processes
main() { register(); } Server main() { launch(); } GUI Launcher Unfused Fused Calls Calls main register launch Server.main register Launcher.main launch

17 Guidelines for Fusions
When no single view shows needed information 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
System Tool-Based Reconstruction Reconstruction Pattern Recogn. View Extraction Visualization DB Doc Presentation View Fusion

19 Reconstructions SQL examples for Reconstructions
See 10.9 – aggregate local variables Build SQL queries for reconstruction

20 Guidelines Work with the architect if possible
Code segments should be effective at producing new and useful view Naming conventions Directory structure

21 Example in text Repeated view fusions and aggregations eventually produce a just-barely-usable view pp 248 – 257


Download ppt "Reconstructing an Architecture"

Similar presentations


Ads by Google