JPH0778096A - Program test system - Google Patents

Program test system

Info

Publication number
JPH0778096A
JPH0778096A JP5160572A JP16057293A JPH0778096A JP H0778096 A JPH0778096 A JP H0778096A JP 5160572 A JP5160572 A JP 5160572A JP 16057293 A JP16057293 A JP 16057293A JP H0778096 A JPH0778096 A JP H0778096A
Authority
JP
Japan
Prior art keywords
program
source
state variable
source program
test
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
JP5160572A
Other languages
Japanese (ja)
Inventor
Junji Takada
淳司 高田
Hideo Mihashi
秀夫 三橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP5160572A priority Critical patent/JPH0778096A/en
Publication of JPH0778096A publication Critical patent/JPH0778096A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To saves the time and man-hours required for a test by enabling the test of a program including sequence logic and efficiently conducting the program test. CONSTITUTION:A compiler 7 reads and analyzes the source program 1 of the including the sequence logic and generates a driver object program 8 translated by inputting the values of arguments of a procedure declaration part, a stub object program 10 translated by reading stub generation information 9 corresponding to the call description of an external program, and an object program 11 to be tested which includes a state variation information table where state variables are extracted by translating the description of the program to be tested. Those object programs 8, 10, and 11 are linked to generate an execution program 13. A debugging support program 14 allows operation for displaying and updating state variables to be performed from a terminal device 16.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、単体プログラムテスト
方式に関し、特に順序論理を含んでいる単体プログラム
に対するテストを行う単体プログラムテスト方式に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a unit program test method, and more particularly to a unit program test method for testing a unit program including sequential logic.

【0002】[0002]

【従来の技術】従来のプログラムテスト方式では、テス
ト対象の単体プログラムが順序論理を含んでいるときに
は、状態変数の値が不定となるために、常に全体プログ
ラムに対するテストを初期状態から開始しなければなら
ず、対象の単体プログラムだけに対するテストを実施す
ることができなかった。
2. Description of the Related Art In the conventional program test method, when a unit program to be tested includes sequential logic, the value of a state variable becomes undefined, so that the test for the entire program must always be started from the initial state. As a result, it was not possible to test only the target unit program.

【0003】また、従来のプログラムテスト方式では、
テスト対象の単体プログラムが外部プログラムの呼出し
記述を含んでいるときには、外部プログラムの呼出し記
述により呼出されるプログラムの数だけ、あらかじめ、
ダミープログラムを用意してからテストを実施しなけれ
ばならなかった。
Further, in the conventional program test method,
When the unit program to be tested includes the call description of the external program, the number of programs called by the call description of the external program is set in advance in advance.
I had to prepare a dummy program and then test it.

【0004】[0004]

【発明が解決しようとする課題】上述した従来のプログ
ラムテスト方式は、常に全体プログラムに対するテスト
を初期状態から開始しなければならず、また外部プログ
ラムの呼出し記述により呼出されるプログラムの数だ
け、あらかじめ、ダミープログラムを用意してからテス
トを実施しなければならないので、プログラムテストに
時間がかかり効率が悪いという欠点を有している。
In the conventional program test method described above, the test for the whole program must always be started from the initial state, and the number of programs called by the call description of the external program must be set in advance. However, since it is necessary to prepare a dummy program and then carry out the test, there is a drawback that the program test takes time and is inefficient.

【0005】本発明の目的は、順序論理を含む単体プロ
グラムに対するテストを可能にすることにより、プログ
ラムテストに要する時間および工数を節約して、効率の
良いプログラムテストを実施することができる単体プロ
グラムテスト方式を提供することにある。
An object of the present invention is to enable a test for a unit program including sequential logic, thereby saving the time and man-hours required for the program test and executing the unit test efficiently. To provide a method.

【0006】[0006]

【課題を解決するための手段】第1の発明の単体プログ
ラムテスト方式は、(A)順序論理を含む単体プログラ
ムである原始プログラムを読込んで解析することによ
り、前記原始プログラム内の手続き宣言部および外部プ
ログラムの呼出し並びに状態変数を検出するとともに、
読込みの終了を通知する原始プログラム読込み手段と、
(B)前記原始プログラム読込み手段から前記原始プロ
グラム内の手続き宣言部を受けて、その手続き宣言部に
存在する引数の各々を判定して、各々の値を入力させた
後に、翻訳を行うことにより、前記原始プログラムに対
するドライバ目的プログラムを作成するドライバ生成手
段と、(C)前記原始プログラム読込み手段から前記原
始プログラムの外部プログラムの呼出し記述を受けて、
あらかじめ格納している該当するスタブ生成情報を読込
んで翻訳を行うことにより、前記原始プログラムに対す
るスタブ目的プログラムを作成するスタブ生成手段と、
(D)前記原始プログラム読込み手段から前記原始プロ
グラム内にある状態変数を受けて、状態変数情報テーブ
ルに保持する状態変数情報作成手段と、(E)前記原始
プログラム読込み手段から前記原始プログラム内にある
被テストプログラムの記述を受けて、翻訳を行うととも
に前記原始プログラム読込み手段から前記原始プログラ
ムの読込みの終了通知を受け、前記状態変数情報テーブ
ルを前記被テスト目的プログラム内に生成する被テスト
プログラム生成手段と、(F)前記ドライバ目的プログ
ラム,前記スタブ目的プログラム,前記被テスト目的プ
ログラムのリンクを行った実行プログラムを動作させて
前記状態変数情報テーブル内の状態変数の値を表示した
り更新したりする操作を端末装置から行わせるデバッグ
サポートプログラム内の状態変数操作手段と、を備えて
構成されている。
In the unit program test method of the first invention, (A) by reading and analyzing a source program which is a unit program including sequential logic, a procedure declaration part in the source program and In addition to detecting external program calls and state variables,
A source program reading means for notifying the end of reading,
(B) By receiving a procedure declaration part in the source program from the source program reading means, judging each argument existing in the procedure declaration part, inputting each value, and then translating Driver generation means for creating a driver object program for the source program, and (C) receiving a description of calling the external program of the source program from the source program reading means,
Stub generation means for creating a stub object program for the source program by reading and translating corresponding stub generation information stored in advance,
(D) State variable information creating means for receiving a state variable in the source program from the source program reading means and holding it in a state variable information table, and (E) Inside the source program from the source program reading means. A program under test generating means for receiving the description of the program under test, performing translation, receiving a notification of completion of reading the source program from the source program reading means, and generating the state variable information table in the object program under test. And (F) display or update the value of the state variable in the state variable information table by operating the execution program linked with the driver purpose program, the stub purpose program, and the tested object program. Debug support program that allows operation from the terminal device It is configured by including a state variable operating means of the inner and.

【0007】また、第2の発明の単体プログラムテスト
方式は、(A)順序論理を含む単体プログラムである原
始プログラムを読込んで解析し、前記原始プログラム内
の手続き宣言部に存在する引数を判定して、それぞれの
値を入力させて翻訳したドライバ目的プログラムを作成
し、前記原始プログラムの外部プログラムの呼出し記述
に対して、あらかじめ格納している該当するスタブ生成
情報を読込み翻訳したスタブ目的プログラムを作成し、
前記原始プログラム内にある被テストプログラムの記述
を翻訳するとともに、前記原始プログラム内にある状態
変数を抽出した状態変数情報テーブルを含む被テスト目
的プログラムを作成するコンパイラと、(B)前記ドラ
イバ目的プログラムおよび前記スタブ目的プログラム並
びに前記被テスト目的プログラムを結合して実行プログ
ラムを作成するリンカと、(C)前記実行プログラムを
動作させて前記状態変数情報テーブル内の状態変数の値
を表示したり更新したりする操作を端末装置から行わせ
るデバッグサポートプログラムと、を備えて構成されて
いる。
Further, in the unit program test method of the second invention, (A) a source program which is a unit program including sequential logic is read and analyzed, and arguments existing in the procedure declaration section in the source program are judged. Then, each value is input to create a translated driver object program, and the corresponding stub generation information stored in advance is read and translated for the external program call description of the source program to create a translated stub object program. Then
A compiler that translates the description of the program under test in the source program and creates a target program under test that includes a state variable information table that extracts state variables in the source program; and (B) the driver target program. And a linker that combines the stub object program and the object program under test to create an execution program, and (C) operates the execution program to display or update the value of the state variable in the state variable information table. And a debug support program that allows the terminal device to perform various operations.

【0008】一方、第3の発明の単体プログラムテスト
方式は、(A)コンパイラにより、順序論理を含む単体
プログラムである原始プログラムを読込んで解析して前
記原始プログラム内の手続き宣言部および外部プログラ
ムの呼出し並びに状態変数を検出し、(B)前記原始プ
ログラム内の手続き宣言部に存在する引数の各々を判定
して、各々の値を入力させた後に翻訳を行うことによ
り、前記原始プログラムに対するドライバ目的プログラ
ムを作成し、(C)前記原始プログラムの外部プログラ
ムの呼出し記述に対して、あらかじめ格納している該当
するスタブ生成情報を読込んで翻訳することにより、前
記原始プログラムに対するスタブ目的プログラムを作成
し、(D)前記原始プログラム内にある状態変数を受け
て、状態変数情報テーブルに保持し、(E)前記原始プ
ログラム内にある被テストプログラムの記述を翻訳する
ことにより、前記原始プログラムに対する被テスト目的
プログラムを作成し、前記原始プログラムの読込みの終
了時に、前記状態変数情報テーブルを前記被テスト目的
プログラム内に記憶し、(F)前記ドライバ目的プログ
ラム,前記スタブ目的プログラム,前記被テスト目的プ
ログラムをリンカによって結合した実行プログラムを、
デバッグサポートプログラム内で動作させることによ
り、前記状態変数情報テーブル内の状態変数の値を表示
したり更新したりする操作を端末装置から行わせる、こ
とを含んでいる。
On the other hand, in the unit program test method of the third invention, (A) the compiler reads and analyzes a source program which is a unit program including sequential logic and analyzes the procedure declaration section and the external program in the source program. The purpose of the driver for the source program is to detect the call and state variables, (B) determine each of the arguments present in the procedure declaration section in the source program, input each value, and then perform translation. Creating a program, and (C) creating a stub object program for the source program by reading and translating corresponding stub generation information stored in advance with respect to the call description of the external program of the source program, (D) The status variable information table is received by receiving the status variables in the source program. (E) create a test target program for the source program by translating the description of the program under test in the source program, and at the end of reading the source program, state variable information A table is stored in the tested object program, and (F) an execution program in which the driver object program, the stub object program, and the object program under test are combined by a linker,
It includes causing the terminal device to perform an operation of displaying or updating the value of the state variable in the state variable information table by operating in the debug support program.

【0009】さらに、第4の発明の単体プログラムテス
ト方式は、(A)コンパイラにより順序論理を含む単体
プログラムである原始プログラムを読込み解析し、前記
原始プログラム内の手続き宣言部に存在する引数を判定
してそれぞれの値を入力させて翻訳したドライバ目的プ
ログラムを作成し、前記原始プログラムの外部プログラ
ムの呼出し記述に対してあらかじめ格納している該当す
るスタブ生成情報を読込み翻訳したスタブ目的プログラ
ムを作成し、前記原始プログラム内にある被テストプロ
グラムの記述を翻訳して、前記原始プログラム内にある
状態変数を抽出した状態変数情報テーブルを含む被テス
ト目的プログラムを作成し、(B)リンカにより前記ド
ライバ目的プログラム,前記スタブ目的プログラム,前
記被テスト目的プログラムを結合して実行プログラムを
作成し、(C)デバッグサポートプログラムにより、前
記実行プログラムを動作させて、前記状態変数情報テー
ブル内の状態変数の値を表示したり更新したりする操作
を端末装置から行わせる、ことを含んでいる。
Further, in the unit program test method of the fourth invention, (A) a compiler reads and analyzes a source program which is a unit program including sequential logic, and determines an argument existing in a procedure declaration section in the source program. Then, each value is input to create a translated driver object program, and corresponding stub generation information stored in advance for the calling description of the external program of the source program is read to create a translated stub object program. , A description of a program to be tested in the source program is translated to create a target program to be tested including a state variable information table in which state variables in the source program are extracted, and (B) the linker is used for the driver purpose. Program, the stub purpose program, the tested purpose program A terminal device is used to create an execution program by combining the programs and (C) operate the execution program by the debug support program to display or update the value of the state variable in the state variable information table. It includes things to be done from.

【0010】[0010]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。図1は本発明の単体プログラムテスト方式
の一実施例を示すブロック図である。
Embodiments of the present invention will now be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the unit program test method of the present invention.

【0011】図1に示すように、コンパイラ7の原始プ
ログラム読込み手段2は、順序論理を含む単体プログラ
ムである原始プログラム1を読込んで解析することによ
り、原始プログラム1の手続き宣言部および外部プログ
ラムの呼出し並びに状態変数を検出するとともに、読込
みの終了を通知している。
As shown in FIG. 1, the source program reading means 2 of the compiler 7 reads the source program 1 which is a single program including sequential logic and analyzes it, so that the procedure declaration part of the source program 1 and the external program The call and the state variable are detected, and the end of reading is notified.

【0012】そして、コンパイラ7のドライバ生成手段
3は、原始プログラム読込み手段2から原始プログラム
1内の手続き宣言部を受けて、その手続き宣言部に存在
する引数の各々を判定して、各々の値を入力させた後に
翻訳を行うことにより、原始プログラム1に対するドラ
イバ目的プログラム8を作成している。
Then, the driver generating means 3 of the compiler 7 receives the procedure declaration part in the source program 1 from the source program reading means 2, judges each argument existing in the procedure declaration part, and determines each value. The driver object program 8 for the source program 1 is created by translating after inputting.

【0013】また、コンパイラ7のスタブ生成手段4
は、原始プログラム読込み手段2から原始プログラム1
の外部プログラムの呼出し記述を受けて、あらかじめ格
納している該当するスタブ生成情報9を読込み翻訳を行
うことにより、原始プログラム1に対するスタブ目的プ
ログラム10を作成している。
The stub generating means 4 of the compiler 7
Is from the source program reading means 2 to the source program 1
In response to the call description of the external program, the corresponding stub generation information 9 stored in advance is read and translated to create the stub object program 10 for the source program 1.

【0014】一方、コンパイラ7の状態変数情報作成手
段5は、原始プログラム読込み手段2からの原始プログ
ラム1内にある状態変数を受けて、メモリ上の状態変数
情報テーブルに保持している。
On the other hand, the state variable information creating means 5 of the compiler 7 receives the state variables in the source program 1 from the source program reading means 2 and holds them in the state variable information table on the memory.

【0015】他方、コンパイラ7の被テストプログラム
生成手段6は、原始プログラム読込み手段2から原始プ
ログラム1内にある被テストプログラムの記述を受けて
翻訳を行うことにより、原始プログラム1の被テスト目
的プログラム11を作成するとともに、原始プログラム
読込み手段2から原始プログラム1の読込み終了通知を
受けて、状態変数情報テーブルを被テスト目的プログラ
ム11の中に生成している。
On the other hand, the test program generating means 6 of the compiler 7 receives the description of the test program in the source program 1 from the source program reading means 2 and translates it to thereby test the target program of the source program 1. 11, the state variable information table is generated in the test target program 11 in response to the completion notice of reading the source program 1 from the source program reading means 2.

【0016】次に、リンカ12は、ドライバ目的プログ
ラム8およびスタブ目的プログラム10並びに被テスト
目的プログラム11を結合することにより、実行プログ
ラム13を作成している。
Next, the linker 12 creates the execution program 13 by combining the driver object program 8, the stub object program 10 and the object program under test 11.

【0017】また、デバッグサポートプログラム14内
の状態変数操作手段15は、リンカ12が、ドライバ目
的プログラム8,スタブ目的プログラム10,被テスト
目的プログラム11のリンクを行った結果の実行プログ
ラム13を動作させて、状態変数情報テーブル内の状態
変数の値を表示したり更新したりする操作を端末装置1
6から行わせている。
The state variable operating means 15 in the debug support program 14 operates the execution program 13 which is a result of the linker 12 linking the driver object program 8, the stub object program 10, and the object program under test 11. The terminal device 1 performs an operation of displaying or updating the value of the state variable in the state variable information table.
I'm starting from 6.

【0018】図2は原始プログラム読込み手段2の動作
の一例を示す流れ図である。図3はドライバ生成手段3
の動作の一例を示す流れ図である。図4はスタブ生成手
段4の動作の一例を示す流れ図である。図5は状態変数
情報作成手段5の動作の一例を示す流れ図である。
FIG. 2 is a flow chart showing an example of the operation of the source program reading means 2. FIG. 3 shows the driver generation means 3
6 is a flowchart showing an example of the operation of FIG. FIG. 4 is a flow chart showing an example of the operation of the stub generation means 4. FIG. 5 is a flow chart showing an example of the operation of the state variable information creating means 5.

【0019】次に、本実施例の動作について図2,図
3,図4,図5を参照することにより説明する。まず、
原始プログラム読込み手段2は、図2に示すように、ス
テップ21で、順序論理を含む単体プログラムである原
始プログラム1を読込んで解析することにより、ステッ
プ22で、原始プログラム1内の手続き宣言部を見つけ
ると、ステップ23で、ドライバ生成手段3を呼出して
処理を移行する。
Next, the operation of this embodiment will be described with reference to FIGS. 2, 3, 4 and 5. First,
As shown in FIG. 2, the source program reading means 2 reads the source program 1, which is a single program including sequential logic, and analyzes it in step 21, so that the procedure declaration part in the source program 1 is read in step 22. If found, in step 23, the driver generating means 3 is called to shift the processing.

【0020】また、ステップ24で、外部プログラムの
呼出しを見つけるごとに、ステップ25で、スタブ生成
手段4を呼出して処理を移行する。一方、ステップ26
で、状態変数を見つけるごとに、ステップ27で、状態
変数情報作成手段5を呼出して処理を移行する。
Further, each time a call to the external program is found in step 24, the stub generating means 4 is called in step 25 to shift the processing. On the other hand, step 26
Then, every time a state variable is found, the state variable information creating means 5 is called in step 27 to shift the processing.

【0021】他方、ステップ28で、原始プログラム1
の最後になると、ステップ29で、被テストプログラム
生成手段6を呼出して処理を移行した後に読込みを終了
している。
On the other hand, in step 28, the source program 1
At the end of step 1, in step 29, the test program generating means 6 is called to shift the processing, and then the reading is completed.

【0022】そして、ドライバ生成手段3は、図3に示
すように、ステップ31では、原始プログラム読込み手
段2から原始プログラム1の手続き宣言部を受け、被テ
ストプログラム呼出し命令を作成している。
As shown in FIG. 3, the driver generating means 3 receives the procedure declaring part of the source program 1 from the source program reading means 2 in step 31, and creates a test program calling instruction.

【0023】そこで、ステップ32で、原始プログラム
1内の手続き宣言部に存在する引数の各々を判定して、
ステップ33で、各々の値を入力させた後に翻訳を行う
ことにより、ステップ34で、原始プログラム1に対す
るドライバ目的プログラム8を作成している。
Therefore, in step 32, each of the arguments existing in the procedure declaration section in the source program 1 is judged,
In step 33, the driver object program 8 for the source program 1 is created in step 34 by translating after inputting each value.

【0024】また、スタブ生成手段4は、図4に示すよ
うに、ステップ41で、原始プログラム読込み手段2か
ら原始プログラム1の外部プログラムの呼出し記述を受
けて、あらかじめ格納している該当するスタブ生成情報
9を読込んで翻訳を行うことにより、ステップ42で、
原始プログラム1に対するスタブ目的プログラム10を
作成している。
Further, as shown in FIG. 4, the stub generation means 4 receives the call description of the external program of the source program 1 from the source program reading means 2 in step 41 and generates the corresponding stored stub in advance. By reading the information 9 and translating it, in step 42,
A stub object program 10 for the source program 1 is created.

【0025】一方、状態変数情報作成手段5は、図5に
示すように、ステップ51で、原始プログラム読込み手
段2から原始プログラム1内にある状態変数を受け、メ
モリ上の状態変数情報テーブルに保持している。
On the other hand, as shown in FIG. 5, the state variable information creating means 5 receives the state variables in the source program 1 from the source program reading means 2 in step 51 and holds them in the state variable information table on the memory. is doing.

【0026】[0026]

【発明の効果】以上説明しているように、本発明の単体
プログラムテスト方式は、テスト対象の単体プログラム
に対して端末装置で状態変数の値を表示したり更新した
りする操作を行うことができるとともに、実行プログラ
ム内には被テストプログラムを呼出すドライバと、被テ
ストプログラムから呼出される外部プログラムの代りの
ダミープログラムであるスタブとを内蔵しているので、
全体プログラムに対するテストを常に初期状態から開始
しなくても、外部プログラムの呼出し記述により呼出さ
れるプログラムの数だけのダミープログラムを用意する
こともなく、目的の単体プログラムだけに対するテスト
を実施することができるという効果を有している。
As described above, in the unit program test method of the present invention, the operation of displaying or updating the value of the state variable can be performed in the terminal device for the unit program to be tested. At the same time, the execution program contains a driver that calls the program under test and a stub that is a dummy program that replaces the external program called from the program under test.
Even if the test for the entire program is not always started from the initial state, it is possible to perform the test for only the target single program without preparing dummy programs for the number of programs called by the call description of the external program. It has the effect of being able to.

【0027】この結果、本発明の単体プログラムテスト
方式は、プログラムテストに要する時間および工数が節
約できて効率良くプログラムテストを実施することがで
きるという効果を有している。
As a result, the unit program test method of the present invention has an effect that the time and man-hour required for the program test can be saved and the program test can be efficiently performed.

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

【図1】本発明の単体プログラムテスト方式の一実施例
を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a unit program test method of the present invention.

【図2】原始プログラム読込み手段2の動作の一例を示
す流れ図である。
FIG. 2 is a flowchart showing an example of the operation of the source program reading means 2.

【図3】ドライバ生成手段3の動作の一例を示す流れ図
である。
FIG. 3 is a flowchart showing an example of the operation of the driver generation means 3.

【図4】スタブ生成手段4の動作の一例を示す流れ図で
ある。
FIG. 4 is a flow chart showing an example of the operation of the stub generation means 4.

【図5】状態変数情報作成手段5の動作の一例を示す流
れ図である。
FIG. 5 is a flowchart showing an example of the operation of state variable information creating means 5.

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

1 原始プログラム 2 原始プログラム読込み手段 3 ドライバ生成手段 4 スタブ生成手段 5 状態変数情報作成手段 6 被テストプログラム生成手段 7 コンパイラ 8 ドライバ目的プログラム 9 スタブ生成情報 10 スタブ目的プログラム 11 被テスト目的プログラム 12 リンカ 13 実行プログラム 14 デバッグサポートプログラム 15 状態変数操作手段 16 端末装置 DESCRIPTION OF SYMBOLS 1 source program 2 source program reading means 3 driver generation means 4 stub generation means 5 state variable information generation means 6 test program generation means 7 compiler 8 driver object program 9 stub generation information 10 stub object program 11 test object program 12 linker 13 Execution program 14 Debug support program 15 State variable operating means 16 Terminal device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】(A)順序論理を含む単体プログラムであ
る原始プログラムを読込んで解析することにより、前記
原始プログラム内の手続き宣言部および外部プログラム
の呼出し並びに状態変数を検出するとともに、読込みの
終了を通知する原始プログラム読込み手段と、(B)前
記原始プログラム読込み手段から前記原始プログラム内
の手続き宣言部を受けて、その手続き宣言部に存在する
引数の各々を判定して、各々の値を入力させた後に、翻
訳を行うことにより、前記原始プログラムに対するドラ
イバ目的プログラムを作成するドライバ生成手段と、
(C)前記原始プログラム読込み手段から前記原始プロ
グラムの外部プログラムの呼出し記述を受けて、あらか
じめ格納している該当するスタブ生成情報を読込んで翻
訳を行うことにより、前記原始プログラムに対するスタ
ブ目的プログラムを作成するスタブ生成手段と、(D)
前記原始プログラム読込み手段から前記原始プログラム
内にある状態変数を受けて、状態変数情報テーブルに保
持する状態変数情報作成手段と、(E)前記原始プログ
ラム読込み手段から前記原始プログラム内にある被テス
トプログラムの記述を受けて、翻訳を行うとともに前記
原始プログラム読込み手段から前記原始プログラムの読
込みの終了通知を受け、前記状態変数情報テーブルを前
記被テスト目的プログラム内に生成する被テストプログ
ラム生成手段と、(F)前記ドライバ目的プログラム,
前記スタブ目的プログラム,前記被テスト目的プログラ
ムのリンクを行った実行プログラムを動作させて前記状
態変数情報テーブル内の状態変数の値を表示したり更新
したりする操作を端末装置から行わせるデバッグサポー
トプログラム内の状態変数操作手段と、を備えることを
特徴とする単体プログラムテスト方式。
(A) By reading and analyzing a source program which is a single program including sequential logic, the procedure declaration part and the call of an external program in the source program and the state variables are detected, and the reading ends. And (B) receiving a procedure declaration section in the source program from the source program reading section, judging each argument existing in the procedure declaration section, and inputting each value. And driver generation means for creating a driver object program for the source program by performing translation,
(C) A stub object program for the source program is created by receiving a call description of an external program of the source program from the source program reading means, reading corresponding stub generation information stored in advance, and translating the information. Stub generation means for performing, (D)
State variable information creating means for receiving a state variable in the source program from the source program reading means and holding it in a state variable information table; and (E) a program under test in the source program from the source program reading means. In response to the above description, the program is translated, and the source program reading means receives a notice of completion of the reading of the source program, and a test program generating means for generating the state variable information table in the test target program, F) the driver object program,
A debug support program that causes the terminal device to operate the stub object program and the execution program linked to the object program under test to display and update the value of the state variable in the state variable information table. A unit program test method characterized by comprising:
【請求項2】(A)順序論理を含む単体プログラムであ
る原始プログラムを読込んで解析し、前記原始プログラ
ム内の手続き宣言部に存在する引数を判定して、それぞ
れの値を入力させて翻訳したドライバ目的プログラムを
作成し、前記原始プログラムの外部プログラムの呼出し
記述に対して、あらかじめ格納している該当するスタブ
生成情報を読込み翻訳したスタブ目的プログラムを作成
し、前記原始プログラム内にある被テストプログラムの
記述を翻訳するとともに、前記原始プログラム内にある
状態変数を抽出した状態変数情報テーブルを含む被テス
ト目的プログラムを作成するコンパイラと、(B)前記
ドライバ目的プログラムおよび前記スタブ目的プログラ
ム並びに前記被テスト目的プログラムを結合して実行プ
ログラムを作成するリンカと、(C)前記実行プログラ
ムを動作させて前記状態変数情報テーブル内の状態変数
の値を表示したり更新したりする操作を端末装置から行
わせるデバッグサポートプログラムと、を備えることを
特徴とする単体プログラムテスト方式。
2. (A) A source program which is a unit program including sequential logic is read and analyzed, arguments existing in a procedure declaration part in the source program are judged, and respective values are input and translated. A driver object program is created, and a stub object program is created by reading and translating corresponding stub generation information stored in advance with respect to a call description of an external program of the original program, and a program under test in the original program is created. And a compiler for creating a test target program including a state variable information table obtained by extracting state variables in the source program, and (B) the driver target program, the stub target program, and the test target. Create an executable program by combining the target programs A linker; and (C) a debug support program that causes the terminal device to perform an operation of operating the execution program to display or update the value of the state variable in the state variable information table. A unit program test method that does.
【請求項3】(A)コンパイラにより、順序論理を含む
単体プログラムである原始プログラムを読込んで解析し
て前記原始プログラム内の手続き宣言部および外部プロ
グラムの呼出し並びに状態変数を検出し、(B)前記原
始プログラム内の手続き宣言部に存在する引数の各々を
判定して、各々の値を入力させた後に翻訳を行うことに
より、前記原始プログラムに対するドライバ目的プログ
ラムを作成し、(C)前記原始プログラムの外部プログ
ラムの呼出し記述に対して、あらかじめ格納している該
当するスタブ生成情報を読込んで翻訳することにより、
前記原始プログラムに対するスタブ目的プログラムを作
成し、(D)前記原始プログラム内にある状態変数を受
けて、状態変数情報テーブルに保持し、(E)前記原始
プログラム内にある被テストプログラムの記述を翻訳す
ることにより、前記原始プログラムに対する被テスト目
的プログラムを作成し、前記原始プログラムの読込みの
終了時に、前記状態変数情報テーブルを前記被テスト目
的プログラム内に記憶し、(F)前記ドライバ目的プロ
グラム,前記スタブ目的プログラム,前記被テスト目的
プログラムをリンカによって結合した実行プログラム
を、デバッグサポートプログラム内で動作させることに
より、前記状態変数情報テーブル内の状態変数の値を表
示したり更新したりする操作を端末装置から行わせる、
ことを特徴とする単体プログラムテスト方式。
3. A compiler reads (A) a source program, which is a single program including sequential logic, and analyzes it to detect a procedure declaration part and an external program call and a state variable in the source program, and (B). Each of the arguments existing in the procedure declaration part in the source program is judged, and after inputting each value, translation is performed to create a driver object program for the source program, and (C) the source program. By reading and translating the corresponding stub generation information stored in advance for the call description of the external program of
Create a stub object program for the source program, (D) receive the state variables in the source program and hold them in the state variable information table, and (E) translate the description of the program under test in the source program. By doing so, a test target program for the source program is created, and at the end of reading the source program, the state variable information table is stored in the test target program, and (F) the driver target program, the By operating a stub object program and an execution program in which the object program under test is linked by a linker in a debug support program, an operation for displaying or updating the value of a state variable in the state variable information table is performed by a terminal. From the device,
A unit program test method characterized by the following.
【請求項4】(A)コンパイラにより順序論理を含む単
体プログラムである原始プログラムを読込み解析し、前
記原始プログラム内の手続き宣言部に存在する引数を判
定してそれぞれの値を入力させて翻訳したドライバ目的
プログラムを作成し、前記原始プログラムの外部プログ
ラムの呼出し記述に対してあらかじめ格納している該当
するスタブ生成情報を読込み翻訳したスタブ目的プログ
ラムを作成し、前記原始プログラム内にある被テストプ
ログラムの記述を翻訳して、前記原始プログラム内にあ
る状態変数を抽出した状態変数情報テーブルを含む被テ
スト目的プログラムを作成し、(B)リンカにより前記
ドライバ目的プログラム,前記スタブ目的プログラム,
前記被テスト目的プログラムを結合して実行プログラム
を作成し、(C)デバッグサポートプログラムにより、
前記実行プログラムを動作させて、前記状態変数情報テ
ーブル内の状態変数の値を表示したり更新したりする操
作を端末装置から行わせる、ことを特徴とする単体プロ
グラムテスト方式。
4. (A) A source program, which is a single program including sequential logic, is read and analyzed by a compiler, arguments existing in a procedure declaration section in the source program are judged, and respective values are input and translated. A driver object program is created, and a stub object program is created by reading and translating the corresponding stub generation information stored in advance with respect to the call description of the external program of the original program. The description is translated to create a test target program including a state variable information table in which the state variables in the source program are extracted, and (B) the linker, the driver target program, the stub target program,
The target program to be tested is combined to create an execution program, and (C) the debug support program
A unit program test method comprising causing the terminal device to perform an operation of operating the execution program to display or update the value of a state variable in the state variable information table.
JP5160572A 1993-06-30 1993-06-30 Program test system Pending JPH0778096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5160572A JPH0778096A (en) 1993-06-30 1993-06-30 Program test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5160572A JPH0778096A (en) 1993-06-30 1993-06-30 Program test system

Publications (1)

Publication Number Publication Date
JPH0778096A true JPH0778096A (en) 1995-03-20

Family

ID=15717870

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5160572A Pending JPH0778096A (en) 1993-06-30 1993-06-30 Program test system

Country Status (1)

Country Link
JP (1) JPH0778096A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009259051A (en) * 2008-04-17 2009-11-05 Internatl Business Mach Corp <Ibm> Program conversion method and system
JP2012018675A (en) * 2010-07-07 2012-01-26 Fujitsu Ltd System and method for generating database model for application analysis

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0217547A (en) * 1988-07-06 1990-01-22 Fujitsu Ltd Test data generation backup processing system
JPH03241439A (en) * 1990-02-20 1991-10-28 Nec Corp Test data preparation tool

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0217547A (en) * 1988-07-06 1990-01-22 Fujitsu Ltd Test data generation backup processing system
JPH03241439A (en) * 1990-02-20 1991-10-28 Nec Corp Test data preparation tool

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009259051A (en) * 2008-04-17 2009-11-05 Internatl Business Mach Corp <Ibm> Program conversion method and system
JP2012018675A (en) * 2010-07-07 2012-01-26 Fujitsu Ltd System and method for generating database model for application analysis

Similar Documents

Publication Publication Date Title
US7266809B2 (en) Software debugger and software development support system for microcomputer operable to execute conditional execution instruction
CA2143145C (en) Determining dynamic properties of programs
JP3612294B2 (en) Debugging method and debugging device
JPH05505695A (en) An improved software debugging system and method specifically for debugging code within a multi-architecture environment.
JPH05257709A (en) Parallelism discriminating method and parallelism supporting method using the same
JPH0950389A (en) Apparatus and method for mounting by using computer system
JP2000122886A (en) Program production system of semiconductor testing device
JPH03188535A (en) Assembly language programming error detecting process
JPH0778096A (en) Program test system
JPH08305583A (en) Method for simulating cpu
JPH10187461A (en) Language processing system
JP2005174045A (en) Source program conversion device, source program conversion method, source program conversion program and program recording medium
JP4594704B2 (en) Program development support system, program and recording medium
JPH04367946A (en) Debug information output system
JP4149047B2 (en) Simulator
JPH07295612A (en) High-level language sequence instruction program generation part and general sequencer
JPH01177165A (en) Definition-quotation relation checking system for array
JPH1115695A (en) Program test pattern automatic generating system
JPH03282935A (en) Compile processor and compile processing system
JPH05334119A (en) Method for debugging program
CN117492863A (en) Data access method, device and equipment
JPH06348541A (en) Program test system
JPH07319730A (en) Test debugging method
JPH10207740A (en) Debug system
JPH05197538A (en) Exception generation line number display system of precompiler system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19960402