Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture...
Transcript of Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture...
![Page 1: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/1.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
1
Reinder J. Bril [email protected], www.win.tue.nl/~rbril
Module Architecture Control
using Relation Algebra
16-11-2011
![Page 2: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/2.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
2
Questions
• Development artefacts of a system?
• How to maintain consistency:
– between these artefacts (inter)?
– between elements of an artefact (intra)?
• This lecture:
– consistency between architecture and
implementation
• SAN:
– consistency of designs [Lange et al 05]
– generalization [Muskens et al 05].
![Page 3: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/3.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
3
Goals
• Student understands:
– the need for module architecture control;
– how module architecture control can be
performed;
– the basics of relation algebra.
• Student can apply relation algebra on a
simple example.
![Page 4: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/4.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
4
Overview
• Context and motivation
– Software architecture – recap
– Application domain
• Module architecture notions
• Relation algebra
• Verification
• Conclusion
• References
![Page 5: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/5.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
5
Overview
• Context and motivation
– Software architecture – recap
– Application domain
• Module architecture notions
• Relation algebra
• Verification
• Conclusion
• References
![Page 6: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/6.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
6
• End-User:
behavior, performance,
security, reliability
• Customers:
low cost, timely delivery
• Product-Management:
features, short time to
market, low cost, parity
with products
• Development:
low cost, employability
• Maintenance:
modifiability
Software architecture – recap
Stakeholders
![Page 7: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/7.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
7
• End-User:
behavior, performance,
security, reliability
• Customers:
low cost, timely delivery
• Product-Management:
features, short time to
market, low cost, parity
with products
• Development:
low cost, employability
• Maintenance:
modifiability
Software architecture – recap
Stakeholders
Pro
du
ct v
iew
![Page 8: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/8.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
8
• End-User:
behavior, performance,
security, reliability
• Customers:
low cost, timely delivery
• Product-Management:
features, short time to
market, low cost, parity
with products
• Development:
low cost, employability
• Maintenance:
modifiability
Software architecture – recap
Stakeholders
Develo
pm
en
t vie
w
![Page 9: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/9.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
9
• Software architecture:
earliest artifact
means for mutual communication
enables analysis of concerns
manifests concerns as system qualities
• Software architecture is vital !
[Bass et al 1995]
Software architecture – recap
![Page 10: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/10.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
10
Need for (system) architecture
• If a project has not achieved a system architecture, including its
rationale, the project should not proceed to full-scale system
development. Specifying the architecture as a deliverable
enables its use throughout the development and maintenance
process.
[Boehm 1995]
Note: understanding is not stressed in [Boehm 1995] as an
essential element of use of an architecture.
Software architecture – recap
![Page 11: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/11.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
Logical
View
end users
Development
View
Process
View
Deployment
View
programmers
system engineers system integrators
Scenarios
Software architecture – recap
4+1 View Model [Kruchten 95]
11
![Page 12: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/12.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
Logical
View
end users
Module
View
Process
View
Deployment
View
programmers
system engineers system integrators
Scenarios
Software architecture – recap
4+1 View Model Revisited
Code
View
12
![Page 13: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/13.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
Logical
View
end users
Module
View
Process
View
Deployment
View
programmers
system engineers system integrators
Scenarios
Software architecture – recap
4+1 View Model Revisited
Code
View
13
![Page 14: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/14.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
Module
View
programmers
Software architecture – recap
Development View
Code
View
14
![Page 15: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/15.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
15
Software architecture – recap
• A software architecture characterization (“C3”):
– Components (or [architectural] entities);
– Connections;
– Constraints.
• Module view:
– System, Subsystems, Components;
– Part-of relation and uses relation;
– Layering, orthogonality.
• Code view:
– Directories, Files;
– Directory structure, location of files, and include relation;
– File name conventions and file length constraints.
![Page 16: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/16.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
16
Overview
• Context and motivation
– Software architecture – recap
– Application domain
• Module architecture notions
• Relation algebra
• Verification
• Conclusion
• References
![Page 17: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/17.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
17
Application domain
• Telecommunications domain
• SOPHO: Philips’ family of PBXs
– 100 - 1M telephony lines
– origin dating back to early 1980’s
– economic lifetime ~ 15 years
– maintenance obligations ≥ 10 years
– 5 K files, 2.5 MLOC in C++
– successful asset
careful to maintain this legacy
![Page 18: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/18.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
18
Application domain
• Complexity of legacy systems
– hard to understand (e.g. size);
– documentation out-of-date;
– gap between intrinsic and experienced complexity.
• Architecture vital, but not maintained …:
– recovery;
– analysis;
– verification and control;
– (improvements).
• Need for architectural support !
![Page 19: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/19.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
19
Application domain
• Characteristics (development view):
– module view
• 8 K architectural entities;
• organised in an unbalanced tree, depth 5 – 12;
• layered system, consisting of 8 subsystems.
– code view
• 1 directory with 5 K files, and 2.5 MLOC in C++;
• 35 K include statements;
• File names based on “12 NCs”,
file length varies from 100 to 20 K lines.
![Page 20: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/20.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
Application domain
SAS
SD
CPS
SOPHO CPC
POM
GOS
LOS
POMCL
“Intended” module architecture
(documentation + software architects) 20
![Page 21: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/21.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
Application domain
POMCL SAS
SD
CPC
POM CPS
GOS
SOPHO
LOS
“Derived” module architecture
(extracted from the implementation) 21
![Page 22: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/22.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
22
Conformance
Causes when “intended” and “extracted” differ:
1. “intended” is wrong (e.g. out-of-date): improve;
2. “extracted” is wrong: improve;
3. implementation is optimized for, e.g., speed refinement.
Intended Extracted
S
H
A
D
I
S
H
A
D
I
![Page 23: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/23.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
23
Application domain
• Ensure conformance to an architecture !
– Keep the architecture up-to-date
• Approach using relation algebra (RPA):
– Represent the “intended” architecture in RPA.
– Extract the “derived” architecture from the
implementation, and represent in RPA.
– Express “conformance” in RPA.
– Ensure conformance by means of verification
(using RPA) and improvements (i.e. control).
![Page 24: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/24.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
24
Overview
• Context and motivation
• Module architecture notions
• Relation algebra
• Verification
• Conclusion
• References
![Page 25: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/25.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
25
Overview
• Context and motivation
• Module architecture notions – Module diagram
– Decomposition tree
– Lifting
– Hiding
– Lowering
– Weights
• Relation algebra
• Verification
• Conclusion
• References
![Page 26: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/26.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
26
Module architecture notions
• Module diagram
• Decomposition tree
• Lifting
• Hiding
• Lowering
• Weights
![Page 27: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/27.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
27
B
A
S
A3A1
B2B1
A2
Module diagram
• Visualises a system’s architecture
• “Boxes-in-boxes” representation
• Boxes represent entities
• Arrows represent dependencies
System S is not layered
![Page 28: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/28.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
28
B
A
S
A3A1
B2B1
A2A1 A2 A3B1 B2
B A
S
Decomposition tree
System S is balanced, and
the decomposition tree has 3 levels
![Page 29: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/29.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
29
B
A
S
A3A1
B2B1
A2A1 A2 A3B1 B2
B A
S
Lifting (1)
Uses relation corresponds with a
level (tree-cut)
![Page 30: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/30.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
30
B
A
S
A3A1
B2B1
A2A1 A2 A3B1 B2
B A
S
Lifting (1)
Transform a relation to a higher level.
![Page 31: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/31.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
31
B
A
S
A3A1
B2B1
A2A1 A2 A3B1 B2
B A
S
Lifting (1)
Transform a relation to a higher level, i.e.
replace both the source and the destination
of each arrow by its enclosing entity.
![Page 32: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/32.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
32
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lifting (2)
![Page 33: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/33.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
33
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lifting (2)
![Page 34: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/34.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
34
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lifting (2)
![Page 35: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/35.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
35
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lifting (2)
![Page 36: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/36.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
36
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lifting (2)
![Page 37: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/37.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
37
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lifting (2)
![Page 38: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/38.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
38
B
A
S
A3A1
B2B1
A2
B
S
A
Hiding
Hiding the decomposition structure
of both A and B
![Page 39: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/39.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
39
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lowering
both cases a complete graph.
![Page 40: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/40.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
40
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Lowering
Application: architectural verification,
e.g. layering
![Page 41: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/41.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
41
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Weights
Which value to be associated ?
![Page 42: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/42.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
42
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Weights
4: number of uses relations
size-oriented weight
![Page 43: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/43.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
43
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Weights
Fisheye view of the
size-oriented weight
![Page 44: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/44.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
44
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Weights
3: number of used entities (A1, A2 and A3)
fan-in-oriented weight
![Page 45: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/45.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
45
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
Weights
2: number of using entities (B1 and B2)
fan-out-oriented weight
![Page 46: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/46.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
46
B
A
S
A3A1
B2B1
A2
B
S
A3A1
B2B1
A2
A
<1,1,1><2,4,3>
<1,1,1>
<2,2,1>
Weights
Each weight has its merits
during architectural analysis
![Page 47: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/47.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
47
Overview
• Context and motivation
• Module architecture notions
• Relation algebra
– Usage
– Overview
– Examples
– Application
• Verification
• Conclusion
• References
![Page 48: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/48.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
48
Relation Algebra: Usage
• Visualisation and view calculations
– reverse architecting purposes
• Relational calculus
– software architecture analysis
• Architectural rules
– software architecture verification
• Architectural metrics
– software architectural quality assurance
• (formal basis of tools)
![Page 49: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/49.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
49
Relation Algebra: Overview
• Sets
– ø, , , , ...
• Relations: sets of pairs
– ; (composition), -1, +, *, |, (lifting), (lowering)
• Multi-sets: bags
– ,
• Multi-relations: bags of pairs
![Page 50: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/50.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
50
B
A
S
A3A1
B2B1
A2
Set of Entities E:
E = { S, A, A1, A2, A3, B, B1, B2}
Relation Algebra: Example
![Page 51: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/51.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
51
Part-of relation P:
P = { <B, S>, <A, S>,
, <B1, B>, <B2, B>
, <A1, A>, <A2, A>, <A3, A>
} A1 A2 A3B1 B2
B A
S
A part-of relation:
• describes the decomposition tree;
• is both: functional and a-cyclic.
Relation Algebra: Example
![Page 52: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/52.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
52
Part-of relation P:
P = { <B, S>, <A, S>,
, <B1, B>, <B2, B>
, <A1, A>, <A2, A>, <A3, A>
} A1 A2 A3B1 B2
B A
S
Relation Algebra: Example
Carrier of P: car(P) = { B1, B2, B, A1, A2, A3, B, A, S } = E.
Range of P: ran(P) = { B, A, S }.
Domain of P: dom(P) = { B1, B2, B, A1, A2, A3, A }.
![Page 53: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/53.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
53
A1 A2 A3B1 B2
B A
SPart-of relation P:
P = { <B, S>, <A, S>,
, <B1, B>, <B2, B>
, <A1, A>, <A2, A>, <A3, A>
}
Question: How to express the leafs of the
decomposition tree in relation algebra using P?
Relation Algebra: Example
Answer: leafs(E) = car(P) – ran(P) = { B1, B2, A1, A2, A3 }.
![Page 54: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/54.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
54
Part-of relation P:
P = { <B, S>, <A, S>,
, <B1, B>, <B2, B>
, <A1, A>, <A2, A>, <A3, A>
} A1 A2 A3B1 B2
B A
S
Question: How to express the root of the decomposition
tree in relation algebra using P?
Relation Algebra: Example
Answer: root(E) = car(P) – dom(P) = { S }.
![Page 55: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/55.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
55
B
A
S
A3A1
B2B1
A2
Uses relation U:
U = { <A1, A2>, <A3, A2>,
, <B1, A1>, <B1, A2>, <B1, B2>
, <B2, A2>, <B2, A3>
, <A3, B2>
}
Relation Algebra: Example
Question: How to express the entities that use, but are
not used by, entities in relation algebra ?
Answer: use_only = car(U) – ran(U) = { B1 }.
![Page 56: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/56.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
56
B
A
S
A3A1
B2B1
A2
Uses relation U:
U = { <A1, A2>, <A3, A2>,
, <B1, A1>, <B1, A2>, <B1, B2>
, <B2, A2>, <B2, A3>
, <A3, B2>
}
Relation Algebra: Example
Question: How to express the leaf entities that neither
use nor are used by entities in relation algebra ?
Answer: isolated = leafs(E) – car(U) = ø.
![Page 57: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/57.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
57
B
A
S
A3A1
B2B1
A2A1 A2 A3B1 B2
B A
S
Transform a relation to a higher level, i.e.
replace both the source and the destination
of each arrow by its enclosing entity.
Relation Algebra: Example
![Page 58: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/58.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
58
B
A
S
A3A1
B2B1
A2A1 A2 A3B1 B2
B A
S
Example: <B1, A1>
• replace source: B1 by B;
• replace destination: A1 by A.
Relation Algebra: Example
![Page 59: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/59.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
59
B
A
S
A3A1
B2B1
A2
Lifting:
def.: U P P-1 ; U ; P
ex.: <B1, B> P <B, B1> P-1;
<B1, A1> U;
<A1, A> P;
For U P, P must be a part-of relation
Relation Algebra: Example
![Page 60: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/60.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
60
B
A
S
A3A1
B2B1
A2
Lifting:
def.: U P P-1 ; U ; P
ex.: <B1, B> P <B, B1> P-1;
<B1, A1> U;
<A1, A> P;
<B, A1> P-1 ; U
Relation Algebra: Example
![Page 61: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/61.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
61
B
A
S
A3A1
B2B1
A2
Lifting:
def.: U P P-1 ; U ; P
ex.: <B1, B> P <B, B1> P-1;
<B1, A1> U;
<A1, A> P;
<B, A> P-1 ; U ; P
Relation Algebra: Example
![Page 62: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/62.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
62
B
A
S
A3A1
B2B1
A2
B
S
A
Hiding the decomposition structure
of both A and B
Relation Algebra: Example
![Page 63: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/63.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
63
B
A
S
A3A1
B2B1
A2
B
S
A
Relation Algebra: Example
Question: How to express the set of entities E’ after
hiding in relation algebra using P?
Answer: E’ = ran(P) = { S, A, B }.
![Page 64: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/64.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
64
B
A
S
A3A1
B2B1
A2
B
S
A
Relation Algebra: Example
Question: How to express the part-of relation P’ after
hiding in relation algebra ?
Answer: P’ = P |car E’ = { S, A, B }.
![Page 65: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/65.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
65
Lowering:
def.: U P P ; U ; P-1
B
A
S
A3A1
B2B1
A2
For U P, P must be a part-of
relation
Relation Algebra: Example
![Page 66: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/66.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
66
Lowering:
def.: U P P ; U ; P-1
ex.: {<A, B>} P = {<A1, B1>, <A1, B2>
,<A2, B1>, <A2, B2>
,<A3, B1>, <A3, B2>
}
{<A, B>} P U = {<A3, B2>}
B
A
S
A3A1
B2B1
A2
Layering rule:
{<A, B>} P U = ø
Relation Algebra: Example
![Page 67: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/67.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
69
Relation Algebra: Application
• Analytical techniques:
– lifting,
– checking of rules,
– impact analysis,
– finding unused and unavailable components,
– identification of top and bottom layers,
– study of alternative component groupings,
– improvement of presentation by suppressing elements,
– improvement of locality,
– checking of linearity,
– analysis of cycles,
– improvement of presentation by transitive reduction.
[Feijs et al 98]
![Page 68: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/68.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
70
Verification
System S’ consists of 3 levels, and
is layered.
Answer: Layering rule LR for S’:
LR(S’): {<A, B>, <A, C>, <B, C>} P U = ø
Question: How to express layering rule LR for S’ in
relation algebra?
S’
C
B
A
![Page 69: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/69.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
71
Verification
S’
C
B
A
System S’ consists of 3 levels, and
is strictly layered.
Answer: Strictly layering rule SLR for S’:
SLR(S’): {<A, B>, <A, C>, <B, C>, <C, A>} P U = ø
Question: How to express strictly layering rule SLR for
S’ in relation algebra?
![Page 70: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/70.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
72
Verification
S’
C
B
A
Answer: Delete specific uses relation between modules !
{<A, B>, <A, C>, <B, C>, <C, A>} P U – {<Cx, Ay>} = ø
Question: How to express the exception to the strictly layering rule
SLR(S’) for S’ in relation algebra?
Intended
S’
C
B
A
Derived
S’
C
B
A
Cx
Ay
![Page 71: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/71.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
73
Conclusion
Goals revisited
• Student understands:
– the need for module architecture control;
• diversion of intended and derived architecture over time
– how module architecture control can be
performed;
• describe the architecture in terms of rules, check
compliance of the derived architecture, and adapt
– the basics of relation algebra.
• Student can apply relation algebra on a
simple example.
![Page 72: Module Architecture Controljohanl/educ/2II45/MAC-2011.pdf · TU/e Informatica, System Architecture and Networking Logical View end users Development View Process View Deployment View](https://reader035.fdocuments.in/reader035/viewer/2022071508/61293f68c636c8629f798588/html5/thumbnails/72.jpg)
Reinder J. Bril, [email protected]
TU/e Informatica, System Architecture and Networking
74
References
• [Bass et al 98] L. Bass, P. Clemens, and R. Kazman, Software Architecture in Practice, Addison-Wesley, 1998.
• [Boehm 1995] B. Boehm, Engineering context (for software architecture), invited talk, 1st Int. Workshop on Architecture for Software Systems, Seattle, Washington, April 1995.
• [Bril et al 2000] R.J. Bril, L.M.G. Feijs, A. Glas, R.L. Krikhaar, an M.R.M. Winter, Maintaining a legacy: towards support at the architectural level, Journal of Software Maintenance, 12(3): 143 – 170, May/June 2000.
• [Feijs et al 98] L. Feijs, R. Krikhaar, and R. van Ommering, A relational approach to support software architecture analysis, Software – Practice and Experience, 28(4): 371 – 400, April 1998.
• [Kruchten 95] P. Kruchten, The 4 + 1 View Model of Architecture, IEEE Software, 12(6): 42 – 50, November 1995.
• [Lange et al 05] C. Lange and M. Chaudron, Experimentally investigating effects of defects in UML models, TU/e, CS-Report 05-07, 2005.
• [Muskens et al 05] J. Muskens, R.J. Bril, and M.R.V. Chaudron, Generalizing consistency checking between software views, 5th Working IEEE/IFIP Conference on Software Architecture (WICSA’05), IEEE Computer Society Press, pp. 169 – 180, November 2005.