1 / 21

Reconstructing an Architecture

Reconstructing an Architecture. Why. Lost documentation No documentation ever Architectural drift Prove conformance. Approaches. Manual Methods Top down For example, start with high-level diagrams Bottom up For example, start with comments in code Opportunistic

alder
Download Presentation

Reconstructing an Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. 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 • For example, if the system uses a lot of late binding or runtime configuration

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

  10. Database Structure • Need a standard format or model • Authors use Rigi Standard Format • RDF triples are very similar, and OWL reasoning might be useful • Efficient queries • Support fusion • Checkpointing for intermediate results

  11. DB tables • Table of relation names • Table of elements • Table for each relation - triples And/Or …

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

  13. View Fusion • Reconcile • Augment • Establish connections

  14. What about these? Static analyzer missed this (no reason given) 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

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

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

  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. 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. 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

More Related