Program rewrite device, storage medium, and program rewrite method
AssigneeFujitsu Limited
InventorMasaki Arai
Life of this patent
Estimating the term…
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.
Claims5
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.
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.
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.
Dependencies are inferred from the claim text.