next up previous
Next: Coupling Factor ( ) Up: Coupling Previous: Change Dependency Of Classes


Efferent Coupling ($ Ce$ )

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
Efferent Coupling between packages (Ce) measures the total number of external classes coupled to classes of a package due to outgoing coupling (coupling to classes external classes of the package, uses Ce definition of coupling). Each class counts only once. Zero if the package does not contain any classes or if external classes are not used by the package's classes. Ce is primarily applicable to object-oriented systems.
Scope
Package
View
$ {V}^{Ce} = ({G}^{Ce}, {R}^{Ce})$
  • Grammar $ {G}^{Ce} = (\{\textrm{package}^{Ce}, \textrm{class}^{Ce}\}, \emptyset, \textrm{package}^{Ce})$
  • Relations $ {R}^{Ce} = \{\textrm{coupling}^{Ce} : \textrm{class}^{Ce} \times \textrm{class}^{Ce}\}$
  • Mapping $ \alpha^{Ce}$:
    $\displaystyle \alpha^{{Ce}}(\textrm{Class})$ $\displaystyle \mapsto$ $\displaystyle \textrm{class}^{{Ce}}$  
    $\displaystyle \alpha^{{Ce}}(\textrm{Package})$ $\displaystyle \mapsto$ $\displaystyle \textrm{package}^{{Ce}}$  
    $\displaystyle \alpha^{{Ce}}(\textrm{Invokes})$ $\displaystyle \mapsto$ $\displaystyle \textrm{coupling}^{{Ce}}$  
    $\displaystyle \alpha^{{Ce}}(\textrm{Accesses})$ $\displaystyle \mapsto$ $\displaystyle \textrm{coupling}^{{Ce}}$  
    $\displaystyle \alpha^{{Ce}}(\textrm{IsOfType})$ $\displaystyle \mapsto$ $\displaystyle \textrm{coupling}^{{Ce}}$  

Definition
The $ Ce$value of a package $ p \in \textrm{package}^{Ce}$is defined:
$\displaystyle CIP(p)$ $\displaystyle =$ $\displaystyle succ^*(p,\textrm{contains}^{Ce})$  
    $\displaystyle \textit{-\hspace{1pt}- set of classes inside/contained in p}$  
$\displaystyle COP(p)$ $\displaystyle =$ $\displaystyle \lbrace c \in \textrm{class}^{Ce} \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}^{Ce} \vert c \in succ(CIP(p),\textrm{coupling}^{Ce}) \wedge$  
    $\displaystyle c \in COP(p) \rbrace$  
    $\displaystyle \textit{-\hspace{1pt}- set of classes coupled to p over afferent coupling}$  
$\displaystyle Ce(p)$ $\displaystyle =$ $\displaystyle \lvert Coupled(p) \rvert$  

Scale
Absolute.
Domain
Integers in $ 0..\infty$.
Highly Related Software Quality Properties
:
Re-Usability 2.4
is negatively influenced by coupling.
Understandability for Reuse 2.4.1:
A part of a system that has a high (outgoing) efferent coupling may be highly inversely related to understandability, since it uses other parts of the system which need to be understood as well.

Understandability decreases with increasing Ce.

Attractiveness 2.4.4:
Parts that have a high (outgoing) efferent coupling may be highly inversely related to attractiveness, since they are using other parts of the system which need to be understood as well, and represent dependencies.

Attractiveness decreases with increasing Ce.

Maintainability 2.6
decreases with increasing Ce.
Analyzability 2.6.1:
Parts that have a high (outgoing) efferent coupling may be highly inversely related to analyzability, since they are using other parts of the system which need to be analyzed as well.

Analyzability decreases with increasing Ce.

Changeability 2.6.2:
Parts that have a high (outgoing) efferent coupling may be inversely related to changeability, since they are using other parts of the system which might need to be changed as well.

Changeability decreases with increasing Ce.

Stability 2.6.3:
Parts showing a high (outgoing) efferent coupling may be inversely related to stability, since they are using other parts of the system, which are can affect them.

Stability decreases with increasing Ce.

Testability 2.6.4:
Parts that have a high (outgoing) efferent coupling may be highly inversely related to testability, since they are using other parts of the system which increase the number of possible test paths.

Testability decreases with increasing Ce.

Portability 2.7
decreases with increasing Ce.
Adaptability 2.7.1:
Parts that have a high (outgoing) efferent coupling may be inversely related to adaptability, since they are using other parts of the system which might need to be adapted as well.

Adaptability decreases with increasing Ce.

Related Software Quality Properties
:
Functionality 2.1
is both negatively and positively influenced by coupling.
Interoperability 2.1.3:
Parts that have a high (outgoing) efferent coupling may be directly related to interoperability, since they are using/interacting with other parts of the system.

Interoperability might increase with increasing Ce.

Security 2.1.4:
Parts that have a high (outgoing) efferent coupling may be inversely related to security, since they can be affected by security problems in other parts of the system.

Security might decrease with increasing Ce.

Reliability 2.2
might decrease with increasing Ce.
Fault-tolerance 2.2.2:
Parts that have a high (outgoing) efferent coupling may be inversely related to fault-tolerance, since they can be affected by faults in other parts of the system.

Fault-Tolerance might decrease with increasing Ce.

Recoverability 2.2.3:
Parts that have a high (outgoing) efferent coupling may be inversely related to recoverability, since their data is distributed in other parts of the system making their recovery difficult.

Recoverability might decrease with increasing Ce.

Re-Usability 2.4
might decrease with increasing Ce.
Learnability for Reuse 2.4.2:
Parts that have a high (outgoing) efferent coupling may be inversely related to learnability, since they are using other parts of the system which need to be understood as well.

Learnability might decrease with increasing Ce.

Operability for Reuse - Programmability 2.4.3:
Parts that have a high (outgoing) efferent coupling may be inversely related to learnability, since they are using other parts of the system, which represent dependencies.

Programmability might decrease with increasing Ce.

Efficiency 2.5
might decrease with increasing Ce.
Time Behavior 2.5.1:
Parts that have a high (outgoing) efferent coupling may be inversely related to time behavior, since they are using other parts of the system, thus execution during test or operation does not stay local, but might involve huge parts of the system.

Time behavior might get worse with increasing Ce.

Resource Utilization 2.5.2:
Parts that have a high (outgoing) efferent coupling may be inversely related to resource utilization, since they are using other parts of the system, thus execution during test or operation does not stay local, but might involve huge parts of the system.

Resource utilization might get worse with increasing Ce.

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

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