Sheet 1 / 21© 2006 [email protected] 2006 in Bonn - 21 March 2006 Identification of...
-
Upload
corey-palmer -
Category
Documents
-
view
213 -
download
0
Transcript of Sheet 1 / 21© 2006 [email protected] 2006 in Bonn - 21 March 2006 Identification of...
![Page 1: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/1.jpg)
Sheet 1 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Identification of Crosscutting in
Software Design
Klaas van den Berg – University of Twente
José María Conejero – University of Extremadura
Juan Hernández – University of Extremadura
![Page 2: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/2.jpg)
Sheet 2 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
CC != S & T
Problem statement
CC = …
![Page 3: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/3.jpg)
Sheet 3 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Context & Motivation
Steps Define crosscutting Identify crosscutting Quantify crosscutting Resolve crosscutting
Software Artifacts andSoftware Process Crosscutting Model
Adaptive MaintenanceModel
Measurement Value Measurement Value
External Factors
Quality Improvement Model
AOSDmany solutions!
what is the problem?
![Page 4: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/4.jpg)
Sheet 4 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Concept Diagram
-the tangling and/or scattering of concerns
Crosscutting <<broad sense>>
-the spreading of a concern to multiple modules
Scattering <<broad sense>>
-the intermixing of multiple concerns in a module
Tangling <<broad sense>>
-a source element is scattered over target elements and where in at least one of these target elements, multiple source elements are tangled
Crosscutting <<narrow sense>>
-a source element is related to multiple target elements
Scattering <<narrow sense>>
-a target element is related to multiple source elements
Tangling <<narrow sense>>
operationalization
![Page 5: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/5.jpg)
Sheet 5 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Definitions Crosscutting
the tangling and/or scattering of concerns Scattering
the spreading of a concern to multiple modules Tangling
the intermixing of multiple concerns in a module Aspect
a concern that crosscuts an artifact’s decomposition CC != S & T
Needed: operationalization CC = …
![Page 6: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/6.jpg)
Sheet 6 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Outline
Crosscutting pattern definitions of scattering, tangling and crosscutting change impact analysis
Representation dependency graph dependency matrix & crosscutting matrix
Application change impact analysis / examples / case studies cascaded crosscutting pattern extended crosscutting pattern
Open issues
![Page 7: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/7.jpg)
Sheet 7 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Crosscutting Pattern
Source
Target
isScattered
Source Element
isTangled
Target Element
0..*
0..*
isMapped0..*
1 0..*
1isRelated
1 0..*
1 0..*
1
0..*
isCrosscutting
source and target
![Page 8: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/8.jpg)
Sheet 8 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
![Page 9: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/9.jpg)
Sheet 9 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Examples
Source element Target element
Concern Module
Concern Requirement
Requirement Use Case
Requirement Architectural element
Detailed design element Implementation element
Architectural element Architectural element
source and target are abstractions from
specific phases, levels, layers, domains,..
![Page 10: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/10.jpg)
Sheet 10 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Crosscutting Pattern
Source
Target
isScattered
Source Element
isTangled
Target Element
0..*
0..*
isMapped0..*
1 0..*
1isRelated
1 0..*
1 0..*
1
0..*
isCrosscutting
Pattern: recurring problem and reusable solution Concepts source and target are taken from MDA
However, no automated transformations are assumed!
![Page 11: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/11.jpg)
Sheet 11 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Crosscutting
s1 s3 s4s5
t1 t2 t3 t4t5
s2
Elements involved both in scattering and tanglings3 crosscuts s4
source
target
scatteringtangling
![Page 12: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/12.jpg)
Sheet 12 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Crosscutting Crosscutting
a source element is scattered over target elements and where in at least one of these target elements, multiple source elements are tangled
s1 crosscuts s2 source element s1 crosscuts source element s2 for a
given mapping between source and target, if s1 is scattered over target elements and in at least one of these target elements, s1 is tangled with source element s2
s1 crosscuts s2 with respect to a mapping to and decomposition of the target
![Page 13: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/13.jpg)
Sheet 13 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Change Impact Examples
s1 s3 s4s5
t1 t2 t3 t4t5
s2
Scattering: change s5 => impacted {t4, t5} Tangling: change s1 => impacted {t1, s2} Crosscutting: change s3 => impacted {t2, t3,
s4}
to be preserved
Propagation
of change impact
across multiple
levels
Dependency graph
![Page 14: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/14.jpg)
Sheet 14 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Change impact
change element v in the mapping (x,v)
impact(x,v) =
change(x,v) +
(preserve(u,v) | u ← preds(v); x ≠ v) +
(impact(v,w) | w ← succs(v))
preds predecessors of an element • adjacent elements in backward trace
succs successors of an element • adjacent elements in forward trace
![Page 15: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/15.jpg)
Sheet 15 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Representation
Dependency graph node: elements in source and target edge: dependency relation between source & target
elements Dependency matrix
source x target cell: dependency relation between source & target
elements Crosscutting matrix
source x source cell: crosscutting relation between source elements
![Page 16: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/16.jpg)
Sheet 16 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Crosscutting
s1 s2s3
t1 t2 t3 t4
Example
s1 crosscuts s3
source = {s1, s2, s3}
target = {t1, t2, t3, t4}
dependency graph
![Page 17: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/17.jpg)
Sheet 17 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Matrices
s[1] crosscuts s[3]
dependency matrix
target
t[1] t[2] t[3] t[4]
sources[1] 1 0 1 1 S
s[2] 0 1 0 0 NS
s[3] 0 0 1 0 NS
NT NT T NT
crosscutting matrix
source
s[1] s[2] s[3]
sources[1] 0 0 1
s[2] 0 0 0
s[3] 0 0 0
![Page 18: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/18.jpg)
Sheet 18 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Mathematics
Dependency matrix :: source x target Scattering matrix :: source x target Tangling matrix :: target x source Crosscutting product matrix :: source x source
crosscutting product matrix =
scattering matrix x tangling matrix matrix multiplication
Crosscutting matrix :: source x source ‘normalized’ crosscutting product matrix
![Page 19: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/19.jpg)
Sheet 19 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Case Studies
DVD System Gradecki & Lesiecki Logging
Dialog system in GUI Mediator Pattern
Drawing editor Adapter Pattern
![Page 20: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/20.jpg)
Sheet 20 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Across Life Cycle
Consecutive levels or phases Traceability links between phases
(e.g. concerns, requirements, architecture, design,..)
Approach• Cascading of crosscutting pattern
• Transitivity of dependency relations
• Matrix multiplication of dependency matrices
![Page 21: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/21.jpg)
Sheet 21 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Extended Crosscutting Pattern
Source
Target
isScattered
Source Element
isTangled
Target Element
0..*
1
isCoupled
0..*
0..*
isMapped0..*
1 0..*
1isRelated
1
0..*
isCoupled1 0..*
1 0..*
1
0..*
isCrosscutting
Transitivity of inter-level and intra-level dependencies
![Page 22: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/22.jpg)
Sheet 22 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Evaluation
Identification of Crosscutting Crosscutting pattern
• Based on inter-level dependencies
• Definitions of tangling, scattering and crosscutting
Formalization• Matrix representation and matrix operations
• Operationalization of tangling, scattering and crosscutting
Across consecutive phases• Cascading of crosscutting pattern
Extended crosscutting pattern• Based on inter-level and intra-level dependencies
![Page 23: Sheet 1 / 21© 2006 vdberg@cs.utwente.nlAOM 2006 in Bonn - 21 March 2006 Identification of Crosscutting in Software Design Klaas van den Berg – University.](https://reader036.fdocuments.us/reader036/viewer/2022081519/56649e845503460f94b85d9f/html5/thumbnails/23.jpg)
Sheet 23 / 21© 2006 [email protected] AOM 2006 in Bonn - 21 March 2006
Open Issues
Elements in source and target• granularity of decomposition
• composites (vs atomic elements)
Dependency relations• inter-level dependency types
• intra-level dependency types
• directionality and transitivity of relations
Change impact in case of crosscutting• number of changes (delete, add, modify)
• severity of changes (effort)
Validation & scalability in case studies Tool support