Program, system, and method for exhaustively visualizing aspects of data processing executed by computer according to source code

By assigning line numbers and syntax types to source code, the method generates a visualization diagram that simplifies the verification process, addressing the burden of complex program testing and ensuring data attribute verification.

JP2024160870AActive Publication Date: 2024-11-15MT INT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023076347
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-02
Publication Date
2024-11-15
Estimated Expiration
2043-05-02

AI Technical Summary

Technical Problem

White box testing for complex programs is burdensome due to the complexity of the program structure, making it impractical to verify the entire system, and black box testing lacks comprehensive data attribute verification.

Method used

Assigns line numbers and identifies syntax types to source code, decomposing complex constructs, and generates visualization data to create an execution path diagram showing data references, enabling easy error detection and data generation legitimacy verification.

Benefits of technology

Reduces the burden on verifiers by providing a clear visual representation of the execution path and data references, facilitating error detection and compliance with specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024160870000001_ABST
    Figure 2024160870000001_ABST
Patent Text Reader

Abstract

To provide a technology that reduces the burden on a verifier in program testing.SOLUTION: A visualization data generation unit 111 acquires a source code of a compiled program and assigns line numbers to the source code. The visualization data generation unit 111 then identifies a syntax type, the line number of a line to be executed next, the line number of a line to be executed if a condition indicated by a conditional statement is true, the line number of a line to be executed if the condition indicated by the conditional statement is false, the line number of an end line paired with a line of the conditional statement, the line number of a line next to the end line paired with the line of the conditional statement, the line number of a line that declares a domain of a variable (subject) generated by a command statement, the line number of a line that commands generation of the subject, and the line number of the command statement that designates an execution order. A visualization unit 112 generates a diagram that shows an execution path of the source code and a reference relation of data, using the source code, the line numbers identified by the visualization data generation unit 111, and data indicating a correspondence between the subject and the variable subject.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to techniques for testing source code of computer programs. [Background technology]

[0002] Testing to verify that a computer processes data as intended according to a computer program (hereinafter simply referred to as a "program") can be broadly divided into black box testing and white box testing.

[0003] Black box testing is a type of testing that does not focus on the contents of the program, but inputs sample values ​​into a computer and verifies whether the expected values ​​are output to determine whether the program passes or fails, whereas white box testing is a type of testing that focuses on the contents of the program, and verifies whether the program's structure, logic, control flow, etc. are written as intended to determine whether the program passes or fails.

[0004] For example, Patent Document 1 is a patent document that discloses a technology related to white-box testing. The test method disclosed in Patent Document 1 extracts a test target part and its dependent parts from the main code and generates a differential code based on these, so that a user can perform white-box testing using only the differential code. In addition, the test method disclosed in Patent Document 1 stores the test results and hash values ​​of copies of the test target parts and ensures identity with the main code based on the hash values, so that a user can confirm that a test was performed with the contents of the main code and the verification coverage of the test of the main code. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] JP 2021-103354 A Summary of the Invention [Problem to be solved by the invention]

[0006] Since white box testing is a test that comprehensively checks the contents of a program, it is difficult for description errors to remain in the program, but the more complex the structure of the program, the greater the burden on the verifier. As a result, for example, while white box testing is possible for each module that constitutes a program, performing white box testing for an entire system using a large number of modules often exceeds the verifier's capabilities and is practically impossible. In addition, while black box testing aims to ensure that the processing leading to input data and output data operates normally, the attributes of the data items themselves generated by the program and the process of generating them are left to the execution of the program, and it is often difficult to check whether the program is created according to the specifications.

[0007] In view of the above, the present invention provides a technique for reducing the burden on a verifier in testing a program. [Means for solving the problem]

[0008] The present invention provides a computer-implemented method for identifying a first line number that is a line number for each of a plurality of lines constituting source code of a compiled program; for each of a plurality of lines included in the source code, if the line is a single syntax, identifying a syntax type that is a type of the syntax, and if the line is a multiple syntax, decomposing the multiple syntaxes into a plurality of single syntaxes and then identifying a syntax type for each of the multiple single syntaxes; for each of a plurality of lines included in the source code, identifying a second line number that is a line number of a line to be executed next to the line; and for each syntax whose syntax type identified in the process of identifying the syntax type among the plurality of syntaxes included in the source code is a conditional statement, identifying a third line number that is the line number of a line to be executed when a condition indicated by the conditional statement is true, a fourth line number that is the line number of a line to be executed when a condition indicated by the conditional statement is false, a fifth line number that is the line number of an end line that is paired with the line of the conditional statement, and a fifth line number that is the line number of a line following the end line. a process of identifying a line where the syntax type identified in the process of identifying the syntax type is a command statement involving the generation of a variable, and for each of the identified lines, identifying a variable generated by the command statement of the line as a subject, and identifying a first coordinate having as its components the line number of the line that declares the domain of the subject and the line number of the line that commands the generation of the subject; a process of identifying a line where the syntax type identified in the process of identifying the syntax type is a command statement that specifies an execution order, and identifying a second coordinate having as its components the line number of the line; a process of identifying a variable subject that is the subject used in generating the subject, for each of the subjects identified in the process of identifying the subject; and a process of generating data indicating the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, and a correspondence between the identified subject and the variable subject used in generating the subject, as data to be input to a visualization program. Effect of the Invention

[0009] According to the data generated by a computer in accordance with the program of the present invention, a computer running a general-purpose visualization program can use the data to draw a diagram showing the execution path of source code and the reference relationship of data. Then, a program verifier can easily find a description error contained in the source code by looking at the diagram. Furthermore, according to one embodiment of the present invention, a program verifier can also check the legitimacy of the data generation process by looking at the data items including the generated attributes. As a result, according to the present invention, the burden on the verifier in testing a program is reduced. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a diagram showing the configuration of a computer that executes a program according to an embodiment of the present invention. [Diagram 2] 1 is a diagram showing a functional configuration of a data processing device according to an embodiment of the present invention; [Diagram 3] 4 is a diagram illustrating a part of a source code acquired by an acquisition unit of the data processing device according to the embodiment of the present invention. FIG. [Figure 4] FIG. 2 is a diagram illustrating a portion of source code to which the first line number (SX) has been assigned by a line number assignment unit of the data processing device according to one embodiment of the present invention. [Diagram 5] FIG. 13 is an example of a portion of source code in which a line containing multiple syntax fragments is broken down into multiple single syntax fragments, the syntax type of each syntax fragment is identified, and the identified syntax type is associated with each line by a syntax type identification unit of a data processing device according to one embodiment of the present invention. [Figure 6] 1 is a diagram illustrating a portion of source code in which the data type of a subject is associated with a line of the subject, the data type being identified by a data type identification unit of a data processing device according to an embodiment of the present invention; [Figure 7] 11 is a diagram illustrating a portion of source code in which the second to sixth line numbers (SY, SZ1 to SZ4) identified by a line number identification unit of the data processing device according to one embodiment of the present invention are associated with each line. FIG. [Figure 8]FIG. 13 is a diagram illustrating a portion of source code in which a subject identified by a subject identification unit of a data processing device according to one embodiment of the present invention, a first coordinate ([SX1,SX2]), and a second coordinate ([,SX2] or [SX2,SX2]) are associated with each line. [Figure 9] 1 is a diagram illustrating a portion of source code in which a variable subject corresponding to a subject, identified by a variable subject identification unit of a data processing device according to an embodiment of the present invention, is associated with a line of the subject; [Figure 10] 11 is a diagram illustrating a part of an execution aspect diagram displayed by a display device using visualization data generated by a data processing device according to an embodiment of the present invention. [Figure 11] FIG. 13 is a diagram showing a functional configuration of a data processing device according to a modified example of the present invention. [Figure 12] 13 is a diagram illustrating an example of authenticity check information identified by an authenticity check information identifying unit of a data processing device according to a modified example of the present invention, in association with each of a plurality of syntaxes included in a source code. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] [Embodiment] A program P according to one embodiment of the present invention and processing performed by a computer in accordance with the program P will be described below.

[0012] 1 is a diagram showing the configuration of a computer 10 that executes a program P. The computer 10 is a computer for a general terminal device. The computer 10 includes a processor 101 that performs various data processing according to the program, a memory 102 that stores various data including the program, a communication interface 103 that performs data communication with an external device via a communication network, and an input / output interface 104 that performs input / output of data with the external device without passing through a communication network.

[0013] A display device 20 such as a liquid crystal display and an input device 30 such as a keyboard and a mouse are connected to the input / output interface 104. The computer 10 may incorporate one or both of the display device 20 and the input device 30. The computer 10 may store part of data in an external storage device connected via the communication interface 103 or the input / output interface 104, in addition to the built-in memory 102. The display device 20 and the input device 30 may be configured as a single device, such as a touch screen.

[0014] In addition to the program P, the memory 102 stores a visualization program Q. The visualization program Q is a general-purpose program known as a graphing tool. The computer 10 performs data processing in accordance with the visualization program Q to generate a diagram showing the relationships between a plurality of objects, and causes the display device 20 to display the diagram.

[0015] Fig. 2 is a diagram showing the functional configuration of a data processing device 11 that is realized when the computer 10 executes a program P and a visualization program Q. That is, when the processor 101 of the computer 10 executes data processing in accordance with the program P and the visualization program Q that are persistently stored in the memory 102, the data processing device 11 that includes the components shown in Fig. 2 is realized. The functional configuration of the data processing device 11 shown in Fig. 2 will be described below.

[0016] The data processing device 11 mainly includes a visualization data generation unit 111 and a visualization unit 112. The visualization data generation unit 111 is realized by the computer 10 executing a program P. On the other hand, the visualization unit 112 is realized by the computer 10 executing a visualization program Q.

[0017] The visualization data generation unit 111 includes a memory unit 1110, an acquisition unit 1111, a line number assignment unit 1112, a data type identification unit 1113, a syntax type identification unit 1114, a line number identification unit 1115, a subject identification unit 1116, a variable subject identification unit 1117, a data generation unit 1118, and a data output unit 1119.

[0018] The storage unit 1110 stores various data. The data stored in the storage unit 1110 includes source code acquired by an acquisition unit 1111, intermediate data generated by a line number assignment unit 1112 through a data type identification unit 1113, and final data (visualization data) generated by a data generation unit 1118.

[0019] The acquisition unit 1111 acquires the source code S of the compiled program R from an external device.

[0020] Fig. 3 is a diagram illustrating a portion of the source code S acquired by the acquisition unit 1111. The source code S illustrated in Fig. 3 is written in COBOL, but the programming language used to write the source code S is not limited to COBOL.

[0021] The line number assigning unit 1112 assigns a first line number (hereinafter, referred to as "SX"), which is a line number, to each of a plurality of lines constituting the source code S acquired by the acquiring unit 1111. Fig. 4 is a diagram illustrating a part of the SX assigned to the source code S by the line number assigning unit 1112.

[0022] The syntax type identification unit 1114, for each of multiple lines included in the source code S, identifies the syntax type that is the type of the syntax if the line is a single syntax, and if the line is multiple syntaxes, it decomposes the multiple syntaxes into multiple single syntaxes and then identifies the syntax type that is the type of each of the multiple single syntaxes.

[0023] It should be noted that syntax refers to a statement that corresponds to one unit of a data processing function (addition, subtraction, multiplication, division, function call, etc.) that a computer has.

[0024] FIG. 5 is a diagram illustrating a portion of source code S in which a line containing multiple syntax elements has been broken down by the syntax type identification unit 1114 into multiple single syntax elements, the syntax type of each syntax element has been identified, and the identified syntax type has been associated with each line.

[0025] For example, in Figure 5, the line "UNTIL EMPNO = 999." in the source code S with SX of 33 is a line that combines a syntax type of "call statement," a syntax type of "conditional statement (true)," and a syntax type of "conditional statement (false)," and therefore these are broken down into different lines.

[0026] The syntax types differ depending on the programming language. For example, in the case of COBOL, the syntax types are: fixed statement, constant value statement, assignment statement, pseudo assignment, input statement, pseudo input, output statement, pseudo output, field statement, field argument, condition statement (true), condition statement (false), loop statement start, loop statement end, function call, user-defined function call, translation statement, comment statement, control statement, endif, then, else, control condition, call statement, section end, section start, control input, control output, paragraph, condition input, paragraph end, etc.

[0027] The data type specification unit 1113 specifies the data type of each of the subjects, which are variables generated by the command statement.

[0028] 6 is a diagram illustrating a portion of source code S in which a data type identified by data type identification unit 1113 is associated with a line of the subject of the data type. In the example of FIG. 6, the data type column lists a PICTURE character string (PIC), which is a character string expressing a data type in COBOL. For example, the data type "X(3)" in the line with 21 in the SX column in the list of FIG. 6 means a three-digit alphanumeric data type. Therefore, when source code S is written in a programming language other than COBOL, the data type is listed as a data type in an expression format corresponding to that programming language.

[0029] The line number identification unit 1115 identifies a second line number (hereinafter referred to as "SY"), which is the line number of the line that will be executed next after each of the multiple lines included in the source code S acquired by the acquisition unit 1111, and corresponds the identified line numbers to each line of the source code S.

[0030] In addition to identifying SY, the line number identifying unit 1115 also identifies the following third to sixth line numbers and associates these identified line numbers with each line of the source code S.

[0031] Third line number (hereinafter referred to as "SZ1"): for each syntax whose syntax type identified by syntax type identification unit 1114 is a conditional statement, the line number of the line that is executed when the condition indicated by the conditional statement is true.

[0032] Fourth line number (hereinafter referred to as "SZ2"): for each syntax whose syntax type identified by syntax type identification unit 1114 is a conditional statement, the line number of the line that is executed if the condition indicated by the conditional statement is false.

[0033] Fifth line number (hereinafter, referred to as "SZ3"): for each syntax whose syntax type identified by the syntax type identification unit 1114 is a conditional statement, the line number of the end line that is paired with the line of the conditional statement.

[0034] Sixth line number (hereinafter, referred to as "SZ4"): for each syntax whose syntax type identified by syntax type identification unit 1114 is a conditional statement, the line number of the line next to the end line that is paired with the line of the conditional statement.

[0035] FIG. 7 is a diagram illustrating a part of source code S in which SY and SZ1 to SZ4 identified by line number identification unit 1115 are associated with each line.

[0036] The subject identification unit 1116 identifies lines whose syntax type is an imperative statement involving the generation of a variable, and for each of the identified lines, identifies the variable generated by the imperative statement of the line as the subject, and identifies a first coordinate ([SX1, SX2]) whose components are the line number (hereinafter referred to as "SX1") of the line that declares the domain of the subject, and the line number (hereinafter referred to as "SX2") of the line that commands the generation of the subject.

[0037] In addition, the subject identification unit 1116 identifies lines whose syntax type is a command statement that specifies the execution order, and for each of the identified lines, identifies a second coordinate ([,SX2] or [SX2,SX2]) whose component is “SX2”, which is the line number of the line.

[0038] Fig. 8 is a diagram illustrating a portion of source code S in which a subject identified by the subject identification unit 1116, a first coordinate ([SX1,SX2]), and a second coordinate ([,SX2] or [SX2,SX2]) are associated with each line. In Fig. 8, the subject and the first coordinate are included in the "Subject (variable)" column, and the second coordinate is included in the "Statement that determines the execution order" column.

[0039] The variable subject specification unit 1117 specifies, for each subject, the variable subject (if there are multiple, each of them) that is the subject used in generating the subject.

[0040] FIG. 9 is a diagram illustrating a part of source code S in which a variable subject corresponding to a subject identified by the variable subject identification unit 1117 is associated with a line of the subject.

[0041] The data generation unit 1118 generates data including the source code S, the first line number (SX), the second line number (SY), the third line number to the sixth line number (SZ1 to SZ4), the first coordinate ([SX1, SX2]), the second coordinate ([, SX2] or [SX2, SX2]), data indicating the correspondence between the subject and the variable subject used to generate the subject, and data indicating the data type of the subject, as data to be input to the visualization program (hereinafter referred to as "visualization data").

[0042] The data output unit 1119 outputs the visualization data generated by the data generation unit 1118 to the visualization unit 112 .

[0043] The visualization unit 112 uses the visualization data output from the visualization data generation unit 111 to generate a diagram (hereinafter referred to as the "execution aspect diagram G") representing the execution path of the source code S and the data reference relationship, outputs the generated execution aspect diagram G to the display device 20, and causes the display device 20 to display the execution aspect diagram G.

[0044] FIG. 10 illustrates a part of the execution aspect diagram G displayed by the display device 20. The execution aspect diagram G includes indicators (rectangular indicators in the example of FIG. 10) corresponding to each of a plurality of syntaxes included in the source code S, arrows indicating the execution order of statements corresponding to those syntaxes, and, when data is referenced between those syntaxes, arrows pointing from the indicator of the syntax that references the data to the indicator of the syntax that is the reference destination. The indicator corresponding to the syntax displays the contents of the line of that syntax. The indicator corresponding to the subject displays the data type of the subject (the ○○ part of "PIC: ○○" in FIG. 11). As described above, "PIC" means a character string (PICTURE character string) that expresses a data type in COBOL. Therefore, when the source code S is written in a programming language other than COBOL, the data type corresponding to that programming language is displayed in the execution aspect diagram G instead of PIC.

[0045] A verifier who tests program R can easily grasp the execution aspect of source code S of program R by looking at execution aspect diagram G, i.e., the order of statements executed by a computer according to source code S and the data reference relationships passed between those statements. Therefore, the verifier can easily determine whether the execution aspect of source code S shown in execution aspect diagram G complies with the specifications of program R. In addition, the data type of the subject is also displayed in execution aspect diagram G. As a result, the burden on the verifier in testing program R is reduced.

[0046] [Variations] The above-described embodiment is one embodiment of the present invention, and may be modified in various ways within the scope of the technical concept of the present invention. Examples of such modifications are shown below. Two or more of the following modifications may be combined as appropriate.

[0047] (1) The data processing device 11 may have a function of extracting a construct that requires confirmation from among a plurality of constructs contained in the source code S, based on the visualization data.

[0048] 11 is a diagram showing a functional configuration of a data processing device 11 according to this modification (hereinafter referred to as "modification (1)"). The data processing device 11 according to modification (1) includes a confirmation-required syntax extraction unit 113 in addition to the visualization data generation unit 111 and visualization unit 112 included in the data processing device 11 according to the above-described embodiment.

[0049] The to-be-confirmed syntax extraction unit 113 includes a validation information specification unit 1131 and a syntax extraction unit 1132 .

[0050] The authenticity confirmation information identification unit 1131 acquires visualization data output from the data output unit 1119 of the visualization data generation unit 111, and based on the visualization data, identifies, for each of the multiple syntaxes included in the source code S, as authenticity confirmation information, whether the syntax is a syntax with neither a reference nor a reference source (hereinafter referred to as a "floating island syntax"), a syntax with a reference source but no reference (hereinafter referred to as a "syntax without output lines"), a syntax with a reference destination but no reference source (hereinafter referred to as a "syntax without input lines"), or a syntax with only a reference source that follows the execution command order (hereinafter referred to as a "recursive syntax").

[0051] FIG. 12 is an example of a diagram showing a plurality of syntax elements included in the source code S in association with the authenticity check information identified by the authenticity check information identifying unit 1131. In FIG.

[0052] The syntax extraction unit 1132 extracts syntax that requires confirmation from among a plurality of syntaxes included in the source code S, based on a combination of the syntax type and the legitimacy check information identified by the legitimacy check information identification unit 1131. Examples of syntax that requires confirmation include the following syntaxes.

[0053] Area statement with no input line Area arguments with no input lines Fixed statements with no input lines Constant statement with no input line Input statement with no input line Pseudo input with no input line An assignment statement with no input or output lines or both Pseudo assignments with no input or output lines or both Output statement with no output line Pseudo output with no output line

[0054] The syntax extraction unit 1132 outputs to the visualization unit 112 syntax data indicating the extracted syntaxes to be checked.

[0055] Based on the to-be-confirmed syntax data received from the to-be-confirmed syntax extraction unit 113, the visualization unit 112 modifies the execution modalities diagram G so that the portion corresponding to the syntax requiring confirmation is displayed in a manner different from the other portions, and causes the display device 20 to display the modified execution modalities diagram G. Here, the different manner may be any of a bold display, a blinking display, a display in a different color, a display surrounded by a frame, and the like. The verifier can easily test the source code S by checking whether there is any problem with the syntax that is displayed in a manner different from the other portions in the execution modalities diagram G.

[0056] In addition, the visualization unit 112 may, for example, display a list of constructions requiring confirmation (or a list of constructions for displaying the constructions requiring confirmation in a manner different from other constructions) on the display device 20, modify the portion of the execution modalities diagram G corresponding to a construction selected by the verifier from the list so as to be displayed in a manner different from other portions, and display the modified execution modalities diagram G on the display device 20.

[0057] (2) The present invention provides a program exemplified by the above-mentioned program P, a system exemplified by a data processing device 11 that performs processing in accordance with the above-mentioned program P, and a method performed by a computer in accordance with the above-mentioned program P. [Explanation of symbols]

[0058] 10...computer, 11...data processing device, 20...display device, 30...input device, 101...processor, 102...memory, 103...communication interface, 104...input / output interface, 111...visualization data generation unit, 112...visualization unit, 113...confirmation syntax extraction unit, 1110...storage unit, 1111...acquisition unit, 1112...line number assignment unit, 1113...data type identification unit, 1114...syntax type identification unit, 1115...line number identification unit, 1116...subject identification unit, 1117...variable subject identification unit, 1118...data generation unit, 1119...data output unit, 1131...validity confirmation information identification unit, 1132...syntax extraction unit.

Claims

1. On the computer, A process of assigning a first line number to each of a plurality of lines constituting a source code of a compiled program; a process of identifying a syntax type of each of a plurality of lines included in the source code when the line is a single syntax, and, when the line is a multiple syntax, decomposing the multiple syntaxes into a plurality of single syntaxes and then identifying a syntax type of each of the multiple single syntaxes; A process of identifying a second line number, which is a line number of a line to be executed next to each of a plurality of lines included in the source code; a process of identifying, for each of the constructs whose syntax type is a conditional statement identified in the process of identifying the syntax type among the multiple constructs included in the source code, a third line number which is the line number of a line which is executed when a condition indicated by the conditional statement is true, a fourth line number which is the line number of a line which is executed when a condition indicated by the conditional statement is false, a fifth line number which is the line number of an end line which is paired with the line of the conditional statement, and a sixth line number which is the line number of the line following the end line; a process of identifying lines whose syntax type identified in the process of identifying the syntax type is a command statement involving the generation of a variable, and for each of the identified lines, identifying a variable generated by the command statement of the line as a subject, and identifying a first coordinate whose components are the line number of a line that declares the domain of the subject and the line number of a line that commands the generation of the subject; a process of identifying lines whose syntax type identified in the process of identifying the syntax type is a command statement that specifies an execution order, and identifying a second coordinate having the line number of each of the identified lines as a component; A process of identifying a variable subject, which is a subject used in generating each of the subjects identified in the process of identifying the subject; generating data indicating the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, and a correspondence relationship between the identified subject and a variable subject used to generate the identified subject, as data to be input to a visualization program; A program for executing.

2. The computer running the visualization program is A process of displaying a diagram showing the execution path of the source code and the reference relationship of data on a display device using the data input to the visualization program. The program according to claim 1 for executing the above-mentioned.

3. The computer includes: a process of identifying, based on data input to the visualization program, for each of a plurality of constructs included in the source code, whether the construct is a construct having neither a reference nor a reference source, a construct having a reference source but no reference, a construct having a reference destination but no reference source, a construct that references itself, or a construct whose reference source is only a reference source following the execution command sequence, as information for verifying authenticity; extracting a syntax that requires confirmation from among a plurality of syntaxes included in the source code based on a combination of the syntax type and the authenticity confirmation information; The program according to claim 1 for executing the above-mentioned.

4. The computer running the visualization program is A process of displaying, on a display device, a diagram showing an execution path of the source code using data input to the visualization program, the diagram showing the part corresponding to the syntax requiring confirmation extracted in the extraction process in a different manner from other parts. The program according to claim 3 for executing the above-mentioned.

5. The computer includes: executing a process of identifying a data type of each of the subjects identified in the process of identifying the subject; In a process of generating data to be input to the visualization program, data to be input to the visualization program is generated, the data including data indicating the data type; The computer running the visualization program is A process of displaying a diagram representing the execution path of the source code, the data reference relationship, and the data type of the subject on a display device using the data input to the visualization program. The program according to claim 1 for executing the above-mentioned.

6. By running the program, A process of assigning a first line number to each of a plurality of lines constituting a source code of a compiled program; a process of identifying a syntax type of each of a plurality of lines included in the source code when the line is a single syntax, and, when the line is a multiple syntax, decomposing the multiple syntaxes into a plurality of single syntaxes and then identifying a syntax type of each of the multiple single syntaxes; A process of identifying a second line number, which is a line number of a line to be executed next to each of a plurality of lines included in the source code; a process of identifying, for each of the constructs whose syntax type is a conditional statement identified in the process of identifying the syntax type among the multiple constructs included in the source code, a third line number which is the line number of a line which is executed when a condition indicated by the conditional statement is true, a fourth line number which is the line number of a line which is executed when a condition indicated by the conditional statement is false, a fifth line number which is the line number of an end line which is paired with the line of the conditional statement, and a sixth line number which is the line number of the line following the end line; a process of identifying lines whose syntax type identified in the process of identifying the syntax type is a command statement involving the generation of a variable, and for each of the identified lines, identifying a variable generated by the command statement of the line as a subject, and identifying a first coordinate whose components are the line number of a line that declares the domain of the subject and the line number of a line that commands the generation of the subject; a process of identifying lines whose syntax type identified in the process of identifying the syntax type is a command statement that specifies an execution order, and identifying a second coordinate having the line number of each of the identified lines as a component; A process of identifying a variable subject, which is a subject used in generating each of the subjects identified in the process of identifying the subject; generating data indicating the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, and a correspondence relationship between the identified subject and a variable subject used to generate the identified subject, as data to be input to a visualization program; A system that performs the above.

7. The computer assigning a first line number to each of a plurality of lines constituting a source code of the compiled program; a step of, for each of a plurality of lines included in the source code, identifying a syntax type that is a type of the syntax when the line is a single syntax, and, when the line is a multiple syntax, decomposing the multiple syntaxes into a plurality of single syntaxes and then identifying a syntax type that is a type of each of the multiple single syntaxes; Identifying, for each of a plurality of lines included in the source code, a second line number that is a line number of a line to be executed next to the corresponding line; a step of identifying, for each of the constructs whose syntax type is a conditional statement identified in the step of identifying the syntax type among the multiple constructs included in the source code, a third line number which is the line number of a line which is executed when a condition indicated by the conditional statement is true, a fourth line number which is the line number of a line which is executed when a condition indicated by the conditional statement is false, a fifth line number which is the line number of an end line which is paired with the line of the conditional statement, and a sixth line number which is the line number of the line following the end line; a step of identifying lines whose syntax type identified in the step of identifying the syntax type is an imperative statement involving the generation of a variable, and for each of the identified lines, identifying a variable generated by the imperative statement of the line as a subject, and identifying a first coordinate whose components are the line number of a line that declares the domain of the subject and the line number of a line that commands the generation of the subject; a step of identifying lines whose syntax type identified in the step of identifying the syntax type is a command statement that specifies an execution order, and identifying, for each of the identified lines, a second coordinate whose component is a line number of the line; for each of the subjects identified in the subject identification step, identifying a variable subject that is a subject used in generating the subject; generating data indicating the source code, the first line number through the sixth line number, the first coordinate, the second coordinate, and a correspondence relationship between the identified subject and a variable subject used to generate the identified subject, as data to be input to a visualization program; A method for providing the above.

Citation Information

Patent Citations

  • Program display device, program display system, program display method, and program display program

    JP2017004282A

  • Automated software bug discovery and assessment

    US11494295B1

  • Program testing method

    JP2021103354A