JP7295599B1 - A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code - Google Patents

A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code Download PDF

Info

Publication number
JP7295599B1
JP7295599B1 JP2023076347A JP2023076347A JP7295599B1 JP 7295599 B1 JP7295599 B1 JP 7295599B1 JP 2023076347 A JP2023076347 A JP 2023076347A JP 2023076347 A JP2023076347 A JP 2023076347A JP 7295599 B1 JP7295599 B1 JP 7295599B1
Authority
JP
Japan
Prior art keywords
line
line number
syntax
subject
identifying
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2023076347A
Other languages
Japanese (ja)
Inventor
敏夫 関
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to JP2023076347A priority Critical patent/JP7295599B1/en
Application granted granted Critical
Publication of JP7295599B1 publication Critical patent/JP7295599B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

【課題】プログラムのテストにおける検証者の負担を軽減する技術を提供する。【解決手段】可視化用データ生成部111は、コンパイル済みのプログラムのソースコードを取得し、そのソースコードに対し行番号を付与する。続いて、可視化用データ生成部111は、構文種別、次に実行される行の行番号、条件文が示す条件が真である場合に実行される行の行番号、条件文が示す条件が偽である場合に実行される行の行番号、条件文の行と対となる終了行の行番号、条件文の行と対となる終了行の次の行の行番号、命令文により生成される変数(主語)の領域を宣言している行の行番号、当該主語の生成を命じる行の行番号、実行順序を指定する命令文の行番号を特定する。可視化部112は、ソースコードと、可視化用データ生成部111が特定した行番号と、主語と変数主語の対応関係とを示すデータを用いて、ソースコードの実行経路とデータの参照関係とを表す図を生成する。【選択図】図2A technique for reducing the burden on a verifier in program testing is provided. A visualization data generation unit 111 acquires source code of a compiled program and assigns line numbers to the source code. Subsequently, the visualization data generation unit 111 determines the syntax type, the line number of the line to be executed next, the line number of the line to be executed when the condition indicated by the conditional statement is true, and the condition indicated by the conditional statement is false. The line number of the line to be executed if , the line number of the end line paired with the conditional line, the line number of the line next to the end line paired with the conditional line, and the statement generated by Identify the line number of the line that declares the area of the variable (subject), the line number of the line that commands the generation of the subject, and the line number of the statement that specifies the execution order. The visualization unit 112 uses the source code, the line number specified by the visualization data generation unit 111, and the data indicating the correspondence relationship between the subject and the variable subject to represent the execution path of the source code and the reference relationship of the data. Generate diagrams. [Selection drawing] Fig. 2

Description

本発明は、コンピュータプログラムのソースコードをテストするための技術に関する。 The present invention relates to techniques for testing source code of computer programs.

コンピュータプログラム(以下、単に「プログラム」という)に従いコンピュータが意図されたとおりにデータ処理を行うことを確認するためのテストには、大きく、ブラックボックステストとホワイトボックステストがある。 Generally, there are black-box tests and white-box tests in tests for confirming that a computer processes data as intended according to computer programs (hereinafter simply referred to as "programs").

ブラックボックステストは、プログラムの内容には注目せず、コンピュータにサンプル値を入力し、想定どおりの値が出力されるかを検証することにより、プログラムの合否を判定するテストである。一方、ホワイトボックステストは、プログラムの内容に注目し、プログラムの構造、ロジック、制御の流れ等が意図されたとおりに記述されているか否かを検証することにより、プログラムの合否を判定するテストである。 A black-box test is a test that judges whether a program passes or fails by inputting sample values into the computer and verifying whether the expected values are output without paying attention to the contents of the program. On the other hand, white-box testing focuses on the contents of the program and verifies whether the structure, logic, control flow, etc. of the program are written as intended. be.

例えば、ホワイトボックステストに関する技術を開示している特許文献として、特許文献1がある。特許文献1に開示されている試験方法は、本体コードからテスト対象部分と、その依存部分とを抽出し、これらに基づき差分コードを生成するため、ユーザは、差分コードのみでホワイトボックステストを行うことができる、とされている。また、特許文献1に開示されている試験方法は、テスト結果及びテスト対象部分のコピーのハッシュ値を記憶し、当該ハッシュ値に基づき本体コードとの同一性を担保するため、ユーザは、本体コードの内容でテストが行われたこと、及び本体コードのテストの検証網羅度を確認することができる、とされている。 For example, there is Patent Document 1 as a patent document disclosing a technique related to a white box test. The test method disclosed in Patent Document 1 extracts the part to be tested and its dependent part from the main code and generates the differential code based on them, so the user can perform the white-box test only with the differential code. is said to be possible. Further, the test method disclosed in Patent Document 1 stores the test result and the hash value of the copy of the test target portion, and based on the hash value, ensures the identity with the main body code. It is said that it is possible to confirm that the test was performed with the contents of , and the verification coverage of the test of the main code.

特開2021-103354号公報JP 2021-103354 A

ホワイトボックステストは、プログラムの内容を網羅的に確認するテストであるため、プログラムに記述誤りが残りにくいが、プログラムの構造が複雑になる程、検証者の負担が増大する。その結果、例えば、プログラムを構成するモジュール単位であればホワイトボックステストは可能であっても、多数のモジュールが用いられたシステム全体に関しホワイトボックステストを行うことは、その負担が検証者の能力を超え、実質的に不可能な場合が多い。また、ブラックボックステストは、入力データと出力データに至る処理に関して正常に稼働することを目的としているが、プログラムが生成するデータ項目自体の属性及び生成される過程の確認はプログラムの実行任せになっており、仕様通りにプログラウが作成されているか否かの確認を行うことは難しい場合が多い。 Since the white-box test is a test that exhaustively checks the contents of the program, description errors are less likely to remain in the program. As a result, for example, even if it is possible to perform a white-box test for each module that constitutes a program, performing a white-box test for the entire system that uses many modules will impose a burden on the verifier's ability. exceeding and often practically impossible. The purpose of black box testing is to ensure that the processes leading up to input data and output data operate normally. Therefore, it is often difficult to check whether the program has been created according to the specifications.

上記を鑑み、本発明は、プログラムのテストにおける検証者の負担を軽減する技術を提供する。 In view of the above, the present invention provides a technique for reducing the burden on the verifier in testing programs.

本発明は、コンピュータに、コンピュータに、コンパイル済みのプログラムのソースコードを構成する複数の行の各々に行番号である第1行番号を付与する処理と、前記ソースコードに含まれる複数の行の各々に関し、当該行が単一の構文である場合は当該構文の種別である構文種別を特定し、当該行が複数の構文である場合は当該複数の構文を複数の単一の構文に分解した後、当該複数の単一の構文の各々の種別である構文種別を特定する処理と、前記ソースコードに含まれる複数の行の各々に関し、当該行の次に実行される行の行番号である第2行番号を特定する処理と、前記ソースコードに含まれる複数の構文のうち前記構文種別を特定する処理において特定された構文種別が条件文である構文の各々に関し、当該条件文が示す条件が真である場合に実行される行の行番号である第3行番号と、当該条件文が示す条件が偽である場合に実行される行の行番号である第4行番号と、当該条件文の行と対となる終了行の行番号である第5行番号と、当該終了行の次の行の行番号である第6行番号とを特定する処理と、前記構文種別を特定する処理において特定された構文種別が変数の生成を伴う命令文である行を特定し、特定した行の各々に関し、当該行の命令文により生成される変数を主語として特定するとともに、当該主語の領域を宣言している行の行番号と、当該主語の生成を命じる行の行番号とを成分とする第1座標を特定する処理と、前記構文種別を特定する処理において特定された構文種別が実行順序を指定する命令文である行を特定し、特定した行の各々に関し、当該行の行番号を成分とする第2座標を特定する処理と、前記主語を特定する処理において特定された主語の各々に関し、当該主語の生成に用いられる主語である変数主語を特定する処理と、前記ソースコードと、前記第1行番号乃至前記第6行番号と、前記第1座標と、前記第2座標と、特定した主語と当該主語の生成に用いられる変数主語の対応関係とを示すデータとを、可視化プログラムに入力されるデータとして生成する処理とを実行させるためのプログラムを提供する。 The present invention provides a computer with a process of giving a first line number, which is a line number, to each of a plurality of lines constituting a source code of a compiled program, and For each, if the line is a single syntax, the syntax type, which is the type of the syntax, is specified, and if the line is multiple syntaxes, the multiple syntaxes are decomposed into multiple single syntaxes. Then, for each of the plurality of lines included in the source code, the line number of the line to be executed next to the line is specified. The condition indicated by the conditional statement for each of the syntaxes whose syntax type specified in the process of specifying the second line number and the process of specifying the syntax type among the plurality of syntaxes included in the source code is a conditional statement is true, the third line number is the line number of the line to be executed if the condition indicated by the conditional is true, the fourth line number is the line number of the line to be executed if the condition indicated by the conditional statement is false, and the conditional A process of identifying the fifth line number, which is the line number of the end line paired with the sentence line, and the sixth line number, which is the line number of the line next to the end line; and the process of identifying the syntax type. Identify the line whose syntax type is an imperative sentence with variable generation, and for each identified line, identify the variable generated by the imperative sentence of the line as the subject, and the area of the subject A process of identifying the first coordinate whose components are the line number of the line that declares and the line number of the line that commands the generation of the subject; A process of identifying a line that is an imperative statement specifying, for each of the identified lines, a process of identifying a second coordinate whose component is the line number of the line, and each of the subjects identified in the process of identifying the subject Regarding, a process of identifying a variable subject that is a subject used to generate the subject, the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, Provided is a program for executing a process of generating, as data to be input to a visualization program, data indicating the correspondence between a specified subject and a variable subject used to generate the subject.

本発明に係るプログラムに従いコンピュータが生成するデータによれば、汎用的な可視化プログラムを実行中のコンピュータが当該データを用いて、ソースコードの実行経路とデータの参照関係とを表す図を描くことができる。そして、プログラムの検証者は、その図を見ることによって、ソースコードに含まれる記述ミスを容易に発見できる。また、本発明の一実施態様によれば、プログラムの検証者は、生成される属性を含むデータ項目を見ることによって、データ生成処理の正統性も確認ができる。その結果、本発明によれば、プログラムのテストにおける検証者の負担が軽減される。 According to the data generated by the computer according to the program according to the present invention, a computer executing a general-purpose visualization program can use the data to draw a diagram representing the execution path of the source code and the reference relationship of the data. can. A program verifier can easily find description errors in the source code by looking at the diagram. Further, according to one embodiment of the present invention, the program verifier can confirm 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 the program is reduced.

本発明の一実施形態にかかるプログラムを実行するコンピュータの構成を示した図。The figure which showed the structure of the computer which runs the program concerning one Embodiment of this invention. 本発明の一実施形態にかかるデータ処理装置の機能構成を示した図。The figure which showed the functional structure of the data processor concerning one Embodiment of this invention. 本発明の一実施形態にかかるデータ処理装置の取得部が取得するソースコードの一部を例示した図。The figure which illustrated a part of the source code which the acquisition part of the data processing apparatus concerning one Embodiment of this invention acquires. 本発明の一実施形態にかかるデータ処理装置の行番号付与部により第1行番号(SX)が付与されたソースコードの一部を例示した図。FIG. 4 is a diagram exemplifying a portion of source code to which a first line number (SX) is assigned by the line number assigning unit of the data processing device according to the embodiment of the present invention; 本発明の一実施形態にかかるデータ処理装置の構文種別特定部により、複数の構文である行が複数の単一の構文に分解され、各構文の構文種別が特定されて、特定された構文種別が各行に対応付けられたソースコードの一部を例示した図。The syntax type specifying unit of the data processing device according to the embodiment of the present invention decomposes a line that is a plurality of syntaxes into a plurality of single syntaxes, specifies the syntax type of each syntax, and specifies the specified syntax type. The figure which illustrated the part of the source code by which was matched with each line. 本発明の一実施形態にかかるデータ処理装置のデータ型特定部により特定された、主語のデータ型が、当該主語の行に対応付けられたソースコードの一部を例示した図。The figure which illustrated the part of the source code by which the data type of the subject identified by the data type identification part of the data processing apparatus concerning one Embodiment of this invention was matched with the line of the said subject. 本発明の一実施形態にかかるデータ処理装置の行番号特定部により特定された第2行番号~第6行番号(SY、SZ1~SZ4)が各行に対応付けられたソースコードの一部を例示した図。An example of a part of the source code in which the second to sixth line numbers (SY, SZ1 to SZ4) specified by the line number specifying unit of the data processing device according to one embodiment of the present invention are associated with each line. figure. 本発明の一実施形態にかかるデータ処理装置の主語特定部により特定された主語と、第1座標([SX1,SX2])と、第2座標([ ,SX2]又は[SX2,SX2])が各行に対応付けられたソースコードの一部を例示した図。The subject specified by the subject specifying unit of the data processing device according to the embodiment of the present invention, the first coordinates ([SX1, SX2]), and the second coordinates ([, SX2] or [SX2, SX2]) are The figure which illustrated the part of the source code matched with each line. 本発明の一実施形態にかかるデータ処理装置の変数主語特定部により特定された、主語に応じた変数主語が、当該主語の行に対応付けられたソースコードの一部を例示した図。The figure which illustrated the part of the source code by which the variable subject according to the subject identified by the variable subject identification part of the data processing apparatus concerning one Embodiment of this invention was matched with the line of the said subject. 本発明の一実施形態にかかるデータ処理装置が生成する可視化用データを用いて表示装置により表示される実行様相図の一部を例示したもの。FIG. 4 illustrates part of an execution mode diagram displayed by a display device using visualization data generated by a data processing device according to an embodiment of the present invention; FIG. 本発明の一変形例にかかるデータ処理装置の機能構成を示した図。The figure which showed the functional structure of the data processing apparatus concerning the example of a changed completely type of this invention. 本発明の一変形例にかかるデータ処理装置の正統性確認用情報特定部により特定された正統性確認用情報を、ソースコードに含まれる複数の構文の各々に対応付けて示した図の例。FIG. 10 is an example of a diagram showing the authenticity confirmation information identified by the information identification unit for authenticity confirmation of the data processing apparatus according to the modified example of the present invention in association with each of a plurality of syntaxes included in the source code;

[実施形態]
以下に、本発明の一実施形態にかかるプログラムPと、プログラムPに従いコンピュータが行う処理を説明する。
[Embodiment]
A program P according to an embodiment of the present invention and processing performed by a computer according to the program P will be described below.

図1は、プログラムPを実行するコンピュータ10の構成を示した図である。コンピュータ10は、一般的な端末装置用のコンピュータである。コンピュータ10は、プログラムに従い各種データ処理を行うプロセッサ101と、プログラムを含む各種データを記憶するメモリ102と、外部の装置との間で通信ネットワークを介したデータ通信を行う通信インタフェース103と、外部の装置との間で通信ネットワークを介さないデータの入出力を行う入出力インタフェース104を備える。 FIG. 1 is a diagram showing the configuration of a computer 10 that executes a program P. As shown in FIG. The computer 10 is a computer for general terminal devices. The computer 10 includes a processor 101 that performs various data processing according to a 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 external device. An input/output interface 104 is provided for inputting/outputting data to/from the device without using a communication network.

入出力インタフェース104には、液晶ディスプレイ等の表示装置20と、キーボード、マウス等の入力装置30が接続されている。なお、コンピュータ10が表示装置20と入力装置30の一方又は両方を内蔵していてもよい。また、コンピュータ10が、内蔵するメモリ102に加えて、通信インタフェース103又は入出力インタフェース104を介して接続された外部の記憶装置にデータの一部を記憶してもよい。また、タッチスクリーンのように、表示装置20と入力装置30が一つの装置として構成されてもよい。 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 . Note that the computer 10 may incorporate one or both of the display device 20 and the input device 30 . Also, the computer 10 may store part of the data in an external storage device connected via the communication interface 103 or the input/output interface 104 in addition to the internal memory 102 . Moreover, the display device 20 and the input device 30 may be configured as one device like a touch screen.

メモリ102には、プログラムPに加えて、可視化プログラムQが記憶されている。可視化プログラムQは、いわゆるグラフ化ツールと呼ばれる汎用プログラムである。コンピュータ10は、可視化プログラムQに従うデータ処理を行うことにより、複数のオブジェクトの間の関係を示す図を生成し、表示装置20にその図を表示させる。 In addition to the program P, a visualization program Q is stored in the memory 102 . The visualization program Q is a general-purpose program called a so-called graphing tool. By performing data processing according to the visualization program Q, the computer 10 generates a diagram showing the relationships between a plurality of objects, and causes the display device 20 to display the diagram.

図2は、コンピュータ10がプログラムP及び可視化プログラムQを実行する際に実現されるデータ処理装置11の機能構成を示した図である。すなわち、コンピュータ10のプロセッサ101が、メモリ102に持続的に記憶されているプログラムP及び可視化プログラムQに従うデータ処理を実行すると、図2に示される構成部を備えるデータ処理装置11が実現される。以下に、図2に示されるデータ処理装置11の機能構成を説明する。 FIG. 2 is a diagram showing the functional configuration of the data processing device 11 implemented when the computer 10 executes the program P and the visualization program Q. As shown in FIG. That is, when the processor 101 of the computer 10 executes data processing according to the program P and the visualization program Q persistently stored in the memory 102, the data processing device 11 having 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.

データ処理装置11は、大きく、可視化用データ生成部111と、可視化部112を備える。可視化用データ生成部111はコンピュータ10がプログラムPを実行することにより実現される。一方、可視化部112はコンピュータ10が可視化プログラムQを実行するにより実現される。 The data processing device 11 roughly includes a visualization data generation unit 111 and a visualization unit 112 . The visualization data generator 111 is implemented by executing the program P by the computer 10 . On the other hand, the visualization unit 112 is implemented by executing the visualization program Q by the computer 10 .

可視化用データ生成部111は、記憶部1110、取得部1111、行番号付与部1112、データ型特定部1113、構文種別特定部1114、行番号特定部1115、主語特定部1116、変数主語特定部1117、データ生成部1118、データ出力部1119を備える。 The visualization data generation unit 111 includes a storage 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, and a variable subject identification unit 1117. , a data generator 1118 and a data output unit 1119 .

記憶部1110は、各種データを記憶する。記憶部1110が記憶するデータには、取得部1111が取得するソースコード、行番号付与部1112乃至データ型特定部1113が生成する中間データ、データ生成部1118が生成する最終データ(可視化用データ)が含まれる。 Storage unit 1110 stores various data. The data stored in the storage unit 1110 includes source code acquired by the acquisition unit 1111, intermediate data generated by the line number assignment unit 1112 to the data type identification unit 1113, and final data (visualization data) generated by the data generation unit 1118. is included.

取得部1111は、外部の装置から、コンパイル済みのプログラムRのソースコードSを取得する。 The acquisition unit 1111 acquires the source code S of the compiled program R from an external device.

図3は、取得部1111が取得するソースコードSの一部を例示した図である。図3に例示のソースコードSは、COBOLにより記述されているが、ソースコードSの記述に用いられるプログラミング言語はCOBOLに限られない。 FIG. 3 is a diagram exemplifying part of the source code S acquired by the acquisition unit 1111. As shown in FIG. The source code S illustrated in FIG. 3 is written in COBOL, but the programming language used for writing the source code S is not limited to COBOL.

行番号付与部1112は、取得部1111が取得したソースコードSを構成する複数の行の各々に、行番号である第1行番号(以下、「SX」という)を付与する。図4は、ソースコードSに対し、行番号付与部1112により付与されたSXの一部を例示した図である。 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 forming the source code S acquired by the acquiring unit 1111 . FIG. 4 is a diagram exemplifying a part of SX assigned to the source code S by the line number assigning unit 1112. As shown in FIG.

構文種別特定部1114は、ソースコードSに含まれる複数の行の各々に関し、当該行が単一の構文である場合は当該構文の種別である構文種別を特定し、当該行が複数の構文である場合は当該複数の構文を複数の単一の構文に分解した後、当該複数の単一の構文の各々の種別である構文種別を特定する。 The syntax type identifying unit 1114 identifies, for each of a plurality of lines included in the source code S, a syntax type that is the type of the syntax if the line is a single syntax, and determines that the line is a plurality of syntaxes. In some cases, after decomposing the plurality of syntaxes into a plurality of single syntaxes, a syntax type, which is the type of each of the plurality of single syntaxes, is specified.

なお、構文とは、コンピュータが備えるデータ処理の機能(加算、減算、乗算、除算、関数呼び出し等)の1単位に応じた文を意味する。 Note that the syntax means a statement corresponding to one unit of data processing functions (addition, subtraction, multiplication, division, function call, etc.) provided in a computer.

図5は、構文種別特定部1114により、複数の構文である行が複数の単一の構文に分解され、また、各構文の構文種別が特定されて、特定された構文種別が各行に対応付けられたソースコードSの一部を例示した図である。 In FIG. 5, the syntax type identifying unit 1114 decomposes a line of multiple syntaxes into a plurality of single syntaxes, specifies the syntax type of each syntax, and associates the specified syntax type with each line. 3 is a diagram exemplifying a part of the source code S obtained; FIG.

例えば、図5において、ソースコードSのうちSXが33の行「UNTIL EMPNO = 999.」は、構文種別が「呼出文」の構文と、構文種別が「条件文(真)」の構文と、構文種別が「条件文(偽)」の構文が1つとなった行であるため、それらが異なる行に分解されている。 For example, in FIG. 5, the line "UNTIL EMPNO = 999." in which SX is 33 in the source code S has a syntax with a syntax type of "call statement", a syntax with a syntax type of "conditional statement (true)", Since the line has one syntax with the syntax type "conditional statement (false)", it is decomposed into different lines.

なお、構文種別は、プログラム言語毎に異なる。例えば、COBOLの場合、構文種別は、定置文、定値文、代入文、疑似代入、入力文、疑似入力、出力文、疑似出力、領域文、領域引数、条件文(真)、条件文(偽)、繰返文開始、繰返文終了、関数呼出、ユーザー定義関数呼出、翻訳文、注釈文、制御文、endif、then、else、制御条件、呼出文、セクション終了、セクション開始、制御入力、制御出力、段落、条件入力、段落終了等である。 Note that the syntax type differs for each programming language. For example, in COBOL, the syntax types are fixed statement, fixed value statement, assignment statement, pseudo assignment, input statement, pseudo input, output statement, pseudo output, area statement, area argument, conditional statement (true), conditional statement (false ), repeat statement start, repeat 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, conditional input, paragraph end, and so on.

データ型特定部1113は、命令文により生成される変数である主語の各々のデータ型を特定する。 The data type identification unit 1113 identifies the data type of each subject that is a variable generated by the imperative sentence.

図6は、データ型特定部1113により特定されたデータ型が、当該データ型の主語の行に対応付けられたソースコードSの一部を例示した図である。なお、図6の例では、データ型の欄にはCOBOLにおいてデータ型を表現する文字列であるPICTURE文字列(PIC)が記載されている。例えば、図6のリストのSX欄が21の行のデータ型「X(3)」は、英数字3桁のデータ型を意味する。従って、ソースコードSがCOBOL以外のプログラミング言語で記載されている場合、データ型にはそのプログラミング言語に応じた表現形式のデータ型が記載される。 FIG. 6 is a diagram exemplifying part of the source code S in which the data type specified by the data type specifying unit 1113 is associated with the subject line of the data type. In the example of FIG. 6, the PICTURE character string (PIC), which is a character string representing the data type in COBOL, is described in the data type column. For example, the data type "X(3)" in the row with 21 in the SX column of the list in FIG. 6 means a data type of three alphanumeric characters. Therefore, when the source code S is written in a programming language other than COBOL, the data type describes the data type of the representation format according to the programming language.

行番号特定部1115は、取得部1111が取得したソースコードSに含まれる複数の行の各々に関し、当該行の次に実行される行の行番号である第2行番号(以下、「SY」という)を特定し、特定したそれらの行番号をソースコードSの各行に対応付ける。 For each of the plurality of lines included in the source code S acquired by the acquisition unit 1111, the line number specifying unit 1115 determines a second line number (hereinafter referred to as "SY") that is the line number of the line to be executed next to the line. ) are specified, and the specified line numbers are associated with each line of the source code S.

また、行番号特定部1115は、SYの特定に加え、以下の第3行番号乃至第6行番号を特定し、特定したそれらの行番号をソースコードSの各行に対応付ける。 In addition to identifying SY, the line number identifying unit 1115 identifies the following third to sixth line numbers, and associates the identified line numbers with each line of the source code S.

第3行番号(以下、「SZ1」という):構文種別特定部1114により特定された構文種別が条件文である構文の各々に関し、当該条件文が示す条件が真である場合に実行される行の行番号。 Third line number (hereinafter referred to as "SZ1"): a line executed when the condition indicated by the conditional statement is true for each of the statements whose syntax type is conditional statement specified by the syntax type specifying unit 1114 line number.

第4行番号(以下、「SZ2」という):構文種別特定部1114により特定された構文種別が条件文である構文の各々に関し、当該条件文が示す条件が偽である場合に実行される行の行番号。 Fourth line number (hereinafter referred to as "SZ2"): a line that is executed when the condition indicated by the conditional statement is false for each of the statements whose syntax type is a conditional statement specified by the syntax type specifying unit 1114. line number.

第5行番号(以下、「SZ3」という):構文種別特定部1114により特定された構文種別が条件文である構文の各々に関し、当該条件文の行と対となる終了行の行番号。 Fifth line number (hereinafter referred to as "SZ3"): For each syntax whose syntax type specified by the syntax type specifying unit 1114 is a conditional statement, the line number of the end line paired with the conditional statement line.

第6行番号(以下、「SZ4」という):構文種別特定部1114により特定された構文種別が条件文である構文の各々に関し、当該条件文の行と対となる終了行の次の行の行番号。 Sixth line number (hereinafter referred to as "SZ4"): For each of the syntaxes whose syntax type is conditional statement specified by the syntax type specifying unit 1114, the line number.

図7は、行番号特定部1115により特定されたSYとSZ1~SZ4が各行に対応付けられたソースコードSの一部を例示した図である。 FIG. 7 is a diagram exemplifying part of the source code S in which SY and SZ1 to SZ4 specified by the line number specifying unit 1115 are associated with each line.

主語特定部1116は、構文種別が変数の生成を伴う命令文である行を特定し、特定した行の各々に関し、当該行の命令文により生成される変数を主語として特定するとともに、当該主語の領域を宣言している行の行番号(以下、「SX1」という)と、当該主語の生成を命じる行の行番号(以下、「SX2」という)とを成分とする第1座標([SX1,SX2])を特定する。 The subject identifying unit 1116 identifies lines whose syntax type is an imperative sentence with variable generation, and for each of the identified lines, identifies a variable generated by the imperative sentence of the line as the subject, and The first coordinate ([SX1, SX2]).

また、主語特定部1116は、構文種別が実行順序を指定する命令文である行を特定し、特定した行の各々に関し、当該行の行番号である「SX2」を成分とする第2座標([ ,SX2]又は[SX2,SX2])を特定する。 In addition, the subject identification unit 1116 identifies lines whose syntax type is an imperative statement specifying the order of execution, and for each of the identified lines, the second coordinate ( [, SX2] or [SX2, SX2]).

図8は、主語特定部1116により特定された主語と、第1座標([SX1,SX2])と、第2座標([ ,SX2]又は[SX2,SX2])が各行に対応付けられたソースコードSの一部を例示した図である。なお、図8において、主語及び第1座標は「主語(変数)」欄に含まれ、第2座標は「実行順序を決定する命令文」欄に含まれた形で記載されている。 FIG. 8 shows a source in which the subject specified by the subject specifying unit 1116, the first coordinates ([SX1, SX2]), and the second coordinates ([, SX2] or [SX2, SX2]) are associated with each line. FIG. 3 is a diagram exemplifying a portion of code S; 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 to determine execution order" column.

変数主語特定部1117は、主語の各々に関し、当該主語の生成に用いられる主語である変数主語(複数ある場合、それらの各々)を特定する。 For each subject, the variable subject identifying unit 1117 identifies a variable subject (each of them if there are multiple subjects) that is the subject used to generate the subject.

図9は、変数主語特定部1117により特定された、主語に応じた変数主語が、当該主語の行に対応付けられたソースコードSの一部を例示した図である。 FIG. 9 is a diagram exemplifying a part of the source code S in which the variable subject corresponding to the subject specified by the variable subject specifying unit 1117 is associated with the line of the subject.

データ生成部1118は、ソースコードSと、第1行番号(SX)、第2行番号(SY)、第3行番号~第6行番号(SZ1~SZ4)、第1座標([SX1,SX2])、第2座標([ ,SX2]又は[SX2,SX2])、主語と当該主語の生成に用いられる変数主語の対応関係とを示すデータ、及び、主語のデータ型を示すデータを含むデータを、可視化プログラムに入力されるデータ(以下、「可視化用データ」という)として生成する。 The data generator 1118 generates 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 coordinates ([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 including data indicating the data type of the subject is generated as data to be input to the visualization program (hereinafter referred to as “visualization data”).

データ出力部1119は、データ生成部1118が生成した可視化用データを、可視化部112に出力する。 The data output unit 1119 outputs the visualization data generated by the data generation unit 1118 to the visualization unit 112 .

可視化部112は、可視化用データ生成部111から出力される可視化用データを用いて、ソースコードSの実行経路とデータの参照関係とを表す図(以下、「実行様相図G」という)を生成し、生成した実行様相図Gを表示装置20に出力し、表示装置20に実行様相図Gを表示させる。 The visualization unit 112 uses the visualization data output from the visualization data generation unit 111 to generate a diagram representing the execution path of the source code S and the reference relationship of the data (hereinafter referred to as “execution mode diagram G”). Then, the generated execution mode diagram G is output to the display device 20, and the execution mode diagram G is displayed on the display device 20. FIG.

図10は、表示装置20により表示される実行様相図Gの一部を例示したものである。実行様相図Gは、ソースコードSに含まれる複数の構文の各々に応じた表示体(図10の例では長方形の表示体)と、それらの構文に応じた命令文の実行順序を示す矢印と、それらの構文の間でデータの参照が行われる場合、それらのデータの参照元の構文の表示体から参照先の構文の表示体へと向かう矢印を含む。なお、構文に応じた表示体には、その構文の行の内容が表示される。また、主語に応じた表示体には、当該主語のデータ型(図11においては、「PIC:○○」の○○部分)が表示される。なお、「PIC」とは、既述のように、COBOLにおけるデータ型を表現する文字列(PICTURE文字列)を意味する。従って、ソースコードSがCOBOL以外のプログラミング言語により記述されている場合、PICに代えて、そのプログラミング言語に応じたデータ型が実行様相図Gに表示される。 FIG. 10 illustrates a part of the execution mode diagram G displayed by the display device 20. As shown in FIG. The execution mode diagram G includes display bodies (rectangular display bodies in the example of FIG. 10) corresponding to each of a plurality of syntaxes included in the source code S, and arrows indicating the order of execution of statements corresponding to those syntaxes. , where data references are made between those constructs, contain arrows pointing from the referencing syntactic representation of the data to the referencing syntactic representation. In addition, the content of the line of the syntax is displayed on the display corresponding to the syntax. In addition, the data type of the subject (in FIG. 11, ◯◯ part of “PIC: ◯◯”) is displayed on the display corresponding to the subject. As mentioned above, "PIC" means a character string (PICTURE character string) representing 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 the programming language is displayed in the execution aspect diagram G instead of PIC.

プログラムRのテストを行う検証者は、実行様相図Gを見て、プログラムRのソースコードSの実行様相、すなわち、ソースコードSに従い、コンピュータが実行する命令文の順序と、それらの構文間で引き渡されるデータの参照関係を容易に把握することができる。従って、検証者は、実行様相図Gに示されるソースコードSの実行様相が、プログラムRの仕様に従っているか否かを容易に判定できる。また、実行様相図Gには、主語のデータ型も表示される。その結果、検証者によるプログラムRのテストの作業における負担が軽減される。 A verifier who tests the program R looks at the execution mode diagram G and sees the execution mode of the source code S of the program R, that is, the order of statements executed by the computer according to the source code S, and the syntax between them It is possible to easily grasp the reference relationship of the transferred data. Therefore, the verifier can easily determine whether or not the execution mode of the source code S shown in the execution mode diagram G complies with the program R specifications. The execution mode diagram G also displays the data type of the subject. As a result, the burden of testing program R on the verifier is reduced.

[変形例]
上述した実施形態は本発明の一実施形態であって、本発明の技術的思想の範囲内において様々に変形され得る。以下にそれらの変形の例を示す。なお、以下の変形例の2以上が適宜、組み合わされてもよい。
[Modification]
The embodiment described above is one embodiment of the present invention, and can be variously modified within the scope of the technical idea of the present invention. Examples of these modifications are shown below. Note that two or more of the following modifications may be combined as appropriate.

(1)データ処理装置11が、可視化用データに基づいて、ソースコードSに含まれる複数の構文の中から、確認を要する構文を抽出する機能を備えてもよい。 (1) The data processing device 11 may have a function of extracting a syntax requiring confirmation from among multiple syntaxes included in the source code S based on the visualization data.

図11は、この変形例(以下、「変形例(1)」という)にかかるデータ処理装置11の機能構成を示した図である。変形例(1)にかかるデータ処理装置11は、上述した実施形態にかかるデータ処理装置11が備える可視化用データ生成部111と、可視化部112に加え、要確認構文抽出部113を備える。 FIG. 11 is a diagram showing the 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 visualization data generation unit 111 and a visualization unit 112 included in the data processing device 11 according to the above-described embodiment, and a confirmation required syntax extraction unit 113 .

要確認構文抽出部113は、正統性確認用情報特定部1131と、構文抽出部1132を備える。 The confirmation-required syntax extraction unit 113 includes an authenticity confirmation information identification unit 1131 and a syntax extraction unit 1132 .

正統性確認用情報特定部1131は、可視化用データ生成部111のデータ出力部1119から出力される可視化用データを取得し、当該可視化用データに基づき、ソースコードSに含まれる複数の構文の各々に関し、当該構文が、参照先及び参照元のいずれも存在しない構文(以下、「浮島構文」という)、参照元は存在するが参照先が存在しない構文(以下、「出力線なし構文」という)、参照先は存在するが参照元が存在しない構文(以下、「入力線なし構文」という)、参照元が実行命令順序に従う参照元のみである構文(以下、「再帰構文」という)、のいずれであるかを、正統性確認用情報として特定する。 The authenticity confirmation information specifying 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, each of a plurality of syntaxes included in the source code S , the syntax is a syntax in which neither the reference destination nor the reference source exists (hereinafter referred to as "floating island syntax"), or a syntax in which the reference source exists but the reference destination does not exist (hereinafter referred to as "no output line syntax") , a syntax in which the referent exists but the referrer does not exist (hereinafter referred to as a "syntax without input line"), or a syntax in which the referrer only follows the order of execution instructions (hereinafter referred to as a "recursive syntax"). is specified as information for authenticity confirmation.

図12は、ソースコードSに含まれる複数の構文の各々に関し、正統性確認用情報特定部1131により特定された正統性確認用情報を対応付けて示した図の例である。 FIG. 12 is an example of a diagram showing each of a plurality of syntaxes included in the source code S in association with the authenticity confirmation information identified by the information identification unit 1131 for confirmation of authenticity.

構文抽出部1132は、ソースコードSに含まれる複数の構文の中から、構文種別と、正統性確認用情報特定部1131により特定された正統性確認用情報との組み合わせに基づき、確認を要する構文を、要確認構文として抽出する。要確認構文としては、例えば、以下のような構文が挙げられる。 The syntax extracting unit 1132 selects a syntax to be confirmed from among a plurality of syntaxes included in the source code S based on the combination of the syntax type and the authenticity confirmation information specified by the authenticity confirmation information specifying unit 1131. is extracted as checkable syntax. Examples of the confirmation-required syntax include the following syntax.

入力線がない領域文
入力線がない領域引数
入力線がない定置文
入力線がない定値文
入力線がない入力文
入力線がない擬似入力
入力線及び出力線の一方又は両方がない代入文
入力線及び出力線の一方又は両方がない擬似代入
出力線がない出力文
出力線がない擬似出力
Region statements without input lines Region arguments without input lines Fixed statements without input lines Constant statements without input lines Input statements without input lines Pseudo-inputs without input lines Assignment statements without input and/or output lines Input Pseudo assignment without line and/or output line Output statement without output line Pseudo output without output line

構文抽出部1132は、抽出した要確認構文を示す要確認構文データを可視化部112に出力する。 The syntax extraction unit 1132 outputs confirmation required syntax data indicating the extracted confirmation required syntax to the visualization unit 112 .

可視化部112は、要確認構文抽出部113から受け取った要確認構文データに基づき、実行様相図Gを、確認を要する構文に応じた部分を他の部分と異なる態様で表すように変更し、変更した実行様相図Gを表示装置20に表示させる。ここで、異なる態様とは、太字表示、点滅表示、異なる色による表示、枠で囲む表示、等のいずれであってもよい。検証者は、実行様相図Gに他の部分と異なる態様で表されている構文に問題がないかを確認することで、ソースコードSのテストを容易に行うことができる。 Based on the confirmation-required syntax data received from the confirmation-required syntax extraction unit 113, the visualization unit 112 changes the execution mode diagram G so that the part corresponding to the syntax requiring confirmation is represented in a different manner from the other parts. The display device 20 is caused to display the execution mode diagram G thus obtained. Here, the different aspect may be any of bold display, blinking display, display in different colors, display surrounded by a frame, and the like. A verifier can easily test the source code S by confirming whether there is any problem with the syntax represented in the execution mode diagram G in a manner different from that of other parts.

また、可視化部112が、例えば、要確認構文のリスト(又は、要確認構文を他の構文と異なる態様で表示する構文のリスト)を表示装置20に表示させ、実行様相図Gのうち、そのリストから検証者により選択された構文に応じた部分を他の部分と異なる態様で表すように変更し、変更した実行様相図Gを表示装置20に表示させてもよい。 In addition, the visualization unit 112 causes the display device 20 to display, for example, a list of confirmation-required syntaxes (or a list of syntaxes that display the confirmation-required syntaxes in a different manner from other syntaxes), and The part corresponding to the syntax selected by the verifier from the list may be changed so as to be displayed in a different manner from the other parts, and the changed execution mode diagram G may be displayed on the display device 20 .

(2)本発明は、上述したプログラムPに例示されるプログラム、上述したプログラムPに従い処理を行うデータ処理装置11に例示されるシステム、及び、上述したプログラムPに従いコンピュータが行う方法を提供する。 (2) The present invention provides a program exemplified by the program P described above, a system exemplified by the data processing apparatus 11 that performs processing according to the program P described above, and a method performed by a computer according to the program P described above.

10…コンピュータ、11…データ処理装置、20…表示装置、30…入力装置、101…プロセッサ、102…メモリ、103…通信インタフェース、104…入出力インタフェース、111…可視化用データ生成部、112…可視化部、113…要確認構文抽出部、1110…記憶部、1111…取得部、1112…行番号付与部、1113…データ型特定部、1114…構文種別特定部、1115…行番号特定部、1116…主語特定部、1117…変数主語特定部、1118…データ生成部、1119…データ出力部、1131…正統性確認用情報特定部、1132…構文抽出部。 DESCRIPTION OF SYMBOLS 10... Computer, 11... Data processing apparatus, 20... Display apparatus, 30... Input device, 101... Processor, 102... Memory, 103... Communication interface, 104... Input/output interface, 111... Data generation part for visualization, 112... Visualization Section 113 Check-required syntax extraction section 1110 Storage section 1111 Acquisition section 1112 Line number assignment section 1113 Data type identification section 1114 Syntax type identification section 1115 Line number identification section 1116 Subject identification unit 1117 Variable subject identification unit 1118 Data generation unit 1119 Data output unit 1131 Authenticity confirmation information identification unit 1132 Syntax extraction unit.

Claims (7)

コンピュータに、
コンパイル済みのプログラムのソースコードを構成する複数の行の各々に行番号である第1行番号を付与する処理と、
前記ソースコードに含まれる複数の行の各々に関し、当該行が単一の構文である場合は当該構文の種別である構文種別を特定し、当該行が複数の構文である場合は当該複数の構文を複数の単一の構文に分解した後、当該複数の単一の構文の各々の種別である構文種別を特定する処理と、
前記ソースコードに含まれる複数の行の各々に関し、当該行の次に実行される行の行番号である第2行番号を特定する処理と、
前記ソースコードに含まれる複数の構文のうち前記構文種別を特定する処理において特定された構文種別が条件文である構文の各々に関し、当該条件文が示す条件が真である場合に実行される行の行番号である第3行番号と、当該条件文が示す条件が偽である場合に実行される行の行番号である第4行番号と、当該条件文の行と対となる終了行の行番号である第5行番号と、当該終了行の次の行の行番号である第6行番号とを特定する処理と、
前記構文種別を特定する処理において特定された構文種別が変数の生成を伴う命令文である行を特定し、特定した行の各々に関し、当該行の命令文により生成される変数を主語として特定するとともに、当該主語の領域を宣言している行の行番号と、当該主語の生成を命じる行の行番号とを成分とする第1座標を特定する処理と、
前記構文種別を特定する処理において特定された構文種別が実行順序を指定する命令文である行を特定し、特定した行の各々に関し、当該行の行番号を成分とする第2座標を特定する処理と、
前記主語を特定する処理において特定された主語の各々に関し、当該主語の生成に用いられる主語である変数主語を特定する処理と、
前記ソースコードと、前記第1行番号乃至前記第6行番号と、前記第1座標と、前記第2座標と、特定した主語と当該主語の生成に用いられる変数主語の対応関係とを示すデータとを、可視化プログラムに入力されるデータとして生成する処理と
を実行させるためのプログラム。
to the computer,
a process of assigning a first line number, which is a line number, to 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, specifying the syntax type, which is the type of the syntax, and if the line is a plurality of syntaxes, the multiple syntaxes is decomposed into a plurality of single syntaxes, and then identifying the syntax type that is the type of each of the plurality of single syntaxes;
A process of identifying a second line number, which is the line number of the line to be executed next to the line, for each of the plurality of lines included in the source code;
A line executed when the condition indicated by the conditional statement is true for each of the plurality of statements included in the source code, with respect to each of the statements whose syntax type is a conditional statement specified in the processing for specifying the syntax type. 3rd line number which is the line number of , 4th line number which is the line number of the line to be executed when the condition indicated by the conditional statement is false, and the end line number which is paired with the conditional statement line a process of identifying the fifth line number, which is the line number, and the sixth line number, which is the line number of the line next to the end line;
Identifying a line in which the syntax type identified in the process of identifying the syntax type is an imperative sentence with variable generation, and identifying a variable generated by the imperative sentence of the identified line as a subject for each of the identified lines. A process of specifying a first coordinate whose components are the line number of the line declaring the area of the subject and the line number of the line commanding the generation of the subject;
Identifying lines in which the syntax type identified in the processing for identifying the syntax type is an imperative statement specifying an execution order, and identifying, for each of the identified lines, a second coordinate whose component is the line number of the line. processing;
A process of identifying a variable subject, which is a subject used to generate the subject, for each of the subjects identified in the subject identifying process;
Data indicating the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, and the correspondence relationship between the specified subject and the variable subject used to generate the subject. A program for executing a process of generating and as data to be input to a visualization program.
前記可視化プログラムを実行中の前記コンピュータに、
前記可視化プログラムに入力されるデータを用いて前記ソースコードの実行経路とデータの参照関係とを表す図を表示装置に表示させる処理
を実行させるための請求項1に記載のプログラム。
to the computer running the visualization program;
2. The program according to claim 1, for causing a display device to display a diagram showing the execution path of the source code and the reference relationship of data using data input to the visualization program.
前記コンピュータに、
前記可視化プログラムに入力されるデータに基づき、前記ソースコードに含まれる複数の構文の各々に関し、当該構文が、参照先及び参照元のいずれも存在しない構文、参照元は存在するが参照先が存在しない構文、参照先は存在するが参照元が存在しない構文、及び、自らの構文を参照する構文、参照元が実行命令順序に従う参照元のみである構文、のいずれであるかを正統性確認用情報として特定する処理と、
前記ソースコードに含まれる複数の構文の中から、前記構文種別と前記正統性確認用情報との組み合わせに基づき、確認を要する構文を抽出する処理と
を実行させるための請求項1に記載のプログラム。
to said computer;
Based on the data input to the visualization program, for each of a plurality of syntaxes included in the source code, the syntax is a syntax in which neither the reference destination nor the referencing source exists, or the reference source exists but the reference destination exists. syntax that does not exist, a syntax that has a reference destination but no referencing entity, a syntax that refers to its own syntax, or a syntax that refers only to the referencing entity that follows the order of execution instructions. the process of identifying as information;
2. The program according to claim 1, for extracting a syntax requiring confirmation from among a plurality of syntaxes included in the source code, based on the combination of the syntax type and the authenticity confirmation information. .
前記可視化プログラムを実行中の前記コンピュータに、
前記可視化プログラムに入力されるデータを用いて前記ソースコードの実行経路を表す図であり、前記抽出する処理において抽出された確認を要する構文に応じた部分を他の部分と異なる態様で表す図を表示装置に表示させる処理
を実行させるための請求項3に記載のプログラム。
to the computer running the visualization program;
FIG. 4 is a diagram showing the execution path of the source code using the data input to the visualization program, wherein the part corresponding to the syntax requiring confirmation extracted in the extraction process is shown in a different manner from the other parts; 4. The program according to claim 3, for executing a process of displaying on a display device.
前記コンピュータに、
前記主語を特定する処理において特定された主語の各々に関し、当該主語のデータ型を特定する処理を実行させ、
前記可視化プログラムに入力されるデータを生成する処理において、前記データ型を示すデータを含む前記可視化プログラムに入力されるデータを生成させ、
前記可視化プログラムを実行中の前記コンピュータに、
前記可視化プログラムに入力されるデータを用いて前記ソースコードの実行経路とデータの参照関係と前記主語のデータ型とを表す図を表示装置に表示させる処理
を実行させるための請求項1に記載のプログラム。
to said computer;
for each subject identified in the subject identifying process, executing a process of identifying the data type of the subject;
generating data to be input to the visualization program including data indicating the data type in the process of generating data to be input to the visualization program;
to the computer running the visualization program;
2. The process of displaying, on a display device, a diagram representing the execution path of the source code, the reference relationship of the data, and the data type of the subject using the data input to the visualization program. program.
プログラムを実行することにより、
コンパイル済みのプログラムのソースコードを構成する複数の行の各々に行番号である第1行番号を付与する処理と、
前記ソースコードに含まれる複数の行の各々に関し、当該行が単一の構文である場合は当該構文の種別である構文種別を特定し、当該行が複数の構文である場合は当該複数の構文を複数の単一の構文に分解した後、当該複数の単一の構文の各々の種別である構文種別を特定する処理と、
前記ソースコードに含まれる複数の行の各々に関し、当該行の次に実行される行の行番号である第2行番号を特定する処理と、
前記ソースコードに含まれる複数の構文のうち前記構文種別を特定する処理において特定された構文種別が条件文である構文の各々に関し、当該条件文が示す条件が真である場合に実行される行の行番号である第3行番号と、当該条件文が示す条件が偽である場合に実行される行の行番号である第4行番号と、当該条件文の行と対となる終了行の行番号である第5行番号と、当該終了行の次の行の行番号である第6行番号とを特定する処理と、
前記構文種別を特定する処理において特定された構文種別が変数の生成を伴う命令文である行を特定し、特定した行の各々に関し、当該行の命令文により生成される変数を主語として特定するとともに、当該主語の領域を宣言している行の行番号と、当該主語の生成を命じる行の行番号とを成分とする第1座標を特定する処理と、
前記構文種別を特定する処理において特定された構文種別が実行順序を指定する命令文である行を特定し、特定した行の各々に関し、当該行の行番号を成分とする第2座標を特定する処理と、
前記主語を特定する処理において特定された主語の各々に関し、当該主語の生成に用いられる主語である変数主語を特定する処理と、
前記ソースコードと、前記第1行番号乃至前記第6行番号と、前記第1座標と、前記第2座標と、特定した主語と当該主語の生成に用いられる変数主語の対応関係とを示すデータとを、可視化プログラムに入力されるデータとして生成する処理と
を行うシステム。
By running the program
a process of assigning a first line number, which is a line number, to 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, specifying the syntax type, which is the type of the syntax, and if the line is a plurality of syntaxes, the multiple syntaxes is decomposed into a plurality of single syntaxes, and then identifying the syntax type that is the type of each of the plurality of single syntaxes;
A process of identifying a second line number, which is the line number of the line to be executed next to the line, for each of the plurality of lines included in the source code;
A line executed when the condition indicated by the conditional statement is true for each of the plurality of statements included in the source code, with respect to each of the statements whose syntax type is a conditional statement specified in the processing for specifying the syntax type. 3rd line number which is the line number of , 4th line number which is the line number of the line to be executed when the condition indicated by the conditional statement is false, and the end line number which is paired with the conditional statement line a process of identifying the fifth line number, which is the line number, and the sixth line number, which is the line number of the line next to the end line;
Identifying a line in which the syntax type identified in the process of identifying the syntax type is an imperative sentence with variable generation, and identifying a variable generated by the imperative sentence of the identified line as a subject for each of the identified lines. A process of specifying a first coordinate whose components are the line number of the line declaring the area of the subject and the line number of the line commanding the generation of the subject;
Identifying lines in which the syntax type identified in the processing for identifying the syntax type is an imperative statement specifying an execution order, and identifying, for each of the identified lines, a second coordinate whose component is the line number of the line. processing;
A process of identifying a variable subject, which is a subject used to generate the subject, for each of the subjects identified in the subject identifying process;
Data indicating the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, and the correspondence relationship between the specified subject and the variable subject used to generate the subject. and as data to be input to the visualization program.
コンピュータが、
コンパイル済みのプログラムのソースコードを構成する複数の行の各々に行番号である第1行番号を付与するステップと、
前記ソースコードに含まれる複数の行の各々に関し、当該行が単一の構文である場合は当該構文の種別である構文種別を特定し、当該行が複数の構文である場合は当該複数の構文を複数の単一の構文に分解した後、当該複数の単一の構文の各々の種別である構文種別を特定するステップと、
前記ソースコードに含まれる複数の行の各々に関し、当該行の次に実行される行の行番号である第2行番号を特定するステップと、
前記ソースコードに含まれる複数の構文のうち前記構文種別を特定するステップにおいて特定された構文種別が条件文である構文の各々に関し、当該条件文が示す条件が真である場合に実行される行の行番号である第3行番号と、当該条件文が示す条件が偽である場合に実行される行の行番号である第4行番号と、当該条件文の行と対となる終了行の行番号である第5行番号と、当該終了行の次の行の行番号である第6行番号とを特定するステップと、
前記構文種別を特定するステップにおいて特定された構文種別が変数の生成を伴う命令文である行を特定し、特定した行の各々に関し、当該行の命令文により生成される変数を主語として特定するとともに、当該主語の領域を宣言している行の行番号と、当該主語の生成を命じる行の行番号とを成分とする第1座標を特定するステップと、
前記構文種別を特定するステップにおいて特定された構文種別が実行順序を指定する命令文である行を特定し、特定した行の各々に関し、当該行の行番号を成分とする第2座標を特定するステップと、
前記主語を特定するステップにおいて特定された主語の各々に関し、当該主語の生成に用いられる主語である変数主語を特定するステップと、
前記ソースコードと、前記第1行番号乃至前記第6行番号と、前記第1座標と、前記第2座標と、特定した主語と当該主語の生成に用いられる変数主語の対応関係とを示すデータとを、可視化プログラムに入力されるデータとして生成するステップと
を備える方法。
the computer
assigning a first line number, which is a line number, to 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, specifying the syntax type, which is the type of the syntax, and if the line is a plurality of syntaxes, the multiple syntaxes into a plurality of single syntaxes, and then identifying a syntax type that is the type of each of the plurality of single syntaxes;
identifying, for each of a plurality of lines included in the source code, a second line number that is the line number of the line to be executed next to the line;
a line executed when the condition indicated by the conditional statement is true for each of the plurality of statements included in the source code, with respect to each of the statements whose syntax type is the conditional statement specified in the step of specifying the syntax type; 3rd line number which is the line number of , 4th line number which is the line number of the line to be executed when the condition indicated by the conditional statement is false, and the end line number which is paired with the conditional statement line identifying the fifth line number, which is the line number, and the sixth line number, which is the line number of the line next to the end line;
Identifying lines in which the syntax type identified in the step of identifying the syntax type is an imperative sentence accompanied by the generation of a variable, and for each of the identified lines, identifying a variable generated by the imperative sentence of the line as a subject. and identifying a first coordinate whose components are the line number of the line declaring the domain of the subject and the line number of the line commanding the generation of the subject;
Identifying lines in which the syntax type identified in the step of identifying the syntax type is an imperative statement specifying an execution order, and identifying a second coordinate having a line number of the line as a component for each of the identified lines. a step;
for each subject identified in the step of identifying subjects, identifying a variable subject that is the subject used to generate the subject;
Data indicating the source code, the first line number to the sixth line number, the first coordinate, the second coordinate, and the correspondence relationship between the specified subject and the variable subject used to generate the subject. and generating as data input to a visualization program.
JP2023076347A 2023-05-02 2023-05-02 A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code Active JP7295599B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023076347A JP7295599B1 (en) 2023-05-02 2023-05-02 A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023076347A JP7295599B1 (en) 2023-05-02 2023-05-02 A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code

Publications (1)

Publication Number Publication Date
JP7295599B1 true JP7295599B1 (en) 2023-06-21

Family

ID=86772770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023076347A Active JP7295599B1 (en) 2023-05-02 2023-05-02 A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code

Country Status (1)

Country Link
JP (1) JP7295599B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11494295B1 (en) 2019-02-07 2022-11-08 Architecture Technology Corporation Automated software bug discovery and assessment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11494295B1 (en) 2019-02-07 2022-11-08 Architecture Technology Corporation Automated software bug discovery and assessment

Similar Documents

Publication Publication Date Title
US8972954B2 (en) Debugging method using program inspectors to debug programs developed using frameworks and libraries
US8434062B2 (en) Enhancing source code debugging and readability using visual symbols
US9189462B2 (en) Bidirectional text checker
JP4183192B2 (en) Application program development support method, program, and information processing apparatus
US20080301553A1 (en) Verifying compliance of user interfaces with desired guidelines
US9152537B2 (en) Semantic stack trace
CN101751281A (en) System and method for generating compiler
CN111797020A (en) Mock data method and device based on dynamic bytecode
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN112667230A (en) Application program user interface development method, device, equipment and storage medium
US9557965B2 (en) Method for programming language dependent merging of program codes
JP2013134573A (en) Software correction device, software correction system, software correction method and software correction program
Hristov et al. A model for designing accessible color and contrast for users with visual deficiency and color blindness
Kyaw et al. A Code Completion Problem in Java Programming Learning Assistant System.
Lemos et al. Integration testing of object-oriented and aspect-oriented programs: A structural pairwise approach for java
WO2017141893A1 (en) Software analysis apparatus and software analysis method
US11726781B2 (en) Code reading supporting device, code reading supporting method, and storage medium
JP7295599B1 (en) A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code
CN108763054B (en) Test effect display method of test case, electronic device and storage medium
US10048951B2 (en) Method for type checking and transformation of a computer program with first-class static functions
CN112579475A (en) Code testing method, device, equipment and readable storage medium
US20230048792A1 (en) Verification of control coupling and data coupling analysis in software code
CN114756183A (en) Data printing method, device, equipment and storage medium
JP2016057715A (en) Graphic type program analyzer
Alves et al. Avoiding code pitfalls in aspect-oriented programming

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230510

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20230510

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230523

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230602

R150 Certificate of patent or registration of utility model

Ref document number: 7295599

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350