next up previous
Next: Number Of local Methods Up: Interface Complexity Previous: Interface Complexity


Number of Attributes and Methods ($ SIZE2$ )

Works with all instances of a common meta-model, regardless of whether they were produced with the Java or the UML front-end. The respective extends (Java) or generalization (UML) relations expressing the inheritance between two classes are mapped onto relations of type inheritance in the common meta-model (and the $ SIZE2$specific view).
Handle
$ SIZE2$
Description
Number of Attributes and Methods simply counts the number of attributes and methods of a class. It is an object-oriented metric that can be applied to modular languages by considering the number of variables (globally visible in a module) and its number of functions and procedures.
Scope
Class
View
$ {V}^{SIZE2} = ({G}^{SIZE2}, {R}^{SIZE2})$
  • Grammar $ {G}^{SIZE2} = (\{\textrm{class}^{SIZE2}, \textrm{method}^{SIZE2},\\ \textrm{attribute}^{SIZE2}\}, \emptyset, \textrm{class}^{SIZE2})$
  • Relations $ {R}^{SIZE2} : \{\textrm{attributeof}^{SIZE2} : \textrm{attribute}^{SIZE2} \tim... ...trm{methodof}^{SIZE2} : \textrm{method}^{SIZE2} \times \textrm{class}^{SIZE2}\}$
  • Mapping $ \alpha^{SIZE2}$:
    $\displaystyle \alpha^{SIZE2}(\textrm{Class})$ $\displaystyle \mapsto$ $\displaystyle \textrm{class}^{SIZE2}$  
    $\displaystyle \alpha^{SIZE2}(\textrm{IsMethodOf})$ $\displaystyle \mapsto$ $\displaystyle \textrm{methodof}^{SIZE2}$  
    $\displaystyle \alpha^{SIZE2}(\textrm{IsFieldOf})$ $\displaystyle \mapsto$ $\displaystyle \textrm{fieldof}^{SIZE2}$  
    $\displaystyle \alpha^{SIZE2}(\textrm{Method})$ $\displaystyle \mapsto$ $\displaystyle \textrm{method}^{SIZE2}$  
    $\displaystyle \alpha^{SIZE2}(\textrm{Field})$ $\displaystyle \mapsto$ $\displaystyle \textrm{attribute}^{SIZE2}$  

Definition
The $ SIZE2$value of a class $ c \in class^{SIZE2}$is defined as:
$\displaystyle A(c)$ $\displaystyle =$ $\displaystyle pred(c, \textrm{attributeof}^{SIZE2})$  
    $\displaystyle \textit{-\hspace{1pt}- set of attributes directly contained in c}$  
$\displaystyle M(c)$ $\displaystyle =$ $\displaystyle pred(c, \textrm{methodof}^{SIZE2})$  
    $\displaystyle \textit{-\hspace{1pt}- set of methods directly contained in c}$  
$\displaystyle SIZE2(c)$ $\displaystyle =$ $\displaystyle \left\vert A(c) \cup M(c) \right\vert$  

Scale
Absolute.
Domain
Integers $ \in 0..\infty$.
Highly Related Software Quality Properties
 
Re-Usability 2.4
is both negatively and positively influenced by SIZE2.
Understandability for Reuse 2.4.1:
Understanding if a class is suitable for reuse depends on its size.

Understandability declines with increasing SIZE2.

Learnability for Reuse 2.4.2:
Learning if a class is suitable for reuse depends on the size and complexity of its interface. SIZE2 measures interface size.

Learnability might decline with increasing SIZE2.

Operability for Reuse - Programmability 2.4.3:
How well a class can be integrated depends the complexity of its interface. SIZE2 measures interface size.

Programmability might decline with increasing SIZE2.

Attractiveness 2.4.4:
Attractiveness of a class depends on the size of the potentially reused code.

Attractiveness increases with increasing SIZE2.

Maintainability 2.6
declines with increasing SIZE2.
Analyzability 2.6.1:
The effort and time for diagnosis of deficiencies or causes of failures in software entity, or for identification of parts to be modified is directly related to its size.

Analyzability declines with increasing SIZE2.

Changeability 2.6.2:
Changing a class requires prior understanding, which, in turn, is more complicated for large systems.

Changeability declines with increasing SIZE2.

Testability 2.6.4:
Complete testing requires coverage of all execution paths. The number of possible execution paths of a system increases with its size.

Testability declines with increasing SIZE2.

Portability 2.7
declines with increasing SIZE2.
Adaptability 2.7.1:
As for changeability 2.6.2, the size of software has a direct impact. Each modification requires understanding which is more complicated for large systems.

Adaptability declines with increasing SIZE2.

Replaceablity 2.7.4:
The substitute of a component must imitate its interface. Large interfaces are difficult to check for substitutability and to actually substitute. Interface size is specifically assessed by SIZE2.

Replaceablity decline with increasing SIZE2.

Related Software Quality Properties
 
Functionality 2.1
might increase with increasing SIZE2.
Interoperability 2.1.3:
Interoperability requires to be able to locate the parts of a system responsible for interoperability. The size of in these parts might indicate a better ability to interact.

Interoperability might increase with increasing SIZE2.

Security 2.1.4:
Relating SIZE2 to security requires to be able to locate the parts of a system responsible for security. The size of these parts might indicate a higher security.

Security might increase with increasing SIZE2.

Reliability 2.2
might increase with increasing SIZE2.
Maturity 2.2.1:
Due to reduced analyzability 2.6.1 and testability 2.6.4, bugs mights be left in the software. Therefore, also maturity may be influenced negatively by interface size.

Maturity might decline with increasing SIZE2.

Fault-tolerance 2.2.2:
Relating SIZE2 to fault-tolerance requires to be able to locate the parts of a system responsible for fault-tolerance. The size of these parts might indicate a better ability to interact.

Fault-Tolerance might increase with increasing SIZE2.

Recoverability 2.2.3:
Relating SIZE2 to recoverability requires to be able to locate the parts of a system responsible for recoverability. The size of these parts might indicate a higher recoverability.

Recoverability might increase with increasing SIZE2.

Efficiency 2.5
might decline with increasing SIZE2.
Time Behavior 2.5.1:
Static size might indicate a higher execution time due to increased number of instruction cache misses, long jumps, etc.

Time behavior might get worse with increasing SIZE2.

Resource Utilization 2.5.2:
Static size might indicate a higher memory utilization.

Resource utilization might get worse with increasing SIZE2.

Maintainability 2.6
declines with increasing SIZE2.
Stability 2.6.3:
Due to reduced analyzability 2.6.1 and testability 2.6.4, also stability may be influenced negatively by size.

Stability might decline with increasing SIZE2.

References
 
  • The SIZE2 metric is extensively discussed in [14,2,4,11],
  • SIZE2 is implemented in the VizzAnalyzer Metrics Suite.

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