JPH04239337A - Measuring system for program comprehension rate - Google Patents

Measuring system for program comprehension rate

Info

Publication number
JPH04239337A
JPH04239337A JP3002494A JP249491A JPH04239337A JP H04239337 A JPH04239337 A JP H04239337A JP 3002494 A JP3002494 A JP 3002494A JP 249491 A JP249491 A JP 249491A JP H04239337 A JPH04239337 A JP H04239337A
Authority
JP
Japan
Prior art keywords
branch
address
instruction
program
branch instruction
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
JP3002494A
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 JP3002494A priority Critical patent/JPH04239337A/en
Publication of JPH04239337A publication Critical patent/JPH04239337A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To obtain an accurate evaluation degree of an evaluating subject program by measuring the ratio of the instructions that are carried out once or more during execution of the program evaluation. CONSTITUTION:An external storage 6 includes the accumulation files 61-6n. The comprehension information can be accumulated in the files 61, 62 and 6n in the measurement states where the modules 41, 42 and 4n are noted respectively. Then the comprehension information are stored by means of a branch instruction interruption, and the ratio (program comprehension rate) of the executed instructions is calculated based on the stored comprehension information after execution of an evaluating subject program. Thus the program comprehension rate is objectively decided and an accurate evaluation degree is obtained for the evaluating subject program.

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 program coverage that measures the ratio of instructions executed at least once in a program to be evaluated.

【0002】0002

【従来の技術】プログラムを新規に開発した場合などに
おいては、そのプログラムが所期の目的を達成している
か否かを確認するために、試験データなどを用いてその
プログラムを評価することが行なわれる。
[Background Art] When a program is newly developed, it is necessary to evaluate the program using test data, etc., in order to confirm whether the program achieves its intended purpose. It will be done.

【0003】通常、このプログラムの評価は、評価担当
者が評価対象プログラム内の全命令を網羅できるように
幾つかの評価項目をあらかじめ考え、これらの評価項目
について試験を行ない、すべての評価項目で満足する結
果が得られたとき、評価完了と判断していた。
[0003] Normally, in evaluating this program, the person in charge of evaluation considers several evaluation items in advance so as to cover all instructions in the program to be evaluated, conducts tests on these evaluation items, and then evaluates all the evaluation items. The evaluation was considered complete when a satisfactory result was obtained.

【0004】0004

【発明が解決しようとする課題】しかしながら、評価対
象プログラム内の全命令を網羅できるような評価項目を
事前に考えることは極めて困難であり、したがって、あ
らかじめ考えた評価項目をすべて満足したことをもって
、評価対象プログラムの評価が済んだとは言えないとい
う問題点があった。
[Problem to be Solved by the Invention] However, it is extremely difficult to think of evaluation items in advance that can cover all the instructions in the program to be evaluated. There was a problem in that it could not be said that the evaluation of the target program had been completed.

【0005】本発明の目的は、評価対象プログラムの評
価中に少なくとも一回以上実行された命令の比率を測定
し、評価対象プログラムの評価度合を正確に知ることが
できるようにしたプログラム網羅率測定方式を提供する
ことにある。
An object of the present invention is to measure the program coverage rate by measuring the ratio of instructions executed at least once during the evaluation of the program to be evaluated, thereby making it possible to accurately know the degree of evaluation of the program to be evaluated. The goal is to provide a method.

【0006】[0006]

【課題を解決するための手段】本発明のプログラム網羅
率測定方式は、分岐命令の実行により分岐後最初の命令
が実行される前に当該分岐命令を含むプログラムの走行
の優先レベルと当該分岐命令自身のアドレスである分岐
前アドレスと当該分岐命令の分岐先アドレスである分岐
後アドレスとを保持して内部割込みを発生させかつ該内
部割込みが一個以上の前記優先レベルごとに発生できる
ような分岐命令割込み手段(30)と、該分岐命令割込
み手段の起動および停止を行なうための分岐命令割込み
モード設定および解除手段(21)と、前記優先レベル
に対応させて前記分岐後アドレスを記憶する分岐後アド
レス記臆手段(22)と、前記分岐命令割込み手段から
通知される分岐前アドレスと前記分岐後アドレス記臆手
段により既に記憶されていて当該分岐命令利己み時の優
先レベルに対応する分岐後アドレスとで示される範囲を
網羅情報として記憶する網羅情報記憶手段(23)と、
主記憶装置上での評価対象プログラムの全命令語のアド
レスを得る命令解析手段(25)と、該命令語解析手段
により得た命令語のアドレスと前記網羅情報記憶手段に
より記憶された網羅情報とから実行済命令の比率をプロ
グラム網羅率として算出する(26)とともに実行済命
令と未実行命令とが識別できるようにして命令語のアド
レスを編集出力する測定結果編集出力手段(34)と、
前記網羅情報記憶部に記憶された網羅情報を外部記憶装
置に累積記憶する手段(29)と、前記累積記憶手段に
より外部記憶装置に累積記憶された網羅情報どうしを併
合する手段(28)とを具備することを特徴とする。
[Means for Solving the Problem] The program coverage measurement method of the present invention determines the running priority level of the program including the branch instruction and the execution of the branch instruction before the first instruction after the branch is executed. A branch instruction that generates an internal interrupt by holding a pre-branch address that is its own address and a post-branch address that is a branch destination address of the branch instruction, and that the internal interrupt can be generated for each of one or more of the priority levels. an interrupt means (30), a branch instruction interrupt mode setting and cancellation means (21) 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 recording means (22), a pre-branch address notified from the branch instruction interrupt means, and a post-branch address already stored by the post-branch address recording means and corresponding to the priority level at the time of selfishness of the branch instruction; comprehensive information storage means (23) for storing the range indicated by as comprehensive information;
An instruction analysis means (25) that obtains the addresses of all instruction words of the program to be evaluated on the main storage device, and the addresses of the instruction words obtained by the instruction word analysis means and the exhaustive information stored by the exhaustive information storage means. measurement result editing and output means (34) for calculating the ratio of executed instructions as a program coverage rate (26) and editing and outputting the address of the instruction word so that executed instructions and unexecuted instructions can be distinguished;
means (29) for cumulatively storing the comprehensive information stored in the comprehensive information storage unit in an external storage device; and means (28) for merging the comprehensive information cumulatively stored in the external storage device by the cumulative storage device. It is characterized by comprising:

【0007】[0007]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments Next, embodiments of the present invention will be described with reference to the drawings.

【0008】図1は本発明の一実施例の構成を示すブロ
ック図である。この図に示すプログラム網羅率測定方式
は、入力操作が行なわれる入力装置1と、入力情報解析
部20と網羅率測定制御部21と分岐後アドレス記憶部
22と網羅情報記憶部23と測定結果編集出力制御部2
4と命令語解析部25と網羅率算出部26と累積ファイ
ル制御部27と網羅情報併合部28と累積ファイル入出
力部29とを含むプログラム網羅率測定装置2と、分岐
命令の実行後最初の命令が実行される前に優先レベルと
分岐前アドレスと分岐後アドレスとを保持して内部割込
みを発生させる分岐命令割込機構30を含む中央処理装
置3と、評価対象プログラムを記憶する主記憶装置4と
、特性結果リストが出力される出力装置5と、網羅情報
を累積記憶するための累積ファイルが存在する外部記憶
装置6とを具備する。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. The program coverage measurement method shown in this figure includes an input device 1 on which input operations are performed, an input information analysis section 20, a coverage measurement control section 21, a post-branch address storage section 22, a coverage information storage section 23, and a measurement result editor. Output control section 2
4, an instruction word analysis unit 25, a coverage rate calculation unit 26, a cumulative file control unit 27, a coverage information merging unit 28, a cumulative file input/output unit 29; 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 an instruction is executed, and a main memory that stores a program to be evaluated. 4, an output device 5 to which a characteristic result list is output, and an external storage device 6 in which a cumulative file for cumulatively storing comprehensive information exists.

【0009】主記憶装置4には、モジュール41,42
,……,4nとから構成する評価対象プログラムが存在
し、それぞれのモジュールの先頭アドレスはS1,S2
,……,Snで表わされ、同じく終了アドレスはE0,
E1,……,En番地として表わされている。そしてモ
ジュール41,42,……,4nは、それぞれaaaa
aa,bbbbbb,……,zzzzzzのモジュール
名を持つ。
The main storage device 4 includes modules 41 and 42.
, ..., 4n exists, and the start address of each module is S1, S2.
,...,Sn, and the end address is E0,
They are expressed as addresses E1, . . . , En. The modules 41, 42, ..., 4n are each aaaa
The module names are aa, bbbbbb, ..., zzzzzz.

【0010】外部記憶装置6には累積ファイル61,6
2,……,6nが存在し、例えば、モジュール41に着
目した測定時には累積ファイル61に、モジュール42
に着目した測定時には累積ファイル62に、モジュール
4nに着則した測定時には累積ファイル6nにと対応づ
け、網羅情報を累積することができるようになっている
[0010] The external storage device 6 has accumulated files 61, 6.
2, ..., 6n, and for example, when measuring with focus on module 41, module 42
It is possible to accumulate exhaustive information by associating it with the accumulation file 62 when the measurement is focused on the module 4n, and with the accumulation file 6n when the measurement is based on the module 4n.

【0011】次に、このように構成された本実施例のプ
ログラム網羅率測定方式の動作について説明する。まず
、評価対象プログラムの優先レベル番号を1とし、かつ
、モジュール41に着目した測定をする場合、累積ファ
イル61の指定と優先レベル番号1に対する分岐命令割
込みモード設定指令とが、入力装置1からプログラム網
羅率測定装置2の入力情報解析部20を介して、網羅率
測定制御部21に通知される。この通知を受けた網羅率
測定制御部21は、累積ファイル制御部27に対して外
部記憶装置6の累積ファイル61の内容を網羅情報記憶
部23に復帰させるよう指令する。
Next, the operation of the program coverage measurement method of this embodiment configured as described above will be explained. First, when the priority level number of the program to be evaluated is set to 1 and the measurement is performed focusing on the module 41, the specification of the cumulative file 61 and the branch instruction interrupt mode setting command for the priority level number 1 are sent from the input device 1 to the program. The coverage measurement control section 21 is notified via the input information analysis section 20 of the coverage measurement device 2 . Upon receiving this notification, the coverage rate measurement control unit 21 instructs the cumulative file control unit 27 to restore the contents of the cumulative file 61 in the external storage device 6 to the coverage information storage unit 23.

【0012】この指令を受け累積ファイル入出力部29
を介して復帰を完了した累積ファイル制御部27は、網
羅率測定制御部21に復帰完了報告を行なう。次に網羅
率測定制御部21は、優先レベル番号1を分岐命令割込
みモードにするよう分岐命令割込機構30に指令すると
ともに、優先レベル番号1に対応する分岐後アドレス記
憶部22内の分岐後アドレスをゼロで初期化する。この
後、主記憶装置4内での評価対象プログラムか起動され
て分岐命令が実行されると、中央処理装置3の分岐命令
割込機構30は、分岐先のアドレスで分岐命令割込みを
発生させて、プログラム網羅率測定装置2の網羅率測定
制御部21を動作させる。網羅率測定制御部21は、分
岐命令割込機構30によって優先レベル番号1と、評価
対象プログラム内の分岐命令自身のアドレスである分岐
前アドレスと、この分岐命令による分岐先である分岐後
アドレスとを受け取り、分岐後アドレス記憶部22内の
優先レベル番号1に対応する分岐後アドレスからこの分
岐命令割込み時通知された分岐前アドレスまでの範囲を
網羅情報として網羅情報記憶部23内に記憶するととも
に、この分岐命令割込み時通知された分岐後アドレスを
優先レベル番号1に対応させて分岐後アドレス記憶部2
2内に記憶しておく。
In response to this command, the cumulative file input/output unit 29
The cumulative file control section 27 that has completed the return via the . . . Next, the coverage measurement control unit 21 instructs the branch instruction interrupt mechanism 30 to set the priority level number 1 to the branch instruction interrupt mode, and also stores the post-branch address in the post-branch address storage unit 22 corresponding to the priority level number 1. Initialize address with zero. Thereafter, when the evaluation target program in the main storage device 4 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. , the coverage measurement control section 21 of the program coverage measurement device 2 is operated. The coverage rate measurement control unit 21 uses the branch instruction interrupt mechanism 30 to determine the priority level number 1, the pre-branch address that is the address of the branch instruction itself in the program to be evaluated, and the post-branch address that is the branch destination of this branch instruction. and stores the range from the post-branch address corresponding to priority level number 1 in the post-branch address storage unit 22 to the pre-branch address notified at the time of this branch instruction interrupt as comprehensive information in the comprehensive information storage unit 23. , the post-branch address notified at the time of this branch instruction interrupt is stored in the post-branch address storage unit 2 in correspondence with the priority level number 1.
Remember it within 2.

【0013】なお、網羅率測定制御部21は、優先レベ
ル番号1に対応する分岐後アドレス記憶部22内の分岐
後アドレスがゼロで初期化されている最初の分岐命令割
込み時には、分岐命令割込機構30から通知された分岐
後アドレスを優先レベル番号1に対応させて分岐後アド
レス記憶部22に記憶するだけであって、網羅情報を網
羅情報記憶部23内に記憶することはしない。
[0013] The coverage rate measurement control unit 21 handles the branch instruction interrupt 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 priority level number 1 is initialized to zero. The post-branch address notified from the mechanism 30 is simply stored in the post-branch address storage unit 22 in correspondence with the priority level number 1, and the comprehensive information is not stored in the comprehensive information storage unit 23.

【0014】以上の動作を行なった後、網羅率測定制御
部21は、評価対象プログラムでの分岐後アドレスから
の実行再開を分岐命令割込機構30に指示し、次の分岐
命令割込み待ちとなる。
After performing the above operations, the coverage rate measurement control unit 21 instructs the branch instruction interrupt mechanism 30 to resume execution from the post-branch address in the program to be evaluated, and waits for the next branch instruction interrupt. .

【0015】図2は、評価対象プログラムのモジュール
41内のアドレスP0からアドレスP4までのルーチン
を例にとって、網羅情報を網羅情報記憶部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 in the module 41 of the program to be evaluated.

【0016】モジュール41において、アドレスP0,
P1,P2,P3,P4は分岐命令の分岐先アドレスで
あり、アドレスB4,B2,B3,B4は分岐命令自身
のアドレスである。まず、モジュール41のアドレスP
0に分岐する分岐命令が実行されると、分岐命令割込機
構30によって分岐命令割込みが発生し、網羅率測定制
御部21が動作する。網羅率測定制御部21は、分岐命
令割込機構30から通知される分岐後アドレスP0を優
先レベル番号1に対応させて分岐後アドレス記憶部22
に記憶する。次にモジュール41のアドレスB1での分
岐命令が実行され、分岐先であるアドレスP1で分岐先
命令割込みが発生する。このとき網羅率測定制御部21
は、分岐命令割込機構30から通知される分岐前アドレ
スB1と、このとき分岐後アドレス記憶部22が記憶し
ているアドレスP0との範囲(アドレスP0からアドレ
スB1まで)を網羅情報M1として網羅情報記憶部23
に記憶し、さらに通知された分岐後アドレスP1を優先
レベル番号1に対応させて分岐後アドレス記憶部22に
記憶する。
In the module 41, addresses P0,
P1, P2, P3, and P4 are the branch destination addresses of the branch instruction, and addresses B4, B2, B3, and B4 are the addresses of the branch instruction itself. First, address P of module 41
When a branch instruction that branches to 0 is executed, a branch instruction interrupt is generated by the branch instruction interrupt mechanism 30, and the coverage measurement control section 21 operates. The coverage measurement control unit 21 associates the post-branch address P0 notified from the branch instruction interrupt mechanism 30 with the priority level number 1 and stores it in the post-branch address storage unit 22.
to be memorized. Next, the branch instruction at address B1 of module 41 is executed, and a branch destination instruction interrupt occurs at address P1, which is the branch destination. At this time, the coverage measurement control section 21
covers the range (from address P0 to address B1) between the pre-branch address B1 notified from the branch instruction interrupt mechanism 30 and the address P0 stored in the post-branch address storage unit 22 at this time (from address P0 to address B1) as comprehensive information M1. Information storage section 23
Further, the notified post-branch address P1 is stored in the post-branch address storage unit 22 in correspondence with the priority level number 1.

【0017】同様に、アドレスB2,B3,B4の分岐
命令の実行によって、それぞれアドレスP2,P3,P
4で分岐命令割込みが発生し、網羅率測定制御部21に
よってそれぞれ網羅情報M2,M3,M4とが網羅情報
記憶部23に記憶される。
Similarly, by executing branch instructions at addresses B2, B3, and B4, addresses P2, P3, and P
4, a branch instruction interrupt occurs, and the coverage rate measurement control section 21 stores coverage information M2, M3, and M4 in the coverage information storage section 23, respectively.

【0018】図3は、網羅情報記憶部23の記憶内容の
一例を示す図である。この実施例の網羅情報記憶部23
は、主記憶装置の各番地と1対1で対応するビットを有
し、例えばビット番号0のビットは主記憶装置上の0番
地に、ビット番号100のビットは主記憶装置上の10
0番地に対応している。そして、実行済命令の番地に対
応するビット番号のビットはオンにされ、未実行命令の
番地に対応するビットはオフにされるように使用される
。そこでモジュール41の主記憶装置上での先頭アドレ
スがS1番地で終了アドレスがE1番地であるため、モ
ジュール41の網羅情報は網羅情報記憶部23のビット
番号S1からビット番号E1の範囲に記憶されている網
羅情報23Mとなる。網羅情報23・には、図2での説
明で示した網羅情報M1,M2,M3,M4が存在し、
かつ網羅情報M1,M2,M3,M4に含まれるすべて
のビットはオンである。また、網羅情報23Mには網羅
情報M1,M2,M3,M4と同様に、モジュール41
での実行された命令領域に対応するビットはオンになっ
て記憶されている。
FIG. 3 is a diagram showing an example of the contents stored in the comprehensive information storage section 23. Comprehensive information storage unit 23 of this embodiment
has bits that correspond one-to-one with each address in the main memory. For example, the bit with bit number 0 is in address 0 on the main memory, and the bit with bit number 100 is in address 10 in the main memory.
It corresponds to address 0. Then, the bit of the bit number corresponding to the address of the executed instruction is turned on, and the bit corresponding to the address of the unexecuted instruction is turned off. Therefore, since the start address of the module 41 on the main storage device is address S1 and the end address is address E1, the comprehensive information of the module 41 is stored in the range from bit number S1 to bit number E1 of the comprehensive information storage unit 23. The comprehensive information is 23M. The comprehensive information 23 includes comprehensive information M1, M2, M3, and M4 shown in the explanation in FIG.
And all bits included in coverage information M1, M2, M3, and M4 are on. In addition, the comprehensive information 23M includes the module 41 as well as the comprehensive information M1, M2, M3, and M4.
The bit corresponding to the executed instruction area is stored as being turned on.

【0019】最後に評価が終了し、優先レベル番号1に
対する分岐命令割込みモード解除指令が入力装置1から
入力情報解析部20を介して、網羅率測定制御部21に
通知される。この通知を受けた網羅率測定制御部21は
、累積ファイル制御部27に対して網羅情報記憶部23
の内容を外部記憶装置6の累積ファイル61に退避させ
るよう指令する。この指令の受け、累積ファイル入出力
部29を介して退避を完了した累積ファイル制御部27
は、網羅率測定制御部21に退避完了報告を行なう。
Finally, the evaluation is completed, and a branch instruction interrupt mode release 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 coverage rate measurement control unit 21 sends the cumulative file control unit 27 to the coverage information storage unit 23.
The contents of the file are instructed to be saved in the cumulative file 61 of the external storage device 6. Upon receiving this command, the cumulative file control unit 27 completed the evacuation via the cumulative file input/output unit 29.
reports the evacuation completion to the coverage rate measurement control unit 21.

【0020】次に、網羅率測定制御部21は、優先レベ
ル番号1の分岐命令割込みモードを解除するよう分岐命
令割込機構30に指令するとともに、評価対象プログラ
ムに対する測定結果を編集出力するように測定結果編集
出力制御部24に指示する。この指示を受けた測定結果
編集出力制御部24は、命令語解析部25に対してS1
番地からEn番地までの全命令語のアドレスを報告する
ように指示する。命令語解析部25は、S1番地からE
n番地までの全命令語を解釈して全命令語のアドレスを
測定結果編集出力制御部24に報告する。このとき測定
結果編集出力制御部24は、命令語解析部25によって
逐次報告される命令語アドレスの内、このアドレスに対
応する網羅情報記憶部23内のビットがオフである未実
行命令アドレスだけを出力装置5に出力する。さらに測
定結果編集出力制御部24は、命令語解析部25によっ
て逐次報告される命令語のアドレスと網羅情報記憶部2
3とから実行済命令語数と全命令語数とを知ることがで
き、これによって実行命令語数の全命令語数に対する比
率の算出を網羅率算出部26に指示するとともに、この
算出結果を評価対象プログラムに対するプログラム網羅
率として出力装置5に出力する。
Next, the coverage measurement control unit 21 instructs the branch instruction interrupt mechanism 30 to release the branch instruction interrupt mode of priority level number 1, and edits and outputs the measurement results for the program to be evaluated. The measurement result editing output control section 24 is instructed. Upon receiving this instruction, the measurement result editing output control section 24 sends the instruction word analysis section 25 to the S1
Instructs to report the addresses of all instruction words from address to En address. The instruction word analysis unit 25 reads from address S1 to E.
It interprets all command words up to address n and reports the addresses of all command words to the measurement result editing output control section 24. At this time, the measurement result editing output control unit 24 selects only unexecuted instruction addresses for which the bit in the exhaustive information storage unit 23 corresponding to this address is OFF, out of the instruction word addresses sequentially reported by the instruction word analysis unit 25. Output to the output device 5. Furthermore, the measurement result editing output control section 24 stores the address of the instruction word sequentially reported by the instruction word analysis section 25 and the exhaustive information storage section 2.
3, it is possible to know the number of executed instruction words and the total number of instruction words, which instructs the coverage rate calculation unit 26 to calculate the ratio of the number of executed instruction words to the total number of instruction words, and also applies this calculation result to the program to be evaluated. It is output to the output device 5 as a program coverage rate.

【0021】また、本実施例では分岐命令割込みモード
解除指令が入力装置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.

【0022】以上の説明では、モジュール41に着目し
て測定をし、その測定結果である網羅情報は累積ファイ
ル61に累積された。同じように、モジュール42,…
…,4nに着目した測定の場合、それぞれ累積ファイル
62,……,6nに網羅情報が累積されることになる。 しかしながら、あるモジュールに着目した測定ではあっ
ても、評価対象プログラムを構成する1モジュールであ
って、他のモジュールと関係を持つことは明らかである
。したがって、モジュールに着目したとしても、他のモ
ジュールの測定も少なからず行なっていることになる(
累積ファイル61,62,……,6nは、それぞれ、モ
ジュール41,42,……,4nまでの網羅情報を累積
できる容量を持つ)。
In the above explanation, the module 41 was focused on and measured, and the comprehensive information that is the measurement result was accumulated in the accumulation file 61. Similarly, modules 42,...
. . , 4n, comprehensive information is accumulated in the cumulative files 62, . . . , 6n, respectively. However, even if the measurement focuses on a certain module, it is clear that it is one module that constitutes the program to be evaluated and has relationships with other modules. Therefore, even if we focus on a module, we will also be measuring quite a few other modules (
The cumulative files 61, 62, . . . , 6n each have a capacity that can accumulate comprehensive information up to the modules 41, 42, . . . , 4n).

【0023】ここで、網羅情報併合部28は、累積ファ
イル61,62,……,6nを併合し、評価対象プログ
ラム全体としての1つの累積ファイルを作成する処理を
行なうものである。まず、測定が完了し、入力装置1か
ら累積ファイルの併合指令(例えば、累積ファイル61
,62,……,6nを併合し、併合結果を累積ファイル
61に書込む)が入力され、入力情報解析部20を介し
て、網羅率測定制御部21に通知される。この通知を受
けた網羅率測定制御部21は、累積ファイル制御部27
に対して累積ファイル61,62,……,6nを併合す
るよう指令する。この指令を受けた累積ファイル制御部
27は、累積ファイル入出力部29に対して累積ファイ
ル61,62,……,6nの読み出しと併合結果の累積
ファイルへの書込みを指令し、網羅情報併合部28に対
して読み出された累積ファイル61,62,……,6n
の併合を指令する。併合が完了すると累積ファイル制御
部27は、網羅率測定制御部21に併合完了報告を行な
うようになっている。この後、累積ファイル61の内容
を編集出力すれば、評価対象プログラム全体の比率の高
い網羅率を知ることができる。
Here, the comprehensive information merging section 28 performs a process of merging the cumulative files 61, 62, . . . , 6n to create one cumulative file for the entire program to be evaluated. First, after the measurement is completed, a cumulative file merging command is issued from the input device 1 (for example, the cumulative file 61
, 62, . Upon receiving this notification, the coverage measurement control unit 21 controls the cumulative file control unit 27.
, to merge the cumulative files 61, 62, . . . , 6n. Upon receiving this command, the cumulative file control unit 27 instructs the cumulative file input/output unit 29 to read the cumulative files 61, 62, . . . , 6n and write the merged results to the cumulative file, and then Cumulative files 61, 62, ..., 6n read for 28
Order the annexation of When the merging is completed, the cumulative file control section 27 reports the completion of merging to the coverage measurement control section 21. Thereafter, by editing and outputting the contents of the cumulative file 61, it is possible to know the high coverage rate of the entire program to be evaluated.

【0024】なお、分岐後アドレス記憶部22内の分岐
後アドレスは優先レベルに対応させて記憶できるため、
以上述べた優先レベル番号1で走行する評価対象プログ
ラム単独の測定だけでなく、複数の優先レベル番号を同
時に測定することが可能である。そして、累積ファイル
も優先レベル番号ごとに対応づけて構成するようにして
もよい。
Note that since the post-branch address in the post-branch address storage section 22 can be stored in correspondence with the priority level,
It is possible to measure not only the evaluation target program running at the priority level number 1 described above alone, but also a plurality of priority level numbers at the same time. The cumulative file may also be configured in association with each priority level number.

【0025】[0025]

【発明の効果】以上説明したように、本発明によれば、
評価対象プログラムに細工しないで、分岐命令割込みを
利用して網羅情報を記憶し、評価対象プログラムの実行
後、記憶された網羅情報をもとに実行済命令数の比率(
プログラム網羅率)を算出することができる。これによ
ってプログラムの網羅率が客観的に判定でき、かつプロ
グラムの品質尺度が経験年数などど無関係に統一できる
。そして、未実行命令のアドレスを出力することにより
、次の評価ステップでは未実行命令に着目した評価がで
きる。これによりプログラムの品質を効率よく向上させ
ることができる。
[Effects of the Invention] As explained above, according to the present invention,
Without modifying the program to be evaluated, comprehensive information is stored using branch instruction interrupts, and after the program to be evaluated is executed, the ratio of the number of executed instructions (
Program coverage rate) can be calculated. This allows the program coverage rate to be determined objectively, and the program quality scale to be standardized regardless of years of experience. Then, by outputting the address of the unexecuted instruction, evaluation focusing on the unexecuted instruction can be performed in the next evaluation step. This allows the quality of the program to be efficiently improved.

【0026】さらに、網羅情報を外部記憶装置の累積フ
ァイルに累積記憶するように構成しているため、評価の
中断と継続が自由にできる。また、測定対象を分割(例
えばモジュールごと),分担して測定し、さらに測定装
置が複数台あれば同時並行して測定し、後で個々の測定
結果(累積ファイル)を併合することが可能なため、測
定時間の短縮など効率よく評価できる。
Furthermore, since the comprehensive information is cumulatively stored in the cumulative file of the external storage device, evaluation can be freely interrupted and continued. In addition, it is possible to divide the measurement target (for example, by module) and share the measurements, and if there are multiple measurement devices, it can be measured in parallel, and the individual measurement results (cumulative file) can be merged later. Therefore, efficient evaluation can be achieved, such as by shortening measurement time.

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

【図1】本発明の一実施例のブロック図である。FIG. 1 is a block diagram of one embodiment of the present invention.

【図2】図1の実施例において網羅情報を網羅情報記憶
部に記憶する動作を示す関連図である。
FIG. 2 is a related diagram showing the operation of storing comprehensive information in a comprehensive information storage unit in the embodiment of FIG. 1;

【図3】図1中の網羅情報記憶部の記憶内容を例示する
図である。
FIG. 3 is a diagram illustrating the storage contents of a comprehensive information storage section in FIG. 1;

【符号の説明】[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 (1)

【特許請求の範囲】[Claims] 【請求項1】  分岐命令の実行により分岐後最初の命
令が実行される前に当該分岐命令を含むプログラムの走
行の優先レベルと当該分岐命令自身のアドレスである分
岐前アドレスと当該分岐命令の分岐先アドレスである分
岐後アドレスとを保持して内部割込みを発生させかつ該
内部割込みが一個以上の前記優先レベルごとに発生でき
るような分岐命令割込み手段と、該分岐命令割込み手段
の起動および停止を行なうための分岐命令割込みモード
設定および解除手段と、前記優先レベルに対応させて前
記分岐後アドレスを記憶する分岐後アドレス記臆手段と
、前記分岐命令割込み手段から通知される分岐前アドレ
スと前記分岐後アドレス記臆手段により既に記憶されて
いて当該分岐命令利己み時の優先レベルに対応する分岐
後アドレスとで示される範囲を網羅情報として記憶する
網羅情報記憶手段と、主記憶装置上での評価対象プログ
ラムの全命令語のアドレスを得る命令解析手段と、該命
令語解析手段により得た命令語のアドレスと前記網羅情
報記憶手段により記憶された網羅情報とから実行済命令
の比率をプログラム網羅率として算出するとともに実行
済命令と未実行命令とが識別できるようにして命令語の
アドレスを編集出力する測定結果編集出力手段と、前記
網羅情報記憶部に記憶された網羅情報を外部記憶装置に
累積記憶する手段と、前記累積記憶手段により外部記憶
装置に累積記憶された網羅情報どうしを併合する手段と
を具備することを特徴とするプログラム網羅率測定方式
Claim 1: Before the first instruction after a branch is executed by executing a branch instruction, the execution priority level of the program including the branch instruction, the pre-branch address that is the address of the branch instruction itself, and the branch of the branch instruction. A branch instruction interrupt means capable of generating an internal interrupt by holding a post-branch address that is a destination address, and capable of generating one or more internal interrupts for each of the priority levels; and a branch instruction interrupt means capable of starting and stopping the branch instruction interrupt means. branch instruction interrupt mode setting and canceling means for executing the branch instruction interrupt mode; post-branch address storage means for storing the post-branch address in correspondence with the priority level; and a pre-branch address notified from the branch instruction interrupt means and the branch address. Coverage information storage means for storing, as coverage information, a range indicated by the post-branch address already stored by the post-address storage means and corresponding to the priority level at the time of selfishness of the branch instruction; and evaluation on the main storage device. An instruction analysis means that obtains the addresses of all instruction words of the target program, and a program coverage rate that calculates the ratio of executed instructions from the addresses of the instruction words obtained by the instruction word analysis means and the coverage information stored by the coverage information storage means. measurement result editing and output means for calculating and outputting the address of the instruction word so that executed instructions and unexecuted instructions can be distinguished; A method for measuring program coverage rate, comprising: a storage means; and a means for merging coverage information cumulatively stored in an external storage device by the cumulative storage means.
JP3002494A 1991-01-14 1991-01-14 Measuring system for program comprehension rate Pending JPH04239337A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3002494A JPH04239337A (en) 1991-01-14 1991-01-14 Measuring system for program comprehension rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3002494A JPH04239337A (en) 1991-01-14 1991-01-14 Measuring system for program comprehension rate

Publications (1)

Publication Number Publication Date
JPH04239337A true JPH04239337A (en) 1992-08-27

Family

ID=11530912

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3002494A Pending JPH04239337A (en) 1991-01-14 1991-01-14 Measuring system for program comprehension rate

Country Status (1)

Country Link
JP (1) JPH04239337A (en)

Similar Documents

Publication Publication Date Title
JPH0749799A (en) Apparatus and method for automation
JPH04239337A (en) Measuring system for program comprehension rate
JP3389745B2 (en) Apparatus and method for measuring program performance
JPS6231362B2 (en)
JPH03271949A (en) Automatic generation system for test environment of program test
JPH09160702A (en) Operation reproduction method and system for monitoring and control program
JP3422478B2 (en) Program creation device and program creation method
JPH0566967A (en) Measuring system for program comprehension rate
JP4031195B2 (en) Offset adjustment device
JPS63223841A (en) Measuring system for program including rate
JPH04257934A (en) System for measuring comprehensive rate of program
JPH04241637A (en) System for measuring number of executed program instruction
JPS6324425A (en) Test comprehensive state detection system
JPH01118937A (en) Measurement system for program comprehension rate
JPH01118935A (en) Measurement system for program comprehension rate
JPS63300333A (en) Measurement system for number of times of instruction execution of program
JPH01118938A (en) Measurement system for program comprehension rate
JPS63300332A (en) Measurement system for number of times of instruction execution of program
JPS63300335A (en) Measurement system for number of times of instruction execution of program
JPH0452835A (en) Program test evaluation system
JPH0488426A (en) Program coverage measuring instrument
JPH07103791A (en) Recording method for waveform data in waveform recorder
JPS6112295B2 (en)
JP3268505B2 (en) Sequence control signal recording method
JPH01126741A (en) Method for diagnosing computer system