Environmental Engineering Reference
In-Depth Information
n 1 , n 2 - a number of errors in the first and the
second program-version, respectively.
In accordance with the formula, diversity in-
dicator β changes from 0 to 1 and takes on limit
values in the following cases:
statistical code analyzer; (2) calculation of abso-
lute value of remainder obtained from a pair of
each program-version metrics; (3) rating absolute
values of metrics obtained at stage 2; (4) deter-
mination of the diversity indicator β .
Further, values of diversity indicators, obtained
by using direct and indirect metrics, should be
compared to determine their correlation.
To assess proposed MVS assessment tech-
niques two-version projects were obtained in
programming languages С#, Java, C++. Only
versions of initial programs with errors were
assessed. Assessment results of two-version
projects are presented in Table 7. Each project is
a solution for one of the five tasks characterized
by complexity level, where I - the lowest level of
task complexity, III - the highest level (Duzhyi,
V., et al, 2010).
From the table it appears:
0
,
,
if
if
n
n
=
=
0
com
β =
.
1
n
err
1
err
2
Gain, obtained by the diversity, is ∆ = 1 β
If all errors match in both program-versions
( β =1), there will be no gain (Δ=0), because both
MVS versions will operate inaccurately. If errors
differ in each version (ideal case) ( β =0), majority
element will be able to determine different values
in each channel; so, in this case there will be the
largest gain (Δ=1). If diversity indicator is in
the range (0< β <1), obtained gain indicates that
in both versions a number of undetected errors
is decreased by value (Δ*100) percentagewise.
Indirect metrics-based assessment of the di-
versity indicator β of two-version design has the
following stages: (1) measurement of absolute
values of each program-version metrics, using
• Diversity allows increasing quality of most
projects.
Subject diversity allows increasing proj-
ect quality independently of programming
language.
Table 7. Results of MVP experimental researches
Task
Level of
Complexity
Language
Number of
Projects (MVP)
β
Gain by Diversity, %
by MVP
0
0...1
1
1
I
C#
3
2
0
1
67
Java
91
16
61
14
85
C++
465
99
343
23
95
2
II
C#
21
0
21
0
100
Java
153
12
132
9
94
C++
465
20
439
6
99
3
I
C#
45
6
38
1
98
Java
45
0
38
7
84
C++
435
64
323
48
89
4
II
Java
3
2
1
0
100
C++
231
0
211
20
91
5
III
Java
3
0
3
0
100
C++
10
4
6
0
100
 
Search WWH ::




Custom Search