Weyuker Properties

  • Uploaded by: kjolayem
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Weyuker Properties as PDF for free.

More details

  • Words: 1,927
  • Pages: 40
WEYUKER PROPERTIES 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 ►A

metric is known as an indicator. They are quantifiable indices used to compare software products, processes, or projects or to predict their outcomes. ► In software engineering we measure either the size or complexity of an entity.

COMPLEXITY MEASURES ►A

number of metrics has been proposed for the measurement of software complexity. However, my attention is focused on:    

statement count cyclomatic number Halstead’s metric control flow

Statement Count ► Statement

Count is the number of statements in a program. ► For example, let Q be the program body with two statements: ►Q:

y1

x  y+1 ► Here statement count is 2

Cyclomatic number ► McCabe’s

complexity measure of a program is defined to be: ►

V = e - n+2p

► where

e is the number of edges in a program flow graph, n is the number of nodes, and p the number of connected components or cycles.

► For

example: consider the program below: ►G:

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 y-x

ELSE yx

ELSE xy

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:

yx

► vocabulary ►n

= n1 + n2 = 1 + 2 = 3.

► length ►N

can be derived as follows:

can be derived as follows:

= 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.



Also, an AND, OR, XOR join or split is represented as follows

► Introduction ► Weyuker’s

Properties ► Software measurement ► Evaluation of Weyuker’s properties ► Measurement theory ► Whether software measurement is really measurement in the physical sciences ► Conclusion

EVALUATION OF WEYUKER’S PROPERTIES ►

I discussed the fact that there were some properties proposed by Weyuker that were satisfied by measurements in software engineering.



Property one:  Recall: Property one states that there are at least two programs with differing measures.  Examples of complexity measures that satisfy this property are statement count, cyclomatic number, Halstead’s metric, and control flow.



Property two:  Recall: Property two states that there are only a finite number of programs of the same complexity.  This property does not make sense because unlike Weyuker’s proposed language, computer languages like C#, Java or C++ does not have finitely many identifiers.  Examples that satisfy this property are statement count and Halstead metric.



Property Three:  Recall: This property states that there are multiple programs of the same complexity.  Examples of complexity measures that satisfy this property are statement count, cyclomatic number, Halstead’s metric, and control flow.



Property four:  Recall: This item expresses the condition that there are functionally equivalent programs with different complexities.  Examples of complexity measures that satisfy this property are statement count, cyclomatic number, Halstead’s metric, and control flow.



Property five:  Recall: This property is satisfied for monotonic measures. It roughly expresses the fact that adding on to a program makes a more complex program.  Examples of complexity measures that satisfy this property are statement count, cyclomatic number, Halstead’s metric, and control flow.

► Property six:

 Recall: property six states that code occurring after different but equally complex prologues may be differently affected by the distinct prologues (at least regarding its complexity).  An example that satisfies this property is Halstead metric. ► Property seven:

 Recall: this property states that changing the order of statements may change the complexity of the program.  An example that satisfies this property is control flow.

► Property eight:

 Recall: This property states that uniformly changing variable names should not affect a program’s complexity.  Examples of complexity measures that satisfy this property are statement count, cyclomatic number, Halstead’s metric, and control flow. ►

Property nine:  Recall: This property states that a combined program may be more complex than its individual parts.  An example that satisfies this property is control flow.

► Introduction ► Weyuker’s

Properties ► Software measurement ► Evaluation of Weyuker’s properties ► Measurement theory ► Whether software measurement is really measurement in the physical sciences ► Conclusion

MEASUREMENT THEORY ► Campbell

has two basic laws of measurement ► Campbell’s first law states that a metric must measure a relative quantity of an attribute. ► Given that A, B, C, and D are entities and that + means combining entities, Campbell’s second measurement law requires the following:    

1. If A = B and C > 0, then A + C > B. 2. If A + D = X, then D + A = X. 3. If A = B and C = D, then A + C = B + D. 4. If A = B, C = D, and E = F, then (A + C) + E =

► Introduction ► Weyuker’s

Properties ► Software measurement ► Evaluation of Weyuker’s properties ► Measurement theory ► Whether software measurement is really measurement in the physical sciences ► Conclusion

WHETHER SOFTWARE MEASUREMENT IS REALLY MEASUREMENT IN THE PHYSICAL SCIENCES ► Weyuker’s property six is not in complete agreement with measurement in the Physical Sciences. ► Recall: Weyuker’s property six states that code occurring after different but equally complex prologues may be differently affected by the distinct prologues (at least regarding its complexity). ► In the Physical Sciences, the complexity is the same for both P and Q. ► Therefore, joining program R with P and Q adds the same amount of complexity.

►A

good example of measurement in the physical sciences is the third part of Campbell's additive principle which states that If A = B and C = D, then A + C = B + D. ► As we can see, Weyuker’s property six is in conflict with the third part of Campbell’s additive principle. ► Thus it is in conflict with Measurement in the physical sciences. ► Thus, if we accept Weyuker’s properties, we can see that software measurement does not have additive properties for all metric.

► Introduction ► Weyuker’s

Properties ► Software measurement ► Evaluation of Weyuker’s properties ► Measurement theory ► Whether software measurement is really measurement in the physical sciences ► Conclusion

CONCLUSION ►I

looked at the foundation for measurement theory and ask whether software measurement is measurement in the sense of measurement in the physical sciences. ► I discussed the fact that there are properties in software measurement that are not satisfied in measurement in the physical sciences. ► Since some properties of software measurement are not satisfied in measurement in the physical science, then one might have to define a different foundation for software measurement.

Thus, if we accept Weyuker’s properties, we can see that software measurement does not have additive properties for some metric. ► My research is similar to an earlier research by Resee (1943). ►

References ► [1]

Jorge Cardoso. “Control flow Complexity Measurement of Processes and Weyuker’s Properties,” Preceedings of World Academy of Science, Engineering and Technology Volume 8 October 2005 ISSN 1307-6884. ► [2] N. Fenton, “Software Metrics: A rigorous Approach,” Chapman and Hall, London, 1991. ► [3] N. Fenton, “Software Measurement: A Necessary Scientific Basis,” IEEE Trans. Software Eng., 20, 1994, pp. 199-206.

► [4]

P.N. Gedela, P. Kosaraju, and A. Melton, “Measurement Theory Principles in Software Measurement” May. 2007. ► [5] McCabe, Thomas J. & Butler, Charles W. "Design Complexity Measurement and Testing." Communications of the ACM 32, 12 (December 1989): 1415-1425. ► [6] McCabe, Thomas J. & Watson, Arthur H. "Software Complexity." Crosstalk, Journal of Defense Software Engineering 7, 12 (December 1994): 5-9.

► [7]

Thomas Reese. “The Application of the theory of Physical Measurement to Measurement of Psychological Magnitude with three experiments”. Psychological Monographs. Vol. 55:3, 251, 1943. pp. 6-20. ► [8] E. J. Weyuker, “Evaluating software complexity measures,” IEEE Trans. Software Eng., vol. 14, pp. 1357-1365, Sept. 1988. ► [9] H Zuse, “Software Complexity: Measures and Methods”, Walter de Gruyter, Berlin, 1990.

Questions

►Thank

You For Your Time

Related Documents

Weyuker Properties
December 2019 10
Properties
May 2020 28
Properties
July 2020 30
Nyc Properties
June 2020 8
Tea Properties
May 2020 17

More Documents from ""

Erasmus 2
November 2019 11
Weyuker Properties
December 2019 10