Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5525459B2 - Program modification support method and program modification support device - Google Patents
[go: Go Back, main page]

JP5525459B2 - Program modification support method and program modification support device - Google Patents

Program modification support method and program modification support device Download PDF

Info

Publication number
JP5525459B2
JP5525459B2 JP2011000962A JP2011000962A JP5525459B2 JP 5525459 B2 JP5525459 B2 JP 5525459B2 JP 2011000962 A JP2011000962 A JP 2011000962A JP 2011000962 A JP2011000962 A JP 2011000962A JP 5525459 B2 JP5525459 B2 JP 5525459B2
Authority
JP
Japan
Prior art keywords
modification
remodeling
location
data
program
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.)
Expired - Fee Related
Application number
JP2011000962A
Other languages
Japanese (ja)
Other versions
JP2012141916A (en
Inventor
政雄 國島
Original Assignee
株式会社 日立産業制御ソリューションズ
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 株式会社 日立産業制御ソリューションズ filed Critical 株式会社 日立産業制御ソリューションズ
Priority to JP2011000962A priority Critical patent/JP5525459B2/en
Publication of JP2012141916A publication Critical patent/JP2012141916A/en
Application granted granted Critical
Publication of JP5525459B2 publication Critical patent/JP5525459B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

本発明は、プログラム改造支援方法およびプログラム改造支援装置の技術に関する。   The present invention relates to a program modification support method and a program modification support apparatus.

一般的なソフトウェア開発では、あるプログラムのソースコードに対して、変更・修正など改造の要求があった場合、まず、設計段階で、どのような改造を行うかをプログラミング担当者が調査、検討し、改造方法を仕様書にまとめる。
次の実装段階で、プログラミング担当者が、この仕様書を基に実装方針を決定し、実装方針を基にソースコードに対して改造を行う。
最後のレビュー段階で、レビュー担当者がソースコードに対して行われた改造について妥当性の検証を行う。
In general software development, when there is a request for modification, such as modification or correction, for a source code of a program, a programmer in charge first investigates and examines the modification to be performed at the design stage. The remodeling method is summarized in the specifications.
In the next implementation stage, the person in charge of programming decides the implementation policy based on this specification, and modifies the source code based on the implementation policy.
In the final review stage, reviewers validate the modifications made to the source code.

このとき、プログラミング担当者が仕様書の記載内容に沿って正しく実装方針を決定しても、改造漏れや誤った場所への改造など、実装方針と異なる改造を行う可能性がある。つまり、仕様書の内容とは異なる改造を行う可能性がある。さらに、レビュー段階においても、改造場所が広範囲にわたっている場合、レビュー担当者が前記の誤った改造を見落とす可能性もある。
そこで、ソースコードに対して行われた改造について妥当性を検査する仕組みが必要とされている。
At this time, even if the person in charge of programming decides the mounting policy correctly according to the contents of the specification, there is a possibility that the modification differs from the mounting policy such as omission of modification or modification to the wrong place. In other words, there is a possibility of remodeling different from the content of the specification. In addition, even in the review stage, if there are a wide range of remodeling locations, the reviewer may miss the erroneous remodeling.
Therefore, a mechanism for checking the validity of the modifications made to the source code is required.

例えば、特許文献1には、ソースコードとプログラム仕様書との整合性を詳細にかつ機械的に検査できるプログラム仕様整合検査装置が開示されている。   For example, Patent Document 1 discloses a program specification matching inspection apparatus that can check the consistency between a source code and a program specification in detail and mechanically.

特開平8−30448号公報JP-A-8-30448

特許文献1に記載の装置では、ソースコードと、検査の基となる仕様書とを関連付けるために、装置上で仕様書を作成する必要がある。このため、改造場所の特定や改造内容の検証において、装置上で作成した仕様書が新たに必要となる。
また、特許文献1に記載の装置では、実際のコーディングと同じレベルの詳細な記述のある仕様書が必要になる。このため、仕様書作成時に詳細なコーディングの内容が確定していない場合は利用できないという問題がある。
In the apparatus described in Patent Document 1, it is necessary to create a specification on the apparatus in order to associate the source code with the specification that is the basis of the inspection. For this reason, a specification created on the device is newly required for specifying the modification location and verifying the modification contents.
In addition, the apparatus described in Patent Document 1 requires a specification with detailed description at the same level as the actual coding. For this reason, there is a problem that it cannot be used if the details of coding are not fixed at the time of specification creation.

そこで、本発明は、新たな仕様書を装置上で作成しなくてもよいプログラム改造支援方法およびプログラム改造支援装置を提供することを目的とする。   Therefore, an object of the present invention is to provide a program remodeling support method and a program remodeling support apparatus that do not require a new specification to be created on the apparatus.

前記課題を解決するため、本発明は、プログラムの改造を支援するプログラム改造支援装置のプログラム改造支援方法であって、前記プログラム改造支援装置が、改造予定箇所に関する情報である改造予定データに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データを生成し、改造後の前記プログラムのソースコードである改造後ソースコードに基づく改造後データを生成し、前記予測データと、前記改造後データを比較し、不一致箇所が検出された場合、不一致箇所が検出された旨を表示部に表示させることを特徴とする。
その他の解決手段については、実施形態中で適宜説明する。
In order to solve the above-mentioned problems, the present invention provides a program modification support method for a program modification support device that supports program modification, wherein the program modification support device is based on modification schedule data that is information on a planned modification site. Generating prediction data having information on a place where the planned remodeling is performed, generating post-remodeling data based on the source code after remodeling that is the source code of the program after remodeling, and generating the prediction data and The modified data are compared, and when a mismatched portion is detected, a message indicating that a mismatched portion has been detected is displayed on the display unit.
Other solutions will be described as appropriate in the embodiments.

本発明によれば、新たな仕様書を装置上で作成しなくてもよいプログラム改造支援方法およびプログラム改造支援装置を提供することができる。   According to the present invention, it is possible to provide a program remodeling support method and a program remodeling support apparatus that do not require creation of a new specification on the apparatus.

本実施形態に係るプログラム改造支援装置の構成例を示す図である。It is a figure which shows the structural example of the program modification assistance apparatus which concerns on this embodiment. 本実施形態に係るプログラム改造支援処理における全体処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the whole process in the program modification assistance process which concerns on this embodiment. 本実施形態に係るソースコード例と、構造データ例を示す図である。It is a figure which shows the example of a source code which concerns on this embodiment, and an example of structure data. 構造解析部における構造解析処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the structure analysis process in a structure analysis part. 中間語命令への変換の一例を示す図である(C言語の例)。It is a figure which shows an example of the conversion to an intermediate language command (example of C language). 本実施形態に係る改造場所入力画面の例を示す図である。It is a figure which shows the example of the remodeling place input screen which concerns on this embodiment. 本実施形態に係る改造情報入力画面の例を示す図である。It is a figure which shows the example of the modification information input screen which concerns on this embodiment. 本実施形態に係る改造予定データの例を示す図である。It is a figure which shows the example of the modification plan data which concern on this embodiment. 本実施形態に係る予測構造データの例を示す図である。It is a figure which shows the example of the prediction structure data which concern on this embodiment. 本実施形態に係る改造場所特定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the remodeling place specific process which concerns on this embodiment. 改造内容の判定方法の例を説明するための図である。It is a figure for demonstrating the example of the determination method of the content of remodeling. 改造場所特定処理結果の例を示す図である。It is a figure which shows the example of a remodeling place specific process result. 本実施形態に係る改造内容検証処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the modification content verification process which concerns on this embodiment. 改造内容検証処理における判定パターンの例を示す例である。It is an example which shows the example of the determination pattern in a modification content verification process. 改造内容検証部によって表示部に表示される検証結果表示画面の例を示す図である。It is a figure which shows the example of the verification result display screen displayed on a display part by the modification content verification part.

次に、本発明を実施するための形態(「実施形態」という)について、適宜図面を参照しながら詳細に説明する。   Next, modes for carrying out the present invention (referred to as “embodiments”) will be described in detail with reference to the drawings as appropriate.

[装置構成]
図1は本実施形態に係るプログラム改造支援装置の構成例を示す図である。
プログラム改造支援装置1は、改造予定登録処理部10、構造解析部30、改造内容検証処理部20、入力部40、表示部50、を有する。
入力部40は、キーボードや、マウスなどの入力装置である。
表示部50は、ディスプレイなどの表示装置である。
構造解析部30は、一般的なコンパイラの機能の一部によって実現されるものであり、ソースコードを解析して後記する構造データを出力する。
[Device configuration]
FIG. 1 is a diagram illustrating a configuration example of a program modification support device according to the present embodiment.
The program modification support device 1 includes a modification schedule registration processing unit 10, a structure analysis unit 30, a modification content verification processing unit 20, an input unit 40, and a display unit 50.
The input unit 40 is an input device such as a keyboard or a mouse.
The display unit 50 is a display device such as a display.
The structure analysis unit 30 is realized by a part of a general compiler function, and analyzes the source code and outputs structure data to be described later.

改造予定登録処理部10は、ソースコードにおいて改造を行う予定の箇所を改造予定データ800として登録する改造予定登録部11と、さらに改造予定データ800から予定されている改造が行われたときの構造データを予測して、予測構造データ(予測データ)900を生成する改造予定再現部12とを有している。
改造予定登録部11は、ユーザが入力部40を介して入力した改造対象となるプログラムのソースコード(改造前ソースコード101)、同じくユーザが入力部40を介して入力した、予定されている改造内容に関する情報である改造入力データ103を基に、データとして保存したものが改造予定データ800である。
正確には、(1)改造前構造データ104を基に改造予定登録部11は表示部50に改造場所入力画面600のフローチャート表示エリア602(またはソースコード表示エリア601)(図6)を表示する。(2)ユーザは、改造場所入力画面600のフローチャート表示エリア602(またはソースコード表示エリア601)を見て、入力部40を介して改造入力データ103を入力する。(3)改造予定登録部11は改造入力データ103を基とする改造予定データ800を保存する。なお、この手順は、後記して詳細に説明する。
なお、本実施形態では図6で後記する改造場所入力画面600のソースコード表示エリア601や、フローチャート表示エリア602を見たユーザが入力部40を介して改造入力データ103を入力しているが、改造入力データ103を得る方法が他にあれば、必ずしも改造前構造データ104を基にソースコード表示エリア601や、フローチャート表示エリア602を表示する必要はない。あるいは、ソースコード表示エリア601のみを表示するようにしてもよい。
改造前構造データ104とは、改造前ソースコード101に対し、後記する構造解析処理を行うことで生成される構造データである。改造予定データ800、構造データについては後記して説明する。
The modification schedule registration processing unit 10 includes a modification schedule registration unit 11 for registering a part to be modified in the source code as modification schedule data 800, and a structure when a modification scheduled from the modification schedule data 800 is performed. And a remodeling scheduled reproduction unit 12 that predicts data and generates predicted structure data (predicted data) 900.
The remodeling schedule registration unit 11 includes the source code of the program to be remodeled input by the user via the input unit 40 (source code 101 before remodeling), and the planned remodeling input by the user via the input unit 40. The remodeling schedule data 800 is stored as data based on the remodeling input data 103 which is information relating to the contents.
More precisely, (1) based on the pre-modification structure data 104, the modification schedule registration unit 11 displays the flowchart display area 602 (or source code display area 601) (FIG. 6) of the modification location input screen 600 on the display unit 50. . (2) The user views the flowchart display area 602 (or the source code display area 601) of the modification location input screen 600 and inputs the modification input data 103 via the input unit 40. (3) The modification schedule registration unit 11 stores modification schedule data 800 based on the modification input data 103. This procedure will be described in detail later.
In this embodiment, the user who has seen the source code display area 601 and the flowchart display area 602 of the remodeling location input screen 600 described later in FIG. 6 inputs the remodeling input data 103 via the input unit 40. If there is another method for obtaining the remodeling input data 103, it is not always necessary to display the source code display area 601 and the flowchart display area 602 based on the pre-modification structure data 104. Alternatively, only the source code display area 601 may be displayed.
The pre-modification structure data 104 is structure data generated by performing a later-described structural analysis process on the pre-modification source code 101. The modification schedule data 800 and the structure data will be described later.

改造予定再現部12は、改造予定登録部11が生成した改造予定データ800と、改造前構造データ104に基づいて、予定されている改造が行われたときの構造データを予測した情報である予測構造データ900を生成する。   The remodeling schedule reproduction unit 12 is prediction information that predicts structural data when a planned remodeling is performed based on the remodeling plan data 800 generated by the remodeling plan registration unit 11 and the structure data 104 before remodeling. Generate structure data 900.

改造内容検証処理部20は、改造後ソースコード102において、予定に従った改造がなされているか否かを検証するものであり、改造場所特定部(改造後データ生成部)21と、改造内容検証部22とを有する。
改造場所特定部21は、改造後ソースコード102から構造解析部30が解析した結果である改造前構造データ104と、改造後構造データ105とから、実際にどこが改造されたのかを特定し、その情報を改造場所特定データ(改造後データ)1100として出力する。
改造内容検証部22は、改造場所特定データ1100と、予測構造データ900とを基に、予定に従って改造が行われているか否かを検証し、その結果である検証結果データ106を表示部50に表示させる。
なお、図1において表示部50は検証結果データ106のみを表示しているようにみえるが、改造入力データ103や、予測構造データ900なども適宜表示する。
The remodeling content verification processing unit 20 verifies whether or not the remodeled source code 102 has been remodeled according to the schedule. The remodeling location identification unit (post-remodeling data generation unit) 21 and the remodeling content verification Part 22.
The remodeling location specifying unit 21 specifies the actual remodeling from the pre-remodeling structure data 104 and the post-remodeling structure data 105, which are the results of analysis by the structural analysis unit 30 from the remodeled source code 102. Information is output as remodeling place specifying data (data after remodeling) 1100.
The remodeling content verification unit 22 verifies whether remodeling has been performed according to the schedule based on the remodeling location specifying data 1100 and the predicted structure data 900, and the verification result data 106 as a result is displayed on the display unit 50. Display.
In FIG. 1, the display unit 50 appears to display only the verification result data 106, but the modified input data 103, the predicted structure data 900, and the like are also displayed as appropriate.

なお、改造予定登録処理部10、改造内容検証処理部20、構造解析部30、および各部11,12,21,22は、ROM(Read Only Memory)や、HDD(Hard Disk Drive)に格納されたプログラムが、RAM(Random Access Memory)に展開され、CPU(Central Processing Unit)によって実行されることによって具現化する。   The modification schedule registration processing unit 10, the modification content verification processing unit 20, the structure analysis unit 30, and the units 11, 12, 21, and 22 are stored in a ROM (Read Only Memory) or an HDD (Hard Disk Drive). The program is embodied by being expanded in a random access memory (RAM) and executed by a central processing unit (CPU).

[全体処理]
図2は、本実施形態に係るプログラム改造支援処理における全体処理の手順を示すフローチャートである(適宜、図1参照)。
まず、プログラミング担当者などのユーザが端末などを使用して改造前ソースコード101を入手する(S1)。なお、ステップS1およびステップS3aは、ユーザによる処理であるため、破線四角で処理を示してある。
次に、ユーザは作成した改造前ソースコード101をプログラム改造支援装置1に入力し、プログラム改造支援装置1の構造解析部30が改造前ソースコード101の構造解析処理を行い(S2)、改造前構造データ104を出力する。構造解析処理については、図3〜図5を参照して後記する。
なお、過去に他の誰かが作成したソースコードを改造前ソースコード101としてもよいし、自分で昔に作成したソースコードを改造前ソースコード101としてもよい。また、ステップS1と、ステップS2では、処理を行うユーザが異なっていてもよい。
そして、ユーザが端末などを使用して改造後ソースコード102を作成する(S3a)。
次に、ユーザは作成した改造後ソースコード102をプログラム改造支援装置1に入力し、プログラム改造支援装置1の構造解析部30が改造後ソースコード102の構造解析処理を行い(S4a)、改造後構造データ105を出力する。構造解析処理については、図3〜図5を参照して後記する。
[Overall processing]
FIG. 2 is a flowchart showing a procedure of overall processing in the program modification support processing according to the present embodiment (see FIG. 1 as appropriate).
First, a user such as a programming person obtains the pre-modification source code 101 using a terminal or the like (S1). In addition, since step S1 and step S3a are the processes by a user, the process is shown with the broken-line square.
Next, the user inputs the created pre-modification source code 101 to the program modification support device 1, and the structure analysis unit 30 of the program modification support device 1 performs the structure analysis processing of the source code 101 before modification (S2). The structure data 104 is output. The structural analysis process will be described later with reference to FIGS.
Note that source code created by someone else in the past may be used as the pre-modification source code 101, or source code created in the past may be used as the pre-modification source code 101. Moreover, the user who performs a process may differ in step S1 and step S2.
Then, the user creates the modified source code 102 using a terminal or the like (S3a).
Next, the user inputs the created modified source code 102 to the program modification support device 1, and the structure analysis unit 30 of the program modification support device 1 performs the structure analysis processing of the modified source code 102 (S4a). The structure data 105 is output. The structural analysis process will be described later with reference to FIGS.

一方、ユーザが改造を行う予定の箇所や、改造内容などをプログラム改造支援装置1に入力することによって改造予定登録処理が行われ(S3b)、プログラム改造支援装置1の改造予定再現部12は、改造予定登録処理の結果、生成される改造予定データ800を基に、予定される改造が行われた結果、生成予測される構造データである予測構造データ900を生成する改造予定再現処理を行う(S4b)。
改造予定登録処理については図6〜図8を参照して後記し、改造予定再現処理については図9を参照して後記する。
なお、ステップS3a〜S4aと、ステップS3b〜S4bはどちらが先に行われてもよいし、並列に作業が行われてもよい。
On the other hand, a remodeling schedule registration process is performed by inputting a part to be remodeled, a remodeling content, and the like into the program remodeling support apparatus 1 (S3b). As a result of the modification schedule registration process, a modification schedule reproduction process is performed to generate predicted structure data 900 that is the structure data that is predicted to be generated as a result of the planned modification based on the modification schedule data 800 that is generated ( S4b).
The modification schedule registration process will be described later with reference to FIGS. 6 to 8, and the modification schedule reproduction process will be described later with reference to FIG.
Note that either step S3a to S4a or step S3b to S4b may be performed first, or work may be performed in parallel.

そして、プログラム改造支援装置1の改造場所特定部21は改造前構造データ104と、改造後構造データ105とを比較することによって、実際に改造が行われた箇所を特定する改造場所特定処理を行う(S5)。改造場所特定処理は図10および図12を参照して後記する。
続いて、プログラム改造支援装置1の改造内容検証部22は実際に行われた改造が、予定に従った改造であったか否かを検証する改造内容検証処理を行う(S6)。
改造内容検証処理は図13〜図15を参照して後記する。
Then, the remodeling location specifying unit 21 of the program remodeling support apparatus 1 compares the pre-remodeling structure data 104 with the post-remodeling structure data 105 to perform a remodeling location specifying process for specifying a location where remodeling has actually been performed. (S5). The modification location specifying process will be described later with reference to FIGS.
Subsequently, the modification content verification unit 22 of the program modification support device 1 performs modification content verification processing for verifying whether or not the modification actually performed is a modification according to the schedule (S6).
The modification content verification processing will be described later with reference to FIGS.

[構造解析処理]
次に、図3〜図5を参照して、本実施形態に関する構造解析処理(図2のステップS2,4a)の説明を、適宜図1を参照しつつ行う。なお、前記したように構造解析処理は一般的なコンパイラを使用して行うことを想定しているが、専用のプログラムを用意してもよい。以降、ソースコード上の命令を適宜「命令」と記載することとする。
[Structural analysis processing]
Next, with reference to FIGS. 3 to 5, the structural analysis process (steps S <b> 2 and 4 a in FIG. 2) relating to the present embodiment will be described with reference to FIG. 1 as appropriate. As described above, it is assumed that the structural analysis process is performed using a general compiler, but a dedicated program may be prepared. Hereinafter, instructions on the source code will be referred to as “instructions” as appropriate.

(ソースコード例および構造データ例)
図3は、本実施形態に係るソースコード例と、構造データ例を示す図であり、図3(a)がソースコード例、図3(b)が図3(a)のソースコード例に対応する構造データ例、図3(c)が中間語命令の例を示している。なお、ソースコードとしては、C言語を想定しているが、他のプログラミング言語でも適用可能である。また、ここで示すソースコードとは、改造前ソースコード101、改造後ソースコード102の両方を指している。
この構造データは、図4で後記する構造解析処理の結果、生成されるものである。
(Example of source code and structural data)
FIG. 3 is a diagram showing an example of source code and structural data according to the present embodiment. FIG. 3A corresponds to the source code example, and FIG. 3B corresponds to the source code example of FIG. FIG. 3 (c) shows an example of an intermediate language instruction. In addition, although C language is assumed as a source code, other programming languages are applicable. Further, the source code shown here indicates both the source code 101 before modification and the source code 102 after modification.
This structure data is generated as a result of the structure analysis process described later in FIG.

図3(a)に示すように、(C言語で記述された)ソースコード301には、1つ以上の関数303が含まれている。関数303とは、一連の命令を1つにまとめたものであり、他のプログラム言語ではプロシージャ、または手続きなどと呼ばれている。
ソースコード301では、関数303が1つの関数である。また、関数303には、代入演算304、比較演算305、分岐命令306、四則演算307などの命令が含まれている。
As shown in FIG. 3A, the source code 301 (described in C language) includes one or more functions 303. The function 303 is a series of instructions combined into one, and is called a procedure or a procedure in other programming languages.
In the source code 301, the function 303 is one function. The function 303 includes instructions such as an assignment operation 304, a comparison operation 305, a branch instruction 306, and four arithmetic operations 307.

これに対し、図3(b)に示す構造データ302は、ソースコードのファイル名308と、1つ以上の関数情報309で構成されている(図3(b)の例では1つ)。関数情報309とはソースコードに含まれる関数303に関する情報を1つにまとめたもので、関数303に対して関数情報309が1つ生成される。   On the other hand, the structure data 302 shown in FIG. 3B includes a source code file name 308 and one or more function information 309 (one in the example of FIG. 3B). The function information 309 is a collection of information related to the function 303 included in the source code, and one function information 309 is generated for the function 303.

関数情報309は1つ以上の基本ブロック310,311,313で構成されている。基本ブロック310,311,313とは、ソースコード301におけるプログラム処理の流れにおいて、処理の流れが分岐しない一連の命令の集合である。ソースコード301における代入演算304から分岐命令306までが、構造データ302の基本ブロック310に対応している。また、ソースコード301における四則演算307および代入演算322が、基本ブロック311に対応している。さらに、ソースコード301における代入演算312が、の基本ブロック313に対応している。   The function information 309 is composed of one or more basic blocks 310, 311, and 313. The basic blocks 310, 311, and 313 are a set of a series of instructions that do not branch the processing flow in the program processing flow in the source code 301. The assignment operation 304 to the branch instruction 306 in the source code 301 correspond to the basic block 310 of the structure data 302. Further, the four arithmetic operations 307 and the substitution operation 322 in the source code 301 correspond to the basic block 311. Further, an assignment operation 312 in the source code 301 corresponds to the basic block 313.

さらに、基本ブロックは、1つ以上の中間語命令314と基本ブロックの識別子315、この基本ブロックの直前および直後に処理が行われる基本ブロックの識別子316などから構成されている。
中間語命令とは、ソースコード301に含まれる命令を、構造データ302上で表現するための命令であり、一般的にはコンパイルによって出力される。
Further, the basic block includes one or more intermediate language instructions 314, a basic block identifier 315, a basic block identifier 316 to be processed immediately before and after the basic block, and the like.
The intermediate language instruction is an instruction for expressing the instruction included in the source code 301 on the structure data 302, and is generally output by compilation.

図3(c)に示すように、中間語命令には、ソースコード上の命令の種類をあらわす名前317、ソースコード上の命令が使用する変数または値318、ソースコード上の命令の位置319で構成する。ちなみに、図3(c)は、図3(a)の命令304「a=0;」に対応する中間語命令314であり、基本ブロック310の中間語命令314でもある。中間語命令314は、「10行2列目」の「a」という変数に「0」をコピーすることを示している。
また、C言語では、ソースコード301の四則演算307のように、加算の処理と、その結果を代入するという複数の処理が同時に記述されている場合がある。このように、複数の処理が同時に記載されている場合、中間語命令は、加算の処理を表す中間語命令320と代入の処理を表す中間語命令321のように、処理ごとに中間語命令を分離して表現する。
As shown in FIG. 3C, the intermediate language instruction includes a name 317 indicating the type of instruction on the source code, a variable or value 318 used by the instruction on the source code, and an instruction position 319 on the source code. Configure. Incidentally, FIG. 3C is an intermediate language instruction 314 corresponding to the instruction 304 “a = 0;” of FIG. 3A, and is also an intermediate language instruction 314 of the basic block 310. The intermediate language instruction 314 indicates that “0” is copied to a variable “a” in “10th row, second column”.
Further, in the C language, there may be a case where a plurality of processes of adding the result and substituting the result are simultaneously described like the four arithmetic operations 307 of the source code 301. As described above, when a plurality of processes are described at the same time, an intermediate language instruction is changed to an intermediate language instruction for each process, such as an intermediate language instruction 320 representing an addition process and an intermediate language instruction 321 representing an assignment process. Express separately.

(構造解析処理のフローチャート)
図4は、構造解析部における構造解析処理の手順を示すフローチャートである。なお、構造解析部30は、既存のコンパイラの機能の一部をなすものであり、図4の処理も既存のコンパイラに備えられている処理であるため、その処理内容の説明は簡潔なものとする。また、構造解析処理は、改造前ソースコード101および改造後ソースコード102のそれぞれに対して行われる処理である。なお、図4の処理において、ソースコードとは、改造前ソースコード101か、あるいは改造後ソースコード102であることを示すものとする。
(Structure analysis process flowchart)
FIG. 4 is a flowchart showing the procedure of the structure analysis process in the structure analysis unit. The structure analysis unit 30 forms part of the functions of the existing compiler, and the processing in FIG. 4 is also a processing provided in the existing compiler. To do. The structural analysis process is a process performed on each of the source code 101 before modification and the source code 102 after modification. In the process of FIG. 4, the source code indicates that the source code 101 before modification or the source code 102 after modification.

まず、構造解析部30はソースコードに記述されている文字列に対して、字句解析を行う(S101)。ここで、構造解析部30は、ソースコードにおける文字列をプログラム言語で定義しているキーワードや、識別子、演算子、変数や関数の名前など、プログラム言語の最小構成要素であるトークンという単位に分割する。トークンの分割は、ソースコードがC言語であれば、例えばセミコロンなどを単位として分割する。
次に、構造解析部30は、ステップS101の字句解析で生成したトークンの列に対して、構文解析を行う(S102)。ここで、構造解析部30はソースコードのプログラム言語の文法に則り、トークンの列がどのような計算式を構成しているか、また、1つの関数の範囲はどこまでか、など、トークンの列の構造について解析を行う。また、このとき、トークンの列がプログラム言語の文法に則っているか否かの検証を行う。具体的には、例えば、C言語であれば、最初の中括弧から、この中括弧に対応する中括弧までを1つの関数として認識するなどの解析を行う。
First, the structure analysis unit 30 performs lexical analysis on the character string described in the source code (S101). Here, the structure analysis unit 30 divides the character string in the source code into units called tokens, which are the minimum components of the program language, such as keywords that define the program language, identifiers, operators, variables, and function names. To do. If the source code is C language, the token is divided in units of semicolons, for example.
Next, the structure analysis unit 30 performs syntax analysis on the token string generated by the lexical analysis in step S101 (S102). Here, in accordance with the grammar of the programming language of the source code, the structure analysis unit 30 determines what kind of calculation formula the token sequence constitutes, and what is the range of one function, etc. Analyze the structure. At this time, it is verified whether or not the sequence of tokens conforms to the grammar of the programming language. Specifically, for example, in the case of C language, the analysis from the first brace to the brace corresponding to the brace is recognized as one function.

そして、構造解析部30は、ステップS102の構文解析の結果を元に、意味解析を行う(S103)。ここで、構造解析部30は、関数や変数がどのような名称を使用しているか、変数がどのような型を持つか、分岐命令がどの点まで分岐しているかなどについて解析を行う。また、このときも、構造解析部30は関数や変数がプログラム言語の文法に則っているか否かの検証を行う。
続いて、構造解析部30は、ステップS103の意味解析の結果を元に、ソースコードにおける関数の開始点と終了点を取得し、関数情報生成を行う(S104)。ここで、構造解析部30は、関数情報として、関数名のみを関数情報に登録し、この関数における以降の処理で基本ブロックや中間語命令を追加する。
Then, the structure analysis unit 30 performs semantic analysis based on the result of the syntax analysis in step S102 (S103). Here, the structure analysis unit 30 analyzes what names are used for the functions and variables, what type the variables have, and what point the branch instruction branches to. Also at this time, the structure analysis unit 30 verifies whether or not the function or variable conforms to the grammar of the programming language.
Subsequently, the structure analysis unit 30 acquires the function start point and end point in the source code based on the result of the semantic analysis in step S103, and generates function information (S104). Here, the structure analysis unit 30 registers only the function name as the function information in the function information, and adds a basic block and an intermediate language instruction in subsequent processing in this function.

次に、構造解析部30は、ソースコードにおける関数の内部を検証し、ソースコードに含まれている命令や処理を、対応する中間語命令へ変換する中間後命令変換を行う(S105)。
そして、構造解析部30は、ステップS105で抽出した中間語命令を検証し、基本ブロックの生成が必要か否かの判定を行う(S106)。基本ブロックの生成が必要な場合とは、例えば、ステップS105で変換された中間語命令が、関数の先頭に位置する場合とか、分岐命令の後に続いている場合などである。
ステップS106の結果、基本ブロックの生成が必要な場合(S106→Yes)、構造解析部30は、図3で説明した基本ブロックの定義に従って基本ブロックを生成し(S107)、ステップS109へ処理を進める。
Next, the structure analysis unit 30 verifies the inside of the function in the source code, and performs a post-intermediate instruction conversion that converts an instruction or process included in the source code into a corresponding intermediate language instruction (S105).
Then, the structure analysis unit 30 verifies the intermediate language instruction extracted in step S105 and determines whether it is necessary to generate a basic block (S106). The case where the basic block needs to be generated is, for example, a case where the intermediate language instruction converted in step S105 is located at the head of the function or a case where it follows the branch instruction.
If it is necessary to generate a basic block as a result of step S106 (S106 → Yes), the structure analyzing unit 30 generates a basic block according to the definition of the basic block described with reference to FIG. 3 (S107), and proceeds to step S109. .

ステップS106の結果、基本ブロックの生成が不要な場合(S106→No)、構造解析部30は、中間語命令変換で生成した中間語命令を、処理対象となっている基本ブロックの末尾に挿入する(S108)。
そして、構造解析部30は、処理対象となっている関数内におけるすべての命令を解析したか否かを判定する(S109)。
ステップS109の結果、処理対象となっている関数内において、解析されていない命令が存在する場合(S109→No)、構造解析部30はステップS103へ処理を戻し、次の命令について解析を行う。
ステップS109の結果、処理対象となっている関数内におけるすべての命令を解析している場合(S109→Yes)、構造解析部30は、ソースコードにおけるすべての関数について解析を終了したか否かを判定する(S110)。
ステップS110の結果、ソースコードにおいて、解析されていない関数が存在する場合(S110→No)、構造解析部30はステップS103へ処理を戻し、次の関数について解析を行う。
ステップS110の結果、すべての関数について解析を終了している場合(S110→Yes)、構造解析部30は構造解析処理を終了する。
As a result of step S106, when the generation of the basic block is unnecessary (S106 → No), the structure analysis unit 30 inserts the intermediate language instruction generated by the intermediate language instruction conversion at the end of the basic block to be processed. (S108).
Then, the structure analysis unit 30 determines whether all instructions in the function to be processed have been analyzed (S109).
If there is an unanalyzed instruction in the function to be processed as a result of step S109 (S109 → No), the structure analysis unit 30 returns the process to step S103 and analyzes the next instruction.
As a result of step S109, when all the instructions in the function to be processed are analyzed (S109 → Yes), the structure analysis unit 30 determines whether the analysis has been completed for all the functions in the source code. Determine (S110).
As a result of step S110, when there is an unanalyzed function in the source code (S110 → No), the structure analysis unit 30 returns the process to step S103 and analyzes the next function.
As a result of step S110, when the analysis is completed for all functions (S110 → Yes), the structure analysis unit 30 ends the structure analysis process.

構造解析部30が、図4の処理を改造前ソースコード101および改造後ソースコード102のそれぞれについて行うことにより、プログラム改造支援装置1は改造前構造データ104および改造後構造データ105のそれぞれを生成する。   The structure analysis unit 30 performs the process of FIG. 4 for each of the source code 101 before modification and the source code 102 after modification, so that the program modification support device 1 generates the structure data 104 before modification and the structure data 105 after modification. To do.

(中間語命令への変換例)
図5は中間語命令への変換の一例を示す図である(C言語の例)。図5において、左側の欄がソースコードにおける命令であり、右側の欄が対応する中間語命令を示している。
例えば、符号501に示すような代入命令の場合、対応する中間語命令は符号502のようになる。
また、符号503に示すような計算結果をある変数に代入する加算命令の場合、対応する中間語命令は、符号504のような加算を示す中間語命令と、符号505のような変数への代入を示す中間語命令の2つに分割される。
符号506に示すような分岐命令の場合、対応する中間語命令は、符号507のような条件を判定する処理を示す中間語命令と、符号508のような条件にしたがって分岐する処理を示す中間語命令の2つに分割される。
符号509のような条件に従って同じ処理を繰り返し実施するループ命令の場合、対応する中間語命令は、符号510のような条件判定処理の中間語命令と、符号511のような条件に従って分岐する処理の中間語命令と、符号512のようなループ内の処理の終端から、ループの開始まで戻るための分岐命令を示す中間語命令の3つに分割されることになる。
(Example of conversion to an intermediate language instruction)
FIG. 5 is a diagram showing an example of conversion to an intermediate language instruction (example of C language). In FIG. 5, the left column shows instructions in the source code, and the right column shows the corresponding intermediate language instructions.
For example, in the case of an assignment instruction as indicated by reference numeral 501, the corresponding intermediate language instruction is as indicated by reference numeral 502.
In addition, in the case of an addition instruction that assigns a calculation result as indicated by reference numeral 503 to a variable, the corresponding intermediate instruction is an intermediate instruction that indicates addition as indicated by reference numeral 504 and an assignment to a variable such as reference numeral 505. Is divided into two intermediate language instructions.
In the case of a branch instruction as indicated by reference numeral 506, the corresponding intermediate language instruction includes an intermediate word instruction indicating processing for determining a condition as indicated by reference numeral 507 and an intermediate language indicating processing for branching according to the condition as indicated by reference numeral 508. Divided into two of the instructions.
In the case of a loop instruction that repeatedly executes the same processing according to a condition such as reference numeral 509, the corresponding intermediate word instruction includes an intermediate word instruction for condition determination processing such as reference numeral 510 and a process that branches according to a condition such as reference numeral 511. This is divided into an intermediate word instruction and an intermediate word instruction indicating a branch instruction for returning to the start of the loop from the end of the processing in the loop as indicated by reference numeral 512.

以上、図3〜図5で説明したように構造解析部30は、ソースコードを中間語命令の形に変換した構造データを生成することによって、ユーザごとに異なるコーディング方法の差異を吸収し、正規化できる。なお、コーディングとは(プログラミング言語の文法に則って)プログラムを記述することである。
また、このようにすることで、コメントなど、プログラムの処理に直接関連のない部分の除去もできる。従って、ソースコードを中間語命令の形に変換することによって、これ以降の処理で、より正確に、改造前ソースコード101と改造後ソースコード102の検証が行えるようになる。
構造解析部30は、図4のステップS105における中間語命令変換処理(図2のステップS3b)において、図5のような変換規則に従ってソースコードの命令を中間語命令へと変換する。
As described above with reference to FIGS. 3 to 5, the structure analysis unit 30 generates structural data obtained by converting the source code into the form of intermediate language instructions, thereby absorbing differences in coding methods that are different for each user. Can be Note that coding means writing a program (according to the grammar of the programming language).
In addition, by doing this, it is possible to remove parts such as comments that are not directly related to the processing of the program. Therefore, by converting the source code into the form of the intermediate language instruction, the source code 101 before modification and the source code 102 after modification can be verified more accurately in the subsequent processing.
In the intermediate language instruction conversion process (step S3b in FIG. 2) in step S105 in FIG. 4, the structure analysis unit 30 converts the instruction in the source code into an intermediate language instruction according to the conversion rule as shown in FIG.

[改造予定登録処理]
次に、図6〜図8を参照して、本実施形態に係る改造予定登録処理の説明を、適宜図1を参照しつつ行う。
(改造場所入力画面)
図6は、本実施形態に係る改造場所入力画面の例を示す図である。
改造場所入力画面600は、ソースコード表示エリア601と、フローチャート表示エリア602とを有している。
ソースコード表示エリア601には、改造前ソースコード101が表示されており、フローチャート表示エリア602にはソースコード表示エリア601に表示されているソースコードに対応するフローチャートが表示されている。なお、フローチャート表示エリア602に表示されているフローチャートは、プログラム改造支援装置1によって自動的に生成されるものであるが周知の技術であるのでフローチャート生成処理の説明は省略する。また、フローチャート表示エリア602は省略可能である。
[Modification schedule registration process]
Next, the modification schedule registration processing according to the present embodiment will be described with reference to FIGS.
(Modification location input screen)
FIG. 6 is a diagram showing an example of a modified location input screen according to the present embodiment.
The remodeling location input screen 600 has a source code display area 601 and a flowchart display area 602.
The source code display area 601 displays the source code 101 before modification, and the flowchart display area 602 displays a flowchart corresponding to the source code displayed in the source code display area 601. Note that the flowchart displayed in the flowchart display area 602 is automatically generated by the program modification support device 1, but is a well-known technique, so description of the flowchart generation processing is omitted. Further, the flowchart display area 602 can be omitted.

ユーザはマウス操作などによる入力部40の操作によって、改造前ソースコード101に対して改造が行われる場所の入力を行う。例えば、命令603を書き換える場合、ユーザは命令603の行を選択する。また、命令603および命令604を書き換える場合、ユーザは命令603と命令604の行を選択する。また、命令603と命令604の間に新たに命令を加える場合、ユーザは命令603と命令604の間をクリックするなどの操作を行う。
なお、このときユーザによる入力を受け付ける画面は、ソースコード表示エリア601およびフローチャート表示エリア602のどちらでも可能とする。フローチャート表示エリア602で行う場合は、フローチャートにおける各処理について、ソースコード表示エリア601における処理と同様の処理を行えばよい。
また、ウィンドウの表示は、図6のようなソースコード表示エリア601およびフローチャート表示エリア602を同時に表示する形式に限らず、ソースコード表示エリア601や、フローチャート表示エリア602をそれぞれ、あるいはどちらか一方のみを独立に表示するようにしてもよい。
さらに、実装上必要であれば、その他の情報を表示するウィンドウも表示してもよい。
改造場所入力画面600による入力を受け付けると、改造予定登録処理部10は、図7に示す改造情報入力画面を表示する。
The user inputs a place where the modification is performed on the pre-modification source code 101 by operating the input unit 40 by a mouse operation or the like. For example, when the instruction 603 is rewritten, the user selects the line of the instruction 603. In addition, when the instruction 603 and the instruction 604 are rewritten, the user selects the lines of the instruction 603 and the instruction 604. When a new command is added between the commands 603 and 604, the user performs an operation such as clicking between the commands 603 and 604.
At this time, the screen for accepting the input by the user can be either the source code display area 601 or the flowchart display area 602. When performing in the flowchart display area 602, the same process as the process in the source code display area 601 may be performed for each process in the flowchart.
Further, the display of the window is not limited to the format in which the source code display area 601 and the flowchart display area 602 are simultaneously displayed as shown in FIG. 6, and the source code display area 601 and the flowchart display area 602 are each or only one of them. May be displayed independently.
Furthermore, if necessary for implementation, a window for displaying other information may be displayed.
When the input on the modification location input screen 600 is accepted, the modification schedule registration processing unit 10 displays the modification information input screen shown in FIG.

(改造情報入力画面)
図7は、本実施形態に係る改造情報入力画面の例を示す図である。
改造情報入力画面700は、ソースコードの改造予定に関する詳細な情報の入力を受け付けるための画面である。
改造情報入力画面700は、改造が行われる場所を表示する改造場所表示エリア701、改造の内容の入力を受け付ける改造内容入力エリア702、改造内容の概要の入力を受け付ける概要入力エリア703、改造の根拠となる仕様書の記述箇所の入力を受け付ける仕様書情報入力エリア704を有する。
なお、図7に示す改造情報入力画面700は表示の一例であり、実装上必要であれば、上記以外の情報の入力を受け付ける領域を表示してもよい。また、各領域の配置場所も、必ずしも改造情報入力画面700と同じである必要はなく、すべての領域を同時に表示する必要もない。
(Modification information input screen)
FIG. 7 is a diagram illustrating an example of a modification information input screen according to the present embodiment.
The modification information input screen 700 is a screen for accepting input of detailed information related to the modification schedule of the source code.
The remodeling information input screen 700 includes a remodeling place display area 701 for displaying a place where remodeling is performed, a remodeling content input area 702 for accepting input of remodeling contents, a summary input area 703 for receiving a summary of remodeling contents, and a basis for remodeling A specification information input area 704 for receiving input of a description portion of the specification.
Note that the remodeling information input screen 700 shown in FIG. 7 is an example of display, and if necessary for implementation, an area for accepting input of information other than the above may be displayed. Further, the location of each area is not necessarily the same as that of the modification information input screen 700, and it is not necessary to display all areas simultaneously.

改造場所表示エリア701には、図6の改造場所入力画面600で選択された命令の場所に関する情報が表示される。改造場所表示エリア701には、ファイル名およびラインが表示され、このうち、ラインには図6の改造場所入力画面600で選択された命令の、ソースコードにおける行番号が表示される。ファイル名、およびラインは、入力部40を介して変更可能となっている。
図7に示すように、改造内容入力エリア702は、「削除」、「上書」、「追加」などが選択可能となっており、これらの改造内容の選択を受け付けられるようになっている。より詳細な情報を入力する場合、ユーザは概要入力エリア703に詳細な情報を入力する。
概要入力エリア703には、ユーザによって入力部40を介して入力される情報であり、予定されている改造の詳細な情報が入力される。概要入力エリア703は省略可能である。
In the remodeling location display area 701, information regarding the location of the instruction selected on the remodeling location input screen 600 in FIG. 6 is displayed. In the modified location display area 701, the file name and the line are displayed, and among these, the line number in the source code of the instruction selected on the modified location input screen 600 of FIG. 6 is displayed. The file name and the line can be changed via the input unit 40.
As shown in FIG. 7, in the remodeling content input area 702, “delete”, “overwrite”, “addition”, and the like can be selected, and selection of these remodeling contents can be accepted. When inputting more detailed information, the user inputs detailed information in the summary input area 703.
The summary input area 703 is information input by the user via the input unit 40, and detailed information on the planned modification is input. The outline input area 703 can be omitted.

仕様書情報入力エリア704は、ユーザによって入力部40を介して入力される情報であり、この改造に関連する仕様書の参照ページなどの情報である。ここで、「仕様書」とは、改造前ソースコート101作成時の仕様書でもよく、改造内容を記した仕様書(本実施形態では必須としない)でもよい。本実施形態では、改造前ソースコード作成時の仕様書を参照することはあるが、新たな仕様書などを作成する必要はない。
図7の例では、100〜101行目の間に「追加」が行われることを示している。
The specification information input area 704 is information input by the user via the input unit 40, and is information such as a reference page of a specification related to the modification. Here, the “specification” may be a specification at the time of creating the source coat 101 before remodeling, or a specification describing the contents of remodeling (not essential in the present embodiment). In the present embodiment, the specifications at the time of creating the pre-modification source code may be referred to, but it is not necessary to create new specifications.
In the example of FIG. 7, “addition” is performed between lines 100 to 101.

なお、改造場所が1箇所の場合、ユーザは、図6における改造場所の入力と、図7における改造情報の入力を1回ずつ行う。改造場所が複数におよぶ場合、ユーザは、図6における改造場所の入力と、図7における改造情報の入力を改造場所の数分だけ行う。   When there is one remodeling place, the user inputs the remodeling place in FIG. 6 and the remodeling information in FIG. 7 once. When there are a plurality of remodeling locations, the user inputs the remodeling location in FIG. 6 and the remodeling information in FIG. 7 by the number of remodeling locations.

(改造予定データ)
図8は、本実施形態に係る改造予定データの例を示す図である。
改造予定データ800は、図7の改造情報入力画面700において受け付けた情報(改造入力データ103)を基に改造予定登録部11が生成するデータであり、その内容は改造情報入力画面700で受け付けた情報である。
改造予定データ800は、改造場所と改造入力データ103を関連付けるための識別子801、改造場所の情報である改造場所情報802、処理の追加や削除などを示す改造内容情報803、改造内容の概要情報804、改造の根拠となる仕様書の記述箇所の情報である仕様書情報805である。
このうち、識別子801は改造予定登録部11によって付与されるものである。改造場所情報802は図7の改造情報入力画面700における改造場所表示エリア701の情報であり、改造内容情報803は図7の改造内容入力エリア702の情報であり、概要情報804は図7の概要入力エリア703の情報であり、仕様書情報805は仕様書情報入力エリア704の情報である。
(Remodeling schedule data)
FIG. 8 is a diagram illustrating an example of remodeling scheduled data according to the present embodiment.
The modification schedule data 800 is data generated by the modification schedule registration unit 11 based on the information (modification input data 103) received on the modification information input screen 700 of FIG. Information.
The remodeling schedule data 800 includes an identifier 801 for associating the remodeling location with the remodeling input data 103, remodeling location information 802 as remodeling location information, remodeling content information 803 indicating addition or deletion of processing, and remodeling content summary information 804. , Specification information 805 which is information on a description portion of the specification that is the basis for the modification.
Among these, the identifier 801 is given by the remodeling schedule registration unit 11. The modification location information 802 is information of the modification location display area 701 in the modification information input screen 700 of FIG. 7, the modification content information 803 is information of the modification content input area 702 of FIG. 7, and the overview information 804 is the overview of FIG. Information on the input area 703, and specification information 805 is information on the specification information input area 704.

このように、改造予定データ800に仕様書情報805と概要情報804を含めることによって、改造前ソースコード101における仕様書作成時に詳細なコーディングの内容が確定していない場合でも、後の処理で、改造場所と改造内容の検証ができるようになる。
また、改造予定データ800に、識別子801と仕様書情報805を含めることによって、改造場所と改造内容および関連する仕様書の記述との関連付けが可能になり、後記する検証結果確認時に改造内容と仕様書の記述内容の確認を行うことができるようになる。ここで、前記したように「仕様書」とは、改造前ソースコード作成時の仕様書である。本実施形態では、改造前ソースコード作成時の仕様書を参照することはあるが、新たな仕様書などを作成する必要はない。
In this way, by including the specification information 805 and the summary information 804 in the remodeling scheduled data 800, even if the details of the coding are not fixed at the time of creating the specification in the pre-modification source code 101, It becomes possible to verify the location and contents of the modification.
Further, by including the identifier 801 and the specification information 805 in the remodeling scheduled data 800, it becomes possible to associate the remodeling location with the content of the remodeling and the description of the related specification. It becomes possible to confirm the description contents of the book. Here, as described above, the “specification” is a specification at the time of creating source code before modification. In the present embodiment, the specifications at the time of creating the pre-modification source code may be referred to, but it is not necessary to create new specifications.

[改造予定再現処理]
次に、図9を参照して改造予定再現処理(図2のステップS4b)の説明を、適宜図1を参照しつつ行う。改造予定再現処理では、改造予定再現部12が図6〜図8で説明した改造予定登録処理で入力・登録された予定に従って改造前ソースコード101の改造が行われた場合、予測される構造データである予測構造データ900を生成する。
[Modification schedule reproduction process]
Next, the modification schedule reproduction process (step S4b in FIG. 2) will be described with reference to FIG. In the modification schedule reproduction process, when the modification schedule reproduction unit 12 modifies the pre-modification source code 101 according to the schedule input and registered in the modification schedule registration process described with reference to FIGS. The predicted structure data 900 is generated.

図9は、本実施形態に係る予測構造データの例を示す図である。
改造予定再現部12は、改造予定データ800(図8)を基に、予測構造データ900を予測・生成する。このとき、改造予定再現部12は中間語命令と同じ書式で改造内容の情報を埋め込むための中間語命令として、擬似中間語命令901という命令を導入する。つまり、改造予定登録処理に従って行われる改造が確定していないことから、中間語命令を確定することができないため、改造予定再現部12は擬似中間語命令901を使用して予測構造データ900を生成する。
FIG. 9 is a diagram illustrating an example of predicted structure data according to the present embodiment.
The remodeling schedule reproduction unit 12 predicts and generates predicted structure data 900 based on the remodeling schedule data 800 (FIG. 8). At this time, the remodeling scheduled reproduction unit 12 introduces an instruction called a pseudo intermediate language instruction 901 as an intermediate language instruction for embedding the information of the modification content in the same format as the intermediate language instruction. That is, since the modification to be performed in accordance with the modification schedule registration process is not confirmed, the intermediate language instruction cannot be confirmed. Therefore, the modification schedule reproduction unit 12 generates the predicted structure data 900 using the pseudo intermediate language instruction 901. To do.

擬似中間語命令901は、擬似中間語命令であることを示す接頭語902、擬似中間語命令名称903、擬似処理内容904を有している。
接頭語902は擬似中間語命令であることを示すものであり、改造予定再現部12によって付与される。
擬似中間語命令名称903は、図8における改造内容情報803と対応する。つまり、図7の改造内容入力エリア702で「追加」が選択されていれば、図9の例のように「insert」となり、「削除」が選択されていれば「delete」となる。
擬似中間語命令名称903によって、擬似中間語命令901が挿入された場所に、どのような改造が行われる予定であるかを表現することができる。
擬似処理内容904は、改造予定データ800との関連付けのため、図8の識別子801が挿入される。このように、擬似処理内容904に識別子801を使用することによって、擬似中間語命令901が挿入された場所と、改造予定データ800における仕様書の情報(仕様書情報805)とを関連付けることができる。
以上、図9で示したように、改造予定再現処理で擬似中間語命令を挿入することで、後記する処理で、新たな仕様書を必要とせずに改造後ソースコード102に対する改造内容の検証ができるようになる。
The pseudo intermediate language instruction 901 includes a prefix 902 indicating that it is a pseudo intermediate language instruction, a pseudo intermediate language instruction name 903, and pseudo processing content 904.
A prefix 902 indicates a pseudo intermediate language instruction, and is given by the remodeling scheduled reproduction unit 12.
The pseudo intermediate language instruction name 903 corresponds to the modification content information 803 in FIG. That is, if “add” is selected in the remodeling content input area 702 of FIG. 7, “insert” is displayed as in the example of FIG. 9, and “delete” is selected if “delete” is selected.
The pseudo intermediate language instruction name 903 can express what kind of modification is scheduled to be performed at the place where the pseudo intermediate language instruction 901 is inserted.
The pseudo-processing content 904 is inserted with the identifier 801 in FIG. As described above, by using the identifier 801 in the pseudo processing content 904, the location where the pseudo intermediate language instruction 901 is inserted can be associated with the specification information (specification information 805) in the remodeling scheduled data 800. .
As described above, as shown in FIG. 9, by inserting a pseudo intermediate language instruction in the remodeling scheduled reproduction process, the contents to be remodeled with respect to the modified source code 102 can be verified without the need for a new specification in the process described later. become able to.

なお、予測構造データ900を生成するための処理は、改造予定再現部12が、図8の改造予定データ800を参照して、改造場所情報802に該当する行と行の間に、改造内容情報803に相当する処理を行うだけであるため、フローチャートを省略する。例えば、改造内容情報803が「insert」であれば、改造予定再現部12は該当箇所に行を空け、そこに接頭語902、擬似中間語命令名称903、擬似処理内容904として識別子801を挿入する。改造内容情報803が「delete」であれば、改造予定再現部12は該当行を削除し、削除した箇所に接頭語902、擬似中間語命令名称903、擬似処理内容904として識別子801を挿入する。   In the process for generating the predicted structure data 900, the remodeling schedule reproduction unit 12 refers to the remodeling schedule data 800 in FIG. Since only the processing corresponding to 803 is performed, the flowchart is omitted. For example, if the remodeling content information 803 is “insert”, the remodeling schedule reproduction unit 12 leaves a line at the corresponding location, and inserts an identifier 801 as the prefix 902, pseudo-intermediate instruction name 903, and pseudo-processing content 904. . If the modification content information 803 is “delete”, the modification schedule reproduction unit 12 deletes the corresponding line, and inserts the identifier 801 as the prefix 902, pseudo-intermediate instruction name 903, and pseudo-processing content 904 at the deleted location.

[改造場所特定処理]
次に、図10および図12を参照して、改造場所特定処理(図2のステップS5)の説明を、適宜図1を参照しつつ行う。改造場所特定処理では、改造場所特定部21が、改造前構造データ104と、改造後構造データ105とから、実際の改造における改造場所を特定する。
[Modification location identification processing]
Next, referring to FIG. 10 and FIG. 12, the remodeling place specifying process (step S5 in FIG. 2) will be described with reference to FIG. 1 as appropriate. In the remodeling place specifying process, the remodeling place specifying unit 21 specifies the remodeling place in the actual remodeling from the pre-remodeling structure data 104 and the post-remodeling structure data 105.

(改造場所特定処理のフローチャート)
図10は、本実施形態に係る改造場所特定処理の手順を示すフローチャートである。この処理において、改造場所特定部21は図4の構造解析処理で生成した改造前構造データ104および改造後構造データ105の比較を行い、異なっている箇所を検出すると、検出した異なっている箇所に擬似中間語命令を挿入する処理を行う。
(Flow chart of remodeling location identification process)
FIG. 10 is a flowchart showing the procedure of the remodeling place specifying process according to the present embodiment. In this process, the remodeling location specifying unit 21 compares the pre-remodeling structure data 104 and the remodeling structure data 105 generated in the structural analysis process of FIG. Performs processing to insert pseudo intermediate language instructions.

まず、改造場所特定部21は改造後ソースコード102の構造を図4の構造解析処理で解析した改造後構造データ105から中間語命令(改造後中間語命令)を1つ取得する(S201)。
次に、改造場所特定部21は、改造前ソースコード101の構造を図4の構造解析処理で解析した改造前構造データ104から中間語命令(改造前中間語命令)を1つ取得する(S202)。
First, the remodeling location specifying unit 21 acquires one intermediate language command (modified intermediate language command) from the reconstructed structure data 105 obtained by analyzing the structure of the remodeled source code 102 by the structural analysis processing of FIG. 4 (S201).
Next, the remodeling location specifying unit 21 acquires one intermediate language command (pre-remodeling intermediate language command) from the pre-remodeling structure data 104 obtained by analyzing the structure of the source code 101 before remodeling by the structural analysis processing of FIG. 4 (S202). ).

続いて、改造場所特定部21は、ステップS201で取得した改造後中間語命令と、ステップS202で取得した改造前中間語命令を比較し、改造後中間語命令と、改造前中間語命令とが同一の中間語命令であるか否かの判定を行う(S203)。   Subsequently, the remodeling location identifying unit 21 compares the post-remodeling intermediate language instruction acquired in step S201 with the pre-remodeling intermediate language instruction acquired in step S202. It is determined whether or not they are the same intermediate language instruction (S203).

ステップS203の結果、改造後中間語命令と、改造前中間語命令とが同一の中間語命令でない場合(S203→No)、改造場所特定部21は、この箇所で改造が行われているものとみなし、改造内容判定を行う(S204)。ステップS204では、処理対象となっている箇所で、どのような改造が行われているかを判定するものであり、改造内容としては「追加」、「削除」、「変更」などがある。   As a result of step S203, when the modified intermediate language command and the pre-modified intermediate language command are not the same intermediate language command (S203 → No), the modified location specifying unit 21 assumes that the modification has been performed at this location. It is deemed that the modification contents are determined (S204). In step S204, it is determined what kind of remodeling has been performed at the location to be processed. Examples of the contents of remodeling include “addition”, “deletion”, and “change”.

このときの判定方法を図11を参照して説明する。
図11(a)のように、現在、処理対象となっている改造前中間語命令が「A2」であり、処理対象となっている改造後中間語命令が「B1」である場合、処理対象となっている改造後中間語命令「B1」の後の改造後中間語命令に、処理対象となっている改造前中間語命令と同じ「A2」があれば、改造場所特定部21は「追加」と判定する。
The determination method at this time will be described with reference to FIG.
As shown in FIG. 11A, when the pre-modification intermediate language instruction that is currently processed is “A2” and the modified intermediate language instruction that is the processing target is “B1”, the processing target If the modified intermediate language instruction after the modified intermediate language instruction “B1” has the same “A2” as the processed intermediate language instruction before modification, the modified location specifying unit 21 “adds” Is determined.

図11(b)のように、処理対象となっている改造前中間語命令が「A2」であり、処理対象となっている改造後中間語命令が「A3」である場合、処理対象となっている改造前中間語命令「A2」の後の改造前中間語命令が、処理対象となっている改造後中間語命令と同じ「A3」であれば、改造場所特定部21は「削除」と判定する。   As shown in FIG. 11B, when the pre-remodeling intermediate language instruction to be processed is “A2” and the post-remodeling intermediate language instruction to be processed is “A3”, it is a processing target. If the pre-remodeling intermediate language command after the pre-remodeling intermediate language command “A2” is “A3”, which is the same as the post-remodeling intermediate language command to be processed, the remodeling location identifying unit 21 reads “delete”. judge.

図11(c)のように、処理対象となっている改造前中間語命令が「A2」であり、処理対象となっている改造後中間語命令が「C1」である場合、処理対象となっている改造前中間語命令、改造後中間語命令の前後の中間語命令が、改造後、改造前で一致していれば、改造場所特定部21は「変更」と判定する。   As shown in FIG. 11C, when the pre-remodeling intermediate language instruction to be processed is “A2” and the post-remodeling intermediate language instruction to be processed is “C1”, it is a processing target. If the intermediate language commands before and after the modified intermediate language command and the modified intermediate language command match after the remodeling and before the remodeling, the remodeling location specifying unit 21 determines “change”.

次に、改造場所特定部21は、改造場所特定データ1100に擬似中間語命令を挿入(マーキング)して(S205)、ステップS207へ処理を進める。ステップS205については、図12を参照して後記する。   Next, the remodeling location specifying unit 21 inserts (marks) a pseudo intermediate language instruction into the remodeling location specifying data 1100 (S205), and proceeds to step S207. Step S205 will be described later with reference to FIG.

ステップS203の結果、改造後中間語命令と、改造前中間語命令とが同一の中間語命令である場合(S203→Yes)、改造場所特定部21は、改造が行われているとみなし、この改造後中間語命令を改造場所特定データ1100の末尾に挿入し(S206)、すべての改造後中間語命令および改造前中間語命令(中間語命令)について解析をしたか否かを判定する(S207)。
ステップS207の結果、解析を行っていない中間語命令が存在する場合(S207→No)、改造場所特定部21はステップS201へ処理を戻し、次の改造後中間語命令および改造前中間語命令について解析を行う。
ステップS207の結果、すべての中間語命令について解析を行っている場合(S207→Yes)、改造場所特定部21は改造場所特定データ1100を出力して(S208)、処理を終了する。
As a result of step S203, when the modified intermediate language instruction and the intermediate language instruction before modification are the same intermediate language instruction (S203 → Yes), the modified location identifying unit 21 regards that the modification has been performed, The modified intermediate language instruction is inserted at the end of the modified location specifying data 1100 (S206), and it is determined whether or not all the modified intermediate language instructions and the unmodified intermediate language instructions (intermediate instruction) have been analyzed (S207). ).
If there is an intermediate language instruction that has not been analyzed as a result of step S207 (S207 → No), the remodeling location identifying unit 21 returns the processing to step S201, and the next reconstructed intermediate language instruction and pre-remodeled intermediate language instruction Perform analysis.
As a result of step S207, when all the intermediate language instructions are analyzed (S207 → Yes), the remodeling location specifying unit 21 outputs the remodeling location specifying data 1100 (S208), and the process is terminated.

(改造場所特定処理結果)
図12は、改造場所特定処理結果の例を示す図である。
図12(a)には、上段に構造データ、下段にソースコードを示しており、左列に改造前、中列に改造後、右列に改造場所特定処理結果を示す。
なお、図12(a)における改造場所特定処理結果が図1における改造場所特定データ1100となる。
図12(a)から、改造前ソースコード101から生成した構造データ(改造前構造データ)と、改造後ソースコード102から生成した構造データ(改造後構造データ)を、図10におけるステップS203で比較すると、中間語命令1101が挿入されていることがわかる。これは、改造後ソースコード102において、命令1102が挿入されたことを示している。
改造場所特定部21は、このように改造によって挿入された命令である中間語命令1101を、擬似中間語命令1103で置き換える。
(Remodeling location specific processing results)
FIG. 12 is a diagram illustrating an example of the result of the remodeling place specifying process.
FIG. 12A shows the structural data in the upper row and the source code in the lower row. The left row shows the result of the remodeling location specifying process before remodeling, the middle row after remodeling, and the right column.
The result of the remodeling place specifying process in FIG. 12A becomes the remodeling place specifying data 1100 in FIG.
From FIG. 12A, the structure data generated from the pre-modification source code 101 (structure data before modification) and the structure data generated from the modified source code 102 (structure data after modification) are compared in step S203 in FIG. Then, it can be seen that the intermediate language instruction 1101 is inserted. This indicates that the instruction 1102 is inserted in the modified source code 102.
The remodeling location specifying unit 21 replaces the intermediate language instruction 1101, which is an instruction inserted by remodeling in this way, with a pseudo intermediate language instruction 1103.

実際には、改造場所特定部21は、上から順に改造前構造データ104、改造後構造データ105の中間語命令を比較していき、一致していれば、改造場所特定データ1100に改造後構造データ105の中間語命令を書き足していき、不一致が検出されれば、図11で説明した判定方法に従って改造内容を判定し、その改造内容に該当する擬似中間語命令を改造場所特定データ1100に書き足す。   Actually, the remodeling location specifying unit 21 compares the intermediate language commands of the structure data 104 before remodeling and the structure data 105 after remodeling in order from the top. If the intermediate language instruction of the data 105 is added and a mismatch is detected, the modification content is determined according to the determination method described in FIG. 11, and the pseudo intermediate language instruction corresponding to the modification content is added to the modification location specifying data 1100. Add.

図12(b)に示すように、改造場所特定処理結果における擬似中間語命令1103は、予測構造データ900などで用いられる擬似中間語命令901(図9)と同様、接頭語1111、擬似中間語命令名称1112、擬似処理内容1113を有している。ただし、改造場所特定処理結果における擬似中間語命令1103の擬似処理内容1113は、改造後構造データ105における改造された(挿入された)中間語命令1101そのものが挿入されるところが、予測構造データ900などで用いられる擬似中間語命令901と異なる。   As shown in FIG. 12 (b), the pseudo intermediate language instruction 1103 in the remodeling place specifying process result is the same as the pseudo intermediate language instruction 901 (FIG. 9) used in the prediction structure data 900 and the like. It has an instruction name 1112 and a pseudo process content 1113. However, the pseudo-processing content 1113 of the pseudo-intermediate instruction 1103 in the modified location specifying process result is that the modified intermediate language instruction 1101 itself in the post-modification structure data 105 is inserted into the predicted structure data 900 and the like. This is different from the pseudo intermediate language instruction 901 used in FIG.

以上、図10から図12までで述べた改造場所特定処理によって、改造後における改造場所を擬似中間語命令で置き換えることによって、改造後構造データ105における改造場所が明らかになる。   As described above, the remodeling location in the post-remodeling structure data 105 is clarified by replacing the remodeling location after the remodeling with the pseudo intermediate language command by the remodeling location specifying process described in FIGS.

[改造内容検証処理]
次に、図13〜図15を参照して、改造内容検証処理(図2のステップS5)の説明を、適宜図1を参照しつつ行う。改造内容検証処理では、改造内容検証部22が、図10の処理で生成された改造場所特定データ1100と、図9で説明した改造予定再現処理で生成された予測構造データ900とを比較することによって、予定に従って改造が行われているか否かを判定し、その判定結果を表示部50に表示する。
[Modification content verification process]
Next, with reference to FIGS. 13 to 15, the modification content verification process (step S <b> 5 in FIG. 2) will be described with reference to FIG. 1 as appropriate. In the modification content verification process, the modification content verification unit 22 compares the modification location identification data 1100 generated in the process of FIG. 10 with the predicted structure data 900 generated in the modification schedule reproduction process described in FIG. Thus, it is determined whether remodeling has been performed according to the schedule, and the determination result is displayed on the display unit 50.

(改造内容検証処理のフローチャート)
図13は、本実施形態に係る改造内容検証処理の手順を示すフローチャートである。
まず、改造内容検証部22は、改造場所特定データ1100から基本ブロック(改造後基本ブロック)を取得する(S301)。
次に、改造内容検証部22は、改造予定再現部12によって改造内容を再現した予測構造データ900から、ステップS301で取得した改造後基本ブロックと類似する基本ブロックである類似基本ブロックを検索し(S302)、類似基本ブロックが検出されたか否かを判定する(S303)。類似基本ブロックの検出基準としては、基本ブロック内において、一致する中間語命令がの数が一定数以上あり、かつ、改造場所特定データ1100および予測構造データ900上で、処理対象となっている基本ブロックの前の基本ブロック同士、または後の基本ブロック同士でも、一致する中間語命令の数が一定数以上あることなどである。
(Modification content verification process flowchart)
FIG. 13 is a flowchart showing the procedure of the modification content verification process according to the present embodiment.
First, the remodeling content verification unit 22 acquires a basic block (basic block after remodeling) from the remodeling location specifying data 1100 (S301).
Next, the modification content verification unit 22 retrieves a similar basic block that is a basic block similar to the modified basic block acquired in step S301 from the predicted structure data 900 in which the modification content is reproduced by the modification schedule reproduction unit 12 ( S302), it is determined whether or not a similar basic block has been detected (S303). As a reference for detecting a similar basic block, the number of matching intermediate language instructions in the basic block is a certain number or more, and the basic target to be processed in the remodeling location specifying data 1100 and the predicted structure data 900 For example, the number of matching intermediate language instructions is equal to or greater than a certain number in the basic blocks before or after the blocks.

ステップS303の結果、類似基本ブロックが検出されなかった場合(S303→No)、改造内容検証部22は、ステップS301で取得した基本ブロックは予定外の改造であるとみなし、「NG」を検証結果データ106に登録し(S304)、ステップS309へ処理を進める。このとき、検証結果データ106には、「NG」の情報とともに該当する基本ブロックの識別子315(図3)が登録される。   If no similar basic block is detected as a result of step S303 (S303 → No), the remodeling content verification unit 22 regards the basic block acquired in step S301 as an unscheduled remodeling and verifies “NG” as the verification result. The data 106 is registered (S304), and the process proceeds to step S309. At this time, in the verification result data 106, the identifier 315 (FIG. 3) of the corresponding basic block is registered together with the information “NG”.

ステップS303の結果、類似基本ブロックが検出された場合(S303→Yes)、改造内容検証部22は、ステップS301で取得した改造後基本ブロックと、検出された類似基本ブロックに含まれている中間語命令の比較を行う(S305)。
そして、改造内容検証部22は、ステップS201で取得された改造後基本ブロックと、類似基本ブロックにおいて、中間語命令の形式が一致しているか否かを判定する(S306)。なお、ここでの中間語命令とは擬似中間語命令を含んでおり、その形式とは、擬似中間語命令であるか否かに関するものである。
ステップS306の結果、不一致である場合(S306→No)、改造内容検証部22は「NG」を検証結果データ106に登録し(S304)、ステップS309へ処理を進める。なお、このとき、改造内容検証部22は、類似基本ブロック側が擬似中間語命令であれば、予測構造データ900の擬似処理内容904(図9)の識別子と、不一致が検出された中間語命令の行番号を「NG」の情報とともに検証結果データ106に登録する。類似基本ブロック側が擬似中間語命令でなければ、不一致が検出された中間語命令の行番号を「NG」の情報とともに検証結果データ106に登録する。なお、ここで、登録される行番号は改造後構造データ105の行番号である。
When a similar basic block is detected as a result of step S303 (S303 → Yes), the remodeling content verification unit 22 determines that the modified basic block acquired in step S301 and the intermediate language included in the detected similar basic block The instructions are compared (S305).
Then, the remodeling content verification unit 22 determines whether or not the format of the intermediate language instruction matches between the remodeled basic block acquired in step S201 and the similar basic block (S306). Here, the intermediate language instruction includes a pseudo intermediate language instruction, and the format relates to whether or not it is a pseudo intermediate language instruction.
If the result of step S306 is a mismatch (S306 → No), the remodeling content verification unit 22 registers “NG” in the verification result data 106 (S304), and the process proceeds to step S309. At this time, if the similar basic block side is a pseudo intermediate language instruction, the remodeling content verification unit 22 does not match the identifier of the pseudo processing content 904 (FIG. 9) of the predicted structure data 900 and the intermediate language instruction in which a mismatch is detected. The line number is registered in the verification result data 106 together with the information “NG”. If the similar basic block side is not a pseudo intermediate language instruction, the line number of the intermediate language instruction in which the mismatch is detected is registered in the verification result data 106 together with the information “NG”. Here, the registered line number is the line number of the modified structural data 105.

ステップS306の結果、一致である場合(S306→Yes)、改造内容検証部22は、その内容が一致しているか否かを判定する(S307)。ここで、内容とは「insert」や、「delete」などである。例えば、双方「insert」であれば、改造内容検証部22は「一致」と判定し、「insert」と「delete」であったりすれば、改造内容検証部22は「不一致」と判定する。
ステップS307の結果、不一致の場合(S307→No)、改造内容検証部22はステップS304へ処理を進め、「NG」を検証結果データ106に登録する(S304)。ここで、改造内容検証部22は、類似基本ブロック側が擬似中間語命令であれば、予測構造データ900の擬似処理内容904(図9)の識別子と、不一致が検出された中間語命令の行番号を「NG」の情報とともに検証結果データ106に登録する。類似基本ブロック側が擬似中間語命令でなければ、不一致が検出された中間語命令の行番号を「NG」の情報とともに検証結果データ106に登録する。なお、ここで、登録される行番号は改造後構造データ105の行番号である。
If the result of step S306 is a match (S306 → Yes), the remodeling content verification unit 22 determines whether or not the content matches (S307). Here, the contents are “insert”, “delete”, and the like. For example, if both are “insert”, the modification content verification unit 22 determines “match”, and if it is “insert” and “delete”, the modification content verification unit 22 determines “mismatch”.
If the result of step S307 is a mismatch (S307 → No), the remodeling content verification unit 22 advances the process to step S304, and registers “NG” in the verification result data 106 (S304). Here, if the similar basic block side is a pseudo intermediate language instruction, the remodeling content verification unit 22 identifies the identifier of the pseudo processing content 904 (FIG. 9) of the predicted structure data 900 and the line number of the intermediate language instruction in which a mismatch is detected. Is registered in the verification result data 106 together with the information “NG”. If the similar basic block side is not a pseudo intermediate language instruction, the line number of the intermediate language instruction in which the mismatch is detected is registered in the verification result data 106 together with the information “NG”. Here, the registered line number is the line number of the modified structural data 105.

ステップS307の結果、一致の場合(S307→Yes)、改造内容検証部22は「OK」を検証結果データ106に登録する(S308)。このとき、改造内容検証部22は、該当する中間語命令の行番号を「OK」の情報とともに検証結果データ106に登録する。なお、ここで、登録される行番号は改造後構造データ105の行番号である。   If the result of step S307 is a match (S307 → Yes), the remodeling content verification unit 22 registers “OK” in the verification result data 106 (S308). At this time, the modification content verification unit 22 registers the line number of the corresponding intermediate language instruction in the verification result data 106 together with the information “OK”. Here, the registered line number is the line number of the modified structural data 105.

そして、改造内容検証部22は、処理対象となっている基本ブロック(改造後基本ブロック、類似基本ブロック)内のすべての中間語命令を解析したか否かを判定する(S309)。
ステップS309の結果、解析していない中間語命令が存在する場合(S309→No)、改造内容検証部22はステップS305へ処理を戻し、次の中間語命令の解析を行う。
ステップS309の結果、すべての中間語命令を解析している場合(S309→Yes)、改造内容検証部22は改造場所特定データ1100におけるすべての基本ブロックを解析したか否かを判定する(S310)。
ステップS310の結果、改造場所特定データ1100において、解析していない基本ブロックが存在する場合(S310→No)、改造内容検証部22はステップS301へ処理を戻し、次の基本ブロックの解析を行う。
ステップS310の結果、改造場所特定データ1100におけるすべての基本ブロックを解析している場合(S310→Yes)、改造内容検証部22は、検証結果データ106を出力し(S311)、改造内容検証処理を終了する。
Then, the remodeling content verification unit 22 determines whether all intermediate language instructions in the basic block to be processed (basic block after remodeling, similar basic block) have been analyzed (S309).
If there is an intermediate language instruction that has not been analyzed as a result of step S309 (S309 → No), the modified content verification unit 22 returns to step S305 to analyze the next intermediate language instruction.
As a result of step S309, when all the intermediate language instructions are analyzed (S309 → Yes), the remodeling content verification unit 22 determines whether all the basic blocks in the remodeling location specifying data 1100 have been analyzed (S310). .
If there is a basic block that has not been analyzed in the modified location specifying data 1100 as a result of step S310 (S310 → No), the modified content verification unit 22 returns the process to step S301 and analyzes the next basic block.
As a result of step S310, when all the basic blocks in the remodeling location specifying data 1100 are analyzed (S310 → Yes), the remodeling content verification unit 22 outputs the verification result data 106 (S311), and performs remodeling content verification processing. finish.

(改造内容検証判定パターン)
図14は、図13のステップS305で使用される判定パターンの例を示す例である。なお、この説明にけるステップ番号は図13のステップ番号である。
図14において、改造場所特定データ1100の中間語命令が擬似中間語命令である場合は、改造後ソースコード102において改造が行われた場所であることを示しており、擬似中間語命令でない場合は改造後ソースコード102において改造が行われていないことを示している。また、予測構造データ900の中間語命令が擬似中間語命令である場合は、改造が行われる予定の場所であることを示しており、擬似中間語命令でない場合は改造が行われる予定でないことを示している。
「パターンA」では、改造場所特定データ1100の中間語命令および予測構造データ900の中間語命令がともに擬似中間語命令ではなく(中間語命令)、その内容も一致しているパターンである(ステップS306→Yes;ステップS307→Yes)。この「パターンA」は、改造予定以外の場所であり、かつ改造が行われていないことを示しており、改造内容検証部22は「OK」を検証結果データ106に登録する(ステップS308)。
「パターンB」は、改造場所特定データ1100の中間語命令が擬似中間語命令ではなく(中間語命令)、予測構造データ900の中間語命令が擬似中間語命令であるパターンである。この場合、当然内容は不一致となる。この「パターンB」では、改造が必要な場所に対して、必要な改造が行われていないことを示しており、改造内容検証部22は「NG」を検証結果データ106に登録する(ステップS304)。
(Modification content verification judgment pattern)
FIG. 14 is an example showing an example of the determination pattern used in step S305 of FIG. Note that the step numbers in this description are the step numbers in FIG.
In FIG. 14, when the intermediate language instruction of the remodeling location specifying data 1100 is a pseudo intermediate language instruction, this indicates that the remodeled source code 102 has been remodeled. This indicates that the source code 102 after the modification has not been modified. In addition, when the intermediate language instruction of the predicted structure data 900 is a pseudo intermediate language instruction, it indicates that the modification is scheduled to be performed, and when it is not a pseudo intermediate language instruction, the modification is not scheduled. Show.
In the “pattern A”, the intermediate language instruction of the remodeling location specifying data 1100 and the intermediate language instruction of the prediction structure data 900 are not pseudo intermediate language instructions (intermediate language instructions), and the contents are also matched (step). S306 → Yes; Step S307 → Yes). This “pattern A” indicates that the place is not a place to be remodeled and has not been remodeled, and the remodeling content verification unit 22 registers “OK” in the verification result data 106 (step S308).
“Pattern B” is a pattern in which the intermediate language instruction of the remodeling location specifying data 1100 is not a pseudo intermediate language instruction (intermediate language instruction), and the intermediate language instruction of the predicted structure data 900 is a pseudo intermediate language instruction. In this case, the contents are naturally inconsistent. This “pattern B” indicates that the necessary modification is not performed on the place where the modification is required, and the modification content verification unit 22 registers “NG” in the verification result data 106 (step S304). ).

「パターンC」は、改造場所特定データ1100の中間語命令が擬似中間語命令であり、予測構造データ900の中間語命令は擬似中間語命令ではない(中間語命令)パターンであり、当然内容は不一致となるパターンである。この「パターンC」は、改造を行う必要がない場所に、不要な改造が行われたことを示しており、改造内容検証部22は「NG」を検証結果データ106に登録する(ステップS304)。
「パターンD」は、改造場所特定データ1100および予測構造データ900の中間語命令がともに擬似中間語命令であり、かつ、その内容が一致するパターンである(ステップS306→Yes;ステップS307→Yes)。この「パターンD」は、改造が必要な場所に、適切な改造が行われたことを示しており、改造内容検証部22は「OK」を検証結果データ106に登録する(ステップS308)。
“Pattern C” is a pattern in which the intermediate language instruction of the remodeling location specifying data 1100 is a pseudo intermediate language instruction, and the intermediate language instruction of the predicted structure data 900 is not a pseudo intermediate language instruction (intermediate language instruction). It is a pattern that does not match. This “pattern C” indicates that unnecessary modification has been performed in a place where modification is not necessary, and the modification content verification unit 22 registers “NG” in the verification result data 106 (step S304). .
“Pattern D” is a pattern in which the intermediate language instructions of the remodeling location specifying data 1100 and the predicted structure data 900 are both pseudo intermediate language instructions and the contents match (step S306 → Yes; step S307 → Yes). . This “pattern D” indicates that appropriate remodeling has been performed at a place where remodeling is necessary, and the remodeling content verification unit 22 registers “OK” in the verification result data 106 (step S308).

「パターンE」は、改造場所特定データ1100および予測構造データ900の中間語命令がともに擬似中間語命令であるが、その内容が不一致であるパターンである(ステップS306→Yes;ステップS307→No)。この「パターンE」は、予定されている箇所に改造が行われているのだが、その内容が異なっていることを示しており、改造内容検証部22は「NG」を検証結果データ106に登録する(ステップS304)。
「パターンF」は、改造場所特定データ1100および予測構造データ900の中間語命令がともに擬似中間語命令ではないが(中間語命令)、その内容が一致しないパターンである(ステップS306→Yes;ステップS307→No)。この「パターンF」は、改造対象となっている改造前ソースコード101とは異なるソースコードを改造して、改造後ソースコード102として登録した疑いがあることを示しており、改造内容検証部22は「NG」を検証結果データ106に登録する(ステップS304)。
“Pattern E” is a pattern in which both of the intermediate language instructions of the remodeling location specifying data 1100 and the predicted structure data 900 are pseudo intermediate language instructions, but their contents are inconsistent (step S306 → Yes; step S307 → No). . This “Pattern E” indicates that the modification has been made at the planned location, but the contents are different, and the modification content verification unit 22 registers “NG” in the verification result data 106. (Step S304).
“Pattern F” is a pattern in which the intermediate language instructions in the remodeling location specifying data 1100 and the predicted structure data 900 are not pseudo intermediate language instructions (intermediate language instructions), but their contents do not match (step S306 → Yes; step S307 → No). This “pattern F” indicates that there is a suspicion that a source code different from the pre-modification source code 101 to be modified is modified and registered as the post-modification source code 102. Registers “NG” in the verification result data 106 (step S304).

(検証結果表示画面)
図15は、改造内容検証部によって表示部に表示される検証結果表示画面の例を示す図である。
検証結果表示画面1400は、改造後ソースコード表示エリア1401、検証結果表示エリア1402を有している。
検証結果表示エリア1402には、改造予定にしたがって正しく改造が行われた場合に表示されるエリアであるOKエリア1403、改造予定と異なる改造が行われた場合に表示されるエリアであるNGエリア1404を有している。
OKエリア1403には、改造予定を識別するID表示エリア1405、判定結果表示エリア1406、改造の根拠となる仕様書の記載場所を表示する仕様書情報表示エリア1407、レビューを促すメッセージ表示エリア1408を有している。
NGエリア1404には、OKエリア1403と同様に改造予定を識別するID表示エリア1408、判定結果表示エリア1409、改造の根拠となる仕様書の記載場所を表示する仕様書情報表示エリア1410、異常判定の内容を示す判定内容表示エリア1411を表示する。
(Verification result display screen)
FIG. 15 is a diagram illustrating an example of a verification result display screen displayed on the display unit by the modification content verification unit.
The verification result display screen 1400 has a post-modification source code display area 1401 and a verification result display area 1402.
The verification result display area 1402 includes an OK area 1403 that is displayed when the modification is correctly performed according to the modification schedule, and an NG area 1404 that is an area displayed when a modification different from the modification schedule is performed. have.
The OK area 1403 includes an ID display area 1405 for identifying a modification schedule, a determination result display area 1406, a specification information display area 1407 for displaying a description location of a specification that is the basis for modification, and a message display area 1408 for prompting a review. Have.
As in the OK area 1403, the NG area 1404 includes an ID display area 1408 for identifying a modification schedule, a determination result display area 1409, a specification information display area 1410 for displaying a description location of a specification that is the basis for modification, and an abnormality determination. A determination content display area 1411 indicating the content of the item is displayed.

このうち、ID表示エリア1405,1408に表示される内容は、検証結果データ106に登録されている識別子である。なお、予測構造データ900が擬似中間語命令でない箇所で不一致が検出された場合、ID表示エリア1405,1408は空欄となる。また、仕様書情報表示エリア1407,1410の内容は図8に示す改造予定データ800の仕様書情報805である。これらのデータは、改造内容検証部22が、検証結果データ106における識別子をキーとして、改造予定データ800を検索することによって取得される情報である。なお、仕様書情報805に表示されている仕様書は、改造前ソースコード作成時に作成された仕様書である。
また、判定結果表示エリア1406,1409は、図13のステップS306における結果を検証結果データ106内に保持することによって表示される情報である。
メッセージ表示エリア1408、判定内容表示エリア1411は、例えば、図14に示すパターン毎にメッセージを予め用意しておくことによって表示される情報である。
Among these, the contents displayed in the ID display areas 1405 and 1408 are identifiers registered in the verification result data 106. If a mismatch is detected at a location where the predicted structure data 900 is not a pseudo-middle language instruction, the ID display areas 1405 and 1408 are blank. The contents of the specification information display areas 1407 and 1410 are the specification information 805 of the remodeling scheduled data 800 shown in FIG. These data are information acquired by the modification content verification unit 22 searching the modification schedule data 800 using the identifier in the verification result data 106 as a key. Note that the specification displayed in the specification information 805 is a specification created when creating the pre-modification source code.
The determination result display areas 1406 and 1409 are information displayed by holding the result in step S306 of FIG.
The message display area 1408 and the determination content display area 1411 are information displayed by preparing a message for each pattern shown in FIG. 14, for example.

改造後ソースコード表示エリア1401には、改造場所が正常(「OK」)な場合と異常(「NG」)な場合を区別してハイライト表示し、さらに、検証結果表示エリア1402の各項目と関連付けを行う。このような関連付けは、改造内容検証部22が、検証結果データ106に登録されている行番号を参照することによって行われる。
図15の例では、ハイライト表示箇所1421と、OKエリア1403とを直線1412で結び,ハイライト表示箇所1422と、NGエリア1404とを直線1413で結ぶことで、改造後ソースコード102における改造場所とレポート内容を関連付けている。
In the post-modification source code display area 1401, the case where the modification location is normal (“OK”) and the abnormal (“NG”) are distinguished and highlighted, and further associated with each item in the verification result display area 1402. I do. Such association is performed by the remodeling content verification unit 22 referring to the line number registered in the verification result data 106.
In the example of FIG. 15, the highlight display location 1421 and the OK area 1403 are connected by a straight line 1412, and the highlight display location 1422 and the NG area 1404 are connected by a straight line 1413, so Is associated with the report contents.

なお、図15は表示の一例であり、実装上必要であれば他の情報を表示する領域を追加してもよい。また、すべての領域を同時に表示する必要もなく、例えば、ユーザのクリック入力などで、表示するエリアを選択可能にしてもよい。また、改造場所を示す方法もハイライト表示に限定しない。   Note that FIG. 15 is an example of display, and an area for displaying other information may be added if necessary for mounting. Further, it is not necessary to display all the areas at the same time. For example, the area to be displayed may be selectable by a user click input or the like. Also, the method of indicating the remodeling location is not limited to the highlight display.

このように、予定されている改造の内容や、場所と、実際に改造が行われた内容や、場所で整合性が取れていない場合に、整合性が取れていない場所を明示することで、改造後ソースコード102の修正、または、改造入力データ103の再入力をユーザに促すことができる。   In this way, by clearly showing the contents of the planned remodeling and location, the content of the actual remodeling, and the location where consistency is not achieved, It is possible to prompt the user to modify the source code 102 after remodeling or re-input the remodeled input data 103.

図10から図15までで述べた改造内容検証部22の処理によって、新たな仕様書を必要とせずに、改造後ソースコード102に対する改造内容の検証ができるようになる。また、改造前ソースコード作成のときの仕様書作成において詳細なコーディングの内容が確定していない場合でも、改造場所と改造内容の検証ができるようになる。   The modification content verification unit 22 described with reference to FIGS. 10 to 15 makes it possible to verify the modification contents for the modified source code 102 without requiring a new specification. In addition, even if the details of coding are not confirmed in the creation of the specifications when creating the source code before modification, the modification location and modification contents can be verified.

(まとめ)
以上、本実施形態によって、新たな仕様書を必要とせずに、改造後ソースコード102に対する改造内容の検証ができるようになり、改造前ソースコード作成のときの仕様書作成において詳細なコーディングの内容が確定していない場合でも、改造場所と改造内容の検証ができるようになる。
この結果、プログラミング段階の誤った改造をレビュー段階で検出でき、かつ、レビュー段階におけるレビュー漏れを防ぐことができるようになる。
(Summary)
As described above, according to the present embodiment, it becomes possible to verify the modified contents of the modified source code 102 without requiring a new specification, and the detailed coding contents in the creation of the specifications at the time of creating the modified source code Even if is not confirmed, it will be possible to verify the location and contents of the modification.
As a result, an erroneous modification in the programming stage can be detected in the review stage, and a review omission in the review stage can be prevented.

なお、本発明は実施形態に記載した例に限定されるものではなく、様々な変形例が含まれる。例えば、本実施形態では、本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明したすべての構成を備えるものに限定されるものではない。   In addition, this invention is not limited to the example described in embodiment, Various modifications are included. For example, in the present embodiment, the present invention has been described in detail for easy understanding, and is not necessarily limited to the one having all the configurations described.

また、本実施形態で述べた中間語命令の名称および書式は一例であり、実装に応じて、名称および書式の変更、または情報の追加を行ってもよい。
また、本実施形態の各構成、機能、処理部、処理手段などは、それらの一部または全部を、例えば集積回路で設計するなどによりハードウェアで実現してもよい。また、上記の各構成、機能などは、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイルなどの情報は、メモリや、ハードディスク、SSD(Solid State Drive)などの記録装置、または、IC(Integrated Circuit)カード、SD(Secure Digital)カード、DVD(Digital Versatile Disc)などの記録媒体に記憶させることができる。
Further, the names and formats of the intermediate language instructions described in this embodiment are examples, and the names and formats may be changed or information may be added depending on the implementation.
In addition, each configuration, function, processing unit, processing unit, and the like of the present embodiment may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor. Information such as programs, tables, and files for realizing each function is stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), an IC (Integrated Circuit) card, an SD (Secure Digital) card, a DVD (Digital Versatile Disc) can be stored.

1 プログラム改造支援装置
10 改造予定登録処理部
11 改造予定登録部
12 改造予定再現部(改造後データ生成部)
20 改造内容検証処理部
21 改造場所特定部
22 改造内容検証部
30 構造解析部
40 入力部
50 表示部
101 改造前ソースコード
102 改造後ソースコード
103 改造入力データ
104 改造前構造データ
105 改造後構造データ
106 検証結果データ
800 改造予定データ
900 予測構造データ(予測データ)
1100 改造場所特定データ(改造後データ)
1 Program modification support device 10 Modification schedule registration processing section 11 Modification schedule registration section 12 Modification modification reproduction section (data generation section after modification)
20 Modification Content Verification Processing Unit 21 Modification Location Identification Unit 22 Modification Content Verification Unit 30 Structural Analysis Unit 40 Input Unit 50 Display Unit 101 Source Code Before Modification 102 Source Code After Modification 103 Modification Input Data 104 Structure Data Before Modification 105 Structure Data After Modification 106 Verification result data 800 Planned modification data 900 Predicted structure data (predicted data)
1100 Modification location specific data (data after modification)

Claims (6)

プログラムの改造を支援するプログラム改造支援装置のプログラム改造支援方法であって、
前記プログラム改造支援装置が、
改造前の前記プログラムのソースコードである改造前ソースコードにおける命令を、コンパイラの機能によって出力される中間語命令に変換して改造前構造データを生成し、
入力部を介して、入力された、改造予定箇所に関する情報である改造予定データと、前記改造前構造データとに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データを、前記中間語命令を用いて生成し、
改造後の前記プログラムのソースコードである改造後ソースコードに基づく改造場所特定データを、前記中間語命令を用いて生成し、
前記予測データにおける前記改造が行われる箇所に関する情報と、前記改造場所特定データにより特定される前記改造の場所と、を比較し、不一致箇所が検出された場合、前記不一致箇所が検出された旨を表示部に表示させる
ことを特徴とするプログラム改造支援方法。
A program remodeling support method for a program remodeling support device for supporting program remodeling,
The program modification support device is
Convert the instructions in the source code before modification, which is the source code of the program before modification, into intermediate language instructions output by the function of the compiler to generate structure data before modification,
Prediction data having information on the location where the planned remodeling will be performed based on the remodeling planned data that is information related to the planned remodeling location and the structure data before remodeling, which are input via the input unit. Is generated using the intermediate language instruction,
Using the intermediate language instruction to generate modification location identification data based on the modified source code that is the source code of the program after modification,
The information on the location where the modification is performed in the prediction data is compared with the location of the modification specified by the modification location specifying data, and if a mismatched portion is detected, the fact that the mismatched location has been detected A program modification support method characterized by displaying on a display unit.
プログラムの改造を支援するプログラム改造支援装置のプログラム改造支援方法であって、
前記プログラム改造支援装置が、
入力部を介して、予定されている改造に関する仕様書の情報が入力され、
前記入力された仕様書に関する情報が、改造予定箇所に関する情報である改造予定デー
タに反映され、
前記改造予定データに関する情報を、前記改造予定データに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データにひも付け、
改造後の前記プログラムのソースコードである改造後ソースコードに基づく改造場所特定データを生成し、
前記予測データにおける前記改造が行われる箇所に関する情報と、前記改造場所特定データにより特定される前記改造の場所と、を比較し、不一致箇所が検出された場合、前記予測データを基に、前記不一致箇所に関する情報を含む前記改造予定データの仕様書に関する情報を表示部に表示させる
ことを特徴とするプログラム改造支援方法。
A program remodeling support method for a program remodeling support device for supporting program remodeling,
The program modification support device is
Via the input section, information on the specifications related to the planned modification is entered,
The information about the entered specifications is reflected in the remodeling planned data, which is information on the remodeling planned location,
Information on the modification schedule data is linked to the prediction data having information on the location where the planned modification is performed based on the modification schedule data,
Generate modification location identification data based on the modified source code that is the source code of the program after modification,
The information regarding the location where the remodeling is performed in the prediction data is compared with the location of the remodeling specified by the remodeling location specifying data, and when a noncoincidence location is detected, based on the prediction data, the disagreement A program modification support method, characterized in that information on a specification of the modification planned data including information on a location is displayed on a display unit.
プログラムの改造を支援するプログラム改造支援装置のプログラム改造支援方法であって、
前記プログラム改造支援装置が、
改造前の前記プログラムのソースコードである改造前ソースコードにおける命令を、コンパイラの機能によって出力される中間語命令に変換して改造前構造データを生成し、
改造後の前記プログラムのソースコードである改造後ソースコードにおける命令を、前記中間語命令に変換して改造後構造データを生成し、
改造予定箇所に関する情報である改造予定データに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データを生成し、
前記改造前構造データと、前記改造後構造データと、を比較し、不一致が検出された箇所をマーキングし、
前記マーキングの情報を前記改造後ソースコードに基づく改造場所特定データに格納することで、前記改造場所特定データを生成し、
前記予測データにおける前記改造が行われる箇所に関する情報と、前記改造場所特定データにおけるマーキングの情報と、を比較し、不一致箇所が検出された場合、前記不一致箇所が検出された旨を表示部に表示させる
ことを特徴とするプログラム改造支援方法。
A program remodeling support method for a program remodeling support device for supporting program remodeling,
The program modification support device is
Convert the instructions in the source code before modification, which is the source code of the program before modification, into intermediate language instructions output by the function of the compiler to generate structure data before modification,
An instruction in the modified source code that is the source code of the program after modification is converted into the intermediate language instruction to generate modified structure data,
Based on the remodeling schedule data, which is information on the planned remodeling location, generate prediction data having information on the location where the planned remodeling will be performed,
Compare the structure data before remodeling and the structure data after remodeling, and mark the location where inconsistency is detected,
The information of the marking, by storing the modified location specific data based on said modified after the source code, prior to generating the Kiaratame granulation place specifying data,
The information regarding the location where the remodeling is performed in the prediction data is compared with the marking information in the remodeling location specifying data, and when a mismatched portion is detected, the display unit displays that the mismatched location has been detected. A program modification support method characterized in that
プログラムの改造を支援するプログラム改造支援装置であって、
改造前の前記プログラムのソースコードである改造前ソースコードにおける命令を、コンパイラの機能によって出力される中間語命令に変換して改造前構造データを生成する構造解析部と、
入力部を介して、入力された、改造予定箇所に関する情報である改造予定データと、前記改造前構造データとに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データを、前記中間語命令を用いて生成する改造予定再現部と、
改造後の前記プログラムのソースコードである改造後ソースコードに基づく改造場所特定データを、前記中間語命令を用いて生成する改造場所特定部と、
前記予測データにおける前記改造が行われる箇所に関する情報と、前記改造場所特定データにより特定される前記改造の場所と、を比較し、不一致箇所が検出された場合、前記不一致箇所が検出された旨を表示部に表示させる改造内容検証部と、
を有することを特徴とするプログラム改造支援装置。
A program modification support device for supporting program modification,
A structure analysis unit that converts the instructions in the source code before modification, which is the source code of the program before modification, into intermediate language instructions output by the function of the compiler to generate structure data before modification;
Prediction data having information on the location where the planned remodeling will be performed based on the remodeling planned data that is information related to the planned remodeling location and the structure data before remodeling, which are input via the input unit. A remodeling scheduled reproduction unit that generates using the intermediate language instruction,
A modified location identifying unit that generates modified location identification data based on the modified source code, which is the source code of the program after modification, using the intermediate language instruction;
The information on the location where the modification is performed in the prediction data is compared with the location of the modification specified by the modification location specifying data, and if a mismatched portion is detected, the fact that the mismatched location has been detected Modification content verification section to be displayed on the display section,
A program modification support device characterized by comprising:
プログラムの改造を支援するプログラム改造支援装置であって、
入力部を介して、予定されている改造に関する仕様書の情報が入力され、前記入力された仕様書に関する情報を、改造予定箇所に関する情報である改造予定データに反映する改造予定登録部と、
前記改造予定データに関する情報を、前記改造予定データに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データにひも付ける改造予定再現部と、
改造後の前記プログラムのソースコードである改造後ソースコードに基づく改造場所特定データを生成する改造場所特定部と、
前記予測データにおける前記改造が行われる箇所に関する情報と、前記改造場所特定データにより特定される前記改造の場所と、を比較し、不一致箇所が検出された場合、前記予測データを基に、前記不一致箇所に関する情報を含む前記改造予定データの仕様書に関する情報を表示部に表示させる改造内容検証部と、
を有することを特徴とするプログラム改造支援装置。
A program modification support device for supporting program modification,
A modification schedule registration unit that receives information on the specification sheet regarding the planned modification through the input unit, and reflects the information regarding the input specification sheet in the modification schedule data, which is information on the planned modification area,
A modification schedule reproduction unit that links information related to the modification schedule data to prediction data having information on a location where a planned modification is performed based on the modification schedule data;
A modified location identifying unit that generates modified location identifying data based on the modified source code that is the source code of the program after modification;
The information regarding the location where the remodeling is performed in the prediction data is compared with the location of the remodeling specified by the remodeling location specifying data, and when a noncoincidence location is detected, based on the prediction data, the disagreement A modification content verification unit that displays information on the specification of the modification planned data including information on the location on the display unit;
A program modification support device characterized by comprising:
プログラムの改造を支援するプログラム改造支援装置であって、
改造前の前記プログラムのソースコードである改造前ソースコードにおける命令を、コンパイラの機能によって出力される中間語命令に変換して改造前構造データを生成し、改造後の前記プログラムのソースコードである改造後ソースコードにおける命令を、前記中間語命令に変換して改造後構造データを生成する構造解析部と、
改造予定箇所に関する情報である改造予定データに基づいて、予定されている改造が行われる箇所に関する情報を有している予測データを生成する改造予定再現部と、
前記改造前構造データと、前記改造後構造データと、を比較し、不一致が検出された箇所をマーキングし、前記マーキングの情報を前記改造後ソースコードに基づく改造場所特定データに格納することで、前記改造場所特定データを生成する改造場所特定部と、
前記予測データにおける前記改造が行われる箇所に関する情報と、前記改造場所特定データにおけるマーキングの情報と、を比較し、不一致箇所が検出された場合、前記不一致箇所が検出された旨を表示部に表示させる改造内容検証部と、
を有することを特徴とするプログラム改造支援装置。
A program modification support device for supporting program modification,
This is the source code of the program after modification by converting the instructions in the source code before modification, which is the source code of the program before modification, into intermediate language instructions output by the function of the compiler to generate structure data before modification. A structure analysis unit that converts instructions in the modified source code into the intermediate language instructions to generate modified structure data;
Based on the remodeling schedule data that is information on the remodeling planned location, the remodeling planned reproduction unit that generates prediction data having information on the location where the planned remodeling is performed,
Said modified front structure data, said comparing and remodeling after structure data, and mark the mismatch is detected location, the information of the marking, by storing the modified location specific data based on the source code after the retrofit , a modified location detection part for pre-generate Kiaratame granulation place specifying data,
The information regarding the location where the remodeling is performed in the prediction data is compared with the marking information in the remodeling location specifying data, and when a mismatched portion is detected, the display unit displays that the mismatched location has been detected. Remodeling content verification section
A program modification support device characterized by comprising:
JP2011000962A 2011-01-06 2011-01-06 Program modification support method and program modification support device Expired - Fee Related JP5525459B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011000962A JP5525459B2 (en) 2011-01-06 2011-01-06 Program modification support method and program modification support device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011000962A JP5525459B2 (en) 2011-01-06 2011-01-06 Program modification support method and program modification support device

Publications (2)

Publication Number Publication Date
JP2012141916A JP2012141916A (en) 2012-07-26
JP5525459B2 true JP5525459B2 (en) 2014-06-18

Family

ID=46678116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011000962A Expired - Fee Related JP5525459B2 (en) 2011-01-06 2011-01-06 Program modification support method and program modification support device

Country Status (1)

Country Link
JP (1) JP5525459B2 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2639349B2 (en) * 1994-06-24 1997-08-13 日本電気株式会社 Error correction line search device
JPH0830448A (en) * 1994-07-14 1996-02-02 Nec Corp Program specification consistency inspecting device
JPH10333918A (en) * 1997-05-28 1998-12-18 Nec Corp Difference detector for c language source file
JPH11353162A (en) * 1998-06-04 1999-12-24 Hitachi Ltd Program modification result comparison method
JP2003140894A (en) * 2001-11-05 2003-05-16 Hitachi Ltd Method for associating software development resources and program thereof
JP2008262330A (en) * 2007-04-11 2008-10-30 Hitachi Ltd Program erroneous correction detection method and apparatus
JP2009169724A (en) * 2008-01-17 2009-07-30 Nomura Research Institute Ltd Maintenance support device
JP2010015458A (en) * 2008-07-04 2010-01-21 Hitachi Ltd Program correction support system, program correction support method, and program correction support program

Also Published As

Publication number Publication date
JP2012141916A (en) 2012-07-26

Similar Documents

Publication Publication Date Title
US8768651B2 (en) System and method for automatic standardization and verification of system design requirements
Lin et al. A testing framework for model transformations
JP5005510B2 (en) Software design support method, design support apparatus, and design support program
JP2012059026A (en) Source code conversion method and source code conversion program
JP6479184B2 (en) Computer-executable model reverse engineering method and apparatus
CN106843878B (en) A method and system for generating a model
JP2009205190A (en) Automatic software configuration device
JP5293521B2 (en) Design rule check verification apparatus and design rule check verification method
US8145992B2 (en) Validation assisted document conversion design
JP2014164677A (en) Specification verification support device, specification verification support method and program
JPH08241191A (en) GUI automatic evaluation device
CN105468530B (en) A kind of program error detection method and system based on finite state machine
JP4888790B2 (en) Contract definition function verification apparatus, method and program thereof
CN103838871B (en) A kind of method of calibration of nuclear power station security level DCS S-VDU procedure file
JP5525459B2 (en) Program modification support method and program modification support device
JP2013030017A (en) Method, device, and program for generating test program
JP2008305079A (en) Requirement specification automatic verification method
JP2009169573A (en) Analysis result output device and analysis result output method
JP5823478B2 (en) Output file verification system
JP3584204B2 (en) Automatic source program converter
JP7810732B2 (en) Source code analysis support system and method
JP2010152905A (en) Data specification description document and verification data creation device
Hunold et al. Pattern-based refactoring of legacy software systems
JPH0981371A (en) Source code automatic version upgrade method and apparatus
JP6268062B2 (en) Software specification extraction apparatus, method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121024

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130717

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130806

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131004

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140121

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140313

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: 20140401

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140411

R150 Certificate of patent or registration of utility model

Ref document number: 5525459

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees