IP Library Granted Patent US 11,599,341
Granted Patent B2
US 11,599,341 · App. 17/242,192 · Granted Mar 7, 2023

Program rewrite device, storage medium, and program rewrite method

Inventor: Masaki Arai (Kawasaki, JP)
Assignee: FUJITSU LIMITED
G06F8/437G06F8/10G06F8/427G06F8/433
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,599,341
App. No.
17/242,192
Granted
Mar 7, 2023
Kind
B2
Abstract

A program rewrite method executed by a computer, the method includes rewriting a program to output a first output group by performing operations for a first variable among a plurality of variables with a plurality of data types; rewriting the program to output a second output group by performing operations for a second variable among the plurality of variables with a plurality of data types; identifying, from the first output group and the second output group, a third output group that satisfied a predetermined criterion as a result of executing the rewritten programs; determining a data type that corresponds to the third output group as a use data type; and outputting a program in which the use data type is set for each of the plurality of variables.

Claims (35)

1. A program rewrite device, comprising:

a memory; and

a processor coupled to the memory and the processor configured to:

rewrite a program to output a first output group by performing operations for a first variable among a plurality of variables with a plurality of data types,

rewrite the program to output a second output group by performing operations for a second variable among the plurality of variables with a plurality of data types,

identify, from the first output group and the second output group, a third output group that satisfied that calculation results of the first variable obtained from the first output group and the second variable obtained from the second output group fall within a predetermined error range as a result of executing the rewritten programs,

determine a data type that corresponds to the third output group as a use data type,

output a program in which the use data type is set for each of the plurality of variables,

rewrite the program to perform condition branch determination with a plurality of data types,

rewrite the program to be able to copy an execution process to two execution processes on a true branch side and on a false branch side in a case of executing the program after the condition branch determination, and

rewrite the program to stop use of a data type in which the condition branch determination becomes false in the process on the true branch side, and to stop use of a data type in which the condition branch determination becomes true in the process on the false branch side.

2. The program rewrite device according to claim 1 , wherein the processor configured to:

change a name of a function at a call position according to the use data type at the call position of the function; and

output the program to which the function is added in accordance with the name of the function.

3. A non-transitory computer-readable storage medium storing a program that causes a computer to execute a process, the process comprising:

rewriting a program to output a first output group by performing operations for a first variable among a plurality of variables with a plurality of data types;

rewriting the program to output a second output group by performing operations for a second variable among the plurality of variables with a plurality of data types;

identifying, from the first output group and the second output group, a third output group that satisfied that calculation results of the first variable obtained from the first output group and the second variable obtained from the second output croup fall within a predetermined error range as a result of executing the rewritten programs;

determining a data type that corresponds to the third output group as a use data type;

outputting a program in which the use data type is set for each of the plurality of variables;

rewriting the program to perform condition branch determination with a plurality of data types;

rewriting the program to be able to copy an execution process to two execution processes on a true branch side and on a false branch side in a case of executing the program after the condition branch determination; and

rewriting the program to stop use of a data type in which the condition branch determination becomes false in the process on the true branch side, and to stop use of a data type in which the condition branch determination becomes true in the process on the false branch side.

4. A program rewrite method executed by a computer, the method comprising:

rewriting a program to output a first output group by performing operations for a first variable among a plurality of variables with a plurality of data types;

rewriting the program to output a second output group by performing operations for a second variable among the plurality of variables with a plurality of data types;

identifying, from the first output group and the second output group, a third output group that satisfied that calculation results of the first variable obtained from the first output group and the second variable obtained from the second output group fall within a predetermined error range as a result of executing the rewritten programs;

determining a data type that corresponds to the third output group as a use data type;

outputting a program in which the use data type is set for each of the plurality of variables;

rewriting the program to perform condition branch determination with a plurality of data types;

rewriting the program to be able to copy an execution process to two execution processes on a true branch side and on a false branch side in a case of executing the program after the condition branch determination; and

rewriting the program to stop use of a data type in which the condition branch determination becomes false in the process on the true branch side, and to stop use of a data type in which the condition branch determination becomes true in the process on the false branch side.

5. The program rewrite method according to claim 4 , wherein the method comprising:

changing a name of a function at a call position according to a situation of the use data type at the call position of the function; and

outputting the program to which the function is added in accordance with the name of the function.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 28, 2021
From: ARAI, MASAKI
To: FUJITSU LIMITED
Reel/Frame 056064/0656 →
Priority Claims (1)
JP JP2020-119735 · Jul 13, 2020 · national
Continuity (1)
Related Publication 20220012026A1 · Jan 13, 2022