Documente Academic
Documente Profesional
Documente Cultură
VS
MEASUREMENT IN THE PHYSICAL
SCIENCES
OUTLINE
► Introduction
► Weyuker’s Properties
► Software measurement
► Evaluation of Weyuker’s properties
► Measurement theory
► Whether software measurement is
really measurement in the physical
sciences
► Conclusion
► Introduction
► Weyuker’s Properties
► Software measurement
► Evaluation of Weyuker’s properties
► Measurement theory
► Whether software measurement is
really measurement in the physical
sciences
► Conclusion
INTRODUCTION
► Weyuker proposed nine properties for the
evaluation of software complexity metric.
► None of these measures satisfied all of Weyuker’s
properties.
► I look at the foundation of measurement theory and
ask whether software measurement is
measurement in sense of measurement in the
physical sciences.
► Thus, if we accept Weyuker’s properties, we would
see that software measurement does not have
additive properties for all metric.
► This research is the basis of a paper that was
accepted for presentation in (what conference).
► Introduction
► Weyuker’s Properties
► Software measurement
► Evaluation of Weyuker’s properties
► Measurement theory
► Whether software measurement is
really measurement in the physical
sciences
► Conclusion
WEYUKER’S PROPERTIES
► 1.Property One:
There are at least two programs with
differing complexity.
► 2.Property Two:
There are only a finite number of
programs of the same complexity.
► 3.Property Three:
This property states that there are multiple
programs of the same complexity.
► 4.Property Four:
This item expresses the condition that there
are functionally equivalent programs with
different complexities.
► 5.Property Five:
This property is satisfied for monotonic
measures. It roughly expresses the fact that
adding on to a program makes a more
complex program.
► 6. Property Six A:
This property is a contextual property. Code
occurring after different but equally complex
prologues may be differently affected by the
distinct prologues (at least regarding its
complexity). This is an interprogram property.
► Property Six B:
This property is similar to the previous one except
that the identical code occurs at the beginning of
the program.
► 7. Property Seven:
This property states that changing the order of
statements may change the complexity of the
program
►8. Property Eight:
This property states that uniformly
changing variable names should not
affect a program’s complexity.
► 9. Property Nine:
This property states that a
combined program may be more
complex than its individual parts.
► Introduction
► Weyuker’s Properties
► Software measurement
► Evaluation of Weyuker’s properties
► Measurement theory
► Whether software measurement is
really measurement in the physical
sciences
► Conclusion
SOFTWARE MEASUREMENT
IF x < 0 THEN
IF y < 0 THEN y -x
ELSE y x
END
ELSE x y
END
IF
x<0
THEN
y<0
THEN
ELSE
y-x ELSE
yx
xy
END
END
► For the program given, e=8, n=7,
p=3.
► Substituting these values into the
equation, McCabe’s complexity
measure is:
► V (G) = 8-7+ 2 (3) = 7.
Halstead’s metrics
► To use Halstead’s metrics, we need the following definitions:
► n1 = number of unique or distinct operators
appearing in an implementation.
► n2 = number of unique or distinct operands appearing in an
implementation.
► N1 = total usage of all of the operators appearing in an
implementation.
► N2 = total usage of all the operands appearing in an
implementation.
► Vocabulary: n = n1 + n2
► Length: N = N1 + N2
► For
example, let P be the program
body
►P: yx
► vocabulary can be derived as follows:
►n = n1 + n2 = 1 + 2 = 3.
► length can be derived as follows:
►N = N1 + N2 = 1 + 2 = 3.
Control flow complexity
► Control flow complexity is related to
readability, understandability, effort,
testability, maintainability of a
process.
► Control flow complexities are
determined by control paths (splits),
synchronizations (joins), loops, and
terminating and beginning points.
Thus, Control flow complexity
originated from the concept of
McCabe’s complexity measure.
► For example, a sequential
concatenation is depicted by the
following diagram.
► Property one:
Recall: Property one states that there are at least two
programs with differing measures.
► Property Three:
Recall: This property states that there are multiple
programs of the same complexity.
► Property seven:
Recall: this property states that changing the order of
statements may change the complexity of the program.
► Property nine:
Recall: This property states that a combined program
may be more complex than its individual parts.