next up previous
Next: Coupling Between Objects ( Up: Coupling Previous: Coupling


Afferent Coupling ($ Ca$ )

Works with all instances of a common meta-model, regardless if they where produced with the Java or the UML front-end. The respective call, create, field access, and type reference relations (Java) or association, message and type reference relations (UML) express the coupling (exclusive inheritance) between two classes. They are mapped to relations of type Invokes, Accesses, and ``Is Of Type", respectively, in the common meta model and further to type coupling in the view. By defining a view containing only classes and packages as elements, the metric definition can ignore methods and fields as part of its description, since the relations originating from them are lifted to the class element.
Description
Afferent Coupling between packages (Ca) measures the total number of external classes coupled to classes of a package due to incoming coupling (coupling from classes external classes of the package, uses CBO definition of coupling). Each class counts only once. Zero if the package does not contain any classes or if external classes do not use the package's classes. Ca is primarily applicable to object-oriented systems.
Scope
Package
View
$ {V}^{Ca} = ({G}^{Ca}, {R}^{Ca})$
  • Grammar $ {G}^{Ca} = (\{\textrm{package}^{Ca}, \textrm{class}^{Ca}\}, \emptyset, \textrm{package}^{Ca})$
  • Relations $ {R}^{Ca} = \{\textrm{coupling}^{Ca} : \textrm{class}^{Ca} \times \textrm{class}^{Ca}\}$
  • Mapping $ \alpha^{Ca}$:
    $\displaystyle \alpha^{{Ca}}(\textrm{Class})$ $\displaystyle \mapsto$ $\displaystyle \textrm{class}^{{Ca}}$  
    $\displaystyle \alpha^{{Ca}}(\textrm{Package})$ $\displaystyle \mapsto$ $\displaystyle \textrm{package}^{{Ca}}$  
    $\displaystyle \alpha^{{Ca}}(\textrm{Invokes})$ $\displaystyle \mapsto$ $\displaystyle \textrm{coupling}^{{Ca}}$  
    $\displaystyle \alpha^{{Ca}}(\textrm{Accesses})$ $\displaystyle \mapsto$ $\displaystyle \textrm{coupling}^{{Ca}}$  
    $\displaystyle \alpha^{{Ca}}(\textrm{IsOfType})$ $\displaystyle \mapsto$ $\displaystyle \textrm{coupling}^{{Ca}}$  

Definition
The $ Ca$value of a package $ p \in \textrm{package}^{Ca}$is defined:
$\displaystyle CIP(p)$ $\displaystyle =$ $\displaystyle succ^*(p,\textrm{contains}^{Ca})$  
    $\displaystyle \textit{-\hspace{1pt}- set of classes inside/contained in p}$  
$\displaystyle COP(p)$ $\displaystyle =$ $\displaystyle \lbrace c \in \textrm{class}^{Ca} \vert c \notin CIP(p) \rbrace$  
    $\displaystyle \textit{-\hspace{1pt}- set of classes outside p}$  
$\displaystyle Coupled(p)$ $\displaystyle =$ $\displaystyle \lbrace c \in \textrm{class}^{Ca} \vert c \in pred(CIP(p),\textrm{coupling}^{Ca}) \wedge$  
    $\displaystyle c \in COP(p) \rbrace$  
    $\displaystyle \textit{-\hspace{1pt}- set of classes coupled to p over afferent coupling}$  
$\displaystyle Ca(p)$ $\displaystyle =$ $\displaystyle \left\vert Coupled(p)\right\vert$  

Scale
Absolute.
Domain
Integers in $ 0..\infty$.
Highly Related Software Quality Properties
 
Portability 2.7
is negatively influenced by attributes assessed with Ca.
Replaceability 2.7.4
Parts of a system showing a high afferent (ingoing) coupling from other system parts may be highly inversely related to replaceability, since other parts depend on it. Replaceability decreases with increasing Ca.
Related Software Quality Properties
 
Functionality 2.1
is positively and negatively influenced by attributes assessed with Ca.
Interoperability 2.1.3
Parts of a system showing a high afferent (ingoing) coupling to other system parts may be directly related to interoperability, since they are used/interacted with from other parts of the system.

Interoperability decreases with increasing Ca.

Security 2.1.4
Parts of a system showing a high afferent (ingoing) coupling from other system parts may be inversely related to security, since they can be influenced in many ways from other parts of the system.

Security decreases with increasing Ca.

Reliability 2.2
is negatively influenced by attributes assessed with Ca.
Fault-tolerance 2.2.2
Parts of a system showing a high afferent (ingoing) coupling from other system parts may be inversely related to fault-tolerance, since a local fault might be propagated to other parts of the system.

Fault-tolerance decreases with increasing Ca.

Re-Usability 2.4.1
is positively influenced by attributes assessed with Ca.
Learnability 2.3.2
Parts of a system showing a high afferent (ingoing) coupling from other system parts may be directly related to learnability, since other parts of the system using them serve as examples.

Learnability increases with increasing Ca.

Operability for Reuse - Programmability 2.4.3
The part of a system that has a high afferent (ingoing) coupling from other system parts may be directly related to programmability, since other parts of the system using it serve as examples.

Operability for Reuse - Programmability increases with increasing Ca.

Attractiveness 2.4.4
Parts of a system showing a high afferent (ingoing) coupling from other system parts may be directly related to attractiveness, since other parts of the system use them might show a good re-usability.

Attractiveness increases with increasing Ca.

Maintainability 2.6
is negatively influenced by attributes assessed with Ca.
Stability 2.6.3
Parts of a system showing a high afferent (ingoing) coupling from other system parts may be inversely related to stability, since other parts are affected by them.

Stability decreases with increasing Ca.

References
 
  • Ca is discussed in [16],
  • it is implemented in the VizzAnalyzer Metrics Suite.
Since
Compendium 1.0

next up previous
Next: Coupling Between Objects ( Up: Coupling Previous: Coupling
Copyright © 2008-2009, ARiSA AB. Phone: +46-(0)470 70 8495 Email: info@arisa.se Valid CSS! Valid XHTML 1.0 Transitional