Page 196 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 196
Principles of Software Engineering
Notes the software has entered the integration and testing stages. Since changes are less expensive
the earlier in the development lifecycle they are made this can save the project considerable
time and money.
Most software metrics are based on code syntax, quantifying the complexity or cohesion of
an Implementation by performing calculations based on counting code structures. In contrast,
semantic metrics, introduced by, quantify the meaning within a domain of the task being
performed. To collect semantic metrics, first a program understanding system performs
understanding; in that way the operation of the software, or what the software does, is
Represented in a general knowledge-based format. In our semMet tool, a mature program
understanding engine.
The structure of the code itself is not considered for semantic metrics, so it is not necessary for
a system to be implemented in order to calculate semantic metrics.
if (balance < withdrawal) {
bounce = true;
}
else {
bounce = false;
}
Compare that code sample with the following:
bounce = (balance < withdrawal) ? true: false;
Traditional metrics such as lines of code produce
Different values for these two code samples, even though they do exactly the same thing. In
contrast, semantic metrics would flag the concepts of balance, withdrawal, and bounce in the
banking domain for both samples, regardless of the implementation details.
Semantic metrics are especially useful for measuring cohesion, which is hard to capture based
on program syntax, according However, before we can use any metric, we must make sure it
is a valid measure of the attribute of interest. Many of the metrics that have been defined have
never been adequately validated theoretically or empirically, making their use questionable.
Found that many metrics are invalid or poorly defined. They suggested that any new metrics
be valid and Unambiguous.
Others have also studied existing metrics and concluded that metrics must be valid and well
defined, and too many existing metrics fail in at least one of these are as cohesion metrics and
coupling metrics from ten different sources. Found problems with all of these metrics except
these studies point to a clear need for valid, well-defined metrics.
PSI (percentage of shared ideas), a knowledge-based semantic cohesion metric. We validate PSI
theoretically and empirically, and we compare its performance to six variations on a well-known
cohesion metric, Chidambaram and Kemmerer’s LCOM. (See Figure 9.12)
Figure 9.12: A Conceptual Graph Example
SCROLLBAR STAT MOV AGNT MOUSE
PART
WINDOW
190 LOVELY PROFESSIONAL UNIVERSITY