JPH04257934A - System for measuring comprehensive rate of program - Google Patents

System for measuring comprehensive rate of program

Info

Publication number
JPH04257934A
JPH04257934A JP3019656A JP1965691A JPH04257934A JP H04257934 A JPH04257934 A JP H04257934A JP 3019656 A JP3019656 A JP 3019656A JP 1965691 A JP1965691 A JP 1965691A JP H04257934 A JPH04257934 A JP H04257934A
Authority
JP
Japan
Prior art keywords
branch
address
instruction
program
post
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
JP3019656A
Other languages
Japanese (ja)
Inventor
Kenichi Murakami
健一 村上
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 JP3019656A priority Critical patent/JPH04257934A/en
Publication of JPH04257934A publication Critical patent/JPH04257934A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To freely interrupt/continue evaluation and to efficiently execute the evaluation by efficiently improving the quality of a program without working the objective program of the evaluation, and cumulatively storing comprehension information in an external storage device. CONSTITUTION:The above system is composed of an input device 1, program comprehensive rate measuring device 2, central processing unit 3 equipped with a branching instruction interrupting mechanism 30, main storage device 4 to store the objective program of evaluation, output device 5 and external storage device 6 having a cumulative file to cumulatively store contents from a comprehension information storage part 23. When a branching instruction is executed for branching to an address PO of a program 41, branching instruction interruption is generated by the branching instruction interrupting mechanism 30, and a comprehensive rate measurement control part 21. Further, an informed branched address P1 is stored in a branched address storage part 22 corresponding to a priority level number 1.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は情報処理システムに於け
るプログラム網羅率測定方式に関し、特に評価対象プロ
グラム内の少なくとも一回以上実行された命令の比率を
測定する方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for measuring program coverage in an information processing system, and more particularly to a method for measuring the ratio of instructions executed at least once in a program to be evaluated.

【0002】0002

【従来の技術】従来、プログラムの評価度合いを知る目
安として、評価対象プログラムに対する評価項目を予め
挙げて置き、その評価項目を全て検証し終えて評価完了
としていた。
BACKGROUND OF THE INVENTION Conventionally, as a measure of the degree of evaluation of a program, evaluation items for a program to be evaluated are listed in advance, and the evaluation is completed after all of the evaluation items have been verified.

【0003】0003

【発明が解決しようとする課題】上記のプログラム評価
においては、(1)評価項目の作成は個人の経験や勘に
頼ることが多く、デバッグ度合いに個人差がある、(2
)プログラムが大きくなるにつれ、全て網羅する評価項
目を挙げるのが困難になるなどの問題が挙げられ、評価
されない部分が予想される。
[Problems to be Solved by the Invention] In the above program evaluation, (1) creation of evaluation items often relies on individual experience and intuition, and there are individual differences in the degree of debugging; (2)
) As a program grows larger, problems arise such as it becomes difficult to list all evaluation items, and it is expected that some parts will not be evaluated.

【0004】0004

【課題を解決するための手段】本発明のプログラム網羅
率測定方式は、分岐命令の実行により分岐後最初の命令
が実行される前に前記分岐命令を含むプログラムの走行
の優先レベルと分岐前アドレス(分岐命令自身のアドレ
ス。以下同様)と分岐後アドレス(分岐命令の分岐先ア
ドレス。以下同様)とを保持して内部割込みを発生させ
且つこの内部割込みが一個以上の前記優先レベル毎に発
生できるような分岐命令割込手段と、前記分岐命令割込
手段の起動および停止を行なうための分岐命令割込みモ
ード設定・解除手段と、前記優先レベルに対応させて前
記分岐後アドレスを記憶する分岐後アドレス記憶手段と
、前記分岐命令割込手段から通知される前記分岐前アド
レスと前記分岐後アドレス記憶手段により既に記憶され
ていて分岐命令割込み時の優先レベルに対応する前記分
岐後アドレスとで示される範囲を網羅情報として記憶す
る網羅情報記憶手段と、主記憶上での評価対象プログラ
ムの全命令語のアドレスを得る命令語解析手段と、前記
命令語解析手段により得た命令語のアドレスと前記網羅
情報記憶手段により記憶された網羅情報とから実行済命
令の比率(プログラム網羅率)を算出するとともに実行
済命令と未実行命令とが識別できるようにして命令語の
アドレスを編集出力する測定結果編集出力手段と、前記
網羅情報記憶手段に記憶された網羅情報を外部記憶装置
に累積記憶する制御手段とを備える。
[Means for Solving the Problems] The program coverage measurement method of the present invention determines the running priority level of the program including the branch instruction and the pre-branch address before the first instruction after the branch is executed by executing the branch instruction. (the address of the branch instruction itself; the same applies hereinafter) and the post-branch address (the branch destination address of the branch instruction; the same applies below) and generates an internal interrupt, and this internal interrupt can be generated for each of one or more of the priority levels. branch instruction interrupt means, branch instruction interrupt mode setting/cancellation means for starting and stopping the branch instruction interrupt means, and a post-branch address for storing the post-branch address in correspondence with the priority level. a range indicated by a storage means, the pre-branch address notified from the branch instruction interrupt means, and the post-branch address already stored by the post-branch address storage means and corresponding to the priority level at the time of the branch instruction interrupt; comprehensive information storage means for storing as comprehensive information; instruction word analysis means for obtaining the addresses of all instruction words of the program to be evaluated on main memory; and the addresses of the instruction words obtained by the instruction word analysis means and the comprehensive information. Measurement result editing output that calculates the ratio of executed instructions (program coverage rate) from the coverage information stored in the storage means and edits and outputs the address of the instruction word so that executed instructions and unexecuted instructions can be distinguished. and a control means for cumulatively storing the exhaustive information stored in the exhaustive information storage means in an external storage device.

【0005】また、前記分岐命令割込手段が中央処理装
置に設けられ、前記分岐命令割込みモード設定・解除手
段と前記分岐後アドレス記憶手段と前記網羅情報記憶手
段と前記命令語解析手段と前記測定結果編集出力手段と
前記制御手段とがプログラム網羅率測定装置に設けられ
ている。
Further, the branch instruction interrupt means is provided in the central processing unit, and includes the branch instruction interrupt mode setting/cancellation means, the post-branch address storage means, the exhaustive information storage means, the instruction word analysis means, and the measurement means. A result editing output means and the control means are provided in the program coverage measuring device.

【0006】[0006]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be explained with reference to the drawings.

【0007】図1は本発明のプログラム網羅率測定方式
の一実施例の構成を示す。この実施例のプログラム網羅
率測定のためのシステムは、入力操作が行なわれる入力
装置1と、入力情報解析部20と網羅率測定制御部21
と分岐後アドレス記憶部22と網羅情報記憶部23と測
定結果編集出力制御部24と命令語解析部25と網羅率
算出部26と累積ファイル入出力制御部27とを含むプ
ログラム網羅率測定装置2と、分岐命令の実行により分
岐後最初の命令が実行される前に優先レベルと分岐前ア
ドレスと分岐後アドレスとを保持して内部割込みを発生
させる分岐命令割込機構30を含む中央処理装置3と、
評価対象プログラムを記憶する主記憶装置4と、測定結
果リストが出力される出力装置5と、網羅情報記憶部2
3からの内容を累積記憶するための累積ファイルが存在
する外部記憶装置6とから構成されている。主記憶装置
4には評価対象プログラム41,42,……,4nが存
在し、それぞれの先頭アドレスはS1,S2,……,S
n番地で表され、同じく終了アドレスはE0,E1,…
…,En番地として表わされている。そして、評価対象
プログラム41,42,……,4nの優先レベルはそれ
ぞれ1,2,……,nとする。
FIG. 1 shows the configuration of an embodiment of the program coverage measurement method of the present invention. The system for measuring program coverage of this embodiment includes an input device 1 on which input operations are performed, an input information analysis section 20, and a coverage measurement control section 21.
, a post-branch address storage section 22 , a coverage information storage section 23 , a measurement result editing output control section 24 , an instruction word analysis section 25 , a coverage calculation section 26 , and a cumulative file input/output control section 27 . and a central processing unit 3 including a branch instruction interrupt mechanism 30 that holds a priority level, a pre-branch address, and a post-branch address and generates an internal interrupt before the first instruction after the branch is executed by executing the branch instruction. and,
A main storage device 4 that stores the evaluation target program, an output device 5 that outputs a measurement result list, and a comprehensive information storage section 2
3, and an external storage device 6 in which a cumulative file exists for cumulatively storing the contents from 3 onwards. There are evaluation target programs 41, 42, ..., 4n in the main storage device 4, and their start addresses are S1, S2, ..., S
It is represented by address n, and the end address is E0, E1,...
..., is represented as an address En. The priority levels of the evaluation target programs 41, 42, . . . , 4n are 1, 2, . . . , n, respectively.

【0008】このような構成において、評価対象プログ
ラム41を測定する場合、優先レベル番号1に対する分
岐命令割込みモード設定指令が、入力装置1からプログ
ラム網羅率測定装置2の入力情報解析部20を介して、
網羅率測定制御部21に通知される。この通知を受けた
網羅率測定制御部21は、分岐命令割込機構30が内部
管理する優先レベル毎の分岐命令割込みモード状況を参
照することにより、他の優先レベルで分岐命令割込みモ
ード実行中か否かの判定をすることができ、他の優先レ
ベルで分岐命令割込みモード実行中でない場合に限って
、累積ファイル入出力制御部27に対して外部記憶装置
6の累積ファイルの内容を網羅情報記憶部23に復帰さ
せるよう指令する。この指令を受け、復帰を完了した累
積ファイル入出力制御部27は、網羅率測定制御部21
に復帰完了通知を行なう。この後、網羅率測定制御部2
1は優先レベル番号1を分岐命令割込みモードにするよ
うに分岐命令割込機構30に指令すると共に、優先レベ
ル番号1に対応する分岐後アドレス記憶部22内の分岐
後アドレスをゼロで初期化する。この後、主記憶装置4
内で評価対象プログラム41が起動されて分岐命令が実
行されると、中央処理装置3の分岐命令割込機構30は
、分岐先のアドレスで分岐命令割込みを発生させて、プ
ログラム網羅率測定装置2の網羅率測定制御部21を動
作させる。網羅率測定制御部21は分岐命令割込機構3
0によって優先レベル番号1と、評価対象プログラム4
1内の分岐命令自身のアドレスである分岐前アドレスと
、この分岐命令による分岐先である分岐後アドレスとを
受け取り、分岐後アドレス記憶部22内の優先レベル番
号1に対応する分岐後アドレスからこの分岐命令割込み
時通知された分岐前アドレスまでの範囲を網羅情報とし
て網羅情報記憶部23内に記憶するとともに、この分岐
命令割込み時通知された分岐後アドレスを優先レベル番
号1に対応させて分岐後アドレス記憶部22内に記憶し
ておく。尚、網羅率測定制御部21は優先レベル番号1
に対応する分岐後アドレス記憶部22内の分岐後アドレ
スがゼロで初期化されている最初の分岐命令割込み時に
は、分岐命令割込機構30から通知された分岐後アドレ
スを優先レベル番号1に対応させて分岐後アドレス記憶
部22に記憶するだけであって、網羅情報を網羅情報記
憶部23内に記憶することはしない。以上の動作を行な
った後、網羅率測定制御部21は評価対象プログラム4
1での分岐後アドレスからの実行再開を分岐命令割込機
構30に指示し、次の分岐命令割込み待ちとなる。
In such a configuration, when measuring the evaluation target program 41, a branch instruction interrupt mode setting command for priority level number 1 is sent from the input device 1 via the input information analysis section 20 of the program coverage measurement device 2. ,
The coverage rate measurement control unit 21 is notified. Upon receiving this notification, the coverage measurement control unit 21 refers to the branch instruction interrupt mode status for each priority level internally managed by the branch instruction interrupt mechanism 30, and determines whether the branch instruction interrupt mode is currently being executed at another priority level. Only when branch instruction interrupt mode is not being executed at another priority level, comprehensive information storage of the contents of the cumulative file in the external storage device 6 is made to the cumulative file input/output control unit 27. Instructs the unit 23 to return to the original state. Upon receiving this command, the cumulative file input/output control unit 27 that has completed the recovery moves the coverage rate measurement control unit 21
A return completion notification will be sent. After this, the coverage measurement control section 2
1 instructs the branch instruction interrupt mechanism 30 to set priority level number 1 to branch instruction interrupt mode, and initializes the post-branch address in the post-branch address storage unit 22 corresponding to priority level number 1 to zero. . After this, main memory 4
When the evaluation target program 41 is started and a branch instruction is executed, the branch instruction interrupt mechanism 30 of the central processing unit 3 generates a branch instruction interrupt at the branch destination address, and the program coverage measuring device 2 The coverage measurement control unit 21 is operated. The coverage measurement control unit 21 is a branch instruction interrupt mechanism 3
0 indicates priority level number 1 and evaluation target program 4.
The pre-branch address, which is the address of the branch instruction itself in No. 1, and the post-branch address, which is the branch destination of this branch instruction, are received. The range up to the pre-branch address notified at the time of the branch instruction interrupt is stored as comprehensive information in the coverage information storage unit 23, and the post-branch address notified at the time of the branch instruction interrupt is associated with priority level number 1 and the range is stored after the branch. It is stored in the address storage section 22. Note that the coverage measurement control unit 21 uses priority level number 1.
At the time of the first branch instruction interrupt in which the post-branch address in the post-branch address storage unit 22 corresponding to the post-branch address is initialized to zero, the post-branch address notified from the branch instruction interrupt mechanism 30 is made to correspond to the priority level number 1. The branch address storage unit 22 only stores the comprehensive information in the post-branch address storage unit 22, and the comprehensive information is not stored in the comprehensive information storage unit 23. After performing the above operations, the coverage measurement control unit 21 executes the evaluation target program 4.
It instructs the branch instruction interrupt mechanism 30 to resume execution from the address after branching at step 1, and waits for the next branch instruction interrupt.

【0009】図2は評価対象プログラム41のアドレス
P0からアドレスP4までのルーチンを例にとって、網
羅情報を網羅情報記憶部23に記憶するときの関連図で
ある。評価対象プログラム41に於いて、アドレスP0
,P1,P2,P3,P4は分岐命令の分岐先アドレス
であり、アドレスB1,B2,B3,B4は分岐命令自
身のアドレスである。まず、評価対象プログラム41の
アドレスP0に分岐する分岐命令が実行されると、分岐
命令割込機構30によって分岐命令割込みが発生し、網
羅率測定制御部21が動作する。網羅率測定制御部21
は、分岐命令割込機構30から通知させる分岐後アドレ
スP0を優先レベル番号1に対応させて分岐後アドレス
記憶部22に記憶する(ここではアドレスP0に分岐す
る前の網羅情報の記憶手順の説明を省略する)。次に、
評価対象プログラム41のアドレスB1での分岐命令が
実行され、分岐先であるアドレスP1で分岐命令割込み
が発生する。このとき、網羅率測定制御部21は分岐命
令割込機構30から通知される分岐前アドレスB1と、
このとき分岐後アドレス記憶部22が記憶しているアド
レスPP0との範囲(アドレスP0からアドレスB1ま
で)を網羅情報M1として網羅情報記憶部23に記憶し
、さらに通知された分岐後アドレスP1を優先レベル番
号1に対応させて分岐後アドレス記憶部22に記憶する
。同様に、アドレスB2,B3,B4の分岐命令の実行
によって、それぞれアドレスP2,P3,P4で分岐命
令割込みが発生し、網羅率測定制御部21によってそれ
ぞれ網羅情報M2,M3,M4とが網羅情報記憶部23
に記憶される。
FIG. 2 is a related diagram when comprehensive information is stored in the comprehensive information storage section 23, taking as an example the routine from address P0 to address P4 of the evaluation target program 41. In the evaluation target program 41, address P0
, P1, P2, P3, and P4 are the branch destination addresses of the branch instructions, and addresses B1, B2, B3, and B4 are the addresses of the branch instructions themselves. First, when a branch instruction to branch to address P0 of the evaluation target program 41 is executed, a branch instruction interrupt is generated by the branch instruction interrupt mechanism 30, and the coverage rate measurement control section 21 operates. Coverage rate measurement control unit 21
stores the post-branch address P0 notified from the branch instruction interrupt mechanism 30 in the post-branch address storage unit 22 in correspondence with the priority level number 1 (Here, the procedure for storing exhaustive information before branching to address P0 will be explained. ). next,
A branch instruction at address B1 of the evaluation target program 41 is executed, and a branch instruction interrupt occurs at address P1, which is the branch destination. At this time, the coverage measurement control unit 21 receives the pre-branch address B1 notified from the branch instruction interrupt mechanism 30,
At this time, the range with the address PP0 (from address P0 to address B1) stored in the post-branch address storage unit 22 is stored in the comprehensive information storage unit 23 as comprehensive information M1, and the notified post-branch address P1 is given priority. It is stored in the post-branch address storage unit 22 in correspondence with level number 1. Similarly, by executing the branch instructions at addresses B2, B3, and B4, branch instruction interrupts occur at addresses P2, P3, and P4, respectively, and the coverage measurement control unit 21 converts the coverage information M2, M3, and M4 into coverage information. Storage section 23
is memorized.

【0010】図3は網羅情報記憶部23の記憶内容の一
例を示す。網羅情報記憶部23はアドレスをビット単位
で記憶する方法を採る。つまり、0番地→ビット番号0
,100番地→ビット番号100のように対応し、実行
済命令の番地は対応するビットがオンである。そこで評
価対象プログラム41の主記憶上での先頭アドレスがS
1番地で終了アドレスがE1番地であるため、評価対象
プログラム41の網羅情報は網羅情報記憶部23のビッ
ト番号S1からビット番号E1の範囲に記憶されている
網羅情報23Mとなる。網羅情報23Mには、図2での
説明で示した網羅情報M1,M2,M3,M4が存在し
、且つ網羅情報M1,M2,M3,M4に含まれる全て
のビットはオンである。また、網羅情報23Mには網羅
情報M1,M2,M3,M4と同様に、評価対象プログ
ラム41での実行された命令領域に対応するビットはオ
ンになって記憶されている。
FIG. 3 shows an example of the contents stored in the comprehensive information storage section 23. The comprehensive information storage section 23 adopts a method of storing addresses in bit units. In other words, address 0 → bit number 0
, address 100→bit number 100, and the address of the executed instruction has the corresponding bit turned on. Therefore, the start address of the evaluation target program 41 on the main memory is S.
1 and the end address is address E1, the comprehensive information of the evaluation target program 41 is the comprehensive information 23M stored in the range from bit number S1 to bit number E1 of the comprehensive information storage unit 23. The coverage information 23M includes the coverage information M1, M2, M3, and M4 shown in the explanation in FIG. 2, and all bits included in the coverage information M1, M2, M3, and M4 are on. Further, in the coverage information 23M, like the coverage information M1, M2, M3, and M4, the bit corresponding to the instruction area executed in the evaluation target program 41 is stored as being turned on.

【0011】評価が終了すると、優先レベル番号1に対
する分岐命令割込みモード解除指令が入力装置1から入
力情報解析部20を介して、網羅率測定制御部21に通
知される。この通知を受けた制御部21は、分岐命令割
込機構30が内部管理する優先レベル毎の分岐命令割込
みモード状況を参照することにより、他の優先レベルで
分岐命令割込みモード実行中か否かの判定をすることが
でき、他の優先レベルで分岐命令割込みモード実行中で
ない場合に限って、累積ファイル入出力制御部27に対
して網羅情報記憶部23の内容を外部記憶装置6の累積
ファイルに待避させるよう指令する。この指令を受け、
待避を完了した累積ファイル入出力制御部27は、網羅
率測定制御部21に待避完了通知を行なう。この後、網
羅率測定制御部21は優先レベル番号1の分岐命令割込
みモードを解除するように分岐命令割込機構30に指令
すると共に、評価対象プログラム41に対する測定結果
を編集出力するように測定結果編集出力制御部24に指
示する。この指示を受けた測定結果編集出力制御部24
は、命令語解析部25に対してS1番地からE1番地ま
での全命令語のアドレスを報告するように指示する。命
令語解析部25はS1番地からE1番地までの全命令語
を解釈して全命令語のアドレスを測定結果編集出力制御
部24に逐次報告する。この後、測定結果編集出力制御
部24は、命令語解析部25によって逐次報告される命
令語のアドレスを出力装置5に出力する際、報告される
命令語のアドレスに対応する網羅情報記憶部23内のビ
ットがオフである未実行命令のアドレスだけを出力する
。さらに、測定結果編集出力制御部24は命令語解析部
25によって逐次報告される命令語のアドレスと網羅情
報記憶部23とから実行済命令語数と全命令語数とを知
ることができ、これによって実行済命令語数の全命令語
数に対する比率の算出を網羅率算出部26に指示すると
ともに、この算出結果を評価対象プログラム41に対す
るプログラム網羅率として出力装置5に出力する。
When the evaluation is completed, a branch instruction interrupt mode cancellation command for priority level number 1 is notified from the input device 1 to the coverage measurement control section 21 via the input information analysis section 20. Upon receiving this notification, the control unit 21 refers to the branch instruction interrupt mode status for each priority level that is internally managed by the branch instruction interrupt mechanism 30, and determines whether or not the branch instruction interrupt mode is being executed at another priority level. The cumulative file input/output control unit 27 sends the contents of the comprehensive information storage unit 23 to the cumulative file of the external storage device 6 only when the branch instruction interrupt mode is not being executed at another priority level. Order them to evacuate. Upon receiving this directive,
The cumulative file input/output control unit 27 that has completed the save notifies the coverage rate measurement control unit 21 that the save has been completed. After that, the coverage measurement control unit 21 instructs the branch instruction interrupt mechanism 30 to cancel the branch instruction interrupt mode of priority level number 1, and also instructs the measurement result to edit and output the measurement results for the evaluation target program 41. The editing output control unit 24 is instructed. Measurement result editing output control section 24 that received this instruction
instructs the instruction word analysis unit 25 to report the addresses of all instruction words from address S1 to address E1. The instruction word analysis section 25 interprets all the instruction words from the S1 address to the E1 address and sequentially reports the addresses of all the instruction words to the measurement result editing output control section 24. Thereafter, when the measurement result editing output control section 24 outputs the address of the instruction word sequentially reported by the instruction word analysis section 25 to the output device 5, the measurement result editing output control section 24 outputs the address of the instruction word sequentially reported by the instruction word analysis section 25 to the comprehensive information storage section 23 corresponding to the address of the instruction word reported. Outputs only the addresses of unexecuted instructions whose bits are off. Furthermore, the measurement result editing output control section 24 can know the number of executed instructions and the total number of instructions from the addresses of instruction words successively reported by the instruction word analysis section 25 and the comprehensive information storage section 23. It instructs the coverage rate calculation unit 26 to calculate the ratio of the number of completed instruction words to the total number of instruction words, and outputs this calculation result to the output device 5 as the program coverage rate for the evaluation target program 41.

【0012】尚、分岐後アドレス記憶部22内の分岐後
アドレスは優先レベルに対応させて記憶できるため、以
上述べた優先レベル1で走行する評価対象プログラム4
1単独の測定だけでなく、複数の優先レベルを同時に測
定することが可能である。
Note that since the post-branch address in the post-branch address storage unit 22 can be stored in correspondence with the priority level, the program to be evaluated 4 running at the priority level 1 described above
It is possible to measure not only one priority level but also multiple priority levels simultaneously.

【0013】更に、他の優先レベルで分岐命令割込みモ
ードが実行中か否かの判定を、分岐命令割込機構30が
内部管理する優先レベル毎の分岐命令割込みモード状況
を参照することにより判定するとしたが、プログラム網
羅率測定装置2内に優先レベル毎の分岐命令割込みモー
ド状況を構成するようにしてもよい。あるいは、網羅情
報を優先レベル毎に区分するように構成して、他の優先
レベルで分岐命令割込みモードが実行中か否かの判定を
なくすようにしてもよい。
Furthermore, it is determined whether or not the branch instruction interrupt mode is being executed at another priority level by referring to the branch instruction interrupt mode status for each priority level that is internally managed by the branch instruction interrupt mechanism 30. However, the branch instruction interrupt mode status for each priority level may be configured in the program coverage measuring device 2. Alternatively, the comprehensive information may be configured to be classified by priority level, so that it is not necessary to determine whether or not the branch instruction interrupt mode is being executed at other priority levels.

【0014】また、本実施例では分岐命令割込みモード
解除指令が入力装置1から入力されたとき測定結果の編
集出力が行われるようになっているが、網羅情報が累積
ファイルに待避されているため測定結果の編集出力指令
が入力装置1から入力されたときとしてもよい。
Furthermore, in this embodiment, when a branch instruction interrupt mode release command is input from the input device 1, the measurement results are edited and output, but since the comprehensive information is saved in the cumulative file, This may also be the case when a command to edit and output the measurement results is input from the input device 1.

【0015】[0015]

【発明の効果】以上説明したように本発明によれば、分
岐命令割込みを利用して網羅情報を記憶し、評価対象プ
ログラムの実行後、記憶された網羅情報をもとに実行済
命令数の比率(プログラム網羅率)を算出することがで
き、これによってプログラムの網羅度が客観的に判定で
き、且つプログラムの品質尺度が経験年数などと無関係
に統一できる。さらに、未実行命令のアドレスを出力す
ることにより、次の評価ステップでは未実行命令に着目
した評価ができる。このように、評価対象プログラムに
細工しないで、プログラムの品質を効率良く向上できる
効果がある。さらにまた、網羅情報を外部記憶装置に累
積記憶するように構成しているため、評価の中断と継続
が自由にでき、効率よく評価できる。
As explained above, according to the present invention, exhaustive information is stored using branch instruction interrupts, and after the program to be evaluated is executed, the number of executed instructions is calculated based on the stored exhaustive information. A ratio (program coverage rate) can be calculated, and thereby the degree of program coverage can be objectively determined, and the quality measure of the program can be standardized regardless of years of experience. Furthermore, by outputting the addresses of unexecuted instructions, evaluation can be performed focusing on unexecuted instructions in the next evaluation step. In this way, the quality of the program can be efficiently improved without modifying the program to be evaluated. Furthermore, since comprehensive information is cumulatively stored in an external storage device, evaluation can be interrupted and continued freely, and evaluation can be performed efficiently.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of the present invention.

【図2】網羅情報を網羅情報記憶部に記憶するときの動
作を説明する図である。
FIG. 2 is a diagram illustrating an operation when comprehensive information is stored in a comprehensive information storage unit.

【図3】網羅情報記憶部の記憶内容の一例を示す図であ
る。
FIG. 3 is a diagram illustrating an example of storage contents of a comprehensive information storage unit.

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

1    入力装置 2    プログラム網羅率測定装置 3    中央処理装置 4    主記憶装置 5    出力装置 6    外部記憶装置 1 Input device 2 Program coverage measurement device 3 Central processing unit 4 Main memory 5 Output device 6 External storage device

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  分岐命令の実行により分岐後最初の命
令が実行される前に前記分岐命令を含むプログラムの走
行の優先レベルと分岐前アドレスと分岐後アドレスとを
保持して内部割込みを発生させ且つこの内部割込みが一
個以上の前記優先レベル毎に発生できるような分岐命令
割込手段と、前記分岐命令割込手段の起動および停止を
行なうための分岐命令割みモード設定・解除手段と、前
記優先レベルに対応させて前記分岐後アドレスを記憶す
る分岐後アドレス記憶手段と、前記分岐命令割込手段か
ら通知される前記分岐前アドレスと前記分岐後アドレス
記憶手段により既に記憶されていて分岐命令割込み時の
優先レベルに対応する前記分岐後アドレスとで示される
範囲を網羅情報として記憶する網羅情報記憶手段と、主
記憶上での評価対象プログラムの全命令語のアドレスを
得る命令語解析手段と、前記命令語解析手段により得た
命令語のアドレスと前記網羅情報記憶手段により記憶さ
れた網羅情報とから実行済命令の比率を算出するととも
に実行済命令と未実行命令とが識別できるようにして命
令語のアドレスを編集出力する測定結果編集出力手段と
、前記網羅情報記憶手段に記憶された網羅情報を外部記
憶装置に累積記憶する制御手段と、を備えることを特徴
とするプログラム網羅率測定方式。
1. Before the first instruction after the branch is executed by executing the branch instruction, the execution priority level of the program including the branch instruction, the pre-branch address, and the post-branch address are held, and an internal interrupt is generated. and branch instruction interrupt means for generating this internal interrupt for each of one or more of the priority levels, branch instruction interrupt mode setting/cancellation means for starting and stopping the branch instruction interrupt means, and a post-branch address storage means for storing the post-branch address in correspondence with the priority level; and a post-branch address that is notified from the branch instruction interrupt means and a post-branch address already stored by the post-branch address storage means and which is already stored in the branch instruction interrupt. comprehensive information storage means for storing as comprehensive information the range indicated by the post-branch address corresponding to the priority level at the time; instruction word analysis means for obtaining the addresses of all instruction words of the evaluation target program on main memory; The ratio of executed instructions is calculated from the address of the instruction word obtained by the instruction word analysis means and the exhaustive information stored by the exhaustive information storage means, and the executed instructions and unexecuted instructions can be distinguished. A program coverage measurement method comprising: measurement result editing and outputting means for editing and outputting word addresses; and control means for cumulatively storing coverage information stored in the coverage information storage means in an external storage device.
【請求項2】  前記分岐命令割込手段が中央処理装置
に設けられ、前記分岐命令割込みモード設定・解除手段
と前記分岐後アドレス記憶手段と前記網羅情報記憶手段
と前記命令語解析手段と前記測定結果編集出力手段と前
記制御手段とがプログラム網羅率測定装置に設けられて
いることを特徴とする請求項1記載のプログラム網羅率
測定方式。
2. The branch instruction interrupt means is provided in a central processing unit, and includes the branch instruction interrupt mode setting/cancellation means, the post-branch address storage means, the exhaustive information storage means, the instruction word analysis means, and the measurement means. 2. The program coverage measuring method according to claim 1, wherein the result editing output means and the control means are provided in a program coverage measuring device.
JP3019656A 1991-02-13 1991-02-13 System for measuring comprehensive rate of program Pending JPH04257934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3019656A JPH04257934A (en) 1991-02-13 1991-02-13 System for measuring comprehensive rate of program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3019656A JPH04257934A (en) 1991-02-13 1991-02-13 System for measuring comprehensive rate of program

Publications (1)

Publication Number Publication Date
JPH04257934A true JPH04257934A (en) 1992-09-14

Family

ID=12005293

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3019656A Pending JPH04257934A (en) 1991-02-13 1991-02-13 System for measuring comprehensive rate of program

Country Status (1)

Country Link
JP (1) JPH04257934A (en)

Similar Documents

Publication Publication Date Title
JP2749528B2 (en) Tracer system for error analysis
JPH04257934A (en) System for measuring comprehensive rate of program
JPH0488426A (en) Program coverage measuring instrument
JPH0566967A (en) Measuring system for program comprehension rate
JPH05298204A (en) Test circut for input/output processor
US20050015677A1 (en) Method of executing a computer program
JP2970142B2 (en) Programmable controller
JPH06103110A (en) Breakpoint setting system
JPH05204680A (en) Malfunction preventing system for information processor
JPH07152578A (en) Detection of maximum stack usage quantity
JPH04239337A (en) Measuring system for program comprehension rate
JPS63300334A (en) Measurement system for number of times of instruction execution of program
JPS58107969A (en) Virtual failure generating system
JPS63300335A (en) Measurement system for number of times of instruction execution of program
JPH01118935A (en) Measurement system for program comprehension rate
JPH04241637A (en) System for measuring number of executed program instruction
JPH0764819A (en) Debugger
JPH06187193A (en) Program debugging device and microcomputer
JPH02151938A (en) Program debugging system
JPH0221341A (en) Monitor device for program action of another device
JPH0795294B2 (en) Information processing equipment
JPS61240342A (en) Microprogram controller
JP2001142743A (en) Parallel debugger, system and method for debugging of parallel process, and recording medium
CA2427697A1 (en) Method of executing a computer program
JPH01237720A (en) Computer system with sub processor for floating point computation