US2020057635A1PendingUtilityA1

Information processing apparatus, information processing method and program

Assignee: IBMPriority: Mar 22, 2013Filed: Oct 24, 2019Published: Feb 20, 2020
Est. expiryMar 22, 2033(~6.6 yrs left)· nominal 20-yr term from priority
G06N 3/12G06F 8/72
58
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

An information processing apparatus, an information processing method, and a computer program product for searching for equivalent input values that result in not equivalent output values among two or more programs, the information processing apparatus configured to: retrieve two or more programs from a program database; generate a first constraint; generate a second constraint; generate a first constraint condition that evaluates to true; execute a constraint solver using the first constraint condition to obtain the first input and the second input; execute the target program using the first input value to generate the first output value and execute the refactored program using the second input value to generate the second output value; determine whether the first output value is not equivalent to the second output value; and output a notification providing the first input value and the second input value.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . An information processing apparatus configured to:
 retrieve two or more programs from a program database, the two or more programs comprising at least a target program and a refactored program, the refactored program being generated from the target program by changing a source code of the target program without changing a function of the target program;   generate a first constraint on both a first input of the target program and a first output of the target program, the first constraint indicating a first condition for using the first input to traverse a first execution path in the target program to generate the first output;   generate a second constraint on both a second input of the refactored program and a second output of the refactored program, the second constraint indicating a second condition for using the second input to traverse a second execution path in the refactored program to generate the second output;   generate a first constraint condition that evaluates to true when:
 the first constraint is satisfied for a first input value of the first input and a first output value of the first output and the second constraint is satisfied for a second input value of the second input and a second output value of the second output, 
 the first input value is equivalent to the second input value, and 
 the first output value is not equivalent to the second output value; 
   execute a constraint solver using the first constraint condition to obtain the first input and the second input;   execute the target program using the first input value to generate the first output value and execute the refactored program using the second input value to generate the second output value;   determine whether the first output value is not equivalent to the second output value; and   in response to determining that the first output value is not equivalent to the second output value, output a notification providing the first input value and the second input value.   
     
     
         2 . The information processing apparatus according to  claim 1 , wherein generating the first constraint comprises:
 dividing the target program into multiple modules; and   generating the first constraint with divided parts that are in a correspondence relationship with each other as the target program.   
     
     
         3 . The information processing apparatus according to  claim 2 , wherein generating the second constraint comprises:
 dividing the refactored program into multiple modules; and   generating the second constraint with divided parts that are in a correspondence relationship with each other as the refactored program.   
     
     
         4 . The information processing apparatus according to  claim 1 , wherein the first constraint is generated using a whole target program and the second constraint is generated using a whole refactored program. 
     
     
         5 . The information processing apparatus according to  claim 1 , wherein providing the first input value and the second input value further comprises providing the first input value and the second input value to a user terminal, wherein the user terminal displays the first input value and the second input value to a user. 
     
     
         6 . The information processing apparatus according to  claim 1 , further configured to:
 in response to determining that the first output value is equivalent to the second output value, update the first constraint condition to exclude the first input value and the second input value.   
     
     
         7 . The information processing apparatus according to  claim 1 , wherein the target program and the refactored program each include multiple different execution paths having respective conditions for passing through the respective execution paths;
 wherein the information processing apparatus is further configured to generate the first constraint and generate the second constraint such that at least one of the first condition and the second condition is evaluated to be always true.   
     
     
         8 . The information processing apparatus according to  claim 1 , further configured to generate a second constraint condition that evaluates to true when the first input value is equal to the second input value, as a condition that the first input value is equivalent to the second input value. 
     
     
         9 . The information processing apparatus according to  claim 1 , further configured to:
 acquire correspondence among the first input value and the second input value; and   generate a second constraint condition that evaluates to true when the first input value and the second input value are corresponding values, as a condition that the first input value is equivalent to the second input value.   
     
     
         10 . The information processing apparatus according to  claim 1 , further configured to generate a second constraint condition that evaluates to true when the first output value does not agree with the second output value, as a condition that the first output value is not equivalent to the second output value. 
     
     
         11 . The information processing apparatus according to  claim 1 , further configured to:
 acquire correspondence among the first output value and the second output value; and   generate a second constraint condition that evaluates to true when the first output value and the second output value are not corresponding values, as a condition that the first output value is not equivalent to the second output value.   
     
     
         12 . The information processing apparatus according to  claim 1 , wherein the target program and the refactored program each include multiple different execution paths having respective conditions for passing through the respective execution paths;
 wherein the information processing apparatus is further configured to generate the first constraint and generate the second constraint such that at least one of the first condition and the second condition is evaluated to be always false.   
     
     
         13 . An information processing method executed by an information processing apparatus searching for equivalent input values that result in not equivalent output values among two or more programs, the method comprising:
 retrieving the two or more programs, the two or more programs comprising at least a target program and a refactored program, the refactored program being generated from the target program by changing a source code of the target program without changing a function of the target program;   generating a first constraint on both a first input of the target program and a first output of the target program, the first constraint indicating a first condition for using the first input to traverse a first execution path in the target program to generate the first output;   generating a second constraint on both a second input of the refactored program and a second output of the refactored program, the second constraint indicating a second condition for using the second input to traverse a second execution path in the refactored program to generate the second output;   generating a first constraint condition that evaluates to true when:
 the first constraint is satisfied for a first input value of the first input and a first output value of the first output and the second constraint is satisfied for a second input value of the second input and a second output value of the second output, 
 the first input value is equivalent to the second input value, and 
 the first output value is not equivalent to the second output value; 
   executing a constraint solver using the first constraint condition to obtain the first input and the second input;   executing the target program using the first input value to generate the first output value and executing the refactored target program using the second input value to generate the second output value;   determining whether the first output value is not equivalent to the second output value; and   in response to determining that the first output value is not equivalent to the second output value, outputting a notification providing the first input value and the second input value.   
     
     
         14 . The method of  claim 13 , wherein generating the first constraint comprises:
 dividing the target program into multiple modules; and   generating the first constraint with divided parts that are in a correspondence relationship with each other as the target program.   
     
     
         15 . The method of  claim 14 , wherein generating the second constraint comprises:
 dividing the refactored program into multiple modules; and   generating the second constraint with divided parts that are in a correspondence relationship with each other as the refactored program.   
     
     
         16 . The method of  claim 13 , further comprising:
 in response to determining that the first output value is equivalent to the second output value, updating the first constraint condition to exclude the first input value and the second input value.   
     
     
         17 . A computer program product comprising a non-transitory processor-readable storage medium having program instructions embodied thereon, the program instructions executable by a processor to cause the processor to:
 retrieve two or more programs, the two or more programs comprising at least a target program and a refactored program, the refactored program being generated from the target program by changing a source code of the target program without changing a function of the target program;   generate a first constraint on both a first input of the target program and a first output of the target program, the first constraint indicating a first condition for using the first input to traverse a first execution path in the target program to generate the first output;   generate a second constraint on both a second input of the refactored program and a second output of the refactored program, the second constraint indicating a second condition for using the second input to traverse a second execution path in the refactored program to generate the second output;   generate a first constraint condition that evaluates to true when:
 the first constraint is satisfied for a first input value of the first input and a first output value of the first output and the second constraint is satisfied for a second input value of the second input and a second output value of the second output, 
 the first input value is equivalent to the second input value, and 
 the first output value is not equivalent to the second output value; 
   execute a constraint solver using the first constraint condition to obtain the first input and the second input;   execute the target program using the first input value to generate the first output value and executing the refactored target program using the second input value to generate the second output value;   determine whether the first output value is not equivalent to the second output value; and   in response to determining that the first output value is not equivalent to the second output value, output a notification providing the first input value and the second input value.   
     
     
         18 . The computer program product of  claim 17 , wherein generating the first constraint comprises:
 dividing the target program into multiple modules; and   generating the first constraint with divided parts that are in a correspondence relationship with each other as the target program.   
     
     
         19 . The computer program product of  claim 18 , wherein generating the second constraint comprises:
 dividing the refactored program into multiple modules; and   generating the second constraint with divided parts that are in a correspondence relationship with each other as the refactored program.   
     
     
         20 . The computer program product of  claim 17 , wherein the program instructions are further configured to, in response to determining that the respective output values of the multiple target programs are equivalent, updating the first constraint condition to exclude the obtained input values that result in the equivalent output values.

Join the waitlist — get patent alerts

Track US2020057635A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.