JP7068941B2 - Program comparison device, program comparison method and comparison program - Google Patents

Program comparison device, program comparison method and comparison program Download PDF

Info

Publication number
JP7068941B2
JP7068941B2 JP2018119265A JP2018119265A JP7068941B2 JP 7068941 B2 JP7068941 B2 JP 7068941B2 JP 2018119265 A JP2018119265 A JP 2018119265A JP 2018119265 A JP2018119265 A JP 2018119265A JP 7068941 B2 JP7068941 B2 JP 7068941B2
Authority
JP
Japan
Prior art keywords
source code
program
work
comparison
working
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018119265A
Other languages
Japanese (ja)
Other versions
JP2019220110A (en
Inventor
徹 遠藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Azbil Corp
Original Assignee
Azbil Corp
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 Azbil Corp filed Critical Azbil Corp
Priority to JP2018119265A priority Critical patent/JP7068941B2/en
Publication of JP2019220110A publication Critical patent/JP2019220110A/en
Application granted granted Critical
Publication of JP7068941B2 publication Critical patent/JP7068941B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、ソースコードとオブジェクトプログラムとの比較を行うプログラム比較装置、プログラム比較方法および比較プログラムに関する。 The present invention relates to a program comparison device for comparing a source code and an object program, a program comparison method, and a comparison program.

従来、オブジェクトプログラムとソースコードとの比較を行って変更点を確認する技術が知られている。例えば、特許文献1では、ソースコードとオブジェクトプログラムとの一致または不一致を判定するプログラム比較解析装置が提案されている。特許文献1のプログラム比較解析装置では、オブジェクトプログラムを逆コンパイルして言語プログラムを生成し、ソースプログラムと言語プログラムを比較する。そして、ソースプログラムと言語プログラムの対応箇所の一致または不一致を判定する構成となっている。 Conventionally, a technique has been known in which an object program is compared with a source code to confirm changes. For example, Patent Document 1 proposes a program comparison analysis device for determining a match or a mismatch between a source code and an object program. In the program comparison analyzer of Patent Document 1, the object program is decompiled to generate a language program, and the source program and the language program are compared. Then, it is configured to determine the match or disagreement between the corresponding parts of the source program and the language program.

特開2013-152559号公報Japanese Unexamined Patent Publication No. 2013-152559

ソースコードをコンパイルしてオブジェクトプログラムを得る変換処理は、一般的には不可逆変換である。従って、オブジェクトプログラムを逆コンパイルしても、元のソースコードと同一のソースコードを得ることはできない。そのため、特許文献1に記載される逆コンパイルした言語プログラムとソースプログラムとでは、表現が大きく異なる。特許文献1では、表現の異なるソースプログラムと言語プログラムとを比較するために、プログラムの対応表または解析ツリーを生成して、ソースプログラムと言語プログラムとの対応箇所を対応付ける必要があり、処理が煩雑である。 The conversion process of compiling the source code to obtain an object program is generally an irreversible conversion. Therefore, even if the object program is decompiled, the same source code as the original source code cannot be obtained. Therefore, the expressions of the decompiled language program described in Patent Document 1 and the source program are significantly different. In Patent Document 1, in order to compare a source program having a different expression with a language program, it is necessary to generate a correspondence table or an analysis tree of the program and associate the corresponding part between the source program and the language program, which is complicated. Is.

本発明は、上記従来技術における課題に鑑みてなされたものであり、ソースコードとオブジェクトプログラムとを簡易な処理で比較できるプログラム比較装置、プログラム比較方法および比較プログラムを提供することを目的とする。 The present invention has been made in view of the above problems in the prior art, and an object of the present invention is to provide a program comparison device, a program comparison method, and a comparison program capable of comparing a source code and an object program by simple processing.

本発明のプログラム比較装置は、ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成する第1コード生成部と、オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成する第2コード生成部と、第1作業用ソースコードと第2作業用ソースコードとを比較する比較部と、比較部における比較結果を表示する表示部と、を備える。 The program comparison device of the present invention compiles the source code to generate a working object, and decompiles the working object to generate the first working source code. The first code generator and the object program are reversed. A second code generator that compiles and generates a second work source code, a comparison unit that compares the first work source code and the second work source code, and a display unit that displays the comparison result in the comparison unit. And prepare.

本発明のプログラム比較方法は、ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、第1作業用ソースコードと第2作業用ソースコードとを比較するステップと、比較の結果を表示するステップと、を含む。 In the program comparison method of the present invention, a step of compiling the source code to generate a working object and then back-compiling the working object to generate the first working source code and a step of back-compiling the object program to generate the first working source code are performed. 2. The step of generating the working source code, the step of comparing the first working source code and the second working source code, and the step of displaying the comparison result are included.

本発明の比較プログラムは、ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、第1作業用ソースコードと第2作業用ソースコードとを比較するステップと、比較の結果を表示するステップと、をコンピュータに実行させるものである。 The comparison program of the present invention has a step of compiling the source code to generate a working object and then back-compiling the working object to generate the first working source code, and a second step of back-compiling the object program to generate the second working object. The computer is made to execute a step of generating a working source code, a step of comparing the first working source code and the second working source code, and a step of displaying the comparison result.

本発明によれば、表現が同じ第1作業用ソースコードと第2作業用ソースコードとを生成することで、ソースコードとオブジェクトプログラムとの比較を簡易な処理で行うことができる。 According to the present invention, by generating the source code for the first work and the source code for the second work having the same expression, the source code and the object program can be compared by a simple process.

実施の形態1におけるプログラム比較装置の概略構成図である。It is a schematic block diagram of the program comparison apparatus in Embodiment 1. FIG. 実施の形態1の表示部に表示される比較結果画面の一例である。This is an example of a comparison result screen displayed on the display unit of the first embodiment. 実施の形態1におけるプログラム比較方法のフローチャートである。It is a flowchart of the program comparison method in Embodiment 1. 実施の形態2におけるプログラム比較装置の概略構成図である。It is a schematic block diagram of the program comparison apparatus in Embodiment 2. 実施の形態2におけるプログラム比較方法のフローチャートである。It is a flowchart of the program comparison method in Embodiment 2.

実施の形態1.
以下、本発明に係るプログラム比較装置100の実施の形態について、図面を参照して説明する。図1は、実施の形態1におけるプログラム比較装置100の概略構成図である。本実施の形態のプログラム比較装置100は、コンピュータ200で実行されるオブジェクトプログラムとソースコードとの比較を行うコンピュータである。プログラム比較装置100を用いて、コンピュータ200のオブジェクトプログラムにおける変更点、例えば更新の有無または更新内容等が検出される。
Embodiment 1.
Hereinafter, embodiments of the program comparison device 100 according to the present invention will be described with reference to the drawings. FIG. 1 is a schematic configuration diagram of the program comparison device 100 according to the first embodiment. The program comparison device 100 of the present embodiment is a computer that compares an object program executed by the computer 200 with a source code. The program comparison device 100 is used to detect changes in the object program of the computer 200, for example, the presence / absence of an update or the content of the update.

図1に示すように、プログラム比較装置100は、入力部1と、制御部2と、表示部3とを備える。入力部1は、コンピュータ200からオブジェクトプログラムを取得し、制御部2に入力する。オブジェクトプログラムは、コンパイル方式のプログラムであればよく、例えばCL(Control Language)プログラムである。また、入力部1は、オブジェクトプログラムと比較するソースコードをユーザから取得し、制御部2へ入力する。なお、ソースコードは図示されないメモリに記憶されていてもよく、入力部1は、当該メモリからソースコードを取得して、制御部2へ入力してもよい。 As shown in FIG. 1, the program comparison device 100 includes an input unit 1, a control unit 2, and a display unit 3. The input unit 1 acquires an object program from the computer 200 and inputs it to the control unit 2. The object program may be a compile-type program, for example, a CL (Control Language) program. Further, the input unit 1 acquires the source code to be compared with the object program from the user and inputs it to the control unit 2. The source code may be stored in a memory (not shown), and the input unit 1 may acquire the source code from the memory and input the source code to the control unit 2.

制御部2は、入力部1から入力されるソースコードとオブジェクトプログラムとの比較を行う。制御部2は、メモリ(図示せず)に格納されるプログラムを実行するCPU(Central Processing Unit)またはマイクロコンピュータなどで構成される。なお、制御部2を単一または複合回路などのハードウェアで構成してもよい。 The control unit 2 compares the source code input from the input unit 1 with the object program. The control unit 2 is composed of a CPU (Central Processing Unit) or a microcomputer that executes a program stored in a memory (not shown). The control unit 2 may be configured by hardware such as a single or composite circuit.

表示部3は、LCD(Liquid Crystal Display)などのディスプレイである。表示部3は、制御部2によるソースコードとオブジェクトプログラムとの比較結果を表示する。なお、本実施の形態では、プログラム比較装置100が表示部3を備える構成としているが、プログラム比較装置100に接続されるその他の機器が表示部3を備えてもよい。 The display unit 3 is a display such as an LCD (Liquid Crystal Display). The display unit 3 displays the comparison result between the source code and the object program by the control unit 2. In the present embodiment, the program comparison device 100 is configured to include the display unit 3, but other devices connected to the program comparison device 100 may include the display unit 3.

また、制御部2は、プログラムを実行することにより実現される機能部として、第1コード生成部21と、第2コード生成部22と、比較部23と、表示生成部24とを有する。第1コード生成部21は、ソースコードをコンパイルして作業用オブジェクトを生成し、作業用オブジェクトを逆コンパイルして、第1作業用ソースコードを生成する。なお、作業用オブジェクトを生成するために用いられるコンパイラは、コンピュータ200のオブジェクトプログラムを生成するために用いられるコンパイラと同じものとする。第2コード生成部22は、オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成する。なお、第1コード生成部21で用いられる逆コンパイラと、第2コード生成部22で用いられる逆コンパイラは、同じものとする。 Further, the control unit 2 has a first code generation unit 21, a second code generation unit 22, a comparison unit 23, and a display generation unit 24 as functional units realized by executing the program. The first code generation unit 21 compiles the source code to generate a working object, decompiles the working object, and generates the first working source code. The compiler used to generate the working object is the same as the compiler used to generate the object program of the computer 200. The second code generation unit 22 decompiles the object program and generates the source code for the second work. The decompiler used in the first code generation unit 21 and the decompiler used in the second code generation unit 22 are the same.

比較部23は、第1作業用ソースコードと、第2作業用ソースコードとを比較する。ここで、第1作業用ソースコードと、第2作業用ソースコードとは、同様のコンパイラおよび逆コンパイラを用いて生成されているため、変換処理で失われる情報も同じであり、形式および表現が同じとなる。そのため、比較部23では、第1作業用ソースコードと、第2作業用ソースコードとをテキスト比較することにより、一致および不一致を判断することができる。 The comparison unit 23 compares the source code for the first work with the source code for the second work. Here, since the first work source code and the second work source code are generated by using the same compiler and decompiler, the information lost in the conversion process is also the same, and the format and expression are the same. It will be the same. Therefore, the comparison unit 23 can determine a match or a disagreement by text-comparing the first work source code and the second work source code.

表示生成部24は、比較部23の比較結果に基づき、表示部3に表示させる比較結果画面30を生成する。図2は、本実施の形態の表示部3に表示される比較結果画面30の一例である。図2に示すように、比較結果画面30は、3画面に分割されており、各画面に第1作業用ソースコード31と、第2作業用ソースコード32と、元のソースコード33とがそれぞれ並んで表示される。 The display generation unit 24 generates a comparison result screen 30 to be displayed on the display unit 3 based on the comparison result of the comparison unit 23. FIG. 2 is an example of the comparison result screen 30 displayed on the display unit 3 of the present embodiment. As shown in FIG. 2, the comparison result screen 30 is divided into three screens, and each screen has a first work source code 31, a second work source code 32, and an original source code 33, respectively. Displayed side by side.

また、比較結果画面30は、第1作業用ソースコード31と、第2作業用ソースコード32とを同時にスクロールするスクロールバー35と、ソースコード33をスクロールするスクロールバー36とを有する。これにより、第1作業用ソースコード31および第2作業用ソースコード32と、ソースコード33とをそれぞれ独立してスクロールさせることができ、両者を容易に見比べることができる。 Further, the comparison result screen 30 has a scroll bar 35 for scrolling the first work source code 31 and the second work source code 32 at the same time, and a scroll bar 36 for scrolling the source code 33. As a result, the source code 31 for the first work, the source code 32 for the second work, and the source code 33 can be scrolled independently, and both can be easily compared.

また、比較結果画面30では、第1作業用ソースコード31と、第2作業用ソースコード32との相違箇所がハイライトで示される。これにより、比較結果画面30を見たユーザは、容易に相違箇所を把握することができる。なお、第1作業用ソースコード31と第2作業用ソースコード32との相違箇所の表示は、強調表示されるものであればよく、ハイライトに限定されるものではない。例えば、第1作業用ソースコード31と第2作業用ソースコード32との相違箇所の色を変える、もしくは下線または囲い線などを表示する、などしてもよい。 Further, on the comparison result screen 30, the difference between the first working source code 31 and the second working source code 32 is highlighted. As a result, the user who sees the comparison result screen 30 can easily grasp the difference. The display of the difference between the first work source code 31 and the second work source code 32 may be highlighted as long as it is highlighted, and is not limited to highlighting. For example, the color of the difference between the first work source code 31 and the second work source code 32 may be changed, or an underline or an enclosed line may be displayed.

図3は、本実施の形態におけるプログラム比較方法のフローチャートである。プログラム比較方法は、制御部2がメモリに記憶される比較プログラムを実行することにより実施される。まず、制御部2に比較対象となるソースコードとオブジェクトプログラムが入力される(S1)。そして、第1コード生成部21により、ソースコードがコンパイルされ、作業用オブジェクトが生成される(S2)。続いて、生成された作業用オブジェクトが逆コンパイルされ、第1作業用ソースコードが生成される(S3)。また、第2コード生成部22により、オブジェクトプログラムが逆コンパイルされ、第2作業用ソースコードが生成される(S4)。なお、第1作業用ソースコードの生成と、第2作業用ソースコードの生成は、並列に実施されてもよい。 FIG. 3 is a flowchart of the program comparison method in the present embodiment. The program comparison method is carried out by the control unit 2 executing a comparison program stored in the memory. First, the source code and the object program to be compared are input to the control unit 2 (S1). Then, the source code is compiled by the first code generation unit 21 and a working object is generated (S2). Subsequently, the generated working object is decompiled, and the first working source code is generated (S3). Further, the second code generation unit 22 decompiles the object program and generates the second working source code (S4). The generation of the source code for the first work and the generation of the source code for the second work may be performed in parallel.

続いて、比較部23によって、第1作業用ソースコードと第2作業用ソースコードとが比較され(S5)、相違点の有無が判断される(S6)。第1作業用ソースコードと第2作業用ソースコードとに相違点がある場合(S6:YES)、表示生成部24により、相違箇所のハイライト表示を含む比較結果画面30が生成され、表示部3に表示される(S7)。一方、第1作業用ソースコードと第2作業用ソースコードとに相違点がない場合(S6:NO)、表示生成部24により、相違点がないことを通知する表示を含む比較結果画面30が生成され、表示部3に表示される(S8)。相違点がない場合は、相違点がないことを表示することで、ユーザが相違箇所を探すことなく、ソースコードとオブジェクトプログラムが同一であることを迅速に判断できる。 Subsequently, the comparison unit 23 compares the source code for the first work and the source code for the second work (S5), and determines whether or not there is a difference (S6). When there is a difference between the source code for the first work and the source code for the second work (S6: YES), the display generation unit 24 generates a comparison result screen 30 including highlighting of the difference, and the display unit 24. It is displayed in 3 (S7). On the other hand, when there is no difference between the first work source code and the second work source code (S6: NO), the display generation unit 24 displays the comparison result screen 30 including a display notifying that there is no difference. It is generated and displayed on the display unit 3 (S8). When there is no difference, by displaying that there is no difference, the user can quickly determine that the source code and the object program are the same without searching for the difference.

以上のように、本実施の形態によると、同じ表現の第1作業用ソースコードと第2作業用ソースコードとを生成することで、比較部23にてテキスト比較という簡易な処理を行うだけでソースコードとオブジェクトプログラムとを比較できる。また、第1作業用ソースコードと第2作業用ソースコードとは表現が同じであるため、これらを表示部3に並べて表示することで、ユーザが一致または不一致を容易に判断できる。また、第1作業用ソースコードと第2作業用ソースコードとを表示するとともに、比較結果として相違箇所を強調表示することで、迅速に相違箇所を特定することができ、作業効率が向上する。 As described above, according to the present embodiment, by generating the first work source code and the second work source code having the same expression, the comparison unit 23 only performs a simple process of text comparison. You can compare the source code with the object program. Further, since the first work source code and the second work source code have the same expression, by displaying them side by side on the display unit 3, the user can easily determine whether they match or do not match. Further, by displaying the source code for the first work and the source code for the second work and highlighting the difference as a comparison result, the difference can be quickly identified and the work efficiency is improved.

実施の形態2.
次に、本発明の実施の形態2について説明する。図4は、実施の形態2におけるプログラム比較装置100Aの概略構成図である。実施の形態2のプログラム比較装置100Aは、制御部2Aが解析部25を有する点において、実施の形態1と相違する。プログラム比較装置100Aのその他の構成は、実施の形態1のプログラム比較装置100と同様である。
Embodiment 2.
Next, Embodiment 2 of the present invention will be described. FIG. 4 is a schematic configuration diagram of the program comparison device 100A according to the second embodiment. The program comparison device 100A of the second embodiment is different from the first embodiment in that the control unit 2A has the analysis unit 25. Other configurations of the program comparison device 100A are the same as those of the program comparison device 100 of the first embodiment.

解析部25は、制御部2Aがプログラムを実行することにより実現される機能部である。解析部25は、比較部23において、第1作業用ソースコードと第2作業用ソースコードとに相違点があると判断された場合に、元のソースコードにおける当該相違点の対応箇所を解析して特定する。具体的には、解析部25は、第1コード生成部21によるコンパイルおよび逆コンパイルにおける内部処理の解析を行い、対応箇所を追うことで、相違点に対応する箇所を特定する。また、解析部25は、第1作業用ソースコードおよび第2作業用ソースコードと、ソースコードとの対応関係を予め記憶し、当該対応関係に基づいて相違点の対応箇所を特定してもよい。 The analysis unit 25 is a functional unit realized by the control unit 2A executing a program. When the comparison unit 23 determines that there is a difference between the first work source code and the second work source code, the analysis unit 25 analyzes the corresponding part of the difference in the original source code. To identify. Specifically, the analysis unit 25 analyzes the internal processing in compilation and decompilation by the first code generation unit 21, and identifies the parts corresponding to the differences by following the corresponding parts. Further, the analysis unit 25 may store in advance the correspondence between the source code for the first work and the source code for the second work and the source code, and specify the corresponding portion of the difference based on the correspondence. ..

表示生成部24は、比較部23による比較結果に加え、解析部25により特定された対応箇所を含む比較結果画面30を生成し、表示部3に表示させる。具体的には、比較結果画面30において、ソースコードの対応箇所がハイライト表示されるなどの強調表示が行われる。また、複数の相違点がある場合には、各相違点と対応箇所との対応がわかるように、例えば色分けなどを行って表示される。 The display generation unit 24 generates a comparison result screen 30 including the corresponding portion specified by the analysis unit 25 in addition to the comparison result by the comparison unit 23, and causes the display unit 3 to display the comparison result screen 30. Specifically, on the comparison result screen 30, highlighting such as highlighting the corresponding portion of the source code is performed. Further, when there are a plurality of differences, for example, they are color-coded and displayed so that the correspondence between each difference and the corresponding portion can be understood.

図5は、本実施の形態におけるプログラム比較方法のフローチャートである。本実施の形態のプログラム比較方法におけるステップS1からステップS8は、実施の形態1と同様である。そして、第1作業用ソースコードと第2作業用ソースコードとに相違点があり(S6:YES)、相違箇所がハイライト表示されると(S7)、ソースコードにおける相違点の対応箇所が解析される(S9)。そして、比較結果画面30に表示されるソースコードにおいて、特定された対応箇所がハイライト表示される(S10)。 FIG. 5 is a flowchart of the program comparison method in the present embodiment. Steps S1 to S8 in the program comparison method of the present embodiment are the same as those of the first embodiment. Then, when there is a difference between the first work source code and the second work source code (S6: YES) and the difference is highlighted (S7), the corresponding part of the difference in the source code is analyzed. Is done (S9). Then, in the source code displayed on the comparison result screen 30, the specified corresponding portion is highlighted (S10).

本実施の形態によると、実施の形態1と同様の効果に加え、ソースコードにおける相違点の対応箇所が特定される。これにより、ユーザが相違点とソースコードとの対応を迅速に把握することができ、作業効率がさらに向上する。 According to the present embodiment, in addition to the same effect as that of the first embodiment, the corresponding points of the differences in the source code are specified. As a result, the user can quickly grasp the correspondence between the difference and the source code, and the work efficiency is further improved.

以上が本発明の実施の形態の説明であるが、本発明は、上記の実施の形態に限定されるものではなく、本発明の主旨を逸脱しない範囲で種々に変形することが可能である。例えば、制御部2は、第1作業用ソースコードを予め生成し、図示しないメモリ等に記憶していてもよい。これにより、オブジェクトプログラムとの比較を行う度に、第1作業用ソースコードを生成する必要がなく、処理がさらに簡素化される。 The above is the description of the embodiment of the present invention, but the present invention is not limited to the above-described embodiment, and can be variously modified without departing from the gist of the present invention. For example, the control unit 2 may generate the source code for the first work in advance and store it in a memory or the like (not shown). As a result, it is not necessary to generate the source code for the first work every time the comparison is made with the object program, and the process is further simplified.

また、比較結果画面30において、第1作業用ソースコード31と第2作業用ソースコード32のみを並べて表示し、ソースコード33を別画面に表示してもよい。さらに、比較結果画面30において、第1作業用ソースコード31と第2作業用ソースコード32との相違箇所のみまたはソースコード33の対応箇所のみ、もしくはその両方を表示してもよい。 Further, on the comparison result screen 30, only the first work source code 31 and the second work source code 32 may be displayed side by side, and the source code 33 may be displayed on a separate screen. Further, on the comparison result screen 30, only the difference between the first work source code 31 and the second work source code 32, only the corresponding part of the source code 33, or both may be displayed.

1 入力部、2、2A 制御部、3 表示部、21 第1コード生成部、22 第2コード生成部、23 比較部、24 表示生成部、25 解析部、30 比較結果画面、31 第1作業用ソースコード、32 第2作業用ソースコード、33 ソースコード、35、36 スクロールバー、100、100A プログラム比較装置、200 コンピュータ。 1 Input unit, 2, 2A control unit, 3 display unit, 21 1st code generation unit, 22 2nd code generation unit, 23 comparison unit, 24 display generation unit, 25 analysis unit, 30 comparison result screen, 31 1st work Source code for 32 second work source code, 33 source code, 35, 36 scrollbars, 100, 100A program comparison device, 200 computers.

Claims (8)

ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成する第1コード生成部と、
オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成する第2コード生成部と、
前記第1作業用ソースコードと前記第2作業用ソースコードとを比較する比較部と、
前記比較部における比較結果を表示する表示部と、
を備えることを特徴とするプログラム比較装置。
A first code generator that compiles the source code to generate a working object and decompiles the working object to generate the first working source code.
The second code generator that decompiles the object program and generates the source code for the second work,
A comparison unit that compares the source code for the first work and the source code for the second work,
A display unit that displays the comparison result in the comparison unit, and a display unit.
A program comparison device characterized by comprising.
前記比較部は、前記第1作業用ソースコードと前記第2作業用ソースコードとをテキスト比較することを特徴とする請求項1に記載のプログラム比較装置。 The program comparison apparatus according to claim 1, wherein the comparison unit makes a text comparison between the first work source code and the second work source code. 前記表示部は、前記第1作業用ソースコードと、前記第2作業用ソースコードとを並べて表示することを特徴とする請求項1または2に記載のプログラム比較装置。 The program comparison device according to claim 1 or 2, wherein the display unit displays the source code for the first work and the source code for the second work side by side. 前記表示部は、前記第1作業用ソースコードと、前記第2作業用ソースコードと、前記ソースコードとを並べて表示することを特徴とする請求項1または2に記載のプログラム比較装置。 The program comparison device according to claim 1 or 2, wherein the display unit displays the source code for the first work, the source code for the second work, and the source code side by side. 前記表示部は、前記第1作業用ソースコードと前記第2作業用ソースコードとの相違箇所を強調表示することを特徴とする請求項3または請求項4に記載のプログラム比較装置。 The program comparison device according to claim 3 or 4, wherein the display unit highlights a difference between the first work source code and the second work source code. 前記比較部により、前記第1作業用ソースコードと前記第2作業用ソースコードとに相違点があると判断された場合、前記ソースコードにおける前記相違点の対応箇所を解析する解析部をさらに備え、
前記表示部は、前記ソースコードの前記対応箇所を表示することを特徴とする請求項1~5の何れか一項に記載のプログラム比較装置。
When the comparison unit determines that there is a difference between the first work source code and the second work source code, the comparison unit further includes an analysis unit that analyzes the corresponding portion of the difference in the source code. ,
The program comparison device according to any one of claims 1 to 5, wherein the display unit displays the corresponding portion of the source code.
ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、
オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、
前記第1作業用ソースコードと前記第2作業用ソースコードとを比較するステップと、
前記比較の結果を表示するステップと、
を含むことを特徴とするプログラム比較方法。
The steps of compiling the source code to generate a working object and decompiling the working object to generate the first working source code.
The step of decompiling the object program to generate the source code for the second work,
A step of comparing the source code for the first work with the source code for the second work,
The step of displaying the result of the comparison and
A program comparison method characterized by including.
ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、
オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、
前記第1作業用ソースコードと前記第2作業用ソースコードとを比較するステップと、
前記比較の結果を表示するステップと、
をコンピュータに実行させる比較プログラム。
The steps of compiling the source code to generate a working object and decompiling the working object to generate the first working source code.
The step of decompiling the object program to generate the source code for the second work,
A step of comparing the source code for the first work with the source code for the second work,
The step of displaying the result of the comparison and
A comparison program that lets your computer run.
JP2018119265A 2018-06-22 2018-06-22 Program comparison device, program comparison method and comparison program Active JP7068941B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018119265A JP7068941B2 (en) 2018-06-22 2018-06-22 Program comparison device, program comparison method and comparison program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018119265A JP7068941B2 (en) 2018-06-22 2018-06-22 Program comparison device, program comparison method and comparison program

Publications (2)

Publication Number Publication Date
JP2019220110A JP2019220110A (en) 2019-12-26
JP7068941B2 true JP7068941B2 (en) 2022-05-17

Family

ID=69096789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018119265A Active JP7068941B2 (en) 2018-06-22 2018-06-22 Program comparison device, program comparison method and comparison program

Country Status (1)

Country Link
JP (1) JP7068941B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003280903A (en) 2002-03-26 2003-10-03 Hitachi Software Eng Co Ltd System for generating source program comparison information
US20080189689A1 (en) 2005-04-21 2008-08-07 Alstom Ferroviaria S.P.A. Method for Preparing and Checking Application Data
JP2013152559A (en) 2012-01-24 2013-08-08 Toshiba Corp Program comparison analysis device and program comparison analysis method
US20170169223A1 (en) 2015-12-11 2017-06-15 Institute For Information Industry Detection system and method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003280903A (en) 2002-03-26 2003-10-03 Hitachi Software Eng Co Ltd System for generating source program comparison information
US20080189689A1 (en) 2005-04-21 2008-08-07 Alstom Ferroviaria S.P.A. Method for Preparing and Checking Application Data
JP2013152559A (en) 2012-01-24 2013-08-08 Toshiba Corp Program comparison analysis device and program comparison analysis method
US20170169223A1 (en) 2015-12-11 2017-06-15 Institute For Information Industry Detection system and method thereof

Also Published As

Publication number Publication date
JP2019220110A (en) 2019-12-26

Similar Documents

Publication Publication Date Title
US9589115B2 (en) Obfuscation assisting apparatus
KR102244281B1 (en) Kernel module loading method and device
US20120192156A1 (en) Test case pattern matching
JP6441786B2 (en) Test support apparatus, test support method, and program
JP4862945B2 (en) Data analysis system
US20150033210A1 (en) Method and system for debugging a change-set
KR20120041153A (en) Sequence program debugging device, debugging method, and program
JP7068941B2 (en) Program comparison device, program comparison method and comparison program
WO2012036304A1 (en) Operation verification support device, operation verification support method, and operation verification support program
JP5941859B2 (en) Verification device, verification method, and program
JP6506108B2 (en) PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM
JP2017167642A (en) Operation verification device of software, and operation verification method of software
JP6665576B2 (en) Support device, support method, and program
JP2013152559A (en) Program comparison analysis device and program comparison analysis method
JP6978458B2 (en) Sequence program processing device used for tracing sequence programs
WO2012133606A1 (en) Apparatus for setting affecting extent of program, and method of specifying affecting extent and method of extracting affecting program using same
US20150199183A1 (en) Program analysis apparatus and program analysis method
US9164736B2 (en) Data processing system, input support method, and input support program
Reiss et al. Tool demonstration: The visualizations of code bubbles
KR101149655B1 (en) Program design apparatus and method
JP2013235306A (en) Method and device for supporting program generation
JP6011988B2 (en) Impact range survey method and impact range survey device
JP2809048B2 (en) Screen debugging method
Hunt Scala Testing
WO2016147398A1 (en) Waveform display device, waveform display method, and waveform display program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220324

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220502

R150 Certificate of patent or registration of utility model

Ref document number: 7068941

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150