Architectural reconstruction (1): Source Code Analysis Flashcards
Why is architectural documentation obsolete?
Hard to maintain.
Link (traceability ) between architecture and code is often not obvious.
No perceived value for the customer.
Because developers make decisions and changes:
- that are not aligned with the original vision => architectural drift
- that go against prescriptive architecture => architectural erosion
How can we keep architectural documentation up to date?
1 / Enforcing architectural constraints
2 / Generating architectural diagrams from code
3 / Reconstructing the Architecture
- and ideally follow up with one of the previous two
What is architecture reconstruction (AR)?
a.k.a: architecture recovery (the two are used interchangeably)
A reverse engineering approach that aims at reconstructing viable
architectural views of a software application.
Reverse engineering definition:
(def.) the process of analyzing a subject system to identify the system’s
components and their interrelationships and create representations of the
system in another form or at a higher level of abstraction.
Reenginering definition:
“Reengineering is the examination and alteration of a subject system to
reconstitute it in a new form”
How do you do architecture reconstruction?
Symphony: View-Driven Software Architecture Reconstruction.
Paper by Van Deursen et al.
View-driven approach.
Distinguishes between three kinds of views:
1. Source
- view extracted directly from artifacts of a system
- not necessarily architectural (e.g. see later example)
2. Target
- describes architecture-as-implemented
- any of the 3+1 views
3. Hypothetical
- architecture-as-designed
- existing documentation
- presentations
What stages are there in Symphony?
- Problem Eliciation (Design)
- Concept Determination (Design)
- Data gathering (Execution)
- Knowledge inference (Execution)
- Information Interpretation (Execution)
What is problem elicitation in Symphony?
“Business case” for reconstruction.
What is the problem?
———————————-
requires the involvement of more
technical people in the problem analysis.
What is Concept Determination about in Symphony?
What architectural information is needed to solve the problem?
Which viewpoints are relevant?
———————————-
Identify Potentially Useful Viewpoints:
- identify a set of viewpoints that contain the information the stakeholders believe will be needed to solve the problem as described in Problem Elicitation
————————————–
Define/Refine Target Viewpoint.
-The stakeholders should also agree to the target viewpoint
—————————————
Define/Refine Source Viewpoint
-The source view will contain information extracted from the source code and gathered from other sources; the source viewpoint formally describes this information. The challenge in defining a source viewpoint is to determine what information will be needed in order to create the target views
—————————————-
Define/Refine Mapping Rules
- The mapping rules are ideally a formal description of how to derive a target view from a source view
————————————
Determine Role and Viewpoint of Hypothetical Views.
- the stakeholders and architect must determine whether a hypothetical view is needed and what its role will be
What is Data Gathering in Symphony?
Collecting and extracting low-level source views.
Can involve a multitude of sources.
What is Knowledge inference in Symphony?
Going from source to target views.
Abstracting low-level information.
What is architectural erosion?
refers to the gradual degradation or deterioration of a software system’s architecture over time. It occurs when the actual implementation of the software deviates from its intended architectural design
What is a view?
A view is a representation of a whole system from the perspective of a related set of concerns
-a view conforms to a viewpoint
What is a viewpoint?
Different viewpoints help the architect determine what information should be reconstructed
in order to solve the problem.
What happens during the reconstruction design in symphony?
results in a well-defined procedure for reconstructing
the architecture of the system
What happens during the reconstruction execution in symphony?
The Reconstruction Execution analyzes the system, extracts the source views, and
applies the mapping rules to populate the target views.
————————————
yields the architecture description needed to solve the problem that triggered the original reconstruction activity.