Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Source Material
Agenda
Part I:
Part II:
Part III:
Part IV:
Part V:
Part VI:
Part VII:
Introduction
Survey of Software Reliability Models
Quantitative Criteria for Model Selection
Input Data Requirements and Data Collection Mechanisms
Early Prediction of Software Reliability
Current Work in Estimating Fault Content
Software Reliability Tools
Part I: Introduction
Basic Definitions
Reliability Theory
Let "T" be a random variable representing the
failure time or lifetime of a physical system.
For this system, the probability that it will fail by
t
time "t" is:
F (t ) P[T t ] f ( x) dx
0
"t" is:
R (t ) P[T t ] 1 F (t ) f ( x)dx
P[ t 1 t t 2| T t 1]
P[ t 1 t t 2 ]
t 2 t1
( t 2 t 1) P[ T t 1]
F ( t 2 ) F ( t 1)
( t 2 t 1) R ( t 1)
9
F ( t t ) F ( t )
z ( t ) lim
t 0
tR ( t )
f (t )
R(t )
This is the instantaneous failure rate at time t, given that the
system survived until time t. The terms hazard rate and
failure rate are often used interchangeably.
10
1 MTTF
R t e t
11
Region 1 debugging,
infant mortality
Region 3 component
wear-out
or fatigue
Time t
12
13
Jelinski-Moranda/Shooman Models
14
Jelinski-Moranda/Shooman (cont'd)
Assumptions:
1. The number of errors in the code is fixed.
2. No new errors are introduced into the code through the
correction process.
3. The number of machine instructions is essentially constant.
4. Detections of errors are independent.
5. The software is operated in a similar manner as the
anticipated operational usage.
6. The error detection rate is proportional to the number of
errors remaining in the code.
15
Jelinski-Moranda/Shooman (cont'd)
Let represent the amount of debugging time spent on the system since
the start of the test phase.
From assumption 6, we have:
z() = K r( )
16
Jelinski-Moranda/Shooman (cont'd)
ET and IT are constant (assumptions 1 and 3).
No new errors are introduced into the correction process
(assumption 2).
As , c() ET/IT, so r() 0.
ET
C
The hazard rate becomes: z K
IT
z()
K(ET/IT)
ET/IT
C()
17
Jelinski-Moranda/Shooman (cont'd)
The reliability function becomes:
K ET C
IT
R e
18
Geometric Model
5.
20
} D(1 - )
D
D
D(1 - 2 )
time
1
i
i 1
change in z t on discovery of i 1st error
D D
i 1
i 2
22
Musa-Okumoto Model
0e
d (t )
0e u t
dt
or
d (t ) u t
e 0
dt
23
We then obtain
de ( t )
d (t ) u t
e
dt
dt
de ( t )
0
dt
24
t 0 C
ln t 0 1
t
25
Failure Number
Reject
Continue
Accept
27
A ln
B ln
1
where n is number of failures observed. The boundary between the
continue and accept regions of the chart is given by:
B n ln
1
28
Background
Non-Quantitative criteria
Quantitative criteria
29
33
n Dn
sup F x F x
34
k 1
j np j
np
j 1
where:
j
n = number of independent repetitions of an experiment in which the
outcomes are decomposed into k+1 mutually exclusive sets A1, A2,..., Ak+1
Nj = number of outcomes in the jth set
pj = P[Aj]
35
f t d F t dt
t1 t 2
t i1
T j 1 , T j 2 , , T j n
j n ~
f (t )
Two prediction systems, A and B, can be evaluated by computing the prequential likelihood
PLn
ratio:
i j 1
j n
. The
, pdf, ,
~
A
i
( ti )
i j 1
If PLRn approaches infinity as n approaches
infinity, B is discarded in favor of A
PLRn
j n ~ B
i j 1
( ti )
36
fi+2
fi+1
true pdf
fi+1
true
pdf
fi+3
fi+2
37
PLR n
p ( tj n , , tj 1| tj , , t 1, A)
p ( tj n , , tj 1| tj , , t 1, B )
p ( A| tj n , , t 1) p ( tj n , , tj 1| tj , , t 1)
p ( A| tj , , t 1)
PLR n
p ( B| tj n , , t 1) p ( tj n , , tj 1| tj , , t 1)
p ( B| tj , , t 1)
38
p ( A| tj n , , t 1) p ( B| t 1, , tj )
p ( B| tj n , , t 1) p( A| t 1, , tj )
If the initial conditions were based only on prior belief, the second
factor of the final equation is the prior odds ratio. If the user is
indifferent between models A and B, this ratio has a value of 1.
39
wA
PLR n
1 wA
This is the posterior odds ratio, where wA is the posterior belief that
A is true after making predictions with both A and B and comparing
them with actual behavior.
40
41
1.0
JM
LV
0.5
0.5
1.0
42
yi
j
j
for i m, m representing the number
of observations
made
j 1
j 1
If the really do form a sequence of independent random variables in [0,1],
the slope of the plotted will be constant.
ui
yi
43
1.0
LV
JM
0.5
0.5
1.0
44
45
46
Laplace Test
The occurrence of failures is assumed to follow a nonhomogeneous Poisson process whose failure intensity is
decreasing:
a bt
h t e
u i
1 i 1 n
j
i 1 n 1 j 1
i
j 1
j 1
1
12 i 1
47
u k
i 1
k 1
i 1 n i
2
n i
i 1
1
k n i
12 i 1
48
Interpretation
Negative values of the Laplace factor indicate decreasing failure intensity.
Positive values suggest an increasing failure intensity.
Values varying between +2 and -2 indicate stable reliability.
Significance is that associated with normal distribution; e.g.
The null hypothesis H 0 : HPP vs. H 1 : decreasing failure intensity is
rejected at the 5% significance level for (T) < -1.645
The null hypothesis H 0 : HPP vs. H 1 : increasing failure intensity is
rejected at the 5% significance level for (T) > -1.645
The null hypothesis H 0 : HPP vs. H 1 : there is a trend is rejected at
the 5% significance level for |(T)| > 1.96
49
Model Inputs
Time Between Successive Failures
Failure Counts and Test Interval Lengths
Setting up a Data Collection Mechanism
Minimal Set of Required Data
Data Collection Mechanism Examples
50
51
53
54
55
56
Background
RADC Study
Phase-Based Model
57
58
59
60
61
62
63
A * D * SA * ST * SQ * SL * SS * SM * SU * SX * SR
F *frequency
K *W 0 of the program
0
F = linear execution
K = fault exposure ratio (1.4*10-7 < K < 10.6*10-7, with an average value
of 4.2*10-7)
W0 = number of inherent faults
64
QX is the code expansion ratio (the ratio of machine instructions to source instructions, which has an average value of 4
according to this study).
Therefore, the initial failure rate can be expressed as:
K
R*
*
Q x
W
I
65
66
V t
B
(
t
1
)
Bt
E e
e
67
68
1
2
2
p
1 Bt
E
V t e
where V is the number of errors per KSLOC that have been dis-covered
2
through phase t
69
14
12
10
8
6
4
2
0
1
70
Bn
V n E 1 e
Bn
71
Analysis of Complexity
Regression Tree Modeling
72
Analysis of Complexity
73
74
76
Module
CMA
Metric
Analysis
LOC
Stmts
N1
N2
eta1
eta2
14
12
30
23
15
12
Module
Characteristics
77
Metric
Analysis
12 23 54 12 203 39 238 34
7 13 64 12 215 9 39 238
CMA
11 21 54 12 241 39 238 35
5 33 44 12 205 39 138 44
42 55 54 12 113 29 234 14
Program
Raw Metrics
Principal
Components
Analysis
PCA/
RCM
50
40
60
45
55
Relative
Complexity
78
Bj d Bj
B
i
j 1
79
80
81
31
36
37
38
32
33
34
35
39
40
41
42
55
A
64
49
50
51
5 2
65
66
67
68
56
57
58
60
61
62
70
71
72
69
63
53
1 54
1 60
1 61
1 55
1 63
1 64
65
6 6
67
68
6 9
70
1 62
7
88
1 74
1 71
1 72
1 73
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 85
1 83
2 03
302
303
304
305
306
307
1 86
355
356
310
01
2 05
2 07
2 08
2 09
2 10
2 11
212
213
2 14
215
216
17
20
2 25
226
312
361
362
313
314
315
363
325
326
327
328
329
330
134
229
230
231
232
336
337
338
333
334
278
279
280
332
335
339
364
331
228
323
324
227
322
02
2 06
2 24
311
90
297
309
89
296
308
1 87
295
301
00
2 04
294
300
88
1 84
159
281
262
263
264
274
349
275
276
277
282
283
284
82
Analysis of
Complexity
(contd)
The
Problem
Build N
Build N+1
A
B
C
D
E
L
M
D
E
G
H
I
J
K
H
I
J
K
83
84
Point A
Point B
86
Vector of means
Vector of standard deviations
z Bj ,i ( w Bj ,i x jB ) / s Bj
Transformation matrix
d B ,i z B ,i T B
87
Source Code
Baseline
Baselined Build i
RCM Values
Code
Churn
RCMDelta
Code
Deltas
Build j
Baselined Build j
88
Code delta
a
a
a
i, j
i, j
B, j
B ,i
a
a
a
a
Code churn
Net code churn
i, j
i, j
mcM c
B ,i
maM ai , j
B, j
mbM bi , j
89
90
Build N+1
Existing
Faults
Faults
Removed
Faults
Added
91
92
Frequency
39
37
35
33
31
29
27
25
23
21
19
17
15
13
11
Missing
30
Mean
10.5667
Median
7.5000
Std.
Deviation
9.3428
25
3.7500
Percentiles
50
7.5000
75
13.2500
93
94
95
96
97
R0
kR
for total faults
0
0 0
g
r
Faults per module: i i F
98
F kR k
j
0, j
F j 1 F j kR 0 k 0, j 1 kR 0 k 0, j
0 , j 1
0, j
k (
)
k j , j 1
99
100
Version 3
Version 4
Version 5
Versions 3-5
Number of
Cases
10
12
13
35
Pearsons R
Spearman
Correlation
.376
.661
.891
.568
-.323
.700
-.276
.125
.451
.793
.871
.631
-.121
.562
-.233
.087
= code churn
= code delta
101
b1
t (b1)
b2
t (b2)
R2
Adjusted
R2
j , j 1
1.507
0.373
3.965
-----
-----
0.568
0.323
j , j 1
1.312
0.460
4.972
0.172
2.652
0.667
j , j 1
-----
0.576
7.937
-----
-----
j , j 1
-----
0.647
9.172
0.201
2.849
Model
j , j 1
j , j 1
0 b1
j , j 1
j , j 1
0 b1
b
1
j , j 1
j , j 1
b
1
0.302
Residual
Sum of
Squares
140.812
Degrees
Of
Freedom
33
0.445
0.412
115.441
32
0.806
0.649
0.639
179.121
34
0.846
0.719
0.702
143.753
33
j , j 1
j+1
is the measured code delta between builds j and j+1
102
Linear Models
Excluding
Observations of
Churn = 0
186.090
159.875
Nonlinear Models
Excluding
Observations of
Churn = 0
205.718
157.831
103
.
104
Predicted Residuals
6
4
2
0
-2
-4
0
10
12
j , j 1
b
1
j , j 1
Sum of Ranks
192.00
438.00
Test
Statistic
Z
-2.015
Asymptotic
Significance
(2-tailed)
0.044
j , j 1
105
D yi , i y i i
109
110
Application (contd)
Metrics
Total lines of code (TC)
Number of code lines (CL)
Number of characters (Cr)
Number of comments (Cm)
Comment characters (CC)
Code characters (Co)
Halsteads program length
Halsteads estimate of program length metric
Jensens estimate of program length metric
Cyclomatic complexity metric
Bandwidth metric
111
112
Type II error in case of tree modeling is 8.7%, and in case of fault density
is 13.1%.
Can also be used to classify modules into fault-prone and non fault-prone
categories.
115
SRMP
SMERFS
CASRE
116
117
119
Data Input
Data Edit
Data Transformation
Data Statistics
120
122
Further Reading
123
124
125
M. Lyu, "Measuring Reliability of Embedded Software: An Empirical Study with JPL Project Data,"
published in the Proceedings of the International Conference on Probabilistic Safety Assessment
and Management; February 4-6, 1991, Los ngeles, CA.
M. Lyu and A. Nikora, "A Heuristic Approach for Software Reliability Prediction: The EquallyWeighted Linear Combination Model," published in the proceedings of the IEEE International
Symposium on Software Reliability Engineering, May 17-18, 1991, Austin, TX M. Lyu and A. Nikora,
"Applying Reliability Models More Effectively", IEEE Software, vol. 9, no. 4, pp. 43-52, July, 1992
M. Lyu and A. Nikora, "Software Reliability Measurements Through Com-bination Models:
Approaches, Results, and a CASE Tool," proceedings the 15th Annual International Computer
Software and Applications Conference COMPSAC91), September 11-13, 1991, Tokyo, Japan
J. McCall, W. Randall, S. Fenwick, C. Bowen, P. Yates, N. McKelvey, M. Hecht, H. Hecht, R. Senn,
J. Morris, R. Vienneau, "Methodology for Software Reliability Prediction and Assessment," Rome Air
Development Center (RADC) Technical Report RADC-TR-87-171. volumes 1 and 2, 1987
J. Munson and T. Khoshgoftaar, "The Use of Software Metrics in Reliability Models," presented at
the initial meeting of the IEEE Subcommittee on Software Reliability Engineering, April 12-13, 1990,
Washington, DC
126
127
128
Additional Information
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
148
149
Schneidewind Model
150
Schneidewind Model
2.
3.
4.
5.
152
d e
and
i > 0 are constants of
for the i'th interval, where
>
0
i
the model.
153
Schneidewind Model
154
Schneidewind Model
2.
3.
4.
5.
156
i
1 e
i 1
m i = Di - Di - 1
157
2.
The numbers of errors, (f1, f2, f3,...,fm) detected in each of the respective
time intervals [(0, t1), (t1, t2),...,(tm-1,tm)] are independent for any finite
collection of times t1 < t2 < ... < tm.
3.
Every error has the same chance of being detected and is of the same
severity as any other error.
4.
159
160
t , t t
m t t m t b a m t t O t
where
b is a constant of proportionality
a is the total number of errors in the program
Solving the above differential equations yields:
m t a1 e
m 0 0, m a
161
t 1 exp
0
2.
162
t t
1t
163
164
165
166
167
Littlewood-Verrall (cont'd)
Assumptions:
1.
Successive execution times between failures are independent random variables with
probability density functions
X e
i
i
i
i's form a sequence
of random
variables, each with a gamma distribution of parameters
and (i), such that:
i i
168
Littlewood-Verrall (cont'd)
Assumptions (cont'd)
Imposing the constraint
any
P j x P j 1 xfor
x reflects the intention to make the program better by
correcting errors. It also reflects the fact that
sometimes corrections will make the program worse.
3.
169
Littlewood-Verrall (cont'd)
f X i , i f
X g d
i
ie (i ) Xi [ (i )] i 1e (i ) Xi di
0
( )
i
1
X i i
170
Littlewood-Verrall (cont'd)
Joint density for the Xi's is given by:
n
(i )
n
i 1
Xi ( i )
i 1
171
Hyperexponential Model
Extension to classical exponential models. First considered by Ohba; addressed in variations by Yamada,
Osaki, and Laprie et. al.
Basic idea is that different sections of software experience an exponential failure rate. Rates may vary over
these sections to reflect their different natures.
172
173
2.
( t ) N pi[1 exp( it )]
i 1
where 0 i 1,
1,
i 1
0 pi 1, and N is finite
174
175
i j
T T
i
st
i j and x 0
F T x F T x
i
176
177
178
We can interpret the subadditive property graphically. Consider the curve (t), representing
the mean value function for the cumulative number of failures, and the line L t joining the two
end points of (t) at (t,H(t)), shown below.
H(x)
(t)
Let AH(t) denote the difference between the area delimited by (1) (t) and the coordinate axis
and (2) Lt and the coordinate axis. If H(t) is subadditive, then AH(t) 0 for all t [0,T]. We
call AH(t) the subadditivity factor.
t
t
1
179
AH(t) constant over [0,T] implies stable reliability on average over [0,T].
Ah(t) 0 over [t1,t2] implies local reliability decrease on average over [t 1,t2].
180
Introduction
Linear Combination Models
Statically-Weighted Models
Statically-Determined/Dynamically-Assigned
Weights
Dynamically-Determined/Dynamically-Assigned
Weights
Model Application Results
Model Recalibration
181
182
Optimistic
Projection
Elapsed time
183
184
185
1
1
1
GO MO LV
3
3
3
186
0 * P 1* M 0 * O
where :
O = optimistic prediction
M = median prediction
P = pessimistic prediction
187
1
4
1
P M O
6
6
6
where:
O = optimistic prediction
M = median prediction
P = pessimistic prediction
188
w i computation
w i reference window
i+2
i+1
i+1
reference window
computation
w
i+2
i+2
computation
reference window
Time
reference window
w
reference window
i+1for component models vary over time.
Weights
w i reference window
Time
189
190
DLC
5
2
1
1
2
5
5
1
5
5
8
1
1
9
9
3
10
10
1
8
5
7
4
3
3
6
Sum of
Rank
54
57
42
53
65
40
25
30
31
25
Handicap
+22
+25
+10
+21
+33
+8
-7
-2
-1
-7
Total
Rank
10
Data Set
RADC 1
RADC 2
RADC 3
Voyager
Galileo
Galileo
CDS
Magellan
Alaska
SAR
191
DLC
1
2
1
1
1
1
6
2
6
6
6
2
2
10
6
2
5
9
3
8
4
7
6
2
1
1
Sum of
Rank
50
56
41
68
49
39
30
32
39
Handicap
+18
+24
+9
+36
+17
+7
-2
+7
-23
Total
Rank
10
Data Set
RADC 1
RADC 2
RADC 3
Voyager
Galileo
Galileo
CDS
Magellan
Alaska
SAR
192
193
4.
5.
F i t Gi F i t
195
196
197
4.
Recalibrate the raw prediction using F i t Gi F i t .
198