Verification program, verification method, and information processing device

The verification program addresses the challenge of multiple undetected incompatibilities by converting, recording, and correcting data changes, enabling efficient detection and resolution of incompatible operations during application migration.

JP2024142008AInactive Publication Date: 2024-10-10FUJITSU LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023053942
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Incompatible behavior occurs when applications are migrated to new execution environments, leading to multiple undetected locations of incompatibility that require repetitive detection and correction, prolonging resolution time.

Method used

A verification program that converts and records data changes in source and execution environments, detects incompatible operations, and outputs incompatibility information, allowing for dynamic correction during execution.

Benefits of technology

Facilitates easy resolution of incompatible operations by dynamically detecting and correcting them during execution, reducing the time and effort required to identify all locations of incompatibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024142008000001_ABST
    Figure 2024142008000001_ABST
Patent Text Reader

Abstract

To facilitate cancellation of an incompatible operation.SOLUTION: An information processing device 10 executes, in a first program execution environment 12a, a first execution program 2 to which a first record instruction for recording a change content according to a first data change instruction has been added, to thereby acquire a first data change history 6. Next, the information processing device 10 adds, to a second execution program 3, both a second record instruction for recording a second change content according to a second data change instruction and an incompatibility detection instruction. The incompatibility detection instruction causes output of incompatibility information 8 based on a second data change history 7 and the first data change history 6 and causes addition of the incompatibility detection instruction for modifying a value after the change of second data 5 according to the second data change instruction. Then, the information processing device 10 executes the second execution program 3 in a second program execution environment 12b, to thereby acquire the incompatibility information 8.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a verification program, a verification method, and an information processing device. [Background technology]

[0002] Among the application software (hereafter simply referred to as "applications") used in business, there are some that were developed long ago and are still in use today, especially applications written in the COBOL language.

[0003] On the other hand, the execution environment (hardware, OS (Operating System), character code system, etc.) in which applications are executed changes with the times. Therefore, in order to continue to operate the same application over the long term, the application is migrated to a new execution environment in accordance with the changes in the execution environment.

[0004] When migrating an application to a new execution environment, it is desirable to be able to migrate by simply switching the execution environment without making major modifications to the application. However, the data formats (CPU (Central Processing Unit) bit width, endian, floating-point format, character code, etc.) handled by the execution environments before and after the migration may be different. In this case, even if there is no change to the processing logic of the application program, unintended behavior (incompatible behavior) may occur when the application is executed due to differences in data formats. For this reason, when changing the execution environment of an application, the operator must verify the operation in the destination environment.

[0005] To verify the operation of a program in the destination environment, a technology that supports program operation verification can be used. For example, a technology that identifies the location where data that causes an error when the program is executed is proposed as a technology to support program operation verification. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] JP 2022-154258 A Summary of the Invention [Problem to be solved by the invention]

[0007] Incompatible behavior that occurs when an application is executed may occur not only in one place, but in multiple places. Furthermore, if an incompatible behavior occurs when the migrated application is executed, the application cannot be executed normally thereafter. Therefore, when there are multiple places where incompatible behavior occurs, it is not possible to detect all of the places where incompatible behavior occurs unless detection of the places where incompatible behavior occurs and program correction are alternately repeated. As a result, it takes a long time to resolve the incompatible behavior.

[0008] In one aspect, the present invention aims to facilitate the resolution of incompatible operations. [Means for solving the problem]

[0009] In one proposal, a verification program is provided that causes a computer to execute the following processes. The computer adds a first recording instruction to a first execution program obtained by translating a first program to be verified, the first execution program being obtained by translating a first program to be verified including an instruction to be verified that changes a data value, for a first program execution environment. The computer executes the first execution program in the first program execution environment to obtain a first data change history in which changes to the value of the first data that are changed by the first data change instruction are recorded. The computer adds a second recording instruction to a second execution program obtained by translating a second program to be verified generated based on the first program to be verified, the second recording instruction being used to record changes made by the second data change instruction translated from the instruction to be verified, for a second program execution environment. The computer causes the second execution program to detect an incompatible operation caused by differences in the execution environments based on the second data change history indicating changes to the value of the second data by the second data change instruction and the first data change history, and when an incompatible operation is detected, outputs incompatibility information indicating the location where the incompatible operation occurred, and adds an incompatibility detection instruction to correct the value of the second data after the change by the second data change instruction based on the value of the first data after the change by the first data change instruction.The computer then acquires the incompatibility information by executing the second execution program in the second program execution environment. Effect of the Invention

[0010] According to one aspect, resolving incompatible operations is facilitated. [Brief description of the drawings]

[0011] [Figure 1] FIG. 2 illustrates an example of a verification method according to the first embodiment; [Diagram 2] FIG. 1 illustrates an example of a system configuration according to a second embodiment; [Diagram 3] FIG. 2 illustrates an example of hardware of a development machine. [Figure 4] FIG. 13 illustrates an example of an incompatible operation. [Diagram 5]FIG. 13 is a diagram showing an example of a modified source file. [Figure 6] FIG. 13 is a diagram showing an example of a data change history when a source file is modified. [Figure 7] FIG. 2 is a diagram illustrating an example of functions that a development system has for verifying the operation of an application. [Figure 8] FIG. 11 is a diagram illustrating an example of a generation status of an execution file. [Figure 9] 11 is a flowchart illustrating an example of a process in a development machine of a migration source environment. [Figure 10] 13 is a flowchart illustrating an example of a procedure for a compilation process in a source environment. [Figure 11] FIG. 13 is a diagram illustrating an example of a compilation result in a source environment. [Figure 12] 13 is a flowchart illustrating an example of processing in a development machine in a migration destination environment. [Figure 13] 13 is a flowchart illustrating an example of a procedure for a compilation process in a migration destination environment. [Figure 14] FIG. 13 is a diagram illustrating an example of a compilation result in a destination environment. [Figure 15] FIG. 11 is a diagram showing a first example of generated row correspondence information. [Figure 16] FIG. 13 is a diagram showing a first example of a log record to be compared that is identified based on row correspondence information. [Figure 17] FIG. 13 is a diagram showing a second example of generated row correspondence information. [Figure 18] FIG. 13 is a diagram showing a second example of a log record to be compared that is identified based on row correspondence information. [Figure 19] 11 is a block diagram showing an example of the functions of the execution units of a migration source and a migration destination. FIG. [Figure 20] FIG. 13 illustrates an example of a comparison process of data change histories; [Figure 21] 13 is a flowchart illustrating an example of a procedure for a program execution process. [Figure 22] 13 is a flowchart illustrating an example of a procedure for a data change history comparison process. [Figure 23] FIG. 11 illustrates a first example of a data comparison process. [Figure 24] 13 is a flowchart illustrating an example of a procedure for a data correction process. [Diagram 25] FIG. 13 is a diagram illustrating an example of a process for correcting a value of incompatible data. [Figure 26] FIG. 13 illustrates an example of a difference occurrence log. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, the present embodiment will be described with reference to the drawings. Note that each embodiment can be implemented in combination with a plurality of other embodiments as long as no contradiction occurs. First Embodiment The first embodiment is a verification method that can easily eliminate incompatible operations caused by differences in data formats when migrating a program's execution environment.

[0013] Fig. 1 is a diagram showing an example of a verification method according to a first embodiment. Fig. 1 shows an example of an information processing device 10 that realizes the verification method. The information processing device 10 can implement the verification method according to the first embodiment by executing a verification program.

[0014] The information processing device 10 includes a storage unit 11 and a processing unit 12. The storage unit 11 is, for example, a memory or a storage device included in the information processing device 10. The processing unit 12 is, for example, a processor or an arithmetic circuit included in the information processing device 10.

[0015] The storage unit 11 stores a first program to be verified 1a and a second program to be verified 1b. The first program to be verified 1a is, for example, a source program written in a high-level language. The first program to be verified 1a includes an instruction to be verified that changes a data value. The second program to be verified 1b is a source program generated based on the first program to be verified 1a. The second program to be verified 1b also includes an instruction to be verified. For example, the second program to be verified 1b is a copy of the first program to be verified 1a. Or, the second program to be verified 1b is a copy of the first program to be verified 1a that has been modified (such as by adding or deleting a statement).

[0016] The processing unit 12 has a first program execution environment 12a and a second program execution environment 12b. The processing unit 12 has, for example, a compiler that translates (sometimes called compiling) the first verification target program 1a for the first program execution environment 12a, and a compiler that translates for the second program execution environment 12b.

[0017] The first program execution environment 12a and the second program execution environment 12b are program execution environments including hardware, an OS, and the like. The first program execution environment 12a and the second program execution environment 12b can be realized, for example, by using a virtual machine. If the information processing device 10 is a computer system including multiple computers, the first program execution environment 12a and the second program execution environment 12b may be realized on different computers. The first program execution environment 12a and the second program execution environment 12b mainly differ in the data format (CPU bit width, endian, floating point format, character code, etc.) of the data they handle.

[0018] Here, assume that a service operated in a first program execution environment 12a using a first execution program 2 obtained by translating a first program to be verified 1a for the first program execution environment 12a is migrated to a second program execution environment 12b. In this case, the user performs operation verification to check whether a second execution program 3 obtained by translating a second program to be verified 1b for the second program execution environment 12b operates normally. In the operation verification, the user causes the processing unit 12 to execute the following processes.

[0019] The processing unit 12 adds a first recording command to a first execution program 2 obtained by translating the first verification target program 1a for the first program execution environment 12a. The first recording command is a command for recording the changes made by the first data change command obtained by translating the verification target command in the first program execution environment 12a. The processing unit 12 then executes the first execution program 2 in the first program execution environment 12a, thereby acquiring a first data change history 6 in which the changes made to the value of the first data 4 made by the first data change command are recorded.

[0020] The processing unit 12 also adds a second recording instruction to the second execution program 3 obtained by translating the second verification target program 1b for the second program execution environment 12b, the second recording instruction recording the changes made by the second data change instruction translated from the verification target instruction.

[0021] Furthermore, the processing unit 12 adds an incompatibility detection command after the second recording command of the second execution program 3. The incompatibility detection command is an execution command for the following series of processes (incompatibility detection processes). The first process is a process for detecting an incompatible operation caused by a difference in the execution environment based on the second data change history 7 indicating the change content of the value of the second data 5 by the second data change command and the first data change history 6. The second process is a process for outputting incompatibility information 8 indicating the location of the detected incompatible operation when an incompatible operation is detected. The third process is a process for correcting the value after the change of the second data 5 by the second data change command based on the value after the change of the first data 4 by the first data change command when an incompatible operation is detected.

[0022] Then, processing unit 12 acquires incompatibility information 8 by executing second execution program 3 in second program execution environment 12b. According to such an information processing device 10, a first recording command is added to a first execution program 2 for a source environment after a first data change command. Also, an incompatibility detection command is added to a second execution program 3 for a destination environment after a second data change command, in addition to a second recording command. When the first execution program 2 is executed in the first program execution environment 12a, a first data change history 6 is acquired. Also, when the second execution program is executed in the second program execution environment 12b, an incompatibility detection process is executed, and incompatibility information 8 indicating the detected incompatible operation is generated. At this time, the second data 5, which has been set to an incorrect value due to the incompatible operation, is corrected to a correct value based on the first data change history 6.

[0023] The user can obtain the incompatibility information 8 by having the information processing device 10 execute the second execution program 3. Then, the user can easily resolve the incompatible operation by checking the contents of the incompatibility information 8.

[0024] Furthermore, processing unit 12 dynamically detects incompatible operations during execution of second execution program 3, and corrects invalid values ​​when an incompatible operation is detected, thereby enabling correct execution of processing from the point where the incompatible operation occurred onward. Therefore, even if processing unit 12 detects an incompatible operation during operation verification of second execution program 3, it does not need to stop execution of second execution program 3, and verification can continue.

[0025] For example, processing unit 12 continues execution of second execution program 3 even after detecting an incompatible operation by executing the incompatibility detection command. Processing unit 12 detects an incompatible operation each time the incompatibility detection command becomes the target for execution, and can obtain incompatibility information 8 indicating one or more incompatible operations. This makes it possible to detect multiple incompatible operations by executing second execution program 3 once, even if there are multiple locations where an incompatible operation occurs. As a result, it becomes easy to detect each of the multiple incompatible operations.

[0026] An incompatible operation occurs, for example, when the difference in data format between the source environment and the destination environment is not reflected in the second execution program 3. Therefore, the processing unit 12 adds, as an incompatibility detection instruction, an incompatibility detection instruction for converting the data format of the value after change of the first data 4 by the first data change instruction and correcting the value of the second data 5 to the converted value when the incompatible operation is detected, for example. In this way, when the second execution program 3 is generated without reflecting the difference in data format between the source environment and the destination environment, the processing unit 12 can dynamically correct an incorrect value due to the difference in data format when the second execution program 3 is executed.

[0027] The first data change history 6 and the second data change history 7 include, for example, the line numbers of the instructions to be verified in the first program to be verified 1a or the second program to be verified 1b. If the second program to be verified 1b is a copy of the first program to be verified 1a, the line numbers of the instructions to be verified will be the same in the first program to be verified 1a and the second program to be verified 1b. In this case, the processing unit 12 detects the incompatibility in the incompatibility detection process by using the first data change history 6 with the same line number as the second data change history 7.

[0028] There may be a case where the second program to be verified 1b is a copy of the first program to be verified 1a that has been modified. In this case, the processing unit 12 detects an incompatible operation based on, for example, line correspondence information indicating a correspondence relationship between lines between the first program to be verified 1a and the second program to be verified 1b.

[0029] For example, the processing unit 12 adds a first recording instruction for recording the changes made by the first data modification instruction, including the line number of the instruction to be verified in the first program to be verified 1a, to the changes made by the first data modification instruction. The processing unit 12 also adds a second recording instruction for recording the changes made by the second data modification instruction, including the line number of the instruction to be verified in the second program to be verified 1b, to the changes made by the second data modification instruction. Furthermore, when the incompatibility detection instruction is executed, the processing unit 12 identifies, based on the line correspondence information, the first data modification history 6 to be compared with the second data modification history 7 when an incompatible operation is detected.

[0030] As a result, the processing unit 12 can correctly detect incompatible operations and output incompatibility information 8 indicating the incompatible operations, even if the second program to be verified 1b is a modified copy of the first program to be verified 1a.

[0031] In addition, the second program to be verified 1b may contain a data modification command that is not contained in the first program to be verified 1a. For such an added data modification command, the first data modification history 6 to be used for comparison in the incompatibility detection process cannot be obtained. Therefore, if there is no line number in the line correspondence information that corresponds to a line number contained in the second data modification history 7, the processing unit 12 suppresses the execution of the process to detect the incompatible operation. This makes it possible to avoid performing unnecessary incompatibility detection processes.

[0032] The line correspondence information can be generated in advance. For example, the processing unit 12 generates the line correspondence information by comparing the first program to be verified 1a with the second program to be verified 1b. The processing unit 12 generates the line correspondence information, for example, when translating the second program to be verified 1b.

[0033] Second Embodiment Next, a second embodiment will be described. In the second embodiment, when an application running on a computer with a certain execution environment is migrated to a computer with a different execution environment, operation verification is performed in advance in a development environment to check for incompatible operations due to differences in data formats.

[0034] Fig. 2 is a diagram showing an example of a system configuration according to the second embodiment. Fig. 2 shows an example of a system configuration in which, when migrating the execution environment of an application executed in an operation system 200, a development system 100 is used to verify the operation of the application in advance.

[0035] For example, a development system 100 and an operation system 200 are connected via a network 20. The development system 100 includes two development machines 100a and 100b used by application developers. The operation system 200 includes two operation machines 200a and 200b used to provide services using applications.

[0036] Development machines 100a and 100b are computers prepared for developing and testing applications. Operation machines 200a and 200b are computers prepared for executing processes using applications and operating various services.

[0037] Assume now that an application that was running on operation machine 200a is to be migrated to operation machine 200b. Operation machine 200b has a different operating environment from operation machine 200a. In this case, in development system 100, an operating environment identical to that of source operation machine 200a is constructed in development machine 100a, and an operating environment identical to that of destination operation machine 200b is constructed in development machine 100b.

[0038] Development machines 100a and 100b may be virtual machines that replicate the operating environments of operation machines 200a and 200b, respectively. If development machines 100a and 100b are both virtual machines, both development machines 100a and 100b can be built within the same computer.

[0039] 3 is a diagram showing an example of the hardware of a development machine. The development machine 100a is entirely controlled by a processor 101. A memory 102 and a plurality of peripheral devices are connected to the processor 101 via a bus 109. The processor 101 may be a multiprocessor. The processor 101 is, for example, a CPU, a micro processing unit (MPU), or a digital signal processor (DSP). At least a part of the functions realized by the processor 101 executing a program may be realized by an electronic circuit such as an application specific integrated circuit (ASIC) or a programmable logic device (PLD).

[0040] The memory 102 is used as the main storage device of the development machine 100a. The memory 102 temporarily stores at least a part of the OS program and application programs to be executed by the processor 101. The memory 102 also stores various data used in the processing by the processor 101. As the memory 102, for example, a volatile semiconductor storage device such as a RAM (Random Access Memory) is used.

[0041] The peripheral devices connected to the bus 109 include a storage device 103, a GPU (Graphics Processing Unit) 104, an input interface 105, an optical drive device 106, a device connection interface 107, and a network interface 108.

[0042] The storage device 103 electrically or magnetically writes and reads data to and from a built-in recording medium. The storage device 103 is used as an auxiliary storage device for the development machine 100a. The storage device 103 stores the OS program, application programs, and various data. Note that, for example, a hard disk drive (HDD) or a solid state drive (SSD) can be used as the storage device 103.

[0043] The GPU 104 is an arithmetic device that performs image processing, and is also called a graphics controller. The GPU 104 is connected to a monitor 21. The GPU 104 displays an image on the screen of the monitor 21 in accordance with an instruction from the processor 101. The monitor 21 may be a display device using an organic EL (Electro Luminescence) display device, a liquid crystal display device, or the like.

[0044] The input interface 105 is connected to the keyboard 22 and the mouse 23. The input interface 105 transmits signals sent from the keyboard 22 and the mouse 23 to the processor 101. Note that the mouse 23 is an example of a pointing device, and other pointing devices can also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, and a trackball.

[0045] The optical drive device 106 uses a laser beam or the like to read data recorded on the optical disc 24 or write data to the optical disc 24. The optical disc 24 is a portable recording medium on which data is recorded so that it can be read by reflection of light. The optical disc 24 includes a DVD (Digital Versatile Disc), a DVD-RAM, a CD-ROM (Compact Disc Read Only Memory), a CD-R (Recordable) / RW (ReWritable), etc.

[0046] The device connection interface 107 is a communication interface for connecting peripheral devices to the development machine 100a. For example, a memory device 25 or a memory reader / writer 26 can be connected to the device connection interface 107. The memory device 25 is a recording medium equipped with a communication function with the device connection interface 107. The memory reader / writer 26 is a device that writes data to the memory card 27 or reads data from the memory card 27. The memory card 27 is a card-type recording medium.

[0047] The network interface 108 is connected to the network 20. The network interface 108 transmits and receives data to and from other computers or communication devices via the network 20. The network interface 108 is a wired communication interface that is connected by a cable to a wired communication device such as a switch or a router. The network interface 108 may also be a wireless communication interface that is communicatively connected by radio waves to a wireless communication device such as a base station or an access point.

[0048] The development machine 100a can be realized by the hardware described above. The other development machine 100b and operation machines 200a, 200b can also be realized by the same hardware as the development machine 100a. Furthermore, the information processing device 10 shown in the first embodiment can also be realized by the same hardware as the development machine 100a shown in FIG.

[0049] The development machine 100a realizes the processing function of the second embodiment by executing a program recorded in, for example, a computer-readable recording medium. The program describing the processing contents to be executed by the development machine 100a can be recorded in various recording media. For example, the program to be executed by the development machine 100a can be stored in the storage device 103. The processor 101 loads at least a part of the program in the storage device 103 into the memory 102 and executes the program. The program to be executed by the development machine 100a can also be recorded in a portable recording medium such as the optical disk 24, the memory device 25, or the memory card 27. The program stored in the portable recording medium becomes executable after being installed in the storage device 103 under the control of, for example, the processor 101. The processor 101 can also read and execute the program directly from the portable recording medium.

[0050] For example, when an administrator who provides a service by executing an application on operation machine 200a migrates the application to another operation machine 200b, the administrator verifies the compatibility of the application's execution environment in advance, for example, using development machines 100a and 100b. In the compatibility verification, it is verified whether or not an unintended operation (incompatible operation) is executed due to a difference in data format.

[0051] Examples of incompatible operations resulting from differences in data formats include the following operations. The first example is incompatible behavior caused by differences in endianness. Endianness is the type of order in which multiple bytes are arranged. There are two types of endianness: big endian and little endian. In big endianness, data in bytes is arranged from the most significant byte first. In little endianness, data in bytes is arranged from the least significant byte first.

[0052] There are cases where a program execution environment that assumes big endian data input is migrated to one that assumes little endian data input. For example, the source program execution environment reads four bytes of a byte sequence in network byte order (big endian) from the network, and processes it as is, treating it as a binary integer. In this case, the destination program execution environment may handle the retrieved data as little endian. In this case, since the endian is different, if the big endian data is executed as is, it will be processed as an integer value different from the original value, and unintended results will be output.

[0053] The second example is incompatible behavior caused by differences in character codes. For example, the OS on which a program runs may be migrated from an OS with EUC system character code to an OS with UTF-16 system character code. In this case, the processing logic of the destination computer assumes UTF-16, so if the acquired character data is input as EUC, unintended results will be output.

[0054] In addition, differences in the representation format of floating-point numbers can also be a cause of incompatible behavior. In this way, incompatible behavior occurs due to differences in the data formats handled in the program execution environment. Therefore, the operator performs operation verification accompanying the migration of the execution environment using the development system 100, detects incompatible behavior caused by differences in data formats, and identifies the cause of the incompatible behavior.

[0055] In addition, there may be cases where multiple incompatible operations occur. In such cases, it is not easy to detect all of the multiple incompatible operations. The difficulty of detecting multiple incompatible operations will be described below with reference to FIG. 4.

[0056] Fig. 4 is a diagram showing an example of incompatible operations. In the example of Fig. 4, it is assumed that an application based on source file 111a and source file 111b is executed on source operation machine 200a. Source file 111a contains a call instruction for source file 111b, "CALL "PROG-B" USING WK-ITEM-2.". Source file 111b contains a command to change the value of "PARAM-NUM," "ADD 1 TO PARAM-NUM."

[0057] Assume that when an application based on source files 111a and 111b is executed on development machine 100a, which has the same environment as the migration source, the value of "PARAM-NUM" becomes "0." Assume also that when an application based on source files 111a and 111b is executed on development machine 100b, which has the same environment as the migration destination, the value of "PARAM-NUM" becomes "-0." In this case, the value of "PARAM-NUM" in the migration destination environment is an invalid value.

[0058] By storing the data values ​​before and after a command to change the data values ​​as data change history in each of the development machine 100a of the source environment and the development machine 100b of the destination environment, it becomes possible to detect invalid values ​​due to incompatible operations. For example, the development machine 100b compares the data change history in the source environment with the data change history in the destination environment to detect invalid values ​​due to incompatible operations.

[0059] In addition, if an invalid value is set in "PARAM-NUM" in the destination environment and processing is continued as it is, the processing after the invalid value is set in the destination environment will be different from the processing in the source environment. Therefore, if one incompatible operation is detected in the development machine 100b, even if the data saved after the incompatible operation has an invalid value, the cause of the invalid value may be due to the incompatible operation that has already been detected. Therefore, if application processing is continued while leaving the invalid value due to the incompatible operation as it is, only one incompatible operation can be detected in one execution of the application. In other words, to detect whether there are any other incompatible operations, the source file 111a and the source file 111b are modified and the modified application is executed again.

[0060] As long as the application is run as is, only one location where an incompatible behavior occurs can be detected in one run, and it is difficult to identify all locations where incompatible behavior occurs in one run of the application in the migration destination environment. Therefore, each time an incompatibility is detected, the source file must be modified and the application must be rerun.

[0061] Furthermore, when a source file is modified, the number of lines of source code changes, which increases the difficulty of detecting incompatible operations. 5 is a diagram showing an example of a corrected source file. For example, assume that a source file 111b with the file name "b.cob" has been corrected to become a source file 111c. An instruction "CALL FIX-PARAM-NUM USING PARAM-NUM." that calls a process to correct the value of "PARAM-NUM" has been added to the source file 111c.

[0062] Fig. 6 is a diagram showing an example of a data change history when a source file is modified. Fig. 6 shows a data change history 115a in a migration source environment and a data change history 145a in a migration destination environment. Each of the data change histories 115a and 145a includes a plurality of log records.

[0063] A log record includes fields such as a sequence number, a source name, a line number, an event type, a data name, and contents. The sequence number field is set with an identification number given to the log record. For example, the identification number is an ascending number starting from 1 in the order of earliest recording in the log record. The source name field is set with the file name of the source file from which the executed executable file was generated. The line number field is set with the line number in the source file in which the instruction in the source file corresponding to the instruction that caused the log record to be output is described. The event type field is set with information indicating whether the log record is a log before the execution of an instruction that changes data (pre-execution) or after the execution of an instruction that changes data (post-execution). The data name field is set with a qualified name that allows the data to be uniquely identified. The contents field is set with the value of the data before or after the change.

[0064] Although omitted in the example of Figure 6, the log record also includes address, size, and data fields. The address in memory of the changed data is set in the address field. The size field is set to the size of the changed data. The data format field is set to information indicating the data format of the changed data.

[0065] As shown in Figure 6, if the source files are different between the migration source and the migration destination, the serial numbers of the log records of the corresponding commands in the data change history 115a in the migration source environment and the data change history 145a in the migration destination environment are different. Therefore, it is difficult to simply compare the data change histories 115a and 145a using the serial numbers of the data change histories 115a and 145a.

[0066] As described above, if the application is executed as is, there is a problem that it is difficult to identify all the locations where incompatible operations have occurred and to resolve the incompatible operations in a single execution of the application in the migration destination environment. This problem leads to repeated modification of the source file and execution of the application, but modifying the source file makes it difficult to compare the data change history between the migration source and the migration destination.

[0067] Therefore, in the system of the second embodiment, when the application is executed on the development machine 100b, which has the same environment as the migration destination, the system dynamically detects the location where the incompatibility occurs and corrects the invalid value each time. By executing the application while correcting the invalid value, even if there are multiple locations where incompatible operations occur, the relevant locations can be detected appropriately.

[0068] Furthermore, when a source file is modified, for example, the development machine 100b generates line correspondence information that indicates the correspondence between lines in the source file before and after the modification. The development machine 100b can appropriately detect incompatible operations by referring to this line correspondence information even if the source file has been modified.

[0069] 7 is a diagram showing an example of functions that a development system has for verifying the operation of an application. A development machine 100a has a storage unit 110, a compiler 120, and an execution unit .

[0070] The storage unit 110 stores a source file 111, an execution file 112, a plurality of data files 113a, 113b, . . ., a runtime library 114, and a data change history 115.

[0071] The source file 111 is a program file in which the processing contents of an application are written in a high-level language. The executable file 112 is a program file in executable machine language generated based on the source file 111. The data files 113a, 113b,... are files in which data used when the executable file 112 is executed is set. The runtime library 114 is a file in which runtimes (software components) available when the executable file 112 is executed are registered. The data change history 115 is a log file in which the history of data changes made by the executable file 112 when the application is executed is stored.

[0072] Compiler 120 translates (compiles) source file 111 into machine language. That is, compiler 120 interprets the program described in source file 111 and generates executable file 112 that is compatible with the program execution environment in development machine 100a. Note that since the program execution environment of development machine 100a is the same as that of source operation machine 200a in operation system 200, the generated executable file 112 is also compatible with source operation machine 200a. When compiler 120 detects an instruction that involves a change to data in a data area, it adds an instruction to executable file 112 that records the value of the data before and after the change.

[0073] The execution unit 130 is a process that executes the executable file 112. When there is a data read command to be processed during the execution of the executable file 112, the execution unit 130 reads the corresponding data from, for example, the data files 113a, 113b, . . . Furthermore, when a runtime is called during the execution of the executable file 112, the execution unit 130 acquires the corresponding runtime from the runtime library 114 and executes the acquired runtime. For example, when a runtime that records specified data in the data change history 115 is prepared, the execution unit 130 calls and executes the runtime when executing an instruction to record the value of the data. When the execution unit 130 executes the executable file 112, the values ​​before and after the change of the data that was changed during the execution of the executable file 112 are stored in the data change history 115.

[0074] The development machine 100 b includes a storage unit 140 , a compiler 150 , and an execution unit 160 . The storage unit 140 stores a source file 141, an execution file 142, a plurality of data files 143a, 143b, . . ., a runtime library 144, a data change history 145, and line correspondence information 146.

[0075] The source file 141 is a program file with the same contents as the source file 111, or a program file generated by modifying the source file 111. The executable file 142 is an executable program generated based on the source file 141. The data files 143a, 143b,... are files in which data used when the executable file 142 is executed is set. The runtime library 144 is a file in which runtimes available when the executable file 142 is executed are registered. The data change history 145 is a log file in which a data change history when the executable file 142 executes an application is stored. The line correspondence information 146 is information indicating the correspondence of lines between the source file 111 for the migration source environment and the source file 141 for the migration destination environment.

[0076] The data files 143a, 143b,... are generated by converting the data format of the data contained in the data files 113a, 113b,... of the development machine 100a into a data format compatible with the destination program execution environment. When there are a large number of data files 143a, 143b,..., there is a possibility that a data format conversion will be missed. Such a data format conversion failure will cause incompatible operations.

[0077] Compiler 150 compiles source file 141 into machine language. That is, compiler 150 interprets the program described in source file 141 and generates executable file 142 that is compatible with the program execution environment in development machine 100b. Note that because the program execution environment of development machine 100b is the same as that of destination operation machine 200b in operation system 200, the generated executable file 142 is also compatible with destination operation machine 200b.

[0078] When the compiler 150 detects an instruction that involves a change to data in the data area, it adds an instruction to record the value of the data before and after the change to the executable file 142. When the compiler 150 detects an instruction that involves a change to data in the data area, it adds an instruction to compare the data change history after the change to the executable file 142. Furthermore, the compiler 150 compares the source file 111 for the source environment with the source file 141 for the destination environment to generate line correspondence information 146.

[0079] The execution unit 160 is a process that executes the executable file 142. When there is a data read command to be processed during the execution of the executable file 142, the execution unit 160 reads the corresponding data from, for example, the data files 143a, 143b, etc. When a runtime is called during the execution of the executable file 142, the execution unit 160 acquires the corresponding runtime from the runtime library 144 and executes the acquired runtime. For example, when a runtime is prepared to record specified data in the data change history 145, the execution unit 160 calls and executes the runtime when executing an instruction to record the value of the data. When a runtime is prepared to compare the data change histories 115 and 145, the execution unit 160 calls and executes the runtime when executing an instruction to compare the data change histories 115 and 145.

[0080] When execution unit 160 executes executable file 142, the values ​​of data changed during the execution of executable file 142 before and after the change are stored in data change history 145. Furthermore, if execution unit 160 detects an incompatible operation by comparing data change histories 115, 145 during the execution of executable file 142, it corrects the value of the incompatible data that was set to an incorrect value by the incompatible operation to the correct value, and continues processing.

[0081] Note that the lines connecting the elements shown in Fig. 7 indicate part of the communication paths, and communication paths other than those shown in the figure can also be set. The function of each element shown in Fig. 7 can be realized, for example, by having the processor 101 execute a program module corresponding to that element.

[0082] The development system 100 detects an incompatible operation and identifies the location of the cause of the incompatible operation in the following procedure. First, the compiler 120, 150 corresponding to the description language of the program described in the source file 111, 141 generates a program so as to automatically record the data change history of all data shown in the execution file 112, 142 during program execution.

[0083] 8 is a diagram showing an example of the generation status of an executable file. For example, in development machine 100a, compiler 120 compiles source file 111 to generate executable file 112. Also, in development machine 100b, compiler 150 compiles source file 141 to generate executable file 142. Source file 141 is either an as-is copy of source file 111 or a modified copy of source file 111. When compiling source files 111 and 141, compilers 120 and 150 detect an instruction that involves a data change, and add a data recording instruction before and after the instruction.

[0084] Furthermore, when compiler 150 detects an instruction involving a data change while compiling source file 141, it adds an instruction for comparing the data change history to executable file 142 in addition to an instruction for recording the data. Furthermore, compiler 150 compares source file 111 with source file 141 to generate line correspondence information 146. For example, when compiler 150 detects a line of an instruction involving a data change from source file 141, it searches for lines in source file 111 that correspond to the line, associates the line numbers of those lines, and stores them in line correspondence information 146. Furthermore, when compiler 150 detects a line in source file 141 that corresponds to an instruction involving a data change, compiler 150 stores information indicating that the corresponding line does not exist in line correspondence information 146 if there is no line in source file 111 that corresponds to the line of an instruction involving a data change in source file 141.

[0085] Next, the process executed on the development machine 100a of the source environment will be described in detail. 9 is a flow chart showing an example of processing in the development machine of the migration source environment. The processing shown in FIG. 9 will be explained below in order of step numbers.

[0086] [Step S101] The compiler 120 of the development machine 100a compiles the source file 111. For example, the compiler 120 interprets the instructions written in the source file 111 and translates them into a machine code suitable for the source environment. The compiler 120 then generates an executable file 112 for executing the processing shown in the source file 111 in the source environment. The details of the compilation process will be described later (see FIG. 10).

[0087] [Step S102] The execution unit 130 executes the machine language program written in the generated executable file 112. As a result of the execution of the program, a data change history 115 is generated.

[0088] 10 is a flowchart showing an example of a compilation process procedure in the migration source environment. The process shown in FIG. 10 will be described below in order of step number. [Step S111] The compiler 120 selects statements in the source file 111 one by one from the top down, and interprets the process to be executed according to the selected statements.

[0089] [Step S112] The compiler 120 determines whether data will be changed by processing according to the interpreted command statement. For example, the compiler 120 determines that data will be changed if the command involves reading data into a data area of ​​the memory 102. If data has been changed, the compiler 120 proceeds to step S114. If data has not been changed, the compiler 120 proceeds to step S113.

[0090] [Step S113] The compiler 120 adds machine language instructions corresponding to the interpreted statements to the executable file 112. After that, the compiler 120 proceeds to step S117.

[0091] [Step S114] The compiler 120 adds to the executable file 112 a machine instruction for recording in the data change history 115 the value before the change of the data to be changed. For example, in a high-level language such as COBOL, the data format (for example, a character string in character code UTF-8) can be determined from the description in source file 111 and translation options, etc. Compiler 120 can therefore determine the data format based on the translation options, etc. of source file 111, and record the data format of the data in data change history 115. Compiler 120 can also use, for example, a file in which data and its data format are associated as input together with source file 111 during compilation, determine the data format based on the file, and record the data format of the data in data change history 115.

[0092] <Step S115> The compiler 120 adds to the executable file 112 machine language instructions corresponding to the interpreted statements. <Step S116> The compiler 120 adds to the executable file 112 a machine instruction for recording the post-change value of the data to be changed in the data change history 115.

[0093] [Step S117] The compiler 120 determines whether interpretation has been completed up to the last instruction of the program described in the source file 111. If interpretation has been completed up to the last instruction, the compiler 120 ends the compilation. If there are any uninterpreted instructions, the compiler 120 proceeds to step S111.

[0094] In this manner, compilation is performed by the compiler 120, and an executable file 112 in which processing is described by machine language instructions is generated. Fig. 11 is a diagram showing an example of a compilation result in the source environment. Fig. 11 shows an example of compiling a source file 111 of a program written in the COBOL language. The file name of the source file 111 is "a.cob", and the program written in the source file 111 is "PROG-A". Note that the contents of the executable file 112 do not indicate the machine language instructions themselves, but rather the meanings of the written instructions.

[0095] For example, the compiler 120 generates instructions to record the value of the data to be operated on at that time before and after every statement that describes a data change. Below, we will explain in detail an example of generating an instruction to record the value of data for the statement "READ FILE-1." (line number "000100") in a program.

[0096] The compiler 120 understands the specifications of statements in the language. Therefore, the compiler 120 can analyze the statement and determine which data the statement may change. In the case of a READ statement (a statement that reads data from a file) in the source file 111 shown in Figure 11, the compiler 120 recognizes the following: The READ statement may overwrite the data area WK-RECORD. From the definition of WK-RECORD, WK-RECORD is composed of the following terminal items. WK-ITEM-1: 4 bytes WK-ITEM-2: 8 bytes The compiler 120 generates instructions to record values ​​in data areas that may be changed before and after the instruction for the READ statement in this example. This instruction generation is performed for each data area that may be changed. In this example, the only data area that may be changed is WK-RECORD, so the compiler 120 generates an instruction to record the data value only for WK-RECORD. However, instead of generating this instruction for WK-RECORD, the compiler 120 outputs it in order for each terminal data item (WK-ITEM-1 and WK-ITEM-2 in this case).

[0097] As a result, instructions for recording the values ​​of WK-ITEM-1 and WK-ITEM-2 are added to the executable file 112 before and after the instruction corresponding to "READ FILE-1.".

[0098] An "instruction to record a value in a data area" is, for example, an instruction to read a runtime function that has a function to record a data value in data change history 115. In this case, compiler 120 generates an instruction to pass the following information to the runtime function in order to record the data value in data change history 115: The position of the statement to be recorded (in the example in Figure 11, line "000100" in "a.cob") Event type (before or after the statement to be recorded) -Start address of data area Data area size Data name (a qualified name that can uniquely identify the data within the running process (e.g. PROG-A / WK-RECORD / WK-ITEM-1)) Data format When translating, the compiler 120 determines the data format of each data area from, for example, the following information: -COBOL default values ​​according to the type of data (mostly set for each execution environment) - Specification by COBOL compile options, etc. (for example, the user overwriting the default value) Explicit description of data in source file 111 In this manner, an executable file 112 is generated that contains instructions for recording the value of the data.

[0099] On the other hand, in the development machine 100b having the destination environment, the source file 141 is compiled and an executable file 142 generated by the compilation is executed. The process performed by the development machine 100b having the destination environment will be specifically described below.

[0100] 12 is a flow chart showing an example of processing in the development machine of the migration destination environment. The processing shown in FIG. 12 will be explained below in order of step numbers. [Step S201] The compiler 150 of the development machine 100b compiles the source file 141. For example, the compiler 150 interprets the instructions written in the source file 141 and translates them into a machine code suitable for the destination environment. The compiler 150 then generates an executable file 142 for executing the process indicated in the source file 141 in the destination environment. During compilation, the compiler 150 also generates line correspondence information 146. Details of the compilation process in the development machine of the destination environment will be described later (see FIG. 13).

[0101] [Step S202] The execution unit 160 executes the program described in the generated executable file 142. As a result of executing the process based on the executable file 142, the data change history 145 is generated. If the program contains an instruction to compare the data change histories, the execution unit 160 performs a comparison process of the data change histories in accordance with the instruction. Details of the program execution process in the migration destination environment will be described later (see FIG. 21).

[0102] 13 is a flowchart showing an example of a procedure for a compilation process in a migration destination environment. The process shown in FIG. 13 will be described below in order of step number. [Step S211] The compiler 150 selects statements in the source file 141 one by one from the top down, and interprets the process to be executed according to the selected statements.

[0103] [Step S212] The compiler 150 determines whether data will be changed by processing according to the interpreted command statement. If data will be changed, the compiler 150 proceeds to step S214. If data will not be changed, the compiler 150 proceeds to step S213.

[0104] [Step S213] The compiler 150 adds a machine-language instruction corresponding to the interpreted statement to the executable file 142. After that, the compiler 150 proceeds to step S221.

[0105] <Step S214> The compiler 150 adds to the executable file 142 a machine instruction for recording in the data change history 145 the value before the change of the data to be changed. <Step S215> The compiler 150 adds to the executable file 142 machine language instructions corresponding to the interpreted statements.

[0106] <Step S216> The compiler 150 adds to the executable file 142 a machine instruction for recording the post-change value of the data to be changed in the data change history 145. <Step S217> The compiler 150 adds to the executable file 142 machine language instructions for executing a comparison between the data change histories 115 and 145.

[0107] [Step S218] The compiler 150 determines whether or not there is a statement corresponding to the interpreted statement in the source file 111 from which the source file is transferred. For example, the compiler 150 searches the source file 111 for a statement with the same description as the interpreted statement, and if there is a corresponding statement, it determines that there is a corresponding statement. If there is a corresponding statement, the compiler 150 proceeds to step S219. If there is no corresponding statement, the compiler 150 proceeds to step S220.

[0108] [Step S219] The compiler 150 records a pair of the line number of the interpreted statement and the line number of the corresponding statement in the source file 111 in the line correspondence information 146. The compiler 150 then proceeds to step S221.

[0109] [Step S220] The compiler 150 records the line number of the interpreted statement in the line correspondence information 146 without the line number of the corresponding statement. [Step S221] The compiler 150 determines whether interpretation has been completed up to the last instruction of the program described in the source file 141. If interpretation has been completed up to the last instruction, the compiler 150 ends the compilation. If there are any uninterpreted instructions, the compiler 150 proceeds to step S211.

[0110] In this manner, compilation is performed by the compiler 150, and an execution file 142 in which processing is described by machine language instructions is generated. Fig. 14 is a diagram showing an example of a compilation result in the destination environment. The contents of source file 141 for the destination environment shown in Fig. 14 are the same as source file 111 compiled in the source environment. Executable file 142 generated by compiling source file 141 contains an instruction to compare data change histories in addition to the instruction contained in executable file 112 of the source. The instruction to compare data change histories is written, for example, after an instruction to record the value of the changed data.

[0111] Furthermore, when compiling in the destination environment, line correspondence information 146 is generated. Fig. 15 is a diagram showing a first example of line correspondence information to be generated. In the example of Fig. 15, the contents of source file 111b for the migration source environment are modified to generate source file 141a for the migration destination environment. In modified source file 141a, a new line is added at line number "000300". Accordingly, the line that was at line number "000300" in source file 111b has been changed to line number "000310" in source file 141a.

[0112] The compiler 150 obtains difference information between the source file 111b and the source file 141a. For example, when translating statements on lines with line numbers "000300" and "000310" in the source file 141a, the compiler 150 registers records corresponding to these statements in the line correspondence information 146a.

[0113] A record registered in line correspondence information 146a has fields for id, source name, pre-modification line number, and post-modification line number. A serial number of the record is set in the id field. A file name common to source files 111b and 141a is set in the source name field. The pre-modification line number field is set to the line number of the statement in source file 111b before modification. The post-modification line number field is set to the line number of the statement in source file 141a after modification.

[0114] 15, the pre-correction source file 111b does not contain a command statement corresponding to the command statement written on the line with line number "000300" in the post-correction source file 141a. Therefore, in line correspondence information 146a, the pre-correction line number of the record to which the post-correction line number "000300" is set is left blank with a "-".

[0115] Furthermore, a command statement written on the line with line number "000310" in modified source file 141a corresponds to a command statement written on the line with line number "000300" in unmodified source file 111b. Therefore, in line correspondence information 146a, the pre-modification line number of the record to which post-modification line number "000310" is set is "000300."

[0116] The row correspondence information 146a is used to determine the correspondence between the log records to be compared in the data change histories 115 and 145, respectively. FIG. 16 is a diagram showing a first example of a log record to be compared that is identified based on line correspondence information. When comparing data change histories, a log record corresponding to an executed command is extracted from the data change history 145a of the migration destination. For example, when a machine language command corresponding to a command statement on a line with line number "000300" of the migration destination source file 141a is executed, the log record with line number "000300" is extracted. In the line correspondence information 146a, the line number "000300" (post-modification line number) of the extracted log record is not associated with a pre-modification line number. In this case, the command statement on line number "000300" is additional code added by modification, and is determined not to be compared with the data value.

[0117] For example, when a machine instruction corresponding to a statement on a line with line number "000310" in the migration destination source file 141a is executed, the log record with line number "000310" is extracted. In the line correspondence information 146a, the line number "000310" (post-modification line number) of the extracted log record is associated with the pre-modification line number "000300". In this case, it is determined that the log record with line number "000300" in the migration source data change history 115a and the log record with line number "000310" in the migration destination data change history 145a are to be compared.

[0118] Fig. 17 is a diagram showing a second example of the line correspondence information to be generated. In the example of Fig. 17, the contents of source file 111d for the migration source environment are modified to generate source file 141b for the migration destination environment. In modified source file 141b, the line with line number "000300" in source file 111d for the migration source environment is deleted. Accordingly, the line with line number "000310" in source file 111d is changed to line number "000300" in source file 141b.

[0119] The compiler 150 obtains difference information between the source file 111d and the source file 141b. When the compiler 150 translates statements on a line with line number "000300" in the source file 141b, for example, the compiler 150 registers records corresponding to those statements in the line correspondence information 146b.

[0120] 17, the command statement written on the line with line number "000300" in post-modification source file 141b corresponds to the command statement written on the line with line number "000310" in pre-modification source file 111d. Therefore, in line correspondence information 146b, the pre-modification line number of the record to which post-modification line number "000300" is set is "000310".

[0121] FIG. 18 is a diagram showing a second example of a log record to be compared that is identified based on line correspondence information. When comparing data change histories, a log record corresponding to an executed command is extracted from the data change history 145b of the migration destination. For example, when a machine language command corresponding to a command statement in a line with line number "000300" in the source source source file 141b is executed, the log record with line number "000300" is extracted. In the line correspondence information 146b, the line number "000300" (post-modification line number) of the extracted log record is associated with the pre-modification line number "000310". In this case, it is determined that the log record with line number "000310" in the data change history 115b of the migration source and the log record with line number "000300" in the data change history 145b of the migration destination are to be compared.

[0122] The executable file 112 for the source environment generated by the compilation is executed by the execution unit 130 of the development machine 100a of the source environment, and as a result, a data change history 115 is generated. The executable file 142 for the destination environment is executed by the execution unit 160 of the development machine 100b of the destination environment, and as a result, a data change history 145 is generated. When the executable file 142 for the destination environment is executed, the data change histories 115, 145 and line correspondence information 146 are used to detect and correct incompatible operations.

[0123] 19 is a block diagram showing an example of the functions of the execution units of the migration source and migration destination. The execution unit 130 in the development machine 100a of the migration source environment executes the program 112a described in the execution file 112 based on the execution file 112. If the program 112a has an instruction to call the runtime 114a, the execution unit 130 calls the corresponding runtime 114a from the runtime library 114 and executes it. For example, the execution unit 130 executes the corresponding runtime 114a in response to an instruction to call the runtime 114a for a process of recording the value of data. As a result, a data change history 115 is generated.

[0124] The execution unit 160 in the development machine 100b in the migration destination environment executes the program 142a described in the execution file 142 based on the execution file 142. Furthermore, when the program 142a has an instruction to call the runtime 144a, the execution unit 160 calls the corresponding runtime 144a from the runtime library 144 and executes it. For example, the execution unit 160 executes the corresponding runtime 144a in response to an instruction to call the runtime 144a for a process of recording the value of data. As a result, the data change history 145 is generated.

[0125] Furthermore, the execution unit 160 calls the data difference detection unit 161 in response to a call command for a process of comparing the data change histories 115, 145. For example, in response to a call command for the runtime 144a that instructs the data difference detection unit 161 to compare the data change histories 115, 145, the execution unit 160 instructs the data difference detection unit 161 to compare the data change histories 115, 145 via the corresponding runtime 144a.

[0126] 20 is a diagram showing an example of a comparison process of data change histories. When the program 142a is executed, a command to compare the data change histories 115 and 145 instructs the data difference detection unit 161 to compare the data change histories 115 and 145 via the runtime 144a. The data difference detection unit 161 detects an incompatible operation based on the data change histories 115 and 145 and the row correspondence information 146. The data difference detection unit 161 then corrects the value of the migration destination environment of the data whose value has been changed by the incompatible operation to the value in the migration source environment, and sets the corrected value as the value of the corresponding data in the program 142a via the runtime 144a.

[0127] Furthermore, when the data difference detection unit 161 detects an incompatible operation, it outputs a difference occurrence log 162 indicating the difference between the value of specific data in the migration source environment and the value in the migration destination environment. Based on the difference occurrence log 162, the user can recognize that one or more incompatible operations have occurred.

[0128] Next, the program execution process will be described in detail. 21 is a flowchart showing an example of a program execution process procedure. The process shown in FIG. 21 will be described below in order of step number.

[0129] <Step S231> The execution unit 160 executes the instructions of the program written in the execution file 142 in order. [Step S232] If the executed command results in a call to run time for recording data contents, the execution unit 160 proceeds to step S233. If another command has been executed, the execution unit 160 proceeds to step S234.

[0130] [Step S233] The execution unit 160 uses runtime to register a log record indicating the contents of the data to be changed in the data change history 145. After that, the execution unit 160 proceeds to step S236.

[0131] [Step S234] If a runtime call for comparing the data change histories 115 and 145 has been made, the execution unit 160 proceeds to step S235. If a runtime call for comparing the data change histories 115 and 145 has not been made, the execution unit 160 proceeds to step S236.

[0132] [Step S235] The execution unit 160 calls the data difference detection unit 161 to execute a data change history comparison process, the details of which will be described later (see FIG. 22).

[0133] [Step S236] If the execution unit 160 has finished processing up to the last instruction of the program, it ends the program execution. If there is an unexecuted instruction, the execution unit 160 proceeds to step S231.

[0134] Next, the data change history comparison process will be described in detail. 22 is a flowchart showing an example of a procedure for a data change history comparison process. The process shown in FIG. 22 will be described below in order of step number.

[0135] [Step S241] The data difference detection unit 161 obtains, from the data change history 145 of the migration destination environment, the log record that was last recorded by an instruction to record a data value. [Step S242] The data difference detection unit 161 refers to the row correspondence information 146 and obtains the migration source row number corresponding to the row number (migration destination number) indicated in the obtained log record.

[0136] [Step S243] The data difference detection unit 161 judges whether or not to perform data comparison processing. For example, if the corresponding source row number is not set in the row correspondence information 146 and the source row number cannot be acquired, the data difference detection unit 161 judges not to perform comparison. On the other hand, if the source row number can be acquired, the data difference detection unit 161 judges to perform comparison. If the data difference detection unit 161 judges to perform comparison, it advances the process to step S244. On the other hand, if the data difference detection unit 161 judges not to perform comparison, it ends the data change history comparison process.

[0137] [Step S244] The data difference detection unit 161 obtains from the source data change history 115 a log record corresponding to the source row number obtained from the row correspondence information 146. [Step S245] The data difference detection unit 161 compares the two acquired log records and determines whether the data names indicated in those log records are the same. If the data names are the same, the data difference detection unit 161 proceeds to step S247. If the data names are different, the data difference detection unit 161 proceeds to step S246.

[0138] [Step S246] The data difference detection unit 161 determines that the programs executed when generating the data change histories 115, 145 do not match, and ends the data change history comparison process.

[0139] [Step S247] The data difference detection unit 161 determines whether there is a difference in the data formats indicated in the log records to be compared. Details of this determination process will be described later (see FIG. 23). If the data formats are different, the data difference detection unit 161 proceeds to step S248. If the data formats are the same, the data difference detection unit 161 proceeds to step S249.

[0140] [Step S248] The data difference detection unit 161 unifies the data formats of the data of the log records to be compared. For example, the data difference detection unit 161 converts the data format of one piece of data into the data format of the other piece of data. The data difference detection unit 161 also converts the data formats of both pieces of data of the log records to be compared into a predetermined data format. For example, the data difference detection unit 161 converts floating point numbers into a numeric format (for example, a character string of numbers and a decimal point).

[0141] <Step S249> The data difference detection unit 161 compares the values ​​of the data indicated in the log records to be compared. [Step S250] The data difference detection unit 161 determines whether the data values ​​are the same. If the data values ​​are the same, the data difference detection unit 161 ends the data change history comparison process. If the data values ​​are different, the data difference detection unit 161 proceeds to step S251.

[0142] [Step S251] The data difference detection unit 161 obtains the location where the difference occurred (source name, line number, data name) from the data change history 145 of the migration destination environment, and records it in the difference occurrence log 162.

[0143] [Step S252] The data difference detection unit 161 acquires the position where the incompatible data was set by the incompatible operation, and records it in the difference occurrence log 162. For example, the data difference detection unit 161 identifies the range of the invalid area where the incompatible data is stored. If the starting address is "12345674" and the size is 4 bytes, the 4-byte area starting from "12345674" is identified as the range of the invalid area where the incompatible data is stored. Next, the data difference detection unit 161 identifies a log record in which an address within the range of the identified invalid area is set, among the log records of the data change history 145 of the migration destination environment. If the incompatible data is stored as the content of the identified log record, the data difference detection unit 161 identifies the line number set in the log record as the location where the incompatible data is set.

[0144] [Step S253] The data difference detection unit 161 performs a data correction process to properly correct the incompatible data. The data correction process will be described in detail later (see FIG. 24). In this way, data difference detection unit 161 determines the line numbers of log records to be compared based on line correspondence information 146, compares corresponding log records in data change histories 115, 145, and determines whether an incompatible operation has occurred. If data difference detection unit 161 detects the occurrence of an incompatible operation, it corrects the value of the incompatible data generated by the incompatible operation to the correct value.

[0145] 23 is a diagram showing a first example of data comparison processing. The 13th log record of data change history 115c acquired on the migration source execution environment indicates that WK-ITEM-1 was translated as a binary integer with big endian. The 14th log record of data change history 115c indicates that WK-ITEM-2 was translated as a Japanese EUC character string.

[0146] The 13th log record of data change history 145c obtained in the migration destination execution environment indicates that WK-ITEM-1 was translated as a binary integer with little endian. The 14th log record of data change history 145c indicates that WK-ITEM-2 was translated as a UTF-16LE string.

[0147] When comparing log records, the data difference detection unit 161 first confirms that the data names match. If the data names do not match, the data difference detection unit 161 determines that the program processing logic is different (the programs are not the same) and stops the comparison. Even if the program logic is the same, the addresses differ depending on the execution environment, so the addresses indicated in the log records being compared may be different. In the example of Figure 23, the data name of the 13th log record is both "WK-ITEM-1". Furthermore, the data name of the 14th log record is both "WK-ITEM-2". Therefore, both data names match.

[0148] If the data names match, the data difference detection unit 161 determines whether the data formats match, and if the data formats match, compares the data values ​​without converting the data formats. On the other hand, if the data formats do not match, the data difference detection unit 161 makes the data formats match and then compares the data values.

[0149] When comparing the 13th log record, the data difference detection unit 161 changes the endian of the data of the log record in the data change history 115c acquired based on the source execution environment from big endian to little endian. The data difference detection unit 161 then aligns the endian and compares the data values. The meaning represented by the data value of the 13th log record is "123456" when expressed in decimal. The data difference detection unit 161 then outputs a comparison result record 171a indicating compatibility confirmation to the comparison result 171.

[0150] When comparing the 14th log record, the data difference detection unit 161 converts the character code of the data of the log record in the data change history 115c acquired based on the execution environment of the migration source into UTF16-LE. Then, the data difference detection unit 161 aligns the character codes and compares the data values. The data value of the 14th log record is already the same before the character code conversion. This occurs, for example, due to a data format conversion failure when generating the data files 143a, 143b, .... If one of the character codes to be compared, which have the same value, is converted, the comparison result will be a mismatch. Therefore, the data difference detection unit 161 outputs, to the comparison result 171, a comparison result record 171b indicating the detection of an incompatible operation.

[0151] The comparison result 171 stores the comparison result records 171a and 171b each time the log records are compared. The comparison result records 171a and 171b include the result, the serial number, the source file name, the line, the event type, and the data name. The result is information indicating whether or not there is compatibility, and is set to "OK" if compatibility is confirmed, and "NG" if an incompatible operation is detected. The serial number is the serial number of the compared log records. The source file name is the file name of the source file 111, 141 corresponding to the executable file 112, 142 executed to generate the data change history 115c, 145c to be compared. The line is the line number of the command statement in the source file 111, 141 corresponding to the command that records the compared log record. The event type is information indicating whether the compared log record is a log before the execution of the command accompanied by a data change (pre-execution) or after the execution of the command accompanied by a data change (post-execution). The data name is the data name of the data indicated in the compared log record.

[0152] The comparison result records 171a and 171b also include the data type, size, and value of the data in the source log record, and the data type, size, and value of the data in the destination log record.

[0153] For example, the comparison result record 171a indicates that the result is "OK," which means that compatibility has been confirmed. Meanwhile, the comparison result record 171b indicates that the result is "NG," which means that an incompatible operation has been detected.

[0154] When an incompatible operation is detected, the data difference detector 161 executes a data correction process. 24 is a flowchart showing an example of a procedure for data correction processing. The processing shown in FIG. 24 will be described below in order of step numbers.

[0155] [Step S261] The data difference detection unit 161 obtains a log record (source log record) of data corresponding to the incompatible data from the source data change history 115. The source log record is the log record obtained in step S244 of FIG.

[0156] [Step S262] The data difference detection unit 161 obtains the data format and value of the data to be corrected from the source log record. [Step S263] The data difference detection unit 161 obtains a log record (destination log record) of data corresponding to the incompatible data from the destination data change history 145. The destination log record is the log record obtained in step S241 of FIG.

[0157] [Step S264] The data difference detection unit 161 obtains the data format of the data to be corrected from the destination log record. [Step S265] The data difference detection unit 161 converts the data format of the source data from the source data format to the destination data format.

[0158] [Step S266] The data difference detection unit 161 sets the source data after the data format conversion in the variable area in which the incompatible data was stored. In this manner, the value of the incompatible data is corrected. By correcting the value of the incompatible data, processing can be performed correctly even after the incompatible operation has occurred.

[0159] 25 is a diagram showing an example of a correction process of the value of incompatible data. For example, the comparison result record 171b shows that an incompatible operation has occurred in which the source and destination have the same value even though the character codes are different. In this case, the data difference detection unit 161 converts the value "A4A2A4A4A4A6A1" of the content "aiu" of the source data 30 described in the Japanese EUC character code to the value of the content "aiu" in the UTF-16LE character code. As a result, the value of the source data 30 becomes "4230 4430 4630 0030".

[0160] The data difference detection unit 161 acquires the address and size of the log record from which the incompatible operation was detected in the data change history 145c of the destination environment. The data difference detection unit 161 identifies the variable area 102b in the memory 102a, which is the recording destination of the incompatible data, based on the acquired address and size. The data difference detection unit 161 then stores the value of the source data 30 after the data format conversion in the identified variable area 102b. This corrects the value of the incompatible data to a correct value.

[0161] By correcting the value of the incompatible data, the program can be executed correctly for processing following the point where the incompatible operation occurred. Therefore, even if there are multiple points where incompatible operations occur, these points can be detected in a single program execution on the development machine 100b in the migration destination environment. The detected points where incompatible operations occurred are recorded in the difference occurrence log 162. By checking the difference occurrence log 162, the user can understand the points where incompatible operations occurred in the source file 141.

[0162] Fig. 26 is a diagram showing an example of a difference occurrence log. In the example of Fig. 26, data of an invalid format is set by executing an instruction on line 100 of source file 141c, and the value is used to execute other source files 141d and 141e by executing instructions on lines 200 and 201. In this case, incompatible operations are detected during the execution of each of the two source files 141d and 141e. As a result, information corresponding to each of the two incompatible operations is registered in the difference occurrence log 162.

[0163] A record for each detected incompatible operation is registered in the difference occurrence log 162. Each record has fields for a serial number, a source name, a line number, a variable name, an address, a size, a data content, a malformed data setting source name, and a malformed data setting line number.

[0164] The serial number field is set to an identification number of the record. The source name field is set to the name of the source file containing the original instruction of the instruction (machine code) where the incompatible behavior was detected. The line number field is set to the line number of the original instruction of the instruction (machine code) where the incompatible behavior occurred. The variable name field is set to the variable name of the incompatible data. The address field is set to the memory address of the variable area where the incompatible data is recorded. The size field is set to the size of the variable area where the incompatible data is recorded. The data content field is set to the value of the incompatible data. The malformed data setting source name field is set to the name of the source file containing the original instruction of the instruction (machine code) where the incompatible data is recorded. The malformed data setting line number field is set to the line number of the original instruction of the instruction (machine code) where the incompatible data is recorded.

[0165] By outputting such a difference occurrence log 162, the user can easily grasp the location where each of the multiple incompatible operations occurs. Other embodiments In the second embodiment, development machines 100a and 100b are provided in addition to operation machines 200a and 200b, but application compatibility may also be verified using operation machines 200a and 200b.

[0166] In the second embodiment, the compilers 120 and 150 add instructions to record the value of data before and after an instruction that changes the data, but instructions to record the value of data may be added by means other than the compilers 120 and 150. For example, the development machines 100a and 100b can analyze a machine language program in an executable file that has already been generated, and add instructions to record the value of data before and after an instruction that changes the data.

[0167] In addition, in the second embodiment, an instruction to record the value of the data is added both before and after an instruction that changes the data, but the development machines 100a, 100b may add an instruction to record the value of the data only either before or after an instruction that changes the data.

[0168] Although the embodiments have been described above, the configurations of the parts shown in the embodiments can be replaced with other configurations having similar functions. Any other components or steps may be added. Furthermore, any two or more configurations (features) of the above-described embodiments may be combined. [Explanation of symbols]

[0169] 1a First verification target program 1b Second verification target program 2 First Executable Program 3 Second Executable Program 4. First Data 5. Second Data 6 First Data Change History 7 Second Data Change History 8 Incompatibility information 10. Information processing device 11 Storage section 12 Processing section 12a First program execution environment 12b Second program execution environment

Claims

1. adding a first recording instruction to a first execution program obtained by translating a first program to be verified, the first program including an instruction to be verified that modifies a data value, for a first program execution environment, the first recording instruction being for recording a content of a change made by a first data modification instruction obtained by translating the instruction to be verified; by executing the first execution program in the first program execution environment, acquiring a first data change history in which a change content of a value of the first data changed by the first data change instruction is recorded; adding a second recording instruction to a second execution program obtained by translating a second program to be verified, the second program to be verified being generated based on the first program to be verified, for a second program execution environment, the second recording instruction being for recording a change made by a second data modification instruction obtained by translating the instruction to be verified; an incompatibility detection instruction is added to the second execution program, which causes the second execution program to detect an incompatible operation caused by a difference in execution environment based on a second data change history indicating the change content of the value of the second data by the second data change instruction and the first data change history, and when the incompatible operation is detected, outputs incompatibility information indicating the location where the incompatible operation occurred, and modifies the value of the second data after the change by the second data change instruction based on the value of the first data after the change by the first data change instruction; executing the second execution program in the second program execution environment to obtain the incompatibility information; A verification program that causes a computer to execute a process.

2. the process of adding the incompatibility detection instruction converts a data format of a value of the first data after the first data modification instruction is executed, and adds the incompatibility detection instruction that modifies a value of the second data to the converted value; The verification program according to claim 1.

3. In the process of adding the first record instruction, a first record instruction is added to record the change content due to the first data change instruction, including a line number of the verification target instruction in the first verification target program with respect to the change content due to the first data change instruction; In the process of adding the second record instruction, a second record instruction is added to record the change content due to the second data modification instruction, including a line number of the verification target instruction in the second verification target program for the change content due to the second data modification instruction; In the process of acquiring the incompatibility information, when the incompatibility detection instruction is executed, the first data change history to be compared with the second data change history is identified based on a correspondence between line numbers in line correspondence information indicating a correspondence between lines between the first verification target program and the second verification target program when the incompatible operation is detected. The verification program according to claim 1.

4. and in the process of acquiring the incompatibility information, if there is no line number of the verification target instruction in the first verification target program that corresponds to a line number included in the second data change history in the line correspondence information, suppressing execution of the process of detecting the incompatible operation. The verification program according to claim 3.

5. A process of comparing the first program to be verified with the second program to be verified and generating the line correspondence information, The verification program according to claim 3, further comprising a program for causing the computer to execute the verification program.

6. In the process of acquiring the incompatibility information, the execution of the second execution program is continued even after the incompatible operation is detected by executing the incompatibility detection command, and the incompatibility operation is detected each time the incompatibility detection command becomes an execution target, and the incompatibility information indicating one or more of the incompatible operations is acquired.

6. The verification program according to claim 1.

7. adding a first recording instruction to a first execution program obtained by translating a first program to be verified, the first program including an instruction to be verified that modifies a data value, for a first program execution environment, the first recording instruction being for recording a content of a change made by a first data modification instruction obtained by translating the instruction to be verified; by executing the first execution program in the first program execution environment, acquiring a first data change history in which a change content of a value of the first data changed by the first data change instruction is recorded; adding a second recording instruction to a second execution program obtained by translating a second program to be verified, the second program to be verified being generated based on the first program to be verified, for a second program execution environment, the second recording instruction being for recording a change made by a second data modification instruction obtained by translating the instruction to be verified; an incompatibility detection instruction is added to the second execution program, which causes the second execution program to detect an incompatible operation caused by a difference in execution environment based on a second data change history indicating the change content of the value of the second data by the second data change instruction and the first data change history, and when the incompatible operation is detected, outputs incompatibility information indicating the location where the incompatible operation occurred, and modifies the value of the second data after the change by the second data change instruction based on the value of the first data after the change by the first data change instruction; executing the second execution program in the second program execution environment to obtain the incompatibility information; A verification method in which a process is performed by a computer.

8. a first recording instruction for recording changes made by a first data modification instruction obtained by translating a first verification target program including a verification target instruction that changes a data value into a first program execution environment; and executing the first execution program in the first program execution environment to obtain a first data modification history in which changes made to the value of the first data made by the first data modification instruction are recorded; and a second execution program in which a second verification target program generated based on the first verification target program is translated into a second program execution environment to record changes made by the second data modification instruction obtained by translating the verification target instruction into the second program execution environment. a processing unit that adds a second recording instruction to record the contents, causes the second execution program to detect an incompatible operation caused by a difference in execution environment based on a second data change history indicating the change contents of the value of the second data by the second data change instruction and the first data change history, and when the incompatible operation is detected, outputs incompatibility information indicating the location where the incompatible operation occurred, and adds an incompatibility detection instruction that corrects the value of the second data after the change by the second data change instruction based on the value of the first data after the change by the first data change instruction, and executes the second execution program in the second program execution environment, thereby acquiring the incompatibility information; An information processing device having the above configuration.

Citation Information

Patent Citations

  • Illegal part identification program, illegal part identification device, and illegal part identification method

    JP2022154258A