JP2016071405A - Information processing device, execution device, program evaluation method, and computer program - Google Patents

Information processing device, execution device, program evaluation method, and computer program Download PDF

Info

Publication number
JP2016071405A
JP2016071405A JP2014196635A JP2014196635A JP2016071405A JP 2016071405 A JP2016071405 A JP 2016071405A JP 2014196635 A JP2014196635 A JP 2014196635A JP 2014196635 A JP2014196635 A JP 2014196635A JP 2016071405 A JP2016071405 A JP 2016071405A
Authority
JP
Japan
Prior art keywords
program
execution
resource
information
execution program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014196635A
Other languages
Japanese (ja)
Inventor
力雄 西野
Rikio Nishino
力雄 西野
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2014196635A priority Critical patent/JP2016071405A/en
Publication of JP2016071405A publication Critical patent/JP2016071405A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an information processing device which is able to detect resource leakage at the time of program evaluation and, as a countermeasure therefor, stores information that will serve as a reference when adding a process for freeing a resource.SOLUTION: The information processing device comprises a translation device 10, an execution device 20, and a recording device 30. The translation device 10 is provided with a translation unit 11 for translating a source program into an execution program, and an analysis unit 12 for searching for an instruction relating to a resource written in the source program at translation time and generating the execution program in which a process for notifying the instruction when searched is added. The execution device 20 is provided with an execution unit 21 for executing the execution program, and a monitoring unit 22, started at the time of the execution by the process added by the analysis unit, for monitoring the execution program with respect to the instruction relating to the resource and the call relation of modules constituting the execution program. The recording device 30 records the result obtained by the analysis unit and the monitoring unit.SELECTED DRAWING: Figure 1

Description

本発明は、プログラムを評価する方法に関する。   The present invention relates to a method for evaluating a program.

コンピュータにおいて動作するアプリケーションプログラムは、OS(オペレーティングシステム)が提供するリソースを必要に応じ、動的に確保して利用する。そして、アプリケーションプログラムは、確保したリソースが不要になったら、そのリソースを解放する。   An application program running on a computer dynamically secures and uses resources provided by an OS (Operating System) as necessary. Then, when the reserved resource becomes unnecessary, the application program releases the resource.

アプリケーションプログラムにおいて、リソースの解放を適切に行わないと、システム(OS)全体の動作や性能に悪影響を与える虞がある。このような「リソースリーク」と呼称される、プログラム作成時の不具合が原因のシステムトラブルの回避は、必須である。そのため、適切なタイミングでリソースの解放を実施するようにプログラムを作成することが必要である。   In the application program, if the resources are not released appropriately, the operation and performance of the entire system (OS) may be adversely affected. It is essential to avoid such a system trouble caused by a problem at the time of creating a program, which is called “resource leak”. Therefore, it is necessary to create a program so that resources are released at an appropriate timing.

しかし、ハンドル(システム全体で共通なリソース)の解放漏れに起因するシステムの障害を、開発工程において検出することは容易ではない。開発工程では、ソースコードのレビューおよびテストによる動作確認が一般的である。   However, it is not easy to detect a failure of the system due to omission of release of a handle (a resource common to the entire system) in the development process. In the development process, it is common to check the operation by reviewing and testing the source code.

ハンドル値は、プログラム開始から終了まで一意の値ではなく(解放した場合、再度同じ値となることがある)、プログラム全体で共通であること、OSが提供する異なる機能の利用であってもハンドルの解放を共通の関数(Application Programming Interface、以下においてAPIともいう)で行うことなどにより、確認作業が容易ではない。   The handle value is not a unique value from the start to the end of the program (when released, it may be the same value again), it is common to the entire program, and the handle is used even when using different functions provided by the OS. Confirmation is not easy, for example, by performing a release of a common function (Application Programming Interface, also referred to as API in the following).

また、ハンドルは、システム全体で共通なリソースであるため、システム負荷が大きい環境でないと、ハンドル値に関連した障害は発生しづらい。一般的に、開発環境ではハンドル自体の使用数が少ないため、ハンドル値が一意になる場合が多い。そのため、評価時には、プログラムが正常に動作してしまい、障害を見落としてしまうことがある。   Further, since the handle is a resource common to the entire system, a failure related to the handle value is unlikely to occur unless the system load is large. Generally, in the development environment, since the number of handles themselves is small, the handle value is often unique. Therefore, at the time of evaluation, the program may operate normally and a failure may be overlooked.

ここで、本願出願に先だって存在する関連技術としては、例えば以下の特許文献がある。   Here, as related technologies existing prior to the present application, there are, for example, the following patent documents.

特許文献1は、アプリケーションサーバにおいて、受け付けたリクエストに基づいて実行した処理の開始および終了と、オブジェクト生成および解放とをトレース情報に保存する。ユーザからの要求があれば、トレース情報を基に、メモリリークの疑いがあるオブジェクトの一覧を表示するメモリリーク検出装置を開示している。   Japanese Patent Application Laid-Open No. 2004-151561 stores, in the trace information, the start and end of processing executed based on an accepted request, and object generation and release in an application server. There is disclosed a memory leak detection apparatus that displays a list of objects that are suspected of having a memory leak based on trace information when requested by a user.

特許文献2は、関数の呼び出しを仲介し、その呼び出し処理のログをとって、対となる関数が正常に終了しているかチェックする情報処理装置を開示している。   Patent Document 2 discloses an information processing apparatus that mediates a function call, logs the call process, and checks whether the paired function is normally completed.

特許文献3は、OSが記憶したログ情報を基に、割り当てたが解放していないリソースを検出するトレースシステムを開示している。   Patent Document 3 discloses a trace system that detects resources that have been allocated but not released based on log information stored by the OS.

特開2008−134709号公報JP 2008-134709 A 特開2006−172205号公報JP 2006-172205 A 特開平10−269105号公報Japanese Patent Laid-Open No. 10-269105

特許文献1乃至3に提案されている技術は、評価対象のプログラムにおけるリソースリークを検出し、利用者に通知する。しかし、これらの技術は、通知を受けた利用者がリソースリークを回避するための作業をサポートすることについては考慮していない。   The technologies proposed in Patent Documents 1 to 3 detect a resource leak in the program to be evaluated and notify the user. However, these technologies do not take into consideration that the notified user supports the work for avoiding the resource leak.

そこで、本発明は、プログラム評価時に、リソースリークを検出可能であり、さらにその対処として、リソースを解放する処理を追加する際に参考となる情報を記憶する情報処理装置等の提供を主たる目的とする。   Accordingly, the present invention mainly provides an information processing apparatus and the like that can detect a resource leak at the time of program evaluation, and store information to be used as a reference when adding a process for releasing resources. To do.

上記の目的を達成すべく、本発明の一態様に係る情報処理装置は、以下の構成を備える。   In order to achieve the above object, an information processing apparatus according to an aspect of the present invention includes the following arrangement.

即ち、本発明の一態様に係る情報処理装置は、
原始プログラムを実行プログラムに翻訳する翻訳手段と、
前記翻訳手段により前記原始プログラムを翻訳するときに、前記原始プログラムに記述されたリソースに関する命令を検索し、検索されたときにその命令を後述する監視手段に通知する処理が追加された実行プログラムを生成させるよう、前記原始プログラムを解析する解析手段とを備える
翻訳装置と、
前記実行プログラムを実行する実行手段と、
前記実行手段が前記実行プログラムを実行するときに、前記解析手段により追加された処理によって起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視する監視手段とを備える
実行装置と、
前記解析手段によって得られた検索結果と、前記実行プログラムを実行するとき提供される前記監視手段からの情報とを記録する記録装置と
を備える。
That is, an information processing device according to one embodiment of the present invention is provided.
A translation means for translating the source program into an execution program;
When the source program is translated by the translating means, an execution program to which an instruction relating to a resource described in the source program is retrieved, and a process for notifying the instruction to the monitoring means to be described later when retrieved is added A translation device comprising analysis means for analyzing the source program so as to generate,
Execution means for executing the execution program;
When the execution unit executes the execution program, the monitoring is started by the process added by the analysis unit and monitors the execution program with respect to the instruction regarding the resource and the calling relationship of the modules constituting the execution program. An execution device comprising means;
And a recording device for recording the search result obtained by the analyzing unit and the information from the monitoring unit provided when the execution program is executed.

同目的を達成する本発明の一態様に係る実行装置は、
実行プログラムを実行する実行手段と、
前記実行手段が前記実行プログラムを実行するときに、リソースに関する命令が実行される時に起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視する監視手段とを備える。
An execution device according to an aspect of the present invention that achieves the same object is as follows.
An execution means for executing the execution program;
When the execution means executes the execution program, the monitoring means is activated when an instruction related to the resource is executed, and monitors the execution program with respect to the instruction related to the resource and the calling relationship of the modules constituting the execution program. With.

同目的を達成する本発明の一態様に係るプログラム評価方法は、
原始プログラムを実行プログラムに翻訳するときに、前記原始プログラムに記述されたリソースに関する命令を検索し、検索されたときにその命令をに通知する処理が追加された実行プログラムを生成させるよう、前記原始プログラムを解析し、
前記実行プログラムを実行するときに、追加された前記処理によって起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視して、
検索した結果と、前記実行プログラムを実行するとき提供される前記リソースに関する処理内容とを記録する。
A program evaluation method according to an aspect of the present invention that achieves the same object is as follows.
When translating a source program into an execution program, the source program is searched for an instruction related to a resource described in the source program, and an execution program to which processing for notifying the instruction when added is generated is generated. Analyze the program,
When the execution program is executed, the execution program is started by the added process, and the execution program is monitored with respect to the instruction related to the resource and the calling relationship of the modules constituting the execution program,
The search result and the processing content related to the resource provided when the execution program is executed are recorded.

更に、同目的は、上記構成を有する情報処理装置、実行装置、或いは、プログラム評価方法を、コンピュータによって実現するコンピュータ・プログラム、及びそのコンピュータ・プログラムが格納されている、コンピュータ読み取り可能な記憶媒体によっても達成される。   Further, the object is to provide an information processing apparatus, an execution apparatus, or a program evaluation method having the above-described configuration by a computer program for realizing the program by a computer, and a computer-readable storage medium storing the computer program. Is also achieved.

上記の本発明によれば、プログラム評価時に、リソースリークを検出可能であり、さらにその対処として、リソースを解放する処理を追加する際に参考となる情報を記憶することができるという効果がある。   According to the present invention described above, it is possible to detect a resource leak at the time of program evaluation. Further, as a countermeasure, it is possible to store information for reference when adding processing for releasing resources.

本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 1st Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置にてプログラム翻訳部を実行する前の原始プログラムのイメージを例示する図である。It is a figure which illustrates the image of the original program before performing a program translation part in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置にてプログラム翻訳部により処理を追加した原始プログラムのイメージを例示する図である。It is a figure which illustrates the image of the primitive program which added the process by the program translation part in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置の実行装置におけるプログラム実行時の動作イメージ説明する図である。It is a figure explaining the operation image at the time of the program execution in the execution apparatus of the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置におけるリソース監視部を説明するフローチャートである。It is a flowchart explaining the resource monitoring part in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置におけるリソース情報解析部を説明するフローチャートである。It is a flowchart explaining the resource information analysis part in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置における監視結果記録装置に記録する実行履歴情報を説明する図である。It is a figure explaining the execution history information recorded on the monitoring result recording apparatus in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置における実行プログラムの関数呼び出しフローの一例を説明する図である。It is a figure explaining an example of the function call flow of the execution program in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置における実行プログラムの関数呼び出しフローの一例を説明する図である。It is a figure explaining an example of the function call flow of the execution program in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置における実行プログラムの関数呼び出しフローの一例を説明する図である。It is a figure explaining an example of the function call flow of the execution program in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置におけるプロセスに関する情報を表示する画面の一例を示す図である。It is a figure which shows an example of the screen which displays the information regarding the process in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置におけるハンドル変数に関する情報を表示する画面の一例を示す図である。It is a figure which shows an example of the screen which displays the information regarding the handle variable in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置におけるハンドル変数に関する時系列情報を表示する画面の一例を示す図である。It is a figure which shows an example of the screen which displays the time series information regarding the handle variable in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置における関数呼び出しフローを表示する画面の一例を示す図である。It is a figure which shows an example of the screen which displays the function call flow in the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第1および第2の実施形態を実現可能なコンピュータ(情報処理装置)のハードウェア構成を例示的に説明する図である。It is a figure which illustrates illustartively the hardware constitutions of the computer (information processing apparatus) which can implement | achieve the 1st and 2nd embodiment of this invention.

次に、本発明を実施する形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

<第1の実施形態>
図1は、本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。
<First Embodiment>
FIG. 1 is a block diagram showing the configuration of the information processing apparatus according to the first embodiment of the present invention.

本実施形態に係る情報処理装置は、翻訳装置10と、実行装置20と、記録装置30とを有する。   The information processing apparatus according to the present embodiment includes a translation apparatus 10, an execution apparatus 20, and a recording apparatus 30.

翻訳装置10は、翻訳部11と、解析部12とを備える。   The translation device 10 includes a translation unit 11 and an analysis unit 12.

翻訳部11は、原始プログラムを実行プログラム(機械語)に翻訳する。   The translation unit 11 translates the original program into an execution program (machine language).

解析部12は、翻訳部11により原始プログラムを翻訳するときに、原始プログラムに記述されたリソースに関する命令を検索し、検索されたときにその命令を後述する監視部22に通知する処理が追加された実行プログラムを生成させるよう原始プログラムを解析する。   When the translation unit 11 translates the source program, the analysis unit 12 searches for a command related to the resource described in the source program, and when it is searched, processing for notifying the command to the monitoring unit 22 described later is added. Analyze the source program to generate a running program.

実行装置20は、実行部21と、監視部22とを備える。   The execution device 20 includes an execution unit 21 and a monitoring unit 22.

実行部21は、実行プログラムを実行する。   The execution unit 21 executes an execution program.

実行部21が実行プログラムを実行するときに、監視部22は、解析部12により追加された処理によって起動され、リソースに関する命令と、実行プログラムを構成するモジュールの呼び出し関係とに関して実行プログラムを監視する。   When the execution unit 21 executes the execution program, the monitoring unit 22 is activated by the process added by the analysis unit 12 and monitors the execution program regarding the instruction related to the resource and the calling relationship of the modules constituting the execution program. .

記録装置30は、解析部12および監視部22により得られた結果を記録する。すなわち、記憶装置30は、解析部12によって得られた検索結果と、実行プログラムを実行するとき提供される監視部22からの情報を記憶する。   The recording device 30 records the results obtained by the analysis unit 12 and the monitoring unit 22. That is, the storage device 30 stores the search result obtained by the analysis unit 12 and information from the monitoring unit 22 provided when the execution program is executed.

以上、説明したように、第1の実施形態には、プログラム評価時に、リソースリークを検出可能であり、さらにその対処として、リソースを解放する処理を追加する際に参考となる情報を記憶することができるという効果がある。   As described above, in the first embodiment, it is possible to detect a resource leak at the time of program evaluation, and as a countermeasure, information for reference when adding processing for releasing resources is stored. There is an effect that can be.

その理由は、本実施形態に係る情報処理装置は、プログラムの翻訳時に解析部12により処理を追加し、プログラムの実行時に追加した処理により、記録装置30にハンドルに関する情報が記録されるからである。   The reason is that the information processing apparatus according to the present embodiment adds a process by the analysis unit 12 when the program is translated, and records information on the handle in the recording apparatus 30 by the process added when the program is executed. .

<第2の実施形態>
次に上述した第1の実施形態に係る情報処理装置を基本とする第2の実施形態について説明する。図2は、本発明の第2の実施形態に係る情報処理装置の構成を示すブロック図である。ただし、図2に示す構成は、一例であって、本発明は、図2に示す情報処理装置に限定されない。
<Second Embodiment>
Next, a second embodiment based on the information processing apparatus according to the first embodiment described above will be described. FIG. 2 is a block diagram showing the configuration of the information processing apparatus according to the second embodiment of the present invention. However, the configuration shown in FIG. 2 is an example, and the present invention is not limited to the information processing apparatus shown in FIG.

本実施形態に係る情報処理装置は、翻訳装置100と、実行装置200と、監視結果記録装置300と、監視結果表示装置400とを有する。   The information processing apparatus according to the present embodiment includes a translation apparatus 100, an execution apparatus 200, a monitoring result recording apparatus 300, and a monitoring result display apparatus 400.

監視結果記録装置300は、翻訳装置100と、実行装置200とから通知された情報を記録可能なディスク等の装置である。   The monitoring result recording device 300 is a device such as a disk capable of recording information notified from the translation device 100 and the execution device 200.

監視結果表示装置400は、監視結果記録装置300に記録された情報を、例えば、画面に表示したり、紙に印刷することにより利用者に通知する装置である。   The monitoring result display device 400 is a device that notifies the user of the information recorded in the monitoring result recording device 300 by, for example, displaying it on a screen or printing it on paper.

翻訳装置100は、原始プログラム101と、プログラム翻訳部102と、実行プログラム103と、プログラム外部参照解析部104とを備える。   The translation apparatus 100 includes a source program 101, a program translation unit 102, an execution program 103, and a program external reference analysis unit 104.

原始プログラム101は、プログラミング言語(例えば、C言語、COBOL言語など)で記述されたプログラムである。   The source program 101 is a program written in a programming language (for example, C language, COBOL language, etc.).

プログラム翻訳部102は、まず、原始プログラム101に記述された、ハンドルに関する命令に処理を追加する。そして、プログラム翻訳部102は、処理を追加したプログラムを翻訳して実行プログラム103を作成する。   The program translation unit 102 first adds a process to the handle instruction described in the original program 101. And the program translation part 102 translates the program which added the process, and produces the execution program 103. FIG.

実行プログラム103は、コンピュータが実行可能な形式のプログラムである。   The execution program 103 is a program that can be executed by a computer.

プログラム外部参照解析部104は、実行プログラム103が参照しているハンドルの操作に関する命令群を検索する。そして、プログラム外部参照解析部104は、ハンドルの操作に関する命令群が含まれる場合に、そのハンドルを解放する命令が実行プログラム103に含まれているかを判定する。そして、プログラム外部参照解析部104は、判定した結果を監視結果記録装置300に記録する。   The program external reference analysis unit 104 searches for an instruction group related to the operation of the handle referred to by the execution program 103. The program external reference analysis unit 104 determines whether an instruction for releasing the handle is included in the execution program 103 when a command group related to the handle operation is included. Then, the program external reference analysis unit 104 records the determined result in the monitoring result recording device 300.

実行装置200は、プログラム実行部201と、リソース監視部202と、モジュール間参照解析部203と、リソース情報解析部204とを備える。   The execution apparatus 200 includes a program execution unit 201, a resource monitoring unit 202, an inter-module reference analysis unit 203, and a resource information analysis unit 204.

プログラム実行部201は、翻訳装置100により作成された実行プログラム103を実行する。ここで、実行プログラム103は、処理A〜処理Xを含み、各々の処理にハンドルに関する命令を含むとする。   The program execution unit 201 executes the execution program 103 created by the translation apparatus 100. Here, it is assumed that the execution program 103 includes processes A to X, and each process includes an instruction related to a handle.

実行プログラム103を実行すると、ハンドルに関する命令を実行する度に、プログラム翻訳部102が追加した処理によりハンドルに関する情報がリソース監視部202に通知される。通知を受け取ったリソース監視部202は、通知された内容を監視結果記録装置300に記録する。実行プログラム103の処理の特性や、評価内容により、リソース監視部202は、実行プログラム103と同期で動作しても良いし、非同期で動作しても良い。   When the execution program 103 is executed, each time an instruction related to a handle is executed, information related to the handle is notified to the resource monitoring unit 202 by a process added by the program translation unit 102. The resource monitoring unit 202 that has received the notification records the notified content in the monitoring result recording device 300. Depending on the processing characteristics of the execution program 103 and the evaluation contents, the resource monitoring unit 202 may operate synchronously with the execution program 103 or may operate asynchronously.

それから、リソース監視部202は、モジュール間参照解析部203により、リソース監視部202へ通知した関数モジュールの実行プログラム103におけるモジュール間参照情報を解析する。解析した結果を、モジュール間参照解析部203は、監視結果記録装置300に記録する。   Then, the resource monitoring unit 202 analyzes the inter-module reference information in the function module execution program 103 notified to the resource monitoring unit 202 by the inter-module reference analysis unit 203. The inter-module reference analysis unit 203 records the analysis result in the monitoring result recording device 300.

また、リソース監視部202は、実行プログラム103により通知された内容に問題がないかをリソース情報解析部204により解析する。解析した結果を、リソース情報解析部204は、監視結果記録装置300に記録する。   Further, the resource monitoring unit 202 causes the resource information analysis unit 204 to analyze whether there is a problem with the content notified by the execution program 103. The resource information analysis unit 204 records the analysis result in the monitoring result recording apparatus 300.

以下に、本実施形態の処理について、詳細に説明する。   Below, the process of this embodiment is demonstrated in detail.

初めに、プログラム翻訳部102は、翻訳対象である原始プログラム101に対して、ハンドルに関する命令群を検索して、通知処理を追加する。ハンドルに関する命令群は、例えば、ハンドル操作を実施する命令群およびハンドルの複製命令群である。プログラム翻訳部102は、処理を追加したプログラムを翻訳して、実行プログラム103を作成する。   First, the program translation unit 102 searches the instruction program related to the handle for the source program 101 to be translated, and adds notification processing. The instruction group related to the handle is, for example, an instruction group for performing a handle operation and a handle duplication instruction group. The program translation unit 102 translates the program to which the process has been added, and creates an execution program 103.

図3Aは、本発明の第2の実施形態に係る情報処理装置にてプログラム翻訳部を実行する前の原始プログラムのイメージを例示する図である。図3Bは、本発明の第2の実施形態に係る情報処理装置にてプログラム翻訳部により処理を追加した原始プログラムのイメージを例示する図である。ここで、図3Bに示す原始プログラムは、図3Aに示す原始プログラムに対して、プログラム翻訳部102により、処理を追加したプログラムイメージである。   FIG. 3A is a diagram illustrating an image of a source program before executing a program translation unit in the information processing apparatus according to the second embodiment of the present invention. FIG. 3B is a diagram illustrating an image of a source program in which processing is added by the program translation unit in the information processing apparatus according to the second embodiment of the present invention. Here, the source program shown in FIG. 3B is a program image in which processing is added to the source program shown in FIG. 3A by the program translation unit 102.

プログラム翻訳部102は、図3Aに示す原始プログラムに対して、ハンドル操作を実施する命令群(APIまたはシステムコール等と呼称される関数群)を検索する。命令群が見つかった場合、プログラム翻訳部102は、その命令群に、ハンドル操作の内容を通知する処理を追加する。図3Aにおいて、ハンドル操作を実施する命令は、open命令と、read命令と、write命令と、close命令である。翻訳装置2は、それらの各々の命令に、ハンドル操作の内容をリソース監視部202に通知する処理を追加する。また、プログラム翻訳部102は、原始プログラムに対して、ハンドルの複製命令群(代入文)にもその内容を通知する処理を追加する。それらの処理を追加したプログラムのイメージは、図3Bである。図3Bにおいて、下線を引いた箇所は、プログラム翻訳部102により追加された処理である。   The program translation unit 102 searches for a command group (function group called API or system call) for performing a handle operation on the source program shown in FIG. 3A. When an instruction group is found, the program translation unit 102 adds processing for notifying the contents of the handle operation to the instruction group. In FIG. 3A, the instructions for performing the handle operation are an open instruction, a read instruction, a write instruction, and a close instruction. The translation device 2 adds processing for notifying the resource monitoring unit 202 of the contents of the handle operation to each of these commands. In addition, the program translation unit 102 adds a process of notifying the contents to the copy instruction group (assignment statement) of the handle to the original program. The image of the program to which these processes are added is FIG. 3B. In FIG. 3B, the underlined portion is a process added by the program translation unit 102.

プログラム翻訳部102は、図3Bに示すような処理を追加したプログラムを翻訳して、実行プログラム103を作成する。   The program translation unit 102 creates an execution program 103 by translating a program to which processing as shown in FIG. 3B is added.

実行プログラム103の作成が完了すると、プログラム外部参照解析部104は、実行プログラム103に対して、ハンドル操作を実施する命令群(関数群)の検索を行う。そして、プログラム外部参照解析部104は、検索した結果を基に、ハンドルの解放に関する命令が原始プログラム101に存在していたかを判定する。プログラム外部参照解析部104は、判定した結果を検索した結果と共に、監視結果記録装置300に記録する。   When the creation of the execution program 103 is completed, the program external reference analysis unit 104 searches the execution program 103 for an instruction group (function group) for performing a handle operation. Then, the program external reference analysis unit 104 determines whether an instruction relating to the release of the handle exists in the source program 101 based on the retrieved result. The program external reference analysis unit 104 records the determined result in the monitoring result recording apparatus 300 together with the search result.

ハンドルを解放する命令(例えば、close命令など)がない場合、プログラム外部参照解析部104は、ハンドルがリークする可能性があると判定する。プログラム外部参照解析部104は、判定した結果を監視結果記録装置300に記録する。そして、監視結果表示装置400は、例えば、原始プログラム群101を翻訳した結果と共に、監視結果記録装置300に記録した情報を、利用者に通知することが可能である。   When there is no instruction for releasing the handle (for example, a close instruction), the program external reference analysis unit 104 determines that the handle may leak. The program external reference analysis unit 104 records the determined result in the monitoring result recording device 300. And the monitoring result display apparatus 400 can notify a user of the information recorded on the monitoring result recording apparatus 300 with the result of having translated the original program group 101, for example.

図4は、本発明の第2の実施形態に係る情報処理装置の実行装置200におけるプログラム実行時の動作イメージ説明する図である。   FIG. 4 is a diagram for explaining an operation image at the time of executing a program in the execution device 200 of the information processing apparatus according to the second embodiment of the present invention.

プログラム実行部201において実行プログラム103が実行されると、プログラム翻訳部102が追加した処理により、ハンドルを操作する命令を実施するごとに、リソース監視部202は、通知を受ける。図3Bに示すように、通知を受ける対象となる事象は、ハンドルの取得と、解放と、参照と、複製である。本実施形態では、open、close、read、write、及びハンドルの代入が該当する。   When the execution program 103 is executed in the program execution unit 201, the resource monitoring unit 202 receives a notification every time a command for operating the handle is executed by the process added by the program translation unit 102. As shown in FIG. 3B, the events to be notified are handle acquisition, release, reference, and replication. In this embodiment, open, close, read, write, and handle substitution are applicable.

図5は、本発明の第2の実施形態に係る情報処理装置におけるリソース監視部を説明するフローチャートである。   FIG. 5 is a flowchart illustrating the resource monitoring unit in the information processing apparatus according to the second embodiment of the present invention.

リソース監視部202は、ハンドルを操作する命令の通知を受け取ると、監視結果記録装置300に上述の事象を通知する(ステップS510)。監視結果記録装置300は、通知された事象の種別(open、close、read、write、ハンドルの代入)と、ハンドル値とを関連付けて、記録する。   Upon receiving the notification of the command for operating the handle, the resource monitoring unit 202 notifies the monitoring result recording apparatus 300 of the above-described event (step S510). The monitoring result recording device 300 records the notified event type (open, close, read, write, handle substitution) and the handle value in association with each other.

次に、リソース監視部202は、モジュール間参照解析部203に上述の事象を通知する(ステップS520)。モジュール間参照解析部203は、リソース監視部202から通知を受け取ると、リソース監視部202への通知元である関数モジュールの実行プログラム103における呼び出し関係を解析し、監視結果記録装置300に通知する。例えば、図2に示す処理A〜処理Xは、実際には1つ以上の関数モジュールを組み合わせて構成している。例えば、C言語の場合、main関数を入口とする各機能を関数モジュールに分割して実装する、いわゆるモジュールプログラミングでプログラムを実現するのが一般的である。モジュール間参照解析部203は、main関数から実際にハンドルを操作する命令を内包する関数モジュールまでの参照関係を解析する。モジュール間の参照を解析する方法は、一般的に知られた既存の方法を用いるものとして、ここでの説明を省略する。監視結果記録装置300は、通知されたモジュール間の参照情報を、記録済みの事象の種別(open、close、read、write、ハンドルの代入)と、ハンドル値とに関連付けて、記録する。   Next, the resource monitoring unit 202 notifies the above-described event to the inter-module reference analysis unit 203 (step S520). When receiving the notification from the resource monitoring unit 202, the inter-module reference analysis unit 203 analyzes the calling relationship in the execution program 103 of the function module that is the notification source to the resource monitoring unit 202 and notifies the monitoring result recording apparatus 300 of it. For example, the processes A to X shown in FIG. 2 are actually configured by combining one or more function modules. For example, in the case of C language, a program is generally realized by so-called module programming in which each function having a main function as an entrance is divided into function modules and implemented. The inter-module reference analysis unit 203 analyzes the reference relationship from the main function to the function module containing the instruction that actually operates the handle. The method for analyzing the reference between modules uses a generally known existing method, and a description thereof is omitted here. The monitoring result recording apparatus 300 records the notified reference information between modules in association with the type of recorded event (open, close, read, write, handle substitution) and the handle value.

次に、リソース監視部202は、通知された事象の種別がハンドル値を参照する事象か判定する(ステップS530)。ハンドル値を参照する事象(ここでは、close、read、write)の場合(ステップS530で「Yes」)、リソース情報解析部204に通知する(ステップS540)。   Next, the resource monitoring unit 202 determines whether the notified event type refers to a handle value (step S530). If the event refers to a handle value (here, close, read, write) (“Yes” in step S530), the resource information analysis unit 204 is notified (step S540).

図6は、本発明の第2の実施形態に係る情報処理装置におけるリソース情報解析部を説明するフローチャートである。図7は、本発明の第2の実施形態に係る情報処理装置における監視結果記録装置に記録する実行履歴情報を説明する図である。実行履歴情報は、時刻と、プロセスおよびスレッドと、種別と、モジュール間参照情報と、ハンドル値と、変数情報(ハンドル値を代入した変数に関する情報)とが関連付けて、格納されている情報である。図7において、種別は、openの場合に「取得」、closeの場合に「解放」、readとwriteの場合に「参照」、ハンドルの代入の場合に「設定」と設定されている。   FIG. 6 is a flowchart illustrating the resource information analysis unit in the information processing apparatus according to the second embodiment of the present invention. FIG. 7 is a diagram for explaining execution history information recorded in the monitoring result recording device in the information processing apparatus according to the second embodiment of the present invention. The execution history information is information stored in association with time, process and thread, type, inter-module reference information, handle value, and variable information (information on a variable to which the handle value is assigned). . In FIG. 7, the type is set as “acquisition” for open, “release” for close, “reference” for read and write, and “set” for handle substitution.

リソース情報解析部204は、リソース監視部202から通知を受け取ると、監視結果記録装置300から現在有効なハンドルの情報を取得して、通知されたハンドルが操作可能な状況か解析を行う(ステップS610)。リソース情報解析部204は、通知されたハンドル値が不正な値(例えば、「NULL」など)や、解放済みのハンドルである場合に、不正なハンドル値であることを監視結果記録装置300に通知する(ステップS620)。   Upon receiving the notification from the resource monitoring unit 202, the resource information analysis unit 204 acquires information on the currently valid handle from the monitoring result recording device 300, and analyzes whether the notified handle is operable (step S610). ). The resource information analysis unit 204 notifies the monitoring result recording apparatus 300 that the received handle value is an incorrect value (for example, “NULL” or the like) or a released handle. (Step S620).

リソース情報解析部204は、ハンドルの代入によりハンドル値を格納する変数の一覧を監視結果記録装置300より取得する(ステップS630)。そして、解放済みのハンドル値が変数に残っているなどの変数の値が不正な(ステップS640で「No」)場合に、リソース情報解析部204は、その旨を監視結果記録装置300に通知する(ステップS650)。   The resource information analysis unit 204 acquires a list of variables storing handle values from the monitoring result recording apparatus 300 by assigning handles (step S630). If the value of the variable is invalid (“No” in step S640), such as the released handle value remains in the variable, the resource information analysis unit 204 notifies the monitoring result recording apparatus 300 to that effect. (Step S650).

リソース情報解析部204は、さらに、モジュール間参照情報を用いて、不正なハンドル値による参照がないかを確認する(ステップS660)。すなわち、リソース情報解析部204は、監視結果記録装置300からモジュール間参照情報を取得する。次に、リソース情報解析部204は、取得した情報と、現在のハンドル値とハンドルを参照する命令の実行箇所を突き合わせて、ハンドル値を参照している関数モジュールの妥当性をチェックする。リソース情報解析部204は、監視結果記録装置300に記録された実行履歴情報から、ハンドル値が同一のもので履歴を絞り込み、図8に示すように、一連のモジュール間参照を、「モジュールa」を起点とするグループとして、グループ化する。図8は、本発明の第2の実施形態に係る情報処理装置における実行プログラムの関数呼び出しフローの一例を説明する図である。リソース情報解析部204は、現在使用中のハンドルについて同様の情報を取得する。そして、リソース情報解析部204は、取得した情報と、監視結果記録装置300に記録された、過去の実行履歴情報を基にしたグループ化したモジュール間参照情報(関数呼び出しフロー)とを比較することにより、類似性を求める。リソース情報解析部204は、求めた類似性により、ハンドルの参照に問題がないかを判断する。過去の実行履歴情報として、評価フェーズにおいて、プログラムを繰り返し実行するときに、多数回発生した、モジュール間参情報を監視結果記録装置300に蓄積しておくことが可能である。そして、ハンドルの参照に問題がある(ステップS660で「No」)と判断した場合に、リソース情報解析部204は、ハンドル値と共に、その旨を監視結果記録装置300に通知する(ステップS670)。   The resource information analysis unit 204 further checks whether there is a reference with an incorrect handle value using the inter-module reference information (step S660). That is, the resource information analysis unit 204 acquires inter-module reference information from the monitoring result recording device 300. Next, the resource information analysis unit 204 checks the validity of the function module that refers to the handle value by matching the acquired information with the current handle value and the execution location of the instruction that refers to the handle. The resource information analysis unit 204 narrows down the history with the same handle value from the execution history information recorded in the monitoring result recording device 300, and, as shown in FIG. Group as a starting point. FIG. 8 is a diagram for explaining an example of a function call flow of an execution program in the information processing apparatus according to the second embodiment of the present invention. The resource information analysis unit 204 acquires similar information regarding the handle currently in use. Then, the resource information analysis unit 204 compares the acquired information with the inter-module reference information (function call flow) grouped based on the past execution history information recorded in the monitoring result recording device 300. To find the similarity. The resource information analysis unit 204 determines whether there is a problem with reference to the handle based on the obtained similarity. As past execution history information, it is possible to store module participation information generated many times in the monitoring result recording apparatus 300 when the program is repeatedly executed in the evaluation phase. If it is determined that there is a problem with reference to the handle (“No” in step S660), the resource information analysis unit 204 notifies the monitoring result recording apparatus 300 of this together with the handle value (step S670).

図9Aおよび図9Bは、本発明の第2の実施形態に係る情報処理装置における実行プログラムの関数呼び出しフローの一例を説明する図である。   9A and 9B are diagrams illustrating an example of a function call flow of an execution program in the information processing apparatus according to the second embodiment of the present invention.

監視結果記録装置300に、図8に示した関数呼び出しフロー(グループ化したモジュール間参照情報)が記録されている状態で、評価を実施する場合を例に説明する。   An example will be described in which the evaluation is performed in a state where the function call flow (grouped inter-module reference information) illustrated in FIG. 8 is recorded in the monitoring result recording apparatus 300.

プログラムの実行により得られた情報を基に、図9Aに示す関数呼び出しが得られた場合、リソース情報解析部204は、図8と図9Aとを比較して、現時点までのハンドルの参照に関して、類似性があると判定する。このとき、リソース情報解析部204は、不正なハンドル使用ではないと判断する。   When the function call shown in FIG. 9A is obtained based on the information obtained by executing the program, the resource information analysis unit 204 compares FIG. 8 with FIG. It is determined that there is similarity. At this time, the resource information analysis unit 204 determines that the handle is not illegally used.

プログラムの実行により得られた情報を基に、図9Bに示す関数呼び出しが得られた場合、リソース情報解析部204は、図8と図9Bとを比較して、現時点までのハンドルの参照に関して、類似性がないと判定する。このとき、リソース情報解析部204は、不正なハンドル使用確認対象と判断し、監視結果記録装置300に判定結果を通知する。   When the function call shown in FIG. 9B is obtained based on the information obtained by executing the program, the resource information analysis unit 204 compares FIG. 8 with FIG. It is determined that there is no similarity. At this time, the resource information analysis unit 204 determines that it is an unauthorized handle use confirmation target, and notifies the monitoring result recording apparatus 300 of the determination result.

次に、監視結果記録装置300に記録された情報を基に、監視結果表示装置400に表示する例について説明する。   Next, an example of displaying on the monitoring result display device 400 based on the information recorded in the monitoring result recording device 300 will be described.

図10は、本発明の第2の実施形態に係る情報処理装置におけるプロセスに関する情報を表示する画面の一例を示す図である。図10によれば、監視結果記録装置300に記録された情報を基に、プロセスに関する情報が時系列に表示されている。例えば、監視結果表示装置400は、不正なハンドル使用確認対象を検出した場合に、利用者に通知する。図10において、監視結果表示装置400は、「不正」欄と、「エラーレポート」欄を用いて、不正なハンドル使用確認対象であることを通知する。監視結果表示装置400は、不正なハンドル使用確認対象を検出した場合に、利用者に通知すると共に、プログラムの実行を中断するか、プログラムの実行を継続するかを、利用者が選択することを可能としてもよい。また、監視結果表示装置400は、プログラム毎、通知情報毎に、中断または継続の設定を可能とする機能を提供してもよい。   FIG. 10 is a diagram illustrating an example of a screen that displays information about a process in the information processing apparatus according to the second embodiment of the present invention. According to FIG. 10, based on the information recorded in the monitoring result recording apparatus 300, information regarding the process is displayed in time series. For example, the monitoring result display device 400 notifies the user when an unauthorized handle use confirmation target is detected. In FIG. 10, the monitoring result display device 400 uses the “illegal” column and the “error report” column to notify that it is an unauthorized handle usage confirmation target. When the monitoring result display device 400 detects an illegal handle use confirmation target, the monitoring result display device 400 notifies the user and also allows the user to select whether to interrupt the program execution or continue the program execution. It may be possible. Further, the monitoring result display device 400 may provide a function that enables setting of interruption or continuation for each program and for each notification information.

図11は、本発明の第2の実施形態に係る情報処理装置におけるハンドル変数に関する情報を表示する画面の一例を示す図である。図11によれば、監視結果表示装置400は、フローと共に監視結果記録装置300に記録された、不正ハンドル値の判定で参照したモジュール間参照情報と、その記録の範囲で参照されたハンドル変数とその内容と、定義場所とをリストで表示する。この図11に示した画面により、利用者は、ハンドル値と、ハンドル値を使用した関数モジュールおよびハンドル値を管理していた変数を一緒に確認することが可能である。これにより、利用者は、原始プログラム101からプログラム修正に必要となる調査対象を素早く絞り込むことができる。これにより、修正に必要な時間および工数が改善され、品質の早期確保と生産性の向上が期待できる。   FIG. 11 is a diagram illustrating an example of a screen that displays information on handle variables in the information processing apparatus according to the second embodiment of the present invention. According to FIG. 11, the monitoring result display device 400 is recorded in the monitoring result recording device 300 together with the flow, the inter-module reference information referred in the determination of the illegal handle value, and the handle variable referred to in the recording range. The contents and the definition location are displayed in a list. The screen shown in FIG. 11 allows the user to confirm together the handle value, the function module that uses the handle value, and the variable that managed the handle value. As a result, the user can quickly narrow down the investigation targets necessary for program correction from the original program 101. As a result, the time and man-hours required for correction are improved, and it is expected that quality can be secured early and productivity can be improved.

図12は、本発明の第2の実施形態に係る情報処理装置におけるハンドル変数に関する時系列情報を表示する画面の一例を示す図である。図12によれば、監視結果表示装置400は、監視結果記録装置300に記録された、グループ化したモジュール間参照情報とハンドル値の内容を時系列で参照することができる。すなわち、ハンドル値の確認および関数モジュールと処理の動作検証を、監視結果表示装置400でプログラム実行の中断を指示した場合、またはプログラム終了後に実施できる。利用者は、図12に示した画面により、プログラム動作時のハンドル値の割り当ての状況(同じハンドル値が解放した後、再度割り当てられている等)を可視化して確認することができる。   FIG. 12 is a diagram illustrating an example of a screen that displays time-series information regarding a handle variable in the information processing apparatus according to the second embodiment of the present invention. According to FIG. 12, the monitoring result display device 400 can refer to the grouped inter-module reference information and the contents of the handle values recorded in the monitoring result recording device 300 in time series. That is, the confirmation of the handle value and the operation verification of the function module and the process can be performed when the monitoring result display device 400 instructs the interruption of the program execution or after the program ends. The user can visualize and confirm the status of handle value assignment during program operation (eg, the same handle value is reassigned after being released) on the screen shown in FIG.

図13は、本発明の第2の実施形態に係る情報処理装置における関数呼び出しフローを表示する画面の一例を示す図である。図3に示すように、監視結果表示装置400は、監視結果記録装置300に記録された、グループ化したモジュール間参照情報を表示する。利用者は、図13に示した画面により、監視結果表示装置400でプログラム実行の中断を指示した場合、ハンドルを使用中の各処理が正しいハンドル値で処理を実行しているか確認できる。また、プログラム終了後の場合、時系列順で同様にモジュール間参照のグループ化した複数の処理のハンドル値の状態を再現でき、利用者は、同様に正しいハンドル値で処理を実行しているか確認できる。例えば、同一のハンドル値が解放後に即取得されるようなハンドルが不足しているような場合でも、不正なハンドル値が使用されているか判断が容易となる。また、例えば、長時間動作するアプリケーションにおいて、ハンドル値を設定した変数の初期化ミスが原因であるような、長い時間を経過した後で発生する、不正なハンドルの使用を検出することも容易となる。   FIG. 13 is a diagram illustrating an example of a screen displaying a function call flow in the information processing apparatus according to the second embodiment of the present invention. As shown in FIG. 3, the monitoring result display device 400 displays the grouped inter-module reference information recorded in the monitoring result recording device 300. The user can confirm whether or not each process using the handle is executing a process with a correct handle value when the monitoring result display apparatus 400 instructs the interruption of the program execution on the screen shown in FIG. Also, after the end of the program, the status of the handle values of multiple processes grouped together in the same way in time series order can be reproduced, and the user confirms whether the process is also executed with the correct handle values. it can. For example, even when there are not enough handles that can be acquired immediately after the same handle value is released, it is easy to determine whether an invalid handle value is used. In addition, for example, in an application that operates for a long time, it is also easy to detect an illegal use of a handle that occurs after a long period of time, which is caused by a mistake in initialization of a variable for which a handle value is set. Become.

このように、プログラムに実装することなく、プログラムの実行時にハンドルの利用状況(確保、参照、解放)に関する情報を入手することが可能となり、開発作業で時間を占めるハンドルに関係する作業を大幅に軽減でき、かつプログラム品質を確保できる。また、実行時に収集した情報は、監視結果記録装置300に記憶されるため、プログラムの実行後であっても、その内容の確認をすることが可能になる。   In this way, it is possible to obtain information on the handle usage status (secure, reference, release) during program execution without implementing it in the program, greatly increasing the work related to handles that occupy time in development work. It can be reduced and program quality can be secured. Further, since the information collected at the time of execution is stored in the monitoring result recording apparatus 300, the contents can be confirmed even after the program is executed.

以上、説明したように、第2の実施形態には、プログラム評価時に、リソースリークを検出可能であり、さらにその対処として、リソースを解放する処理を追加する際に参考となる情報を記憶することができるという効果がある。さらに、本実施形態は、監視結果記録装置300に記憶した情報を、監視結果表示装置400に表示することにより、不正な使用が疑われ、確認対象とすべきリソース(ハンドル)を利用者に通知することができる。   As described above, in the second embodiment, resource leak can be detected at the time of program evaluation, and as a countermeasure, information to be used as a reference when adding processing for releasing resources is stored. There is an effect that can be. Furthermore, in this embodiment, by displaying the information stored in the monitoring result recording device 300 on the monitoring result display device 400, unauthorized use is suspected, and the resource (handle) to be confirmed is notified to the user. can do.

その理由は、本実施形態に係る情報処理装置は、プログラムの翻訳時に処理を追加し、プログラムの実行時に追加した処理により、監視結果記録装置300にハンドルに関する情報が記録されるからである。   The reason is that the information processing apparatus according to the present embodiment adds a process at the time of program translation and records information on the handle in the monitoring result recording apparatus 300 by the process added at the time of execution of the program.

(ハードウェア構成)
上述した実施形態において図1および図2に示した各部は、専用の装置によって実践してもよいが、ソフトウェアプログラムの機能(処理)単位(ソフトウェアモジュール)と捉えることができる。但し、これらの図面に示した各部の実装に際しては、様々な構成が想定され得る。このような場合のハードウェア環境の一例を、図14を参照して説明する。
(Hardware configuration)
In the embodiment described above, each unit illustrated in FIGS. 1 and 2 may be practiced by a dedicated device, but can be regarded as a function (processing) unit (software module) of a software program. However, various configurations can be envisaged when mounting each part shown in these drawings. An example of the hardware environment in such a case will be described with reference to FIG.

図14は、本発明の第1および第2の実施形態を実現可能なコンピュータ(情報処理装置)のハードウェア構成を例示的に説明する図である。即ち、図14は、図1に示した翻訳装置10と実行装置20、図2に示した翻訳装置100と実行装置200の全体または一部を実現可能なコンピュータ(情報処理装置)の構成であって、上述した実施形態における各機能を実現可能なハードウェア環境を表す。   FIG. 14 is a diagram for exemplifying the hardware configuration of a computer (information processing apparatus) capable of realizing the first and second embodiments of the present invention. 14 is a configuration of a computer (information processing apparatus) capable of realizing all or part of the translation apparatus 10 and the execution apparatus 20 shown in FIG. 1 and the translation apparatus 100 and the execution apparatus 200 shown in FIG. The hardware environment capable of realizing each function in the above-described embodiment is represented.

図14に示した情報処理装置9000は、CPU(Central Processing Unit)9001、ディスプレイ9002、通信インタフェース(I/F)9003、ROM(Read Only Memory)9004、RAM(Random Access Memory)9005、ハードディスク装置(HD)9006を備え、これらがバス9007を介して接続された構成を有する。ハードディスク装置(HD)9006には、プログラム群9006Aと、各種の記憶情報9006Bとが格納されている。プログラム群9006Aは、例えば、上述した図1および図2に示した翻訳装置10、実行装置20、翻訳装置100および実行装置200の各ブロック(各部)に対応する機能を実現するためのコンピュータ・プログラムである。各種の記憶情報9006Bは、例えば、図1に示した記録装置30と、図2に示した監視結果記録装置300である。通信インタフェース9003は、ネットワーク9100を介して外部装置と通信を実現する一般的な通信手段である。   14 includes a CPU (Central Processing Unit) 9001, a display 9002, a communication interface (I / F) 9003, a ROM (Read Only Memory) 9004, a RAM (Random Access Memory) 9005, and a hard disk device ( HD) 9006, and these are connected via a bus 9007. The hard disk device (HD) 9006 stores a program group 9006A and various kinds of stored information 9006B. The program group 9006A is, for example, a computer program for realizing a function corresponding to each block (each unit) of the translation device 10, the execution device 20, the translation device 100, and the execution device 200 shown in FIG. 1 and FIG. It is. The various storage information 9006B is, for example, the recording device 30 illustrated in FIG. 1 and the monitoring result recording device 300 illustrated in FIG. A communication interface 9003 is a general communication unit that realizes communication with an external device via the network 9100.

そして、情報処理装置9000は、前述の実施形態の説明において参照したブロック図、あるいは、フローチャートの機能を実現可能なコンピュータ・プログラムを、当該ハードウェアのCPU9001が実行する。すなわち、CPU9001は、コンピュータ・プログラムを、図14に示す情報処理装置9000のハードウェア資源を用いて実行することによって本発明の機能が達成される。具体的には、実行装置200を、情報処理装置9000によって実現する場合、情報処理装置9000は、図5および図6に示すフローチャートの処理ステップを実行するためのコンピュータ・プログラムをCPU9001が実行すればよい。また、情報処理装置9000内に供給されたコンピュータ・プログラムは、読み書き可能な一時記憶メモリ(9005)またはハードディスク装置9006等の不揮発性の記憶デバイス(記憶媒体)に格納すればよい。   In the information processing apparatus 9000, the CPU 9001 of the hardware executes a computer program capable of realizing the functions of the block diagram or the flowchart referred to in the description of the above-described embodiment. That is, the CPU 9001 executes the computer program using the hardware resources of the information processing apparatus 9000 shown in FIG. 14 to achieve the functions of the present invention. Specifically, when the execution device 200 is realized by the information processing device 9000, the information processing device 9000 may execute the computer program for executing the processing steps of the flowcharts shown in FIGS. 5 and 6 when the CPU 9001 executes the computer program. Good. The computer program supplied to the information processing device 9000 may be stored in a readable / writable temporary storage memory (9005) or a non-volatile storage device (storage medium) such as the hard disk device 9006.

また、前記の場合において、当該装置内へのコンピュータ・プログラムの供給方法は、CD−ROM等の各種記憶媒体を介して当該装置内にインストールする方法や、インターネット等の通信回線9100を介して外部からダウンロードする方法等のように、現在では一般的な手順を採用することができる。そして、このような場合において、本発明は、係るコンピュータ・プログラムを構成するコード或いは、そのコードが記録されたところの、コンピュータ読み取り可能な記憶媒体によって構成されると捉えることができる。   In the above case, the computer program can be supplied to the apparatus by a method of installing it in the apparatus via various storage media such as a CD-ROM or by an external communication line 9100 such as the Internet. A general procedure can be adopted at present, such as a method of downloading from the Internet. In such a case, the present invention can be understood to be constituted by a code constituting the computer program or a computer-readable storage medium in which the code is recorded.

10 翻訳装置
11 翻訳部
12 解析部
20 実行装置
21 実行部
22 監視部
30 記録装置
100 翻訳装置
101 原始プログラム
102 プログラム翻訳部
103 実行プログラム
104 プログラム外部参照解析部
200 実行装置
201 実行部
202 リソース監視部
203 モジュール間参照解析部
204 リソース情報解析部
300 監視結果記録装置
400 監視結果表示装置
9000 情報処理装置(コンピュータ)
9001 CPU
9002 ディスプレイ
9003 通信インタフェース(I/F)
9004 ROM
9005 RAM
9006 ハードディスク装置(HD)
9006A プログラム群
9006B 各種の記憶情報
9007 バス
9100 ネットワーク
DESCRIPTION OF SYMBOLS 10 Translation apparatus 11 Translation part 12 Analysis part 20 Execution apparatus 21 Execution part 22 Monitoring part 30 Recording apparatus 100 Translation apparatus 101 Original program 102 Program translation part 103 Execution program 104 Program external reference analysis part 200 Execution apparatus 201 Execution part 202 Resource monitoring part 203 Inter-module reference analysis unit 204 Resource information analysis unit 300 Monitoring result recording device 400 Monitoring result display device 9000 Information processing device (computer)
9001 CPU
9002 Display 9003 Communication interface (I / F)
9004 ROM
9005 RAM
9006 Hard disk device (HD)
9006A Program group 9006B Various stored information 9007 Bus 9100 Network

Claims (8)

原始プログラムを実行プログラムに翻訳する翻訳手段と、
前記翻訳手段により前記原始プログラムを翻訳するときに、前記原始プログラムに記述されたリソースに関する命令を検索し、検索されたときにその命令を後述する監視手段に通知する処理が追加された実行プログラムを生成させるよう、前記原始プログラムを解析する解析手段とを備える
翻訳装置と、
前記実行プログラムを実行する実行手段と、
前記実行手段が前記実行プログラムを実行するときに、前記解析手段により追加された処理によって起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視する監視手段とを備える
実行装置と、
前記解析手段によって得られた検索結果と、前記実行プログラムを実行するとき提供される前記監視手段からの情報とを記録する記録装置と
を備える
情報処理装置。
A translation means for translating the source program into an execution program;
When the source program is translated by the translating means, an execution program to which an instruction relating to a resource described in the source program is retrieved, and a process for notifying the instruction to the monitoring means to be described later when retrieved is added A translation device comprising analysis means for analyzing the source program so as to generate,
Execution means for executing the execution program;
When the execution unit executes the execution program, the monitoring is started by the process added by the analysis unit and monitors the execution program with respect to the instruction regarding the resource and the calling relationship of the modules constituting the execution program. An execution device comprising means;
An information processing apparatus comprising: a recording device that records a search result obtained by the analysis unit and information from the monitoring unit provided when the execution program is executed.
前記監視手段は、
前記実行プログラムより通知された前記命令に含まれる前記リソースに関する情報を前記記録装置に記録するリソース監視手段と、
前記実行プログラムにおけるモジュール間の参照関係を解析するモジュール間参照解析手段と、
前記実行プログラムより通知された前記リソースに関する情報が前記実行プログラムの実行開始からの前記リソースに関する処理において問題がないか解析するリソース情報解析手段とを備える
ことを特徴とする請求項1記載の情報処理装置。
The monitoring means includes
Resource monitoring means for recording information on the resource included in the instruction notified from the execution program in the recording device;
Inter-module reference analysis means for analyzing a reference relationship between modules in the execution program;
2. The information processing according to claim 1, further comprising: resource information analysis means for analyzing whether there is a problem in the information regarding the resource notified from the execution program in the processing regarding the resource from the start of execution of the execution program. apparatus.
前記モジュール間参照解析手段は、
前記参照関係の解析によってモジュール間参照情報を生成し、前記モジュール間参照情報を前記記録装置に記録する
ことを特徴とする請求項2記載の情報処理装置。
The inter-module reference analysis means is
The information processing apparatus according to claim 2, wherein inter-module reference information is generated by analyzing the reference relationship, and the inter-module reference information is recorded in the recording apparatus.
前記リソース情報解析手段は、
前記リソースに関する情報に問題があるときに、その旨を前記記録装置に記録する
ことを特徴とする請求項2記載の情報処理装置。
The resource information analysis means includes
3. The information processing apparatus according to claim 2, wherein when there is a problem with the information about the resource, the fact is recorded in the recording apparatus.
実行プログラムを実行する実行手段と、
前記実行手段が前記実行プログラムを実行するときに、リソースに関する命令が実行される時に起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視する監視手段とを備える
実行装置。
An execution means for executing the execution program;
When the execution means executes the execution program, the monitoring means is activated when an instruction related to the resource is executed, and monitors the execution program with respect to the instruction related to the resource and the calling relationship of the modules constituting the execution program. An execution device comprising:
原始プログラムを実行プログラムに翻訳するときに、前記原始プログラムに記述されたリソースに関する命令を検索し、検索されたときにその命令をに通知する処理が追加された実行プログラムを生成させるよう、前記原始プログラムを解析し、
前記実行プログラムを実行するときに、追加された前記処理によって起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視して、
検索した結果と、前記実行プログラムを実行するとき提供される前記リソースに関する処理内容とを記録する
プログラム評価方法。
When translating a source program into an execution program, the source program is searched for an instruction related to a resource described in the source program, and an execution program to which processing for notifying the instruction when added is generated is generated. Analyze the program,
When the execution program is executed, the execution program is started by the added process, and the execution program is monitored with respect to the instruction related to the resource and the calling relationship of the modules constituting the execution program,
A program evaluation method for recording a search result and a processing content related to the resource provided when the execution program is executed.
原始プログラムを実行プログラムに翻訳する翻訳機能と、
前記翻訳機能により前記原始プログラムを翻訳するときに、前記原始プログラムに記述されたリソースに関する命令を検索し、検索されたときにその命令を通知する処理が追加された実行プログラムを生成させるよう、前記原始プログラムを解析する解析機能と
を、コンピュータに実現させる
コンピュータ・プログラム。
A translation function that translates the source program into an executable program;
When the source program is translated by the translation function, an instruction related to a resource described in the source program is searched, and an execution program to which processing for notifying the instruction when the search is added is generated. A computer program that causes a computer to perform an analysis function that analyzes a source program.
コンピュータで実行可能な形式の実行プログラムを実行する実行機能と、
前記実行機能が前記実行プログラムを実行するときに、前記実行プログラムにリソースに関する命令実行箇所に組み込まれた前記リソースに関する処理内容を通知する命令により起動され、前記リソースに関する命令と、前記実行プログラムを構成するモジュールの呼び出し関係とに関して前記実行プログラムを監視する監視機能と
を、コンピュータに実現させる
コンピュータ・プログラム。
An execution function for executing an executable program in a computer executable format;
When the execution function executes the execution program, the execution function is activated by an instruction for notifying the execution program of processing contents related to the resource incorporated in an instruction execution location related to the resource, and configures the execution program A computer program for causing a computer to realize a monitoring function for monitoring the execution program with respect to a calling relationship of modules to be executed.
JP2014196635A 2014-09-26 2014-09-26 Information processing device, execution device, program evaluation method, and computer program Pending JP2016071405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014196635A JP2016071405A (en) 2014-09-26 2014-09-26 Information processing device, execution device, program evaluation method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014196635A JP2016071405A (en) 2014-09-26 2014-09-26 Information processing device, execution device, program evaluation method, and computer program

Publications (1)

Publication Number Publication Date
JP2016071405A true JP2016071405A (en) 2016-05-09

Family

ID=55867016

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014196635A Pending JP2016071405A (en) 2014-09-26 2014-09-26 Information processing device, execution device, program evaluation method, and computer program

Country Status (1)

Country Link
JP (1) JP2016071405A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272512A (en) * 1998-03-20 1999-10-08 Fujitsu Ltd Memory management device and recording medium
JP2009217617A (en) * 2008-03-11 2009-09-24 Hitachi Ltd Method and device for identifying memory leak place
JP2010277421A (en) * 2009-05-29 2010-12-09 Internatl Business Mach Corp <Ibm> Method of ascertaining occurrence cause of memory consumption in program, and computer system and computer program for the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272512A (en) * 1998-03-20 1999-10-08 Fujitsu Ltd Memory management device and recording medium
JP2009217617A (en) * 2008-03-11 2009-09-24 Hitachi Ltd Method and device for identifying memory leak place
JP2010277421A (en) * 2009-05-29 2010-12-09 Internatl Business Mach Corp <Ibm> Method of ascertaining occurrence cause of memory consumption in program, and computer system and computer program for the same

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
宮谷 伸一郎: "「NTマイブームテクニック フリーウェア実践編 付属ツールじゃ何もできない」", WINDOWS NT PRESS #4, JPN6018016366, 10 December 1998 (1998-12-10), JP, pages 100 - 107, ISSN: 0003914611 *
山口 哲弘: "「BoundsChecker:開発ツールの環境では見つけにくい問題を検出」", 日経バイト 特別増刊号, JPN6018016362, 8 November 1998 (1998-11-08), JP, pages 180 - 181, ISSN: 0003914612 *
飯山 教史: "「開発者必読!"もしも"のときのデバッグ技法」", ウィンドウズデベロッパーマガジン 2006年2月号, JPN6018016363, 1 February 2006 (2006-02-01), JP, pages 152 - 156, ISSN: 0003792500 *

Similar Documents

Publication Publication Date Title
US9465725B2 (en) Software defect reporting
KR102268355B1 (en) Cloud deployment infrastructure validation engine
US20150074648A1 (en) Software defect verification
KR101748833B1 (en) Software failure locating method, apparatus and equipment
US9037913B2 (en) Dynamic event generation for user interface control
JPWO2009104268A1 (en) Patch candidate selection device, patch candidate selection program, and patch candidate selection method
US20150293898A1 (en) Method and apparatus for word detection in application program
KR20200080541A (en) Apparatus and method for detecting vulnerability of software
JP2015011372A (en) Debug support system, method, program, and recording medium
CA2811617C (en) Commit sensitive tests
JP2010134643A (en) Test case selection method and selection system
CN112445686A (en) Memory leak detection method, device and computer-readable storage medium
US20150199255A1 (en) Recording external processes
US20160112285A1 (en) Apparatus and method for detecting abnormal connection
JP6238221B2 (en) Apparatus, method and program for monitoring execution of software
JP4896909B2 (en) Scenario generation apparatus and program
JP2008123195A (en) Failure prevention device and program
JP2010134705A (en) Apparatus, log recording control method, and program
JP4911074B2 (en) Failure cause analysis support apparatus and method
US20120272103A1 (en) Software operability service
JP2016071405A (en) Information processing device, execution device, program evaluation method, and computer program
JP2008182650A (en) Image forming apparatus and program
JP5525658B2 (en) Computer, resource usage calculation method, and resource usage calculation program
US8789039B2 (en) Method and system of installing a program on a first computer, and duplicating the installation on a second computer
JP2012256279A (en) Information processing device, method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180515

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20181106