JPH01118935A - Measurement system for program comprehension rate - Google Patents

Measurement system for program comprehension rate

Info

Publication number
JPH01118935A
JPH01118935A JP62276357A JP27635787A JPH01118935A JP H01118935 A JPH01118935 A JP H01118935A JP 62276357 A JP62276357 A JP 62276357A JP 27635787 A JP27635787 A JP 27635787A JP H01118935 A JPH01118935 A JP H01118935A
Authority
JP
Japan
Prior art keywords
branch
instruction
executed
address
program
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
JP62276357A
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 JP62276357A priority Critical patent/JPH01118935A/en
Publication of JPH01118935A publication Critical patent/JPH01118935A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To accurately grasp the degree of evaluation of a program to be evaluated by applying a system where the rate is measured for the instructions carried out at least once or more during evaluation of said program. CONSTITUTION:A system consists of an input device 1 which performs the input operations, a program comprehension rate measuring device 2, a CPU 3, a main memory 4, and an output device 5. The executed instruction area information is successively stored in the executing processes of programs 41-4n to be evaluated by means of a branch instruction interruption. Then the ratio of the executed instructions of the programs 41-4n is calculated based on the stored executed instruction area information after execution of the programs 41-4n. Thus it is possible to measure the ratio of the number of executed instructions as a program comprehension rate with no work applied to the programs 41-4n. As a result, the degrees of evaluation of the programs 41-4n can be accurately grasped.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は計算機システムにおけるプログラム網羅率測定
方式に関し、特に優先レベルの異なる1つ以上の評価対
象プログラムを実行した場合において、少なくとも1回
以上実行された命令の全命令数に対する比率を各評価対
象プログラム毎に測定する方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a method for measuring program coverage in a computer system, and in particular, when one or more programs to be evaluated with different priority levels are executed, the method is executed at least once or more. This invention relates to a method of measuring the ratio of executed instructions to the total number of instructions for each evaluation target program.

〔従来の技術〕[Conventional technology]

プログラムを新規に開発した場合などにおいては、その
プログラムが所期の目的を達成しているか否かを確認す
るために、試験データなどを用いてそのプログラムを評
価することが行なわれる。
When a new program is developed, the program is evaluated using test data or the like in order to confirm whether the program achieves its intended purpose.

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

〔発明が解決しようとする問題点゛〕[Problem that the invention seeks to solve]

しかしながら、評価対象プログラム内の全命令を網羅で
きるような評価項目を事前に考えることは極めて困難で
あり、従って、予め考えた評価項目を全て満足したこと
をもって、評価対象プログラムの評価が済んだとは言え
ないという問題点があった。
However, it is extremely difficult to think of evaluation items in advance that can cover all the instructions in the program to be evaluated, and therefore it is considered that the evaluation of the program to be evaluated is complete when all the evaluation items that have been considered in advance are satisfied. The problem was that it was impossible to say.

本発明はこのような事情に鑑みて為されたものであり、
その目的は、評価対象プログラムの評価中に少なくとも
1回以上実行された命令の比率を測定する方式を提供す
ることより、評価対象プログラムの評価度合を正確に知
ることができるようにすることにある。
The present invention has been made in view of these circumstances,
The purpose of this is to provide a method for measuring the ratio of instructions executed at least once during the evaluation of a program to be evaluated, thereby making it possible to accurately determine the degree of evaluation of the program to be evaluated. .

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記目的を達成するために、 プログラム走行時の優先レベルの指定を含む分岐命令割
込みモードの設定に応答して、前記指定された優先レベ
ルのプログラム中の分岐命令の実行により、分岐後最初
の命令が実行される前に前記優先レベルと分岐前アドレ
スと分岐後アドレスとを保持して内部割込みを発生させ
る分岐命令割込機構を有する計算機システムにおいて、
前記優先レベルに対応させて分岐後アドレスを記憶する
分岐後アドレス記憶手段と、 実行済命令領域情報記憶手段と、 前記分岐命令割込機構による内部割込み発生時、前記分
岐命令割込機構に保持された分岐前アドレスと、前記分
岐命令割込機構に保持された優先レベルに対応して前記
分岐後アドレス記憶手段に記憶された分岐後アドレスと
で示される範囲を実行済命令領域情報として前記実行済
命令領域情報記憶手段に記憶させると共に、前記分岐命
令割込機構に保持された分岐後アドレスを前記優先レベ
ルに対応して前記分岐後アドレス記憶手段に記憶させる
網羅率測定制御手段と、 指定された評価対象プログラムの全命令語のアドレスを
得る命令語解析手段と、 該命令語解析手段で得られた評価対象プログラムの全命
令語のアドレスと、前記実行済命令領域情報記憶手段に
記憶された実行済命令領域情報とに基づいて、指定され
た評価対象プログラムにおける実行済命令の比率をプロ
グラム走行時率として算出し出力装置から出力すると共
に、実行済命令と未実行命令とが識別できるようにして
命令語のアドレスを前記出力装置から出力する測定結果
編集出力制御手段とを有する。
In order to achieve the above object, the present invention responds to the setting of a branch instruction interrupt mode that includes the specification of a priority level when running a program, and executes a branch instruction in the program with the specified priority level, so that In a computer system having a branch instruction interrupt mechanism that holds the priority level, pre-branch address, and post-branch address and generates an internal interrupt before the first instruction is executed,
post-branch address storage means for storing post-branch addresses in correspondence with the priority levels; executed instruction area information storage means; and when an internal interrupt is generated by the branch instruction interrupt mechanism, information stored in the branch instruction interrupt mechanism is provided. The range indicated by the pre-branch address and the post-branch address stored in the post-branch address storage means corresponding to the priority level held in the branch instruction interrupt mechanism is used as executed instruction area information. Coverage rate measurement control means for storing in the instruction area information storage means and storing the post-branch address held in the branch instruction interrupt mechanism in the post-branch address storage means in correspondence with the priority level; instruction word analysis means for obtaining addresses of all instruction words of the evaluation target program; addresses of all instruction words of the evaluation target program obtained by the instruction word analysis means; and execution information stored in the executed instruction area information storage means. Based on the completed instruction area information, the ratio of executed instructions in the designated evaluation target program is calculated as a program running time rate and outputted from the output device, and the executed instructions and unexecuted instructions can be distinguished. and measurement result editing output control means for outputting the address of the command word from the output device.

〔作用〕[Effect]

予め指定したプログラム走行時の優先レベルを持つ評価
対象プログラム中の分岐命令が実行されると、分岐命令
割込機構によってその優先レベルと分岐前アドレスと分
岐後アドレスとが保持されて内部割込みが発生される。
When a branch instruction in an evaluation target program that has a pre-specified priority level during program execution is executed, the branch instruction interrupt mechanism retains the priority level, pre-branch address, and post-branch address, and generates an internal interrupt. be done.

この内部割込みが発生すると、!i1m率測定制御手段
は、分岐命令割込機構に保持された分岐前アドレスと、
今回の優先レベルに対応して分岐後アドレス記憶手段に
記憶されていた前回の分岐後アドレスとで示される範囲
を実行済命令領域情報として実行済命令領域情報記憶手
段に記憶させると共に、分岐命令割込機構に今回保持さ
れた分岐後アドレスを、上記優先レベルに対応して分岐
後アドレス記憶手段に記憶させる。このような処理は、
指定された優先レベルの評価対象プログラム中の分岐命
令が実行される毎に行なわれ、その結果、評価対象プロ
グラムの実行終了時には、評価対象プログラムの領域の
うち実行済命令の領域を示す情報が実行済命令領域情報
記憶手段に記憶されることになる。その後、測定結果編
集出力制御手段によって、命令語解析手段から得た評価
対象プログラムの全命令語のアドレスと、実行済命令領
域情報記憶手段に記憶された実行済命令領域情報とに基
づいて、評価対象プログラムにおける実行済命令の比率
がプログラム網羅率として算出され出力されると共に、
実行済命令と未実行命令とが識別できるようにされた命
令語のアドレスが出力される。
When this internal interrupt occurs,! The i1m rate measurement control means includes a pre-branch address held in the branch instruction interrupt mechanism;
The range indicated by the previous post-branch address stored in the post-branch address storage means corresponding to the current priority level is stored as executed instruction area information in the executed instruction area information storage means, and the branch instruction allocation The post-branch address currently held by the loading mechanism is stored in post-branch address storage means in correspondence with the priority level. Such processing is
It is executed every time a branch instruction in the evaluation target program of the specified priority level is executed, and as a result, when the evaluation target program finishes execution, information indicating the area of the executed instruction among the areas of the evaluation target program is executed. It will be stored in the completed instruction area information storage means. Thereafter, the measurement result editing output control means performs evaluation based on the addresses of all instructions of the evaluation target program obtained from the instruction word analysis means and the executed instruction area information stored in the executed instruction area information storage means. The ratio of executed instructions in the target program is calculated and output as the program coverage rate, and
The address of the instruction word is output so that executed instructions and unexecuted instructions can be distinguished.

〔実施例〕〔Example〕

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

第1図は本発明のプログラム網羅率測定方式の一実施例
のブロック図である0本実施例のプログラム網羅率測定
方式は、入力操作が行なわれる入力装置1と、プログラ
ムmii*tm定装置2と、中央処理装置3と、主記憶
装置4と、出力装置5とで構成されている。
FIG. 1 is a block diagram of an embodiment of the program coverage measurement method of the present invention. , a central processing unit 3 , a main storage device 4 , and an output device 5 .

中央処理装置3内には、優先レベルの指定を含む分岐命
令割込みモードの設定に応答して、前記指定された優先
レベルのプログラム中の分岐命令の実行により、分岐後
最初の命令が実行される前に前記優先レベルと分岐前ア
ドレスと分岐後アドレスとを保持して内部割込みを発生
させる分岐命令割込機構30が設けられている。また、
プログラム′fi4羅率測定装置2は、入力情報解析部
20と、網羅率測定制御部21と、優先レベル毎に分岐
後アドレスを格納し得る分岐後アドレス記憶部22と、
実行済命令領域情報記憶部23と、測定結果編集出力制
御部24と、命令語解析部25と、′fi4羅率算比率
算出部26する。
In the central processing unit 3, in response to a branch instruction interrupt mode setting including a priority level specification, the first instruction after the branch is executed by executing the branch instruction in the program of the specified priority level. A branch instruction interrupt mechanism 30 is provided in front of the branch instruction interrupt mechanism 30 that holds the priority level, pre-branch address, and post-branch address and generates an internal interrupt. Also,
The program 'fi4 ratio measurement device 2 includes an input information analysis section 20, a coverage measurement control section 21, a post-branch address storage section 22 that can store post-branch addresses for each priority level,
An executed instruction area information storage section 23, a measurement result editing output control section 24, an instruction word analysis section 25, and a 'fi4 ratio calculation section 26.

主記憶装置4には、複数の評価対象プログラム41、4
2.・・・、 4nが存在し、それぞれの先頭アドレス
は31.S2.・・・、Sn番地であり、同じ(終了ア
ドレスはEl、  E2.・・・、En番地である。
The main storage device 4 contains a plurality of evaluation target programs 41, 4.
2. ..., 4n exist, and the start address of each is 31. S2. ..., Sn address, and the same (end address is El, E2..., En address).

そして、評価対象プログラム41.42.・・・、 4
nの走行時の優先レベルは、それぞれ(II、 (21
,・・・、(n)である。
And evaluation target program 41.42. ..., 4
The priority levels of n when running are (II, (21
,...,(n).

次に、このように構成された本実施例のプログラム網羅
率測定方式の動作について説明する。
Next, the operation of the program coverage measurement method of this embodiment configured as described above will be explained.

本発明では、主記憶装置4に存在する複数の評価対象プ
ログラムのプログラム網羅率を、各々単独に測定するこ
ともでき、優先レベルの異なる複数の評価対象プログラ
ムのM@羅車側同時に測定することもできる。今、二つ
の評価対象プログラム41、42のプログラム!114
i率を同時に測定するとすると、入力装置1からプログ
ラム網羅率測定装置2の入力情報解析部20を介して、
評価対象プログラム41の優先レベルである(1)と評
価対象プログラム42の優先レベルである(2)とを、
網羅率測定制御部21に通知する。
In the present invention, the program coverage rates of a plurality of programs to be evaluated that exist in the main storage device 4 can be measured individually, and it is also possible to simultaneously measure the program coverage rates of a plurality of programs to be evaluated that have different priority levels. You can also do it. Now, there are two programs to be evaluated: 41 and 42! 114
If the i rate is measured at the same time, from the input device 1 via the input information analysis section 20 of the program coverage measurement device 2,
(1) which is the priority level of the evaluation target program 41 and (2) which is the priority level of the evaluation target program 42,
The coverage rate measurement control unit 21 is notified.

この通知を受けた網羅率測定制御部21は、優先レベル
+11. (21を分岐命令割込みモードにして分岐命
令割込機構30を起動すると共に、優先レベル(1)。
Upon receiving this notification, the coverage measurement control unit 21 sets the priority level to +11. (21 is set to the branch instruction interrupt mode and the branch instruction interrupt mechanism 30 is activated, and the priority level is (1).

(2)に対応する分岐後アドレス記憶部22内の分岐後
アドレスをゼロに初期化する。この後、主記憶装置4内
での評価対象プログラム41.42が起動される。
The post-branch address in the post-branch address storage unit 22 corresponding to (2) is initialized to zero. After this, the evaluation target programs 41 and 42 in the main storage device 4 are started.

評価対象プログラム41.42の実行中、分岐命令が実
行されると、中央処理装置3の分岐命令割込機構30は
、走行中の優先レベル(評価対象プログラム41の分岐
命令実行時は(1)、評価対象プログラム42の分岐命
令実行時は+2))1分岐後アドレス。
When a branch instruction is executed during execution of the evaluation target program 41 or 42, the branch instruction interrupt mechanism 30 of the central processing unit 3 interrupts the running priority level ((1) when executing the branch instruction of the evaluation target program 41). , +2)) 1 post-branch address when executing a branch instruction in the evaluation target program 42.

分岐前アドレスを保持して分岐先のアドレスで分岐命令
割込みを発生させ、プログラム網羅率測定装置2のw4
羅車側定制御部21を動作させる。
The pre-branch address is held and a branch instruction interrupt is generated at the branch destination address, and w4 of the program coverage measurement device 2
The vehicle side control section 21 is operated.

l車側測定制御部21は、分岐命令割込機構30に保持
された優先レベルと分岐命令自身のアドレスである分岐
前アドレスとこの分岐命令の分岐先である分岐後アドレ
スとを分岐命令割込機構30から受取り、分岐後アドレ
ス記憶部22内のその優先レベルに対応する分岐後アド
レスから今回受取った分岐前アドレスまでの範囲を実行
済命令領域情報として実行済命令領域情報記憶部23内
に記憶すると共に、今回受取った分岐後アドレスを今回
受取った優先レベルに対応する分岐後アドレス記憶部2
2内の場所に記憶する。なお、w4羅車側定制御部21
は、優先レベル番号に対応する分岐後アドレス記憶部2
2内の分岐後アドレスがゼロに初期化されている最初の
分岐命令割込み時には、分岐命令割送機構30から通知
された分岐後アドレスを今回の優先レベルに対応させて
分岐後アドレス記憶部22に記憶するだけであって、実
行済命令領域情報を実行済命令領域情報記憶部23に記
憶することはしない0以上の動作を行なうた後、1iI
fI率測定制御部21は、評価対象プログラム41或い
は42での分岐後アドレスからの実行再開を分岐命令割
込機構30に指示し、次の分岐命令割込み待ちとなる。
The vehicle side measurement control unit 21 generates a branch instruction interrupt by using the priority level held in the branch instruction interrupt mechanism 30, the pre-branch address which is the address of the branch instruction itself, and the post-branch address which is the branch destination of this branch instruction. The range from the post-branch address corresponding to the priority level received from the branch address storage unit 22 to the pre-branch address received this time is stored as executed instruction area information in the executed instruction area information storage unit 23. At the same time, the branch address storage unit 2 corresponding to the currently received priority level stores the currently received post-branch address.
Store it in a location within 2. In addition, w4 vehicle side constant control section 21
is the post-branch address storage unit 2 corresponding to the priority level number.
At the time of the first branch instruction interrupt in which the post-branch address in 2 is initialized to zero, the post-branch address notified from the branch instruction allocation mechanism 30 is stored in the post-branch address storage unit 22 in correspondence with the current priority level. After performing 0 or more operations that only store the executed instruction area information and do not store the executed instruction area information in the executed instruction area information storage unit 23, 1iI
The fI rate measurement control unit 21 instructs the branch instruction interrupt mechanism 30 to resume execution from the post-branch address in the evaluation target program 41 or 42, and waits for the next branch instruction interrupt.

第2図は評価対象プログラム41のアドレスPOからア
ドレスP4までのルーチンを例にとって、実行済命令領
域情報を実行済命令領域情報記憶部23に記憶する際の
本実施例の動作を説明した図である。評価対象プログラ
ム41において、アドレスPO,PI、P2.P3.P
4は分岐命令の分岐先アドレス(分岐後アドレス)であ
り、アドレスBl、B2.B3.B4は分岐命令自身の
アドレス(分岐前アドレス)である、まず、評価対象プ
ログラム41のアドレスPOに分岐する分岐命令が実行
されると、分岐命令割込機構30によって分岐命令割込
みが発生し、yi羅車側定制御部21が動作する。網羅
率測定制御部21は分岐命令割込機構30から通知され
る分岐後アドレスPOを分岐後アドレス記憶部22に優
先レベル11)に対応して記憶する(ここでは、アドレ
スPOに分岐する前の実行済命令領域情報の記憶手順の
説明は省略している)。
FIG. 2 is a diagram illustrating the operation of this embodiment when storing executed instruction area information in the executed instruction area information storage unit 23, taking the routine from address PO to address P4 of the evaluation target program 41 as an example. be. In the evaluation target program 41, addresses PO, PI, P2. P3. P
4 is the branch destination address (post-branch address) of the branch instruction, and addresses B1, B2 . B3. B4 is the address of the branch instruction itself (pre-branch address). First, when a branch instruction that branches to address PO of the evaluation target program 41 is executed, a branch instruction interrupt is generated by the branch instruction interrupt mechanism 30, and yi The vehicle side control section 21 operates. The coverage measurement control unit 21 stores the post-branch address PO notified from the branch instruction interrupt mechanism 30 in the post-branch address storage unit 22 in correspondence with the priority level 11) (here, the address PO before branching to the address PO is stored in the post-branch address storage unit 22). (The explanation of the procedure for storing executed instruction area information is omitted.)

次に、評価対象プログラム41のアドレスB1での分岐
命令が実行され、分岐先であるアドレスP1で分岐命令
割込みが発生すると、y4N率測定制御部21は分岐命
令割込機構30から通知される分岐前アドレスBlと、
このとき分岐後アドレス記憶部22に優先レベル(1)
対応に記憶されたアドレスPOとの範囲を、実行済命令
領域情報M1として実行済命令領域情報記憶部23に記
憶し、その後分岐前アドレスB1とともに通知された分
岐後アドレスPIを分岐後アドレス記憶部22の優先レ
ベル+1+対応の位置へ記憶する。同様に、アドレスB
2.B3、B4の分岐命令の実行によってそれぞれアド
レスP2.P3.P4で分岐命令割込みが発生し、mm
m測測定制御部21よってそれぞれ実行済命令領域情報
M2.M3.M4が実行済命令領域情報記憶部23に記
憶される。
Next, when 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, the y4N rate measurement control unit 21 receives a branch instruction from the branch instruction interrupt mechanism 30. Previous address Bl and
At this time, the priority level (1) is set in the post-branch address storage unit 22.
The range with the address PO stored in correspondence is stored in the executed instruction area information storage unit 23 as executed instruction area information M1, and then the post-branch address PI notified together with the pre-branch address B1 is stored in the post-branch address storage unit. 22 priority level + 1 + stored in the corresponding position. Similarly, address B
2. By executing branch instructions B3 and B4, addresses P2. P3. A branch instruction interrupt occurs at P4, mm
The m measurement control unit 21 generates executed command area information M2. M3. M4 is stored in the executed instruction area information storage section 23.

第3図は実行済命令領域情報記憶部23の記憶内容の一
例を示す図である。この実施例の実行済命令領域情報記
憶部23は、主記憶の各番地と1対1で対応するピント
を有し、例えばビット番号0のビットは主記憶上のO番
地に、ビット番号100のビットは主記憶上の100番
地に対応している。
FIG. 3 is a diagram showing an example of the stored contents of the executed instruction area information storage section 23. As shown in FIG. The executed instruction area information storage unit 23 of this embodiment has a focus that corresponds one-to-one with each address in the main memory. For example, a bit with bit number 0 is stored in address O in the main memory, The bit corresponds to address 100 on main memory.

そして、実行法命令の番地に対応するビット番号のビッ
トはオンにされ、未実行命令の番地に対応するビットは
オフにされるように使用される0例えば、評価対象プロ
グラム41を例にすると、その主記憶上での先頭アドレ
スは81番地で終了アドレスはE1番地であるため、評
価対象プログラム41の実行済命令領域情報は、第3@
の実行済命令領域情報記憶部230ビット番号S1から
ビット番号Elの範囲の記憶エリア23−1に記憶され
る。実行済命令領域情報記憶エリア23−1には、第2
図で説明した実行済命令領域情報Ml、M2.M3゜M
4が存在し且つ実行済命令領域情報Ml、M2゜M3.
M4に含まれる全てのビットはオンである。
Then, the bit of the bit number corresponding to the address of the executable instruction is turned on, and the bit corresponding to the address of the unexecuted instruction is turned off.For example, taking the evaluation target program 41 as an example, Since the start address on the main memory is address 81 and the end address is address E1, the executed instruction area information of the evaluation target program 41 is
is stored in the storage area 23-1 in the range from bit number S1 to bit number El in the executed instruction area information storage unit 230. The executed instruction area information storage area 23-1 includes a second
Executed instruction area information Ml, M2 . M3゜M
4 exists and executed instruction area information Ml, M2°M3.
All bits contained in M4 are on.

同様に、実行済命令領域情報記憶エリア23−1のうち
、評価対象プログラム41の実行された他の命令領域に
対応するビットも、実行済命令領域情報M1、M2.M
3.M4と同様にオンであり、その他のビット即ち評価
対象プログラム41の未実行の命令領域に対応するビッ
トはオフになっている。
Similarly, bits corresponding to other executed instruction areas of the evaluation target program 41 in the executed instruction area information storage area 23-1 are also stored in the executed instruction area information M1, M2. M
3. Like M4, it is on, and the other bits, that is, the bits corresponding to unexecuted instruction areas of the evaluation target program 41, are off.

さて、第1図において、評価対象プログラム41゜42
の実行終了後、優先レベル(1)、 (2+の分岐命令
割込みモード解除指令が入力装置lから入力情報解析部
20を介して網羅率測定制御部21に通知されると、v
4羅車側定制御部21は、優先レベル+11. +21
の分岐命令割込みモードを解除して分岐命令割込機構3
0を停止すると共に、先ず優先レベル(1)の評価対象
プログラム41に対する測定結果を編集出力するように
測定結果編集出力制御部24に指示する。
Now, in Figure 1, the program to be evaluated is 41°42
After completion of execution, when a branch instruction interrupt mode release command of priority level (1), (2+) is notified from the input device l to the coverage measurement control unit 21 via the input information analysis unit 20, v
4. The vehicle side control unit 21 sets the priority level +11. +21
Release the branch instruction interrupt mode of the branch instruction interrupt mechanism 3.
0, and first instructs the measurement result editing output control unit 24 to edit and output the measurement results for the evaluation target program 41 of priority level (1).

この指示を受けた測定結果編集出力制御部24は、命令
語解析部25に対して81番地からE1番地までの全命
令語のアドレスを報告するように指示する。命令語解析
部25はこれに応答して、81番地からE1番地までの
全命令語を解釈して全命令語のアドレスを測定結果編集
出力制御部24に逐次報告する。
Upon receiving this instruction, the measurement result editing output control section 24 instructs the instruction word analysis section 25 to report the addresses of all instruction words from address 81 to address E1. In response, the instruction word analysis section 25 interprets all the instruction words from address 81 to address E1 and sequentially reports the addresses of all instruction words to the measurement result editing output control section 24.

測定結果編集出力制御部24は、命令語解析部25から
命令語のアドレスが報告されると、その報告、されたア
ドレスと、実行済命令領域情報記憶部23内のビットの
状態とに基づき、ビットがオフであるアドレス即ち未実
行命令のアドレスだけを出力装置5に出力する。更に、
測定結果編集出力制御部24は、命令語解析部25によ
り逐次報告される命令語の個数をカウントすると共に、
報告された命令語のアドレスに対応する実行済命令領域
情報記憶エリア23−1のビットがオンである回数つま
り実行法命令語数をカウントしており、最後にそれらの
カウント値に基づいて実行法命令語数の全命令語数に対
する比率を網羅率算出部26に求めさせる。
When the instruction word address is reported from the instruction word analysis section 25, the measurement result editing output control section 24, based on the reported address and the state of the bit in the executed instruction area information storage section 23, Only addresses whose bits are off, that is, addresses of unexecuted instructions, are output to the output device 5. Furthermore,
The measurement result editing output control section 24 counts the number of instruction words sequentially reported by the instruction word analysis section 25, and
The number of times the bit in the executed instruction area information storage area 23-1 corresponding to the address of the reported instruction word is on is counted, that is, the number of execution method instructions, and finally the execution method instruction is The coverage calculation unit 26 is caused to calculate the ratio of the number of words to the total number of command words.

網羅率算出部26は、上記のカウント値に基づき、例え
ば実行法命令語数を全命令語数で除算した結果を百分率
などの形式で求め、測定結果編集出力制御部24に通知
する。測定結果編集出力制御部24は、この算出結果を
評価対象プログラム41に対するプログラム網羅率とし
て出力装置5に出力する。
The coverage calculation unit 26 calculates the result of dividing the number of execution method command words by the total number of command words, for example, in the form of a percentage based on the above-mentioned count value, and notifies the measurement result editing output control unit 24 . The measurement result editing output control unit 24 outputs this calculation result to the output device 5 as a program coverage rate for the evaluation target program 41.

そして、優先レベル(1)のw4羅率測定終了をy4羅
車側定制御部21に報告する。
Then, the completion of the w4 ratio measurement at priority level (1) is reported to the y4 ratio vehicle side constant control unit 21.

この報告を受けると、kM羅車側定制御部21は、次に
優先レベル(2)の評価対象プログラム42に対する測
定結果を編集出力するように測定結果編集出力制御部2
4に指示する。これによって、上記と同様な処理が行な
われ、評価対象プログラム42の未実行命令のアドレス
及びプログラム網羅率が出力装置5から出力される。こ
のようにして出力装置5から出力される測定結果の出力
例を第4図に示す。
Upon receiving this report, the kilometer vehicle side setting control unit 21 instructs the measurement result editing output control unit 2 to edit and output the measurement results for the evaluation target program 42 of priority level (2).
4. As a result, the same processing as described above is performed, and the addresses of unexecuted instructions of the evaluation target program 42 and the program coverage rate are output from the output device 5. FIG. 4 shows an example of the measurement results output from the output device 5 in this manner.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、分岐命令割込みを利用
して実行済命令領域情報を評価対象プログラムの実行過
程で逐次記憶し、評価対象プログラムの実行終了後、そ
の記憶された実行済命令領域情報をもとに、評価対象プ
ログラムの実行済命令の比率を算出するようにしたもの
であり、評価対象プログラムに細工を行なうことなく、
実行法命令数の比率をプログラム網羅率として測定する
ことができる。従って、評価対象プログラムの評価度合
を正確に把握することができる効果がある。
As explained above, the present invention uses branch instruction interrupts to sequentially store executed instruction area information during the execution process of the evaluation target program, and after the execution of the evaluation target program is finished, the executed instruction area information is stored in the stored executed instruction area. Based on the information, the ratio of executed instructions of the program to be evaluated is calculated, without any modification to the program to be evaluated.
The ratio of the number of execution method instructions can be measured as the program coverage rate. Therefore, it is possible to accurately grasp the evaluation level of the program to be evaluated.

また、評価対象プログラムの実行法命令数の比率を出力
する以外に、実行済命令と未実行命令とが識別できるよ
うにして命令語のアドレスを併せて出力することにより
、評価対象プログラムのどの命令が未実行命令であるか
等の判別が容易となり、次の評価ステップでは未実行命
令に着目した評価を行なうことができ、効率良くプログ
ラムの評価度合を向上することができる。
In addition to outputting the ratio of the number of execution method instructions of the program to be evaluated, it is also possible to identify which instructions in the program to be evaluated by outputting the address of the instruction word so that executed instructions and unexecuted instructions can be distinguished. It becomes easy to determine whether a command is an unexecuted instruction, and in the next evaluation step, evaluation can be performed focusing on unexecuted instructions, and the degree of evaluation of the program can be efficiently improved.

更に、優先レベルに対応させて分岐後アドレスを分岐後
アドレス記憶手段に記憶させ、優先レベル毎に実行法命
令領域を求めているので、優先レベルの異なる複数の評
価対象プログラムの網羅率を同時に測定することができ
る効果がある。
Furthermore, since the post-branch address is stored in the post-branch address storage means in correspondence with the priority level, and the execution method instruction area is determined for each priority level, the coverage rate of multiple evaluation target programs with different priority levels can be measured simultaneously. There is an effect that can be done.

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

第1図は本発明の実施例のブロック図、第2図は実行済
命令領域情報を実行済命令領域情報記憶部23に記憶す
る際の動作説明図、第3図は実行済命令領域情報記憶部
23の記tρ内容の一例を示す図および、 第4図は測定結果の出力例を示す図である。 図において、 1・・・入力装置 2・・・プログラムy4羅率測定装置 3・・・中央処理装置 4・・・主記憶装置 5・・・出力装置 20・・・入力情報解析部 21・・・網羅率測定制御部 22・・・分岐後アドレス記憶部 23・・・実行済命令領域情報記憶部 24・・・測定結果編集出力制御部 25・・・命令語解析部 26・・・網羅率算出部 30・・・分岐命令割込機構 41〜4n・・・評価対象プログラム
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is an explanatory diagram of the operation when storing executed instruction area information in the executed instruction area information storage section 23, and FIG. 3 is an executed instruction area information storage FIG. 4 is a diagram showing an example of the contents of the note tρ in the section 23, and FIG. 4 is a diagram showing an example of the output of the measurement results. In the figure, 1... Input device 2... Program y4 Rate measuring device 3... Central processing unit 4... Main storage device 5... Output device 20... Input information analysis section 21...・Coverage rate measurement control unit 22...Post-branch address storage unit 23...Executed instruction area information storage unit 24...Measurement result editing output control unit 25...Instruction word analysis unit 26...Coverage rate Calculation unit 30...branch instruction interrupt mechanism 41-4n...program to be evaluated

Claims (1)

【特許請求の範囲】 プログラム走行時の優先レベルの指定を含む分岐命令割
込みモードの設定に応答して、前記指定された優先レベ
ルのプログラム中の分岐命令の実行により、分岐後最初
の命令が実行される前に前記優先レベルと分岐前アドレ
スと分岐後アドレスとを保持して内部割込みを発生させ
る分岐命令割込機構を有する計算機システムにおいて、 前記優先レベルに対応させて分岐後アドレスを記憶する
分岐後アドレス記憶手段と、 実行済命令領域情報記憶手段と、 前記分岐命令割込機構による内部割込み発生時前記分岐
命令割込機構に保持された分岐前アドレスと、前記分岐
命令割込機構に保持された優先レベルに対応して前記分
岐後アドレス記憶手段に記憶された分岐後アドレスとで
示される範囲を実行済命令領域情報として前記実行済命
令領域情報記憶手段に記憶させると共に、前記分岐命令
割込機構に保持された分岐後アドレスを前記優先レベル
に対応して前記分岐後アドレス記憶手段に記憶させる網
羅率測定制御手段と、 指定された評価対象プログラムの全命令語のアドレスを
得る命令語解析手段と、 該命令語解析手段で得られた評価対象プログラムの全命
令語のアドレスと、前記実行済命令領域情報記憶手段に
記憶された実行済命令領域情報とに基づいて、指定され
た評価対象プログラムにおける実行済命令の比率をプロ
グラム網羅率として算出し出力装置から出力すると共に
、実行済命令と未実行命令とが識別できるようにして命
令語のアドレスを前記出力装置から出力する測定結果編
集出力制御手段とを含むことを特徴とするプログラム網
羅率測定方式。
[Claims] In response to the setting of a branch instruction interrupt mode that includes the specification of a priority level during program execution, the first instruction after the branch is executed by executing a branch instruction in the program with the specified priority level. In a computer system having a branch instruction interrupt mechanism that holds the priority level, pre-branch address, and post-branch address and generates an internal interrupt before the branch is executed, the branch stores the post-branch address in correspondence with the priority level. a post-address storage means; an executed instruction area information storage means; a pre-branch address held in the branch instruction interrupt mechanism when an internal interrupt occurs by the branch instruction interrupt mechanism; and a pre-branch address held in the branch instruction interrupt mechanism; The range indicated by the post-branch address stored in the post-branch address storage means corresponding to the priority level set is stored as executed instruction area information in the executed instruction area information storage means, and the branch instruction interrupt coverage measurement control means for storing post-branch addresses held in the mechanism in the post-branch address storage means in correspondence with the priority level; and instruction word analysis means for obtaining addresses of all instruction words of a designated program to be evaluated. and a specified evaluation target program based on the addresses of all instruction words of the evaluation target program obtained by the instruction word analysis means and the executed instruction area information stored in the executed instruction area information storage means. Measurement result editing output control that calculates the ratio of executed instructions in as a program coverage rate and outputs it from the output device, and outputs the address of the instruction word from the output device so that executed instructions and unexecuted instructions can be distinguished. A program coverage measurement method characterized by comprising: means.
JP62276357A 1987-10-31 1987-10-31 Measurement system for program comprehension rate Pending JPH01118935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62276357A JPH01118935A (en) 1987-10-31 1987-10-31 Measurement system for program comprehension rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62276357A JPH01118935A (en) 1987-10-31 1987-10-31 Measurement system for program comprehension rate

Publications (1)

Publication Number Publication Date
JPH01118935A true JPH01118935A (en) 1989-05-11

Family

ID=17568303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62276357A Pending JPH01118935A (en) 1987-10-31 1987-10-31 Measurement system for program comprehension rate

Country Status (1)

Country Link
JP (1) JPH01118935A (en)

Similar Documents

Publication Publication Date Title
JP2006260542A (en) Determination of actual amount of time a processor consumes in executing code portion
JPH01118935A (en) Measurement system for program comprehension rate
JP3389745B2 (en) Apparatus and method for measuring program performance
JP2663540B2 (en) Programmable controller
JPH01118938A (en) Measurement system for program comprehension rate
JPS63300333A (en) Measurement system for number of times of instruction execution of program
JPH01118937A (en) Measurement system for program comprehension rate
JPS63223841A (en) Measuring system for program including rate
JPH01118936A (en) Measurement system for program comprehension rate
JPS59205613A (en) Sequence monitor device
JPH0488426A (en) Program coverage measuring instrument
JPH04257934A (en) System for measuring comprehensive rate of program
JPS6337436A (en) Program development backup device
JPH04239337A (en) Measuring system for program comprehension rate
JPS63300335A (en) Measurement system for number of times of instruction execution of program
JPS63300332A (en) Measurement system for number of times of instruction execution of program
JPH0795294B2 (en) Information processing equipment
JPS63226745A (en) Processor system
CN113280847A (en) Verification method and verification system of test device, computer equipment and medium
JPH04241637A (en) System for measuring number of executed program instruction
JPH0217572A (en) Arithmetic processing system
JPS61170845A (en) Checking system of rom for sequence control
JPH0795293B2 (en) Information processing equipment
JPS58186856A (en) Program execution history collection system
JPH02105230A (en) Semiconductor integrated circuit