JP7102883B2 - Application program, function program module - Google Patents

Application program, function program module Download PDF

Info

Publication number
JP7102883B2
JP7102883B2 JP2018073507A JP2018073507A JP7102883B2 JP 7102883 B2 JP7102883 B2 JP 7102883B2 JP 2018073507 A JP2018073507 A JP 2018073507A JP 2018073507 A JP2018073507 A JP 2018073507A JP 7102883 B2 JP7102883 B2 JP 7102883B2
Authority
JP
Japan
Prior art keywords
program module
information
argument
backup memory
functional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018073507A
Other languages
Japanese (ja)
Other versions
JP2019185276A (en
Inventor
奈々 石田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2018073507A priority Critical patent/JP7102883B2/en
Publication of JP2019185276A publication Critical patent/JP2019185276A/en
Application granted granted Critical
Publication of JP7102883B2 publication Critical patent/JP7102883B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、コンピュータ上で動作するアプリケーションプログラム、およびアプリケーションプログラムによって起動されて、アプリケーションプログラムが動作するために必要な機能を提供する機能プログラムモジュールに関する。 The present invention relates to an application program that runs on a computer and a functional program module that is started by the application program and provides functions necessary for the application program to run.

コンピュータを用いて目的とする処理を行うためには、アプリケーションプログラムが必要となる。このアプリケーションプログラムの開発は、従来は個々の会社が単独で行っていたが、近年の高機能化や複雑化に伴って、複数の会社で分担して行われるようになっている。例えば、開発しようとするアプリケーションプログラムを、主に機能の観点から複数の小さなプログラム単位(本明細書中では「機能プログラムモジュール」と称する)に分割して、それら複数の機能プログラムモジュールを複数の会社が分担して開発する。そして、できあがった複数の機能プログラムモジュールが提供する機能を組み合わせることによって、1つのアプリケーションプログラムを開発するようになっている。 An application program is required to perform the desired processing using a computer. In the past, the development of this application program was carried out independently by each company, but with the recent increase in functionality and complexity, it has been shared by multiple companies. For example, an application program to be developed is divided into a plurality of small program units (referred to as "functional program modules" in the present specification) mainly from the viewpoint of functions, and the plurality of functional program modules are divided into a plurality of companies. Will share the development. Then, one application program is developed by combining the functions provided by the plurality of completed functional program modules.

このようにして開発されたアプリケーションプログラムでは、複数の機能プログラムモジュールが、予め定められた順序で次々と起動して機能を実現することによって、目的とする処理が実現される。また、このようにして動作する関係上、複数の機能プログラムモジュールの中で、プログラム上のミス(いわゆるバグ)を含んだ機能プログラムモジュールが1つでも存在すると、アプリケーションプログラムの処理が正常に終了しなくなる。 In the application program developed in this way, the target processing is realized by starting a plurality of functional program modules one after another in a predetermined order to realize the functions. In addition, because of the operation in this way, if even one functional program module containing a program error (so-called bug) exists among the plurality of functional program modules, the processing of the application program ends normally. It disappears.

そこで、いわゆるウォッチドッグタイマと呼ばれる監視用のプログラムモジュールを用いて、機能プログラムモジュールによる動作の実行時間を監視しておき、実行時間が異常に長くなった場合には、不具合が発生したものと判断して、アプリケーションプログラムをソフトウェアで強制的に初期化することが行われている。また、不具合の原因を容易に特定可能とするために、不具合が発生する時点で動作していた機能プログラムモジュール(すなわち、バグのあると思われる機能プログラムモジュール)、および機能プログラムモジュールの動作内容を記憶しておく技術が提案されている(特許文献1)。 Therefore, a monitoring program module called a watchdog timer is used to monitor the execution time of the operation by the functional program module, and if the execution time becomes abnormally long, it is determined that a problem has occurred. Then, the application program is forcibly initialized by software. In addition, in order to make it easy to identify the cause of the bug, the function program module that was operating at the time the problem occurred (that is, the function program module that seems to have a bug) and the operation content of the function program module are described. A technique for storing has been proposed (Patent Document 1).

特開2006-011991号公報Japanese Unexamined Patent Publication No. 2006-011991

しかし、ウォッチドッグタイマによって強制的な初期化が発生した時に、その時の動作していた機能プログラムモジュールおよび動作内容を幾ら調べてみても不具合の原因を見つけることができない場合があり、その結果、アプリの開発が進まなくなってしまうことがあるという問題があった。 However, when the watchdog timer causes a forced initialization, it may not be possible to find the cause of the problem no matter how much you check the function program module and operation contents that were operating at that time, and as a result, the application. There was a problem that the development of the device might get stuck.

この発明は、従来技術における上述した課題を解決するためになされたものであり、複数の機能プログラムモジュールを組み合わせて目的の処理を実行するアプリで、ウォッチドッグタイマによる強制的な初期化が発生した原因を容易に特定することが可能な技術の提供を目的とする。 The present invention has been made to solve the above-mentioned problems in the prior art, and a watchdog timer forcibly initializes an application that executes a target process by combining a plurality of functional program modules. The purpose is to provide a technique that can easily identify the cause.

上述した問題を解決するために本発明のアプリケーションプログラム、および機能プログラムモジュールでは、機能プログラムモジュールが起動したことを示す起動情報と、機能プログラムモジュールが動作を終了したことを示す終了情報とを、アプリケーションプログラムが初期化されても記憶内容が消去されないバックアップメモリに時系列で記憶する。また、起動に際して引数を受け取っていた場合には、引数もバックアップメモリに記憶する。更に、起動情報や引数や終了情報をバックアップメモリに記憶する際に、他の機能プログラムモジュールについての起動情報や引数や終了情報がバックアップメモリに記憶されていた場合には、他の機能プログラムモジュールの起動情報や引数や終了情報に続けて、起動情報や引数や終了情報を記憶する。加えて、バックアップメモリに記憶された起動情報や引数や終了情報のデータ量が所定の上限量を超えた場合には、古い起動情報や引数や終了情報から順番に、新しい起動情報や引数や終了情報を上書きする。
こうすれば、機能プログラムモジュールの実行時間が所定の上限時間に達したために、監視プログラムモジュールによって初期化された場合でも、バックアップメモリを調べれば、その機能プログラムモジュールが正常に起動されたか否かを知ることができる。そして、正常に起動されていなかった場合は、初期化の発生時に動作していた機能プログラムモジュールに原因があるわけではないと判断することができるので、初期化が発生した原因を容易に特定することが可能となる。
In order to solve the above-mentioned problems, in the application program and the functional program module of the present invention, the application indicates that the functional program module has started and the termination information indicating that the functional program module has finished its operation. The stored contents are not erased even if the program is initialized. It is stored in the backup memory in chronological order. If an argument has been received at startup, the argument is also stored in the backup memory. Furthermore, when the startup information, arguments, and termination information are stored in the backup memory, if the startup information, arguments, and termination information for other functional program modules are stored in the backup memory, the other functional program modules After the start information, arguments, and end information , the start information, arguments, and end information are stored. In addition, when the amount of data of start information, arguments, and end information stored in the backup memory exceeds a predetermined upper limit, new start information, arguments, and end are started in order from the old start information, arguments, and end information. Overwrite the information.
In this way, even if the execution time of the functional program module reaches a predetermined upper limit and is initialized by the monitoring program module, the backup memory can be checked to see if the functional program module has been started normally. You can know. Then, if it is not started normally, it can be determined that the cause is not the functional program module that was operating when the initialization occurred, so the cause of the initialization can be easily identified. It becomes possible.

本実施例のアプリケーションプログラム1の大まかな内部構造を示したブロック図である。It is a block diagram which showed the rough internal structure of the application program 1 of this Example. メインプログラムモジュール10mが複数の機能プログラムモジュール10を所定の順序で起動することによって、目的の処理を実行する様子を概念的に示した説明図である。It is explanatory drawing which conceptually showed how the main program module 10m executes a target process by activating a plurality of functional program modules 10 in a predetermined order. 監視プログラムモジュール10wが機能プログラムモジュール10の実行時間を監視して、メインプログラムモジュール10mを初期化する様子を示す説明図である。It is explanatory drawing which shows a mode that the monitoring program module 10w monitors the execution time of the function program module 10 and initializes the main program module 10m. 本実施例の機能プログラムモジュール10の大まかな内部構造を示すブロック図である。It is a block diagram which shows the rough internal structure of the functional program module 10 of this embodiment. 本実施例の機能プログラムモジュール10がデータを書き込むバックアップメモリ21の内部構造を示した説明図である。It is explanatory drawing which showed the internal structure of the backup memory 21 which the function program module 10 of this Example writes data. 本実施例の機能プログラムモジュール10が実行する機能提供処理のフローチャートである。It is a flowchart of the function providing processing executed by the function program module 10 of this embodiment. 本実施例の機能プログラムモジュール10がバックアップメモリ21の動作履歴保存領域21aにデータを書き込む様子を概念的に示した説明図である。It is explanatory drawing which conceptually showed how the functional program module 10 of this Example writes data to the operation history storage area 21a of a backup memory 21. 本実施例のアプリケーションプログラム1では、監視プログラムモジュール10wによって強制的に初期化された場合でも、その原因を容易に特定可能な理由を示した説明図である。In the application program 1 of the present embodiment, it is an explanatory diagram showing the reason why the cause can be easily identified even when the monitoring program module 10w forcibly initializes the application program 1.

以下では、上述した本発明の内容を明確にするために、本発明の実施例について説明する。
A.装置構成 :
A-1.アプリケーションプログラム1の動作概要 :
図1には、本実施例のアプリケーションプログラム1の大まかな内部構造が示されている。図示されるように、アプリケーションプログラム1は、メインプログラムモジュール10mと、複数の機能プログラムモジュール10a~10dと、監視プログラムモジュール10wとを備えている。
機能プログラムモジュール10a~10dはコンピュータ上で動作する小さなプログラムであり、それぞれ所定の基本的な機能を実現する。メインプログラムモジュール10mは、複数の機能プログラムモジュール10a~10dを所定の順序で起動させることによって、アプリケーションプログラム1が目的とする処理(以下、目的処理と称することがある)を実行する。また、メインプログラムモジュール10mや機能プログラムモジュール10a~10dは、メモリ20から必要なデータを読み込んだり、あるいはメモリ20にデータを書き込んだりすることによって動作する。
尚、以下では、個々の機能プログラムモジュール10a~10dを区別する必要がない場合は、単に機能プログラムモジュール10と称することがあるものとする。また、本実施例のアプリケーションプログラム1は、4つの機能プログラムモジュール10を備えるものとしているが、もっと多数の機能プログラムモジュール10を備えていても良い。
Hereinafter, examples of the present invention will be described in order to clarify the contents of the present invention described above.
A. Device configuration :
A-1. Operation outline of application program 1:
FIG. 1 shows a rough internal structure of the application program 1 of this embodiment. As shown in the figure, the application program 1 includes a main program module 10m, a plurality of functional program modules 10a to 10d, and a monitoring program module 10w.
The functional program modules 10a to 10d are small programs that run on a computer, and each realizes a predetermined basic function. The main program module 10m executes a process intended by the application program 1 (hereinafter, may be referred to as a target process) by starting a plurality of functional program modules 10a to 10d in a predetermined order. Further, the main program module 10m and the functional program modules 10a to 10d operate by reading necessary data from the memory 20 or writing data to the memory 20.
In the following, when it is not necessary to distinguish the individual functional program modules 10a to 10d, they may be simply referred to as the functional program module 10. Further, although the application program 1 of this embodiment includes four function program modules 10, a larger number of function program modules 10 may be provided.

監視プログラムモジュール10wは、いわゆるウォッチドッグタイマであり、メインプログラムモジュール10mによって起動されると計時を開始して、所定の上限時間が経過すると、メインプログラムモジュール10mを強制的に初期化する。メインプログラムモジュール10mおよび機能プログラムモジュール10が正常に動作している場合は、監視プログラムモジュール10wの計時時間が上限時間に達する前に、メインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化する。このため、動作中のメインプログラムモジュール10mが、監視プログラムモジュール10wによって初期化されてしまうことはない。 The monitoring program module 10w is a so-called watchdog timer, which starts timing when it is started by the main program module 10m, and forcibly initializes the main program module 10m when a predetermined upper limit time elapses. When the main program module 10m and the function program module 10 are operating normally, the main program module 10m initializes the time counting time of the monitoring program module 10w before the time measuring time of the monitoring program module 10w reaches the upper limit time. .. Therefore, the operating main program module 10m is not initialized by the monitoring program module 10w.

図2には、メインプログラムモジュール10mが、複数の機能プログラムモジュール10a~10dを所定の順序で起動することによって、目的の処理を実行する様子が示されている。図示した例では、メインプログラムモジュール10mは、先ず初めに機能プログラムモジュール10aを起動させる。また、初めの機能プログラムモジュール10(ここでは機能プログラムモジュール10a)を起動させる際には、監視プログラムモジュール10wも起動させる。図2中に示した実線の矢印は、メインプログラムモジュール10mが機能プログラムモジュール10や監視プログラムモジュール10wを起動させていることを概念的に表している。また、監視プログラムモジュール10wは起動されると計時を開始する。 FIG. 2 shows how the main program module 10m executes a target process by activating a plurality of functional program modules 10a to 10d in a predetermined order. In the illustrated example, the main program module 10m first activates the functional program module 10a. Further, when the first functional program module 10 (here, the functional program module 10a) is activated, the monitoring program module 10w is also activated. The solid arrow shown in FIG. 2 conceptually indicates that the main program module 10m is activating the functional program module 10 and the monitoring program module 10w. Further, the monitoring program module 10w starts timing when it is started.

機能プログラムモジュール10aは、メインプログラムモジュール10mによって起動されると、予め定められた処理を実行することによって、機能プログラムモジュール10aに固有の基本的な機能をメインプログラムモジュール10mに提供する。図2中に破線で示した矢印は、機能プログラムモジュール10が基本的な機能をメインプログラムモジュール10mに提供していることを表している。また、機能プログラムモジュール10が処理を実行するために、変数値や、処理内容を指定する数値などの引数が必要な場合は、起動時にメインプログラムモジュール10mから取得する。 When the functional program module 10a is started by the main program module 10m, the functional program module 10a provides the main program module 10m with basic functions unique to the functional program module 10a by executing a predetermined process. The arrow indicated by the broken line in FIG. 2 indicates that the functional program module 10 provides the basic function to the main program module 10 m. Further, when an argument such as a variable value or a numerical value for specifying the processing content is required for the functional program module 10 to execute the processing, it is acquired from the main program module 10m at the time of startup.

機能プログラムモジュール10aが所定の処理を実行して、機能を提供する動作を終了すると、メインプログラムモジュール10mは自らのプログラムに従って、今度は機能プログラムモジュール10bを起動すると共に、監視プログラムモジュール10wの計時時間を初期化する。図中に示した一点鎖線の矢印は、メインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化していることを示している。
また、監視プログラムモジュール10wが計時する上限時間は、機能プログラムモジュール10aが機能を提供するために要する時間と、その結果を受けてメインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化するまでに要する時間との合計時間よりも、十分に長い時間に設定されている。このため、メインプログラムモジュール10mは、監視プログラムモジュール10wの計時時間が上限時間になる前に、監視プログラムモジュール10wの計時時間を初期化することができる。
When the function program module 10a executes a predetermined process and finishes the operation of providing the function, the main program module 10m starts the function program module 10b this time according to its own program, and the time counting time of the monitoring program module 10w. To initialize. The arrow of the alternate long and short dash line shown in the figure indicates that the main program module 10m initializes the time counting time of the monitoring program module 10w.
The upper limit of the time measured by the monitoring program module 10w is the time required for the function program module 10a to provide the function and the time required by the main program module 10m to initialize the time measured by the monitoring program module 10w in response to the result. The time is set sufficiently longer than the total time required for the program. Therefore, the main program module 10m can initialize the time counting time of the monitoring program module 10w before the time measuring time of the monitoring program module 10w reaches the upper limit time.

機能プログラムモジュール10bも起動されると、予め定められた処理を実行することによって、機能プログラムモジュール10bに固有の基本的な機能をメインプログラムモジュール10mに提供する。すると、メインプログラムモジュール10mは、今度は機能プログラムモジュール10cを起動すると共に、監視プログラムモジュール10wの計時時間を初期化する。
ここで、機能プログラムモジュール10bが機能を提供するために要する時間と、機能プログラムモジュール10aが機能を提供するために要する時間とは必ずしも同じではない。同様に、機能プログラムモジュール10bから機能を提供されたメインプログラムモジュール10mが機能プログラムモジュール10cを起動するまでに要する時間と、機能プログラムモジュール10aから機能を提供されたメインプログラムモジュール10mが機能プログラムモジュール10bを起動するまでに要する時間とも、必ずしも同じではない。
When the functional program module 10b is also started, the main program module 10m is provided with basic functions unique to the functional program module 10b by executing a predetermined process. Then, the main program module 10m starts the functional program module 10c this time, and initializes the time counting time of the monitoring program module 10w.
Here, the time required for the functional program module 10b to provide the function and the time required for the functional program module 10a to provide the function are not necessarily the same. Similarly, the time required for the main program module 10m provided with the function from the function program module 10b to start the function program module 10c, and the main program module 10m provided with the function from the function program module 10a are the function program module 10b. It is not always the same as the time it takes to start.

しかしそれでも、機能プログラムモジュール10bが機能を提供するために要する時間と、その結果を受けてメインプログラムモジュール10mが機能プログラムモジュール10cを起動するまでに要する時間(従って、監視プログラムモジュール10wの計時時間を初期化するまでに要する時間)とを合計した時間は、監視プログラムモジュール10wが計時する上限時間よりも十分に短い時間となっている。このため、メインプログラムモジュール10mは、監視プログラムモジュール10wの計時時間が上限時間になる前に、監視プログラムモジュール10wの計時時間を初期化することができる。 However, even so, the time required for the functional program module 10b to provide the function and the time required for the main program module 10m to start the functional program module 10c in response to the result (therefore, the time counting time of the monitoring program module 10w is determined. The total time (time required for initialization) is sufficiently shorter than the upper limit time measured by the monitoring program module 10w. Therefore, the main program module 10m can initialize the time counting time of the monitoring program module 10w before the time measuring time of the monitoring program module 10w reaches the upper limit time.

以下、同様に、メインプログラムモジュール10mは、自らのプログラムに従って、機能プログラムモジュール10a、機能プログラムモジュール10d、機能プログラムモジュール10cと順番に機能プログラムモジュール10を起動すると共に、監視プログラムモジュール10wの計時時間を初期化する。メインプログラムモジュール10mは、こうして、予め定められた順序で複数の機能プログラムモジュール10を起動することによって、目的とする処理を実行する。また、メインプログラムモジュール10mや、機能プログラムモジュール10が正常に動作していれば、監視プログラムモジュール10wの計時時間が上限時間に達する前に、計時時間が初期化されるので、監視プログラムモジュール10wによってメインプログラムモジュール10mが初期化されることはない。
ところが、メインプログラムモジュール10mあるいは機能プログラムモジュール10が、何らかの理由で正常に動作しなくなると、監視プログラムモジュール10wの計時時間を初期化することができなくなって、メインプログラムモジュール10mが初期化されてしまう。
Hereinafter, similarly, the main program module 10m starts the functional program module 10 in this order in the order of the functional program module 10a, the functional program module 10d, and the functional program module 10c according to its own program, and sets the time counting time of the monitoring program module 10w. initialize. The main program module 10m executes the target process by activating the plurality of functional program modules 10 in a predetermined order in this way. Further, if the main program module 10m and the function program module 10 are operating normally, the time counting time of the monitoring program module 10w is initialized before the upper limit time is reached, so that the monitoring program module 10w initializes the time measuring time. The main program module 10m is never initialized.
However, if the main program module 10m or the functional program module 10 does not operate normally for some reason, the time counting time of the monitoring program module 10w cannot be initialized, and the main program module 10m is initialized. ..

図3には、監視プログラムモジュール10wがメインプログラムモジュール10mを初期化する様子が概念的に示されている。図3に示した例でも、図2の場合と同様に、メインプログラムモジュール10mは、先ず初めに機能プログラムモジュール10aおよび監視プログラムモジュール10wを起動させ、その後は、監視プログラムモジュール10wの計時時間を初期化しながら、予め定められた順序に従って、複数の機能プログラムモジュール10を起動させていく。
ところが、図3に示した例では、機能プログラムモジュール10dで異常が発生して動作が終了しなくなっている。その結果、メインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化できないまま、計時時間が上限時間に達して、監視プログラムモジュール10wによって初期化され、機能プログラムモジュール10dの動作も強制的に中止される。
このように、メインプログラムモジュール10mあるいは機能プログラムモジュール10の動作で異常が生じた場合には、メインプログラムモジュール10mが監視プログラムモジュール10wによって初期化される。このため、メインプログラムモジュール10mあるいは機能プログラムモジュール10が暴走する事態を回避することができる。
FIG. 3 conceptually shows how the monitoring program module 10w initializes the main program module 10m. In the example shown in FIG. 3, as in the case of FIG. 2, the main program module 10m first starts the functional program module 10a and the monitoring program module 10w, and then initializes the time counting time of the monitoring program module 10w. The plurality of functional program modules 10 are started in a predetermined order.
However, in the example shown in FIG. 3, an abnormality has occurred in the functional program module 10d and the operation has not ended. As a result, the time counting time reaches the upper limit time without being able to initialize the time counting time of the monitoring program module 10w by the main program module 10m, is initialized by the monitoring program module 10w, and the operation of the functional program module 10d is forcibly stopped. Will be done.
In this way, when an abnormality occurs in the operation of the main program module 10m or the function program module 10, the main program module 10m is initialized by the monitoring program module 10w. Therefore, it is possible to avoid a situation in which the main program module 10 m or the functional program module 10 goes out of control.

また、監視プログラムモジュール10wは、メインプログラムモジュール10mを初期化するに先立って、その時点で動作していた機能プログラムモジュール10と、その機能プログラムモジュール10の動作内容とを、バックアップメモリ21(図1参照)に保存する。バックアップメモリ21は、メモリ20とは異なって、メインプログラムモジュール10mが初期化されても記憶されている内容が消去されることはない。このため、監視プログラムモジュール10wによる初期化が発生した場合には、バックアップメモリ21に記憶されている内容を読み出すことによって、初期化の原因になった機能プログラムモジュール10を特定したり、あるいは動作内容からバグの位置を特定したりすることができる。 Further, in the monitoring program module 10w, prior to initializing the main program module 10m, the function program module 10 that was operating at that time and the operation contents of the function program module 10 are stored in the backup memory 21 (FIG. 1). See). Unlike the memory 20, the backup memory 21 does not erase the stored contents even if the main program module 10m is initialized. Therefore, when initialization by the monitoring program module 10w occurs, the function program module 10 that caused the initialization can be identified by reading the contents stored in the backup memory 21, or the operation contents. You can locate the bug from.

ところが、監視プログラムモジュール10wによる初期化が発生した後に、バックアップメモリ21に記憶されている内容を読み出して、その時に動作していた機能プログラムモジュール10を詳しく調べて見ても、バグを見つけることが出来ない場合があった。このような事態が生じると、初期化が発生した理由を特定できないので、アプリケーションプログラム1の開発が遅延してしまう。
そこで、本実施例の機能プログラムモジュール10は、次のような内部構造を採用することとした。
However, even if the contents stored in the backup memory 21 are read after the initialization by the monitoring program module 10w occurs and the functional program module 10 operating at that time is examined in detail, a bug can be found. Sometimes I couldn't. When such a situation occurs, the reason why the initialization occurred cannot be specified, so that the development of the application program 1 is delayed.
Therefore, the functional program module 10 of this embodiment has the following internal structure.

A-2.機能プログラムモジュール10の内部構造 :
図4には、本実施例のアプリケーションプログラム1に組み込まれた機能プログラムモジュール10の内部構造が示されている。図示されるように、本実施例の機能プログラムモジュール10は、起動要求検知部11と、機能提供部12と、起動情報出力部13と、終了情報出力部14とを備えている。
尚、これらの「部」は、監視プログラムモジュール10wによってメインプログラムモジュール10mが初期化された原因を容易に特定可能とするために、機能プログラムモジュール10が備える機能に着目して、機能プログラムモジュール10のプログラムコードを便宜的に分類した抽象的な概念である。従って、1つのプログラムコードが複数の「部」に分類されている場合もあるし、何れの「部」にも分類されないプログラムコードが存在していても構わない。
A-2. Internal structure of functional program module 10:
FIG. 4 shows the internal structure of the functional program module 10 incorporated in the application program 1 of this embodiment. As shown in the figure, the functional program module 10 of this embodiment includes an activation request detection unit 11, a function providing unit 12, an activation information output unit 13, and an end information output unit 14.
In addition, in order to make it possible to easily identify the cause of the initialization of the main program module 10m by the monitoring program module 10w, these "parts" pay attention to the functions provided in the functional program module 10 and the functional program module 10 It is an abstract concept that classifies the program code of. Therefore, one program code may be classified into a plurality of "parts", and there may be a program code that is not classified into any of the "parts".

起動要求検知部11は、メインプログラムモジュール10mから起動を要求されたことを検知すると、機能提供部12を起動する。
機能提供部12は、起動するとコンピュータ上で所定の動作を実行することによって、メインプログラムモジュール10mに対して所定の機能を提供する。また、機能提供部12が動作するに際して、変数値が必要であったり、動作条件の指定が必要であったりする場合は、それら変数値あるいは条件を指定する値などを示す引数を、起動要求検知部11がメインプログラムモジュール10mから取得して機能提供部12に供給する。
When the activation request detection unit 11 detects that the main program module 10m has requested activation, the activation request detection unit 11 activates the function providing unit 12.
The function providing unit 12 provides a predetermined function to the main program module 10m by executing a predetermined operation on the computer when activated. Further, when the function providing unit 12 operates, when a variable value is required or an operating condition needs to be specified, an argument indicating the variable value or the value for specifying the condition is detected as an activation request. The unit 11 acquires from the main program module 10 m and supplies it to the function providing unit 12.

機能提供部12は、起動すると、起動したことを示す起動情報を、起動情報出力部13に出力する。また、起動に際して起動要求検知部11から引数が供給されている場合には、引数も起動情報出力部13に出力する。
起動情報出力部13は、起動に際して機能提供部12から受け取った起動情報(および存在する場合には引数)を、バックアップメモリ21に出力する。
When the function providing unit 12 starts, it outputs start information indicating that it has started to the start information output unit 13. If an argument is supplied from the activation request detection unit 11 at the time of activation, the argument is also output to the activation information output unit 13.
The start-up information output unit 13 outputs start-up information (and an argument if it exists) received from the function providing unit 12 at the time of start-up to the backup memory 21.

また、機能提供部12は、起動するとメモリ20からデータを読み出したり、読み出したデータに対して所定の処理を実行したり、得られたデータをメモリ20に記憶したりする動作を繰り返すことによって、所定の基本的な機能をメインプログラムモジュール10mに提供する。そして、機能を提供するための所定の動作が終了すると、その旨を終了情報出力部14に出力する。
終了情報出力部14は、動作を終了した旨を機能提供部12から受け取ると、動作を終了したことを示す終了情報をバックアップメモリ21に出力する。
Further, when the function providing unit 12 is activated, the function providing unit 12 repeats an operation of reading data from the memory 20, executing a predetermined process on the read data, and storing the obtained data in the memory 20. A predetermined basic function is provided to the main program module 10 m. Then, when a predetermined operation for providing the function is completed, a message to that effect is output to the end information output unit 14.
When the end information output unit 14 receives from the function providing unit 12 that the operation has been completed, the end information output unit 14 outputs the end information indicating that the operation has been completed to the backup memory 21.

図5には、本実施例の機能プログラムモジュール10が起動情報や終了情報などを書き込むバックアップメモリ21のデータ構造が、概念的に示されている。図示されるように、本実施例のバックアップメモリ21は、動作履歴保存領域21aと、初期化時状況保存領域21bとを備えている。
このうちの動作履歴保存領域21aは、機能プログラムモジュール10が起動時や終了時に、上述した起動情報や終了情報などを書き込む領域である。また、初期化時状況保存領域21bは、図1を用いて前述した監視プログラムモジュール10wがメインプログラムモジュール10mを初期化する際に、動作していた機能プログラムモジュール10を特定するための情報や、動作状況などを書き込む領域である。前述したように、これら動作履歴保存領域21aおよび初期化時状況保存領域21bに書き込まれたデータは、メインプログラムモジュール10mが初期化されても消去されることはない。
また、図示されるように動作履歴保存領域21aは、複数の小領域に区分されており、それらには固有のアドレス番号が付されている。尚、本実施例の動作履歴保存領域21aは、アドレス番号ad1~ad8が付された8つの小領域に区分されている。
FIG. 5 conceptually shows the data structure of the backup memory 21 in which the functional program module 10 of this embodiment writes start information, end information, and the like. As shown in the figure, the backup memory 21 of this embodiment includes an operation history storage area 21a and an initialization status storage area 21b.
Of these, the operation history storage area 21a is an area for writing the above-mentioned start-up information, end information, and the like when the function program module 10 starts up or ends. Further, the initialization status storage area 21b includes information for identifying the functional program module 10 that was operating when the monitoring program module 10w described above initializes the main program module 10m using FIG. 1. This is the area for writing the operating status. As described above, the data written in the operation history storage area 21a and the initialization status storage area 21b are not deleted even if the main program module 10m is initialized.
Further, as shown in the drawing, the operation history storage area 21a is divided into a plurality of small areas, and each of them is given a unique address number. The operation history storage area 21a of this embodiment is divided into eight small areas with address numbers ad1 to ad8.

本実施例のアプリケーションプログラム1は、以上のような機能プログラムモジュール10が組み込まれているので、監視プログラムモジュール10wによってメインプログラムモジュール10mが初期化された場合でも、バグを有する機能プログラムモジュール10を容易に特定することが可能となる。 Since the application program 1 of this embodiment incorporates the above-mentioned functional program module 10, even if the main program module 10m is initialized by the monitoring program module 10w, the functional program module 10 having a bug can be easily implemented. It becomes possible to specify to.

B.機能プログラムモジュール10の動作 :
図6には、機能プログラムモジュール10が実行する機能提供処理のフローチャートが示されている。機能プログラムモジュール10は、メインプログラムモジュール10mによって起動されると、この機能提供処理を実行することによって、所定の機能をメインプログラムモジュール10mに提供する。
B. Operation of function program module 10:
FIG. 6 shows a flowchart of the function providing process executed by the function program module 10. When the function program module 10 is started by the main program module 10m, the function program module 10 provides a predetermined function to the main program module 10m by executing this function providing process.

図6に示されるように、機能プログラムモジュール10は、先ず初めに、メインプログラムモジュール10mによって起動されたか否かを判断する(S100)。その結果、起動されていない場合は(S100:no)、同じ判断を繰り返すことによって、起動されるまで待機状態となる。
そして、メインプログラムモジュール10mによって起動されると、S100では「yes」と判断して、続いて、起動されたことを示す起動情報を、バックアップメモリ21の動作履歴保存領域21aに記憶する(S101)。
As shown in FIG. 6, the functional program module 10 first determines whether or not it has been started by the main program module 10m (S100). As a result, if it is not activated (S100: no), the same determination is repeated to enter a standby state until it is activated.
Then, when it is started by the main program module 10m, it is determined as "yes" in S100, and subsequently, the start information indicating that it has been started is stored in the operation history storage area 21a of the backup memory 21 (S101). ..

ここで、図5を用いて前述したように、動作履歴保存領域21aには複数(ここでは8つ)の小領域に区分されており、それぞれの小領域にはアドレス番号ad1~ad8が付されている。本実施例の機能プログラムモジュール10は、動作履歴保存領域21aにデータを書き込む際には、アドレス番号ad1~ad8の順番に従って小領域に順番に書き込むようになっている。
例えば、動作履歴保存領域21aに未だデータが書き込まれていない場合は、動作履歴保存領域21aのアドレス番号ad1にデータを書き込む。また、アドレス番号ad1にはデータが書き込まれているが、アドレス番号ad2には未だデータが書き込まれていない場合は、アドレス番号ad2にデータを書き込む。
更に、動作履歴保存領域21aの全てのアドレス番号ad1~ad8にデータが書き込まれている場合は、最も古いデータが書き込まれたアドレス番号にデータを書き込む。例えば、アドレス番号ad8にデータが書き込まれた場合には、次にデータを書き込むのはアドレス番号ad1となり、その次はアドレス番号ad2、更にその次はアドレス番号ad3と、順番にデータを書き込んでいく。
Here, as described above with reference to FIG. 5, the operation history storage area 21a is divided into a plurality of (8 in this case) small areas, and the address numbers ad1 to ad8 are assigned to each small area. ing. When writing data to the operation history storage area 21a, the functional program module 10 of this embodiment writes data to the small areas in order according to the order of the address numbers ad1 to ad8.
For example, if the data has not yet been written in the operation history storage area 21a, the data is written in the address number ad1 of the operation history storage area 21a. Further, if the data is written in the address number ad1 but the data is not yet written in the address number ad2, the data is written in the address number ad2.
Further, when the data is written in all the address numbers ad1 to ad8 of the operation history storage area 21a, the data is written in the address number in which the oldest data is written. For example, when data is written to address number ad8, the next data to be written is address number ad1, the next is address number ad2, the next is address number ad3, and so on. ..

また、図2を用いて前述したように、複数の機能プログラムモジュール10が順番に起動され、それぞれの機能プログラムモジュール10がバックアップメモリ21の動作履歴保存領域21aにデータを書き込むことになる。従って、前に起動された機能プログラムモジュール10が、例えば動作履歴保存領域21aのアドレス番号ad3に書き込んでいた場合は、S101では、アドレス番号ad4に起動情報を書き込むことになる。 Further, as described above with reference to FIG. 2, a plurality of functional program modules 10 are started in order, and each functional program module 10 writes data to the operation history storage area 21a of the backup memory 21. Therefore, if the previously activated functional program module 10 has written to, for example, the address number ad3 of the operation history storage area 21a, the activation information will be written to the address number ad4 in S101.

以上のようにして起動情報を動作履歴保存領域21aに書き込んだら(S101)、メインプログラムモジュール10mから供給された引数が存在するか否かを判断する(S102)。前述したように引数とは、機能プログラムモジュール10が所定の機能を提供するために必要となる変数値や、機能の内容を指定する値などの数値、変数値や数値を格納したアドレス値、アドレス値を示すポインタ値などの数値である。機能プログラムモジュール10によって引数を指定する必要があるものや、必要ではないが引数を指定可能なものや、引数は指定できないものが存在しており、メインプログラムモジュール10mは機能プログラムモジュール10を起動すると、必要に応じて引数を供給する。
そこで、S102では、メインプログラムモジュール10mから供給された引数が存在するか否かを判断する。
After writing the activation information to the operation history storage area 21a as described above (S101), it is determined whether or not the argument supplied from the main program module 10m exists (S102). As described above, the argument is a variable value required for the function program module 10 to provide a predetermined function, a numerical value such as a value that specifies the content of the function, an address value that stores the variable value or the numerical value, and an address. A numerical value such as a pointer value indicating a value. Some functional program modules 10 require arguments to be specified, some are not required but arguments can be specified, and some cannot specify arguments. When the main program module 10m starts the functional program module 10. , Provide arguments as needed.
Therefore, in S102, it is determined whether or not the argument supplied from the main program module 10m exists.

その結果、引数が供給されていない場合は(S102:no)、機能プログラムモジュール10に固有の基本的な機能を提供するための処理を開始する(S104)。
これに対して、引数が供給されていた場合は(S102:yes)、前述した起動情報と同様に、バックアップメモリ21の動作履歴保存領域21aに引数を記憶する(S103)。尚、供給される引数は必ずしも1つではないので、n個の引数が供給されていた場合は、それらの引数を、動作履歴保存領域21aのn個のアドレス番号に記憶する。
こうして、引数をバックアップメモリ21の動作履歴保存領域21aに書き込んだら(S103)、機能プログラムモジュール10に固有の基本的な機能を提供するための処理を開始する(S104)。
As a result, when the argument is not supplied (S102: no), the process for providing the basic function peculiar to the function program module 10 is started (S104).
On the other hand, when the argument is supplied (S102: yes), the argument is stored in the operation history storage area 21a of the backup memory 21 (S103) in the same manner as the above-described startup information. Since the number of arguments to be supplied is not necessarily one, when n arguments are supplied, those arguments are stored in the n address numbers of the operation history storage area 21a.
In this way, when the argument is written to the operation history storage area 21a of the backup memory 21 (S103), the process for providing the basic function peculiar to the function program module 10 is started (S104).

固有の機能を提供するための処理中は、メモリ20(図4参照)からデータを読み出したり、データを書き込んだりしながら、予め定められた処理を実行する。
続いて、固有の機能を提供するための処理が終了したか否かを判断して(S105)、処理が終了していない場合は(S105:no)、そのまま処理を継続する。
これに対して処理が終了した場合は(S105:yes)、機能の提供が完了した旨をメインプログラムモジュール10mに対して出力する(S106)。
During the process for providing the unique function, a predetermined process is executed while reading data from the memory 20 (see FIG. 4) and writing data.
Subsequently, it is determined whether or not the process for providing the unique function is completed (S105), and if the process is not completed (S105: no), the process is continued as it is.
On the other hand, when the processing is completed (S105: yes), the fact that the provision of the function is completed is output to the main program module 10m (S106).

続いて、機能を提供するための処理が終了したことを示す終了情報を、バックアップメモリ21の動作履歴保存領域21aに記憶する(S107)。終了情報を記憶する際にも、前述した起動情報や引数を記憶する場合と同様に、動作履歴保存領域21aの中で、最も古いデータが記憶されているアドレス番号に終了情報を記憶する。例えば、S103で引数を記憶した場合は、その引数を記憶したアドレス番号の次のアドレス番号(アドレス番号ad8の場合はアドレス番号ad1)に終了情報を記憶する。また、S103で引数を記憶していない場合は、S101で起動情報を記憶したアドレス番号に続けて終了情報を記憶する。
こうして終了情報をバックアップメモリ21の動作履歴保存領域21aに書き込んだら、図6の機能提供処理を終了する。
Subsequently, the end information indicating that the process for providing the function is completed is stored in the operation history storage area 21a of the backup memory 21 (S107). When storing the end information, the end information is stored in the address number where the oldest data is stored in the operation history storage area 21a, as in the case of storing the start information and arguments described above. For example, when the argument is stored in S103, the end information is stored in the address number next to the address number in which the argument is stored (in the case of the address number ad8, the address number ad1). If the argument is not stored in S103, the end information is stored following the address number in which the start information is stored in S101.
When the end information is written in the operation history storage area 21a of the backup memory 21 in this way, the function providing process of FIG. 6 ends.

上述したように、本実施例の機能プログラムモジュール10は、起動時には起動情報を、引数が供給された場合には引数を、そして終了時には終了情報を、バックアップメモリ21の動作履歴保存領域21aに時系列で書き込んでいる。このため、アプリケーションプログラム1の実行中に、監視プログラムモジュール10wがメインプログラムモジュール10mを初期化した場合でも、バックアップメモリ21を調べることによって、初期化された原因を容易に特定することができる。
特に、本実施例のアプリケーションプログラム1では、機能プログラムモジュール10がバックアップメモリ21の動作履歴保存領域21aに、起動情報や終了情報などを時系列で書き込んでいる。このため、詳細には後述するが、動作履歴保存領域21aを調べることで、それぞれの機能プログラムモジュール10が起動した時の状況を知ることができるので、監視プログラムモジュール10wによる初期化が発生した原因を、より一層容易に特定することが可能となる。
As described above, the functional program module 10 of the present embodiment sends start information at startup, arguments when arguments are supplied, and end information at the end in the operation history storage area 21a of the backup memory 21. I am writing in series. Therefore, even if the monitoring program module 10w initializes the main program module 10m during the execution of the application program 1, the cause of the initialization can be easily identified by examining the backup memory 21.
In particular, in the application program 1 of this embodiment, the functional program module 10 writes start information, end information, and the like in the operation history storage area 21a of the backup memory 21 in chronological order. Therefore, as will be described in detail later, by examining the operation history storage area 21a, it is possible to know the status when each function program module 10 is started, so that the cause of the initialization by the monitoring program module 10w has occurred. Can be identified even more easily.

図7には、メインプログラムモジュール10mが順番に機能プログラムモジュール10を起動するに伴って、動作履歴保存領域21aにデータが書き込まれる様子が例示されている。尚、ここでは、メインプログラムモジュール10mは、図2に示した順序で機能プログラムモジュール10を起動しているものとして説明する。
図2を用いて前述したように、メインプログラムモジュール10mは初めに機能プログラムモジュール10aを起動しており、これに伴って、動作履歴保存領域21aのアドレス番号ad1には、機能プログラムモジュール10aの起動情報Astが書き込まれる。また、機能プログラムモジュール10aは引数を1つ使用しており、これに伴って、動作履歴保存領域21aのアドレス番号ad2には、機能プログラムモジュール10aの引数Avが書き込まれる。更に、機能プログラムモジュール10aが動作を終了する際には、機能プログラムモジュール10aの終了情報Aenがアドレス番号ad3に書き込まれる。
FIG. 7 illustrates how data is written to the operation history storage area 21a as the main program module 10m sequentially activates the function program module 10. Here, the main program module 10m will be described assuming that the functional program modules 10 are started in the order shown in FIG.
As described above with reference to FIG. 2, the main program module 10m first activates the functional program module 10a, and accordingly, the functional program module 10a is activated at the address number ad1 of the operation history storage area 21a. Information Ast is written. Further, the functional program module 10a uses one argument, and along with this, the argument Av of the functional program module 10a is written in the address number ad2 of the operation history storage area 21a. Further, when the function program module 10a ends its operation, the end information Aen of the function program module 10a is written in the address number ad3.

また、メインプログラムモジュール10mは、機能プログラムモジュール10aに続いて機能プログラムモジュール10bを起動する(図2参照)。これに伴って、動作履歴保存領域21aのアドレス番号ad4には、機能プログラムモジュール10bの起動情報Bstが書き込まれる。また、機能プログラムモジュール10bは2つの引数を使用していることに伴って、動作履歴保存領域21aのアドレス番号ad5およびアドレス番号ad6には、2つの引数Bv1,Bv2が書き込まれ、更に、動作履歴保存領域21aのアドレス番号ad7には、機能プログラムモジュール10bの終了情報Benが書き込まれる。 Further, the main program module 10m starts the functional program module 10b following the functional program module 10a (see FIG. 2). Along with this, the activation information Bst of the functional program module 10b is written in the address number ad4 of the operation history storage area 21a. Further, since the functional program module 10b uses two arguments, two arguments Bv1 and Bv2 are written in the address number ad5 and the address number ad6 of the operation history storage area 21a, and further, the operation history. The end information Ben of the functional program module 10b is written in the address number ad7 of the storage area 21a.

続いて、メインプログラムモジュール10mは、機能プログラムモジュール10cを起動する。これに伴って、動作履歴保存領域21aのアドレス番号ad8には、機能プログラムモジュール10cの起動情報Cstが書き込まれる。また、機能プログラムモジュール10cは引数を使用しないので、機能プログラムモジュール10cの終了情報Cenは、動作履歴保存領域21aのアドレス番号ad1に書き込まれる。
以下、同様に、機能プログラムモジュール10が起動される度に、その機能プログラムモジュール10の起動情報が動作履歴保存領域21aに書き込まれ、引数が存在する場合には引数も書き込まれる。そして、機能プログラムモジュール10が終了する際には、その機能プログラムモジュール10の終了情報が動作履歴保存領域21aに書き込まれていく。
Subsequently, the main program module 10m activates the functional program module 10c. Along with this, the activation information Cst of the functional program module 10c is written in the address number ad8 of the operation history storage area 21a. Further, since the functional program module 10c does not use an argument, the end information Cen of the functional program module 10c is written in the address number ad1 of the operation history storage area 21a.
Similarly, every time the functional program module 10 is activated, the activation information of the functional program module 10 is written in the operation history storage area 21a, and if an argument exists, the argument is also written. Then, when the functional program module 10 ends, the end information of the functional program module 10 is written in the operation history storage area 21a.

ここで、図3を用いて前述したように、機能プログラムモジュール10dの動作中に、監視プログラムモジュール10wによってメインプログラムモジュール10mが初期化された場合について考える。
前述したようにバックアップメモリ21に記憶されている内容は、初期化されても消去されないから、バックアップメモリ21の初期化時状況保存領域21bには、従来のアプリケーションプログラム1と同様に、初期化された時点で動作していた機能プログラムモジュール10の動作状況が記録されている。また、動作履歴保存領域21aには、初期化される前に機能プログラムモジュール10が書き込んだ情報が記録されている。
Here, as described above with reference to FIG. 3, a case where the main program module 10m is initialized by the monitoring program module 10w during the operation of the functional program module 10d will be considered.
As described above, the contents stored in the backup memory 21 are not erased even if they are initialized. Therefore, the status storage area 21b at the time of initialization of the backup memory 21 is initialized in the same manner as the conventional application program 1. The operating status of the functional program module 10 that was operating at that time is recorded. Further, in the operation history storage area 21a, information written by the functional program module 10 before being initialized is recorded.

図8(a)には、初期化されたときに動作履歴保存領域21aに記憶されていたデータが示されている。図中で斜線を付した部分は、初期化されていたときに動作していた機能プログラムモジュール10dが書き込んだデータ(この場合は、起動情報Dstおよび引数Dv)である。前述したように、機能プログラムモジュール10は、アドレス番号の順番でデータを書き込んでいく。従って、図8(a)に示したデータを、データが書き込まれた順番で並べ替えると、図8(b)に示す順番となる。 FIG. 8A shows the data stored in the operation history storage area 21a at the time of initialization. The shaded areas in the figure are the data written by the functional program module 10d that was operating when it was initialized (in this case, the activation information Dst and the argument Dv). As described above, the functional program module 10 writes data in the order of address numbers. Therefore, when the data shown in FIG. 8 (a) is rearranged in the order in which the data is written, the order is as shown in FIG. 8 (b).

図8(b)に示すように、初期化した時点で動作していた機能プログラムモジュール10dは、起動する際に、アドレス番号ad5に保存されている引数Dvを受け取っている。また、機能プログラムモジュール10dが起動する前には、機能プログラムモジュール10aが動作しているが、この機能プログラムモジュール10aの終了情報Aenは動作履歴保存領域21aには記憶されていない。すなわち、機能プログラムモジュール10aは、割り込みが発生したなどの何らかの理由で正常に終了しておらず、そのような状況で機能プログラムモジュール10dが起動されたために、機能プログラムモジュール10dが正常に動作できなくなって、監視プログラムモジュール10wによる初期化が発生したものと考えられる。 As shown in FIG. 8B, the functional program module 10d that was operating at the time of initialization receives the argument Dv stored in the address number ad5 when it is started. Further, although the functional program module 10a is operating before the functional program module 10d is started, the end information Aen of the functional program module 10a is not stored in the operation history storage area 21a. That is, the functional program module 10a has not been normally terminated for some reason such as an interrupt, and the functional program module 10d is started in such a situation, so that the functional program module 10d cannot operate normally. Therefore, it is probable that initialization by the monitoring program module 10w has occurred.

また、機能プログラムモジュール10dで初期化が発生した原因となった機能プログラムモジュール10aの前に動作していた機能プログラムモジュール10cについては、機能プログラムモジュール10cの終了情報Cenが記憶されている。従って、機能プログラムモジュール10cは、一応、正常に終了していると考えられる。このことから、機能プログラムモジュール10aは、正常な状態で起動されたにも拘わらず、何らかの理由で正常に終了せず、その状態で機能プログラムモジュール10dが起動されたために、機能プログラムモジュール10dの動作中に監視プログラムモジュール10wによる初期化が発生したものと推定される。従って、初期化が発生したのは機能プログラムモジュール10dの動作中であるが、プログラム上のバグの存在を調査する必要があるのは、機能プログラムモジュール10aであると考えられる。 Further, for the functional program module 10c that was operating before the functional program module 10a that caused the initialization in the functional program module 10d, the end information Cen of the functional program module 10c is stored. Therefore, it is considered that the functional program module 10c is normally terminated for the time being. From this, although the functional program module 10a was started in a normal state, it did not end normally for some reason, and the functional program module 10d was started in that state. Therefore, the operation of the functional program module 10d It is highly probable that initialization by the monitoring program module 10w occurred inside. Therefore, it is considered that the initialization occurred during the operation of the functional program module 10d, but it is the functional program module 10a that needs to be investigated for the existence of a bug in the program.

あるいは、初期化の発生時に動作していた機能プログラムモジュール10dは、起動時に引数Dvを受け取っているが、この引数Dvが正常な値でなかった場合もある。
このような場合は、機能プログラムモジュール10dにプログラム上のバグが存在するのではなく、機能プログラムモジュール10dに異常な引数Dvを供給したメインプログラムモジュール10m、あるいは、その原因となった機能プログラムモジュール10aにバグが存在するか否かを調査するべきと考えられる。
Alternatively, the functional program module 10d that was operating when the initialization occurred received the argument Dv at the time of startup, but this argument Dv may not be a normal value.
In such a case, the functional program module 10d does not have a program bug, but the main program module 10m that supplies the abnormal argument Dv to the functional program module 10d, or the functional program module 10a that caused the problem. It is considered that we should investigate whether there is a bug in.

このように、動作履歴保存領域21aには、機能プログラムモジュール10が動作した履歴が時系列で記憶されている。このため、監視プログラムモジュール10wによる初期化が発生した場合に、その機能プログラムモジュール10が起動されたときの状況を知ることができる。例えば、その機能プログラムモジュール10の前に動作していた機能プログラムモジュール10が正常に終了していたか否か、あるいは、起動時に正常な引数が供給されていたか否かなどを知ることができる。
仮に、初期化された時に動作していた機能プログラムモジュール10が、正常な状態で起動されていなかった場合は、初期化された時の機能プログラムモジュール10ではなく、その機能プログラムモジュール10の前に起動していた機能プログラムモジュール10に、バグが存在するものと考えられる。
In this way, the operation history of the functional program module 10 is stored in the operation history storage area 21a in chronological order. Therefore, when the initialization by the monitoring program module 10w occurs, it is possible to know the situation when the functional program module 10 is started. For example, it is possible to know whether or not the functional program module 10 that was operating before the functional program module 10 has been normally terminated, or whether or not a normal argument has been supplied at the time of startup.
If the function program module 10 that was operating at the time of initialization is not started in a normal state, it is not the function program module 10 at the time of initialization, but before the function program module 10. It is probable that there is a bug in the functional program module 10 that was running.

また、本実施例の動作履歴保存領域21aのように、複数の機能プログラムモジュール10についての動作の履歴が記憶されていれば、初期化が発生した機能プログラムモジュール10の前に動作していた機能プログラムモジュール10が、どのような状況で起動したかについても知ることができる。その結果、その機能プログラムモジュール10が正常な状態で起動していなかった場合は、その前に動作していた機能プログラムモジュール10について、バグの存在を調査する必要があると考えられる。 Further, if the operation history of the plurality of functional program modules 10 is stored as in the operation history storage area 21a of this embodiment, the function that was operating before the functional program module 10 in which the initialization occurred. It is also possible to know under what circumstances the program module 10 is started. As a result, if the functional program module 10 is not started in a normal state, it is considered necessary to investigate the existence of a bug in the functional program module 10 that was operating before that.

このように、本実施例のアプリケーションプログラム1では、機能プログラムモジュール10が起動したときの状況が、メインプログラムモジュール10mが初期化されても消去されないバックアップメモリ21に記憶されている。このため、監視プログラムモジュール10wによってメインプログラムモジュール10mが初期化された場合でも、初期化が発生した原因を容易に特定することが可能となる。 As described above, in the application program 1 of the present embodiment, the situation when the functional program module 10 is started is stored in the backup memory 21 which is not erased even if the main program module 10m is initialized. Therefore, even when the main program module 10m is initialized by the monitoring program module 10w, it is possible to easily identify the cause of the initialization.

以上、本発明の実施例について説明したが、本発明は上記の実施例に限られるものではなく、その要旨を逸脱しない範囲において種々の態様で実施することができる。 Although the examples of the present invention have been described above, the present invention is not limited to the above-mentioned examples, and can be carried out in various modes without departing from the gist thereof.

1…アプリケーションプログラム、 10a~10d…機能プログラムモジュール、
10m…メインプログラムモジュール、 10w…監視プログラムモジュール、
11…起動要求検知部、 12…機能提供部、 13…起動情報出力部、
14…終了情報出力部、 20…メモリ、 21…バックアップメモリ、
21a…動作履歴保存領域、 21b…初期化時状況保存領域。
1 ... Application program, 10a-10d ... Functional program module,
10m ... main program module, 10w ... monitoring program module,
11 ... Start request detection unit, 12 ... Function provision unit, 13 ... Start information output unit,
14 ... end information output unit, 20 ... memory, 21 ... backup memory,
21a ... Operation history storage area, 21b ... Initialization status storage area.

Claims (3)

コンピュータ上で所定の目的処理を実行するアプリケーションプログラム(1)であって、
前記目的処理で用いられる個々の機能を実現するプログラムである複数の機能プログラムモジュール(10)と、
前記複数の機能プログラムモジュールを所定の順序で起動させることによって、前記目的処理を実現するプログラムであるメインプログラムモジュール(10m)と、
前記機能プログラムモジュールの実行時間を監視して、該実行時間が所定の上限時間を超えない場合には、実行中の前記機能プログラムモジュールを特定可能な特定情報を所定のバックアップメモリ(21)に記憶する動作や、前記メインプログラムモジュールを初期化する動作は行わないが、前記実行時間が前記上限時間を超えた場合には、前記実行中の機能プログラムモジュールの前記特定情報を前記バックアップメモリに記憶すると共に、前記メインプログラムモジュールを初期化するプログラムである監視プログラムモジュール(10w)と
を備え、
前記機能プログラムモジュールは、
起動したことを示す起動情報と、前記機能を実現する動作を終了したことを示す終了情報とを、時系列で且つ前記機能プログラムモジュールを識別可能な状態で、前記バックアップメモリに記憶すると共に、前記起動に際して引数を受け取っていた場合は該引数も、前記バックアップメモリに記憶しており、
前記起動情報または前記引数または前記終了情報を前記バックアップメモリに記憶する際に、前記バックアップメモリに他の前記機能プログラムモジュールの前記起動情報または前記引数または前記終了情報が記憶されていた場合には、前記他の機能プログラムモジュールの前記起動情報または前記引数または前記終了情報に続けて、前記起動情報または前記引数または前記終了情報を記憶し、更に、
前記バックアップメモリに記憶された前記起動情報、前記引数および前記終了情報のデータ量が所定の上限量を超えた場合には、古い前記起動情報または前記引数または前記終了情報から順番に、新しい前記起動情報または前記引数または前記終了情報を上書きす
ことを特徴とするアプリケーションプログラム。
An application program (1) that executes a predetermined target process on a computer.
A plurality of functional program modules (10), which are programs that realize individual functions used in the target processing, and
A main program module (10 m), which is a program that realizes the target processing by starting the plurality of functional program modules in a predetermined order, and
The execution time of the functional program module is monitored, and if the execution time does not exceed a predetermined upper limit time, specific information that can identify the running functional program module is stored in a predetermined backup memory (21). However, when the execution time exceeds the upper limit time, the specific information of the function program module being executed is stored in the backup memory. Along with this, a monitoring program module (10w), which is a program for initializing the main program module, is provided.
The functional program module is
The start-up information indicating that the function has been started and the end information indicating that the operation for realizing the function has been completed are stored in the backup memory in a time-series manner and in a state in which the function program module can be identified . If an argument has been received at startup, that argument is also stored in the backup memory.
When the start information or the argument or the end information is stored in the backup memory, if the start information or the argument or the end information of another functional program module is stored in the backup memory, the backup memory stores the start information or the argument or the end information. Following the start information or the argument or the end information of the other functional program module, the start information or the argument or the end information is stored , and further.
When the amount of data of the start information, the argument and the end information stored in the backup memory exceeds a predetermined upper limit amount, the new start is started in order from the old start information or the argument or the end information . An application program comprising overwriting information or said argument or said end information .
請求項1に記載のアプリケーションプログラムであって、
前記監視プログラムモジュールは、前記特定情報を、前記バックアップメモリに設定された初期化時状況保存領域に記憶しており、
前記機能プログラムモジュールは、前記起動情報または前記引数または前記終了情報を、前記バックアップメモリ上で前記初期化時状況保存領域とは異なる領域に設定された動作履歴保存領域に記憶する
ことを特徴とするアプリケーションプログラム。
The application program according to claim 1.
The monitoring program module stores the specific information in the initialization status storage area set in the backup memory.
The functional program module stores the start information, the argument, or the end information in an operation history storage area set in an area different from the initialization status storage area on the backup memory.
An application program characterized by that.
コンピュータ上で所定の目的処理を実行するアプリケーションプログラム(1)によって起動され、前記目的処理で用いられる機能を実現する機能プログラムモジュール(10)であって、 A functional program module (10) that is started by an application program (1) that executes a predetermined target process on a computer and realizes a function used in the target process.
前記起動されたことを示す起動情報を、前記アプリケーションプログラムが初期化されても記憶内容が消去されないバックアップメモリ(21)に向けて出力すると共に、前記起動に際して引数を受け取っていた場合は該引数も、前記バックアップメモリに出力する起動情報出力部(12)と、 The startup information indicating that the application program has been started is output to the backup memory (21) whose stored contents are not erased even if the application program is initialized, and if an argument is received at the time of the startup, the argument is also included. , The startup information output unit (12) that outputs to the backup memory,
前記機能を実現する動作が終了したことを示す終了情報を、前記バックアップメモリに向けて出力する終了情報出力部(14)と With the end information output unit (14) that outputs the end information indicating that the operation for realizing the function is completed to the backup memory.
を備え、 With
前記起動情報出力部は、前記起動情報または前記引数を前記バックアップメモリに出力する際に、前記バックアップメモリに他の前記機能プログラムモジュールの前記起動情報または前記引数または前記終了情報が出力されていた場合には、前記他の機能プログラムモジュールの前記起動情報または前記引数または前記終了情報に続けて、前記起動情報または前記引数を出力しており、 When the start information output unit outputs the start information or the argument to the backup memory, the start information or the argument or the end information of another functional program module is output to the backup memory. Is to output the start information or the argument following the start information or the argument or the end information of the other functional program module.
前記終了情報出力部は、前記終了情報を前記バックアップメモリに出力する際に、前記バックアップメモリに他の前記機能プログラムモジュールの前記起動情報または前記引数または前記終了情報が出力されていた場合には、前記他の機能プログラムモジュールの前記起動情報または前記引数または前記終了情報に続けて、前記終了情報を出力しており、 When the end information output unit outputs the end information to the backup memory, if the start information or the argument of the other functional program module or the end information is output to the backup memory, the end information output unit may output the end information. The end information is output following the start information or the argument or the end information of the other functional program module.
前記起動情報出力部および前記終了情報出力部は、前記バックアップメモリに記憶された前記起動情報または前記引数または前記終了情報のデータ量が所定の上限量を超えた場合には、古い前記起動情報または前記引数または前記終了情報から順番に、新しい前記起動情報または前記引数または前記終了情報を上書きする When the amount of data of the start information or the argument or the end information stored in the backup memory exceeds a predetermined upper limit amount, the start information output unit and the end information output unit are old. Overwrites the new start information or the argument or the end information in order from the argument or the end information.
ことを特徴とする機能プログラムモジュール。 A functional program module characterized by that.
JP2018073507A 2018-04-05 2018-04-05 Application program, function program module Active JP7102883B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018073507A JP7102883B2 (en) 2018-04-05 2018-04-05 Application program, function program module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018073507A JP7102883B2 (en) 2018-04-05 2018-04-05 Application program, function program module

Publications (2)

Publication Number Publication Date
JP2019185276A JP2019185276A (en) 2019-10-24
JP7102883B2 true JP7102883B2 (en) 2022-07-20

Family

ID=68341257

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018073507A Active JP7102883B2 (en) 2018-04-05 2018-04-05 Application program, function program module

Country Status (1)

Country Link
JP (1) JP7102883B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006011991A (en) 2004-06-29 2006-01-12 Meidensha Corp Computer controller and software execution recording mode therefor
JP2007081699A (en) 2005-09-13 2007-03-29 Fuji Xerox Co Ltd Image processor, abnormity detection method, program, and recording medium
US20070168761A1 (en) 2005-11-21 2007-07-19 Baltes Kevin M Method for centralization of process sequence checking
JP2009123108A (en) 2007-11-16 2009-06-04 Toshiba Tec Corp Information processor
JP2012058879A (en) 2010-09-07 2012-03-22 Toshiba Corp Operating system boot management device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006011991A (en) 2004-06-29 2006-01-12 Meidensha Corp Computer controller and software execution recording mode therefor
JP2007081699A (en) 2005-09-13 2007-03-29 Fuji Xerox Co Ltd Image processor, abnormity detection method, program, and recording medium
US20070168761A1 (en) 2005-11-21 2007-07-19 Baltes Kevin M Method for centralization of process sequence checking
JP2009123108A (en) 2007-11-16 2009-06-04 Toshiba Tec Corp Information processor
JP2012058879A (en) 2010-09-07 2012-03-22 Toshiba Corp Operating system boot management device

Also Published As

Publication number Publication date
JP2019185276A (en) 2019-10-24

Similar Documents

Publication Publication Date Title
US20060010282A1 (en) Method and apparatus to boot a system by monitoring an operating status of a NAND flash memory
JP3481737B2 (en) Dump collection device and dump collection method
JP2010500682A (en) Flash memory access circuit
CN102968353A (en) Fail address processing method and fail address processing device
JP2006338445A (en) Abnormality information storage apparatus
CN114996064A (en) Memory detection method, device, equipment and storage medium
US20240095174A1 (en) Method for detecting error of operating system kernel memory in real time
EP3534259B1 (en) Computer and method for storing state and event log relevant for fault diagnosis
JP2010204851A (en) Storage device and information processing apparatus
JP7063445B2 (en) Fault information processing program, computer, fault notification method, computer system
JP7102883B2 (en) Application program, function program module
JP5504604B2 (en) RAM diagnostic device
JP5849491B2 (en) Disk control device, disk device abnormality detection method, and program
JP5133649B2 (en) Electronic device and memory management program
US5974249A (en) Zero footprint method and apparatus for expanding allocated memory space of a process using a virtual memory area
JP2011002889A (en) Computer system
JP2015118493A (en) Trace device and trace program
US10936357B2 (en) Semiconductor device
KR101539933B1 (en) Method and apparatus for creating log on cpu hang-up
CN101311909A (en) System peculiarity diagnose method
US8090991B2 (en) Information processing apparatus, method, and computer program product for self-diagnosis for utilizing multiple diagnostic devices, each having exclusive access to a resource
KR102463847B1 (en) Method for monitoring task, and apparatus implementing the same method
CN108415788B (en) Data processing apparatus and method for responding to non-responsive processing circuitry
JP4527419B2 (en) Program trace method and trace processing system
JP5277217B2 (en) Information processing apparatus and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220208

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220407

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220607

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220620

R151 Written notification of patent or utility model registration

Ref document number: 7102883

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151