JP2019144885A - Relevance determination program, relevance determination device, and relevance determination method - Google Patents
Relevance determination program, relevance determination device, and relevance determination method Download PDFInfo
- Publication number
- JP2019144885A JP2019144885A JP2018028923A JP2018028923A JP2019144885A JP 2019144885 A JP2019144885 A JP 2019144885A JP 2018028923 A JP2018028923 A JP 2018028923A JP 2018028923 A JP2018028923 A JP 2018028923A JP 2019144885 A JP2019144885 A JP 2019144885A
- Authority
- JP
- Japan
- Prior art keywords
- program
- main program
- information
- subprogram
- source code
- 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
Links
Images
Abstract
Description
本発明は、関連判定プログラム、関連判定装置及び関連判定方法に関する。 The present invention relates to a related determination program, a related determination device, and a related determination method.
例えば、利用者にサービスを提供する事業者(以下、単に事業者とも呼ぶ)は、サービスの提供を行うための業務システム(以下、情報処理システムとも呼ぶ)を構築して稼働させる。そして、事業者は、業務システムを構成するプログラムの修正を行った場合、修正を行ったプログラムの動作についての各種テストを行う。 For example, a business provider (hereinafter simply referred to as a business operator) that provides a service to a user constructs and operates a business system (hereinafter also referred to as an information processing system) for providing the service. Then, when the company modifies the program constituting the business system, the company performs various tests on the operation of the modified program.
具体的に、上記のように修正が行われるプログラムには、例えば、実行中において他のプログラムを呼び出すプログラム(以下、メインプログラム)と、実行中の他のプログラムによって呼び出されるプログラム(以下、サブプログラムとも呼ぶ)とが含まれる。そのため、事業者は、例えば、サブプログラムの修正を行った場合、修正を行ったサブプログラムを呼び出すメインプログラムについても併せてテストを行う(例えば、特許文献1及び2参照)。
Specifically, the program that is modified as described above includes, for example, a program that calls another program during execution (hereinafter referred to as a main program) and a program that is called by another program being executed (hereinafter referred to as subprogram). Also called). Therefore, for example, when the subprogram is corrected, the business operator also performs a test on the main program that calls the corrected subprogram (see, for example,
ここで、上記のようにサブプログラムの修正を行った場合、事業者は、例えば、各メインプログラムのソースコードを参照し、各メインプログラムが呼び出しを行うサブプログラムに関する宣言文を特定する。そして、事業者は、修正を行ったサブプログラムに関する宣言文がソースコードに記述されているメインプログラムを、修正を行ったサブプログラムを呼び出すメインプログラムとして特定する。 Here, when the subprogram is corrected as described above, for example, the business entity refers to the source code of each main program, and specifies a declaration statement related to the subprogram that each main program calls. Then, the business entity specifies the main program in which the declaration statement regarding the modified subprogram is described in the source code as the main program that calls the modified subprogram.
しかしながら、上記のようなメインプログラムには、呼び出しを行うサブプログラムの追加や削除を伴う修正が繰り返し行われているものが含まれている。そのため、メインプログラムのソースコードに含まれる宣言文には、現在では呼び出しが行われていないサブプログラムに関する宣言文が含まれている可能性がある。したがって、事業者は、修正を行ったサブプログラムを呼び出すメインプログラムを正確に特定することができない場合がある。 However, the main program as described above includes a program that is repeatedly modified with addition or deletion of a subprogram to be called. Therefore, the declaration statement included in the source code of the main program may include a declaration statement related to a subprogram that is not currently called. Therefore, the operator may not be able to accurately specify the main program that calls the corrected subprogram.
そこで、一つの側面では、本発明は、サブプログラムの呼び出しを行うメインプログラムを特定することを可能とする関連判定プログラム、関連判定装置及び関連判定方法を提供することを目的とする。 Therefore, in one aspect, an object of the present invention is to provide a related determination program, a related determination device, and a related determination method that can specify a main program that calls a subprogram.
実施の形態の一態様では、メインプログラムのソースコードから、前記メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除し、前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行し、前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する、処理をコンピュータに実行させる。 In one aspect of the embodiment, a declaration statement related to any one of one or more subprograms called by the main program is deleted from the source code of the main program, and the declaration statement is deleted. Processing for executing compilation of the source code of the main program, and outputting information indicating that any of the subprograms is a subprogram that is not called by the main program when the execution of the compilation is completed normally Is executed on the computer.
一つの側面によれば、サブプログラムの呼び出しを行うメインプログラムを特定することを可能とする。 According to one aspect, it is possible to specify a main program that calls a subprogram.
[情報処理システムの構成]
図1は、情報処理システム10の全体構成を示す図である。図1に示す情報処理システム10には、情報処理装置1と、メインプログラムやサブプログラムのソースコード131を記憶する記憶装置1aと、関連情報132を記憶するデータベースを含む記憶装置1bと、操作端末3とが含まれている。関連情報132は、各メインプログラムが呼び出しを行うサブプログラムを示す情報である。なお、メインプログラムが呼び出しを行うサブプログラムは、例えば、DLL(Dynamic Link Library)であってよい。
[Configuration of information processing system]
FIG. 1 is a diagram illustrating an overall configuration of the
操作端末3は、例えば、事業者が情報処理装置1に対して情報の入力等を行うPC(Personal Computer)である。操作端末3は、例えば、ネットワーク(図示しない)を介して情報処理装置1と接続する。
The
情報処理装置1は、記憶装置1aに記憶されたソースコード131を取得する。そして、情報処理装置1は、記憶装置1aから取得したソースコード131を参照し、関連情報132を生成する。その後、情報処理装置1は、生成した関連情報132を情報格納領域130に記憶する。以下、ソースコード131の概略の具体例について説明する。
The
[ソースコードの概略の具体例]
図2は、ソースコード131の概略の具体例を説明する図である。
[Specific examples of outline of source code]
FIG. 2 is a diagram for explaining a specific example of the outline of the
図2に示す例は、プログラムIDが「MainProC001」であるメインプログラムのソースコード131に、呼び出しが行われるサブプログラムのプログラムIDである「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC005」の宣言文がそれぞれ記述されていることを示している。
In the example shown in FIG. 2, the main
また、図2に示す例は、プログラムIDが「MainProC002」であるメインプログラムのソースコード131に、呼び出しが行われるサブプログラムのプログラムIDである「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC006」の宣言文がそれぞれ記述されていることを示している。
Further, in the example illustrated in FIG. 2, “SubProC001”, “SubProC002”, “SubProC003”, and “SubProC006” are the program IDs of the subprograms to be called to the
[関連情報の内容を出力した場合の具体例(1)]
次に、関連情報132の内容を操作端末3の出力装置(図示しない)に出力した場合の具体例について説明を行う。図3は、関連情報132の内容を出力した場合の具体例を説明する図である。
[Specific example when related information is output (1)]
Next, a specific example when the content of the
図3に示す例において、例えば、「MainProC001」に対応する欄のうち、「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC005」に対応する欄には、それぞれ「〇」が設定されている。すなわち、図3に示す例は、プログラムIDが「MainProC001」であるメインプログラムが呼び出しを行うサブプログラムとして、プログラムIDが「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC005」であるサブプログラムがそれぞれ存在していることを示している。 In the example illustrated in FIG. 3, for example, among the columns corresponding to “MainProC001”, “◯” is set in the columns corresponding to “SubProC001”, “SubProC002”, “SubProC003”, and “SubProC005”. . That is, in the example shown in FIG. 3, the subprograms whose program IDs are “SubProC001”, “SubProC002”, “SubProC003”, and “SubProC005” are subprograms that the main program whose program ID is “MainProC001” calls. It shows that each exists.
また、図3に示す例において、例えば、「MainProC002」に対応する欄のうち、「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC006」に対応する欄には、それぞれ「〇」が設定されている。すなわち、図3に示す例は、プログラムIDが「MainProC002」であるメインプログラムが呼び出しを行うサブプログラムとして、プログラムIDが「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC006」であるサブプログラムがそれぞれ存在していることを示している。 In the example illustrated in FIG. 3, for example, among the columns corresponding to “MainProC002”, “◯” is set in the columns corresponding to “SubProC001”, “SubProC002”, “SubProC003”, and “SubProC006”. ing. That is, in the example shown in FIG. 3, the subprograms whose program IDs are “SubProC001”, “SubProC002”, “SubProC003”, and “SubProC006” are subprograms that the main program whose program ID is “MainProC002” calls. It shows that each exists.
上記のように、情報処理装置1は、例えば、情報格納領域130に記憶されているメインプログラムのソースコード131を参照し、宣言文が記述されているサブプログラムのプログラムIDをそれぞれ特定する。そして、情報処理装置1は、特定した情報に基づいて関連情報132を生成する。
As described above, for example, the
これにより、事業者は、例えば、サブプログラムの修正を行った場合に、関連情報132の内容が出力された出力装置を閲覧することで、修正を行ったサブプログラムの呼び出しを行うメインプログラムを特定することが可能になる。そのため、事業者は、例えば、サブプログラムの改修に伴ってテストを行う必要があるメインプログラムを特定することが可能になる。
As a result, for example, when the subprogram is corrected, the operator identifies the main program that calls the corrected subprogram by browsing the output device to which the content of the
しかしながら、上記のようなメインプログラムには、例えば、呼び出しを行うサブプログラムの追加や削除を伴う修正が繰り返し行われているものが含まれている。そのため、メインプログラムのソースコードに含まれる宣言文には、現在では呼び出しが行われていないサブプログラムに関する宣言文が含まれている可能性がある。したがって、情報処理装置1は、修正を行ったサブプログラムを呼び出すメインプログラムを正確に特定することができない場合がある。
However, the main program as described above includes, for example, a program in which correction accompanied by addition or deletion of a subprogram to be called is repeatedly performed. Therefore, the declaration statement included in the source code of the main program may include a declaration statement related to a subprogram that is not currently called. Therefore, the
そこで、本実施の形態における情報処理装置1は、メインプログラムのソースコード131から、メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除する。そして、情報処理装置1は、宣言文が削除された後のメインプログラムのコンパイルを実行する。
Therefore, the
その結果、情報処理装置1は、コンパイルの実行が正常に完了した場合、宣言文を削除したサブプログラムがメインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する。
As a result, when the execution of compilation is completed normally, the
すなわち、メインプログラムが実際に呼び出しを行っているサブプログラムの宣言文の削除が行われた場合、メインプログラムのコンパイルは、呼び出しを行うサブプログラムの宣言文が存在しないために失敗する。そこで、情報処理装置1は、いずれかのサブプログラムに関する宣言文を削除したメインプログラムのソースコード131のコンパイルを実行し、そのコンパイルが正常に完了するか否かの判定を行う。そして、コンパイルが正常に完了した場合、情報処理装置1は、宣言文を削除したサブプログラムの呼び出しが行われていないものと判定する。
That is, when the declaration statement of the subprogram that the main program is actually calling is deleted, the compilation of the main program fails because there is no declaration statement of the subprogram that is calling. Therefore, the
これにより、情報処理装置1は、修正を行ったサブプログラムを実際に呼び出しているメインプログラムを特定することが可能になる。そのため、情報処理装置1は、サブプログラムの修正が行われた場合に、テストを行う必要があるメインプログラムを正確に特定することが可能になる。したがって、情報処理装置1は、サブプログラムの修正に伴うメインプログラムのテストが必要以上に行われることを防止することが可能になる。
As a result, the
[情報処理システムのハードウエア構成]
次に、情報処理システム10のハードウエア構成について説明する。図4は、情報処理装置1のハードウエア構成を示す図である。
[Hardware configuration of information processing system]
Next, the hardware configuration of the
情報処理装置1は、図4に示すように、プロセッサであるCPU101と、メモリ102と、入出力インターフェース103と、記憶媒体104とを有する。各部は、バス105を介して互いに接続される。
As illustrated in FIG. 4, the
記憶媒体104は、例えば、記憶媒体104内のプログラム格納領域(図示しない)に、メインプログラムが呼び出しを行うサブプログラムの判定を行う処理(以下、関連判定処理とも呼ぶ)を行うためのプログラム110を記憶する。記憶媒体104は、例えば、HDD(Hard Disk Drive)であってよい。
The
また、記憶媒体104は、例えば、関連判定処理を行う際に用いられる情報を記憶する記憶部130(以下、情報格納領域130とも呼ぶ)を有する。
In addition, the
なお、図1で説明した記憶装置1a及び記憶装置1bは、例えば、情報処理装置1の内部に位置する情報格納領域130に対応するものであってよい。以下、記憶装置1a及び記憶装置1bが情報格納領域130に対応するものとして説明を行う。
Note that the
CPU101は、記憶媒体104からメモリ102にロードされたプログラム110を実行して関連判定処理を行う。
The
入出力インターフェース103は、例えば、ネットワーク(図示しない)を介して操作端末3と通信を行う。
The input /
[情報処理装置の機能]
次に、情報処理装置1の機能について説明する。図5は、情報処理装置1の機能のブロック図である。
[Functions of information processing device]
Next, functions of the
情報処理装置1は、CPU101やメモリ102等のハードウエアとプログラム110とが有機的に協働することにより、図5に示すように、ソースコード取得部111と、宣言文削除部112と、コンパイル実行部113と、結果判定部114と、情報管理部115(以下、情報出力部115とも呼ぶ)とを含む各種機能を実現する。
As shown in FIG. 5, the
また、情報処理装置1は、図5に示すように、ソースコード131と、関連情報132と、修正情報133とを情報格納領域130に記憶する。
Further, as illustrated in FIG. 5, the
ソースコード取得部111は、情報格納領域130に記憶されたソースコード131を取得する。
The source
宣言文削除部112は、ソースコード取得部111が取得したメインプログラムのソースコード131から、メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除する。
The declaration
コンパイル実行部113は、宣言文削除部112が宣言文を削除した後のメインプログラムのソースコード131のコンパイルを実行する。
The compile
結果判定部114は、コンパイル実行部113によって実行されたコンパイルが正常に完了したか否かを判定する。
The
情報管理部115は、結果判定部114によってコンパイルの実行が正常に完了したと判定された場合、宣言文削除部112によって宣言文の削除が行われたサブプログラムが、メインプログラムによって呼び出されていないサブプログラムであることを示す情報を出力する。
When the
具体的に、情報管理部115は、例えば、宣言文の削除が行われたサブプログラムがメインプログラムによって呼び出されないサブプログラムであることを示す関連情報132を生成する。そして、情報管理部115は、例えば、生成した関連情報132の内容を出力装置に出力する。修正情報133についての説明は後述する。
Specifically, for example, the
[第1の実施の形態の概略]
次に、第1の実施の形態の概略について説明する。図6は、第1の実施の形態における関連判定処理の概略を説明するフローチャート図である。図7及び図8は、第1の実施の形態における関連判定処理の概略を説明する図である。以下、図7及び図8を参照しながら、図6に示す関連判定処理の概略について説明を行う。
[Outline of First Embodiment]
Next, an outline of the first embodiment will be described. FIG. 6 is a flowchart for explaining the outline of the association determination process in the first embodiment. 7 and 8 are diagrams for explaining the outline of the association determination process in the first embodiment. Hereinafter, the outline of the association determination process illustrated in FIG. 6 will be described with reference to FIGS. 7 and 8.
情報処理装置1は、図6に示すように、情報出力タイミングまで待機する(S1のNO)。情報出力タイミングは、例えば、事業者によって予め決められた定期的なタイミングであってよい。具体的に、情報出力タイミングは、例えば、毎朝午前5時等であってよい。
As shown in FIG. 6, the
そして、情報出力タイミングになった場合(S1のYES)、情報処理装置1は、メインプログラムのソースコード131から、メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除する(S2)。続いて、情報処理装置1は、S2の処理で宣言文が削除された後のメインプログラムのソースコード131のコンパイルを実行する(S3)。
When the information output timing is reached (YES in S1), the
具体的に、情報処理装置1は、図7に示すように、記憶装置1aから取得したメインプログラムのソースコード131のうちのいずれかから、そのメインプログラムによって呼び出されるいずれかのサブプログラムに関する宣言文を削除してコンパイルを実行する。
Specifically, as shown in FIG. 7, the
その後、情報処理装置1は、S3の処理においてコンパイルが正常に完了したか否かを判定する(S4)。
Thereafter, the
その結果、コンパイルが正常に完了したと判定した場合(S4のYES)、情報処理装置1は、S2の処理で宣言文を削除したサブプログラムがメインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する(S5)。
As a result, when it is determined that the compilation is completed normally (YES in S4), the
具体的に、情報処理装置1は、この場合、図8に示すように、例えば、S2の処理で宣言文を削除したサブプログラムがメインプログラムによって呼び出されないサブプログラムであることを示す関連情報132を生成し、情報格納領域130に記憶する。
Specifically, in this case, as illustrated in FIG. 8, the
一方、コンパイルが正常に完了していないと判定した場合(S4のYES)、情報処理装置1は、S5の処理を行わない。
On the other hand, when it is determined that the compilation has not been completed normally (YES in S4), the
これにより、情報処理装置1は、修正を行ったサブプログラムを実際に呼び出しているメインプログラムを特定することが可能になる。そのため、情報処理装置1は、サブプログラムの修正が行われた場合に、テストを行う必要があるメインプログラムを正確に特定することが可能になる。したがって、情報処理装置1は、サブプログラムの修正に伴うメインプログラムのテストが必要以上に行われることを防止することが可能になる。
As a result, the
[第1の実施の形態の詳細]
次に、第1の実施の形態の詳細について説明する。図9から図12は、第1の実施の形態における関連判定処理の詳細を説明するフローチャート図である。また、図13から図22は、第1の実施の形態における関連判定処理の詳細を説明する図である。以下、図13から図22を参照しながら、図9から図12に示す関連判定処理の詳細について説明を行う。
[Details of First Embodiment]
Next, details of the first embodiment will be described. FIG. 9 to FIG. 12 are flowcharts for explaining the details of the association determination processing in the first embodiment. FIGS. 13 to 22 are diagrams for explaining the details of the association determination processing in the first embodiment. Hereinafter, the details of the association determination process illustrated in FIGS. 9 to 12 will be described with reference to FIGS. 13 to 22.
なお、以下、図3で説明したメインプログラムのうち、プログラムIDが「MainProC001」から「MainProC005」であるプログラムがC言語によって記述されたプログラムであり、プログラムIDが「MainProC006」から「MainProC010」であるプログラムがC♯によって記述されたプログラムであるものとして説明を行う。また、以下、図3で説明したサブプログラムのうち、プログラムIDが「SubProC001」から「SubProC006」であるプログラムがC言語によって記述されたプログラムであり、プログラムIDが「SubProC007」から「SubProC010」であるプログラムがC♯によって記述されたプログラムであるものとして説明を行う。 In the following, among the main programs described in FIG. 3, programs whose program IDs are “MainProC001” to “MainProC005” are programs written in C language, and program IDs are “MainProC006” to “MainProC010”. The description will be made assuming that the program is a program described by C #. In the following, among the subprograms described in FIG. 3, programs whose program IDs are “SubProC001” to “SubProC006” are programs written in C language, and program IDs are “SubProC007” to “SubProC010”. The description will be made assuming that the program is a program described by C #.
情報処理装置1のソースコード取得部111は、図9に示すように、情報出力タイミングまで待機する(S11のNO)。
As shown in FIG. 9, the source
そして、情報出力タイミングになった場合(S11のYES)、ソースコード取得部111は、情報格納領域130に記憶されたソースコード131を取得する(S12)。
When it is time to output information (YES in S11), the source
続いて、情報処理装置1の情報管理部115は、S12の処理で取得したソースコード131から、メインプログラムのソースコード131を特定する(S13)。
Subsequently, the
この場合、情報管理部115は、例えば、S12の処理で取得したソースコード131のそれぞれに記述されたプログラムIDを特定し、特定したプログラムIDのそれぞれがメインプログラムのプログラムIDの決定ルールに従っているか否かを判定する。そして、情報管理部115は、例えば、決定ルールに従っていると判定したプログラムIDが記述されたソースコード131を、メインプログラムのソースコード131として特定する。
In this case, for example, the
また、情報管理部115は、例えば、S12の処理で取得したソースコード131のそれぞれに記述されたプログラムIDを特定し、特定したプログラムIDのうち、情報格納領域130に記憶された関連情報132においてメインプログラムのプログラムIDとして設定されているプログラムIDを特定する。そして、情報管理部115は、関連情報132においてメインプログラムのプログラムIDとして設定されているプログラムIDが記述されたソースコード131を、メインプログラムのソースコード131として特定する。関連情報132の具体例については後述する。
For example, the
その結果、メインプログラムのソースコード131が特定されなかった場合(S14のNO)、情報処理装置1は、関連判定処理を終了する。
As a result, when the
一方、メインプログラムのソースコード131を特定した場合(S14のYES)、情報管理部115は、特定したソースコード131のうちの1つを特定する(S15)。
On the other hand, when the
そして、情報管理部115は、情報格納領域130に記憶された関連情報132から、S15の処理でソースコード131を特定したメインプログラムに対応する情報を削除する(S16)。
And the
その後、情報処理装置1の宣言文削除部112は、図10に示すように、S15の処理で特定したメインプログラムのソースコード131に宣言文が含まれるサブプログラムを特定する(S21)。以下、S21の処理の具体例について説明を行う。
Thereafter, as shown in FIG. 10, the declaration
[S21の処理の具体例]
図13及び図14は、S21の処理の具体例について説明する図である。
[Specific example of processing in S21]
13 and 14 are diagrams for explaining a specific example of the processing of S21.
初めに、S15の処理で特定したメインプログラムのソースコード131がC言語によって記述されたソースコード131(以下、ソースコード131aとも呼ぶ)であった場合におけるS21の処理について説明を行う。図13は、ソースコード131aの一部の具体例を説明する図である。
First, the processing of S21 when the
この場合、宣言文削除部112は、図13に示すソースコード131aに含まれている記述から、「<AdditionalDependencies>」を含む文字列を検索する。具体的に、宣言文削除部112は、例えば、図13に示すように、「<AdditionalDependencies>」を含む文字列として、文字列CS01を特定する。
In this case, the declaration
続いて、宣言文削除部112は、文字列CS01のうち、「<AdditionalDependencies>」と「</AdditionalDependencies>」との間において「;」で区切られている文字列を、S15の処理で特定したメインプログラムが呼び出しを行うサブプログラムのプログラムIDとして特定する。
Subsequently, the declarative
具体的に、宣言文削除部112は、図13に示す例において、例えば、プログラムIDとして「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC005」を特定する。すなわち、宣言文削除部112は、図13に示す例において、S15の処理で特定したメインプログラムのソースコード131に宣言文が含まれるサブプログラムとして、プログラムIDが「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC005」であるサブプログラムを特定する。
Specifically, in the example illustrated in FIG. 13, for example, the
次に、S15の処理で特定したメインプログラムのソースコード131がC#によって記述されたソースコード131(以下、ソースコード131bとも呼ぶ)であった場合におけるS21の処理について説明を行う。図14は、ソースコード131bの一部の具体例を説明する図である。
Next, the process of S21 when the
この場合、宣言文削除部112は、図14に示すソースコード131bに含まれている記述から、「<Reference Include>」を含む文字列を検索する。具体的に、宣言文削除部112は、例えば、図14に示すように、「<Reference Include>」を含む文字列として、文字列CS02a、文字列CS02b及び文字列CS02cをそれぞれ特定する。
In this case, the declaration
続いて、宣言文削除部112は、例えば、文字列CS02aと文字列CS02aの直後に位置する「</Reference>」との間において、「<HintPath>」と「</HintPath>」とに囲まれる文字列CS02dに含まれるプログラムIDを、S15の処理で特定したメインプログラムが呼び出しを行うサブプログラムのプログラムIDとして特定する。また、宣言文削除部112は、例えば、文字列CS02bと文字列CS02bの直後に位置する「</Reference>」との間において、「<HintPath>」と「</HintPath>」とに囲まれる文字列CS02eに含まれるプログラムIDを、S15の処理で特定したメインプログラムが呼び出しを行うサブプログラムのプログラムIDとして特定する。さらに、宣言文削除部112は、例えば、文字列CS02cと文字列CS02cの直後に位置する「</Reference>」との間において、「<HintPath>」と「</HintPath>」とに囲まれる文字列CS02fに含まれるプログラムIDを、S15の処理で特定したメインプログラムが呼び出しを行うサブプログラムのプログラムIDとして特定する。
Subsequently, the declaration
具体的に、宣言文削除部112は、図14に示す例において、例えば、プログラムIDとして「SubProC007」、「SubProC008」及び「SubProC009」を特定する。すなわち、宣言文削除部112は、図14に示す例において、S15の処理で特定したメインプログラムのソースコード131に宣言文が含まれるサブプログラムとして、プログラムIDが「SubProC007」、「SubProC008」及び「SubProC009」であるサブプログラムを特定する。
Specifically, in the example illustrated in FIG. 14, for example, the
図10に戻り、S21の処理においてサブプログラムを特定した場合(S22のYES)、宣言文削除部112は、S21の処理で特定したサブプログラムのうちの1つを特定する(S23)。
Returning to FIG. 10, when the subprogram is specified in the process of S21 (YES in S22), the declaration
具体的に、S21の処理において、プログラムIDが「SubProC001」、「SubProC002」、「SubProC003」及び「SubProC005」であるサブプログラムが特定された場合、宣言文削除部112は、例えば、プログラムIDが「SubProC001」であるサブプログラムを特定する。
Specifically, when the subprograms whose program IDs are “SubProC001”, “SubProC002”, “SubProC003”, and “SubProC005” are specified in the processing of S21, the declaration
そして、宣言文削除部112は、S15の処理で特定したソースコード131から、S23の処理で特定したサブプログラムの宣言文を削除する(S24)。
Then, the declaration
具体的に、例えば、S15の処理で特定したソースコード131が図13で説明したソースコード131aであった場合、宣言文削除部112は、例えば、図15に示すように、文字列CS01から「SubProC001.lib;」を削除する。
Specifically, for example, when the
また、例えば、S15の処理で特定したソースコード131が図14で説明したソースコード131bであった場合、宣言文削除部112は、例えば、図16に示すように、文字列CS02aに含まれる「<Reference Include>」と文字列CS02dの直後に位置する「</Reference>」とに囲まれる文字列を削除する。
For example, when the
その後、情報処理装置1のコンパイル実行部113は、S24の処理で宣言文が削除されたソースコード131のコンパイルを実行する(S25)。
Thereafter, the compile
具体的に、コンパイル実行部113は、図15で説明したソースコード131aや図16で説明したソースコード131bのコンパイルを実行する。
Specifically, the compile
そして、情報処理装置1の結果判定部114は、図11に示すように、S25の処理で実行したコンパイルの結果が正常であるか否かを判定する(S31)。
Then, as illustrated in FIG. 11, the
具体的に、結果判定部114は、例えば、コンパイル実行部113によって出力されたコンパイル結果情報(図示しない)を参照し、コンパイル結果情報に「error」の文字列が含まれているか否かを判定する。そして、結果判定部114は、例えば、コンパイル結果情報に「error」の文字列が含まれていないと判定した場合、S25の処理で実行したコンパイルの結果が正常であると判定する。一方、結果判定部114は、例えば、コンパイル結果情報に「error」の文字列が含まれていると判定した場合、S25の処理で実行したコンパイルの結果が正常でないと判定する。
Specifically, the
その結果、S25の処理で実行したコンパイルの結果が正常であると判定した場合(S32のYES)、情報管理部115は、情報格納領域130に記憶された関連情報132に、S15の処理でソースコード131が特定されたメインプログラムが、S23の処理で特定したサブプログラムの呼び出しを行わないことを示す情報を追加する(S33)。
As a result, when it is determined that the result of the compilation executed in the process of S25 is normal (YES in S32), the
一方、S25の処理で実行したコンパイルの結果が正常でないと判定した場合(S32のNO)、情報管理部115は、情報格納領域130に記憶された関連情報132に、S15の処理でソースコード131が特定されたメインプログラムが、S23の処理で特定したサブプログラムの呼び出しを行うことを示す情報を追加する(S34)。
On the other hand, when it is determined that the result of the compilation executed in the process of S25 is not normal (NO in S32), the
そして、宣言文削除部112は、S33の処理またはS34の処理の後、図12に示すように、S24の処理で宣言文が削除されたソースコード131を、宣言文を削除する前の状態に戻す(S41)。
Then, after the process of S33 or S34, the declaration
その後、情報管理部115は、S21の処理で特定された全てのサブプログラムをS23の処理において特定したか否かを判定する(S42)。また、情報管理部115は、S21の処理においてサブプログラムが特定されなかった場合(S22のNO)も同様に、S42の処理を行う。
Thereafter, the
その結果、全てのサブプログラムを特定していないと判定した場合(S42のNO)、宣言文削除部112は、S23以降の処理を再度行う。
As a result, when it is determined that not all the subprograms have been specified (NO in S42), the declaration
一方、全てのサブプログラムを特定したと判定した場合(S42のYES)、情報管理部115は、S13の処理で特定された全てのメインプログラムのソースコード131をS15の処理において特定したか否かを判定する(S43)。
On the other hand, if it is determined that all the subprograms have been identified (YES in S42), the
その結果、全てのメインプログラムのソースコード131を特定していないと判定した場合(S43のNO)、情報管理部115は、S15以降の処理を再度行う。
As a result, when it is determined that the
一方、全てのメインプログラムのソースコード131を特定したと判定した場合(S43のYES)、情報処理装置1は、関連判定処理を終了する。以下、関連情報132の具体例について説明を行う。
On the other hand, when it is determined that the
[関連情報の具体例]
図17から図21は、関連情報132の具体例について説明する図である。
[Specific examples of related information]
FIGS. 17 to 21 are diagrams illustrating specific examples of the
初めに、S16の処理が行われる前の関連情報132の具体例について説明を行う。図17は、S16の処理が行われる前の関連情報132の具体例について説明する図である。
First, a specific example of the
図17等に示す関連情報132は、メインプログラムのプログラムIDが設定される「メインプログラムID」と、サブプログラムのプログラムIDが設定される「サブプログラムID」とを項目として有する。また、図17等に示す関連情報132は、メインプログラムやサブプログラムのプログラム言語の識別情報が設定される「言語識別情報」と、「サブプログラムID」に情報が設定されたサブプログラムが「メインプログラムID」に情報が設定されたメインプログラムによって実際に呼び出されているか否かを示す情報が設定される「判定結果」とを項目として有する。「言語識別情報」には、例えば、C言語を示す「1」、または、C#を示す「2」が設定される。また、「判定結果」には、サブプログラムの呼び出しが実際に行われていることを示す「TRUE」、または、サブプログラムの呼び出しが実際には行われていないことを示す「FALSE」が設定される。すなわち、「判定結果」には、S31の処理において行われた判定の結果を示す情報が設定される。
The
具体的に、図17に示す関連情報132において、「メインプログラムID」に「MainProC001」が設定され、「サブプログラムID」に「SubProC001」が設定されている情報には、「言語識別情報」として「1」が設定され、「判定結果」として「TRUE」が設定されている。また、図17に示す関連情報132において、「メインプログラムID」に「MainProC001」が設定され、「サブプログラムID」に「SubProC002」が設定されている情報には、「言語識別情報」として「1」が設定され、「判定結果」として「TRUE」が設定されている。図17に含まれる他の情報についての説明は省略する。
Specifically, in the
そして、例えば、S15の処理においてプログラムIDが「MainProC001」であるメインプログラムが特定された場合、情報管理部115は、図18に示すように、「メインプログラムID」に「MainProC001」が設定された情報をそれぞれ削除する。
For example, when the main program whose program ID is “MainProC001” is identified in the processing of S15, the
続いて、例えば、S15の処理においてプログラムIDが「MainProC001」であるメインプログラムが特定され、S23の処理においてプログラムIDが「SubProC001」であるサブプログラムが特定されている場合であって、S31の処理においてコンパイル結果が正常であると判定された場合、情報管理部115は、図19の下線部分に示すように、「メインプログラムID」に「MainProC001」が設定され、「サブプログラムID」に「SubProC001」が設定され、「判定結果」に「TRUE」が設定された情報を追加する。
Subsequently, for example, when the main program whose program ID is “MainProC001” is specified in the process of S15, and the subprogram whose program ID is “SubProC001” is specified in the process of S23, the process of S31 is performed. 19, the
さらに、例えば、S15の処理においてプログラムIDが「MainProC001」であるメインプログラムが特定され、S23の処理においてプログラムIDが「SubProC002」であるサブプログラムが特定されている場合であって、S31の処理においてコンパイル結果が正常でないと判定された場合、情報管理部115は、図20の下線部分に示すように、「メインプログラムID」に「MainProC001」が設定され、「サブプログラムID」に「SubProC002」が設定され、「判定結果」に「FALSE」が設定された情報を追加する。
Further, for example, when the main program whose program ID is “MainProC001” is specified in the process of S15 and the subprogram whose program ID is “SubProC002” is specified in the process of S23, When it is determined that the compilation result is not normal, the
その後、情報管理部115は、S23の処理からS42の処理までを繰り返し行うことにより、例えば、図21の下線部分に示すように、「メインプログラムID」に「MainProC001」が設定された情報をそれぞれ追加する。
After that, the
これにより、情報管理部115は、情報格納領域130に記憶されたソースコード131の現在の状態に対応する関連情報132を生成することが可能になる。そのため、事業者は、情報処理装置1が生成した関連情報132を参照することにより、各メインプログラムが呼び出しを行うサブプログラムのそれぞれを正確に特定することが可能になる。
Thereby, the
[関連情報の内容を出力した場合の具体例(2)]
次に、図21で説明した関連情報132の内容を出力した場合の具体例について説明を行う。図22は、関連情報132の内容を出力した場合の具体例を説明する図である。
[Specific example when related information is output (2)]
Next, a specific example when the content of the
図21で説明した関連情報132において、「メインプログラムID」が「MainProC001」であって「サブプログラムID」が「SubProC001」及び「SubProC005」である情報の「判定結果」には、それぞれ「TRUE」が設定されている。また、図21で説明した関連情報132において、「メインプログラムID」が「MainProC001」であって「サブプログラムID」が「SubProC002」及び「SubProC003」である情報の「判定結果」には、それぞれ「FALSE」が設定されている。
In the
そのため、図22に示す例において、例えば、「MainProC001」に対応する欄のうち、「SubProC001」及び「SubProC005」に対応する欄のそれぞれには、サブプログラムの呼び出しが実際に行われていることを示す「〇」が設定されている。また、図22に示す例において、例えば、「MainProC001」に対応する欄のうち、「SubProC002」及び「SubProC003」に対応する欄のそれぞれには、サブプログラムの呼び出しが実際には行われていないことを示す「×」が設定されている。 Therefore, in the example shown in FIG. 22, for example, among the columns corresponding to “MainProC001”, the subprograms are actually called in the columns corresponding to “SubProC001” and “SubProC005”. “◯” shown is set. In the example illustrated in FIG. 22, for example, among the columns corresponding to “MainProC001”, the subprograms are not actually called in each of the columns corresponding to “SubProC002” and “SubProC003”. “×” is set.
これにより、事業者は、例えば、図22に示す内容が出力された出力装置を閲覧することで、メインプログラムが呼び出しを行うサブプログラムを正確に特定することが可能になる。 As a result, for example, the operator can accurately identify the subprogram to be called by the main program by browsing the output device from which the content shown in FIG. 22 is output.
このように、本実施の形態における情報処理装置1は、メインプログラムのソースコード131から、メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除する。そして、情報処理装置1は、宣言文が削除された後のメインプログラムのコンパイルを実行する。
As described above, the
その後、情報処理装置1は、コンパイルの実行が正常に完了した場合、宣言文を削除したサブプログラムがメインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する。
Thereafter, when the execution of the compilation is normally completed, the
すなわち、メインプログラムが実際に呼び出しを行っているサブプログラムの宣言文の削除が行われた場合、メインプログラムのコンパイルは、呼び出しを行うサブプログラムの宣言文が存在しないために失敗する。そこで、情報処理装置1は、いずれかのサブプログラムに関する宣言文を削除したメインプログラムのソースコード131のコンパイルを実行し、そのコンパイルが正常に完了するか否かの判定を行う。そして、コンパイルが正常に完了した場合、情報処理装置1は、宣言文を削除したサブプログラムの呼び出しが行われていないものと判定する。
That is, when the declaration statement of the subprogram that the main program is actually calling is deleted, the compilation of the main program fails because there is no declaration statement of the subprogram that is calling. Therefore, the
これにより、情報処理装置1は、修正を行ったサブプログラムを実際に呼び出しているメインプログラムを特定することが可能になる。そのため、情報処理装置1は、サブプログラムの修正が行われた場合に、テストを行う必要があるメインプログラムを正確に特定することが可能になる。したがって、情報処理装置1は、サブプログラムの修正に伴うメインプログラムのテストが必要以上に行われることを防止することが可能になる。
As a result, the
なお、図22に示す例において、「SubProC007」に対応する欄のうちの「MainProC007」に対応する欄には、「〇」が設定されており、「SubProC007」に対応する欄のうちの「MainProC006」、「MainProC008」、「MainProC009」及び「MainProC010」に対応する欄には、それぞれ「×」が設定されている。 In the example shown in FIG. 22, “◯” is set in the column corresponding to “MainProC007” in the column corresponding to “SubProC007”, and “MainProC006” in the column corresponding to “SubProC007”. “,” “MainProC008”, “MainProC009”, and “MainProC010” are respectively set to “x”.
すなわち、図22に示す例は、プログラムIDが「MainProC006」、「MainProC008」、「MainProC009」及び「MainProC010」であるメインプログラムのそれぞれが、プログラムIDが「SubProC007」であるサブプログラムの呼び出しを中止していることを示している。また、図22に示す例は、プログラムIDが「MainProC007」であるメインプログラムのみが、プログラムIDが「SubProC007」であるサブプログラムの呼び出しを引き続き行っていることを示している。 That is, in the example shown in FIG. 22, each of the main programs whose program IDs are “MainProC006”, “MainProC008”, “MainProC009”, and “MainProC010” cancels calling the subprogram whose program ID is “SubProC007”. It shows that. In addition, the example illustrated in FIG. 22 indicates that only the main program whose program ID is “MainProC007” continues to call the subprogram whose program ID is “SubProC007”.
一方、図22に示す例において、「SubProC009」に対応する欄のうちの「MainProC006」、「MainProC008」、「MainProC009」及び「MainProC010」に対応する欄には、「〇」が設定されており、「SubProC009」に対応する欄のうちの「MainProC007」に対応する欄には、「〇」または「×」が設定されていない。 On the other hand, in the example shown in FIG. 22, “O” is set in the columns corresponding to “MainProC006”, “MainProC008”, “MainProC009”, and “MainProC010” among the columns corresponding to “SubProC009”. Of the columns corresponding to “SubProC009”, “◯” or “×” is not set in the column corresponding to “MainProC007”.
すなわち、図22に示す例は、プログラムIDが「MainProC006」から「MainProC010」であるメインプログラムが呼び出すサブプログラムを、プログラムIDが「SubProC007」であるサブプログラムからプログラムIDが「SubProC009」であるサブプログラムに変更するための修正が過去に行われた可能性があることを示している。そして、図22に示す例は、プログラムIDが「MainProC007」であるメインプログラムについては、上記の修正が行われていない可能性があることを示している。 That is, in the example shown in FIG. 22, the subprogram called by the main program whose program ID is “MainProC006” to “MainProC010”, and the subprogram whose program ID is “SubProC009” from the subprogram whose program ID is “SubProC007”. This indicates that there was a possibility that corrections to change to have been made in the past. The example illustrated in FIG. 22 indicates that the above-described correction may not be performed for the main program whose program ID is “MainProC007”.
そのため、事業者は、図22で説明した内容が出力された出力装置を閲覧することで、例えば、ソースコード131の修正漏れが発生している可能性に気が付くことが可能になる。
Therefore, the business operator can notice the possibility that the correction of the
[第2の実施の形態の概略]
次に、第2の実施の形態における関連判定処理について説明を行う。
[Outline of Second Embodiment]
Next, the association determination process in the second embodiment will be described.
第1の実施の形態における情報処理装置1は、情報格納領域130に記憶されたソースコード131のうち、メインプログラムのソースコード131の全てを対象として関連判定処理を行う。これに対し、第2の実施の形態における情報処理装置1では、情報格納領域130に記憶されたソースコード131のうち、所定期間内に修正が行われたメインプログラムのソースコード131のみを対象として関連判定処理を行う。
The
これにより、情報処理装置1は、関連判定処理の実行に要する時間を短縮させることが可能になる。
As a result, the
なお、第2の実施の形態における関連判定処理は、S12及びS13の処理において行われる処理の内容についてのみ、第1の実施の形態における関連判定処理と異なる。そのため、以下、第2の実施の形態における関連判定処理のうち、S12及びS13の処理についてのみ説明を行う。 Note that the association determination processing in the second embodiment differs from the association determination processing in the first embodiment only in the contents of the processing performed in the processing of S12 and S13. Therefore, only the processes of S12 and S13 will be described below in the association determination process in the second embodiment.
[第2の実施の形態の詳細]
図23から図25は、第2の実施の形態における関連判定処理の詳細の一部を説明するフローチャート図である。具体的に、図23及び図24は、第2の実施の形態における処理のうち、S12の処理について説明する図であり、図25は、第2の実施の形態における処理のうち、S13の処理について説明する図である。また、図26は、第2の実施の形態における関連判定処理の詳細を説明する図である。以下、図26を参照しながら、図23から図25に示す関連判定処理の詳細について説明を行う。
[Details of Second Embodiment]
FIG. 23 to FIG. 25 are flowcharts for explaining a part of the details of the association determination processing in the second embodiment. Specifically, FIG. 23 and FIG. 24 are diagrams for explaining the processing of S12 in the processing in the second embodiment, and FIG. 25 is the processing of S13 in the processing in the second embodiment. It is a figure explaining about. FIG. 26 is a diagram for explaining the details of the association determination processing in the second embodiment. Hereinafter, the details of the association determination process shown in FIGS. 23 to 25 will be described with reference to FIG.
ソースコード取得部111は、情報出力タイミングになった場合(S11のYES)、図23に示すように、ソースコード取得部111は、情報格納領域130に記憶されたソースコード131を取得する(S51)。
When the information output timing comes (YES in S11), the source
そして、情報管理部115は、S51の処理で取得したソースコード131のうち、所定期間内に修正が行われたソースコード131を特定する(S52)。具体的に、情報管理部115は、例えば、S51の処理で取得したソースコード131のうち、関連判定処理が前回行われてから現在までの間に修正が行われたソースコード131の特定を行う。
Then, the
その結果、所定期間内に修正が行われたソースコード131が特定されなかった場合(S53のNO)、情報処理装置1は、S12の処理を終了する。
As a result, when the
一方、所定期間内に修正が行われたソースコード131が特定された場合(S53のYES)、情報管理部115は、情報格納領域130に記憶された修正情報133を削除する(S54)。修正情報133は、例えば、関連判定処理が前回行われてから現在までの間に修正が行われたソースコード131を示す情報である。修正情報133の具体例については後述する。
On the other hand, when the
続いて、情報管理部115は、S53の処理で特定したソースコード131のうちの1つを特定する(S55)。
Subsequently, the
そして、情報管理部115は、S55の処理で特定したソースコード131がサブプログラムのソースコード131であるか否かを判定する(S56)。
Then, the
具体的に、情報管理部115は、例えば、S55の処理で取得したソースコード131のそれぞれに記述されたプログラムIDを特定し、特定したプログラムIDのそれぞれがサブプログラムのプログラムIDの決定ルールに従っているか否かを判定する。そして、情報管理部115は、例えば、決定ルールに従っていると判定したプログラムIDが記述されたソースコード131を、サブプログラムのソースコード131として特定する。
Specifically, for example, the
また、情報管理部115は、例えば、S55の処理で取得したソースコード131のそれぞれに記述されたプログラムIDを特定し、特定したプログラムIDのうち、情報格納領域130に記憶された関連情報132の「サブプログラムID」に設定されているプログラムIDを特定する。そして、情報管理部115は、関連情報132の「サブプログラムID」に設定されているプログラムIDが記述されたソースコード131を、サブプログラムのソースコード131として特定する。
For example, the
その結果、図24に示すように、S55の処理で特定したソースコード131がサブプログラムのソースコード131であると判定した場合(S61のYES)、情報管理部115は、情報格納領域130に記憶された修正情報133に、S55の処理で特定したソースコード131が所定期間内に修正されているサブプログラムのソースコード131であることを示す情報を追加する(S62)。
As a result, as shown in FIG. 24, when it is determined that the
一方、S55の処理で特定したソースコード131がサブプログラムのソースコード131でないと判定した場合(S61のNO)、情報管理部115は、情報格納領域130に記憶された修正情報133に、S55の処理で特定したソースコード131が所定期間内に修正されているメインプログラムのソースコード131であることを示す情報を追加する(S63)。
On the other hand, when it is determined that the
そして、S62の処理またはS63の処理の後、情報管理部115は、S52の処理で特定した全てのプログラムのソースコード131をS55の処理において特定したか否かを判定する(S64)。
Then, after the process of S62 or the process of S63, the
その結果、全てのプログラムを特定していないと判定した場合(S64のNO)、情報管理部115は、S55以降の処理を再度行う。
As a result, when it is determined that not all the programs have been specified (NO in S64), the
一方、全てのプログラムを特定したと判定した場合(S64のYES)、情報処理装置1は、S12の処理を終了する。以下、修正情報133の具体例について説明を行う。
On the other hand, when it determines with having specified all the programs (YES of S64), the
[修正情報の具体例]
図26は、修正情報133の具体例について説明する図である。
[Specific examples of correction information]
FIG. 26 is a diagram for explaining a specific example of the
図26に示す修正情報133は、メインプログラムまたはサブプログラムのプログラムIDが設定される「メインプログラムID」と、メインプログラムまたはサブプログラムのプログラム言語の識別情報が設定される「言語識別情報」とを項目として有する。また、図26に示す修正情報133は、プログラムの種別が設定される「プログラム種別」を項目として有する。「プログラム種別」には、メインプログラムを示す「メイン」、または、サブプログラムを示す「サブ」が設定される。
The
具体的に、図26に示す修正情報133において、「プログラムID」が「MainProC001」である情報には、「言語識別情報」として「1」が設定され、「プログラム種別」として「メイン」が設定されている。すなわち、図26に示す修正情報133は、プログラムIDが「MainProC001」であるメインプログラムの修正が、所定期間内に行われたことを示している。
Specifically, in the
また、図26に示す修正情報133において、「プログラムID」が「SubProC004」である情報には、「言語識別情報」として「1」が設定され、「プログラム種別」として「サブ」が設定されている。すなわち、図26に示す修正情報133は、プログラムIDが「SubProC004」であるサブプログラムの修正が、所定期間内に行われたことを示している。図26に含まれる他の情報については説明を省略する。
In addition, in the
そして、情報管理部115は、図25に示すように、情報格納領域130に記憶された修正情報133に情報が含まれるメインプログラムを特定する(S71)。具体的に、情報管理部115は、例えば、図26で説明した修正情報133を参照し、「プログラムID」に情報が設定されているメインプログラムとして、プログラムIDが「MainProC001」及び「MainProC007」であるプログラムを特定する。
Then, as illustrated in FIG. 25, the
続いて、情報管理部115は、情報格納領域130に記憶された修正情報133に情報が含まれるサブプログラムを特定する(S72)。具体的に、情報管理部115は、例えば、図26で説明した修正情報133を参照し、「プログラムID」に情報が設定されているサブプログラムとして、プログラムIDが「SubProC004」、「SubProC005」及び「SubProC010」であるプログラムを特定する。
Subsequently, the
そして、情報管理部115は、情報格納領域130に記憶された関連情報132を参照し、S72の処理で特定したサブプログラムの呼び出しを行うメインプログラムを特定する(S73)。
Then, the
具体的に、図22で説明した例では、「SubProC004」に対応する欄のうち、「MainProC003」、「MainProC004」及び「MainProC005」に対応する欄に「〇」が設定されている。また、図22で説明した例では、「SubProC005」に対応する欄のうち、「MainProC001」及び「MainProC003」に対応する欄に「〇」が設定されている。さらに、図22で説明した例では、「SubProC010」に対応する欄のうち、「MainProC008」に対応する欄に「〇」が設定されている。 Specifically, in the example described with reference to FIG. 22, “◯” is set in the columns corresponding to “MainProC003”, “MainProC004”, and “MainProC005” among the columns corresponding to “SubProC004”. In the example described with reference to FIG. 22, “◯” is set in the columns corresponding to “MainProC001” and “MainProC003” among the columns corresponding to “SubProC005”. Further, in the example described with reference to FIG. 22, “◯” is set in the column corresponding to “MainProC008” among the columns corresponding to “SubProC010”.
そのため、情報管理部115は、S73の処理において、プログラムIDが「SubProC004」、「SubProC005」または「SubProC010」であるサブプログラムの呼び出しを行うメインプログラムとして、プログラムIDが「MainProC001」、「MainProC003」、「MainProC004」、「MainProC005」及び「MainProC008」であるメインプログラムを特定する。
Therefore, in the process of S73, the
すなわち、情報管理部115は、S13の処理において、プログラムIDが「MainProC001」、「MainProC003」、「MainProC004」、「MainProC005」、「MainProC007」及び「MainProC008」であるメインプログラムを特定する。そして、情報管理部115は、この場合、プログラムIDが「MainProC001」、「MainProC003」、「MainProC004」、「MainProC005」、「MainProC007」及び「MainProC008」であるメインプログラムについてのみ、S14以降の処理を行う。
That is, in the process of S13, the
これにより、情報処理装置1は、S14以降の処理が行われるメインプログラムの数を抑制することが可能になる。そのため、情報処理装置1は、関連判定処理の実行に要する時間を短縮させることが可能になる。
As a result, the
以上の実施の形態をまとめると、以下の付記のとおりである。 The above embodiment is summarized as follows.
(付記1)
メインプログラムのソースコードから、前記メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除し、
前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行し、
前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する、
処理をコンピュータに実行させることを特徴とする関連判定プログラム。
(Appendix 1)
Deleting from the source code of the main program a declaration statement related to any one of the one or more subprograms called by the main program;
Compile the source code of the main program after the declaration statement has been deleted,
When the execution of the compilation is completed normally, information indicating that any of the subprograms is a subprogram that is not called by the main program is output.
An association determination program that causes a computer to execute processing.
(付記2)
付記1において、
前記出力する処理では、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されるサブプログラムであることを示す情報を出力する、
ことを特徴とする関連判定プログラム。
(Appendix 2)
In
In the output process, when the execution of the compilation is not completed normally, information indicating that any one of the subprograms is a subprogram called by the main program is output.
A related determination program characterized by that.
(付記3)
付記2において、
前記出力する処理では、前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要がないことを示す情報を出力し、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要があることを示す情報を出力する、
ことを特徴とする関連判定プログラム。
(Appendix 3)
In
In the output process, when the execution of the compilation is completed normally, information indicating that it is not necessary to perform a test on the main program in accordance with the correction of any of the subprograms is output. When execution is not completed normally, information indicating that it is necessary to perform a test on the main program in accordance with correction of any of the subprograms is output.
A related determination program characterized by that.
(付記4)
付記1において、さらに、
前記メインプログラムのソースコードに前記宣言文が複数含まれている場合、前記削除する処理、前記実行する処理及び前記出力する処理を前記宣言文のそれぞれについて繰り返し行う、
処理をコンピュータに実行させることを特徴とする関連判定プログラム。
(Appendix 4)
In
When a plurality of the declaration statements are included in the source code of the main program, the deletion process, the execution process, and the output process are repeatedly performed for each of the declaration statements.
An association determination program that causes a computer to execute processing.
(付記5)
付記1において、
前記メインプログラムは、所定期間内に修正が行われたプログラムである、
ことを特徴とする関連判定プログラム。
(Appendix 5)
In
The main program is a program modified within a predetermined period.
A related determination program characterized by that.
(付記6)
付記5において、
前記所定期間は、前記出力する処理が前回行われてから現在までの期間である、
ことを特徴とする関連判定プログラム。
(Appendix 6)
In Appendix 5,
The predetermined period is a period from the time when the output process was performed last time until the present time.
A related determination program characterized by that.
(付記7)
付記1において、
前記メインプログラムは、所定期間内に修正が行われたサブプログラムを呼び出すプログラムである、
ことを特徴とする関連判定プログラム。
(Appendix 7)
In
The main program is a program that calls a subprogram that has been modified within a predetermined period.
A related determination program characterized by that.
(付記8)
付記1において、
前記いずれかのサブプログラムに関する宣言文は、前記メインプログラムにおいて前記いずれかのサブプログラムが呼び出されることを示す宣言文である、
ことを特徴とする関連判定プログラム。
(Appendix 8)
In
The declaration statement related to any one of the subprograms is a declaration statement indicating that any one of the subprograms is called in the main program.
A related determination program characterized by that.
(付記9)
メインプログラムのソースコードから、前記メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除する宣言文削除部と、
前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行するコンパイル実行部と、
前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する情報出力部と、を有する、
ことを特徴とする関連判定装置。
(Appendix 9)
A declaration statement deletion unit that deletes a declaration statement related to any one of the one or more subprograms called by the main program from the source code of the main program;
A compile execution unit that compiles the source code of the main program after the declaration statement is deleted;
An information output unit that outputs information indicating that any of the subprograms is a subprogram that is not called by the main program when the execution of the compilation is completed normally;
A related determination device characterized by the above.
(付記10)
付記9において、
前記情報出力部は、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されるサブプログラムであることを示す情報を出力する、
ことを特徴とする関連判定装置。
(Appendix 10)
In Appendix 9,
The information output unit outputs information indicating that any of the subprograms is a subprogram called by the main program when the execution of the compilation is not normally completed.
A related determination device characterized by the above.
(付記11)
付記10において、
前記情報出力部は、前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要がないことを示す情報を出力し、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要があることを示す情報を出力する、
ことを特徴とする関連判定装置。
(Appendix 11)
In
The information output unit outputs information indicating that it is not necessary to perform a test on the main program in accordance with correction of any of the subprograms when the execution of the compilation is normally completed. When execution is not completed normally, information indicating that it is necessary to perform a test on the main program in accordance with correction of any of the subprograms is output.
A related determination device characterized by the above.
(付記12)
メインプログラムのソースコードから、前記メインプログラムによって呼び出される1以上のサブプログラムのうちのいずれかのサブプログラムに関する宣言文を削除し、
前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行し、
前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する、
ことを特徴とする関連判定方法。
(Appendix 12)
Deleting from the source code of the main program a declaration statement related to any one of the one or more subprograms called by the main program;
Compile the source code of the main program after the declaration statement has been deleted,
When the execution of the compilation is completed normally, information indicating that any of the subprograms is a subprogram that is not called by the main program is output.
An association determination method characterized by that.
(付記13)
付記12において、
前記出力する工程では、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されるサブプログラムであることを示す情報を出力する、
ことを特徴とする関連判定方法。
(Appendix 13)
In Appendix 12,
In the outputting step, when the execution of the compilation is not normally completed, information indicating that any one of the subprograms is a subprogram called by the main program is output.
An association determination method characterized by that.
(付記14)
付記13において、
前記出力する工程では、前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要がないことを示す情報を出力し、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要があることを示す情報を出力する、
ことを特徴とする関連判定方法。
(Appendix 14)
In Appendix 13,
In the outputting step, when the execution of the compilation is normally completed, information indicating that it is not necessary to perform a test on the main program in accordance with the correction of any of the subprograms is output, and When execution is not completed normally, information indicating that it is necessary to perform a test on the main program in accordance with correction of any of the subprograms is output.
An association determination method characterized by that.
1:情報処理装置 1a:記憶装置
1b:記憶装置 3:操作端末
1:
Claims (10)
前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行し、
前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する、
処理をコンピュータに実行させることを特徴とする関連判定プログラム。 Deleting from the source code of the main program a declaration statement related to any one of the one or more subprograms called by the main program;
Compile the source code of the main program after the declaration statement has been deleted,
When the execution of the compilation is completed normally, information indicating that any of the subprograms is a subprogram that is not called by the main program is output.
An association determination program that causes a computer to execute processing.
前記出力する処理では、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されるサブプログラムであることを示す情報を出力する、
ことを特徴とする関連判定プログラム。 In claim 1,
In the output process, when the execution of the compilation is not completed normally, information indicating that any one of the subprograms is a subprogram called by the main program is output.
A related determination program characterized by that.
前記出力する処理では、前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要がないことを示す情報を出力し、前記コンパイルの実行が正常に完了しなかった場合、前記いずれかのサブプログラムの修正に伴って前記メインプログラムについてのテストを行う必要があることを示す情報を出力する、
ことを特徴とする関連判定プログラム。 In claim 2,
In the output process, when the execution of the compilation is completed normally, information indicating that it is not necessary to perform a test on the main program in accordance with the correction of any of the subprograms is output. When execution is not completed normally, information indicating that it is necessary to perform a test on the main program in accordance with correction of any of the subprograms is output.
A related determination program characterized by that.
前記メインプログラムのソースコードに前記宣言文が複数含まれている場合、前記削除する処理、前記実行する処理及び前記出力する処理を前記宣言文のそれぞれについて繰り返し行う、
処理をコンピュータに実行させることを特徴とする関連判定プログラム。 The claim 1, further comprising:
When a plurality of the declaration statements are included in the source code of the main program, the deletion process, the execution process, and the output process are repeatedly performed for each of the declaration statements.
An association determination program that causes a computer to execute processing.
前記メインプログラムは、所定期間内に修正が行われたプログラムである、
ことを特徴とする関連判定プログラム。 In claim 1,
The main program is a program modified within a predetermined period.
A related determination program characterized by that.
前記所定期間は、前記出力する処理が前回行われてから現在までの期間である、
ことを特徴とする関連判定プログラム。 In claim 5,
The predetermined period is a period from the time when the output process was performed last time until the present time.
A related determination program characterized by that.
前記メインプログラムは、所定期間内に修正が行われたサブプログラムを呼び出すプログラムである、
ことを特徴とする関連判定プログラム。 In claim 1,
The main program is a program that calls a subprogram that has been modified within a predetermined period.
A related determination program characterized by that.
前記いずれかのサブプログラムに関する宣言文は、前記メインプログラムにおいて前記いずれかのサブプログラムが呼び出されることを示す宣言文である、
ことを特徴とする関連判定プログラム。 In claim 1,
The declaration statement related to any one of the subprograms is a declaration statement indicating that any one of the subprograms is called in the main program.
A related determination program characterized by that.
前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行するコンパイル実行部と、
前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する情報出力部と、を有する、
ことを特徴とする関連判定装置。 A declaration statement deletion unit that deletes a declaration statement related to any one of the one or more subprograms called by the main program from the source code of the main program;
A compile execution unit that compiles the source code of the main program after the declaration statement is deleted;
An information output unit that outputs information indicating that any of the subprograms is a subprogram that is not called by the main program when the execution of the compilation is completed normally;
A related determination device characterized by the above.
前記宣言文が削除された後の前記メインプログラムのソースコードのコンパイルを実行し、
前記コンパイルの実行が正常に完了した場合、前記いずれかのサブプログラムが前記メインプログラムによって呼び出されないサブプログラムであることを示す情報を出力する、
ことを特徴とする関連判定方法。 Deleting from the source code of the main program a declaration statement related to any one of the one or more subprograms called by the main program;
Compile the source code of the main program after the declaration statement has been deleted,
When the execution of the compilation is completed normally, information indicating that any of the subprograms is a subprogram that is not called by the main program is output.
An association determination method characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018028923A JP6993574B2 (en) | 2018-02-21 | 2018-02-21 | Related judgment program, related judgment device and related judgment method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018028923A JP6993574B2 (en) | 2018-02-21 | 2018-02-21 | Related judgment program, related judgment device and related judgment method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019144885A true JP2019144885A (en) | 2019-08-29 |
JP6993574B2 JP6993574B2 (en) | 2022-01-13 |
Family
ID=67772428
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018028923A Active JP6993574B2 (en) | 2018-02-21 | 2018-02-21 | Related judgment program, related judgment device and related judgment method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6993574B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02285424A (en) * | 1989-04-27 | 1990-11-22 | Nec Corp | Output system for unnecessary label and its deletion system for compiler |
JPH04253223A (en) * | 1991-01-29 | 1992-09-09 | Nec Corp | Synchronous erasing system for function reference part and definition part |
JP2005346578A (en) * | 2004-06-04 | 2005-12-15 | Ricoh Co Ltd | File extracting system and program |
JP2006252488A (en) * | 2005-03-14 | 2006-09-21 | Fujitsu Ltd | Software management system, software management method, software management program, and recording medium |
US20090172633A1 (en) * | 2005-04-22 | 2009-07-02 | Sap Ag | Methods of transforming application layer structure as objects |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4253223B2 (en) | 2003-06-26 | 2009-04-08 | 常陸森紙業株式会社 | Packaging box |
-
2018
- 2018-02-21 JP JP2018028923A patent/JP6993574B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02285424A (en) * | 1989-04-27 | 1990-11-22 | Nec Corp | Output system for unnecessary label and its deletion system for compiler |
JPH04253223A (en) * | 1991-01-29 | 1992-09-09 | Nec Corp | Synchronous erasing system for function reference part and definition part |
JP2005346578A (en) * | 2004-06-04 | 2005-12-15 | Ricoh Co Ltd | File extracting system and program |
JP2006252488A (en) * | 2005-03-14 | 2006-09-21 | Fujitsu Ltd | Software management system, software management method, software management program, and recording medium |
US20090172633A1 (en) * | 2005-04-22 | 2009-07-02 | Sap Ag | Methods of transforming application layer structure as objects |
Also Published As
Publication number | Publication date |
---|---|
JP6993574B2 (en) | 2022-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10409574B2 (en) | Incremental whole program compilation of code | |
US10261889B2 (en) | Techniques for edit-and-continue and enhanced optimized debugging on optimized code | |
US9489418B2 (en) | Processing database queries embedded in application source code from within integrated development environment tool | |
US9047337B2 (en) | Database connectivity and database model integration within integrated development environment tool | |
US9311077B2 (en) | Identification of code changes using language syntax and changeset data | |
CN107015841B (en) | Preprocessing method for program compiling and program compiling device | |
US8898649B2 (en) | Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program | |
WO2020000747A1 (en) | Anti-crawler method and terminal and computer readable storage medium | |
CN112732300A (en) | Data packet updating method and device, electronic equipment and readable storage medium | |
CN111596970B (en) | Method, device, equipment and storage medium for dynamic library delay loading | |
JP6451417B2 (en) | Debug support device, debug support system, debug support method, and debug support program | |
JP6651974B2 (en) | Information processing apparatus, compiling method and compiler program | |
JP6993574B2 (en) | Related judgment program, related judgment device and related judgment method | |
CN111796832B (en) | Hot patch file generation method, device, equipment and storage medium | |
US9710360B2 (en) | Optimizing error parsing in an integrated development environment | |
WO2023277802A2 (en) | Device and method for identifying errors in a software application | |
CN114691197A (en) | Code analysis method and device, electronic equipment and storage medium | |
JP7380851B2 (en) | Test script generation device, test script generation method and program | |
US10402304B2 (en) | Non-transitory computer-readable storage medium, correction support method and correction support device | |
JP5578625B2 (en) | Program analysis apparatus, program analysis method, and program | |
JP2005190330A (en) | Source program review assisting system | |
JP5962350B2 (en) | Program, information processing apparatus and test method | |
JP2007219893A (en) | Firmware evaluation system and firmware evaluation method | |
JP2018181121A (en) | Analyzer, analysis program, and analysis method | |
JP2024013784A (en) | Source code modification support device and source code modification support method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201102 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20210831 |
|
TRDD | Decision of grant or rejection written | ||
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211029 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20211109 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211122 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6993574 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |