Table of Contents Author Guidelines Submit a Manuscript
Mathematical Problems in Engineering
Volume 2013 (2013), Article ID 421926, 19 pages
http://dx.doi.org/10.1155/2013/421926
Research Article

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

1School of Computer and Information Technology, Beijing Jiaotong University, Beijing 100044, China
2Guangxi Key Laboratory of Hybrid Computation and IC Design Analysis, Guangxi University for Nationalities, Nanning, Guangxi 530006, China

Received 9 April 2013; Revised 6 August 2013; Accepted 7 August 2013

Academic Editor: Yang Xu

Copyright © 2013 Hui Deng and Jinzhao Wu. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

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.

1. 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 [15]. 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 [69]. 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 . Because is an irrational number, strictly speaking, we can only make the length of the diagonal line approximately be equal to. 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 [1618]. 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 [2123] 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 symbolic-numeric computation. (iii)The behavior and structure optimization for the software program are achieved.

2. 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 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 :(a) and are the pre- and postglobal states of a transition;(b)the transition relation is a nonlinear polynomial system; (c) represents the global variables of this transition;(iv) is the initial state of this software program; (v)a set of global variables; the form of can be defined as follows: where is a set of global input variables and is a set of global output variables. The layer number of the nonlinear polynomial transition system is . If we consider every nonlinear polynomial transition system to be a tree, then the layer number is considered to be the depth of the tree. Every bracket represents the set of global input or output variables of one branch in this layer.
Corresponding to the form of , we can give a definition of a set of global states : where is a set of global input states and 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 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.

421926.fig.001
Figure 1: Transform process.

Definition 3. The data exchange processes and of a software program are equivalent; if and have solutions in , and are the same, then there is(i), , , and ,(ii), , , and ,where , , the variables that correspond to and are the same, and the variables that correspond to and are the same. 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.

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

3.1. 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: where the symbol represents the th branch of the th layer in .

Definition 4. A binary relation is called bisimulation; if and are exactly the same, and have solutions in , and , then, for all , there are(i), , , , and ,(ii), , , , and .
Then, and are bisimular, with the notation .
Where , , , , the variables that correspond to and are the same, and the variables that correspond to and 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 .(ii)Symmetry: , if .(iii)Transitivity: , if and .

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.

3.2. 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. and 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.

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

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.

Definition 7. The data exchange processes and of a software program are approximate; if and have solutions in , and are the same, and , then there is(i), and , then, , .(ii), and , then, , ,where , , the variables that correspond to and are the same, and the variables that correspond to and are the same. Here, represents that we place into to form a new with an error . Then, represents that and are the approximate solutions of 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 is called an approximate bisimulation; if and are the same, and have solutions in , , and , then, for all , there are(i), , and ; then, , , and .(ii), , and ; then, , , and .
Then, and are approximately bisimular, with the notation .
Where , , , , the variables that correspond to and are the sam, and the variables that correspond to and are the same.
Here, represents the error between and .
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.

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

421926.fig.002
Figure 2: Approximate bisimulation for the nondeterministic branches of a software program.

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 .
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 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. 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 and go to Step 4.
Step 4. Determine the relation between the th branch and the other branches from the th to the th branch. Let the symbol of the nonlinear polynomial system that corresponds to the th branch be . Let 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.
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 . If , 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.

421926.fig.003
Figure 3: Approximate bisimulation for software programs.

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 .
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 5. Increment with ; if , then go to Step 3. Otherwise, go to Step 6.
Step 6. End. Achieve the last optimized software programs of the given programs.

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

5.1. Example Verification

The multithreading program is represented in Algorithm 1.

alg1
Algorithm 1: Multithreading program.

Let . The maximum number of iterations is and the step length of variables is 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.

421926.fig.004
Figure 4: Transition graph.

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 : 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 is simpler; thus, the branch that corresponds to can be used to replace and merge the two branches that correspond to and .
Step 2.2. For .
First, Ritt-Wu’s method is applied to determine the relation for . Then, we can obtain the irreducible characteristic sets:
Therefore, they are equivalent. The behavior of is simpler; thus, the branch that corresponds to is used to replace and merge the two branches that correspond to and .
For and , the MAX function is chosen to determine the relation for them.
Step 2.2.1. With the full filled method, calculate
The results are showed in Table 1.
In this process, the solutions of the objective function are the same when and . The solutions will be duplicated from ; thus, the trend in the objective function will become smooth. Then, the result of is 0.0096.
Step 2.2.2. With the full filled method, calculate
The results are showed in Table 2.
In this process, the solutions will be duplicated from . Thus, the trend in the objective function becomes smooth. The result of is 0.01.
The above two maxima are less than the precision; therefore, and are approximate. The branch that corresponds to can replace and merge the branches that correspond to , , and .
Step 2.3. For .
First, the Ritt-Wu’s method is applied to verify the relation for and . Then, we obtain the irreducible characteristic sets as follows:
Therefore, and are equivalent. Because is simpler, the branch that corresponds to is used to replace and merge the two branches that correspond to and .
For and , the MAX function is used to determine the relation for them.
Step 2.3.1. With the full filled method, calculate
The results are showed in Table 3.
The results will be duplicated from . 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 and . Thus, the trend in the objective function becomes smooth. Then, the result of is 0.011.
The precision of this layer is . The achieved two maxima are less than this precision; thus, and are approximate. The branch that corresponds to is used to replace and merge the two branches that correspond to and .
Step 2.3.3. For and , calculate
The results are showed in Table 5.
Therefore, the first maximum of is 1.95, which is more than the precision in this layer; thus, and 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.

tab1
Table 1: Results.
tab2
Table 2: Results.
tab3
Table 3: Results.
tab4
Table 4: Results.
tab5
Table 5: Results.

alg2
Algorithm 2: Approximate multithreading program.

421926.fig.005
Figure 5: Approximate transition graph.
5.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 in Figure 4, is replaced by in Figure 5. If we allow the inputs of the software programs that correspond to and 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 in the given nonlinear polynomial transition system is reduced to two branches in the approximate system. If we let the initial inputs of and be equal to 0.01 in the programs that correspond to and 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.

tab6
Table 6: Results.

6. 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 symbolic-numeric 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.

Acknowledgments

This work was supported by the Natural Science Foundation of Guangxi under Grant nos. 2011GXNSFA018154 and 2012GXNSFGA060003, the Science and Technology Foundation of Guangxi under Grant no. 10169-1, and Guangxi Scientific Research Project no. 201012MS274.

References

  1. E. M. Clarke, E. A. Emerson, and A. P. Sistla, “Automatic verification of finite-state concurrent systems using temporal logic,” ACM Transactions on Programming Languages and Systems, vol. 8, no. 2, pp. 244–263, 1986. View at Google Scholar · View at Scopus
  2. R. van Glabbeek and U. Goltz, “Equivalence notions for concurrent systems and refinement of actions,” in Mathematical Foundations of Computer Science, vol. 379 of Lecture Notes in Computer Science, pp. 237–248, Springer, Berlin, Germany, 1989. View at Publisher · View at Google Scholar · View at MathSciNet
  3. M. Nielsen, “Models for concurrency,” in Mathematical Foundations of Computer Science, vol. 520 of Lecture Notes in Computer Science, pp. 43–46, 1991. View at Google Scholar
  4. T. A. Henzinger, “The theory of hybrid automata,” in Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science, pp. 278–292, 1996.
  5. R. Milner and D. Sangiorgi, “Barbed bisimulation,” in Automata, Languages and Programming, vol. 623 of Lecture Notes in Computer Science, pp. 685–695, 1992. View at Publisher · View at Google Scholar · View at MathSciNet
  6. Z. Manna and A. Pnueli, Temporal Verification of Reactive Systems: Safety, Springer, New York, NY, USA, 1995.
  7. S. Sankaranarayanan, H. B. Sipma, and Z. Manna, “Non-linear loop invariant generation using groebner bases,” ACM SIGPLAN Notices, vol. 39, no. 1, pp. 318–329, 2004. View at Google Scholar · View at Scopus
  8. Y. H. Chen, B. C. Xia, L. Yang, N. J. Zhan, and C. C. Zhou, “Discovering non-linear ranking functions by solving semi- algebraic systems,” in Proceedings of the Theoretical Aspects of Computing (ICTAC '07), vol. 4711 of Lecture Notes in Computer Science, pp. 34–49, 2007.
  9. V. P. Mysore, Algorithmic algebraic model checking: hybrid automata and systems bilogy [Ph.D. thesis], New York University, New York, NY, USA, 2006.
  10. H. Deng, J. Z. Wu, and N. Zhou, “Approximate equivalence and optimization for high-level datapath,” Journal of Information and Computational Science, vol. 8, no. 16, pp. 4131–4142, 2011. View at Google Scholar · View at Scopus
  11. H. Deng and J. Z. Wu, “On approximate bisimulation equivalence for linear semi-algebraic transition systems,” Journal of Jilin University, vol. 43, no. 4, pp. 1052–1058, 2013. View at Google Scholar
  12. R. J. Van Glabbeek, “The linear time-branching time spectrum,” in Proceedings of the Theories of Concurrency: Unification and Extension (CONCUR '90), vol. 458 of Lecture Notes in Computer Science, pp. 278–297, 1990.
  13. K. G. Larsen and A. Skou, “Bisimulation through probabilistic testing,” Information and Computation, vol. 94, no. 1, pp. 1–28, 1991. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  14. G. J. Pappas, “Bisimilar linear systems,” Automatica, vol. 39, no. 12, pp. 2035–2047, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  15. A. J. van der Schaft, “Equivalence of dynamical systems by bisimulation,” Institute of Electrical and Electronics Engineers, vol. 49, no. 12, pp. 2160–2172, 2004. View at Publisher · View at Google Scholar · View at MathSciNet
  16. A. Girard and G. J. Pappas, “Approximate bisimulations for nonlinear dynamical systems,” in Proceedings of the 44th IEEE Conference on Decision and Control, and the European Control Conference (CDC-ECC '05), pp. 684–689, December 2005. View at Publisher · View at Google Scholar · View at Scopus
  17. A. A. Julius, “Approximate abstraction of stochastic hybrid automata,” in Hybrid Systems: Computation and Control, vol. 3927 of Lecture Notes in Computer Science, pp. 318–332, Springer, Berlin, Germany, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  18. A. Girard and G. J. Pappas, “Approximate bisimulation relations for constrained linear systems,” Automatica, vol. 43, no. 8, pp. 1307–1317, 2007. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  19. H. J. Stetter, Numerical Polynomial Algebra, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, Pa, USA, 2004. View at Publisher · View at Google Scholar · View at MathSciNet
  20. D. Bates, C. Peterson, and A. J. Sommese, “A numerical-symbolic algorithm for computing the multiplicity of a component of an algebraic set,” Journal of Complexity, vol. 22, no. 4, pp. 475–489, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  21. R. P. Ge, “A filled function method for finding a global minimizer of a function of several variables,” Mathematical Programming, vol. 46, no. 2, pp. 191–204, 1990. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  22. R. P. Ge and Y. F. Qin, “A class of filled functions for finding global minimizers of a function of several variables,” Journal of Optimization Theory and Applications, vol. 54, no. 2, pp. 241–252, 1987. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  23. R. P. Ge and Y. F. Qin, “The globally convexized filled functions for global optimization,” Applied Mathematics and Computation, vol. 35, no. 2, pp. 131–158, 1990. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  24. X. Liu, “Finding global minima with a computable filled function,” Journal of Global Optimization, vol. 19, no. 2, pp. 151–161, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  25. L.-S. Zhang, C.-K. Ng, D. Li, and W.-W. Tian, “A new filled function method for global optimization,” Journal of Global Optimization, vol. 28, no. 1, pp. 17–43, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet
  26. Y. L. Zhang, The filled function method for solving constrained global optimization [Ph.D. thesis], Tianjin University, 2007.
  27. D. M. Wang, Selected Lectures in Symbolic Computation, Tsinghua University Press, Beijing, China, 2003.