Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
PROGRAM SLICING AND BAYESIAN NETWORK BASED METHOD OF DETERMINING FUNCTIONS TO BE CHANGED IN NEW VERSION OF SOFTWARE
Document Type and Number:
WIPO Patent Application WO/2020/036559
Kind Code:
A2
Abstract:
The invention is related to the estimation method of the functions to be influenced within the source code at the end of the version starting out with the changes made within the source code at the start of the study, in the software worked on for a new version.

Inventors:
UFUKTEPE EKINCAN (TR)
TUĞLULAR TUĞKAN (TR)
Application Number:
PCT/TR2019/050418
Publication Date:
February 20, 2020
Filing Date:
June 01, 2019
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
IZMIR YUEKSEK TEKNOLOJI ENSTITUESUE (TR)
International Classes:
G06F8/00
Attorney, Agent or Firm:
SADE DANISMANLIK PATENT ARGE HIZMETLERI TICARET LIMITED SIRKETI (TR)
Download PDF:
Claims:
CLAIMS

1. The invention is an estimation method of the functions to be influenced within the source code at the end of the version starting out with the changes made within the source code at the start of the study (before its half is completed), in the software worked on for a new version, characterized in that; it comprises the following process steps;

start of the method, continuing as two inputs in the 2nd and 3rd steps (1 ),

first input of the method, taking the final condition of the software as the input (including the last changes) (2),

second input of the method. , taking the previous version of the software as an input (3), creating the call graph of the functions over the information received from the 2nd step

(4),

call graph obtained at the end of the 4th step (5),

extraction of the changes that are made in the software by using the inputs received from the 2nd and 3rd steps (6),

function change information obtained from the 6th step (7),

creating the model defined as the“Change Effect Graph (9)” by using the information from the 5th and 7th steps (8),

“Change Effect Graph (9)” extracted at the end of the 8th step (9),

Running the program slicing method over the relations between the functions by using the information received from the 5th step (10),

information about the probability of the functions extracted at the end of the 10th step influencing each other (11 )

Controlling the“Change Effect Graph (9)” taken in the 9th step in terms of whether it is a loopless/acyclic graph or not (14);

if it is a loopless/acyclic graph then it continues to use the information received from the 9th step in 15th step,

if it is not a loopless/acyclic graph (14) then it continues from the 13th step for converting it into a loopless/acyclic graph (14) (12), converting the cyclic“Change Effect Graph (9)” of the 9th step into a loopless/acyclic graph (14) (13),

loopless/acyclic graph obtained at the end of the 13th step (14).

taking the loopless/acyclic graph (14) from the 9th or 14th steps and using the graph plan for Bayesian network, besides, using the impact probabilities of the functions received from the 11th step and change ratio received from the 7th step in coding the nodes of the Bayesian network (15),

information of the functions influenced from the change which is extracted at the end of the 15th step (16),

termination step of the method (17).

Description:
PROGRAM SLICING AND BAYESIAN NETWORK BASED METHOD OF DETERMINING FUNCTIONS TO BE CHANGED IN NEW VERSION OF SOFTWARE

Technical Field

The invention relates to the determination of the functions to be changed in the new version of the software to be developed by means of using Bayesian network and program slicing methods.

The invention is particularly related to the estimation of the functions to be influenced within the source code at the end of the version starting out with the changes made within the source code at the start of the study, in the software worked on for a new version.

Developing software is similar to construct a building. Releasing the next version of the software is like restoring an existing building. During this restoration a story can be added, the walls can be demolished for extending the rooms etc. However, every restoration may not come out well. The foundation of the building can be damaged during restoration. In the software, the properly operating portions can be damaged during similar next version release phase. In this invention, when the next version of the software is in a development phase, it is beneficial for detecting the possible influenced portions before half of it is not completed. When we consider the building example again, when we add a story to an existing building, before the half of adding story process is completed, we can determine which parts will be influenced from this change/restoration. For example, before the new story is completed, the change which will give damage to the foundation of the building is determined and it allows taking the required precautions.

State of the Art

Today, in software, the changes that are made while the next version is created, might affect the source codes that are written in the previous versions, and this can lead to failures in the subsequent phases. The software developers can fail to notice these influenced functions or make great effort for finding influenced functions. The most important thing is that the influenced functions can be determined near to the completion of the new version or at the end of the new version. Again, the invention numbered as “KR20110065056 (A)” and titled as,“ Method for analyzing change impact on a software process” with classification No“G06F19/00”, is related to an analysis method of a software process for treating the change of an event duration, a product and role aspects. Together with this invention, a process reliability model based on a multi-dimensioned reliability is created. The aspect to be changed is separated. The process slicing is executed by taking the process reliability model as the basis. The process slice of the element to be changed is determined as the part where the software process receives the impact.

The invention within the present state of the art numbered as“US2016170747” and titled as,“Impact prediction of software change deployment on customer systems” and with classification No“G06F9/445”, is related to the analysis of the expected impacts of a software change and usage frequency of the application features by the final user .

Again, the invention numbered as“CN104503917 (A)” and titled as“Method and system for analyzing change impact domain based on data flow function invoking path” and with classification No“G06F11/36”, discloses a method and a system for analyzing change impact domain based on data flow function invoking path. The method comprises the performance of static path analysis on each function in the source codes and the changed source codes in order to obtain the impact tree that corresponds to each function.

Aim of the Invention

In order to eliminate the disadvantages within the present state of the art, the aim of the invention is to determine all parts within the source code which will be influenced due to the last changes made by the software developers.

Another aim of the invention is to gain time in terms of providing a warning mechanism to the developers for preventing failure in the source codes in future and determining the influenced parts.

Another aim of the invention is to perform this at the beginning of the new(next) version study before the half of the study is not completed. Description of the Figures

Figure 1 is an example of“Call Graph of Making a Cake”,

Figure 2 is an example of Change Effect Graph Creation,

Figure 3 is an example“A Bayesian Network of a Fire System”,

Figure 4 is the flow chart subject of the inventive method.

Description of the Reference Numbers

Detailed Description of the Invention

The invention is a method of predicting functions that will be affected in the source code at the end of the release, based on the changes made in the source code at the beginning of the work in a software that is being worked on for a new version. The method is consisted of four steps which are required to be performed respectively. The invention consists of four steps in total. There are as follows;

1. Extraction of call graph (4),

2. Extraction of change information of the functions (6),

3. Developing the program slicing algorithm (10),

4. Integration of the Bayesian Networks (15).

1. Extraction of call graph (4);

Call graphs is a graph model which shows the relations between the functions. The functions can be considered as small programs within the software. All of these functions forms a software. There is a call relation between some functions. These call relations show that one function has connections with other functions. In other words, in order to allow a function to perform its task, other functions are required to be called at specific phases for producing something or for making a preliminary preparation. However, if a call graph (5) calls a few functions, it does not show in which sequence they are called. The call graph (5) shows which functions are called and the ones that are connected to. For example; when we define making a cake as a function as it is shown in Figure 1 , we have to call the functions such as adding the materials, mixing the materials during making a cake and putting the cake into the oven etc. , yet there may be other functions that are called by these called functions.

In our invention when we output the source codes of given software, we also output all relations thereof. Thus, when a change is made in a function then we can estimate which functions will be influenced from this change. When we consider Figure 1 and we change our“making a cake” function, from these change the“Placing the cake into the oven”,“Mixing the materials” and“gathering the Materials” can be affected directly. For example, if the recipe of the cake has changed, this can influence the period for gathering the materials, even it can also influence adding another material. However, sometimes the directions of the edges in the call graph (5) can be oriented incorrectly. For this reason by using the information about a function that is in relation to other functions, but adding the information which functions are changed, directions of some arrows in the call graph are changed, and it is converted from call graph to a “Change Effect Graph (9)”.

2. Extraction of change information of the functions (6); The change information of the functions are extracted by means of taking instant version of the software and the previous version of the software, the changes made in the meantime are extracted in connection with the number of lines on the source code for each function. The changes that are made comprise the updates/additions/exclusions that are made within the source code of the function. Total lines changed within the source code of the function are divided into the total source code lines of the function and thus the change ratio of a function is obtained. This change ratio has a significant contribution in the creation of Change Effect Graph (9).

While creating the Change Effect Graph (9), two information is used. These are the call graph (5) and the change information of the functions (7). As it is mentioned previously, Change Effect Graphs (9) first uses the call graphs (5) as a layout and the direction of the edges in the call graph (5) are changed by using the function change information according to the rules given in Table 1.

Table. 1 description of the rules of the software,

The detailed description of the rules in Table 1 is given in the following.

1st Rule (K-i): In case which both caller (X) and called (Y) functions are not changed, X Y relation in the call graph (5), X and Y relations in the Change Effect Graph is preserved to be used as the same X Y.

2nd Rule (K 2 ): In case which the caller function (X) is not changed but the called function (Y) is changed, then this will influence the X Y relation in call graph. The X and Y relation X <— Y in Change Effect Graph will influence in opposite manner. Because function Y is changed, function X will be influenced from this change. For this reason, the impact direction will be from Y to X.

3rd Rule (K 3 ): In case which the caller function (X) changes and called function does not change, the X Y relation in the call graph (5), X and Y relation in Change Effect Graph (9) is preserved as the same and used as X Y direction. In this case the affecting direction is from X to Y direction.

4th Rule (K 4 ): In case which both caller (X) and called (Y) functions change, however if the change ratio of the caller function (X) is higher, then the X Y relation in the call graph, X and Y relations in the Change Effect Graph (9) are continued to be used as the same as X Y. Compared to function Y, since the change amount in function X is more, the change impact will be higher. For this reason, the X and Y relation in the Change Effect Graph (9) is used as X Y direction.

5th Rule (K 5 ): In case the caller (X) and called (Y) functions change, and the change ratio for both functions are equal, then total changes made are considered. If the total change made in function X is equal or higher than the total change in function Y, then the X Y relation in the call graph (5), X and Y relations in the Change Effect Graph (9) are preserved and to be used as the same as relation X Y. Flowever, if the total change made in function Y is more than the total change made in X function then X Y relation in call graph (5), the X and Y relations in the Change Effect Graph (9) are changed as X Y. The reason to set a rule as the 5th rule is to mention the Change Impact direction in a fair manner. For example; in case function X has 10 lines in total and if only 5 lines among these 10 lines change then the change ratio of function X is calculated as 0.5. In case where function Y has 50 lines in total and if 25 lines among these 50 lines change. In this case the change ratio of function Y is calculated as 0.5 as it is same with function X. However, because function Y has more lines which are changed, then the direction of the arrow is changed as X <— Y. Because the change is more in function Y compared to function X.

6th Rule (K 6 ): In case that both the caller (X) and called (Y) functions are changed, and the change ratio of called (Y) function is higher, the X ® Y relation in the call graph (5), X and Y relations in the Change Effect Graph (9) are changed as X <— Y. Because the change ratio of function Y is more radical than function X, the change direction is used as X <- Y.

Changed functions (full black nodes) are given with an exemplary call graph (5) in Figure 2. In the direction of this information, the Change Effect Graph (9) is created at the right of Figure 2 by applying the rules.

3. Realizing Program Slicing (10);

Program slicing is a method that was found in 80’s. This method is used in our invention and is used for extracting the influenced areas in connection with the relations between the functions by diving into the content of the functions. In addition to this, the program slicing step (10) is customized in a manner to work with the Change Effect Graph (9). Due to the relations in the Change Effect Graph (9), they work over the parameters and the returning values.

4. Integration of the Bayesian Networks (15);

Bayesian Networks are basically used for two purposes; Diagnosis and Estimation. We need two types of nodes in order to make diagnosis and estimation in a Bayesian network. The first one is the nodes that does not have incoming edges but outgoing edges (they can be accepted as initial or entry nodes). The second one is the nodes that have incoming edges but does not have outgoing edges (they can be accepted as the final or exit/sink nodes). The first type of node, in other words the entry nodes is a “justification” or a“reason” within a graph structure in general. On the other hand, the second type nodes are the conditions realized due to the justifications. If we recall the Bayesian network fire system shown in Figure 3. A relation as the following is defined; when a fire occurs, the alarm is raised, when the alarm is raised then the people go outside. The fire node is a first type node (entry), the people go outside node is a second type (exit) node.

When we adopt this for diagnosing and estimating the Bayesian Network in Figure 3;

1 . Diagnosis: “People going out” is observed, with a 0.83 probability that there is a “fire”, therefore, people are going outside.

2. Estimation: The“Fire” is observed, therefore, with a 0.98 probability people will go outside.

Bayesian networks are used in the areas such as making diagnosis and finding the symptoms in the medical field and filtering the spam e-mails.

In this invention the Change Effect Graph (9) is used in the Bayesian Networks and its graph is created (8) and is used for estimating the parts to be influenced from the changes made in the functions. If the used graph (9) is an acyclic graph, then the graph is used as it is. Flowever, if there are any cycles in the graph (9), the edges that causes the cycles are removed. Then the probability information of the nodes in the Bayesian network are coded by using program slicing and function changing information.

In the following, there are descriptions of the process steps seen in the flow chart of the inventive method seen in Figure 4;

1 . It is the start of the method, it continues by receiving two inputs from the 2nd and 3rd steps.

2. It is the first input of the method and takes the final version (that includes the last changes) of the software as the input.

3. It is the second input of the method. It takes the previous version of the software as an input.

4. It creates the call graph of the functions over the information received from the 2nd step.

5. It is the call graph obtained at the end of the 4th step. 6. It extracts the changes that are made in the software by using the inputs received from the 2nd and 3rd steps.

7. It is the function change information obtained from the 6th step.

8. It creates the model defined as the “Change Effect Graph (9)” by using the information received from the 5th and 7th steps.

9. It is the“Change Effect Graph (9)” extracted at the end of the 8th step.

10. It runs the program slicing method over the relations between the functions by using the information received from the 5th step.

11. It is the information about the probability of the functions extracted at the end of the 10th step influencing each other.

12. It controls the“Change Effect Graph (9)” received from the 9th step in terms of whether it is a loopless/ acyclic graph or not. If it is a loopless/ acyclic graph, then it continues to use the information received from the 9th step in 15th step. If it is not a loopless/ acyclic graph (14) then it continues from the 13th step for converting it into a loopless/ acyclic graph (14).

13. It converts the cyclic “Change Effect Graph (9)” of the 9th step into a loopless/acyclic graph (14).

14. It is the loopless/acyclic graph obtained at the end of the 13th step.

15. It takes the loopless/acyclic graph (14) from the 9th or 14th steps and uses the graph plan for Bayesian network. Besides, it uses the impact probabilities of the functions received from the 11th step and change ratio received from the 7th step in coding the nodes of the Bayesian network.

16. It is the information of the functions influenced from the change which is extracted at the end of the 15th step.

17. It is the termination step of the method.