1. Software Technical Metrics
Software Technical Metrics
The metrics which help software
engineers to gain insight into the design
and construction of the products they
build and the product itself.
13 January, 2012 Mady By Utpal Ray 1
2. Software Technical Metrics
McCall’s Quality Factors
( McCall, Richards, Walters; 1977 )
It’s a direction towards measuring software quality.
Considering the fact that software quality is very much
subjective in nature, quantifying software quality is quite a
debatable issue.
McCall expressed software quality in terms of 11 measurable
quality factors. These 11 quality factors focus on three
important aspects of a software product.
Some of the quality factors are responsible for successful
product operation; some of the quality factors are
responsible for successful product revision and some are
responsible for successful product transition.
13 January, 2012 Mady By Utpal Ray 2
4. Software Technical Metrics
McCall’s Quality Factors ( contd. )
- Correctness : The extent to which a program satisfies
it’s specification and fulfills customer’s mission
objective.
- Reliability : The extent to which a program can be
expected to perform it’s intended function with
required precision.
- Usability : The effort required to
learn, operate, prepare input, and interpret output of a
program.
- Integrity : The extent to which access to software or
data by unauthorized persons can be controlled.
- Efficiency : The amount of computing resources and
code required by a program to perform it’s functions.
13 January, 2012 Mady By Utpal Ray 4
5. Software Technical Metrics
McCall’s Quality Factors ( contd. )
- Flexibility : The effort required to modify an
operational program.
- Testability : The effort required to test a program to
ensure that it performs it’s intended functions.
- Maintainability : The effort required to locate and fix
an error in a program.
13 January, 2012 Mady By Utpal Ray 5
6. Software Technical Metrics
McCall’s Quality Factors ( contd. )
- Portability : The effort required to transfer the
program from one hardware and/or software system
environment to another.
- Reusability : The extent to which a program or parts
of a program can be reused in another application.
- Interoperability : The effort required to couple one
system to another.
13 January, 2012 Mady By Utpal Ray 6
7. Software Technical Metrics
McCall’s Quality Factors ( contd. )
- All the quality factors mentioned above depends upon quite a few
metrics; and the dependency can be given by the following
formulae :
Fq = c1 x m1 + c2 x m2 + … + cn x mn
Where, Fq is the software Quality Factor;
cn are the regression co-efficient;
( c1 + c2 + … + cn = 1.0 )
mn are the metrics which affects Fq.
- Most of these metrics ( there are about 22 ) can be measured
subjectively. These metrics can be in the form of a check list. The
grading scheme for each of the metric is between 0 ( low ) and 10
( high ).
- The value of the regression co-efficient is dependent upon the
products and the weight given for that particular metrics.
13 January, 2012 Mady By Utpal Ray 7
8. Software Technical Metrics
McCall’s Quality Factors ( contd. )
The list of 22 metrics
Auditability – The ease with which conformance to standards can be
checked.
Accuracy – The precision of computation and control.
Communication Commonality – The degree to which standard
interfaces, protocols and bandwidth are used.
Completeness – The degree to which full implementation of required
function has been achieved.
Complexity – The degree to which the program is complex.
Conciseness – The compactness of the program in terms of lines of
codes.
Consistency – The use of uniform design and documentation technique
throughout the software development project.
Data Commonality – The use of standard data structures and types
throughout the program.
13 January, 2012 Mady By Utpal Ray 8
9. Software Technical Metrics
McCall’s Quality Factors ( contd. )
The list of 22 metrics ( contd. )
Error Tolerance – The damage that occurs when the program
encounters an error
Execution Efficiency – The run time performance of a program.
Expandability – The degree to which architectural, data or
procedural data can be extended.
Generality – The breadth of potential application of program
components.
Hardware Independence – The degree to which the software is
decoupled from the hardware on which it operates.
Instrumentation – The degree to which the program monitors it’s
own operation and identifies errors that do occur.
Modularity – The functional independence of program
components.
13 January, 2012 Mady By Utpal Ray 9
10. Software Technical Metrics
McCall’s Quality Factors ( contd. )
The list of 22 metrics ( contd. )
Operability – The ease of operation of a program.
Security – The availability of mechanisms that control or protect
programs and data.
Self-Documentation – The degree to which the source code provides
meaningful documentation.
Simplicity – The degree to which a program can be understood
without difficulty.
Software System Independence – The degree to which the program
is independent of nonstandard programming language
features, operating system characteristics, and other environmental
constraints.
Traceability – The ability to trace a design representation or actual
program component back to requirements.
Training – The degree to which the software assists in enabling new
users to apply the system.
13 January, 2012 Mady By Utpal Ray 10
11. Software Technical Metrics
McCall’s Quality Factors ( contd. )
The relationship between few of the quality factors and
the metrics are given below.
Reliability = c1 x Accuracy + c2 x Complexity + c3 x
consistency + c4 x Error-Tolerance + c5 x Modularity +
c6 x Simplicity
Testability = c1 x Auditability + c2 x Complexity + c3 x
Instrumentation + c4 x Modularity + c5 x Self-
Documentation + c6 x Simplicity
Portability = c1 x Generality + c2 x Hardware-
Independence + c3 x Modularity + c4 x Self-
Documentation + c5 x Software-System-Independence
13 January, 2012 Mady By Utpal Ray 11
12. Software Technical Metrics
Architectural Design Metrics
There are two categories of Architectural Design
Metrics. They are :-
1. Architectural Structure Metrics – This category has
an emphasis on architectural structure.
2. Architectural Complexity Metrics – This category
has an emphasis on the complexity of different
modules.
13 January, 2012 Mady By Utpal Ray 12
13. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Structure Metrics
- Fenton’s Size Metric = a + n
- Fenton’s Connectivity Density Metric = (a/n)
Where, n is the number of nodes
a is the number of arcs
Nodes
Arcs
13 January, 2012 Mady By Utpal Ray 13
14. Software Technical Metrics
Architectural Design Metrics (contd. )
Architectural Structure Metrics ( contd. )
Sl Different Structure Nodes Arcs Size Density
No (n+a) ( a/n)
1 2 1 3 0.5
2 3 2 5 2/3=0.7
13 January, 2012 Mady By Utpal Ray 14
15. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Structure Metrics ( contd. )
Sl. Different Structure Nodes Arcs Size Density
No. ( n) (a) (n+a) ( a/n)
3 8 7 15 0.9
13 January, 2012 Mady By Utpal Ray 15
16. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Structure Metrics (contd. )
Sl. Different Structure Nodes Arcs Size Density
No. ( n) (a) (n+a) ( a/n)
4 6 8 14 8/6=1.3
13 January, 2012 Mady By Utpal Ray 16
17. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Complexity Metrics
Under these category there are three types of metrics.
They are :-
1. Structural Complexity Metrics
2. Data Complexity Metrics
3. System Complexity Metrics
13 January, 2012 Mady By Utpal Ray 17
18. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Complexity Metrics ( contd. )
1. Structural Complexity – S(i) of a module is given by
S(i) = ( fout (i) ) ** 2
where, fout (i) is the fan out for the module i.
2. Data Complexity – D(i) of a module i is given by
D(i) = V(i) / ( fout(i) +1 )
where, V(i) is the total number of input and output
variables that are passed to and from module i.
3. System Complexity – C(i) is given by
C(i) = S(i) + D(i)
13 January, 2012 Mady By Utpal Ray 18
19. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Complexity Metrics ( contd. )
Sl. Different Fan Out Total Struct. Data System
No. Architecture fout(i) Input Comple- Comple- Comple-
output xity xity Xity
variable S(i) D(i)
V(i) C(i)
1. 1 2 1 1 2
i
1,1
13 January, 2012 Mady By Utpal Ray 19
20. Software Technical Metrics
Architectural Design Metrics ( contd. )
Architectural Complexity Metrics ( contd. )
Sl. Different Fan Total Struct. Data System
No. Architecture Out Input Comple- Comple- Comple-
fout(i) output xity xity Xity
variable S(i) D(i)
V(i) C(i)
2. 3 12 9 3 12
i
4,1 3,2
1,1
13 January, 2012 Mady By Utpal Ray 20
21. Software Technical Metrics
Architectural Design Metrics ( Summary )
Architectural Design Metrics
Architectural Structure Metrics Architectural Complexity Metrics
Structural Complexity Data
Fenton’s Size Metric Metrics Complexity
Metrics
Fenton’s Connectivity
Density Metric
System Complexity Metrics
13 January, 2012 Mady By Utpal Ray 21
22. Software Technical Metrics
Component Level Design Metrics
There are two types of metrics in this category.
1. Coupling Metric
2. Complexity Metric ( Cyclometic Complexity )
Both this metrics require the knowledge of the internal
structure of the module at least in a component
level. The two metrics mentioned above can be used
to determine the quality of the component level
design.
13 January, 2012 Mady By Utpal Ray 22
23. Software Technical Metrics
Component Level Design Metrics ( contd. )
Coupling Metric
This metric determine the coupling efficiency of a module. Three types of
coupling definitions has been incorporated into the formulae for
computing this metric.
1. Data and Control Flow Coupling:
di = no. of input data parameter
ci = no. of input control parameter
do = no. of output data parameter
co = no. of output control parameter
2. Global Coupling:
gd = no. of global variables used as data
gc = no. of global variables used as control
3. Environmental Coupling:
fout = fan out for that module
fin = fan in for that module
13 January, 2012 Mady By Utpal Ray 23
24. Software Technical Metrics
Component Level Design Metrics ( contd. )
Coupling Metric ( contd. )
The coupling metric C is given by:-
C = 1 – k / ( di + (a*ci) + do + (b*co) + gd + (c*gc) + fout
+ fin )
The values of k, a, b, c are adjusted as per experimental
verification. In general they are taken as 1, 2, 2, 2
respectively.
C will be higher ( closer to 1 ), if a module have high
coupling. The minimum value of C will be 0. This will
occur when the module has only one parent module
and there are no global coupling or control coupling.
The module accepts no data variable and also returns
no data variable.
13 January, 2012 Mady By Utpal Ray 24
25. Software Technical Metrics
Home Task
1. Take any “Call and Return Architecture” of your
choice ( which has at least 6 modules ). Compute the
value of all the metrics which fall under the category
of ‘Architectural Design Metrics’. Regarding input-
output data variable passing, assume 3 input variable
and 1 output variable.
2. Prove that the minimum value of coupling efficiency
is 0.66.
13 January, 2012 Mady By Utpal Ray 25