JP2019185276A - Application program and function program module - Google Patents

Application program and function program module Download PDF

Info

Publication number
JP2019185276A
JP2019185276A JP2018073507A JP2018073507A JP2019185276A JP 2019185276 A JP2019185276 A JP 2019185276A JP 2018073507 A JP2018073507 A JP 2018073507A JP 2018073507 A JP2018073507 A JP 2018073507A JP 2019185276 A JP2019185276 A JP 2019185276A
Authority
JP
Japan
Prior art keywords
program module
function
function program
information
backup memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018073507A
Other languages
Japanese (ja)
Other versions
JP7102883B2 (en
Inventor
奈々 石田
Nana Ishida
奈々 石田
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

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

To provide a technique for easily identifying the cause of forced initialization by a watchdog timer in an application program for executing a target process by combining a plurality of function program modules.SOLUTION: An application program executes a target process by activating a plurality of function program modules in a predetermined order. The activated function program module stores: in an operation history storage area 21a of a backup memory in time series, activation information Ast, Bst, Cst, and Dst and arguments Av, Bv1, Bv2 and Dv indicating that the activation has been done; and end information Aen, Ben, Cen, and Den indicating that the operation has been completed. Even when initialized by the watchdog timer, if information about the function program module that was activated last time is stored in the backup memory, the activation information and the end information are stored following the information about the function program module.SELECTED DRAWING: Figure 7

Description

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

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

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

そこで、いわゆるウォッチドッグタイマと呼ばれる監視用のプログラムモジュールを用いて、機能プログラムモジュールによる動作の実行時間を監視しておき、実行時間が異常に長くなった場合には、不具合が発生したものと判断して、アプリケーションプログラムをソフトウェアで強制的に初期化することが行われている。また、不具合の原因を容易に特定可能とするために、不具合が発生する時点で動作していた機能プログラムモジュール(すなわち、バグのあると思われる機能プログラムモジュール)、および機能プログラムモジュールの動作内容を記憶しておく技術が提案されている(特許文献1)。   Therefore, using a monitoring program module called a so-called watchdog timer, the execution time of the operation by the function program module is monitored, 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 easily identify the cause of the malfunction, the function program module that was operating at the time of the malfunction (that is, the functional program module that seems to have a bug), and the operation contents of the function program module A technique for storing the information has been proposed (Patent Document 1).

特開2006−011991号公報JP 2006-011991 A

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

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

上述した問題を解決するために本発明のアプリケーションプログラム、および機能プログラムモジュールでは、機能プログラムモジュールが起動したことを示す起動情報と、機能プログラムモジュールが動作を終了したことを示す終了情報とを、時系列でバックアップメモリに記憶する。また、前回に起動していた機能プログラムモジュールについての情報がバックアップメモリに記憶されていた場合には、その情報に続けて、起動情報や終了情報を記憶する。
こうすれば、機能プログラムモジュールの実行時間が所定の上限時間に達したために、監視プログラムモジュールによって初期化された場合でも、バックアップメモリを調べれば、その機能プログラムモジュールが正常に起動されたか否かを知ることができる。そして、正常に起動されていなかった場合は、初期化の発生時に動作していた機能プログラムモジュールに原因があるわけではないと判断することができるので、初期化が発生した原因を容易に特定することが可能となる。
In order to solve the above-described problems, the application program and the function program module of the present invention include start information indicating that the function program module has started and end information indicating that the function program module has ended operation. Store in series in backup memory. If information about the function program module that was activated last time is stored in the backup memory, activation information and end information are stored following the information.
In this way, even if the function program module has been executed by the monitoring program module because the execution time of the function program module has reached a predetermined upper limit time, if the backup memory is examined, it can be determined whether or not the function program module has been started normally. I can know. If it has not been started normally, it can be determined that there is no cause in the function 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 the block diagram which showed the rough internal structure of the application program 1 of a present Example. メインプログラムモジュール10mが複数の機能プログラムモジュール10を所定の順序で起動することによって、目的の処理を実行する様子を概念的に示した説明図である。It is explanatory drawing which showed notionally the mode that the main program module 10m performs the target process by starting the several function program module 10 in 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 function program module 10 of a present Example. 本実施例の機能プログラムモジュール10がデータを書き込むバックアップメモリ21の内部構造を示した説明図である。It is explanatory drawing which showed the internal structure of the backup memory 21 in which the function program module 10 of a present Example writes data. 本実施例の機能プログラムモジュール10が実行する機能提供処理のフローチャートである。It is a flowchart of the function provision process which the function program module 10 of a present Example performs. 本実施例の機能プログラムモジュール10がバックアップメモリ21の動作履歴保存領域21aにデータを書き込む様子を概念的に示した説明図である。It is explanatory drawing which showed notionally that a function program module 10 of a present Example writes data in the operation | movement log | history storage area | region 21a of the backup memory 21. FIG. 本実施例のアプリケーションプログラム1では、監視プログラムモジュール10wによって強制的に初期化された場合でも、その原因を容易に特定可能な理由を示した説明図である。In the application program 1 of the present embodiment, even when it is forcibly initialized by the monitoring program module 10w, it is an explanatory diagram showing the reason why the cause can be easily identified.

以下では、上述した本発明の内容を明確にするために、本発明の実施例について説明する。
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, in order to clarify the contents of the present invention described above, examples of the present invention will be described.
A. Device configuration :
A-1. Overview of operation of application program 1:
FIG. 1 shows a rough internal structure of the application program 1 of this embodiment. As illustrated, the application program 1 includes a main program module 10m, a plurality of function program modules 10a to 10d, and a monitoring program module 10w.
The function program modules 10a to 10d are small programs that operate on a computer, and each implements a predetermined basic function. The main program module 10m executes a target process (hereinafter may be referred to as a target process) by activating the plurality of function program modules 10a to 10d in a predetermined order. The main program module 10 m and the function program modules 10 a to 10 d operate by reading necessary data from the memory 20 or writing data to the memory 20.
In the following description, when it is not necessary to distinguish the individual function program modules 10a to 10d, they may be simply referred to as function program modules 10. Further, although the application program 1 of the present embodiment includes the four function program modules 10, it may include a larger number of function program modules 10.

監視プログラムモジュール10wは、いわゆるウォッチドッグタイマであり、メインプログラムモジュール10mによって起動されると計時を開始して、所定の上限時間が経過すると、メインプログラムモジュール10mを強制的に初期化する。メインプログラムモジュール10mおよび機能プログラムモジュール10が正常に動作している場合は、監視プログラムモジュール10wの計時時間が上限時間に達する前に、メインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化する。このため、動作中のメインプログラムモジュール10mが、監視プログラムモジュール10wによって初期化されてしまうことはない。   The monitoring program module 10w is a so-called watchdog timer, starts counting when activated 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 measured by the monitoring program module 10w before the time measured by the monitoring program module 10w reaches the upper limit time. . For this reason, the main program module 10m in operation 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 a state in which the main program module 10m executes a target process by activating a plurality of function program modules 10a to 10d in a predetermined order. In the illustrated example, the main program module 10m first activates the function program module 10a. Further, when starting the first function program module 10 (here, the function program module 10a), the monitoring program module 10w is also started. The solid arrows shown in FIG. 2 conceptually indicate that the main program module 10m activates the function program module 10 and the monitoring program module 10w. In addition, when the monitoring program module 10w is activated, it starts timing.

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

機能プログラムモジュール10aが所定の処理を実行して、機能を提供する動作を終了すると、メインプログラムモジュール10mは自らのプログラムに従って、今度は機能プログラムモジュール10bを起動すると共に、監視プログラムモジュール10wの計時時間を初期化する。図中に示した一点鎖線の矢印は、メインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化していることを示している。
また、監視プログラムモジュール10wが計時する上限時間は、機能プログラムモジュール10aが機能を提供するために要する時間と、その結果を受けてメインプログラムモジュール10mが監視プログラムモジュール10wの計時時間を初期化するまでに要する時間との合計時間よりも、十分に長い時間に設定されている。このため、メインプログラムモジュール10mは、監視プログラムモジュール10wの計時時間が上限時間になる前に、監視プログラムモジュール10wの計時時間を初期化することができる。
When the function program module 10a executes a predetermined process and completes 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 counts the time measured by the monitoring program module 10w. Is initialized. The dashed-dotted arrow shown in the figure indicates that the main program module 10m has initialized the time count of the monitoring program module 10w.
In addition, the upper limit time that the monitoring program module 10w counts is the time required for the function program module 10a to provide the function and until the main program module 10m initializes the timing time of the monitoring program module 10w based on the result. It is set to a sufficiently longer time than the total time required for the above. Therefore, the main program module 10m can initialize the time measured by the monitoring program module 10w before the time measured by 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 function program module 10b is also activated, a basic process unique to the function program module 10b is provided to the main program module 10m by executing a predetermined process. Then, the main program module 10m activates the function program module 10c this time and initializes the time count of the monitoring program module 10w.
Here, the time required for the function program module 10b to provide a function and the time required for the function program module 10a to provide a function are not necessarily the same. Similarly, the time required for the main program module 10m provided with a function from the function program module 10b to activate the function program module 10c and the main program module 10m provided with a function from the function program module 10a are connected to the function program module 10b. The time required to start up is not necessarily the same.

しかしそれでも、機能プログラムモジュール10bが機能を提供するために要する時間と、その結果を受けてメインプログラムモジュール10mが機能プログラムモジュール10cを起動するまでに要する時間(従って、監視プログラムモジュール10wの計時時間を初期化するまでに要する時間)とを合計した時間は、監視プログラムモジュール10wが計時する上限時間よりも十分に短い時間となっている。このため、メインプログラムモジュール10mは、監視プログラムモジュール10wの計時時間が上限時間になる前に、監視プログラムモジュール10wの計時時間を初期化することができる。   However, the time required for the function program module 10b to provide the function and the time required for the main program module 10m to start the function program module 10c in response to the result (therefore, the time measured by the monitoring program module 10w) The total time of the time required for initialization) is sufficiently shorter than the upper limit time counted by the monitoring program module 10w. Therefore, the main program module 10m can initialize the time measured by the monitoring program module 10w before the time measured by 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 function program module 10 in the order of the function program module 10a, the function program module 10d, and the function program module 10c according to its own program, and sets the time count of the monitoring program module 10w. initialize. In this way, the main program module 10m executes a target process by activating a plurality of function program modules 10 in a predetermined order. If the main program module 10m and the function program module 10 are operating normally, the time keeping time is initialized before the time keeping time of the monitoring program module 10w reaches the upper limit time. The main program module 10m is never initialized.
However, if the main program module 10m or the function program module 10 does not operate normally for some reason, the time count 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 well, in the same way as in FIG. 2, the main program module 10m first activates the function program module 10a and the monitoring program module 10w, and thereafter initializes the time count of the monitoring program module 10w. Then, a plurality of function program modules 10 are activated in accordance with a predetermined order.
However, in the example shown in FIG. 3, an abnormality occurs in the function program module 10d and the operation does not end. As a result, the main program module 10m cannot initialize the time count of the monitoring program module 10w, and the time count reaches the upper limit time, is initialized by the monitoring program module 10w, and the operation of the function program module 10d is also forcibly stopped. Is done.
As described above, 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. For this reason, the situation where the main program module 10m or the function program module 10 runs away can be avoided.

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

ところが、監視プログラムモジュール10wによる初期化が発生した後に、バックアップメモリ21に記憶されている内容を読み出して、その時に動作していた機能プログラムモジュール10を詳しく調べて見ても、バグを見つけることが出来ない場合があった。このような事態が生じると、初期化が発生した理由を特定できないので、アプリケーションプログラム1の開発が遅延してしまう。
そこで、本実施例の機能プログラムモジュール10は、次のような内部構造を採用することとした。
However, after initialization by the monitoring program module 10w occurs, a bug can be found even if the contents stored in the backup memory 21 are read and the function program module 10 operating at that time is examined in detail. There was a case where it was not possible. When such a situation occurs, the reason for the initialization cannot be specified, and the development of the application program 1 is delayed.
Therefore, the function program module 10 of this embodiment adopts 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 the function program module 10:
FIG. 4 shows the internal structure of the function program module 10 incorporated in the application program 1 of this embodiment. As shown in the figure, the function 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.
Note that these “units” focus on the functions of the function program module 10 in order to easily identify the cause of the initialization of the main program module 10m by the monitoring program module 10w. This is an abstract concept that classifies the program code for convenience. Accordingly, one program code may be classified into a plurality of “parts”, or there may be a program code that is not classified into any “part”.

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

機能提供部12は、起動すると、起動したことを示す起動情報を、起動情報出力部13に出力する。また、起動に際して起動要求検知部11から引数が供給されている場合には、引数も起動情報出力部13に出力する。
起動情報出力部13は、起動に際して機能提供部12から受け取った起動情報(および存在する場合には引数)を、バックアップメモリ21に出力する。
When activated, the function providing unit 12 outputs activation information indicating activation to the activation information output unit 13. In addition, when 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 activation information output unit 13 outputs the activation information (and an argument when present) received from the function providing unit 12 at the time of activation to the backup memory 21.

また、機能提供部12は、起動するとメモリ20からデータを読み出したり、読み出したデータに対して所定の処理を実行したり、得られたデータをメモリ20に記憶したりする動作を繰り返すことによって、所定の基本的な機能をメインプログラムモジュール10mに提供する。そして、機能を提供するための所定の動作が終了すると、その旨を終了情報出力部14に出力する。
終了情報出力部14は、動作を終了した旨を機能提供部12から受け取ると、動作を終了したことを示す終了情報をバックアップメモリ21に出力する。
In addition, when the function providing unit 12 is activated, the function providing unit 12 reads out data from the memory 20, executes predetermined processing on the read data, and stores the obtained data in the memory 20. A predetermined basic function is provided to the main program module 10m. Then, when the predetermined operation for providing the function ends, the fact 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 ended, the end information output unit 14 outputs end information indicating that the operation has ended 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 into which the function program module 10 of the present 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 in which the above-described activation information and termination information are written when the function program module 10 is activated or terminated. The initialization status storage area 21b includes information for specifying the function program module 10 that was operating when the monitoring program module 10w described above with reference to FIG. 1 initializes the main program module 10m, This is an area for writing the operation status. As described above, the data written in the operation history storage area 21a and the initialization status storage area 21b is not erased even when the main program module 10m is initialized.
Further, as shown in the figure, the operation history storage area 21a is divided into a plurality of small areas, and specific address numbers are assigned to them. The operation history storage area 21a of the present embodiment is divided into eight small areas assigned address numbers ad1 to ad8.

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

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

図6に示されるように、機能プログラムモジュール10は、先ず初めに、メインプログラムモジュール10mによって起動されたか否かを判断する(S100)。その結果、起動されていない場合は(S100:no)、同じ判断を繰り返すことによって、起動されるまで待機状態となる。
そして、メインプログラムモジュール10mによって起動されると、S100では「yes」と判断して、続いて、起動されたことを示す起動情報を、バックアップメモリ21の動作履歴保存領域21aに記憶する(S101)。
As shown in FIG. 6, the function program module 10 first determines whether it has been activated 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 activated by the main program module 10m, it is determined as “yes” in S100, and subsequently activation information indicating activation 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 (here, eight) small areas, and address numbers ad1 to ad8 are assigned to the small areas. ing. When the function program module 10 of this embodiment writes data in the operation history storage area 21a, the function program module 10 sequentially writes the data in the small areas according to the order of the address numbers ad1 to ad8.
For example, if data has not yet been written to the operation history storage area 21a, the data is written to the address number ad1 of the operation history storage area 21a. If data is written to the address number ad1, but data is not yet written to the address number ad2, the data is written to the address number ad2.
Further, when data is written to all the address numbers ad1 to ad8 in the operation history storage area 21a, the data is written to the address number where the oldest data is written. For example, when data is written to the address number ad8, the next data to be written is the address number ad1, the next is the address number ad2, and the next is the address number ad3. .

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

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

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

固有の機能を提供するための処理中は、メモリ20(図4参照)からデータを読み出したり、データを書き込んだりしながら、予め定められた処理を実行する。
続いて、固有の機能を提供するための処理が終了したか否かを判断して(S105)、処理が終了していない場合は(S105:no)、そのまま処理を継続する。
これに対して処理が終了した場合は(S105:yes)、機能の提供が完了した旨をメインプログラムモジュール10mに対して出力する(S106)。
During a process for providing a unique function, a predetermined process is executed while reading data from or writing data to the memory 20 (see FIG. 4).
Subsequently, it is determined whether or not the process for providing the unique function is completed (S105). 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, end information indicating that the process for providing the function has ended 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 at the address number in which the oldest data is stored in the operation history storage area 21a, as in the case of storing the above-described activation information and arguments. For example, when an argument is stored in S103, the end information is stored in the address number next to the address number storing the argument (address number ad1 in the case of address number ad8). If the argument is not stored in S103, the end information is stored following the address number in which the activation information is stored in S101.
When the end information is thus written in the operation history storage area 21a of the backup memory 21, the function providing process in FIG.

上述したように、本実施例の機能プログラムモジュール10は、起動時には起動情報を、引数が供給された場合には引数を、そして終了時には終了情報を、バックアップメモリ21の動作履歴保存領域21aに時系列で書き込んでいる。このため、アプリケーションプログラム1の実行中に、監視プログラムモジュール10wがメインプログラムモジュール10mを初期化した場合でも、バックアップメモリ21を調べることによって、初期化された原因を容易に特定することができる。
特に、本実施例のアプリケーションプログラム1では、機能プログラムモジュール10がバックアップメモリ21の動作履歴保存領域21aに、起動情報や終了情報などを時系列で書き込んでいる。このため、詳細には後述するが、動作履歴保存領域21aを調べることで、それぞれの機能プログラムモジュール10が起動した時の状況を知ることができるので、監視プログラムモジュール10wによる初期化が発生した原因を、より一層容易に特定することが可能となる。
As described above, the function program module 10 according to the present exemplary embodiment stores the startup information at the time of startup, the argument when an argument is supplied, and the end information at the time of termination in the operation history storage area 21a of the backup memory 21. I am writing in series. For this reason, even when the monitoring program module 10w initializes the main program module 10m during the execution of the application program 1, the initialization cause can be easily identified by examining the backup memory 21.
In particular, in the application program 1 of this embodiment, the function program module 10 writes start information, end information, and the like in the operation history storage area 21a of the backup memory 21 in time series. For this reason, as will be described in detail later, it is possible to know the situation when each function program module 10 is activated by examining the operation history storage area 21a. Can be identified 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 a state in which data is written in the operation history storage area 21a as the main program module 10m sequentially activates the function program modules 10. In the following description, it is assumed that the main program module 10m is activating the function program module 10 in the order shown in FIG.
As described above with reference to FIG. 2, the main program module 10m first activates the function program module 10a. Accordingly, the function program module 10a is activated in the address number ad1 of the operation history storage area 21a. Information Ast is written. Further, the function program module 10a uses one argument, and accordingly, the argument Av of the function program module 10a is written to the address number ad2 of the operation history storage area 21a. Further, when the function program module 10a ends the operation, the end information Aen of the function program module 10a is written to the address number ad3.

また、メインプログラムモジュール10mは、機能プログラムモジュール10aに続いて機能プログラムモジュール10bを起動する(図2参照)。これに伴って、動作履歴保存領域21aのアドレス番号ad4には、機能プログラムモジュール10bの起動情報Bstが書き込まれる。また、機能プログラムモジュール10bは2つの引数を使用していることに伴って、動作履歴保存領域21aのアドレス番号ad5およびアドレス番号ad6には、2つの引数Bv1,Bv2が書き込まれ、更に、動作履歴保存領域21aのアドレス番号ad7には、機能プログラムモジュール10bの終了情報Benが書き込まれる。   The main program module 10m activates the function program module 10b following the function program module 10a (see FIG. 2). Accordingly, the activation information Bst of the function program module 10b is written to the address number ad4 in the operation history storage area 21a. As the function program module 10b uses two arguments, two arguments Bv1 and Bv2 are written in the address number ad5 and address number ad6 of the operation history storage area 21a. The end information Ben of the function 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 function program module 10c. Accordingly, the activation information Cst of the function program module 10c is written to the address number ad8 in the operation history storage area 21a. Since the function program module 10c does not use an argument, the end information Cen of the function program module 10c is written to the address number ad1 of the operation history storage area 21a.
Hereinafter, similarly, each time the function program module 10 is activated, the activation information of the function program module 10 is written in the operation history storage area 21a, and if an argument exists, the argument is also written. When the function program module 10 ends, the end information of the function 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 is considered in which the main program module 10m is initialized by the monitoring program module 10w during the operation of the function program module 10d.
As described above, the contents stored in the backup memory 21 are not erased even if initialized, so the initialization state storage area 21b of the backup memory 21 is initialized as in the conventional application program 1. The operation status of the function program module 10 that was operating at the time of recording is recorded. Further, information written by the function program module 10 before initialization is recorded in the operation history storage area 21a.

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

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

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

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

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

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

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

以上、本発明の実施例について説明したが、本発明は上記の実施例に限られるものではなく、その要旨を逸脱しない範囲において種々の態様で実施することができる。   As mentioned above, although the Example of this invention was described, this invention is not restricted to said Example, In the range which does not deviate from the summary, it can implement in a various aspect.

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

Claims (7)

コンピュータ上で所定の目的処理を実行するアプリケーションプログラム(1)であって、
前記目的処理で用いられる個々の機能を実現するプログラムである複数の機能プログラムモジュール(10)と、
前記複数の機能プログラムモジュールを所定の順序で起動させることによって、前記目的処理を実現するプログラムであるメインプログラムモジュール(10m)と、
前記機能プログラムモジュールの実行時間を監視して、該実行時間が所定の上限時間を超えた場合には、実行中の前記機能プログラムモジュールを特定可能な情報を所定のバックアップメモリ(21)に保持した状態で、前記メインプログラムモジュールを初期化するプログラムである監視プログラムモジュール(10w)と
を備え、
前記機能プログラムモジュールは、起動したことを示す起動情報と、前記機能を実現する動作を終了したことを示す終了情報とを、時系列で前記バックアップメモリに記憶すると共に、前記バックアップメモリに前回に起動した前記機能プログラムモジュールの情報が記憶されていた場合には、該情報に続けて、前記起動情報および前記終了情報を記憶する
ことを特徴とするアプリケーションプログラム。
An application program (1) for executing a predetermined target process on a computer,
A plurality of function program modules (10) which are programs for realizing individual functions used in the object processing;
A main program module (10m) which is a program for realizing the target processing by activating the plurality of function program modules in a predetermined order;
When the execution time of the function program module is monitored and the execution time exceeds a predetermined upper limit time, information that can identify the function program module being executed is stored in a predetermined backup memory (21). A monitoring program module (10w) that is a program for initializing the main program module in a state,
The function program module stores start information indicating start-up and end information indicating end of the operation for realizing the function in the backup memory in time series, and starts the previous time in the backup memory. When the information on the function program module is stored, the activation information and the end information are stored following the information.
請求項1に記載のアプリケーションプログラムであって、
前記監視プログラムモジュールは、前記メインプログラムモジュールを初期化するに際して、実行中の前記機能プログラムモジュールを特定可能な情報を前記バックアップメモリに保存する
ことを特徴とするアプリケーションプログラム。
An application program according to claim 1,
The monitoring program module stores, in the backup memory, information that can identify the function program module being executed when the main program module is initialized.
請求項1または請求項2に記載のアプリケーションプログラムであって、
前記機能プログラムモジュールは、前記起動情報に加えて、前記起動に際して受け取った引数も、前記バックアップメモリに保存する
ことを特徴とするアプリケーションプログラム。
An application program according to claim 1 or claim 2,
The function program module stores, in addition to the activation information, an argument received at the activation in the backup memory.
請求項1ないし請求項3の何れか一項に記載のアプリケーションプログラムであって、
前記機能プログラムモジュールは、前記バックアップメモリに保存されたデータ量が所定の上限量を超えた場合には、古いデータから順番に、新しいデータを上書き保存する
ことを特徴とするアプリケーションプログラム。
An application program according to any one of claims 1 to 3,
The function program module, when the amount of data stored in the backup memory exceeds a predetermined upper limit, overwrites and saves new data in order from the oldest data.
コンピュータ上で所定の目的処理を実行するアプリケーションプログラム(1)によって起動され、前記目的処理で用いられる機能を実現する機能プログラムモジュール(10)であって、
前記起動されたことを示す起動情報を、前記アプリケーションプログラムが初期化されても記憶内容が消去されないバックアップメモリ(21)に向けて出力する起動情報出力部(12)と、
前記機能を実現する動作が終了したことを示す終了情報を、前記バックアップメモリに向けて出力する終了情報出力部(14)と
を備え、
前記起動情報出力部は、前記起動情報を、前回に起動された前記機能モジュールが保存した情報に対して、前記バックアップメモリ上で時系列となる位置に出力しており、
前記終了情報出力部は、前記終了情報を、前記起動情報に対して、前記バックアップメモリ上で時系列となる位置に出力する
ことを特徴とする機能プログラムモジュール。
A function program module (10) that is activated by an application program (1) that executes predetermined target processing on a computer and that realizes functions used in the target processing,
An activation information output unit (12) for outputting activation information indicating the activation to a backup memory (21) whose stored contents are not erased even when the application program is initialized;
An end information output unit (14) for outputting end information indicating that the operation for realizing the function has ended to the backup memory;
The activation information output unit outputs the activation information in a time series position on the backup memory with respect to information stored by the functional module activated last time,
The end information output unit outputs the end information to the time-series position on the backup memory with respect to the activation information.
請求項5に記載の機能プログラムモジュールであって、
前記起動情報保存部は、前記起動情報に加えて、前記起動に際して受け取った引数も、前記バックアップメモリに保存する
ことを特徴とする機能プログラムモジュール。
The function program module according to claim 5,
The function information module according to claim 1, wherein the activation information storage unit stores, in addition to the activation information, an argument received at the time of activation in the backup memory.
請求項5または請求項6に記載の機能プログラムモジュールであって、
前記起動情報保存部および前記終了情報保存部は、前記バックアップメモリに保存されたデータ量が所定の上限量を超えた場合には、古いデータから順番に、新しいデータを上書き保存する
ことを特徴とする機能プログラムモジュール。
The function program module according to claim 5 or 6, wherein
When the amount of data stored in the backup memory exceeds a predetermined upper limit, the startup information storage unit and the end information storage unit overwrite and store new data in order from the old data. Function program module to do.
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 true JP2019185276A (en) 2019-10-24
JP7102883B2 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
JP7102883B2 (en) 2022-07-20

Similar Documents

Publication Publication Date Title
US20100169546A1 (en) Flash memory access circuit
JP2010086364A (en) Information processing device, operation state monitoring device and method
US7281163B2 (en) Management device configured to perform a data dump
US8245085B2 (en) Dump output control apparatus and dump output control method
JP2006338445A (en) Abnormality information storage apparatus
JP7063445B2 (en) Fault information processing program, computer, fault notification method, computer system
JP2010009296A (en) Software operation monitoring device and method
JP2019152995A (en) Computer and control method thereof
JP5849491B2 (en) Disk control device, disk device abnormality detection method, and program
JP7102883B2 (en) Application program, function program module
US8280927B2 (en) Electronic equipment and memory managing program
JP2015118493A (en) Trace device and trace program
JP2008299360A (en) History information management method and history information management system
JP2008140124A (en) Data processor
KR101539933B1 (en) Method and apparatus for creating log on cpu hang-up
CN101311909A (en) System peculiarity diagnose method
JP5277217B2 (en) Information processing apparatus and computer program
JP4527419B2 (en) Program trace method and trace processing system
JP2010056744A (en) Information processor, image forming apparatus, and program
JP7074291B2 (en) Information processing equipment, information processing methods and programs
JP5201597B2 (en) Memory initialization circuit, memory initialization method, and information processing apparatus
KR20080044652A (en) Method for debugging by using stack of cpu
JP2006235924A (en) Electronic control device for detecting execution address abnormality of program
JP2001051854A (en) Information management system
JP2008242592A (en) Memory monitoring circuit, information processing apparatus and memory monitoring method

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