Approximate Bisimulation and Optimization of Software Programs Based on Symbolic-Numeric Computation

To achieve behavior and structure optimization for a type of software program whose data exchange processes are represented by nonlinear polynomial systems, this paper establishes a novel formal description called a nonlinear polynomial transition system to represent the behavior and structure of the software program. Then, the notion of bisimulation for software programs is proposed based on the equivalence relation of corresponding nonlinear polynomial systems in their nonlinear polynomial transition systems. However, the exact equivalence is too strict in application. To enhance the flexibility of the relation among the different software systems, the notion of approximate bisimulation within a controllable error range and the calculation algorithm of approximate bisimulation based on symbolic-numeric computation are given. In this calculation, an approximate relation is represented as a MAX function that is resolved with the full filled method. At the same time, the actual error is calculable. An example on a multithreading program indicates that the approximate bisimulation relation is feasible and effective in behavior and structure optimization.


Introduction
With the development of computer software technology and the increase in user requirements for the function of software programs, the structure and behavior of software programs have been growing more and more complex.This change will make the design and property verification processes increasingly difficult.However, if we can achieve a method that can optimize the behavior and structure, then this accomplishment will most likely make a significant difference.
In the process of achieving this method, establishing a formal description is a prerequisite of researching the behavior and structure of the software program.The previous formal descriptions of the software programs are discrete concurrent systems, which are composed of abstract behaviors, discrete states, and transitions between states [1][2][3][4][5].These descriptions are good at calculating and reasoning against programs that are based on ergodic states.Nevertheless, they cannot successfully express the data exchange processes of the software program.The representations of data exchange processes are diverse for example, they can be described by a polynomial algebraic system, a semialgebraic system, a differential algebraic system, and a differential semialgebraic system [6][7][8][9].Among these systems, research on a particular type of software program whose data exchange processes can be described by polynomial algebraic systems can form a basis for researching other types of programs.Thus, we will study this type of software program first.For a polynomial algebraic system, its representation can also be divided into several different types, for example, a homogeneous linear polynomial system, a nonhomogeneous linear polynomial system, or a nonlinear polynomial system, among others.The software programs that have different behavior and structure correspond to different types of polynomial systems and optimization methods.We have already studied the descriptions of one type of software program, whose data exchange processes can be described by linear polynomial systems, and one type of high-level datapath system, whose data exchange processes can be expressed by nonlinear polynomial systems, and these are referred to as a linear polynomial transition system and a polynomial transition system, respectively [10,11].These descriptions are a basis for proposing an appropriate description of the type of software programs that are researched in this paper, whose data exchange processes can be expressed by nonlinear polynomial systems.
In addition to the above prerequisite, to define and determine the behavior equivalence relation for programs is another precondition to obtain behavior and structure optimization.With equivalence, the equivalent nondeterministic branches are removed, and the complex branch is replaced with a simpler branch.Two software programs are behavior equivalent representations that have the same function.To evaluate equivalence, bisimulation is the best behavior equivalence relation that we can utilize today [12,13].If two or more software programs are bisimular, then the solutions of the polynomial systems of their corresponding branches in their transition systems are the same.Based on the nature of bisimulation, researchers have already used it to optimize the design and verification of complex systems, such as hybrid systems and dynamical systems [14,15].We have also chosen it to process software programs that are represented by linear polynomial transition systems.For the type of software program researched in this paper, this type of equivalence theory will be established.
Exact equivalence can achieve behavior and structure optimization, but this type of equivalence is too strict to be a good solution for programs in which there are errors in the applications.Take a square with side length 1, for example; the length of its diagonal line is √ 2. Because √ 2 is an irrational number, strictly speaking, we can only make the length of the diagonal line approximately be equal to √ 2. Therefore, there exists an error.For this type of application, exact equivalence is not practical.To strengthen the flexibility of the equivalence relation for different systems, an approximate equivalence within a controllable error range is a good solution.Thus far, approximate bisimulation has been established and applied to optimize the task of property verification for hybrid systems and dynamical systems [16][17][18].For software programs that are represented by linear polynomial transition systems, the corresponding approximate relation has been given.Unfortunately, this calculation of an approximate equivalence relation cannot be applied to process the types of software programs that are researched in this paper.
For the calculation of approximate equivalence, symbolic-numeric computation can provide us with technical support [19,20].The fact that two software programs are approximate means that the solutions of the polynomial systems of the corresponding branches in their transition systems are approximately the same.It also means that the solutions of one system can make another system approximately be equal to zero.This relationship can be expressed as a constrained global optimization, which is called the MAX function in this paper.In the existing literature, there are many different methods that can be used to solve this constrained global optimization.Among these methods, the full filled method proposed by Ge [21][22][23] is one of the most widely used.Based on this author's studies, researchers perform some related research and made some improvements [24,25].We will use the full filled method in the literature [26] because it has fewer unknown parameters.With this method, the value of the exact error caused by an approximation can be computed.
In the next section, we provide a new formal description, called a nonlinear polynomial transition system, which is used to describe the behavior and structure of the type of software program whose data exchange processes are represented by nonlinear polynomial systems.In Section 3, we give the notion and algorithm of bisimulation after analyzing the condition of equivalence for these software programs.Based on this relation, the notion and the calculation of the algorithm for approximate bisimulation are described in detail in Section 4. The approximate relation is expressed as a constrained global optimization called the MAX function, which is solved by the full filled method.In Section 5, an example of a multithreading program shows that our approach obtains three useful results, which are listed as follows.The last section presents our conclusions.
(i) The data exchange processes of software programs are described.
(ii) The equivalence and approximate relations are determined for software programs based on symbolicnumeric computation.
(iii) The behavior and structure optimization for the software program are achieved.

Nonlinear Polynomial Transition System
The definition of a nonlinear polynomial transition system is introduced in this section.This definition is used to describe a type of software program whose data exchange processes can be represented by nonlinear polynomial systems.This nonlinear polynomial transition system is composed of states and transitions, which provide us with a supportive framework to research the behavior and the structure of software programs.A transition that is expressed by a nonlinear polynomial system shows a part of the data exchange process.A function is a transition.The statements between two functions can also be considered to be transitions.
First, we must establish a transform rule between a part of the data exchange process and a nonlinear polynomial system, which is established as follows.
Algorithm 1.The transform rule between a part of the data exchange process of a software program and a nonlinear polynomial system.
Input: A part of the data exchange process within a software program.
Output: A nonlinear polynomial system.
Step 1.If there are many assignment statements that assign values to the same variable and that variable does not appear on the right side of the assignment statements, then remove the assignment statements except for the last one.Step 2. Change the symbols of the variables on the left side of the assignment statements by adding intermediate variables after Step 1.
Step 3. If a variable on the right side of the assignment statements is the same as a variable on the left side of the assignment statements before Step 2, then change the symbol of the variable on the right side of the assignment statements with the symbol of the variable on the left side of the last assignment statement after Step 2.
Step 4. Add the assignment statements into NLPS after being processed by Steps 1, 2, and 3.
Step 5.For the conditional statements, if there are variables that were assigned before them, then first change the symbol of these variables with their symbols on the left side of their last assignment statements after Step 2, respectively; then, add these conditional statements into NLPS.Otherwise, add the conditional statements into NLPS directly.
In NLPS, the variables are temporary variables if they can be eliminated.The remainders are global variables, which play an important role in judging the equivalence relations of the software programs.Based on this transform rule, the notion of a nonlinear polynomial transition system for software programs can be given as follows.
Definition 2. A nonlinear polynomial transition system is a tuple ⟨, , ,  0 , V 1 ⟩ that includes (i) a set  of variables, including temporary variables and global variables; (ii) a set  of states, which are the values of the variables in ; (iii) a set  of transitions; each of the transitions is a tuple ⟨ 1 ,  2 , NLPS, V 0 ⟩: (a)  1 and  2 are the pre-and postglobal states of a transition; (b) the transition relation NLPS is a nonlinear polynomial system; (c) V 0 represents the global variables of this transition; (iv)  0 is the initial state of this software program; (v) a set V 1 of global variables; the form of V 1 can be defined as follows: where  1 is a set of global input states and  2 is a set of global output states.
To describe the transform process between a software program and a nonlinear polynomial transition system clearly, an example is given in Figure 1.The value of  0 is given in advance.
With this transform process, we discover that the behavior and structure of a software program are successfully expressed by a nonlinear polynomial transition system, which can also be represented by a transition graph.Compared with the description of a software program language, the forms of a transition system and transition graph are more direct.Moreover, based on the transform process, the behavior equivalence relation between two data exchange processes of software programs can be described by Definition 3. Definition 3. The data exchange processes ⟨ 11 ,  12 , NLPS 1 , V 01 ⟩ and ⟨ 21 ,  22 , NLPS 2 , V 02 ⟩ of a software program are equivalent; if NLPS 1 and NLPS 2 have solutions in Q, V 01 and V 02 are the same, then there is where 22 , the variables that correspond to  1 and  1 are the same, and the variables that correspond to  2 and  2 are the same.Q is a rational number field.
Within this definition, stating that the solutions of two nonlinear polynomial systems are the same implies that their corresponding data exchange processes in a software program are behavior equivalent.
After determining the relation for two data exchange processes, how to establish the definition of behavior equivalence for the whole software program must also be researched because there could be many layers and many branches in the same layer in a software program.

Bisimulation for Nonlinear Polynomial Transition Systems
In process algebra, equivalence verification is one of the most important parts and bisimulation is the finest equivalence semantic that can provide the most exact equivalence relation for systems.With equivalence determination, the extra transitions, called nondeterminism, can be removed and a complex branch can be replaced with a simple branch.

The Definition of Bisimulation.
Let there be two nonlinear polynomial transition systems: The global state sets of them are where the symbol   represents the th branch of the th layer in   .The sets of nonlinear polynomial systems of  and  can also be given as follows: Then,  and  are bisimular, with the notation  =  .
Where  1 ∈  1 ,  2 ∈  2 ,  1 ∈  1 ,  2 ∈  2 , the variables that correspond to  1 and  1 are the same, and the variables that correspond to  2 and  2 are the same.
With this definition, we can determine whether there is a bisimulation relation or not between two software programs.If two software programs are bisimular, then their transition systems are bisimular.This fact also means that if there exists a transition for one, there exists the same transition for another and vice versa.This statement represents that the solutions are the same for the polynomial systems of the corresponding branches in the nonlinear polynomial transition system for the software program as well.Therefore, the bisimulation relation between software programs has the following nature.

Theorem 5. The bisimulation relation for nonlinear polynomial transition systems exists.
(i) Reflexivity:  =  , if there is a nonlinear polynomial transition system .
Proof.(i) For reflexivity: the behavior and structure of  are the same as itself; thus,  =  .
(ii) For symmetry: if  =  , then the corresponding branches of  and  are equivalent, which implies that the corresponding branches of  and  are equivalent; thus,  =  .
(iii) For transitivity: if  =  , then the corresponding branches of  and  are equivalent.
If  =  , then the corresponding branches of  and  are equivalent.Therefore, the corresponding branches of  and  are equivalent, which can be expressed with the notation  =  .
Thus, the bisimulation relation between the software programs is an equivalence relation.

The Calculation of Bisimulation.
After obtaining the definition of behavior equivalence for a software program, we must establish a method for determining whether the solutions of two nonlinear polynomial systems are the same or not.For the type of software programs studied in this paper, Ritt-Wu's method [27] can be used to determine this solution relation.Theorem 6.If   and   are the same, then the solutions of  and  are the same, which means that  and  are equivalent.
Proof.Because   and   are the same, then the initials   and   are the same, which correspond to   and   , respectively.At the same time, The irreducible characteristic set of a polynomial system is unique; thus, there is Then,  and  are equivalent where  and  are nonlinear polynomial systems.  = [ 1 , . . .,   ] and   = [ 1 , . ..,   ] are the irreducible characteristic sets of  and , respectively.Here,   and   are the solutions of  and , respectively.
Therefore, a unique condition that is used to determine the solution relation of the nonlinear polynomial systems is obtained.
This determination in the equivalence relation is based on symbolic computation.From analysis, we discover that numerical computation can also be used in this process, because if the solutions of the two polynomial systems are the same, then the solutions of one system can make another system be equal to zero.In other words, if we change one system into a special formula, the solutions of another system can approximately make the maximum value of this formula be equal to zero.This process can be considered to be a constrained global optimization.Because there are approximate processes while we are addressing this constrained global optimization problem, we will therefore implement this process in the next section.

Approximate Bisimulation for Nonlinear Polynomial Transition Systems
Exact equivalence requires that the solutions of two polynomial systems must be identical, which appears to be too restrictive and not practical for some software programs.An appropriate approximation within a controllable error range can be a good solution for addressing this issue.By approximation, different software programs might be changed into approximately the same program.Then, the simpler programs can be used to approximately replace the complex programs.Therefore, behavior and structure approximate optimization can be achieved.
where  1 ×  Then,  and  are approximately bisimular, with the notation  =  .
Where  1 ∈  1 ,  2 ∈  2 ,  1 ∈  1 ,  2 ∈  2 , the variables that correspond to  1 and  1 are the sam, and the variables that correspond to  2 and  2 are the same.
For two different nonlinear polynomial systems, the error between them can be calculated by the function norm.For the nonlinear polynomial transition system researched in this paper, there are always many branches and layers; thus, a measurement rule for the exact error must be given.
Step 1.For different branches in the same layer, compute the errors of every two of them first.Then, choose the largest one as the error in that layer.
Step 2. For the whole nonlinear polynomial transition system, compute the error of every layer with Step 1; then, the total error of the system is found by taking the sum.
With the previous definition, software programs that are approximately bisimular are those for which the solutions of the polynomial systems of the corresponding branches in their nonlinear polynomial transition systems are approximately the same.In other words, if we change a nonlinear polynomial system into a special formula, the solutions of another system can make the maximum value of this formula approximately be equal to zero.This process can be considered to be a constrained global optimization and its description is given as follows.
Given two nonlinear polynomial systems, as follows: Then, change them into two constrained global optimizations, called MAX functions, as follows which can also be expressed as follows: The results of these two constrained global optimizations fall into three categories.
(i) If the two maximum values are equal to zero, then the two nonlinear polynomial systems are equivalent.Thus, the determination of bisimulation between two nonlinear polynomial transition systems in Section 3.2 can be solved based on numerical computation.(ii) If the two maximum values are not more than the precision, then two nonlinear polynomial systems are approximate.Therefore, the determination of approximate bisimulation between two nonlinear polynomial transition systems is achieved.(iii) If one of the two maximum values is more than the precision, then two nonlinear polynomial systems are not approximate.
The maximum value can be achieved by the full filled method.In this process, the maximum number of iterations and the step length of variables must be given in advance.

The Calculation of Approximate Bisimulation.
For a software program, we hope to optimize its behavior and structure through approximately optimizing its formal description; this approach is called a nonlinear polynomial transition system with approximate bisimulation.
When the variables of the corresponding branches in polynomial transition system are the same, the framework of approximate bisimulation of a software program contains four parts: (i) change the software program into a nonlinear polynomial transition system; (ii) group the corresponding branches of the transition system; (iii) determine the relations of corresponding branches by symbolic-numeric computation; (iv) achieve the behavior and structure optimization by reducing the equivalent or approximate branches for the given program.
The detailed computation algorithm of approximate bisimulation is shown as follows, which is described in Figure 2. The merger of J w and U form the new i th group.
Let the numer of branches of this group be a, with b = 2.
i ∈ 0, Algorithm 9.The calculation algorithm of approximate bisimulation for the nondeterministic branches of a software program based on symbolic-numeric computation.
Input: A software program expressed by a nonlinear polynomial transition system.
Output: An optimized software program for the given software program.
Step 1. Change the software program into a nonlinear polynomial transition system.Let  be the precision.Group the corresponding branches with bisimulation relations.Suppose that the number of groups is .We are given a counter  that starts with  = 1.
Step 2. Process the th group.Let the precision   in this group belong to the following: Step 3. Choose Ritt-Wu's method and the MAX function to determine the relation of each of the two branches in this group.
Step  Step 4.1.Let  = .Choose an appropriate element from  and   to replace them.Let the symbol of this element be   .
Step 4.2.The merger of  and   forms a new group, which is to be considered as the new th group.Let the number of branches of this new group be , with  = 2.If  > 2, then go to Step 4; otherwise, go to Step 5.
Step 5. Increment  with  + +; if  ≤ , then go to Step 2; otherwise, end.A new polynomial transition system is achieved, which also means that a new optimized software program is got.This algorithm gives a method to optimize the behavior and structure of a software program with approximate bisimulation.
If there are several different software programs, then we must know how to implement the determination of an approximate bisimulation for them.
The framework of approximate bisimulation of different software programs contains five parts: (i) optimize software programs by Algorithm 9 respectively; (ii) consider the optimized programs to be the nondeterministic branches of a new program; (iii) group the corresponding branches of the new program; (iv) determine the relations of corresponding branches by symbolic-numeric computation; (v) get the behavior and structure optimizations for the given programs by equivalence.
The detailed algorithm is also given as follows and is described by Figure 3.
Algorithm 10.The calculation algorithm of approximate bisimulation for software programs based on symbolic-numeric computation.
Input: Different software programs that are represented by nonlinear polynomial transition systems.
Output: Optimized software programs for the given software programs.
Step 1. Get the approximately optimized software programs for the given software programs by Algorithm 9.Then, consider these approximately optimized programs as the nondeterministic branches of a new software program.
Step 2. Group the corresponding branches of this new program.Let the number of groups be  and use a counter  that starts with  = 1.
Step 3. If there are equivalent branches in the th group as determined by Ritt-Wu's method or the MAX function, then go to Step 4. Otherwise, go to Step 6.
Step 4. Choose the simplest one of them to replace them.
Step 6. End.Achieve the last optimized software programs of the given programs.

Example Verification and Results
In this section, a multithreading program is used to demonstrate the efficiency of approximate bisimulation in the behavior and structure optimization of software programs.

Example Verification.
The multithreading program is represented in Algorithm 1.
Let  = 0.1.The maximum number of iterations is  = 10 and the step length of variables is  = 0.5 in the full filled method.The recommended values of the variables are in the range from −1 to 1.
Step 1.With the substitution rules and transform rules, change the multithreading program into a nonlinear polynomial transition system, as shown in Figure 4.
Step 2. Because the variables of the corresponding branches are the same, there is a need to determine whether there is an equivalence or approximate relation or not of the corresponding polynomial systems in the multithreading program, which is accomplished as follows: Step 2.1.For {NLPS 1 , NLPS 2 }: Ritt-Wu's method is applied to verify the relations.Then, we achieve the irreducible characteristic sets as follows: The irreducible characteristic sets are equivalent.Moreover, the behavior of NLPS 2 is simpler; thus, the branch that corresponds to NLPS 2 can be used to replace and merge the two branches that correspond to NLPS 2 and NLPS 1 .
First, Ritt-Wu's method is applied to determine the relation for {NLPS 3 , NLPS 5 }.Then, we can obtain the irreducible characteristic sets: Therefore, they are equivalent.The behavior of NLPS 5 is simpler; thus, the branch that corresponds to NLPS 5 is used to replace and merge the two branches that correspond to NLPS 5 and NLPS 3 .
For NLPS 4 and NLPS 5 , the MAX function is chosen to determine the relation for them.
Step 2.2.1.With the full filled method, calculate min −(3 The results are showed in Table 1.
In this process, the solutions of the objective function are the same when  = 3 and  = 5.The solutions will be duplicated from  = 5; thus, the trend in the objective function will become smooth.Then, the result of max ((3 is 0.0096.
Step 2.2.2.With the full filled method, calculate min −( The results are showed in Table 2.
In this process, the solutions will be duplicated from  = 1.Thus, the trend in the objective function becomes smooth.The result of max √ ( is 0.01.The above two maxima are less than the precision; therefore, NLPS 4 and NLPS 5 are approximate.The branch that corresponds to NLPS 5 can replace and merge the branches that correspond to NLPS 3 , NLPS 4 , and NLPS 5 .
First, the Ritt-Wu's method is applied to verify the relation for NLPS 6 and NLPS 7 .Then, we obtain the irreducible characteristic sets as follows: Therefore, NLPS 6 and NLPS 7 are equivalent.Because NLPS 6 is simpler, the branch that corresponds to NLPS 6 is used to replace and merge the two branches that correspond to NLPS 7 and NLPS 6 .
For NLPS 8 and NLPS 9 , the MAX function is used to determine the relation for them.
The results will be duplicated from  = 2.At this point, the trend in the objective function becomes smooth.Thus, the result of is 0.011.
Step 2.3.2.With the full filled method, calculate The results are showed in Table 4.There are duplicate minimums when  = 1 and  = 2. Thus, the trend in the objective function becomes smooth.Then, the result of max √ ( 2  1 − (0.01 1 + 1)  1 ) is 0.011.The precision of this layer is 0.7 − 0.01 ≈ 0.69.The achieved two maxima are less than this precision; thus, NLPS 8 and NLPS 9 are approximate.The branch that corresponds to NLPS 8 is used to replace and merge the two branches that correspond to NLPS 8 and NLPS 9 .
Therefore, the first maximum of is 1.95, which is more than the precision in this layer; thus, NLPS 8 and NLPS 6 are not approximate.
Step 2.4.By analysis, the transition graph in Figure 4 is turned into a new transition graph, which is shown in Figure 5, and the optimized multithreading program for the given multithreading program in Algorithm 1 also can be expressed in Algorithm 2.

Results
. By the example verification in this section, many advantages of our method are achieved.
(i) Achieve a formal description: software programs are represented by nonlinear polynomial transition systems and transition graphs that contain states and transitions, such as in Figures 4 and 5.With these descriptions, all of the data exchange processes, the behavior, and the structure of the software program are described more directly.
(ii) With Ritt-Wu's method and MAX function, the equivalence and approximate relations are determined for the software program based on symbolic-numeric computation.
(a) With Ritt-Wu's method and MAX function, the equivalence and approximate relations are expressed by the "standard forms" and "constrained global optimizations" without calculating the exact values of the states of the software programs.The traditional method must know the exact values of the inputs and outputs to determine the relations for the different software programs.Unfortunately, the exact values of the variables of a software program always exist in a range so that the traditional method will cost too much computing time.Thus, our method is more flexible and effective.(b) Based on these relations, the behavior and structure optimization of software programs are achieved and are compared, whereby Figure 4 is compared with Figure 5 and Algorithm 1 is compared with Algorithm 2. For example, the number of branches in Algorithm 1 is 9 and the number of branches in Algorithm 2 is 4. (c) Because the states and branches of the software programs are reduced with these relations, the number of feasible paths for the software program is decreased; therefore, the "state explosion" problem can be alleviated in the property verification and the occupancy factor of having a deadlock becomes small.
(iii) The value of the behavior and the structure optimization of the software program is divided into two parts, as follows.
(a) Behavior optimization: for example, for {NLPS 1 , NLPS 2 } in Figure 4, NLPS 1 is replaced by NLPS 2 in Figure 5.If we allow the inputs of the software programs that correspond to NLPS 1 and NLPS 2 to be equal to 0.0, and let the step length of variable in this process be equal to 0.00005, then the computing costs are 6.789 s and 4.878 s when calculating the same outputs, respectively.Therefore, the simpler the behavior is, the smaller the computing cost.The solutions of the variables and the computing costs of the software programs are given in Table 6.(b) Structure optimization: for example, the set {NLPS 1 , NLPS 2 , NLPS 3 , NLPS 4 , NLPS 5 } in the given nonlinear polynomial transition system is reduced to two branches {NLPS 11 , NLPS 12 } in the approximate system.If we let the initial inputs of NLPS 1 and NLPS 11 be equal to 0.01 in the programs that correspond to {NLPS 1 , NLPS 2 , NLPS 3 , NLPS 4 , NLPS 5 } and {NLPS 11 , NLPS 12 } and let the step length of variable in this process be equal to 0.00005, then the computing costs are 12.041 s and 9.678 s when calculating the approximate outputs of the software programs, respectively.Thus, the fewer the number of branches that are present, the lower the computing cost.The solutions of the variables and the computing costs of the software programs are given in Table 6.
(iv) The approximate bisimulation in this paper can also be used to process the type of software programs whose data exchange processes are expressed by linear polynomial systems [11].
(a) In the calculation algorithms for approximate bisimulation for linear polynomial transition systems, the entire process is a linear computation that is based on the properties of the matrix in paper [11].However, the whole process in determining the approximate bisimulation relation of the software programs is a nonlinear computation in this paper because the MAX function is applied to compute the value of the errors caused by the approximation.Therefore, the computing process in [11] requires less time and is more effective than the calculation proposed in this paper for linear polynomial systems.
(b) Unfortunately, the method in [11] cannot be applied to process the nonlinear polynomial system researched in this paper because the property of the matrix cannot describe the solutions' relations of the nonlinear polynomial systems.

Conclusions
In this paper, we propose a nonlinear polynomial transition system to describe the type of software program whose data exchange processes are expressed by nonlinear polynomial systems.Then, a novel calculation of an approximate bisimulation is provided to achieve the behavior and the structure optimization for the software programs, based on symbolicnumeric computation.The advantages of our approach are verified and listed in Section 5.
Except for those advantages that are achieved by our approach in this paper, on the one hand, how to improve the efficiency of symbolic-numeric computation is a substantial challenge.This goal will be researched in our future work.On the other hand, the numbers of the states and branches of the software program are reduced due to the behavior and the structure optimization.How to apply these circumstances to optimize the property verification of the software program based on the state, such as safety verification, is also a major direction for our research in the future.
Choose Ritt-Wu's method and MAX function to determine the relation of each of two branches Errors equal to 0 Choose an appropriate branch to replace all branches in this group Label branches from be 1 to a branches for transition system.Suppose the number of groups is m.Use a counter i that starts with Process the i th group; let the precision in this group belong to Errors are not more than  i Determine the relation between the b th branch J b and other branches from the b + 1 th to the a th.Select the branches to form a set A except for the b th branch if error is more than  i .The remaining branches except for the b th branch form a set B Set U = A. Choose an appropriate branch J w from B and J b to replace them

Figure 2 :
Figure 2: Approximate bisimulation for the nondeterministic branches of a software program.
4.1.The Definition of Approximate Bisimulation.Suppose that there are two nonlinear polynomial transition systems.The descriptions of the variables of these two systems are the same as the descriptions in Section 3.1.The data exchange processes ⟨ 11 ,  12 , NLPS 1 , V 01 ⟩ and ⟨ 21 ,  22 , NLPS 2 , V 02 ⟩ of a software program are approximate; if NLPS 1 and NLPS 2 have solutions in Q, V 01 and V 02 are the same, and  ≤ , then there is 2 ∈  11 ×  12 ,  1 ×  2 ∈  21 ×  22 , the variables that correspond to  1 and  1 are the same, and the variables that correspond to  2 and  2 are the same.Here,   (9) represents that  and  are the approximate solutions of NLPS with an error .Here,  is the exact error and  is the precision.This definition shows that two data exchange processes are approximate if the solutions of their corresponding nonlinear polynomial systems are approximate.Based on this definition, the approximate relation for the entire software program can be given as follows.Definition 8.A binary relation R  ⊆   ×   is called an approximate bisimulation; if V 11 and V 12 are the same, NLPS 1Alm and NLPS 2Blg have solutions in Q,  = , and  ≤ , then, for all ( 1 ×  1 ) ∈ R  , there are (i) ∀ 1  ()  2 ; then,  1 =  ()  1 ∪  1 ,  2 =  ()  2 ∪  2 , and  2 R   2 . ()  2 ; then,  1 =  ()  1 ∪  1 ,  2 =  ()  2 ∪  2 , and  2 R   2 .
represents that we place  into  to form a new  with an error .Then, NLPS   → If the errors are not more than   , then these branches are approximate.Then, choose an appropriate branch to replace them and go to Step 5. Otherwise, go to Step 3.3.Step 3.3.Let the number of branches be , and label them from 1 to  Initiate a counter  at  = 1 and go to Step 4.Step 4. Determine the relation between the th branch and the other branches from the ( + 1)th to the th branch.Let the symbol of the nonlinear polynomial system that corresponds to the th branch be   .Let 3.1.If irreducible characteristic sets are the same and the errors are equal to zero, then these branches are equivalent.Choose the simplest branch to replace them and go to Step 5. Otherwise, go to Step 3.2.Step 3.2. −  +2     , . . .,   =       −       .(14) Select   except for   to form a set  when the errors are larger than   .The remainder except for   forms a set ; go to Step 4.1.