JP2019220110A - 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
JP2019220110A
JP2019220110A JP2018119265A JP2018119265A JP2019220110A JP 2019220110 A JP2019220110 A JP 2019220110A JP 2018119265 A JP2018119265 A JP 2018119265A JP 2018119265 A JP2018119265 A JP 2018119265A JP 2019220110 A JP2019220110 A JP 2019220110A
Authority
JP
Japan
Prior art keywords
source code
program
comparison
work
unit
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.)
Granted
Application number
JP2018119265A
Other languages
Japanese (ja)
Other versions
JP7068941B2 (en
Inventor
徹 遠藤
Toru Endo
徹 遠藤
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)

Abstract

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.SOLUTION: A program comparison device is configured to include: a first code generation part for generating a working object by compiling a source code and generating a first working source code by decompiling the working object; a second code generation part for decompiling an object program and generating a second working source code; a comparison part for comparing the first working source code and the second working source code; and a display part for displaying a comparison result by the comparison part.SELECTED DRAWING: Figure 1

Description

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

従来、オブジェクトプログラムとソースコードとの比較を行って変更点を確認する技術が知られている。例えば、特許文献1では、ソースコードとオブジェクトプログラムとの一致または不一致を判定するプログラム比較解析装置が提案されている。特許文献1のプログラム比較解析装置では、オブジェクトプログラムを逆コンパイルして言語プログラムを生成し、ソースプログラムと言語プログラムを比較する。そして、ソースプログラムと言語プログラムの対応箇所の一致または不一致を判定する構成となっている。   2. Description of the Related Art Conventionally, there is known a technique of comparing an object program with a source code to confirm a change. For example, Patent Literature 1 proposes a program comparison / analysis device that determines whether a source code matches or does not match an object program. In the program comparison and analysis device of Patent Literature 1, a language program is generated by decompiling an object program, and the source program and the language program are compared. Then, the configuration is such that it is determined whether the corresponding portions of the source program and the language program match or not.

特開2013−152559号公報JP 2013-152559 A

ソースコードをコンパイルしてオブジェクトプログラムを得る変換処理は、一般的には不可逆変換である。従って、オブジェクトプログラムを逆コンパイルしても、元のソースコードと同一のソースコードを得ることはできない。そのため、特許文献1に記載される逆コンパイルした言語プログラムとソースプログラムとでは、表現が大きく異なる。特許文献1では、表現の異なるソースプログラムと言語プログラムとを比較するために、プログラムの対応表または解析ツリーを生成して、ソースプログラムと言語プログラムとの対応箇所を対応付ける必要があり、処理が煩雑である。   The conversion process of compiling a 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 expression differs greatly between the decompiled language program described in Patent Document 1 and the source program. In Patent Literature 1, in order to compare a source program and a language program with different expressions, it is necessary to generate a program correspondence table or an analysis tree and associate the corresponding parts of the source program and the language program with each other. It is.

本発明は、上記従来技術における課題に鑑みてなされたものであり、ソースコードとオブジェクトプログラムとを簡易な処理で比較できるプログラム比較装置、プログラム比較方法および比較プログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems in the related art, and has as its object 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作業用ソースコードとを比較する比較部と、比較部における比較結果を表示する表示部と、を備える。   A program comparison device of the present invention compiles a source code to generate a work object, decompiles the work object to generate a first work source code, and reverses the object program. A second code generation unit that compiles to generate a second work source code, a comparison unit that compares the first work source code with the second work source code, and a display unit that displays a comparison result in the comparison unit And.

本発明のプログラム比較方法は、ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、第1作業用ソースコードと第2作業用ソースコードとを比較するステップと、比較の結果を表示するステップと、を含む。   A program comparison method according to the present invention includes the steps of compiling a source code to generate a work object, decompiling the work object to generate a first work source code, and decompiling the object program to generate a first work source code. The method includes the steps of: generating two work source codes; comparing the first work source code with the second work source code; and displaying a result of the comparison.

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

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

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

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

図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 the object program to the control unit 2. The object program may be any program of a compile method, for example, a CL (Control Language) program. Further, the input unit 1 acquires a source code to be compared with the object program from a user and inputs the source code to the control unit 2. Note that 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 includes a CPU (Central Processing Unit) or a microcomputer that executes a program stored in a memory (not shown). Note that the control unit 2 may be configured by hardware such as a single circuit or a 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 a result of comparison between the source code and the object program by the control unit 2. In the present embodiment, the program comparison device 100 includes 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で用いられる逆コンパイラは、同じものとする。   In addition, the control unit 2 includes 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 generator 21 compiles the source code to generate a work object, decompiles the work object, and generates a first work source code. The compiler used for generating the work object is the same as the compiler used for generating the object program of the computer 200. The second code generation unit 22 decompiles the object program to generate a second work source code. The decompiler used in the first code generator 21 and the decompiler used in the second code generator 22 are the same.

比較部23は、第1作業用ソースコードと、第2作業用ソースコードとを比較する。ここで、第1作業用ソースコードと、第2作業用ソースコードとは、同様のコンパイラおよび逆コンパイラを用いて生成されているため、変換処理で失われる情報も同じであり、形式および表現が同じとなる。そのため、比較部23では、第1作業用ソースコードと、第2作業用ソースコードとをテキスト比較することにより、一致および不一致を判断することができる。   The comparing unit 23 compares the first work source code with the second work source code. Here, since the first work source code and the second work source code are generated 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. Will be the same. Therefore, the comparison unit 23 can determine a match or a mismatch by comparing the text of the first work source code with the text of 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 according to the present embodiment. As shown in FIG. 2, the comparison result screen 30 is divided into three screens, and each screen includes a first work source code 31, a second work source code 32, and an original source code 33, respectively. They are 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. Thus, the first work source code 31 and the second work source code 32 and the source code 33 can be independently scrolled, and the two 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 work source code 31 and the second work source code 32 is highlighted. Thus, the user who has viewed 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 is not limited to highlighting as long as it is highlighted. 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 enclosing 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 according to the present embodiment. The program comparison method is performed by the control unit 2 executing a comparison program stored in the memory. First, a source code and an 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 work object is generated (S2). Subsequently, the generated work object is decompiled to generate a first work source code (S3). Also, the object program is decompiled by the second code generation unit 22, and a second work source code is generated (S4). The generation of the first work source code and the generation of the second work source code 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 first work source code and the second work source code are compared by the comparing unit 23 (S5), and it is determined whether there is a difference (S6). If there is a difference between the first work source code and the second work source code (S6: YES), the display generation unit 24 generates the comparison result screen 30 including the highlight display of the difference, and the display unit 3 is displayed (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). If 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 a 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 performs only the simple processing of text comparison. You can compare source code and object programs. In addition, 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 mismatch. Also, by displaying the first work source code and the second work source code and highlighting the difference as a result of the comparison, 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 FIG.
Next, a second embodiment of the present invention will be described. FIG. 4 is a schematic configuration diagram of a program comparison device 100A according to the second embodiment. The program comparison device 100A according to the second embodiment differs from the first embodiment in that the control unit 2A includes an 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 comparing unit 23 determines that there is a difference between the first working source code and the second working source code, the analyzing unit 25 analyzes a corresponding portion of the difference in the original source code. To identify. Specifically, the analysis unit 25 analyzes the internal processing in the compile and the decompile by the first code generation unit 21 and identifies a portion corresponding to the difference by following the corresponding portion. In addition, the analysis unit 25 may store the correspondence between the first work source code and the second work source code and the source code in advance, and specify a corresponding part 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, highlighting is performed on the comparison result screen 30, such as highlighting of the corresponding part of the source code. When there are a plurality of differences, the differences are displayed by, for example, color coding so that the correspondence between the differences and the corresponding portions 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 according to 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, there is a difference between the first work source code and the second work source code (S6: YES), and when the different part is highlighted (S7), the corresponding part of the difference in the source code is analyzed. Is performed (S9). Then, in the source code displayed on the comparison result screen 30, the identified corresponding portion is highlighted (S10).

本実施の形態によると、実施の形態1と同様の効果に加え、ソースコードにおける相違点の対応箇所が特定される。これにより、ユーザが相違点とソースコードとの対応を迅速に把握することができ、作業効率がさらに向上する。   According to the present embodiment, in addition to the same effects as those of the first embodiment, a corresponding portion of the difference in the source code is 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 embodiments of the present invention. However, the present invention is not limited to the above embodiments, and can be variously modified without departing from the gist of the present invention. For example, the control unit 2 may generate the first work source code in advance and store it in a memory (not shown) or the like. Thus, it is not necessary to generate the first work source code every time the comparison with the object program is performed, 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 another 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 コンピュータ。   REFERENCE SIGNS LIST 1 input unit, 2 and 2A control unit, 3 display unit, 21 first code generation unit, 22 second code generation unit, 23 comparison unit, 24 display generation unit, 25 analysis unit, 30 comparison result screen, 31 first work Source code for 32, second work source code, 33 source code, 35, 36 scroll bar, 100, 100A program comparison device, 200 computer.

Claims (8)

ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成する第1コード生成部と、
オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成する第2コード生成部と、
前記第1作業用ソースコードと前記第2作業用ソースコードとを比較する比較部と、
前記比較部における比較結果を表示する表示部と、
を備えることを特徴とするプログラム比較装置。
A first code generation unit that compiles a source code to generate a work object, and decompiles the work object to generate a first work source code;
A second code generator for decompiling the object program to generate a second working source code;
A comparing unit that compares the first working source code with the second working source code;
A display unit for displaying a comparison result in the comparison unit;
A program comparison device comprising:
前記比較部は、前記第1作業用ソースコードと前記第2作業用ソースコードとをテキスト比較することを特徴とする請求項1に記載のプログラム比較装置。   The program comparing device according to claim 1, wherein the comparing unit compares the first working source code and the second working source code by text. 前記表示部は、前記第1作業用ソースコードと、前記第2作業用ソースコードとを並べて表示することを特徴とする請求項1または2に記載のプログラム比較装置。   The program comparison device according to claim 1, wherein the display unit displays the first work source code and the second work source code side by side. 前記表示部は、前記第1作業用ソースコードと、前記第2作業用ソースコードと、前記ソースコードとを並べて表示することを特徴とする請求項1または2に記載のプログラム比較装置。   The program comparison device according to claim 1, wherein the display unit displays the first work source code, the second work source code, and the source code side by side. 前記表示部は、前記第1作業用ソースコードと前記第2作業用ソースコードとの相違箇所を強調表示することを特徴とする請求項3または請求項4に記載のプログラム比較装置。   5. The program comparison device according to claim 3, wherein the display unit highlights a difference between the first work source code and the second work source code. 6. 前記比較部により、前記第1作業用ソースコードと前記第2作業用ソースコードとに相違点があると判断された場合、前記ソースコードにおける前記相違点の対応箇所を解析する解析部をさらに備え、
前記表示部は、前記ソースコードの前記対応箇所を表示することを特徴とする請求項1〜5の何れか一項に記載のプログラム比較装置。
When the comparing 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 a corresponding portion of the difference in the source code. ,
The program comparing device according to claim 1, wherein the display unit displays the corresponding portion of the source code.
ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、
オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、
前記第1作業用ソースコードと前記第2作業用ソースコードとを比較するステップと、
前記比較の結果を表示するステップと、
を含むことを特徴とするプログラム比較方法。
Compiling the source code to generate a work object; decompiling the work object to generate a first work source code;
Decompiling the object program to generate a second working source code;
Comparing the first working source code with the second working source code;
Displaying the result of the comparison;
A program comparison method comprising:
ソースコードをコンパイルして作業用オブジェクトを生成し、該作業用オブジェクトを逆コンパイルして第1作業用ソースコードを生成するステップと、
オブジェクトプログラムを逆コンパイルして第2作業用ソースコードを生成するステップと、
前記第1作業用ソースコードと前記第2作業用ソースコードとを比較するステップと、
前記比較の結果を表示するステップと、
をコンピュータに実行させる比較プログラム。
Compiling the source code to generate a work object; decompiling the work object to generate a first work source code;
Decompiling the object program to generate a second working source code;
Comparing the first working source code with the second working source code;
Displaying the result of the comparison;
A comparison program that causes a computer to execute
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 true JP2019220110A (en) 2019-12-26
JP7068941B2 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
JP7068941B2 (en) 2022-05-17

Similar Documents

Publication Publication Date Title
US9589115B2 (en) Obfuscation assisting apparatus
US20090070747A1 (en) System for Adding Code Commentary to Source Code During Software Debugging
CN108027721B (en) Techniques for configuring a general program using controls
JP5176478B2 (en) Data flow analysis device, data flow analysis method, and data flow analysis program
US20230394483A1 (en) Blockchain-based data processing method and apparatus
JP2016528622A (en) A system for calculating interprocedural dominance clauses and / or methods
WO2012036304A1 (en) Operation verification support device, operation verification support method, and operation verification support program
US11803697B2 (en) Method and system for labeling and organizing data for summarizing and referencing content via a communication network
JP2016048506A (en) Method for estimating format of log message as well as computer therefor and computer program
JP7068941B2 (en) Program comparison device, program comparison method and comparison program
JP2014174577A (en) Verification device, verification method, and program
JP2010067103A (en) Error information output device, error information output method and error output program for program
JP2017004282A (en) Program display device, program display system, program display method, and program display program
US20210397673A1 (en) Method and system for navigation control
JP2013152559A (en) Program comparison analysis device and program comparison analysis method
WO2012133606A1 (en) Apparatus for setting affecting extent of program, and method of specifying affecting extent and method of extracting affecting program using same
JP2013145443A (en) Test code generation device, test code generation method and test code generation program
US9164736B2 (en) Data processing system, input support method, and input support program
Reiss et al. Tool demonstration: The visualizations of code bubbles
JP2809048B2 (en) Screen debugging method
JP6011988B2 (en) Impact range survey method and impact range survey device
JP2015035174A (en) Control program division device, control program division method, and recording medium therefor
KR101149655B1 (en) Program design apparatus and method
Hunt Scala Testing
CN110262787B (en) Statement replacement method and device and electronic equipment

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