Научная статья на тему 'Fundamentals of software stability theory'

Fundamentals of software stability theory Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
61
10
i Надоели баннеры? Вы всегда можете отключить рекламу.

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Dmitry A. Maevsky

The theoretical fundamentals of software stability were elaborated on the basis of software dynamic theory. The concepts of internal and external equilibrium have been introduced and the condition of reliability has been proved. The law of defect flow equilibrium has been formulated. The existence of unknown before mutual dependences among the defect flows in software has been revealed.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Fundamentals of software stability theory»

FUNDAMENTALS OF SOFTWARE STABILITY THEORY

Dmitry A. Maevsky •

Odessa National Polytechnic University, Odessa, Ukraine e-mail: Dmitry. A.Maevsky@gmail. com

ABSTRACT

The theoretical fundamentals of software stability were elaborated on the basis of software dynamic theory. The concepts of internal and external equilibrium have been introduced and the condition of reliability has been proved. The law of defect flow equilibrium has been formulated. The existence of unknown before mutual dependences among the defect flows in software has been revealed.

1 INTRODUCTION

Methods of mathematical modeling are widely used to determine the software systems (SS) reliability. The objective of software reliability modeling indexes is the assess of the amount of defects left in the system and forecasting of time and dynamics of their detection. This task is not new. But methods of its solving cannot be considered to be thoroughly studied. Thus, for example, the authors (Kharchenko 2004) note "It should be emphasized that so far the theory of software reliability cannot be regarded as an established science ....the existence of considerable discontinuity between theory (mathematical models and methods) and practice."

Theory of software systems dynamics (SSD), as it is shown in (Maevsky 2011) and (Maevsky at al. 2012) and confirmed in practice (Maevsky 2012), allows to eliminate this gap and make the first step to approach the science of software reliability to the definition "established science".

In the SSD theory the process of defect detection in SS and introduction of new secondary defects in it are regarded as the interaction process of two flows. The first outgoing flow removes the defects from the system; the second - incoming - brings the secondary defects in it.

Due to the existence of two oppositely directed defect flows in SS the detailed study of this influence and phenomena accompanying flows is vital. This article is thus devoted to the above study.

2 PHASE TRAJECTORIES OF DEFECTS. STATE OF EQUILIBRUM

As shown in (Maevsky at al. 2012), the behavior of SS from the point of view of appearance and development of defect flows is described by dynamic system (1):

f = - Ai • fi - A2 • f dt

df2

(1)

dt

= - A2 • fi - Ai • f2

To research the behavior and quality analysis of dynamic system of SS, specified by the equations (1), let's set up its phase trajectory (phase plane).

Definition 1. Let state vector of SS be vector

u = ( fiJi), (2)

where f1 and f2 are state variables at a point in time t.

Definition 2. Let's consider the space state (phase space) to be the subset X = U cR+ with coordinates (2), where R+ = (NgR : N > 0}.

Each phase trajectory corresponds to the definite particular solution of the system (1) on the definite initial conditions. In case of SS and defect flow research, the values f1 and f 2 determining the number of defects of incoming and outgoing flows, should be chosen as the coordinates of phase space. To build up the phase trajectories of SS, it would be necessary to obtain the dependency f2(f1). Differential equation, binding f2 with f1, can be received from the system (1), dividing the second equation by the first. We obtain:

f = A2 • fl + A1' f2 (3) df1 Ai • fi + A2 • f2 .

Herewith it is taken into account, that in accordance with (Maevsky at al. 2012),

fl = Fo • eA1t • chAt) f2 =-Fo • eA • sh(A2t).

Taking into consideration these correlations, the equation (3) can be rewritten as following:

df2 _A2 • chA2t + A1 • shA2t

df1 A1 • chA2t + A2 • shA2t'

By dividing nominator and denominator of this fraction by A1 ^ 0 and introducing coefficient k=A2/A1 we obtain:

df2 k • chÄ2t + shÄ2t dfi chÄ2t + k • shÄ2t

(5)

The equation (5) represents the linear non-homogenous differential equation, which includes time t on its right side. After accomplishing the numerical solution we get phase plane of SS, see Figure 1.

Figure 1. Phase trajectories of SS

Phase plane is built up for SS with the following characteristics: number of defects at t=0 - F0 = 100, coefficient value A1 = 0,01day-1, coefficient k is changed from 0 to 1.1.

Let's clarify the formation of phase trajectories. The pair of values (f1, f2) corresponds to each point on the trajectory (generating point). Movement of generating point occurs from the initial state (with t^0) to its end state (with t^x>). In our case, the initial point on the X-axis corresponds to the initial state f1 = F0, f2 = 0. The generating point moves from right to left (shown by arrows, see Figure 1).

It can be seen in the picture, that at k < 1 all trajectories converge to equilibrium whereby the speed of flow changes become equal to 0. To this state correspond the equilibrium of SS, when the defects are absolutely absent in it, what leads to the absence of flows. In Figure 1 the point (0,0) corresponds to this state.

With k = 1, i.e. in case of intensity equilibrium of incoming and outgoing flows the generating point moves from right to left along the straight-line segment (f is equal to f2 in each of its points). The system reaches the equilibrium state and zero speed of flow changes at the finishing point of this straight line. This point has coordinates - f1=F0/2, f1=F0/2, i.e. at achieving this value by amount of introduced and eliminated defects the flows stop changing.

In case k > 1 the generating point moves along phase trajectory tending to infinity. However, thus, as we can see in Figure 1, first the point comes to the straight line f1 = f2. The number of the defects in the system will be growing continuously and the flow change speed will never achieve zero. At the same time analyzing Figure 1 we can draw even more important conceptual conclusions.

Conclusion 1. All phase trajectories tend to the strait linef1 = f2, i.e. with the time the number of defects brought into the system equalize with those taken out of the system. It can be said, that SS acquires internal equilibrium with time among the flows existing in it. After achieving equilibrium the two flows become the same both in amount of defects, forming the flow, and in the speed of flow changes in time. The appearance of equilibrium has been unknown before and needs though studying.

Conclusion 2. There are points in the phase plane of SS, where the software system itself as a whole achieves equilibrium with its external environment: the flows stop changing. Such points we will call the states of external equilibrium. According to the theory of dynamic systems (Samoilenko 1989), these points are called stationary. The stationary point with k < 1 is the origin of coordinates. Herewith the steady state (recall the transient processes) of SS will be considered to be the achievement of its equilibrium with the surrounding medium (object area), i.e. absolute absence of defects in SS.

With k = 1 the stationary point, corresponding the intensity of direct and reversed flows, appears as well. Besides, as it has been said, this conclusion absolutely corresponds to the expected result. Unlike both examined cases when k > 1, i.e. with the exceeding of intensity of incoming flow over the outgoing one, the stationary points are not observed. Thus phase curves extend at infinity, what corresponds to the expected results. Nevertheless, let's turn our attention to the fact, that SS first achieve the state of equilibrium, and after that both flows simultaneously extend to infinity. It gives ground to suggest that achievement of internal equilibrium state is the necessary condition for all SS in any correlations between incoming and outgoing flows. Let's prove this assumption.

3 INTERNAL EQUILIBRUM OF SOFTWARE SYSTEM

In the process of research of SS internal equilibrium phenomenon it is necessary to answer the following questions:

1. Will any SS always achieve the internal equilibrium state?

2. Is the internal equilibrium steady?

3. At what point of time the internal equilibrium will appear with the given SS parameters?

Before considering these questions let's give a formal definition to the internal equilibrium

state.

Definition 3. The internal equilibrium of SS will be refered to as the establishment of equilibrium between incoming and outgoing flows in it, whereby their intensity and number of defects coinside.

While answering the first question we should determine whether the internal equilibrium phenomenon is random or it is common to all software systems. The existence of the internal equilibrium phenomenon for any SS is proved in the theorems 1 and 2.

Theorem 1. (First theorem of equilibrium). There exists such value of time, that for all t > t the condition \f1(t) - f2(t)\ < d holds for no matter how small d.

Proof of theorem 1. Taking into consideration that the remainder f1(t) - f2(t) is taken modulo, we should pay attention to probable correlations between values f1(t) and f2(t). First it should be noted that in the expressions (4) the product A2t is always positive. Therefore we can state, that chA2t > shA2t wherefrom f1(t) > f2(t). With such correlation modulus \f1(t) - f2(t)\, according to modulus property can be changed for the remainder f1(t) - f2(t). On this basis let's form the equation:

fl(t) - f2(t) -e = o. (6)

The theorem will be proved, if the value t = t satisfying the equation is found. Using the expressions (4), the equation (6) can be rewritten as:

F0 • e-A1t • [ch(A2t) - sh(A2t)] - e = 0.

Disclosing the hyperbolic functions after transformations we get

F0 • e+ A2)'t =e . (7)

The equation (7) is solvable related to t with any positive s. In fact, after taking the logarythm we obtain:

~{Al + Ä2 )• t = ln-

F10

Whence we have the value t = t :

In —

t ^"T^V. (8)

Ai + A2

The "minus" sign on the left part (8) results from the statement that whatever smallest value £ < F0, therefore ln(£ /F0) < 0. Thus the value t = t' exists and with t > t' the left part (8) will become less than £.

The theorem 1 is proved.

To consider the intensity of flows let's analyze theorem 2.

Theorem 2. (The second theorem of equilibrium) There exists such value of time t" that for all t > t'

dfl df2

dt dt

is fulfilled for any whatever smallest values £.

<s

8

Proof of the theorem 2. While proving theorem 2, taking into consideration the property of remainder modulus as well as in the previous theorem proof, all possible cases should be observed.

First, it should be noted that the equilibrium state between the flaws is possible only when their intensities (speed changes in time) have similar signs. The equilibrium is not possible, when one flow is increasing and the other one is decreasing.

Secondly, it is necessary to consider separately the possible correlations between speed changes of the flows, i.e. the case, when

dfx

or case when

dt

dfx

dt

>

<

df2

dt

df2

dt

Therefore, let's consider this two cases.

Case 1. Herewith, as it is resulted from the modulus properties, remainder modulus can be changed by the common difference

df1 df2

dt dt

df1 df2

dt dt

Taking into account (4) we'll obtain

dfi _ f dt dt

= ^xo ■ e_

(_ Ax ■ chA2t _ A2 ■ shA2t + vAx ■ shA2t + A2 ■ chA2t

Fx

xo ■ e-Ax'

AxeA2f _ Axe"^ _ A2e^ + A2e_^ + AxeA2t _ Axe_A2t + A2eA2t + A2e_A2t

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

or:

f _ f = Fx0 ■ e"Axt ■ (2 ■ A2e_^ _ 2 ■ Axe_A2' ). dt dt 2 v 2 11

From this we can obtain equation:

Fxo ■(A2 _ Ax)■ e"^x + A2* =s .

(9)

With A2 > Ai the value t satisfying this equation exists, with the increase of t the left part becomes smaller than e. For the case 1 theorem 2 is proved. Case 2. For this case

f > 0.

df2

> 0.

dt dt

Herewith it follows from the modulus properties that

dfx

dt

<

df2

dt

df1 df2

dt dt

df2 dfx

dt dt

Taking into consideration (4) we obtain:

dt dt

df2 dfx F _Axt (Ax ■ CA + A2 ■ ShA2t _ ---— = Fxo ■ e x ■

Ax ■ shA2t _ A2 ■ chA2t

2

or after transformation of similar mentioned in case 1:

F10 •(A1 - A2)• e"(A1 +A2* = e.

(10)

With A2 > A1 the value t satisfying this equation exists, with the increase of t the left part becomes smaller than e. For the case 2 theorem 2 is proved. Case 3. For this case:

f < 0,

dt

dfi dt

< 0,

dfi

dt

>

df2

dt

With such correlation the remainder modulus can be changed for

dfi df2 dfi df2

dt dt dt dt

Taking into consideration (4) we get:

dfi df2

dt dt

= F

10

Ät f A1 • chÄ2t + A2 • shA2t • e 1 •

A1 • shÄ2t - A2 • chÄ2t y

or after transformations

F10 •(Ai -A2)• e+Ä2* =s.

(11)

The expression (11) is identical to that received in case 2, expression (10), but only with A1 > A2. It means that with any correlations between A1 and A2, the value t, satisfying this correlation exists; besides with the increase of t the left part becomes smaller than e. For the case 3 theorem 2 is proved.

Case 4. For this case

f < 0.

dt

dh dt

< 0,

df

dt

<

df2

dt

Therewith, proceeding form modulus properties, it can be rewritten as

With the regard to (4) we obtain

dfi df2 df2 df

dt dt dt dt

df df

dt dt

= F10 •e "

At f A2 • chA2t + A1 • shA2t A2 • shA2t - A1 • chA2t

or after transformations:

(12)

F10 •(A2 -A1 )• e"(A1 +A* = e. The expression (12) is identical to the obtained one in case 1, expression (8), but with A2 > A1.

It means that with any correlations between A1 and A2, the value t satisfying this equation exists, besides with the increase of t the left side becomes smaller than e. For the case 4 theorem 2 is proved.

Thus, in all possible cases there exists such value t, which satisfy the equation

df± - f dt dt

moreover with the increase of time t the left part becomes smaller than e. The theorem 2 is proved.

Let's consider the question of stability of internal equilibrium state. It should be found out whether SS can spontaneous come out of balance. If the answer is positive, it means that internal equilibrium is a temporal event. At a certain time it is reached, but subsequently the system comes out of the condition itself and the flows cease to be concerted. If the equilibrium state is stable, the

= s,

system cannot come out of it itself and the flows constantly remain concerted. They either decrease to zero or increase infinitely synchronously.

Stability of internal equilibrium state is proved by the theorem 3.

Theorem 3. (Third theorem of equilibrium). Internal equilibrium phenomenon is stable with all influence coefficient meanings

Proof of the theorem 3. Assume that the internal equilibrium isn't stable. It means that after obtainment the same number of defects of incoming and outgoing flows at the moment of time t with t > t the equilibrium will be disturbed, i.e. with t > t fl(t)>f2(t). Inequality of defects number of both flows after achieving equilibrium is possible, only if the speed changes of incoming and outgoing flows differ. But it comes into conflict with theorem 2, which proves the speed equality of flow changes after achievement of internal equilibrium. Supposition is not true, therefore, theorem 3 is proved.

Thus, the stability of SS internal equilibrium state is proved. Let's define the time, at which the system achieves this condition. For this purpose we will use the results, received while proving theorems 1 and 2.

The time value, whereby the software system achieves the state of equilibrium of defects number is determined by the expression (8). In practice, taking into consideration the fact that the defect number can always be a whole number, we can assume that £ = i, i.e. it corresponds the least

distinguished number of defects. Than we obtain from (8):

'• = ^ (»)

Ai + A2

To determine the time at which the equlibrium reaches the flow speed, let's use the formulae (9) and (10). The formula (9) can be used with correlation of infuence coefficients A2 > Al. Here the time, necessary to achieve the speed equilibrium is defined as:

In-,--

t' = - (A - A1 )• F0 . (14)

Ai + A2

When analysing the equation (8) it was assumed that £ = i, as the number of defects can only be a whole number. For analysis and interpretation (14) it is necessary to assess the possible value £ in this equation. For this purpose, let's refer to the system (1) and define the intensity of both flows with t = 0 for initial conditions fl(0)=F0 and f2(0)=0

dfx

dt

= A ■ F

0 ■

df2

dt

= A2 ■ Fo.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Therefore, with the absolute error not more than 1/F0, we can take s = A2 - A].. With such meaning s (14) can be rewritten as:

''=A*Fr <15>

A] + A2

Comparing (13) and (15) we can state that t = t i.e. both conditions of internal equilibrium are achieved simultaneously. We can come to the same conclusion, analyzing the case A1 > A2..

Theorems 1 and 2 state that the inevitability of appearance of internal equilibrium is achieved simultaneously. It gives grounds to formulate the law of flows equilibrium in the software systems.

Law of flows equilibrium. In any software system input and output flows always achieve the internal equilibrium. The time of achievement the internal equilibrium is directly proportional to the initial number of defects and inversely related to sum of influence coefficient.

Thus, to summarize the obtained results, we can state that the condition of internal equilibrium is inherent to all software systems and is stable. Such conclusions of SS dynamics theory are new and require the detailed study and experimental validation.

4 EXTERNAL EQUILIBRUM AND STABILITY OF SOFTWARE SYSTEM

The phase trajectories of SS contain important information about their asymptotic conditions, on the basis of which we can deduce the concept of external equilibrium.

Definition 4. As external equilibrium position of SS (stationary points) we will take such points of phase space u =f , f2 ), that:

A ■ f + A2 ■ f* = o < .

. A ■ fi* + Ai ■ f* = 0

It is evident that u* is the system (1) solution with

du o dt

Definition 5. The external equilibrium position of SS can be defined as stable, if for any s > 0 there exist such S > 0, that for any u0 , |u0 - u |< d the inequality \u(t,u0) - u |< S is satisfied with all t > 0.

Definition 6. The external equilibrium position of SS can be defined as asymptotic stable if during fulfillment of conditions of the definition 5, the condition \u(t,u0) - u | — 0 is additionally satisfied with all t — o.

Let's consider the external equilibrium position of SS, which dynamics is defined by the equation (1). The software system comes into the state of external equilibrium with its surrounding medium (object domain), when the defect flows stop varying in time. It's noteworthy, that the equivalence to zero of only speed of flow changes is mentioned here. The values f1 and f2 themselves in the general case can be other than zero. Only in the particular case, when k < 1, we obtain at the limit f1 = 0 and f2 = 0.

In the theory of dynamic systems the so-called stationary (exceptional points) correspond the external equilibrium. Therefore the terms "external equilibrium point" and "stationary point" will be further used as synonyms.

The conditions of appearance in the external equilibrium system are formulated in theorem 4.

Theorem 4. (The fourth theorem of equilibrium). Provided that A1 > A2, the software system acquires stable asymptotic state of external equilibrium.

Proof of the theorem 4. From the equations (1) for external equilibrium state let's note down:

Mi ■ f1 - A2 ■ f2 = 0. (16)

[- A2 ■ f - A1 ■ f2 = 0

With A1 > A2, determinant of this system is det A = A12 - A22 > 0. Thus the system (16) can have only one solution f = f2 = 0, which corresponds the equilibrium state.

Let's prove the asymptotic reliability of this solution. To do this we consider the matrix of the system (16)

m, = - A - A

- A - A

and find its eigenvalue from the correlation:

X2 + 2• Al-X + A12 -a| = 0.

Solving this equation we obtain eigenvalue

Xi =-A + A2, X2 =-A1 - A2.

According to Lyapunov theorem (Samoilenko 1989) a stationary point is asymptotically stable, if all eigenvalues have negative sign of real part. Root of X2 will be negative with any values of A1 and A2. The negative value of Xl is possible only if Al > A2.

Theorem 4 is proved.

Theorem 5. (The fifth theorem of equilibrium). Provided that Al = A2 the software system acquires the stable external equilibrium.

Proof of the theorem 5. With Al = A2 determinant of the system (16) is det A = Al2 - A22 > 0, thus this system can have infinite number of solutions. But taking into consideration the physical meaning, with equality Al and A2, we obtain the solution to each equation only withfl = - f2.

Theorem 5 is proved.

The minus sign in front of f2, as we have seen, denotes the reverse direction of flows. At the same time, the total number of defects, contained in SS, as it was shown in (Maevsky at al. 2012), is always equal to fl + f2. This fact allows to define the position of external equilibrium point with Al = A2. Consider SS with t = 0. At this point in time fl + f2 = F0, whence it follows that fl = f2\ = F0 / 2. Thus, the external equilibrium with Al = A2 is achieved at the level of half of initial number of defects in the software system. The state of equilibrium in this case is stable.

It is interesting to research the SS reliability with Al < A2.With such correlation of influence coefficients the determinant of matrix system (16) det A = Al2 - A22 < 0, that states for the existence of one equilibrium position. Eigenvalues of matrix IIAII, in this case Xl > 0, X2 < 0 according to (Samoilenko 1989), corresponds to the unstable point of "saddle" type.

The possible types of software system equilibrium positions are presented in the table 1.

Table 1. Possible types of equilibrium positions of a software system.

Correlation Al and A2 Position type

More defects are removed than inserted Ai > A2; X1 < 0,X 2 < 0 Stable node

More defects are inserted than removed Ai < A2 ; X1 > 0,X2 < 0 Saddle

The same number of defects is removed and inserted Ai = A2; X1 = 0,X2 <0 Stable node

5 CONCLUSIONS

In the article the SS phase plane is researched and the questions of reliability are considered. From the phase trajectories behaviour it was concluded about the existence of internal equilibrium in SS, when the same number of defects is removed and inserted and the speeds of their changes within the time are the same. The law of flows equilibrium is formulated. The possibility of existence of internal equilibrium state and necessity for its achievement by the system are proved by a number of theorems.

One of such regularities is formulated in the law of flow equilibrium. The other very important regularity can be seen in the SS phase plane (1). This regularity becomes apparent in the increase of the number of secondary defects in the system. Indeed, it results from Figure 1, that with A1 > A2, even with steady decrease of defects number of the outgoing flow, the number of secondary defects in the system increases attains a maximum and only then, starts to decrease. The SS testers should consider this fact.

The mentioned dependences allow to predict the time interval, where there is an increased risk of inserting the secondary defects, and to take appropriate measures for their reduction.

6 REFERENCES

Kharchenko V.S., Sklar V.V., Tarasyuk O.M. (2004). Methods for modelling and evaluating the quality and reliability of the programming security. Kharkov: Nat. Aerospace Univ. "HAI" Maevsky D.A. (2011). Dynamics of programming systems and their reliability models. Radio-electronic and computer systems. No. 2: 45-54.

Maevsky D.A., Maevskaya H.D., Leonov A.A. (2012). Software reliability. Non probabilistic approach. Reliability: Theory & Applications. Electronic Journal. Vol.7 No. 3: 8-20 Maevsky D.A. (2011). Reliability modeling in dynamics of programming systems theory. Radio-electronic and computer systems. No. 4: 147-153

Samoilenko A.M. Krivosheja N.A., Perestuk C.A. (1989). Differential equalizations: examples and tasks. Studies manual. Moskow: Higher school: 383.

i Надоели баннеры? Вы всегда можете отключить рекламу.