JPH07168738A - Program inspecting device - Google Patents

Program inspecting device

Info

Publication number
JPH07168738A
JPH07168738A JP5316381A JP31638193A JPH07168738A JP H07168738 A JPH07168738 A JP H07168738A JP 5316381 A JP5316381 A JP 5316381A JP 31638193 A JP31638193 A JP 31638193A JP H07168738 A JPH07168738 A JP H07168738A
Authority
JP
Japan
Prior art keywords
program
subroutine
inspection
information table
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5316381A
Other languages
Japanese (ja)
Inventor
Masahiko Osada
正彦 長田
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.)
Toshiba Engineering Corp
Original Assignee
Toshiba Engineering 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 Toshiba Engineering Corp filed Critical Toshiba Engineering Corp
Priority to JP5316381A priority Critical patent/JPH07168738A/en
Publication of JPH07168738A publication Critical patent/JPH07168738A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To accurately inspect the operating state of each subroutine of a program formed with a main program and plural subroutines under real operating environment. CONSTITUTION:An inspection information table 10 which stores a subroutine name set as an inspection target, a variable name to be monitored, and the number of times of execution of the subroutine is provided, and the readout instructions of entry inspection processing and exit inspection processing are inserted to the leading step and final step of an inspection target subroutine registered on the inspection information table 10, and the number of times of execution of the subroutine is updated reacting according to the readout instruction of the entry inspection processing in the execution process of the program, and the present value of a designated variable is also written on the inspection information table 10 as a start value. Also, the present value of the variable designated on the subroutine is read reacting according to the readout instruction of the exit inspection processing in the execution process of the program, and it is written on the inspection information table 10 as a completion value.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータ等の情報
処理装置にロードされたプログラムを検査するプログラ
ム検査装置に係わり、特に、サブルーチンが正常に読出
されて正しく実行されたか否かを検査するプログラム検
査装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program inspection device for inspecting a program loaded in an information processing device such as a computer, and more particularly to a program for inspecting whether a subroutine has been normally read and executed correctly. Regarding inspection equipment.

【0002】[0002]

【従来の技術】コンピュータ等の各種情報処理装置に組
込まれるアプリケーションプログラムにおいて、同一処
理を繰返し実行する場合ににおいては、その処理をサブ
ルーチンに組込む。そして、メインプログラムには、そ
のサブルーチンの読出命令のみを書込むことによって、
プログラムの簡素化を図るようにしている。
2. Description of the Related Art In an application program incorporated in various information processing devices such as a computer, when the same process is repeatedly executed, the process is incorporated into a subroutine. Then, by writing only the read instruction of the subroutine in the main program,
We are trying to simplify the program.

【0003】また、繰返し実行しない業務であっても、
その業務がメインプログラム中で独立した業務である場
合には、この独立した業務をサブルーチンに置き換える
ことによって、メインプログラムの簡素化を図る場合も
ある。
In addition, even if the job is not repeatedly executed,
When the work is an independent work in the main program, the main program may be simplified by replacing the independent work with a subroutine.

【0004】図6はコンピュータ等の情報処理装置の記
憶部にロードされたプログラムを示す図である。このプ
ログラムは、例えば1つのメインプログラム1と3個の
サブルーチン2a,2b,2cとで構成されている。メ
インプログラム1内には、必要なプログラムステップ位
置に各サブルーチンを読出すための読出命令[CALL SUB
A],[CALL SUB B],[CALL SUB B]が挿入されてい
る。
FIG. 6 is a diagram showing a program loaded in a storage unit of an information processing apparatus such as a computer. This program is composed of, for example, one main program 1 and three subroutines 2a, 2b, 2c. In the main program 1, a read command [CALL SUB for reading each subroutine to the required program step position is used.
[A], [CALL SUB B], and [CALL SUB B] are inserted.

【0005】したがって、実際にこのプログラムの実行
過程において、プログラムカウンタのプログラムステッ
プが該当位置に達すると、プログラム制御が該当するサ
ブルーチンA.B,Cに移動して、該当サブルーチン
A.B,Cが実行される。サブルーチン処理が終了する
と、プログラム制御が元のメインプログラムに戻る。
Therefore, when the program step of the program counter reaches the corresponding position in the course of actually executing this program, the program control of the corresponding subroutine A. B, C, and the corresponding subroutine A. B and C are executed. When the subroutine processing ends, the program control returns to the original main program.

【0006】このようなメインプログラム1に複数のサ
ブルーチン2a〜2cが組込まれたプログラムが仕様書
通りに動作する否かを検査する必要がある。このプログ
ラム検査においては、プログラムの文法的な誤りは自動
化されたプログラムチェッカー等を用いて比較的容易に
検査可能である。しかし、文法的な誤りでない、各サブ
ルーチン2a〜2cが正しく読出されていない等の誤り
や、サブルーチン内で仕様書通りに演算処理されていな
い等の誤りは、メインプログラムの各プログラムステッ
プを、その都度プログラムの実行処理を中断して、技術
者が確認していた。
It is necessary to check whether or not a program in which a plurality of subroutines 2a to 2c are incorporated in the main program 1 operates according to specifications. In this program check, grammatical errors in the program can be checked relatively easily using an automated program checker or the like. However, an error such as not being a grammatical error, that each of the subroutines 2a to 2c is not correctly read, or an error that the arithmetic processing is not performed according to the specifications in the subroutine, causes each program step of the main program to The technician confirmed that the program execution process was interrupted each time.

【0007】[0007]

【発明が解決しようとする課題】このように、メインプ
ログラムの各プログラムステップを、その都度プログラ
ムの実行処理を中断して、各プログラムステップにおけ
る処理を順番に検査していく検査手法においては、前述
した誤りを発見するのに多大の時間と労力が必要であっ
た。
As described above, in the inspection method in which each program step of the main program is interrupted each time the execution processing of the program is interrupted and the processing in each program step is inspected in order, It took a lot of time and effort to discover the mistakes made.

【0008】また、重要なプログラムステップにおいて
その都度実行を中断しながらプログラム処理を進めてい
くと、プログラム実行環境が実際のプログラム実行環境
と大きく異なってしまう。
Further, if the program processing is advanced while interrupting the execution at each important program step, the program execution environment will be greatly different from the actual program execution environment.

【0009】その結果、実際の実行環境下で検査済みの
プログラムを実行させると、プログラム検査中には発見
されなかった新たな誤りが発生する懸念がある。また、
プログラムにおける演算結果が異常であることが確認で
きたとしても、その異常がどのプログラムステップで生
じたのか、またはどのサブルーチンで発生したのかを簡
単に推測できない問題がある。
As a result, when a program that has already been inspected is executed in an actual execution environment, there is a concern that a new error not found during the program inspection may occur. Also,
Even if it can be confirmed that the calculation result in the program is abnormal, there is a problem that it is not possible to easily estimate in which program step or in which subroutine the abnormality occurred.

【0010】本発明はこのような事情に鑑みてなされた
ものであり、各サブルーチンの実行開始時と実行終了時
の情報を登録する検査情報テーブルを設けることによっ
て、検査対象のプログラムに簡単な読出命令を付加する
のみで、ほぼ実際の実行環境に近い条件でプログラムを
実行させながら、サブルーチンに関する確実なプログラ
ム検査を簡単にかつ能率差的に実施できるプログラム検
査装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and by providing an inspection information table for registering information at the start and end of execution of each subroutine, the program to be inspected can be easily read. An object of the present invention is to provide a program inspection device that can execute a reliable program inspection for a subroutine easily and efficiently while executing a program under conditions close to an actual execution environment only by adding an instruction.

【0011】[0011]

【課題を解決するための手段】上記課題を解消するため
に本発明は、メインプログラム中に複数のサブルーチン
が含まれるプログラムを検査するプログラム検査装置に
おいて、入力装置を介して指定された検査対象とするサ
ブルーチン名と該当サブルーチンで演算される監視すべ
き変数名、及び該当サブルーチンの実行回数を記憶する
ための検査情報テーブルと、検査情報テーブルに登録さ
れた検査対象サブルーチンの先頭ステップ及び最終ステ
ップに入口検査処理及び出口検査処理の読出命令を挿入
する読出命令挿入手段と、プログラムの実行過程におけ
る入口検査処理の読出命令に応動して、検査情報テーブ
ルの該当サブルーチンの実行回数を更新し、かつ該当サ
ブルーチンに指定された変数の現在値を検査情報テーブ
ルに開始値として書込むサブルチン開始登録手段と、プ
ログラムの実行過程における出口検査処理の読出命令に
応動して、検査情報テーブルの該当サブルーチンに指定
された変数の現在値を読取って検査情報テーブルに終了
値として書込むサブルーチン終了登録手段とを備えたも
のである。
In order to solve the above problems, the present invention provides a program inspection apparatus for inspecting a program in which a plurality of subroutines are included in a main program, and an inspection target specified via an input device. The inspection information table for storing the subroutine name to be monitored, the variable name to be monitored in the relevant subroutine, and the execution count of the relevant subroutine, and the entrance to the first step and the last step of the inspection target subroutine registered in the inspection information table. In response to the read command insertion means for inserting the read command of the inspection process and the exit inspection process and the read command of the entrance inspection process in the process of executing the program, the number of executions of the corresponding subroutine of the inspection information table is updated, and the corresponding subroutine is updated. The current value of the variable specified in Subroutine for reading the current value of the variable designated in the relevant subroutine of the inspection information table and writing it as the end value in the inspection information table in response to the subroutine start registration means to be loaded and the read instruction of the exit inspection process in the process of executing the program. And an end registration means.

【0012】[0012]

【作用】このように構成されたプログラム検査装置にお
いては、検査対象のプログラムを通常の実行環境下で起
動させるると、プログラムにおけるメインプログラムの
各ブログラムステップの各命令が順番に実行されてい
く。そして、サブルーチンの読出命令が存在すると、プ
ログラム制御が該当サブルーチンに移動する。そして、
該当サブルーチンが開始されるが、このサブルーチンの
先頭ステップに入口検査処理の読出命令が設定されてい
るので、プログラムの制御が入口検査処理に移り、この
入口検査処理が実行される。すなわち、該当サブルーチ
ンの実行回数がインクリメントされ、指定された変数の
現在値が検査情報テーブルに開始値として記憶保持され
る。
In the program inspection apparatus thus constructed, when the program to be inspected is activated in a normal execution environment, the instructions of each program step of the main program in the program are sequentially executed. . Then, if there is a read instruction of the subroutine, the program control moves to the relevant subroutine. And
The corresponding subroutine is started, but since the read instruction of the entrance inspection process is set in the first step of this subroutine, the control of the program shifts to the entrance inspection process, and this entrance inspection process is executed. That is, the number of times the subroutine is executed is incremented, and the current value of the designated variable is stored and held in the inspection information table as the start value.

【0013】同様に、該当サブルーチンの終了時には、
出口検査処理が起動され、指定された変数の現在値が検
査情報テーブルに終了値として記憶保持される。このよ
うに、予め検査情報テーブルに登録された各サブルーチ
ンにおける実行回数と該当サブルーチンの開始前及び開
始後の指定された変数の値が記憶保持される。したがっ
て、最終的に得られた値が仕様通りでない場合には、各
サブルーチンの実行回数や開始値及び終了値を参考にし
てプログラムの異常箇所を短時間で特定できる。
Similarly, at the end of the subroutine,
The exit inspection process is activated, and the current value of the specified variable is stored and held in the inspection information table as the end value. In this way, the number of executions in each subroutine registered in advance in the inspection information table and the value of the specified variable before and after the start of the relevant subroutine are stored. Therefore, when the finally obtained value does not conform to the specifications, the abnormal portion of the program can be specified in a short time by referring to the execution count of each subroutine and the start value and the end value.

【0014】また、プログラムの実行途中でオペレータ
の操作入力が介在しないので、プログラム検査を実際の
動作環境下で実行でき、確実にプログラムの異常部分を
抽出できる。
Further, since there is no operator's operation input during the execution of the program, the program inspection can be executed in the actual operating environment, and the abnormal portion of the program can be reliably extracted.

【0015】[0015]

【実施例】以下本発明の一実施例を図面を用いて説明す
る。図1は実施例のプログラム検査装置が組込まれたコ
ンピュータからなる情報処理装置の概略構成を示すブロ
ック図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of an information processing apparatus including a computer in which the program inspection apparatus according to the embodiment is incorporated.

【0016】バス3に対して、各種情報処理を実行する
制御部4、CRT表示器5aとキーボード5bとで構成
されたマンマシン装置5、例えばFD6aに記憶された
検査対象のプログラムを読込むためのFDDからなるプ
ログラム入力装置6,読取ったプログラムを記憶するア
プリケーションプログラムメモリ7、検査プログラムを
記憶する検査プログラムメモリ8、検査用サブルーチン
メモリ9、検査情報テーブル10,及び他の機器に接続
されるインタフェース11等が接続されている。
An FDD for reading a program to be inspected, which is stored in a man-machine device 5 including a control unit 4 for executing various information processing, a CRT display 5a and a keyboard 5b, for example, an FD 6a, on the bus 3. A program input device 6 including an application program memory 7 for storing a read program, an inspection program memory 8 for storing an inspection program, an inspection subroutine memory 9, an inspection information table 10, and an interface 11 connected to other equipment. Are connected.

【0017】前記アプリケーションプログラムメモリ7
内に書込まれたプログラムは例えば、図6に示すよう
に、メインプログラム1と複数のサブルーチン2a,2
b,…,2nとで構成されている。
The application program memory 7
The program written in the main program 1 and a plurality of subroutines 2a, 2 as shown in FIG.
b, ..., 2n.

【0018】検査情報テーブル10内には、図2に示す
ように、操作員が指定したサブルーチン名及び該当サブ
ルーチンのアドレスを記憶する各領域10b.10a、
該当サブルーチンの実行回数Nを記憶する領域10c、
現在該当サブルーチンが実行中であることを示す実行フ
ラグを記憶する領域10dが形成されている。
In the inspection information table 10, as shown in FIG. 2, each area 10b. 10a,
An area 10c for storing the number of executions N of the corresponding subroutine,
An area 10d for storing an execution flag indicating that the corresponding subroutine is currently being executed is formed.

【0019】さらに、この検査情報テーブル10内に
は、該当サブルーチンで演算される監視すべき変数名を
記憶する領域10e、該当変数における該当サブルーチ
ンの開始時点における開始値を記憶する領域10f、該
当変数における該当サブルーチンの終了時点における終
了値を記憶する領域10g等が形成されている。
Further, in the inspection information table 10, an area 10e for storing a variable name to be monitored which is calculated in the corresponding subroutine, an area 10f for storing a start value of the corresponding variable at the start time of the subroutine, and an applicable variable. An area 10g for storing the end value at the end time of the corresponding subroutine is formed.

【0020】また、検査用サブルーチンメモリ9内に
は、入口検査サブルーチン9a及び出口検査サブルーチ
ン9bの各プログラムが記憶されている。前記制御部4
は、検査プログラムメモリ8に記憶されている検査プロ
グラムに従って図3に示すプログラム検査処理を実行す
る。
The inspection subroutine memory 9 stores the programs of the entrance inspection subroutine 9a and the exit inspection subroutine 9b. The control unit 4
Executes the program inspection processing shown in FIG. 3 in accordance with the inspection program stored in the inspection program memory 8.

【0021】プログラムが開始され、P(プログラムス
テップ)1において、プログラム入力装置6を起動し
て、FD6aに記録されているメインプログラム1と複
数のサブルーチン2a〜2nからなる検査対象のプログ
ラムを読取って、アプリケーションプログラムメモリ7
へ書込む(P2)。
The program is started, and at P (program step) 1, the program input device 6 is activated to read the program to be inspected, which is recorded in the FD 6a and includes the main program 1 and a plurality of subroutines 2a to 2n. , Application program memory 7
Write to (P2).

【0022】そして、P3において、操作員によって、
マンマシン装置5を介して、検査を行おうとするサブル
ーチン名及びこのサブルーチンの格納アドレスが指定さ
れると(P3)、該当サブルーチン2a〜2nをアプリ
ケーションプログラムメモリ7内から読出して、図2に
示すように、先頭ステップに入口読出命令[CHK ON]を
挿入し,かつ最終ステップに出口読出命令[CHK OFF ]
を挿入する(P4)。そして、入口読出命令[CHK ON]
及び出口読出命令[CHK OFF ]が付加されたサブルーチ
ンを元のアプリケーションプログラムメモリ7に書込む
(P5)。すなわち、アプリケーションプログラムメモ
リ7に記憶されていた該当サブルーチン2a〜2nに上
述した2つの命令が付加される。
Then, at P3, by the operator,
When the name of the subroutine to be inspected and the storage address of this subroutine are specified via the man-machine device 5 (P3), the corresponding subroutines 2a to 2n are read out from the application program memory 7 and as shown in FIG. Insert the entry read instruction [CHK ON] at the first step and exit read instruction [CHK OFF] at the last step.
Is inserted (P4). And entrance read command [CHK ON]
And the subroutine to which the exit read instruction [CHK OFF] is added are written in the original application program memory 7 (P5). That is, the above two instructions are added to the corresponding subroutines 2a to 2n stored in the application program memory 7.

【0023】その後、該当サブルーチン名及び格納アド
レスを検査情報テーブル10の各領域10b,10aに
登録する(P6)。該当サブルーチン内で演算される各
変数のうち監視すべき変数名が操作員によってマンマシ
ン装置5から入力されると、該当変数名を検査情報テー
ブル10の該当サブルーチンに対応する領域10eに登
録する(P8)。
Thereafter, the relevant subroutine name and storage address are registered in the respective areas 10b and 10a of the inspection information table 10 (P6). When the operator inputs a variable name to be monitored among the variables calculated in the relevant subroutine from the man-machine device 5, the relevant variable name is registered in the area 10e of the inspection information table 10 corresponding to the relevant subroutine ( P8).

【0024】以上で、検査すべき一つのサブルーチン2
a〜2nの検査情報テーブル10への登録処理が終了す
ると、P3へ戻り、次のサブルーチン2a〜2nの検査
情報の検査情報テーブル10への登録処理を開始する。
Thus, one subroutine 2 to be inspected
When the registration processing of a to 2n in the inspection information table 10 is completed, the process returns to P3, and the registration processing of the inspection information of the next subroutine 2a to 2n in the inspection information table 10 is started.

【0025】検査すべき全てのサブルーチン2a〜2n
の検査情報の検査情報テーブル10への登録処理が終了
して、P9にて、操作員にてキーボード5bからプログ
ラムの起動指令が入力されると、アプリケーションプロ
グラムメモリ7に記憶されているメインプログラム1と
複数の修正後のサブルーチン2a〜2nからなる検査対
象のプログラムを起動する(P10)。
All subroutines 2a-2n to be checked
When the operator inputs a program start command from the keyboard 5b at P9 after the registration processing of the inspection information of the above into the inspection information table 10 is completed, the main program 1 stored in the application program memory 7 And a program to be inspected consisting of a plurality of corrected subroutines 2a to 2n is activated (P10).

【0026】プログラムによる処理動作が終了すると
(P11)、検査情報テーブル10に記憶保持された各
種の情報をCRT表示器5aに表示出力する(12)。
その後、各サブルーチン2a〜2nに加入した入口読出
命令[CHK ON]及び出口読出命令[CHK OFF ]を削除し
て、元の状態の戻す。
When the processing operation by the program is completed (P11), various information stored and held in the inspection information table 10 is displayed and output on the CRT display 5a (12).
After that, the entrance read command [CHK ON] and the exit read command [CHK OFF] that have joined each of the subroutines 2a to 2n are deleted to restore the original state.

【0027】図4は、図3のP10にてプログラムが起
動されて、プログラムステップがサブルーチンの読出命
令[call SUB A]〜[call SUB N]を指示した場合にプ
ログラム制御が該当サブルーチン2a〜2nに移動し
て、先頭ステップの入口読出命令[CHK ON]が実行され
た場合に実行される入口検査サブルーチン9aの処理内
容を示す流れ図である。
In FIG. 4, when the program is started at P10 of FIG. 3 and the program step issues a read instruction [call SUB A] to [call SUB N] of the subroutine, the program control is the corresponding subroutine 2a to 2n. 9 is a flowchart showing the processing contents of an entrance inspection subroutine 9a executed when the entrance read instruction [CHK ON] of the first step is executed by moving to FIG.

【0028】この入口検査サブルーチン9aが開始され
ると、検査情報テーブル10内の今回起動されたサブル
ーチン名に対応する領域10cの実行回数Nに1を加算
する(Q1)。そして、該当サブルーチンに対応する領
域10dの実行フラグを1に設定した後(Q2)、該当
サブルーチンに対応する領域10eに記憶された変数の
現在値を図示しないワークメモリから読取って検査情報
テーブル10内の該当サブルーチンに対応する領域10
fへ開始値として書込む(Q3)。以上の登録処理が終
了すると、ブログラム制御を元のサブルーチン2a〜2
nへ戻す。
When the entrance inspection subroutine 9a is started, 1 is added to the execution count N of the area 10c corresponding to the subroutine name activated this time in the inspection information table 10 (Q1). Then, after setting the execution flag of the area 10d corresponding to the relevant subroutine to 1 (Q2), the current values of the variables stored in the area 10e corresponding to the relevant subroutine are read from the work memory (not shown) and stored in the inspection information table 10. Area 10 corresponding to the corresponding subroutine of
Write it to f as the start value (Q3). When the above registration process is completed, the original subroutines 2a-2
Return to n.

【0029】また、図5は、図3のP10にてプログラ
ムが起動されて、プログラムステップがサブルーチンの
読出命令[call SUB A]〜[call SUB N]を指示した場
合にプログラム制御が該当サブルーチン2a〜2nに移
動して、該当該当サブルーチン2a〜2nの処理が終了
して、該当サブルーチン内の最終ステップの出口読出命
令[CHK OUT ]が実行された場合に実行される出口検査
サブルーチン9bの処理内容を示す流れ図である。
Further, in FIG. 5, when the program is started at P10 in FIG. 3 and the program step issues a read instruction [call SUB A] to [call SUB N] of the subroutine, the program control is the relevant subroutine 2a. To 2n, the processing of the corresponding subroutines 2a to 2n is completed, and the processing contents of the exit check subroutine 9b executed when the exit read instruction [CHK OUT] of the final step in the corresponding subroutine is executed 2 is a flowchart showing

【0030】この出口検査サブルーチン9bが開始され
ると、検査情報テーブル10内の今回実行したサブルー
チンに対応する領域10dの実行フラグを0に解除する
(R1)。そして、該当サブルーチンに対応する領域1
0eに記憶された変数の現在値を図示しないワークメモ
リから読取って検査情報テーブル10内の該当サブルー
チンに対応する領域10gへ終了値として書込む(R
2)。
When the exit inspection subroutine 9b is started, the execution flag of the area 10d corresponding to the subroutine executed this time in the inspection information table 10 is cleared to 0 (R1). Area 1 corresponding to the relevant subroutine
The current value of the variable stored in 0e is read from a work memory (not shown) and written as an end value in the area 10g corresponding to the corresponding subroutine in the inspection information table 10 (R
2).

【0031】このように構成されたプログラム検査装置
によれば、操作員は、FD6aからアプリケーションプ
ログラムメモリ7内へロードしたプログラムのうち、検
査を実施しようとするサブルーチン2a〜2nのサブル
ーチン名と該当サブルーチンの格納アドレスをマンマシ
ン装置5を介して入力すると、入力されたサブルーチン
名及び格納アドレスは検査情報テーブル10の各領域1
0b,10aに登録される。
According to the program inspection apparatus having the above-described configuration, the operator selects the subroutine name of the subroutines 2a to 2n to be inspected from the programs loaded from the FD 6a into the application program memory 7 and the corresponding subroutine. When the storage address of the inspection information table 10 is input through the man-machine device 5, the input subroutine name and storage address are
0b and 10a are registered.

【0032】同時に、該当サブルーチンの先頭ステップ
及び最終ステップに入口読出命令,出口読出命令が自動
的に挿入される。また、必要に応じて、該当サブルーチ
ン内で演算される監視対象の変数名をキー入力すると、
該当変数名が検査情報テーブル10の該当サブルーチン
に対応する領域10eに登録される。
At the same time, an entrance read command and an exit read command are automatically inserted in the first step and the last step of the subroutine. Also, if necessary, if you input the name of the variable to be monitored that is calculated in the subroutine,
The relevant variable name is registered in the area 10e corresponding to the relevant subroutine of the inspection information table 10.

【0033】以上の登録処理が終了すると、プログラム
起動指令をキーボード5bから入力する。すると、アプ
リケーションプログラムメモリ7に記憶されたプログラ
ムが起動する。そしてこのプログラムは操作員の操作入
力の介在なしで、実際の実行環境と同一環境下で最後ま
で自動的に実行される。
When the above registration process is completed, a program start command is input from the keyboard 5b. Then, the program stored in the application program memory 7 is activated. Then, this program is automatically executed to the end under the same environment as the actual execution environment without intervention of operator's operation input.

【0034】そして、このプログラムの実行過程におい
て、検査情報テーブル10に登録されたサブルーチンが
実行される毎に、記憶されている該当サブルーチンの実
行回数Nが更新される。さらに、監視指定された変数の
現在値が開始値として領域10fに登録される。
Then, in the course of executing this program, every time the subroutine registered in the inspection information table 10 is executed, the stored execution count N of the corresponding subroutine is updated. Further, the current value of the variable designated for monitoring is registered in the area 10f as a start value.

【0035】また、該当サブルーチンの業務が終了して
メインプロプログラム1に戻る直前に、監視指定された
変数の現在値が終了値として領域10gに登録される。
このように、検査情報テーブル10内には、このプログ
ラムに組込まれた各サブルーチン2a〜2nの実行買回
数N,サブルーチン実行開始前の変数値,実行終了後の
変数値が記憶保持されている。そして、これらの各値は
一連のプログラム動作が終了した時点で、自動的にCR
T表示器5aに表示される。
Immediately before the job of the corresponding subroutine is completed and the main program 1 is returned to, the current value of the variable designated for monitoring is registered in the area 10g as an end value.
As described above, the inspection information table 10 stores the number N of executions of execution of each of the subroutines 2a to 2n incorporated in this program, the variable value before the execution of the subroutine, and the variable value after the completion of the execution. Then, each of these values is automatically CR when the series of program operations is completed.
It is displayed on the T display 5a.

【0036】よって、操作者は各サブルーチン2a〜2
nが正しく実行されたか否か、また、各サブルーチン2
a〜2n内で変数が正しく演算されたか否かを正確に把
握できる。したがって、プログラムの実行結果が仕様書
通りでなく、何荷かの異常が生じていた場合には、検査
情報テーブル10に記憶されてる各サブルーチンの実行
回数N及び各変数の開始値及び終了値を比較照合するこ
とによって、短時間でプログラム上における異常箇所を
究明できる。
Therefore, the operator is required to use each of the subroutines 2a-2
n was executed correctly, and each subroutine 2
It is possible to accurately grasp whether or not the variables are correctly calculated within a to 2n. Therefore, when the execution result of the program is not according to the specification and some abnormality occurs, the execution count N of each subroutine stored in the inspection information table 10 and the start value and the end value of each variable are set. By comparing and collating, the abnormal part on the program can be determined in a short time.

【0037】さらに、プログラム検査は、ほぼ実際のプ
ログラム実行環境下で実施しているので、実際のプログ
ラム実行過程において、新たな異常点が発見される可能
性は非常に小さい。
Further, since the program inspection is carried out under almost the actual program execution environment, it is very unlikely that a new abnormal point will be found in the actual program execution process.

【0038】[0038]

【発明の効果】以上説明したように本発明のプログラム
検査装置よれば、各サブルーチンの実行開始時と実行終
了時の情報を登録する検査情報テーブルを設け、かつ検
査対象のプログラムに簡単な読出命令を付加している。
そして、この読出命令で読出された処理にて前記検査情
報テーブルに各種情報を記憶している。したがって、ほ
ぼ実際の実行環境に近い条件でプログラムを実行させな
がら指定したサブルーチンに関する確実なプログラム検
査を簡単にかつ能率的に実施できる。
As described above, according to the program inspection apparatus of the present invention, an inspection information table for registering information at the start and end of execution of each subroutine is provided, and a simple read instruction is given to a program to be inspected. Is added.
Then, various kinds of information are stored in the inspection information table by the processing read by the read command. Therefore, it is possible to easily and efficiently carry out a reliable program check on the designated subroutine while executing the program under the conditions close to the actual execution environment.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の一実施例に係わるプログラム検査装
置が組込まれた情報処理装置の概略構成を示すブロック
FIG. 1 is a block diagram showing a schematic configuration of an information processing apparatus in which a program inspection apparatus according to an embodiment of the present invention is incorporated.

【図2】 同実施例プログラム検査装置における検査情
報テーブルの構成を示す図
FIG. 2 is a diagram showing a configuration of an inspection information table in the program inspection apparatus of the embodiment.

【図3】 同実施例装置の動作を示す流れ図FIG. 3 is a flowchart showing the operation of the apparatus of the embodiment.

【図4】 同じく同実施例装置の動作を示す流れ図FIG. 4 is a flow chart showing the operation of the apparatus of the same embodiment.

【図5】 同じく同実施例装置の動作を示す流れ図FIG. 5 is a flow chart showing the operation of the apparatus of the same embodiment.

【図6】 一般的なプログラム構成を示す図FIG. 6 is a diagram showing a general program configuration.

【符号の説明】[Explanation of symbols]

1…メインプログラム、2a〜2n…サブルーチン、4
…制御部、5…マンマシン装置、6…プログラム入力装
置、7…アプリケーションプログラムメモリ、8…検査
プログラム、9…検査用サブルーチンメモリ、9a…入
口検査サブルーチン、9b…出口検査サブルーチン、1
0…検査情報テーブル。
1 ... Main program, 2a-2n ... Subroutine, 4
... control unit, 5 ... man-machine device, 6 ... program input device, 7 ... application program memory, 8 ... inspection program, 9 ... inspection subroutine memory, 9a ... entrance inspection subroutine, 9b ... exit inspection subroutine, 1
0 ... Inspection information table.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 メインプログラム中に複数のサブルーチ
ンが含まれるプログラムを検査するプログラム検査装置
において、 入力装置を介して指定された検査対象とするサブルーチ
ン名と該当サブルーチンで演算される監視すべき変数
名、及び該当サブルーチンの実行回数を記憶するための
検査情報テーブルと、 この検査情報テーブルに登録された検査対象サブルーチ
ンの先頭ステップ及び最終ステップに入口検査処理及び
出口検査処理の読出命令を挿入する読出命令挿入手段
と、 前記プログラムの実行過程における前記入口検査処理の
読出命令に応動して、前記検査情報テーブルの該当サブ
ルーチンの実行回数を更新し、かつ該当サブルーチンに
指定された変数の現在値を前記検査情報テーブルに開始
値として書込むサブルチン開始登録手段と、 前記プログラムの実行過程における前記出口検査処理の
読出命令に応動して、前記検査情報テーブルの該当サブ
ルーチンに指定された変数の現在値を読取って検査情報
テーブルに終了値として書込むサブルーチン終了登録手
段と、を備えたプログラム検査装置。
1. A program inspecting apparatus for inspecting a program including a plurality of subroutines in a main program, the name of a subroutine to be inspected designated via an input device, and a variable name to be monitored which is calculated by the subroutine. , And an inspection information table for storing the number of times of execution of the corresponding subroutine, and a read instruction for inserting the read instruction of the entrance inspection process and the exit inspection process at the first step and the last step of the inspection target subroutine registered in this inspection information table. In response to the insertion means and the read instruction of the entrance inspection process in the execution process of the program, the number of executions of the corresponding subroutine in the inspection information table is updated, and the current value of the variable designated in the applicable subroutine is inspected. Saburtin start registration means to write in the information table as a start value And, in response to a read instruction of the exit inspection process in the execution process of the program, a subroutine end registration for reading the current value of the variable designated in the corresponding subroutine of the inspection information table and writing it as an end value in the inspection information table. And a program inspection device comprising:
JP5316381A 1993-12-16 1993-12-16 Program inspecting device Pending JPH07168738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5316381A JPH07168738A (en) 1993-12-16 1993-12-16 Program inspecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5316381A JPH07168738A (en) 1993-12-16 1993-12-16 Program inspecting device

Publications (1)

Publication Number Publication Date
JPH07168738A true JPH07168738A (en) 1995-07-04

Family

ID=18076457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5316381A Pending JPH07168738A (en) 1993-12-16 1993-12-16 Program inspecting device

Country Status (1)

Country Link
JP (1) JPH07168738A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09179753A (en) * 1995-12-26 1997-07-11 Nec Software Ltd Stack information collecting system using timing of return processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09179753A (en) * 1995-12-26 1997-07-11 Nec Software Ltd Stack information collecting system using timing of return processing

Similar Documents

Publication Publication Date Title
US6275955B1 (en) Diagnostic software for facilitating flowchart programming
US5826078A (en) Job re-execution system and controlling method thereof
JPH07168738A (en) Program inspecting device
JPH08305609A (en) Program test method and device
CN114065956A (en) Point inspection method, system, equipment and storage medium for automatic production line
JPH08278809A (en) Plant controller
CN117632723B (en) Automatic simulation adjustment and measurement method, system, equipment and medium
JPH04281536A (en) Program retest system for conversational tool
JPH04373036A (en) Software testing device for computer system
JPH0317749A (en) Inspecting method for test program
JPS6220579B2 (en)
JPH02115951A (en) Maintenance and debug system for high level language program
JPH07253876A (en) Program generating device
JPH06250889A (en) Fault processing system in data processing system
JPH0228169B2 (en)
JPS62103701A (en) Restart control method for sequence controller
JPH0887426A (en) Self-diagnosis state display system
JPH02230433A (en) Program tester
JPH05143395A (en) Diagnostic program execution system and log information display system to be used for the execution system
JPH0279271A (en) Fault processing system for magnetic disk device
JPS63259739A (en) Automatic program inspection system
JPH02219136A (en) Bug inspection method in program modification
JPH05100898A (en) Program debugging system
JPS6341939A (en) Fault restoring system for computer system
JPH04243431A (en) Evaluation system for fault processing function