Formula of Software Defect Number

ZHANG Kai Computer Department Zhongnan University of Economics and Law No.114, Wu Luo Road, Wuhan 430064 P.R.China

Tel: 86-27-88077521, Fax: 86-27-88061125

Abstract: Complexity will be the science of the 21st Century. Chaotic theory as a part of complexity science gave Chaotic Logistic Population Model it describes the relation of predator-prey in a common resource. But the model cannot be used under the non-chaotic condition. So this paper will focus on the design of a new formula, which can be employed under both chaotic and non-chaotic condition. However, it only is the result of tentative and theoretic exploration and needs to be studied further, especially used in actual works and cases.

Key Words: Software defect, Evolution, Ecology, Chaos, Population increasing rate, Environmental factors, Limiting factors, Ecological factors, Dissipative structure

must be made from the point of view of complexity. 1 Introduction Prof Stephen Hawking has said, "Complexity will be The biologist Robert May published his Chaotic the science of the 21st Century."[2] Logistic Population Model [1] in the Nature in 1976. As a better tool, recently, many researchers have Mathematically this can be written as achieved good results with the aid of chaotic fractal theory as a part of complexity science. The x  4x (1 x ) (1) n1 n n researched results mainly were in the field of graphics and circuit, but some start to explore the where  [0,1], x [0,1]. It gave the dynamic issue of software quality by the method of chaotic mathematical relation of predator-prey for common theory [3] [4]. The two papers gave exploration for resource. the prediction of software failure by the time series In fact, the equation (1) is also used in the field of method of chaotic theory. software for computing the number of software This paper is the theoretic exploration of software defects despite of it being the relation of predator- defect number formula and divided into four major prey, where the reviewers are predators and the sections. Section one opens with introduction. The software defects are preys. second section is the related concepts and formulas. However, software defect system is a complex one In Section three, the author give a new formula to and its behaviors are of quite complexity. These are describe the software defect number of the n th the inevitable outcome of longtime evolution. For the generation after the analysis of defect growing law, reason, the discussion or research to the problem and make the comparison of Chaotic Logistic Population Model with it. And the summary and  The author wishes to express his most sincere conclusion is given in the last section. appreciation to Prof. XIONG Qian-xing as his teacher in School of Computer, Wuhan University of Technology, who gave him advice and great help. 2 Related Formula Of Population Increase Rate [5][6] limiting factor to the population density. First of all, the section will introduce several often- Theoretically speaking, the influence from the seen concepts in order easily to read the following resistance to the organism population may change so contents. A population is a set of organism in a given that its final defect total rather than its birthrate also area, and population increase rate is the ratio of may change with the resistance. For this, organism number increasing or reducing to time. And environmental maximum limit k may is defined as Population density is the number of organisms per maximum density of being able to accommodate the unit area. population. 2.1 Not Limiting Condition If population density is very small or N  0 , Let the population increase rate of a unit time or there is no competition for resources among twinkling of an eye be r and population density be organisms and the resistance or limit to population N, then the difference equation of population density density can be ignored, so that the population may change is: increase approximately by exponential rate or J- dN shape curve. With increase of population density,  rN (2) dt however, environmental resistance is larger and larger. If N  k or population density is close to Its solution is N  N  e rt , where N is the t 0 0 environmental limit k , population increase rate r may be controlled totally by the environmental organism population density at beginning and N is t resistance and the population density can not the population density after time t. If r  0 , the increase any longer or hardly stop. In other words population density will infinitely increase by the dN →0 or r  0 if N  k . Such a process may exponential way, and the relation between N and t dt is J-shape curve shown in Figure 1(a). It is pity that be described by S-shape curve rather than J-shape the relation is in the absence of the consideration of one shown in Figure 1(b) where k is the asymptote environmental factors. And it is unreal and of population density N . The difference equation at unacceptable obviously. present is dN k  N  rN( ) (3) dt k N N The France mathematician Overhauls initiated the k above equation (3) in 1839. And Pearl discovered the law, which population increase rate is the inverse function of population density and the result was the N0 same as Verhulst did, in1920. Afterward, the t t equation was called Verhulst-Pearl Logistic one, (a) (b) which is the foundation of relative model among Figure 1. Population density curve more than two populations. And the American ecologists Lotka and Volterra designed the dynamic 2.2 Limiting Condition mathematical model of population density under the The natural resources are limited and all of the condition two populations struggle against the same organism populations may share them in the resource based on the Logistic equation and the meantime. Hence they may become the factors of dynamic population model of predator-prey relations limiting population growing or not being able to in 1926. And then the Australian entomologist built increase unlimitedly. Actually, Ecology gave the the mathematical model of host-parasite relations in definition of environmental resistance, which is the 1935. In addition, in real environment, ecologists still discovered that the actual curve often like one of the M1 two pictures in Figure 2(a)(b), which often conform M 2   N 2i (4), to objective reality, rather than like the S-shape curve i1 in Figure 1(b). where integer N 2i  0 is the defect sum of the i th ramification. N N The defect sum of the third is

M 2

M 3   N3i (5), i1 t t (a) (b) where N3i  0 is the defect sum of the i th one. Figure 2. S-shape curve in real environment …… The defect sum of the n th is

M n1

3 Formula of Software Defect Number M n   N ni (6), For easily understanding to the below formula, some i1 concepts needs to be defined firstly. A software where N  0 is the defect sum of the i th one. defect population is a set of defect in a given area, ni and software defect increasing rate is the ratio of software defect increasing or reducing to time. And 3.2 Software Defect Number Under Real software defect density is the defect sum per unit Condition environment. 1. Analysis of Real Condition 3.1 Software Defect Number Under Ideal However, the real environmental condition is Condition different from the above theoretic supposition, Figure 3 shows the process of software defect growth because there always is the interference with and bifurcation under the unlimited condition. software defect system from man and its external environment, and they may influence on the survival rate of software defects and make it less than the

The nth layer above theatrical estimation. From Figure 3, it is easy to get Figure 4 (in the last part). The 3th layer Similarly to the six phases of software

The 2th layer development, software defects may be classified into six kinds as shown in Figure 4. Bottom-to-top is a process from requirement to maintenance, and left- The 1th layer Figure 3. Software Defect Layers to-right is the six kinds, which are the defects of requirement, system design, detail design, programming, testing and maintenance, where

Suppose the software defect sum of the first (R11 ⋯Ri1 ⋯Rn1 ) is all defects in requirement, (S ⋯S ⋯S ) is all defects (including requirement generation is M  N . We have the below formula: 12 i2 n2 1 11 phase, namely, defect sum of two phases) in system

The defect sum of the second one is design, (D13 ⋯Di3 ⋯Dn3 ) is all defects (including former two phases, namely, defect sum of three phases) in detail design, (P ⋯P ⋯P ) is all defects 14 i4 n4 2. Formula (including former three phases) in programming, At a moment, software defects generally is certain

(T15 ⋯Ti5 ⋯Tn5 ) is all defects (including former four and less than the above theatrical estimation. According to the above formula (4)-(6) and the phases) in detail design, (M ⋯M ⋯M ) is all 16 i6 n6 analysis here, we can have the real software defect defects (including former five phases) in sum formula: maintenance. The real software defect sum of the second It is sure that software defects are disturbed by generation is external factors, owing to the fact that growth of M1 ' software defects is the developing process of being M 2  ( N 2i )  D2 (7) limited and diffused. And the greater external i1 pressure is, the less software defects are. Concretely where integer N  0 is the defect sum of the speaking, there may be less software defects 2i distributed in the area if there is greater pressure ith ramification and D is the number of the killed or from external environment; but there may be more 2 software defects distributed in the area if there is limited defects in the second generation growing smaller pressure from external environment. All in process. all, the existence of external resistance will make the The real defect sum of the second is total number decrease. M 2 ' Software defect increase has two ways, sexual M 3  ( N 3i )  D3 (8) propagation and asexual one. The growing process is i1 difficult for all of the software defects for their where N  0 is the defect sum of the ith one children will meet selection, competition, man’s 3i interference, and environmental limit. The former is and D is t the number of the killed or limited the complicated combination of two defects and their 3 children are discovered hard so that they are killed defects in the third. uneasily. The later is a process of self-decomposition …… that inherits all nature of mother, so genes of The real sum of the n th is “children” through sexual propagation are as quite M n1 ' same as those of their mother. This is the weakness M n  (  N ni )  Dn (9) of asexual propagation, because all of children have i1 the same nature. All could be found and killed if one where N  0 is the defect sum of the ith one defect was discovered. ni The relation between reviewers and software and D is the number of the killed or limited defects defects is a negative-positive feedback cycle, and the n results of their interaction may make the software in the ith one. defects decrease. Software defects drop if reviewers increase, and vice versa. The relation will trend a 3.3 Discussion To formula Application stable condition or come to a relative balance The process of everything increasing or growing is through a series of fighting process. But such a peace the ones of the negative-positive feedback between may be broken at any time for a new factor except the internally growing force and externally limiting them in the environment changes. All in all, this is a environment. At beginning, environmental resistance stable-unstable cycle. is small while internal force is weak as well, so growth is slow. With greater interaction and more defect sum of the i th ramification and D is the negative-positive feedback, rapid growth starts; in n the meantime environmental resistance become so number of the killed or limited defects in the n th greater and greater that growth is decelerated but not generation growing process. The formula can be used stop. The entire growing process has to stop if the to all of the above three conditions, stable growing process accumulates to some level and development condition, periodic change condition, or condition does not maintain the further increase. At chaotic condition. Compared with the formula (1) the time, the thing may be near its end. Generally only used for chaotic condition, it can be employed speaking, the ending ways have three ones including: for all the conditions. from-fluctuation-to-stable-change, from-fluctuation- But there is the weakness in the formula (9) to-periodic-change, or turning-to-chaotic-condition because it is difficult to count up the number of [7][8]. killed defects for the real number of software defects. The process of software defect growing also is the This paper only gives the theoretic exploration. The ones of the negative-positive feedback between author wishes that the formula could be used in internally growing force and externally limiting practical work and developed further. environment. But the author believes that the entire This paper is the beginning work on his way in the process may be one of the above three ways. To field of Complexity Science and the deeper analyze the detail, software process may be divided researches for the software defects will be made on into the six phases, which are the preparation one, the combination of principal of entropy increase, the requirement, the design, the coding, the testing, dissipative structure theory, chaos, fractal, and the maintenance. Through the careful hypercycle, synergetics, catastrophe theory, and observation of the entire software process from the biology, especially evolution. many experiments the author joined in, it can be discovered that the processes between two phases often are in the stable-development or periodic- Reference change condition, and the processes of transitional [1] May, R.M. [1976], "Simple mathematical models phases of two phases mostly are in chaotic-condition. with very complicated dynamics", Nature 261, Theses phenomena often exist in software process. It 459-467. may be known from the above analysis that software [2] http://complexity.orcon.net.nz/history.html defect increase may be paroxysmal chaos. At the [3] Zhou Fengzhong, Li Chuan-Xian, A Chaotic Model time, the formula (1) can be used. Or the formula (1) for Software Reliability, Chinese Journal of cannot be employed to non-chaotic-condition. But Computers, 24(3), (2001), 281-291(in Chinese). the formula (9) can be used to all of the above three [4] Voas, Jeffrey, Can chaotic methods improve conditions. software quality predictions? IEEE Software v 17 n 5 Sep 2000. 20-22 [5] Sara Stein, The Evolution Book, Workman Publishing; September 1, 1986 4 Summaries and Conclusions [6] Stephen Webster, The Kingfisher book of evolution, This paper gives a new formula New York : Kingfisher, 2000.

M ' [7] Liu Hong, On the spontaneous fractal growth in n1 ' , the real number of the n th science Evolution,Studies in Science of Science, M n  (  Nni )  Dn i1 1998, 12:19-24 (in Chinese). [8] Liu Hong, Li Biqiang, Research and application of generation software defects, where N  0 is the ni Fractals in Natural growth Process, Science and Technology Review, 1996, 10:21-24(in Chinese). [12] Brian Kaye, Chaos & complexity : discovering the [9] Gleick, James, Chaos : making a new science, surprising patterns of science and technology, Viking, 1987 Weinheim ; New York : VCH, c1993 [10] Gregory L. Baker and Jerry P. Gollub. Chaotic [13] ZHANG Kai, XIONG Qian-xing, A dynamics : an introduction, 2nd ed.; Cambridge CONTROL PROCESS DESIGN FOR University Press, 1996. SOFTWARE QUALITY BY CHAOTIC- [11] Crownover, Richard M. Introduction to fractals FRACTAL, Proceedings of The 23th IASTED and chaos, Jones and Bartlett, c1995. International Conference on Modelling, Identification, and Control, Feb. 23-25, 2004, Grindelwald, Switzerland

M-line Maintenance

T-line Test

P-line Program

D-line Detail Design

S-line System Design

R-line Requirement

R11…Ri1…Rn1 S11…Si1…Sn1 D11…Di1…Dn1 P11…Pi1…Pn1 T11…Ti1…Tn1 M11…Mi1…Mn1

Figure 4. Defect bifurcation kinds [13]