JP2009163636A - Consistency checking method, apparatus, and program - Google Patents

Consistency checking method, apparatus, and program Download PDF

Info

Publication number
JP2009163636A
JP2009163636A JP2008002528A JP2008002528A JP2009163636A JP 2009163636 A JP2009163636 A JP 2009163636A JP 2008002528 A JP2008002528 A JP 2008002528A JP 2008002528 A JP2008002528 A JP 2008002528A JP 2009163636 A JP2009163636 A JP 2009163636A
Authority
JP
Japan
Prior art keywords
coverage
code
test data
operator
new
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
JP2008002528A
Other languages
Japanese (ja)
Inventor
Meichin Cho
明珍 丁
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2008002528A priority Critical patent/JP2009163636A/en
Publication of JP2009163636A publication Critical patent/JP2009163636A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a consistency checking method, apparatus, and program for determining consistency between codes using a new code coverage instead of an existing code coverage, e.g. MC/DC. <P>SOLUTION: Test data is stored in a storage part. The test data stored in the storage part is executed with respect to new and old codes, respectively. Operator coverage information for calculating the coverage of an operator described in the executed code is measured with respect to the new and old codes, respectively. Constant parameter coverage information for calculating the coverage of a constant described in the executed code is measured with respect to the new and old codes, respectively. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、一致性検査方法、一致性検査装置およびプログラムに関し、特に、コード変更前後の旧コードおよび新コードのコードカバレッジを評価する一致性検査方法、一致性検査装置およびプログラムに関する。   The present invention relates to a consistency check method, a consistency check apparatus, and a program, and more particularly to a consistency check method, a consistency check apparatus, and a program for evaluating code coverage of old and new codes before and after code change.

従来から、ソフトウェアの分野では、デバッグテストにかなりの時間を費やされていたため、様々なデバッグテスト技術が開発されている。   Conventionally, in the field of software, a considerable amount of time has been spent on debugging tests, and various debugging test techniques have been developed.

例えば、特許文献1の技術は、コードカバレッジ情報をコードカバレッジデータベースに格納し、このコードカバレッジデータベースを利用して、非実行コード記述を削除またはコメントアウトするコード最適化手段で設計データおよび検証ベクタの両方のコード最適化を行う集積回路装置の設計方法および設計装置である。   For example, the technique of Patent Document 1 stores code coverage information in a code coverage database, and uses this code coverage database to delete or comment out non-executable code descriptions. The design method and design apparatus of an integrated circuit device for performing the code optimization.

また、特許文献2の技術は、機能、容量共に余裕のあるホストの中に第1プログラム命令のブレークポイントに対応するパッチコードを用意し、実行時にブレークポイントを識別するパッチコードと置き換えて実行し、予想される結果と比較してソフトウェアの良否を判断する組込型処理装置システム用コードカバレッジ測定方法および装置である。   The technology of Patent Document 2 prepares a patch code corresponding to a breakpoint of the first program instruction in a host having both functions and capacity, and executes it by replacing it with a patch code for identifying the breakpoint at the time of execution. A code coverage measurement method and apparatus for an embedded processor system that determines whether software is good or bad compared with expected results.

また、特許文献3の技術は、ソフトウェア機能をシミュレートするためのシミュレーションモデルと制御ユニットの使用を有する、制御ユニットのためのソフトウェア機能を検証する方法とシステムである。   The technique of Patent Document 3 is a method and system for verifying software functions for a control unit, which includes the use of a simulation model and a control unit for simulating software functions.

また、特許文献4の技術は、被検査ECUに擬似信号を入力しその出力を評価することによって良否判定を行う車載ECUの検査装置であり、検査装置のオプションユニット交換によってECU種類に対応したECU検査を行うものである。   The technique of Patent Document 4 is an in-vehicle ECU inspection device that performs a pass / fail determination by inputting a pseudo signal to an ECU to be inspected and evaluating its output, and an ECU corresponding to the ECU type by replacing an optional unit of the inspection device. The inspection is to be performed.

また、特許文献5の技術は、ソースコードの全行数に対するテスト通過行数の割合を算出して重み付けカバレッジ情報を生成する手段を備えるカバレッジ取得システムである。   Moreover, the technique of patent document 5 is a coverage acquisition system provided with the means which calculates the ratio of the number of test passing lines with respect to the total number of lines of a source code, and produces | generates weighted coverage information.

また、非特許文献1の技術は、MC/DC(Modified Condition/Decision Coverage)という業界標準のカバレッジ測定基準を用いてソースコード中のテストされていない箇所を検出するものである。   The technique of Non-Patent Document 1 detects an untested portion in the source code using an industry standard coverage measurement standard called MC / DC (Modified Condition / Decision Coverage).

また、特許文献6の技術は、ランダムに作成されたテストデータを使ってシステムLSIを検査する際、上記MC/DCに基づいて、カバレッジチェッカーを用いることでランダムデータが検査項目をどれだけ満たすかを確認し、テスト完全性の指標としてカバレッジを使用するシステム検証装置および検証方法である。   In the technique of Patent Document 6, when a system LSI is inspected using test data created at random, how much random data satisfies the inspection items by using a coverage checker based on the MC / DC. Is a system verification apparatus and verification method that uses coverage as an indicator of test integrity.

このように、ソフトウェアの構造を変更した場合は、変更前後の機能(入出力の関係)が一致しているかを検査する必要がある。代表的には、上記特許文献6のように、用意されたテストデータを、変更前と変更後のコードに対してそれぞれ実行しその結果を比較する手法があり、テストの充分性(精度)はコードカバレッジ情報(カバレッジ率)から判断している(図1を参照)。   Thus, when the software structure is changed, it is necessary to check whether the functions (input / output relationships) before and after the change match. Typically, there is a method of executing prepared test data on the code before and after the change and comparing the results as in Patent Document 6 above, and the sufficiency (accuracy) of the test is It is determined from the code coverage information (coverage rate) (see FIG. 1).

ここで、図1は、上記特許文献6に示すような、従来のコードカバレッジ(例えば、MC/DC)に基づいた一致性検査手法の一例を示すデータフロー図である。図1において、テストデータは新・旧コード別に実行され、その結果、コードの出力差が「0」となるので「新・旧コードの出力は一致する」と判断されている。また、このテストの精度を評価するため、上記MC/DCを用いてカバレッジ測定が新・旧コード別に行われ、その結果、各コードのカバレッジ率が「100%」となるので「テストの精度が高い」と判断されている。   Here, FIG. 1 is a data flow diagram showing an example of a consistency check method based on a conventional code coverage (for example, MC / DC) as shown in Patent Document 6 above. In FIG. 1, the test data is executed for each new and old code, and as a result, the code output difference is “0”, so it is determined that “new and old code outputs match”. In addition, in order to evaluate the accuracy of this test, coverage measurement is performed for each new and old code using the MC / DC, and as a result, the coverage rate of each code becomes “100%”. It is judged as “high”.

特開2004−355130号公報JP 2004-355130 A 特開2007−004793号公報JP 2007-004793 A 特開2005−504377号公報JP 2005-504377 A 特開昭63−168837号公報JP-A 63-168837 特開2006−1550920号公報JP 2006-1550920 A 特開2004−086838号公報JP 2004-086838 A Kelly J.Hayhurstら、“A Pratical Turotial On Modified Condition/Decision Coverage”、NASA/TM−2001−210876、2001年5月Kelly J., et al. Hayhurst et al., “A Practical Turbial On Modified Condition / Decision Coverage”, NASA / TM-2001-210876, May 2001.

しかしながら、従来のコードカバレッジ(例えば、非特許文献1および特許文献6に記載のMC/DCなど)では、コード変更(新コードと旧コードとの差)が検出できない場合があり、より厳しいコードカバレッジを定義する必要があった。   However, with conventional code coverage (for example, MC / DC described in Non-Patent Document 1 and Patent Document 6), code changes (difference between new code and old code) may not be detected, and stricter code coverage Needed to be defined.

ここで、図2に参照し、従来のコードカバレッジの問題を説明する。図2は、従来のコードカバレッジ(例えば、MC/DC:Modified Condition/Decision Coverage)と、このMC/DCを100%満たすテストデータの一例を示す図である。ここで、「MC/DC」とは、上述のように、ソースコード中のテストされていない箇所を検出するために用いられる業界標準のカバレッジ測定基準であり、ソフトウェアのデバッグテストに用いられる。   Here, the conventional code coverage problem will be described with reference to FIG. FIG. 2 is a diagram illustrating an example of conventional code coverage (for example, MC / DC: Modified Condition / Decision Coverage) and test data that satisfies 100% of the MC / DC. Here, as described above, “MC / DC” is an industry standard coverage metric used to detect an untested portion in the source code, and is used for a software debug test.

図2において、従来のコードカバレッジ(例えば、MC/DC)では、図2の変更前の(a)と変更後の(b)のコードは機能が全く違うが、出力値(O1とO2)が一致しているため、これらのコードが100%一致していると判断している。すなわち、MC/DCをコードカバレッジテストに用いる場合は、テストデータによっては、コード中の機能に違いがあるのにもかかわらず出力が一致することがあり、不一致を一致と判断する危険性があるという問題点を有する。   In FIG. 2, in the conventional code coverage (for example, MC / DC), the code of (a) before the change of FIG. 2 and the code of (b) after the change have completely different functions, but the output values (O1 and O2) are different. Since they match, it is determined that these codes match 100%. In other words, when MC / DC is used for a code coverage test, the output may match even though there is a difference in the function in the code depending on the test data, and there is a risk of judging that the mismatch is a match. Has the problem.

本発明は、上記に鑑みてなされたもので、従来のコードカバレッジ(例えば、MC/DC)に替わる新たなコードカバレッジを用いて、コード間の一致と不一致とを明確に区別することができる一致性検査方法、一致性検査装置およびプログラムを提供することを目的とする。   The present invention has been made in view of the above, and it is possible to clearly distinguish between a match and a mismatch between codes by using a new code coverage in place of the conventional code coverage (for example, MC / DC). An object of the present invention is to provide a sex checking method, a consistency checking device, and a program.

このような目的を達成するため、請求項1に記載の一致性検査方法は、コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置において実行される一致性検査方法であって、上記制御部において実行される、テストデータを、上記記憶部に格納するテストデータ格納ステップと、上記テストデータ格納ステップにて上記記憶部に格納された上記テストデータを、新・旧コード別に実行する実行ステップと、上記実行ステップにて実行された、上記コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定ステップと、上記実行ステップにて実行された、上記コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する定数パラメータカバレッジ測定ステップと、を含むことを特徴とする。   In order to achieve such an object, the consistency check method according to claim 1 is a consistency check including at least a storage unit and a control unit for evaluating code coverage of old code and new code before and after code change. A consistency check method executed in the apparatus, wherein test data executed in the control unit is stored in the storage unit in a test data storage step for storing the test data in the storage unit, and the test data storage step. In addition, an execution step for executing the test data for each new and old code, and operator coverage information for calculating the coverage rate of the operator described in the code executed in the execution step are newly・ Operator coverage measurement step for each old code and the constants described in the above code executed in the execution step The constant parameters coverage information for calculating the ledge rate, characterized in that it comprises a constant parameter coverage measurement step of measuring at another new and old code, the.

また、請求項2に記載の一致性検査方法は、請求項1に記載の一致性検査方法において、上記制御部において実行される、上記演算子カバレッジ測定ステップにて測定された上記演算子カバレッジ情報と、上記定数パラメータカバレッジ測定ステップにて測定された上記定数パラメータカバレッジ情報とに基づいて、新・旧コード別に上記テストデータの精度を評価付けし上記記憶部に格納するテスト評価ステップを更に含むことを特徴とする。   The consistency check method according to claim 2 is the consistency check method according to claim 1, wherein the operator coverage information measured in the operator coverage measurement step is executed in the control unit. And a test evaluation step for evaluating the accuracy of the test data for each new and old code based on the constant parameter coverage information measured in the constant parameter coverage measurement step and storing the accuracy in the storage unit. It is characterized by.

また、請求項3に記載の一致性検査方法は、請求項2に記載の一致性検査方法において、上記テスト評価ステップは、上記新たに精度を評価付けされたテストデータと、既に上記記憶部に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に上記記憶部に格納することを特徴とする。   According to a third aspect of the present invention, there is provided the consistency check method according to the second aspect, wherein the test evaluation step includes the test data that has been newly evaluated for accuracy and the storage unit that has already been evaluated. The stored test data is compared with each other, and the test data having the higher accuracy of both test data is stored in the storage unit by new and old codes.

また、請求項4に記載の一致性検査方法は、請求項1に記載の一致性検査方法において、上記一致性検査装置は、表示部を更に備え、上記制御部において実行される、上記実行ステップにて実行された上記旧コードおよび上記新コードの出力差、上記演算子カバレッジ測定ステップにて測定された上記演算子カバレッジ情報、および/または、上記定数パラメータカバレッジ測定ステップにて測定された上記定数パラメータカバレッジ情報、を上記表示部に表示する表示ステップを更に含むことを特徴とする。   According to a fourth aspect of the present invention, there is provided the consistency check method according to the first aspect, wherein the consistency check apparatus further includes a display unit and is executed in the control unit. The output difference between the old code and the new code executed in step 1, the operator coverage information measured in the operator coverage measurement step, and / or the constant measured in the constant parameter coverage measurement step The method further includes a display step of displaying the parameter coverage information on the display unit.

また、請求項5に記載の一致性検査装置は、コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置であって、上記記憶部は、テストデータを記憶するテストデータ記憶手段を備え、上記制御部は、上記テストデータ格納手段により上記記憶部に格納された上記テストデータを、新・旧コード別に実行する実行手段と、上記実行手段により実行された、上記コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定手段と、上記実行手段により実行された、上記コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する定数パラメータカバレッジ測定手段と、を備えたことを特徴とする。   Further, the consistency check device according to claim 5 is a consistency check device including at least a storage unit and a control unit for evaluating code coverage of the old code and the new code before and after the code change. The unit includes test data storage means for storing test data, and the control section executes the test data stored in the storage section by the test data storage means for each new and old code, and The operator coverage measurement means for measuring the operator coverage information for calculating the coverage rate of the operator described in the code executed by the execution means for each new and old code, and executed by the execution means. Constants that measure constant parameter coverage information for calculating the coverage rate of the constants described in the above code for each new and old code And La meter coverage measurement means, and further comprising a.

また、請求項6に記載の一致性検査装置は、請求項5に記載の一致性検査装置において、上記制御部は、上記演算子カバレッジ測定手段により測定された上記演算子カバレッジ情報と、上記定数パラメータカバレッジ測定手段により測定された上記定数パラメータカバレッジ情報とに基づいて、新・旧コード別に上記テストデータの精度を評価付けし上記記憶部に格納するテスト評価手段を更に備えたことを特徴とする。   The consistency check apparatus according to claim 6 is the consistency check apparatus according to claim 5, wherein the control unit includes the operator coverage information measured by the operator coverage measurement means and the constant. The apparatus further comprises test evaluation means for evaluating the accuracy of the test data for each new and old code based on the constant parameter coverage information measured by the parameter coverage measurement means and storing the accuracy in the storage unit. .

また、請求項7に記載の一致性検査装置は、請求項6に記載の一致性検査装置において、上記テスト評価手段は、上記新たに精度を評価付けされたテストデータと、既に上記記憶部に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に上記記憶部に格納することを特徴とする。   According to a seventh aspect of the present invention, there is provided the consistency check apparatus according to the sixth aspect, wherein the test evaluation unit includes the test data that has been newly evaluated for accuracy and the storage unit that has already been evaluated. The stored test data is compared with each other, and the test data having the higher accuracy of both test data is stored in the storage unit by new and old codes.

また、請求項8に記載の一致性検査装置は、請求項5に記載の一致性検査装置において、上記一致性検査装置は、表示部を更に備え、上記制御部は、上記実行手段により実行された上記旧コードおよび上記新コードの出力差、上記演算子カバレッジ測定手段により測定された上記演算子カバレッジ情報、および/または、上記定数パラメータカバレッジ測定手段により測定された上記定数パラメータカバレッジ情報、を上記表示部に表示する表示手段を更に備えたことを特徴とする。   The consistency check apparatus according to claim 8 is the consistency check apparatus according to claim 5, wherein the consistency check apparatus further includes a display unit, and the control unit is executed by the execution unit. Output difference between the old code and the new code, the operator coverage information measured by the operator coverage measuring means, and / or the constant parameter coverage information measured by the constant parameter coverage measuring means, The display device further includes display means for displaying on the display unit.

また、請求項9に記載のプログラムは、コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置に実行させるためのプログラムであって、上記制御部において実行される、テストデータを、上記記憶部に格納するテストデータ格納ステップと、上記テストデータ格納ステップにて上記記憶部に格納された上記テストデータを、新・旧コード別に実行する実行ステップと、上記実行ステップにて実行された、上記コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定ステップと、上記実行ステップにて実行された、上記コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する定数パラメータカバレッジ測定ステップと、を実行させることを特徴とする。   A program according to claim 9 is a program for evaluating a code coverage of an old code and a new code before and after a code change, and for causing a consistency check apparatus including at least a storage unit and a control unit to execute the program. A test data storage step for storing the test data in the storage unit, which is executed in the control unit, and the test data stored in the storage unit in the test data storage step is executed for each new and old code. And an operator coverage measurement step for measuring operator coverage information for calculating the coverage rate of the operator described in the code, which is executed in the execution step, for each new and old code. The constant parameter for calculating the coverage rate of the constant described in the code executed in the execution step. The meter coverage information, and constant parameters coverage measurement step of measuring at another new and old codes, characterized in that to the execution.

また、請求項10に記載の一致性検査方法は、複数のコードによる出力値の一致性を検査しながらコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置において実行される一致性検査方法であって、上記制御部において実行される、複数のテストデータを上記記憶部に格納するテストデータ格納ステップと、上記テストデータ格納ステップにて上記記憶部に格納された上記テストデータを入力値として、上記複数のコードに実行させる実行ステップと、上記実行ステップにて所定の複数回実行された、上記コード中の演算子のカバレッジ率を、演算子カバレッジ情報として測定する演算子カバレッジ測定ステップと、上記実行ステップにて実行された上記コードにより出力された上記所定の複数の上記出力値により、上記演算子に記述された定数が一意に推定可能である定数のカバレッジ率を、定数パラメータカバレッジ情報として測定する定数パラメータカバレッジ測定ステップと、を含むことを特徴とする。   The consistency check method according to claim 10 is executed in a consistency check apparatus including at least a storage unit and a control unit that evaluates code coverage while checking the match of output values of a plurality of codes. A test data storage step for storing a plurality of test data in the storage unit, and the test stored in the storage unit in the test data storage step. An operator that measures the coverage rate of an operator in the code that has been executed a plurality of predetermined times in the execution step as operator coverage information by causing the plurality of codes to execute data as input values The predetermined plurality of output values output by the code executed in the coverage measurement step and the execution step. Ri, the coverage rate constants constants that described in the operator is uniquely be estimated, characterized in that it comprises a constant parameter coverage measurement step of measuring as a constant parameter coverage information.

また、請求項11に記載の一致性検査方法は、請求項10に記載の一致性検査方法において、上記制御部において実行される、上記演算子カバレッジ測定ステップにて測定された上記演算子カバレッジ情報、または、上記定数パラメータカバレッジ測定ステップにて測定された上記定数パラメータカバレッジ情報に基づいて、上記カバレッジ率を上昇させる上記テストデータを上記記憶部に格納するテスト評価ステップ、を更に含むことを特徴とする。   The consistency check method according to claim 11 is the consistency check method according to claim 10, wherein the operator coverage information measured in the operator coverage measurement step is executed in the control unit. Or a test evaluation step for storing the test data for increasing the coverage rate in the storage unit based on the constant parameter coverage information measured in the constant parameter coverage measurement step. To do.

また、請求項12に記載の一致性検査方法は、請求項11に記載の一致性検査方法において、上記演算子カバレッジ測定ステップは、上記実行ステップにて実行された上記演算子の上記コード中の行情報を、上記演算子カバレッジ情報に格納し、上記定数パラメータカバレッジ測定ステップは、上記実行ステップにて上記コードにより出力された上記出力値により推定した上記定数の上記コード中の行情報を、上記定数パラメータカバレッジ情報に格納し、上記テスト評価ステップは、上記記憶部に格納された上記テストデータに対応する上記行情報と、上記実行ステップにて新たに実行された上記テストデータに対応する上記行情報と、を比較することにより、当該テストデータが上記カバレッジ率を上昇させるか否か判定し、上昇させると判定した場合に当該テストデータを当該行情報に対応付けて上記記憶部に格納すること、を特徴とする。   The consistency check method according to claim 12 is the consistency check method according to claim 11, wherein the operator coverage measurement step includes the code in the operator executed in the execution step. Line information is stored in the operator coverage information, and the constant parameter coverage measurement step includes the line information in the code of the constant estimated from the output value output by the code in the execution step. Stored in the constant parameter coverage information, and the test evaluation step includes the line information corresponding to the test data stored in the storage unit and the line corresponding to the test data newly executed in the execution step. By comparing with the information, it is determined whether or not the test data increases the coverage rate, and increases The test data in association with the line information be stored in the storage unit when it is determined, characterized by.

この発明によれば、テストデータを、記憶部に格納し、記憶部に格納されたテストデータを、新・旧コード別に実行し、実行されたコード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定し、実行されたコード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定するので、「演算子カバレッジ情報」と「定数パラメータカバレッジ情報」に基づいて、図1を参照して上述した、従来のコードカバレッジ(例えば、MC/DC)で100%を満たすテストデータでは、区別できなかったコード間の差を、より正確に検出できるようになるという効果を奏する。   According to the present invention, test data is stored in the storage unit, the test data stored in the storage unit is executed for each new and old code, and the coverage rate of the operator described in the executed code is calculated. Operator coverage information for the new and old code is measured, and constant parameter coverage information for calculating the coverage rate of the constant described in the executed code is measured for the new and old code. , Based on “operator coverage information” and “constant parameter coverage information”, the test data satisfying 100% in the conventional code coverage (for example, MC / DC) described above with reference to FIG. 1 cannot be distinguished. There is an effect that the difference between the codes can be detected more accurately.

また、この発明によれば、測定された演算子カバレッジ情報と、定数パラメータカバレッジ情報とに基づいて、新・旧コード別にテストデータの精度を評価付けし記憶部に格納するので、例えば、同じ演算子および定数に対して複数のテストデータが使われている場合、冗長なテストを除去して、簡潔な新・旧コード向けテストデータベースを作成することができる。   Further, according to the present invention, the accuracy of the test data is evaluated for each new and old code based on the measured operator coverage information and constant parameter coverage information and stored in the storage unit. When multiple test data are used for children and constants, redundant tests can be removed and a simple test database for new and old code can be created.

また、この発明によれば、新たに精度を評価付けされたテストデータと、既に記憶部に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に記憶部に格納するので、演算子カバレッジ率および定数パラメータカバレッジ率が100%になった場合は、次の新・旧コードのテストの際には、この100%になったテストデータを用いてデバッグテストを行うことできるので、精度の高いテストデータを得た後は、演算子カバレッジ情報と定数パラメータカバレッジ情報の測定を省略することができ、全体のデバッグテストを簡略化できるという効果を奏する。   Further, according to the present invention, the test data newly evaluated for accuracy is compared with the past test data already stored in the storage unit, and the test data with the higher accuracy of both test data is newly updated. -Since the old code is stored in the storage unit, if the operator coverage rate and the constant parameter coverage rate become 100%, the test data that has reached 100% will be used when the next new / old code is tested. Since it is possible to perform a debug test using, after obtaining highly accurate test data, the measurement of operator coverage information and constant parameter coverage information can be omitted, and the entire debug test can be simplified. Play.

また、この発明によれば、一致性検査装置は、表示部を更に備え、実行された旧コードおよび新コードの出力差、測定された演算子カバレッジ情報、および/または、定数パラメータカバレッジ情報、を表示部に表示するので、新・旧コードの演算子・定数に対するカバレッジ率を容易に視覚的に比較することができるという効果を奏する。   Further, according to the present invention, the consistency check apparatus further includes a display unit, and outputs an output difference between the executed old code and the new code, measured operator coverage information, and / or constant parameter coverage information. Since it is displayed on the display unit, there is an effect that the coverage rates for the operators and constants of the new and old codes can be easily compared visually.

以下に、本発明にかかる一致性検査装置および一致性検査方法の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Hereinafter, embodiments of a consistency checking apparatus and a consistency checking method according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

[本発明の概要]
以下、本発明の概要について説明し、その後、本発明の構成および処理等について詳細に説明する。図3は、本発明における一致性検査装置の基本動作処理の一例を示すフローチャートである。
[Outline of the present invention]
Hereinafter, the outline of the present invention will be described, and then the configuration and processing of the present invention will be described in detail. FIG. 3 is a flowchart showing an example of a basic operation process of the consistency checking device according to the present invention.

本発明は、概略的に、以下の基本的特徴を有する。すなわち、本発明は、まず、テストデータを、記憶部に格納する。   The present invention generally has the following basic features. That is, according to the present invention, first, test data is stored in the storage unit.

つぎに、本発明は、記憶部に格納されたテストデータを、新・旧コード別に実行する(SA−1)。   Next, the present invention executes the test data stored in the storage unit for each new and old code (SA-1).

そして、本発明は、実行されたコード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する(SA−2)。ここで、「演算子カバレッジ」(OC:Operator Coverage)とは、カバレッジテストの新たな測定基準であり、演算子のカバレッジ率の測定基準として、各入力が独立的に出力へ影響を与えることを確認するために用いられる。そして、コード内の入力の数や演算の形式が既知であるため、演算子により定義される。   And this invention measures the operator coverage information for calculating the coverage rate of the operator described in the executed code for each new and old code (SA-2). Here, “Operator Coverage” (OC: Operator Coverage) is a new metric for coverage testing. As a metric for operator coverage rate, each input independently affects the output. Used to confirm. Since the number of inputs in the code and the form of calculation are known, they are defined by operators.

そして、本発明は、実行されたコード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する(SA−3)。ここで、「定数パラメータカバレッジ」(CPC:Constant Parameter Coverage)とは、カバレッジテストの新たな測定基準であり、定数のカバレッジ率の測定基準として、テストデータがシステムの定数パラメータをどれだけ正確に推定できるかを示す判断基準である。   Then, the present invention measures constant parameter coverage information for calculating the coverage ratio of the constant described in the executed code for each new and old code (SA-3). Here, “Constant Parameter Coverage” (CPC: Constant Parameter Coverage) is a new metric for coverage testing, and as a metric for the constant coverage rate, how accurately the test data estimates the constant parameters of the system. It is a criterion that indicates whether it can be done.

そして、本発明は、測定された演算子カバレッジ情報と、定数パラメータカバレッジ情報とに基づいて、新・旧コード別にテストデータの精度を評価付けし記憶部に格納する(SA−4)。   Then, the present invention evaluates the accuracy of the test data for each new and old code based on the measured operator coverage information and constant parameter coverage information and stores it in the storage unit (SA-4).

ここで、本発明は、新たに精度を評価付けされたテストデータと、既に記憶部に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に記憶部に格納するようにしてもよい。   Here, the present invention compares the test data newly evaluated for accuracy with the past test data already stored in the storage unit, and the test data with the higher accuracy of both test data is newly You may make it store in a memory | storage part according to an old code | cord | chord.

そして、本発明は、実行された旧コードおよび新コードの出力差、測定された演算子カバレッジ情報、および/または、定数パラメータカバレッジ情報、を表示部に表示する(SA−5)。   Then, the present invention displays the output difference between the executed old code and the new code, measured operator coverage information, and / or constant parameter coverage information on the display unit (SA-5).

以上で、本発明の概要の説明を終える。   This is the end of the summary of the present invention.

[一致性検査装置100の構成]
次に、コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、本一致性検査装置100の構成について説明する。図4は、本発明が適用される、演算子カバレッジおよび定数パラメータカバレッジに基づいた一致性検査装置の構成の一例を示すブロック図であり、該構成のうち本発明に関係する部分のみを概念的に示している。本一致性検査装置100は、概略的に、記憶部106と制御部102と表示部114とを少なくとも備えて構成されている。
[Configuration of Consistency Checking Device 100]
Next, the configuration of the consistency checking apparatus 100 that evaluates the code coverage of the old code and the new code before and after the code change will be described. FIG. 4 is a block diagram showing an example of a configuration of a consistency check device based on operator coverage and constant parameter coverage to which the present invention is applied, and only a portion related to the present invention is conceptually shown in the configuration. It shows. The consistency checking device 100 is generally configured to include at least a storage unit 106, a control unit 102, and a display unit 114.

図4において一致性検査装置100は、概略的に、一致性検査装置100の全体を統括的に制御するCPU等の制御部102、通信回線等に接続されるルータ等の通信装置(図示せず)に接続される通信制御インターフェース部(図示せず)、入力部(図示せず)や表示部114に接続される入出力制御インターフェース部(図示せず)、および、各種のデータベースやテーブルなどを格納する記憶部106を備えて構成されており、これら各部は任意の通信路を介して通信可能に接続されている。更に、この一致性検査装置100は、ルータ等の通信装置および専用線等の有線または無線の通信回線を介して、ネットワークに通信可能に接続されていてもよい。   In FIG. 4, the consistency checking apparatus 100 is schematically a communication device (not shown) such as a control unit 102 such as a CPU that controls the entire consistency checking apparatus 100 in an integrated manner, a communication line, and the like. ) Connected to the communication control interface unit (not shown), the input unit (not shown), the input / output control interface unit (not shown) connected to the display unit 114, and various databases and tables. The storage unit 106 is configured to be stored, and these units are communicably connected via an arbitrary communication path. Further, the consistency checking device 100 may be communicably connected to a network via a communication device such as a router and a wired or wireless communication line such as a dedicated line.

記憶部106に格納される各種のデータベースやテーブル(テストデータDB106a〜新コード向けテストデータDB106c)は、固定ディスク装置等のストレージ手段であり、各種処理に用いる各種のプログラムやテーブルやファイルやデータベースやウェブページ等を格納する。   Various databases and tables (test data DB 106a to new code test data DB 106c) stored in the storage unit 106 are storage means such as a fixed disk device, and various programs, tables, files, databases, and the like used for various processes. Stores web pages and the like.

これら記憶部106の各構成要素のうち、テストデータDB106aは、テストデータを記憶するテストデータ記憶手段である。すなわち、テストデータDB106aは、新・旧コードを実行して、一致性を検査する際に入力されるテストデータを格納するデータベースである。   Among the constituent elements of the storage unit 106, the test data DB 106a is a test data storage unit that stores test data. That is, the test data DB 106a is a database that stores test data input when executing the new / old code and checking the consistency.

また、旧コード向けテストデータDB106bは、測定された演算子カバレッジ情報と定数パラメータカバレッジ情報とに基づいて精度を評価付けされた、旧コード向けテストデータを記憶する旧コード向けテストデータ記憶手段である。すなわち、旧コード向けテストデータDB106bは、テスト評価部102e−1から、新しいカバレッジ測定結果を得られた場合に、テストデータを対応付けて格納するデータベースであり、このデータベースは、テストデータとそのテストデータがコード中のどの演算子または定数のカバレッジに貢献したかを表す情報(演算子カバレッジ(OC)情報・定数パラメータカバレッジ(CPC)情報)を当該テストデータに対応付けて記憶する。   The old code test data DB 106b is an old code test data storage unit that stores old code test data whose accuracy is evaluated based on the measured operator coverage information and constant parameter coverage information. . That is, the test data DB 106b for old code is a database that stores test data in association with each other when a new coverage measurement result is obtained from the test evaluation unit 102e-1, and this database stores the test data and its test data. Information (operator coverage (OC) information / constant parameter coverage (CPC) information) indicating which operator or constant in the code contributed to the coverage is stored in association with the test data.

また、新コード向けテストデータDB106cは、測定された演算子カバレッジ情報と定数パラメータカバレッジ情報とに基づいて精度を評価付けされた、新コード向けテストデータを記憶する新コード向けテストデータ記憶手段である。すなわち、新コード向けテストデータDB106cは、テスト評価部102e−2から、新しいカバレッジ測定結果を得られた場合に、テストデータを対応付けて格納するデータベースであり、このデータベースは、テストデータとそのテストデータがコード中のどの演算子または定数のカバレッジに貢献したかを表す情報(演算子カバレッジ(OC)情報・定数パラメータカバレッジ(CPC)情報等)を当該テストデータに対応付けて記憶する。   The new code test data DB 106c is a new code test data storage unit that stores the new code test data whose accuracy has been evaluated based on the measured operator coverage information and constant parameter coverage information. . That is, the test data DB 106c for new code is a database that stores test data in association with each other when a new coverage measurement result is obtained from the test evaluation unit 102e-2. Information (operator coverage (OC) information, constant parameter coverage (CPC) information, etc.) indicating which operator or constant in the code contributed to coverage is stored in association with the test data.

また、通信制御インターフェース部は、一致性検査装置100とネットワーク(またはルータ等の通信装置)との間における通信制御を行う。すなわち、通信制御インターフェース部は、他の端末と通信回線を介してデータを通信する機能を有する。   The communication control interface unit performs communication control between the consistency checking device 100 and a network (or a communication device such as a router). That is, the communication control interface unit has a function of communicating data with other terminals via a communication line.

また、入出力制御インターフェース部は、入力部や表示部114の制御を行う。ここで、表示部114としては、モニタ(家庭用テレビを含む)の他、スピーカを用いることができる。本発明において、表示部114は、実行結果として、新・旧コードの出力差を表すログと、測定部102bからのカバレッジ測定値(演算子カバレッジ測定情報、および、定数パラメータカバレッジ情報)とを表示する表示手段である。また、入力部としては、キーボード、マウス、およびマイク等を用いることができる。   The input / output control interface unit controls the input unit and the display unit 114. Here, as the display unit 114, a speaker can be used in addition to a monitor (including a home television). In the present invention, the display unit 114 displays, as execution results, a log representing the output difference between the new and old codes, and coverage measurement values (operator coverage measurement information and constant parameter coverage information) from the measurement unit 102b. Display means. As the input unit, a keyboard, a mouse, a microphone, and the like can be used.

また、図4において、制御部102は、OS(Operating System)等の制御プログラム、各種の処理手順等を規定したプログラム、および所要データを格納するための内部メモリを有し、これらのプログラム等により、種々の処理を実行するための情報処理を行う。制御部102は、機能概念的に、実行部102a、測定部102b、および、テスト評価部102eを備えて構成されている。   4, the control unit 102 has a control program such as an OS (Operating System), a program defining various processing procedures, and an internal memory for storing necessary data. Information processing for executing various processes is performed. The control unit 102 includes an execution unit 102a, a measurement unit 102b, and a test evaluation unit 102e in terms of functional concept.

このうち、実行部102aは、テストデータDB106aに格納されたテストデータを入力として、新・旧コード別に実行する実行手段である。すなわち、実行部102aは、比較対象の新・旧コードをそれぞれ実行する実行手段である。ここで、実行部102aは、図4に示すように、旧コード実行部102a−1、および、新コード実行部102a−2を備えて構成されている。すなわち、旧コード実行部102a−1は、テストデータDB106aに格納されたテストデータを入力として、旧コードを実行し、出力値を出力する旧コード実行手段であり、新コード実行部102a−2は、テストデータDB106aに格納されたテストデータを入力として、新コードを実行し、出力値を出力する新コード実行手段である。実行部102aは、旧コード実行部102a−1により出力された出力値と、新コード実行部102a−2により出力された出力値と、の出力差を演算してログを保存する。ここで、実行部102aは、新コードおよび旧コードの出力差を計算することにより、コード変更前後の出力の一致性(出力差「0」であること)を判断してもよい。なお、この出力差は、表示部114により表示される。   Among them, the execution unit 102a is an execution unit that executes test data stored in the test data DB 106a for each new and old code. That is, the execution unit 102a is an execution unit that executes the new and old codes to be compared. Here, as shown in FIG. 4, the execution unit 102 a includes an old code execution unit 102 a-1 and a new code execution unit 102 a-2. In other words, the old code execution unit 102a-1 is an old code execution unit that receives the test data stored in the test data DB 106a as input and executes the old code and outputs an output value. The new code execution unit 102a-2 The new code execution means executes the new code with the test data stored in the test data DB 106a as input, and outputs an output value. The execution unit 102a calculates an output difference between the output value output by the old code execution unit 102a-1 and the output value output by the new code execution unit 102a-2, and stores the log. Here, the execution unit 102a may determine the output consistency before and after the code change (the output difference is “0”) by calculating the output difference between the new code and the old code. The output difference is displayed on the display unit 114.

また、測定部102b−1〜2は、実行部102aにより新・旧コード別に実行されたコード中に記述された、演算子のカバレッジ率を算出するための演算子カバレッジ情報、および、定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別に測定する測定手段である。ここで、測定部102bは、図4に示すように、演算子カバレッジ測定部102c−1〜2、および、定数パラメータカバレッジ測定102d−1〜2を備えて構成されている。このうち、演算子カバレッジ測定部102c−1〜2は、実行部102aにより実行されたコード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定手段である。また、定数パラメータカバレッジ測定102d−1〜2は、実行部102aにより実行されたコード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別に測定する定数パラメータカバレッジ測定手段である。   In addition, the measurement units 102b-1 and 102b-1 and the operator coverage information for calculating the operator coverage rate described in the code executed by the execution unit 102a for each of the new and old codes, and the constant coverage This is a measurement means for measuring constant parameter coverage information for calculating the rate for each new and old code. Here, as shown in FIG. 4, the measurement unit 102b is configured to include operator coverage measurement units 102c-1 and 102c-1 and constant parameter coverage measurements 102d-1 and 102d. Among these, the operator coverage measurement units 102c-1 and 102-2 measure operator coverage information for calculating the coverage rate of the operator described in the code executed by the execution unit 102a for each new and old code. Operator coverage measurement means. The constant parameter coverage measurements 102d-1 and 102d-2 are constant parameters for measuring constant parameter coverage information for calculating the coverage rate of constants described in the code executed by the execution unit 102a for each new and old code. It is a coverage measurement means.

また、テスト評価部102e−1〜2は、演算子カバレッジ測定部102c−1〜2により測定された演算子カバレッジ情報と、定数パラメータカバレッジ測定部102d−1〜2により測定された定数パラメータカバレッジ情報とに基づいて、新・旧コード別にテストデータの精度を評価付けし、記憶部106の旧コード向けテストDB106b、および、新コード向けテストDB106cにそれぞれ格納するテスト評価手段である。ここで、テスト評価部102eは、テスト評価部102eにより新たに精度を評価付けされたテストデータと、既に記憶部106(旧コード向けテストDB106bまたは新コード向けテストDB106c)に格納されたテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを記憶部106(旧コード向けテストDB106bまたは新コード向けテストDB106c)に格納してもよい。すなわち、テスト評価部102e−1〜2は、カバレッジ測定結果によるテストデータの評価付け部であり、新たに実行されたテストデータに対応する測定結果情報(演算子カバレッジ情報または定数パラメータカバレッジ情報)と、データベース(旧コード向けテストDB106bまたは新コード向けテストDB106c)に格納された過去の測定結果情報とを比べて、新しく得られた測定情報の精度が高ければ現テストデータをデータベースに追加し、データベースに格納された測定情報を更新する。   The test evaluation units 102e-1 and 102e-1 and 102e-2 are operator coverage information measured by the operator coverage measurement units 102c-1 and 102c-1 and constant parameter coverage information measured by the constant parameter coverage measurement units 102d-1 and 102d-2. The test evaluation means evaluates the accuracy of the test data for each new and old code based on the above and stores them in the old code test DB 106b and the new code test DB 106c of the storage unit 106, respectively. Here, the test evaluation unit 102e includes test data newly evaluated for accuracy by the test evaluation unit 102e, test data already stored in the storage unit 106 (test DB 106b for old code or test DB 106c for new code), And the test data with the higher accuracy of the two test data may be stored in the storage unit 106 (test DB 106b for old code or test DB 106c for new code). That is, the test evaluation units 102e-1 and 102-2 are test data evaluation units based on coverage measurement results, and measurement result information (operator coverage information or constant parameter coverage information) corresponding to newly executed test data. Compare the past measurement result information stored in the database (test DB 106b for old code or test DB 106c for new code), and if the accuracy of the newly obtained measurement information is high, the current test data is added to the database. The measurement information stored in is updated.

またここで、制御部102は、表示部114を制御して、実行部102aにより実行された旧コードおよび新コードの出力差、演算子カバレッジ測定部102c−1〜2により測定された演算子カバレッジ情報、および/または、定数パラメータカバレッジ測定部102d〜1−2により測定された定数パラメータカバレッジ情報、を表示部114に表示してもよい。   Further, here, the control unit 102 controls the display unit 114 to output difference between the old code and the new code executed by the execution unit 102a, and the operator coverage measured by the operator coverage measurement units 102c-1 and 102-2. The information and / or the constant parameter coverage information measured by the constant parameter coverage measurement units 102d to 1-2 may be displayed on the display unit 114.

以上で、本一致性検査装置100の構成の説明を終える。   Above, description of the structure of this consistency test | inspection apparatus 100 is finished.

[一致性検査装置100の処理]
続いて、このように構成された本実施の形態における本一致性検査装置100の処理の一例について、以下に図3を参照して詳細に説明する。
[Processing of Consistency Checking Device 100]
Next, an example of the process of the consistency checking device 100 according to the present embodiment configured as described above will be described in detail with reference to FIG.

[基本動作処理]
まず、基本動作処理の詳細について再び図3を参照して説明する。図3は、本発明における一致性検査装置の基本動作処理の一例を示すフローチャートである。
[Basic operation processing]
First, details of the basic operation processing will be described with reference to FIG. 3 again. FIG. 3 is a flowchart showing an example of a basic operation process of the consistency checking device according to the present invention.

(前処理)
まず、制御部102は、前処理として、テストデータを、記憶部106のテストデータDB106aに格納する。その後、本処理(SA−1〜SA−5)へと進む。
(Preprocessing)
First, the control unit 102 stores test data in the test data DB 106 a of the storage unit 106 as preprocessing. Thereafter, the process proceeds to the present process (SA-1 to SA-5).

(本処理)
つぎに、実行部102aは、記憶部106のテストデータDB106aに格納されたテストデータを入力として、新・旧コード別に実行する(SA−1)。すなわち、旧コード実行部102a−1は、テストデータを入力として旧コードを実行し、新コード実行部102a−2は、当該テストデータを入力として新コードを実行する。
(This processing)
Next, the execution unit 102a receives the test data stored in the test data DB 106a of the storage unit 106 as an input and executes it for each new and old code (SA-1). That is, the old code execution unit 102a-1 executes the old code with the test data as an input, and the new code execution unit 102a-2 executes the new code with the test data as an input.

そして、測定部102b−1〜2の演算子カバレッジ測定部102c−1〜2は、実行部102aにより実行された、コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する(SA−2)。なお、このSA−2における演算子カバレッジ情報測定処理については、後述の実施例1の演算子カバレッジ情報測定処理にて、図5〜図7を参照して詳細に説明する。   The operator coverage measurement units 102c-1 and 102c-1 and 102-2 of the measuring units 102b-1 and 102-2 execute operator coverage information for calculating the coverage rate of the operators described in the code executed by the execution unit 102a. Are measured separately for new and old codes (SA-2). The operator coverage information measurement process in SA-2 will be described in detail in the operator coverage information measurement process of Example 1 described later with reference to FIGS.

そして、測定部102b−1〜2の定数パラメータカバレッジ測定部102d−1〜2は、実行部102aにより実行されたコード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する(SA−3)。なお、このSA−3におけるこの定数パラメータカバレッジ情報測定処理については、後述の実施例2の定数パラメータカバレッジ情報測定処理にて、図8〜図10を参照して詳細に説明する。   Then, the constant parameter coverage measurement units 102d-1 and 102d-1 and 102d-2 of the measurement units 102b-1 and 102-2 include constant parameter coverage information for calculating the coverage rate of the constants described in the code executed by the execution unit 102a. Measure by new and old codes (SA-3). The constant parameter coverage information measurement process in SA-3 will be described in detail in the constant parameter coverage information measurement process of Example 2 described later with reference to FIGS.

そして、テスト評価部102e−1〜2は、測定部102b−1〜2の演算子カバレッジ測定部102c−1〜2により測定された演算子カバレッジ情報と、測定部102b−1〜2の定数パラメータカバレッジ測定部102d−1〜2により測定された定数パラメータカバレッジ情報とに基づいて、新・旧コード別にテストデータの精度を評価付けし記憶部106の旧コード向けデータDB106b、および、新コード向けデータDB106cに格納する(SA−4)。   Then, the test evaluation units 102e-1 and 102e-1 and the operator coverage information measured by the operator coverage measurement units 102c-1 and 102c-1 and 102b-1 and the constant parameters of the measurement units 102b-1 and 102b-2 are measured. Based on the constant parameter coverage information measured by the coverage measuring units 102d-1 and 102-2, the accuracy of the test data is evaluated for each new and old code, the old code data DB 106b in the storage unit 106, and the new code data Store in the DB 106c (SA-4).

ここで、テスト評価部102e−1〜2は、新たに精度を評価付けされたテストデータと、既に記憶部106(旧コード向けデータDB106bまたは新コード向けデータDB106c)に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に記憶部106(旧コード向けデータDB106bまたは新コード向けデータDB106c)に格納するようにしてもよい。なお、このSA−4におけるこのテスト評価処理については、後述の実施例3のテスト評価処理にて、図11を参照して詳細に説明する。   Here, the test evaluation units 102 e-1 and 102-1 have the test data newly evaluated for accuracy and the past test data already stored in the storage unit 106 (the old code data DB 106 b or the new code data DB 106 c). And the test data with higher accuracy of both test data may be stored in the storage unit 106 (old code data DB 106b or new code data DB 106c) for each new and old code. The test evaluation process in SA-4 will be described in detail in the test evaluation process of Example 3 described later with reference to FIG.

そして、制御部102は、表示部114を制御して、実行部102aにより実行された旧コードおよび新コードの出力差、演算子カバレッジ測定部102c−1〜2により測定された演算子カバレッジ情報、および/または、定数パラメータカバレッジ測定部102d−1〜2により測定された定数パラメータカバレッジ情報、を表示部に表示する(SA−5)。なお、このSA−5におけるこの表示処理については、後述の実施例4の表示処理にて、図12および図13を参照して詳細に説明する。   Then, the control unit 102 controls the display unit 114 to output difference between the old code and the new code executed by the execution unit 102a, operator coverage information measured by the operator coverage measurement units 102c-1 and 102-2, And / or the constant parameter coverage information measured by the constant parameter coverage measuring units 102d-1 and 102d-1 and 2 is displayed on the display unit (SA-5). This display process in SA-5 will be described in detail in the display process of Example 4 described later with reference to FIGS.

以上で、基本動作処理の説明を終える。   This is the end of the description of the basic operation process.

これにて、本一致性検査装置100の処理についての説明を終える。   This concludes the description of the process of the consistency checking apparatus 100.

[実施例]
続いて、以下に、本実施の形態が適用される本一致性検査装置100の実施例1〜4について、図5〜図13を参照して詳細に説明する。
[Example]
Next, Examples 1 to 4 of the consistency checking apparatus 100 to which the present embodiment is applied will be described in detail with reference to FIGS. 5 to 13.

(実施例1:演算子カバレッジ情報測定処理)
最初に、図3のSA−2に対応する演算子カバレッジ情報測定処理について、図5〜図7を参照して詳細に説明する。ここで、図5は、本実施例における演算子カバレッジ(OC)の一例を示す図であり、図6は、本実施例における演算子カバレッジ(OC)による解析の一例を示す図であり、図7は、本実施例における演算子カバレッジ(OC)による解析の一例をより詳細に示す図である。
(Example 1: Operator coverage information measurement processing)
First, the operator coverage information measurement process corresponding to SA-2 in FIG. 3 will be described in detail with reference to FIGS. Here, FIG. 5 is a diagram illustrating an example of operator coverage (OC) in the present embodiment, and FIG. 6 is a diagram illustrating an example of analysis by operator coverage (OC) in the present embodiment. FIG. 7 is a diagram illustrating an example of analysis by operator coverage (OC) in this embodiment in more detail.

まず、本発明における演算子カバレッジ(OC:Operator Coverage)の定義について説明する。演算子カバレッジ(OC)は、カバレッジテストの新たな測定基準であり、このOCは、コード内の入力の数や演算の形が既知であるため、演算子(Operator)により定義される。また、演算子カバレッジ(OC)では、カバレッジ率の測定基準として、例えば、1つの入力の与え値だけを変えながら演算式どおり出力が算出されるかを確認するなど、各入力が独立的に出力へ影響を与えることを確認するために用いられる。ここで、演算子カバレッジ(OC)は、ブール変数・整数・実数(ブール・線形・非線形演算式)に適用することができる。なお、ブール変数によるブール式に適用する場合は、MC/DCのカバレッジ測定結果と同じになる。   First, the definition of operator coverage (OC: Operator Coverage) in the present invention will be described. Operator coverage (OC) is a new metric for coverage testing. This OC is defined by an operator because the number of inputs in the code and the form of the operation are known. In operator coverage (OC), each input is output independently, for example, by checking whether the output is calculated according to an arithmetic expression while changing only a given input value as a standard for measuring the coverage rate. Used to confirm that it affects Here, operator coverage (OC) can be applied to Boolean variables, integers, and real numbers (boolean, linear, and nonlinear arithmetic expressions). When applied to a Boolean expression using a Boolean variable, the result is the same as the MC / DC coverage measurement result.

続いて、演算子カバレッジ(OC)の一例を、図5を参照して説明する。図5において、上図は、ブール変数に対して演算子カバレッジ(OC)によるテスト(OC test cases for Boolean AND)を行った結果の一例を示しており、中図は、整数の乗算に対して演算子カバレッジ(OC)によるテスト(OC test cases for integer multiplication)を行った結果の一例を示しており、そして、下図は、不等式に対して演算子カバレッジ(OC)によるテスト(OC test cases for unequality)を行った結果の一例を示す。   Next, an example of operator coverage (OC) will be described with reference to FIG. In FIG. 5, the upper diagram shows an example of a result obtained by performing an operator coverage (OC) test on a Boolean variable (OC test cases for Boolean AND), and the middle diagram represents an integer multiplication. An example of a result of performing an operator coverage (OC) test (OC test cases for integrity) is shown, and the figure below shows an operator coverage (OC) test for inequality (OC test cases for integrity). ) Shows an example of the result.

図5の上図において、例えば、入力値(aB)が「1」で、入力値(bB)が「1」の場合、ブール演算を行うと、出力値(oB)は、「1」となる。また、例えば、入力値(aB)が「0」で、入力値(bB)が「1」の場合、ブール演算を行うと、出力値(oB)は、「0」となり、入力値(aB)が「1」で、入力値(bB)が「0」の場合も、ブール演算を行うと、出力値(oB)は、「0」となる。この際、上述のように、ブール変数によるブール式に演算子カバレッジ(OC)適用する場合は、従来のMC/DCのカバレッジ測定結果と同じになる。   In the upper diagram of FIG. 5, for example, when the input value (aB) is “1” and the input value (bB) is “1”, when the Boolean operation is performed, the output value (oB) becomes “1”. . For example, when the input value (aB) is “0” and the input value (bB) is “1”, when the Boolean operation is performed, the output value (oB) becomes “0” and the input value (aB) Is “1” and the input value (bB) is “0”, the output value (oB) becomes “0” when the Boolean operation is performed. At this time, as described above, when operator coverage (OC) is applied to a Boolean expression using a Boolean variable, the result is the same as the conventional MC / DC coverage measurement result.

図5の中図において、例えば、入力値(a)が「10」で、入力値(b)が「200」の場合、数値掛け算を行うと、出力値(oB)は、「200」となる。また、例えば、入力値(a)が「15」で、入力値(b)が「20」の場合、数値掛け算を行うと、出力値(oB)は、「300」となり、入力値(a)が「10」で、入力値(b)が「5」の場合は、数値掛け算を行うと、出力値(oB)は、「50」となる。この際、従来のMC/DCによるカバレッジ測定結果と異なる場合がある。詳細は、図6および図7を参照して後述する。   In the middle diagram of FIG. 5, for example, when the input value (a) is “10” and the input value (b) is “200”, the output value (oB) becomes “200” when numerical multiplication is performed. . Further, for example, when the input value (a) is “15” and the input value (b) is “20”, when the numerical multiplication is performed, the output value (oB) becomes “300”, and the input value (a) Is “10” and the input value (b) is “5”, the output value (oB) becomes “50” when the numerical multiplication is performed. At this time, there may be a difference from the conventional coverage measurement result by MC / DC. Details will be described later with reference to FIGS.

図5の下図において、例えば、入力値(a)が「x1」で、x1≧Tの場合、数値比較(a≧T)を行うと、出力値(oB)は、「1」となる。また、例えば、入力値(a)が「x2」で、x2<Tの場合、数値比較(a≧T)を行うと、出力値(oB)は、「0」となる。この際、従来のMC/DCに基づくカバレッジ測定結果と異なる場合がある。詳細は、図8〜図10を参照して後述する。   In the lower diagram of FIG. 5, for example, when the input value (a) is “x1” and x1 ≧ T, the numerical value comparison (a ≧ T) results in the output value (oB) being “1”. For example, when the input value (a) is “x2” and x2 <T, the numerical value comparison (a ≧ T) results in the output value (oB) being “0”. At this time, the coverage measurement result based on the conventional MC / DC may be different. Details will be described later with reference to FIGS.

つぎに、演算子カバレッジ(OC)を上述の図2のテストデータに適用した結果について説明する。ここで、図6の各(a)〜(c)は、上述の従来のカバレッジ(例えば、MC/DC)を表す図2の各(a)〜(c)に対応する。   Next, a result of applying operator coverage (OC) to the above-described test data of FIG. 2 will be described. Here, (a) to (c) in FIG. 6 correspond to (a) to (c) in FIG. 2 representing the above-described conventional coverage (for example, MC / DC).

図6に示すように、例えば、入力値(a)が「2」であり、入力値(b)が「2」である場合は、変更前のコードではブロック1に進むため、出力値(O1)は「4(Y)」となり、出力値(O2)は、「4」となる。また、例えば、入力値(a)が「1」であり、入力値(b)が「2」である場合は、変更前のコードではブロック2に進むため、出力値(O1)は「2(Y)」となり、出力値(O2)は、「2」となり、入力値(a)が「2」であり、入力値(b)が「1」である場合も、同様にブロック2に進むため、出力値(O1)は「2(Y)」となり、出力値(O2)は、「2」となる。   As shown in FIG. 6, for example, when the input value (a) is “2” and the input value (b) is “2”, the code before the change proceeds to block 1, so the output value (O1 ) Becomes “4 (Y)”, and the output value (O2) becomes “4”. For example, when the input value (a) is “1” and the input value (b) is “2”, the code before the change proceeds to block 2, and thus the output value (O 1) is “2 ( Y) ”, the output value (O2) is“ 2 ”, the input value (a) is“ 2 ”, and the input value (b) is“ 1 ”, the process proceeds to block 2 in the same manner. The output value (O1) is “2 (Y)” and the output value (O2) is “2”.

図6において、テストデータ(入力値(a,b)=(2,2),(1,2),(2,1)であるデータ)を用いて、従来のMC/DCに基づいてコードカバレッジ測定を行うと、出力値(O1およびO2)は全て一致しながら、MC/DCは100%満たす。その結果、コードの機能に違い(図6の例では「+」と「*」の違い)があるにもかかわらず、変更前のコードと変更後のコードとが100%一致すると評価されていた。   In FIG. 6, code coverage based on conventional MC / DC using test data (data with input values (a, b) = (2, 2), (1, 2), (2, 1)). When the measurement is performed, the output values (O1 and O2) all match, but the MC / DC is 100% satisfied. As a result, it was evaluated that the code before the change and the code after the change were 100% identical despite the difference in the function of the code (the difference between “+” and “*” in the example of FIG. 6). .

一方、本発明における演算子カバレッジ(OC)を適用した場合、従来のMC/DCで100%満たすテストデータと同一のテストデータを用いたとしても、MC/DCのようにコード中のテストされた条件/判定をカバレッジの測定基準とせず、コード中のどの演算子を通して得られた出力値であるかを評価するので、従来のMC/DCでは見落としていたコード内の機能の違いを検出することができる。   On the other hand, when the operator coverage (OC) in the present invention is applied, even if the same test data as the test data satisfying 100% with the conventional MC / DC is used, the test is performed in the code like MC / DC. Since the condition / determination is not used as a coverage metric and the output value obtained through which operator in the code is evaluated, the difference in the function in the code that has been overlooked in the conventional MC / DC is detected. Can do.

すなわち、図6の(c)に示すように、番号1のテストデータを入力として変更前のコードを実行した場合、出力値(O1)は、(変更前のコード中のブロック1の演算子「+」にて演算される結果、)「4(Y)」となり、同じく番号1のテストデータを入力として変更後のコードを実行した場合、出力値(O2)は、(変更後のコード中のブロック3の演算子「*」にて演算される結果、)同じ値の「4」となり、出力差がなく、MC/DCは100%となり、コードの違いを判別できないが、OCでは、演算子(図6の例では「+」や「*」)を基準にして判定するため、変更前後で出力差がない場合であっても、コードの違いを評価しうる。   That is, as shown in FIG. 6C, when the code before the change is executed with the test data of number 1 as an input, the output value (O1) is (the operator “of the block 1 in the code before the change“ As a result of calculation with “+”, “4 (Y)” is obtained, and when the code after change is executed with the test data of number 1 as input, the output value (O2) is (in the code after change) As a result of calculation by the operator “*” of the block 3, the same value “4” is obtained, there is no output difference, MC / DC is 100%, and the code difference cannot be determined. Since the determination is based on “+” or “*” in the example of FIG. 6, the code difference can be evaluated even when there is no output difference before and after the change.

例えば、図6(c)に示すように、番号1〜3のテストデータを用いた場合、一致性検査装置100は、変更前コードを実行した結果、番号1の出力値(O1)は、ブロック1の演算子「+」にて演算されたものであり、番号2および3の出力値(O1)は、ブロック2の演算子「*」にて演算されたものであるので、演算子カバレッジ(OC)をそれぞれ、1/3と2/3と評価する。一方、一致性検査装置100は、変更後のコードを実行した結果、番号1〜3の出力値(O2)は、全てブロック3の演算子「*」にて演算されたものであるので、演算子カバレッジ(OC)を、3/3の100%と評価する。すなわち、テスト信号である番号1〜3のうち、ブロック1を通過する確率は1/3であり、ブロック2を通過する確率は2/3である。言い換えると、図6の(c)において、番号1の出力値(O1)の「4(Y)」は、ブロック1に対する演算子カバレッジ(OC)が「1/3」であり、番号2および3の出力値(O2)の「2(N)」は、ブロック2に対する演算子カバレッジ(OC)が「2/3」である。また、変更後のコード中のブロック3においては、上記テストデータのどの値を入力してもブロック3にて必ず演算するので、ブロック3に対する演算子カバレッジ(OC)は、100%である。   For example, as shown in FIG. 6C, when the test data of numbers 1 to 3 are used, the consistency check apparatus 100 executes the code before change, and as a result, the output value (O1) of number 1 is a block. Since the output value (O1) of numbers 2 and 3 is calculated by the operator “*” of the block 2, the operator coverage ( OC) is evaluated as 1/3 and 2/3, respectively. On the other hand, as a result of executing the code after the change, the consistency checking apparatus 100 has calculated all the output values (O2) of numbers 1 to 3 by the operator “*” of the block 3. Child coverage (OC) is evaluated as 100% of 3/3. That is, among the numbers 1 to 3 that are test signals, the probability of passing through the block 1 is 1/3, and the probability of passing through the block 2 is 2/3. In other words, in FIG. 6C, “4 (Y)” of the output value (O1) of the number 1 has an operator coverage (OC) of “1/3” for the block 1, and the numbers 2 and 3 "2 (N)" of the output value (O2) of the operator has an operator coverage (OC) of "2/3" for the block 2. In block 3 in the code after the change, any value of the test data is always calculated in block 3, so the operator coverage (OC) for block 3 is 100%.

このように、演算子カバレッジ(OC)を上述の図2のテストデータに適用した結果、従来のカバレッジ(例えば、MC/DC)で100%満たすテストデータを用いても、演算子カバレッジ(OC)を適用することにより、このOCが全ブロック1〜3に対して100%でないと評価することができる。したがって、MC/DCとは異なり、図6(c)に示すテストデータのみでは、演算子カバレッジ(OC)100%を満たさないため、一致・不一致が判断できないテストデータに対して、完全に一致したとは判断しない。   As described above, as a result of applying operator coverage (OC) to the test data of FIG. 2 described above, even if test data satisfying 100% with conventional coverage (for example, MC / DC) is used, operator coverage (OC) By applying this, it can be evaluated that this OC is not 100% with respect to all the blocks 1 to 3. Therefore, unlike MC / DC, only the test data shown in FIG. 6C does not satisfy the operator coverage (OC) 100%, and therefore the test data that completely cannot be determined to match or not match completely. I do not judge.

続いて、図7を参照して、ブロック1〜3の各ブロックに対して演算子カバレッジ(OC)が100%となる場合のテストデータについて説明する。ここで、図7において、図7(c)は、ブロック1の演算子カバレッジ(OC)が100%であるテストデータの一例を示し、図7(d)は、ブロック2の演算子カバレッジ(OC)が100%であるテストデータの一例を示し、そして、図7(e)は、ブロック3の演算子カバレッジ(OC)が100%であるテストデータの一例を示す。   Next, test data when the operator coverage (OC) is 100% for each of the blocks 1 to 3 will be described with reference to FIG. Here, in FIG. 7, FIG. 7 (c) shows an example of test data in which the operator coverage (OC) of block 1 is 100%, and FIG. 7 (d) shows the operator coverage (OC) of block 2. ) Shows an example of test data with 100%, and FIG. 7E shows an example of test data with an operator coverage (OC) of block 3 of 100%.

図7(c)に示すように、図7(c)のテストデータは、入力値(a,b)=(2,2),(4,2),(2,4)である。このテストデータを変更前のコードに入力すると、条件式「(a>1)なおかつ(b>1)?」にて全てYes(Y)と判断されてブロック1に進み、ブロック1の演算子「+」により演算されるので、図7(c)に記載のテストデータは、ブロック1の演算子カバレッジ(OC)が100%であるテストデータと評価される。図7(c)に示すように、番号2および3における出力値(O1)の値「6(Y)」と、出力値(O2)の値「8」とが異なる場合がある。すなわち、出力値(O1)と出力値(O2)とに差があらわれることがある。そのため、上述の従来のMC/DC100%のテストデータ(入力値(a,b)=(2,2),(1,2),(2,1)であるデータ)では、判別できなかった新・旧コードの出力の違いを判別することができる(図7c)。   As shown in FIG. 7C, the test data in FIG. 7C has input values (a, b) = (2, 2), (4, 2), (2, 4). When this test data is input to the code before the change, all of the conditional expressions “(a> 1) and (b> 1)?” Are judged to be Yes (Y), and the process proceeds to block 1. Therefore, the test data shown in FIG. 7C is evaluated as test data in which the operator coverage (OC) of block 1 is 100%. As shown in FIG. 7C, the value “6 (Y)” of the output value (O1) in the numbers 2 and 3 may be different from the value “8” of the output value (O2). That is, there may be a difference between the output value (O1) and the output value (O2). Therefore, the above-mentioned conventional MC / DC 100% test data (data with input values (a, b) = (2, 2), (1, 2), (2, 1)) cannot be discriminated. The difference in the output of the old code can be discriminated (FIG. 7c).

また、図7(d)に示すように、図7(d)のテストデータは、入力値(a,b)=(1,1),(1,2),(2,1)である。このテストデータを変更前のコードに入力すると、条件式「(a>1)なおかつ(b>1)?」にて全てNo(N)と判断されてブロック2へ進み、ブロック2の演算子「*」により演算されるので、図7(d)に記載のテストデータは、ブロック2の演算子カバレッジ(OC)が100%であるテストデータと評価される。   Further, as shown in FIG. 7D, the test data in FIG. 7D has input values (a, b) = (1, 1), (1, 2), (2, 1). When this test data is input to the code before the change, all of the conditional expressions “(a> 1) and (b> 1)?” Are judged as No (N), and the process proceeds to block 2. Therefore, the test data shown in FIG. 7D is evaluated as test data having an operator coverage (OC) of block 2 of 100%.

図7(e)に示すように、図7(e)のテストデータは、入力値(a,b)=(2,2),(1,2),(2,1)である。このテストデータを変更後のコードに入力すると、全てブロック3へ進み、ブロック3の演算子「*」により演算されるので、図7(e)に記載のテストデータは、ブロック3の演算子カバレッジ(OC)が100%であるテストデータとされる。   As shown in FIG. 7E, the test data in FIG. 7E has input values (a, b) = (2, 2), (1, 2), (2, 1). When this test data is input to the code after the change, the process proceeds to block 3 and is calculated by the operator “*” of block 3, so that the test data shown in FIG. Test data in which (OC) is 100%.

このように、本実施例の演算子カバレッジ(OC)を用いてコードカバレッジ測定を行うことにより、各ブロックに関して演算子カバレッジ(OC)が100%であるテストデータを用いれば、従来のコードカバレッジ(例えば、MC/DC)で100%となり判断できなかった、変更後のソフトウェアの新・旧コードの違いを判別することができる。これにより、演算子カバレッジ(OC)が100%のテストデータを用いてコードカバレッジ測定を行った結果、コードの不一致を正確に判断することができる。   In this way, by performing code coverage measurement using the operator coverage (OC) of the present embodiment, if test data having an operator coverage (OC) of 100% is used for each block, the conventional code coverage ( For example, it is possible to determine the difference between the new and old codes of the software after the change, which cannot be determined as 100% in MC / DC. Thereby, as a result of performing code coverage measurement using test data with 100% operator coverage (OC), it is possible to accurately determine code mismatch.

以上で、演算子カバレッジ情報測定処理の実施例の説明を終える。   This is the end of the description of the embodiment of the operator coverage information measurement process.

(実施例2:定数パラメータカバレッジ情報測定処理)
次に、図3のSA−3に対応する定数パラメータカバレッジ情報測定処理について、図8〜図10を参照して詳細に説明する。ここで、図8は、本実施例における定数パラメータカバレッジ(CPC)の一例を示す図であり、図9は、本実施例における定数パラメータカバレッジ(CPC)による推定の一例を示す図であり、そして、図10は、本実施例における定数パラメータカバレッジ(CPC)による推定の一例をより詳細に示す図である。
(Example 2: Constant parameter coverage information measurement process)
Next, constant parameter coverage information measurement processing corresponding to SA-3 in FIG. 3 will be described in detail with reference to FIGS. Here, FIG. 8 is a diagram illustrating an example of constant parameter coverage (CPC) in the present embodiment, FIG. 9 is a diagram illustrating an example of estimation by constant parameter coverage (CPC) in the present embodiment, and FIG. 10 is a diagram showing an example of estimation by constant parameter coverage (CPC) in the present embodiment in more detail.

まず、本発明における定数パラメータカバレッジ(CPC:Constant Parameter Coverage)の定義について説明する。定数パラメータカバレッジ(CPC)は、カバレッジテストの新たな測定基準であり、このCPCは、テストデータがシステムの定数パラメータをどれだけ正確に推定できるかの判断基準である。このCPCにより、非連続性が起こりやすい境界を検出することができる(以下、詳細に説明する)。   First, the definition of constant parameter coverage (CPC) in the present invention will be described. Constant parameter coverage (CPC) is a new metric for coverage testing, which is a measure of how accurately test data can estimate the system's constant parameters. By this CPC, a boundary where discontinuity is likely to occur can be detected (hereinafter described in detail).

ここで、定数パラメータカバレッジ(CPC)の一例を、図8を参照して説明する。図8は、入力データ(x)と、関数(x/3)に含まれる定数3を正確に推定するための定数パラメータカバレッジ(CPC)の一例を示している。ここで、図8(a)は、関数(x/3)のグラフであり、図8(b)は、テストデータ(x)とCPCの表である。   Here, an example of constant parameter coverage (CPC) will be described with reference to FIG. FIG. 8 shows an example of constant parameter coverage (CPC) for accurately estimating the input data (x) and the constant 3 included in the function (x / 3). Here, FIG. 8A is a graph of the function (x / 3), and FIG. 8B is a table of test data (x) and CPC.

図8に示すように、テストデータである入力値x=0,5を入力し、コード中の関数がy=x/3であるコードを実行した場合、出力値はそれぞれy=0,1となる。そのため、「x/K」において演算子が同じであっても、定数K=3,4,5の場合、同じ出力値(y=0,1)が得られてしまう。換言すれば、このテストデータ(x=0,5)を用いた場合、整数割り算の関数(y=x/K)における定数Kは、「3,4,5」の3通り推定できる。すなわち、(入力値x,出力値y)=(2,0),(5,1)のとき、整数割り算の関数(y=x/K)は、y=x/3だけでなく、y=x/4であるともy=x/5であるとも考えられる。   As shown in FIG. 8, when an input value x = 0,5, which is test data, is input and a code whose function is y = x / 3 is executed, the output values are y = 0, 1, respectively. Become. Therefore, even if the operators are the same in “x / K”, the same output value (y = 0, 1) is obtained when the constants K = 3, 4, and 5. In other words, when this test data (x = 0, 5) is used, the constant K in the integer division function (y = x / K) can be estimated in three ways: “3, 4, 5”. That is, when (input value x, output value y) = (2, 0), (5, 1), the integer division function (y = x / K) is not only y = x / 3 but also y = Both x / 4 and y = x / 5 are considered.

したがって、y=x/Kに対して、テストデータ(x)として「2,5」を用いる場合、定数が3通り推定できるので、定数パラメータカバレッジ(CPC)は、「1/3」(33%)と評価する。   Accordingly, when “2, 5” is used as the test data (x) for y = x / K, three constants can be estimated, so the constant parameter coverage (CPC) is “1/3” (33% ).

続いて、図9を参照し、上記図8のコードにおいて、定数パラメータカバレッジ(CPC)を100%まで増加させるテストデータの一例と、この場合における定数パラメータカバレッジ(CPC)を説明する。   Next, an example of test data for increasing the constant parameter coverage (CPC) to 100% in the code shown in FIG. 8 and the constant parameter coverage (CPC) in this case will be described with reference to FIG.

図9の上図は、図8に対応する。なお、図9上図において、テストデータ(x)が「2,5」の場合、定数Kが3通りのK=3,4,5であると推定できるため、OCは1/3(33%)である。   The upper diagram of FIG. 9 corresponds to FIG. In the upper diagram of FIG. 9, when the test data (x) is “2, 5”, it can be estimated that the constant K is three, K = 3,4,5, so the OC is 1/3 (33% ).

次に、図9の中図において、テストデータ(x=2,4)をそれぞれ入力した場合、出力値はそれぞれy=0,1となるので、定数Kは2通りのK=3,4であると推定でき、y=x/3に対して定数パラメータカバレッジ(CPC)は、「2/3」(66%)となる。   Next, in the middle diagram of FIG. 9, when test data (x = 2, 4) is input, the output values are y = 0, 1, respectively, so the constant K is two types of K = 3,4. The constant parameter coverage (CPC) is “2/3” (66%) for y = x / 3.

図9の下図において、テストデータ(x=2,3)をそれぞれ入力した場合、出力値はそれぞれy=0,1となるので、定数Kは1通りのK=3であると推定でき、y=x/3に対して定数パラメータカバレッジ(CPC)は、「3/3」(100%)となる。すなわち、このテストデータ(x)の「2,3」を適用する場合は、定数Kは「3」以外あり得ないことになる。   In the lower diagram of FIG. 9, when test data (x = 2, 3) is input, the output values are y = 0, 1, respectively. Therefore, it can be estimated that the constant K is one K = 3, and y = X / 3, the constant parameter coverage (CPC) is “3/3” (100%). That is, when “2, 3” of the test data (x) is applied, the constant K cannot be other than “3”.

以上のように、定数パラメータカバレッジ(CPC)を適用すれば、非連続性が起こりやすい境界を検出することができ、出力値が同じ場合でも定数の違いを判別することができる。   As described above, when constant parameter coverage (CPC) is applied, it is possible to detect a boundary where discontinuity is likely to occur, and it is possible to determine a difference in constant even when the output values are the same.

また、このように、定数パラメータカバレッジ(CPC)を測定しながら、テストデータ(x)の値を変化させていくことによって、冗長性を抑えながら定数パラメータカバレッジ(CPC)が100%のテストデータを得ることができる。   In addition, by changing the value of the test data (x) while measuring the constant parameter coverage (CPC) in this way, test data with a constant parameter coverage (CPC) of 100% can be obtained while suppressing redundancy. Obtainable.

続いて、図10を参照し、定数パラメータカバレッジ(CPC)を用いて、一例として、関数(x/3)と関数(x/5)とを区別できることを示す。図10において、図10(a)は、入力データ(x)と関数による演算結果を示す表であり、図10(b)は、ある入力値の組合せにおける、演算子カバレッジ(OC)と定数パラメータカバレッジ(CPC)とを示すグラフである。   Subsequently, with reference to FIG. 10, it is shown that the function (x / 3) and the function (x / 5) can be distinguished by using constant parameter coverage (CPC) as an example. In FIG. 10, FIG. 10 (a) is a table showing the calculation result by the input data (x) and the function, and FIG. 10 (b) is an operator coverage (OC) and constant parameter in a certain combination of input values. It is a graph which shows coverage (CPC).

図10(a)において、例えば、入力データx=0,1,2,3,4,5,6である場合、関数(x/3)によれば、y=0,0,0,1,1,1,2の出力値が得られ、関数(x/5)によれば、y=0,0,0,0,0,1,1の出力値が得られる。図10(b)は、これらの値(入力データ(x)、出力値(y)、出力値(y))をプロットしたグラフを示す。 In FIG. 10A, for example, when the input data x = 0, 1, 2, 3, 4, 5, 6, according to the function (x / 3), y 1 = 0, 0, 0, 1 , 1, 1 and 2 are obtained. According to the function (x / 5), output values y 2 = 0, 0, 0, 0, 0, 1 , 1 are obtained. FIG. 10B shows a graph plotting these values (input data (x), output value (y 1 ), output value (y 2 )).

ここで、演算子カバレッジ(OC)は、上述の実施例1にて説明したように、カバレッジ率の測定基準として、例えば、1つの入力の与え値だけを変えながら演算式どおり出力が算出されるかを確認するなどして、各入力が独立的に出力へ影響を与えることを確認するものである。   Here, as described in the first embodiment, the operator coverage (OC) is calculated as an arithmetic expression while changing only a given input value, for example, as a coverage rate measurement standard. For example, it is confirmed that each input independently affects the output.

図10(b)に示すように、2つの入力を実行させた場合、関数(x/3)と関数(x/5)に対して、各入力が独立的に出力へ影響を与えることが100%確認されるので、どの組合せとも演算子カバレッジ(OC)が100%である。一方、OC100%の場合であっても、定数Kが一意に推定できるわけではないので、定数パラメータカバレッジ(CPC)は100%とは限らない。   As shown in FIG. 10 (b), when two inputs are executed, each input has an influence on the output independently of the function (x / 3) and the function (x / 5). %, The operator coverage (OC) is 100% for any combination. On the other hand, even in the case of OC 100%, the constant parameter coverage (CPC) is not necessarily 100% because the constant K cannot be uniquely estimated.

すなわち、図10(b)に示すように、テストデータ(x=2,5)であるとき、演算子カバレッジ(OC)100%となるが、関数(x/3)でも関数(x/4)でも関数(x/5)でも出力値y=0,1となり両者を区別することができないため、定数パラメータカバレッジ(CPC)は「1/3」(33%)と評価される。これに対し、テストデータ(x=2,3)を用いた場合、OC100%であり、かつ、関数(x/3)が一意に推定できるため、CPC100%となる。テストデータ(x=4,5)であるときも同様である。   That is, as shown in FIG. 10B, when the test data is (x = 2, 5), the operator coverage (OC) is 100%, but the function (x / 3) is also the function (x / 4). However, since the output value y = 0, 1 even in the function (x / 5) and the two cannot be distinguished, the constant parameter coverage (CPC) is evaluated as “1/3” (33%). On the other hand, when the test data (x = 2, 3) is used, the OC is 100%, and the function (x / 3) can be estimated uniquely, so that the CPC is 100%. The same applies to the test data (x = 4, 5).

このように、図10(b)に示すように、演算子カバレッジ(OC)100%のテストデータでは定数の違いが判別できなかったが、定数パラメータカバレッジ(CPC)を適用すれば、定数の違いをも含めた、より明確なコードの差を評価することができる。すなわち、演算子カバレッジ(OC)と、定数パラメータカバレッジ(CPC)とを測定することで、従来のカバレッジ(例えば、MC/DC)よりも正確に、ソフトウェア変更前後の新・旧コードの差を判別することができる。   Thus, as shown in FIG. 10B, the difference in constants could not be determined in the test data with 100% operator coverage (OC). However, if constant parameter coverage (CPC) was applied, the difference in constants was not found. It is possible to evaluate clearer code differences including. In other words, by measuring operator coverage (OC) and constant parameter coverage (CPC), the difference between new and old code before and after software change can be determined more accurately than conventional coverage (for example, MC / DC). can do.

以上で、定数パラメータカバレッジ情報測定処理の実施例の説明を終える。   This is the end of the description of the embodiment of the constant parameter coverage information measurement process.

(実施例3:テスト評価処理)
次に、図3のSA−4に対応するテスト評価処理について、図11を参照して詳細に説明する。ここで、図11は、本実施例におけるテスト評価処理の一例を示す図である。なお、図11において、図11のSB−1とSB−2は、図3のSA−1に対応し、同様に、SB−3は、SA―2とSA−3に対応し、そしてSB−4とSB−5は、SA−4に対応する。
(Example 3: Test evaluation process)
Next, the test evaluation process corresponding to SA-4 in FIG. 3 will be described in detail with reference to FIG. Here, FIG. 11 is a diagram illustrating an example of a test evaluation process in the present embodiment. In FIG. 11, SB-1 and SB-2 in FIG. 11 correspond to SA-1 in FIG. 3, and similarly, SB-3 corresponds to SA-2 and SA-3, and SB- 4 and SB-5 correspond to SA-4.

続いて、図11を参照して、テスト評価部102e−1〜2の処理による、テストデータベース(新コード向けテストデータベース106b,旧コード向けテストデータベース106c)の生成について説明する。図11において、演算子カバレッジ(OC)と、定数パラメータカバレッジ(CPC)とは、それぞれコードの特定演算子および定数に対して定義される。そこで、それぞれのテストデータがコード内のどの行の演算子および定数のOCとCPCとを最大化するのかを示す情報(例えば、コード中の行情報)を格納する。そのため、同じ演算子および定数に対して複数のテストデータが使われている場合、冗長なテストを除去して、簡潔なテストデータベースを作成することができる。なお、以下の説明では、新コード側と旧コード側とを区別せず説明することがあるが、同様の処理は、新コード側および旧コード側でそれぞれ実行される。   Next, the generation of test databases (new code test database 106b and old code test database 106c) by the processing of the test evaluation units 102e-1 and 102-2 will be described with reference to FIG. In FIG. 11, operator coverage (OC) and constant parameter coverage (CPC) are defined for specific operators and constants in the code, respectively. Therefore, information (for example, line information in the code) indicating which line of each test data operator and constant OC and CPC in the code is maximized is stored. Therefore, when a plurality of test data are used for the same operator and constant, a redundant test can be removed and a simple test database can be created. In the following description, the new code side and the old code side may be described without distinction, but the same processing is executed on the new code side and the old code side, respectively.

図11に示すように、まず、制御部102は、テストデータが格納された記憶部106のテストデータDB106aから、テストデータを読み出す(SB−1)。   As shown in FIG. 11, first, the control unit 102 reads test data from the test data DB 106a of the storage unit 106 in which the test data is stored (SB-1).

そして、実行部102aは、SB−2にて読み出したテストデータを、新・旧コード別に実行する(SB−2)。   Then, the execution unit 102a executes the test data read in SB-2 for each new and old code (SB-2).

そして、測定部102bの演算子カバレッジ測定部102cは、実行部102aにより実行された、コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定し、また、測定部102bの定数パラメータカバレッジ測定部102dは、実行部102aにより実行された、コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する(SB−3)。   Then, the operator coverage measurement unit 102c of the measurement unit 102b measures the operator coverage information for calculating the coverage rate of the operator described in the code executed by the execution unit 102a for each new and old code. In addition, the constant parameter coverage measurement unit 102d of the measurement unit 102b obtains constant parameter coverage information for calculating the coverage rate of the constant described in the code executed by the execution unit 102a for each new and old code. (SB-3).

そして、テスト評価部102eは、新規に実行されたテストデータに対応する演算子カバレッジ(OC)情報および定数パラメータカバレッジ(CPC)情報と取得する(SB−4)。   Then, the test evaluation unit 102e acquires operator coverage (OC) information and constant parameter coverage (CPC) information corresponding to the newly executed test data (SB-4).

そして、SA−4で取得されたテストデータのOC・CPC情報(行情報を含む。)と、当該行情報に対応するテストデータDBに格納されたOC・CPC情報とを比較して、新しいテストデータが、テストデータDBに格納されたテストデータよりも、評価付けされた精度が高いか否かを判断する(SB−5)。   Then, the OC / CPC information (including line information) of the test data acquired in SA-4 is compared with the OC / CPC information stored in the test data DB corresponding to the line information, and a new test is performed. It is determined whether or not the accuracy of the data is higher than that of the test data stored in the test data DB (SB-5).

そして、テスト評価部102eは、精度が高いと判断した場合(SB−5:Yes)、テストデータDBに行情報に対応付けてテストデータを登録する。すなわち、テストデータとテスト行情報を、テストデータとそのデータがコードのどの演算子または定数のカバレッジに貢献したかを表す情報を、「テストデータ:演算子カバレッジ(OC)情報」・「テストデータ:定数パラメータカバレッジ(CPC)情報」とそれぞれ対応付けて格納する。   When the test evaluation unit 102e determines that the accuracy is high (SB-5: Yes), the test evaluation unit 102e registers the test data in association with the row information in the test data DB. That is, the test data and the test line information, the information indicating which operator or constant of the code the test data and the data contributed to, are expressed as “test data: operator coverage (OC) information” and “test data. : Constant parameter coverage (CPC) information ”and stored in association with each other.

これにより、精度の高いテストデータを得た後は、次回の新・旧コードのテストの際には、冗長性が排除されたテストデータDBに格納されたテストデータを用いて、デバッグテストを行うことでき、且つ、次回実行時に演算子カバレッジ情報と定数パラメータカバレッジ情報の測定を省略することができ、全体のデバッグテストを簡略化できる。   As a result, after obtaining high-precision test data, the next new / old code test is performed using the test data stored in the test data DB from which redundancy has been removed, to perform a debug test. In addition, measurement of operator coverage information and constant parameter coverage information can be omitted at the next execution, and the entire debug test can be simplified.

以上で、テスト評価処理の実施例の説明を終える。   This is the end of the description of the embodiment of the test evaluation process.

(実施例4:表示処理)
最後に、図3のSA−5に対応する表示処理について、図12および図13を参照して詳細に説明する。ここで、図12および図13は、本実施例における表示処理による表示画面の一例を示す図である。
(Example 4: Display processing)
Finally, display processing corresponding to SA-5 in FIG. 3 will be described in detail with reference to FIGS. 12 and 13. Here, FIG. 12 and FIG. 13 are diagrams illustrating an example of a display screen by display processing in the present embodiment.

図12において、表示部114はテストの結果を表示する。このテスト結果は、新・旧コードの演算子・定数に対してどれだけカバーできているかを示す情報と、実行されたテストデータの数などで表示される。例えば、画面左側の旧コードブラウザには、変更前の旧コードが表示され、画面右側の新コードブラウザには、変更前の新コードが表示され、両コードを視覚的に比較可能になっている。また、画面左下のボックスには、テストに関する共通情報として、テストしたデータ数や出力差などが表示される。また、画面の中央下側には、新・旧コード別に、コード全体における演算子カバレッジ(OC)率(%)と、コード全体における定数パラメータカバレッジ(CPC)率(%)が表示される。また、各新・旧コードブラウザの右側にOC状態バーおよびCPC状態バーがあり、測定されたコード中の演算子および定数に対応したOCおよびCPCの状態を、新・旧コード別に、色や濃淡にて表示される。このOC状態バーおよびCPC状態バーについては、図13を参照し下記に詳述する。   In FIG. 12, the display unit 114 displays the test result. This test result is displayed with information indicating how much coverage is possible for operators and constants of the new and old codes, and the number of test data executed. For example, the old code browser on the left side of the screen displays the old code before the change, and the new code browser on the right side of the screen displays the new code before the change so that both codes can be visually compared. . The box at the lower left of the screen displays the number of tested data and output difference as common information regarding the test. In addition, the operator coverage (OC) rate (%) in the entire code and the constant parameter coverage (CPC) rate (%) in the entire code are displayed at the lower center of the screen for each new and old code. In addition, there is an OC status bar and a CPC status bar on the right side of each new and old code browser. The OC and CPC status corresponding to the operators and constants in the measured code can be displayed in different colors and shades for each new and old code. Is displayed. The OC status bar and CPC status bar will be described in detail below with reference to FIG.

続いて、図13を参照して、OC状態バーおよびCPC状態バーについて説明する。図13は、OC状態バーの一例であり、図13において、掛け算演算子「*」に対して実行されたテストデータの演算子カバレッジ(OC)が、色や濃淡にて表示されている。ここで、図13(a)は、テストデータがOCの1/3を満たす場合を示し、図13(b)は、テストデータがOCの2/3を満たす場合を示し、そして、図13(c)は、テストデータがOCの100%を満たす場合を示す。図13の各図に示すように、OCの値の上昇とともに、OC状態バーが濃く表示される。なお、図示されていないが、CPC状態バーも同様に表示される。   Next, the OC status bar and the CPC status bar will be described with reference to FIG. FIG. 13 shows an example of the OC status bar. In FIG. 13, the operator coverage (OC) of the test data executed for the multiplication operator “*” is displayed in color and shading. Here, FIG. 13A shows a case where the test data satisfies 1/3 of the OC, FIG. 13B shows a case where the test data satisfies 2/3 of the OC, and FIG. c) shows a case where the test data satisfies 100% of the OC. As shown in FIGS. 13A and 13B, the OC status bar is displayed darker as the OC value increases. Although not shown, the CPC status bar is displayed in the same manner.

これにより、新・旧コードの演算子・定数に対するカバレッジ率を容易に視覚的に比較することができる。   This makes it possible to easily visually compare the coverage rates for the operators and constants of the new and old codes.

以上で、表示処理の実施例の説明を終える。   This is the end of the description of the display processing embodiment.

これにて、本一致性検査装置100の実施例の説明を終える。   This concludes the description of the embodiment of the consistency checking apparatus 100.

[他の実施の形態]
さて、これまで本発明の実施の形態について説明したが、本発明は、上述した実施の形態以外にも、特許請求の範囲に記載した技術的思想の範囲内において種々の異なる実施の形態にて実施されてよいものである。
[Other embodiments]
Although the embodiments of the present invention have been described so far, the present invention is not limited to the above-described embodiments, but can be applied to various different embodiments within the scope of the technical idea described in the claims. It may be implemented.

例えば、一致性検査装置100がスタンドアローンの形態で処理を行う場合を一例に説明したが、一致性検査装置100とは別筐体で構成されるクライアント端末からの要求に応じて処理を行い、その処理結果を当該クライアント端末に返却するように構成してもよい。   For example, the case where the consistency checking apparatus 100 performs processing in a stand-alone form has been described as an example. However, processing is performed in response to a request from a client terminal configured with a separate housing from the consistency checking apparatus 100, You may comprise so that the process result may be returned to the said client terminal.

また、実施の形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。   In addition, among the processes described in the embodiment, all or part of the processes described as being automatically performed can be performed manually, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method.

このほか、文献中や図面中で示した処理手順、制御手順、具体的名称、各処理の登録データや検索条件等のパラメータを含む情報、画面例、データベース構成については、特記する場合を除いて任意に変更することができる。   In addition, the processing procedures, control procedures, specific names, information including parameters such as registration data and search conditions for each processing, screen examples, and database configurations shown in the literature and drawings, unless otherwise specified It can be changed arbitrarily.

また、一致性検査装置100に関して、図示の各構成要素は機能概略的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。   In addition, regarding the consistency checking apparatus 100, each illustrated component is functionally schematic and does not necessarily need to be physically configured as illustrated.

例えば、一致性検査装置100の各装置が備える処理機能、特に制御部102にて行われる各処理機能については、その全部または任意の一部を、CPU(Central Processing Unit)および当該CPUにて解釈実行されるプログラムにて実現することができ、あるいは、ワイヤードロジックによるハードウェアとして実現することも可能である。尚、プログラムは、後述する記録媒体に記録されており、必要に応じて一致性検査装置100に機械的に読み取られる。すなわち、ROMまたはHDなどの記憶部106などは、OS(Operating System)として協働してCPUに命令を与え、各種処理を行うためのコンピュータプログラムが記録されている。このコンピュータプログラムは、RAMにロードされることによって実行され、CPUと協働して制御部102を構成する。   For example, the processing functions provided in each device of the consistency checking device 100, in particular, the processing functions performed by the control unit 102, all or any part thereof are interpreted by a CPU (Central Processing Unit) and the CPU. It can be realized by a program to be executed, or can be realized as hardware by wired logic. The program is recorded on a recording medium to be described later, and is mechanically read by the consistency checking device 100 as necessary. In other words, the storage unit 106 such as ROM or HD stores a computer program for performing various processes by giving instructions to the CPU in cooperation with an OS (Operating System). This computer program is executed by being loaded into the RAM, and constitutes the control unit 102 in cooperation with the CPU.

また、このコンピュータプログラムは、一致性検査装置100に対して任意のネットワークを介して接続されたアプリケーションプログラムサーバに記憶されていてもよく、必要に応じてその全部または一部をダウンロードすることも可能である。   The computer program may be stored in an application program server connected to the consistency checking device 100 via an arbitrary network, and may be downloaded in whole or in part as necessary. It is.

また、本発明に係るプログラムを、コンピュータ読み取り可能な記録媒体に格納することもできる。ここで、この「記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、EPROM、EEPROM、CD−ROM、MO、DVD等の任意の「可搬用の物理媒体」、あるいは、LAN、WAN、インターネットに代表されるネットワークを介してプログラムを送信する場合の通信回線や搬送波のように、短期にプログラムを保持する「通信媒体」を含むものとする。   The program according to the present invention can also be stored in a computer-readable recording medium. Here, the “recording medium” refers to any “portable physical medium” such as a flexible disk, a magneto-optical disk, a ROM, an EPROM, an EEPROM, a CD-ROM, an MO, and a DVD, or a LAN, WAN, or Internet. It includes a “communication medium” that holds the program in a short period of time, such as a communication line or a carrier wave when the program is transmitted via a network represented by

また、「プログラム」とは、任意の言語や記述方法にて記述されたデータ処理方法であり、ソースコードやバイナリコード等の形式を問わない。なお、「プログラム」は必ずしも単一的に構成されるものに限られず、複数のモジュールやライブラリとして分散構成されるものや、OS(Operating System)に代表される別個のプログラムと協働してその機能を達成するものをも含む。なお、実施の形態に示した各装置において記録媒体を読み取るための具体的な構成、読み取り手順、あるいは、読み取り後のインストール手順等については、周知の構成や手順を用いることができる。   The “program” is a data processing method described in an arbitrary language or description method, and may be in any format such as source code or binary code. Note that the “program” is not necessarily limited to a single configuration, but is distributed in the form of a plurality of modules and libraries, or in cooperation with a separate program typified by an OS (Operating System). Including those that achieve the function. Note that a well-known configuration and procedure can be used for a specific configuration for reading a recording medium, a reading procedure, an installation procedure after reading, and the like in each device described in the embodiment.

記憶部106に格納される各種のデータベース等(テストデータDB106a〜新コード向けテストデータDB106c)は、RAM、ROM等のメモリ装置、ハードディスク等の固定ディスク装置、フレキシブルディスク、光ディスク等のストレージ手段であり、各種処理やウェブサイト提供に用いる各種のプログラムやテーブルやデータベースやウェブページ用ファイル等を格納する。   Various databases (test data DB 106a to new code test data DB 106c) stored in the storage unit 106 are storage means such as a memory device such as a RAM and a ROM, a fixed disk device such as a hard disk, a flexible disk, and an optical disk. Various programs, tables, databases, web page files, etc. used for various processing and website provision are stored.

また、一致性検査装置100は、既知のパーソナルコンピュータ、ワークステーション等の情報処理装置を接続し、該情報処理装置に本発明の方法を実現させるソフトウェア(プログラム、データ等を含む)を実装することにより実現してもよい。   In addition, the consistency checking apparatus 100 is connected to an information processing apparatus such as a known personal computer or workstation, and software (including programs, data, etc.) for realizing the method of the present invention is installed in the information processing apparatus. May be realized.

更に、装置の分散・統合の具体的形態は図示するものに限られず、その全部または一部を、各種の付加等に応じた任意の単位で、機能的または物理的に分散・統合して構成することができる。   Furthermore, the specific form of distribution / integration of the devices is not limited to the one shown in the figure, and all or a part thereof is configured to be functionally or physically distributed / integrated in an arbitrary unit according to various additions. can do.

以上詳述に説明したように、本発明によれば、従来のコードカバレッジ(例えば、MC/DC)に替わる新たなコードカバレッジ(OCおよびCPC)を用いて、ソフトウェア変更後のコード間の一致と不一致とを明確に区別することができる一致性検査方法、一致性検査装置およびプログラムを提供することができるので、ソフトウェア分野において有用である。   As described in detail above, according to the present invention, using the new code coverage (OC and CPC) instead of the conventional code coverage (for example, MC / DC), matching between codes after software change can be achieved. Since it is possible to provide a consistency check method, a consistency check apparatus, and a program that can clearly distinguish a mismatch, it is useful in the software field.

従来のコードカバレッジ(例えば、MC/DC)に基づいた一致性検査手法の一例を示すデータフロー図である。It is a data flow figure which shows an example of the consistency check method based on the conventional code coverage (for example, MC / DC). 従来のコードカバレッジ(例えば、MC/DC)とこのMC/DCを100%満たすテストデータの一例を示す図である。It is a figure which shows an example of the test data which satisfy | fills 100% of the conventional code coverage (for example, MC / DC) and this MC / DC. 本発明における一致性検査装置の基本動作処理の一例を示すフローチャートである。It is a flowchart which shows an example of the basic operation | movement process of the consistency inspection apparatus in this invention. 本発明が適用される、演算子カバレッジおよび定数パラメータカバレッジに基づいた一致性検査装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the consistency inspection apparatus based on operator coverage and constant parameter coverage to which this invention is applied. 本実施例における演算子カバレッジ(OC)の一例を示す図である。It is a figure which shows an example of operator coverage (OC) in a present Example. 本実施例における演算子カバレッジ(OC)による解析の一例を示す図である。It is a figure which shows an example of the analysis by operator coverage (OC) in a present Example. 本実施例における演算子カバレッジ(OC)による解析の一例をより詳細に示す図である。It is a figure which shows an example of the analysis by operator coverage (OC) in a present Example in detail. 本実施例における定数パラメータカバレッジ(CPC)の一例を示す図である。It is a figure which shows an example of the constant parameter coverage (CPC) in a present Example. 本実施例における定数パラメータカバレッジ(CPC)による推定の一例を示す図である。It is a figure which shows an example of estimation by the constant parameter coverage (CPC) in a present Example. 本実施例における定数パラメータカバレッジ(CPC)による推定の一例をより詳細に示す図である。It is a figure which shows an example of the estimation by the constant parameter coverage (CPC) in a present Example in detail. 本実施例におけるテスト評価処理の一例を示す図である。It is a figure which shows an example of the test evaluation process in a present Example. 本実施例における表示処理による表示画面の一例を示す図である。It is a figure which shows an example of the display screen by the display process in a present Example. 本実施例における表示処理による表示画面の一例を示す図である。It is a figure which shows an example of the display screen by the display process in a present Example.

符号の説明Explanation of symbols

100 一致性検査装置
102 制御部
102a 実行部
102a−1 旧コード実行部
102a−2 新コード実行部
102b−1〜2 測定部
102c−1〜2 演算子カバレッジ測定部
102d−1〜2 定数パラメータカバレッジ測定部
102e−1〜2 テスト評価部
106 記憶部
106a テストデータDB
106b 旧コード向けテストデータDB
106c 新コード向けテストデータDB
114 表示部
100 Consistency inspection device
102 Control unit
102a execution unit
102a-1 Old code execution part
102a-2 New code execution part
102b-1 to 2 measuring unit
102c-1 to 2 operator coverage measurement unit
102d-1 ~ 2 constant parameter coverage measurement unit
102e-1-2 Test evaluation unit
106 Storage unit
106a Test data DB
106b Test data DB for old code
106c Test data DB for new code
114 display

Claims (12)

コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置において実行される一致性検査方法であって、
上記制御部において実行される、
テストデータを、上記記憶部に格納するテストデータ格納ステップと、
上記テストデータ格納ステップにて上記記憶部に格納された上記テストデータを、新・旧コード別に実行する実行ステップと、
上記実行ステップにて実行された、上記コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定ステップと、
上記実行ステップにて実行された、上記コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する定数パラメータカバレッジ測定ステップと、
を含むことを特徴とする、一致性検査方法。
A consistency check method executed in a consistency check apparatus including at least a storage unit and a control unit for evaluating code coverage of old code and new code before and after code change,
Executed in the control unit,
A test data storage step for storing the test data in the storage unit;
An execution step of executing the test data stored in the storage unit in the test data storage step according to new and old codes;
An operator coverage measurement step for measuring operator coverage information for calculating the coverage rate of the operator described in the code executed in the execution step according to new and old codes;
Constant parameter coverage measurement step for measuring the constant parameter coverage information for calculating the coverage ratio of the constant described in the code executed in the execution step, for each new and old code,
Consistency inspection method characterized by including.
請求項1に記載の一致性検査方法において、
上記制御部において実行される、
上記演算子カバレッジ測定ステップにて測定された上記演算子カバレッジ情報と、上記定数パラメータカバレッジ測定ステップにて測定された上記定数パラメータカバレッジ情報とに基づいて、新・旧コード別に上記テストデータの精度を評価付けし上記記憶部に格納するテスト評価ステップ
を更に含むことを特徴とする、一致性検査方法。
The coincidence inspection method according to claim 1,
Executed in the control unit,
Based on the operator coverage information measured in the operator coverage measurement step and the constant parameter coverage information measured in the constant parameter coverage measurement step, the accuracy of the test data is determined for each new and old code. A matching test method, further comprising a test evaluation step of evaluating and storing in the storage unit.
請求項2に記載の一致性検査方法において、
上記テスト評価ステップは、
上記新たに精度を評価付けされたテストデータと、既に上記記憶部に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に上記記憶部に格納することを特徴とする、一致性検査方法。
In the consistency check method according to claim 2,
The test evaluation step is
Compare the test data newly evaluated for accuracy with the past test data already stored in the storage unit, and store the test data with the higher accuracy of both test data for each new and old code. A consistency check method, characterized in that the method is stored in a unit.
請求項1に記載の一致性検査方法において、
上記一致性検査装置は、
表示部
を更に備え、
上記制御部において実行される、
上記実行ステップにて実行された上記旧コードおよび上記新コードの出力差、上記演算子カバレッジ測定ステップにて測定された上記演算子カバレッジ情報、および/または、上記定数パラメータカバレッジ測定ステップにて測定された上記定数パラメータカバレッジ情報、を上記表示部に表示する表示ステップ
を更に含むことを特徴とする、一致性検査方法。
The coincidence inspection method according to claim 1,
The coincidence inspection device
A display unit,
Executed in the control unit,
The output difference between the old code and the new code executed in the execution step, the operator coverage information measured in the operator coverage measurement step, and / or the constant parameter coverage measurement step. And a display step for displaying the constant parameter coverage information on the display unit.
コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置であって、
上記記憶部は、
テストデータを記憶するテストデータ記憶手段
を備え、
上記制御部は、
上記テストデータ格納手段により上記記憶部に格納された上記テストデータを、新・旧コード別に実行する実行手段と、
上記実行手段により実行された、上記コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定手段と、
上記実行手段により実行された、上記コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する定数パラメータカバレッジ測定手段と、
を備えたことを特徴とする、一致性検査装置。
A consistency checking device comprising at least a storage unit and a control unit for evaluating code coverage of old code and new code before and after code change,
The storage unit
A test data storage means for storing test data;
The control unit
Execution means for executing the test data stored in the storage unit by the test data storage means for each new and old code;
Operator coverage measurement means for measuring operator coverage information for calculating the coverage rate of the operator described in the code executed by the execution means for each new and old code;
Constant parameter coverage measurement means for measuring constant parameter coverage information for calculating the coverage rate of the constant described in the code executed by the execution means for each new and old code,
A coincidence inspection apparatus comprising:
請求項5に記載の一致性検査装置において、
上記制御部は、
上記演算子カバレッジ測定手段により測定された上記演算子カバレッジ情報と、上記定数パラメータカバレッジ測定手段により測定された上記定数パラメータカバレッジ情報とに基づいて、新・旧コード別に上記テストデータの精度を評価付けし上記記憶部に格納するテスト評価手段
を更に備えたことを特徴とする、一致性検査装置。
In the consistency inspection apparatus according to claim 5,
The control unit
Based on the operator coverage information measured by the operator coverage measuring means and the constant parameter coverage information measured by the constant parameter coverage measuring means, the accuracy of the test data is evaluated for new and old codes. And a test evaluation means for storing in the storage unit.
請求項6に記載の一致性検査装置において、
上記テスト評価手段は、
上記新たに精度を評価付けされたテストデータと、既に上記記憶部に格納された過去のテストデータとを比較し、両テストデータのうち精度が高い方のテストデータを新・旧コード別に上記記憶部に格納することを特徴とする、一致性検査装置。
The coincidence inspection apparatus according to claim 6,
The test evaluation means is
Compare the test data newly evaluated for accuracy with the past test data already stored in the storage unit, and store the test data with the higher accuracy of both test data for each new and old code. A coincidence inspection apparatus characterized by being stored in a unit.
請求項5に記載の一致性検査装置において、
上記一致性検査装置は、
表示部
を更に備え、
上記制御部は、
上記実行手段により実行された上記旧コードおよび上記新コードの出力差、上記演算子カバレッジ測定手段により測定された上記演算子カバレッジ情報、および/または、上記定数パラメータカバレッジ測定手段により測定された上記定数パラメータカバレッジ情報、を上記表示部に表示する表示手段
を更に備えたことを特徴とする、一致性検査装置。
In the consistency inspection apparatus according to claim 5,
The coincidence inspection device
A display unit,
The control unit
The output difference between the old code and the new code executed by the execution means, the operator coverage information measured by the operator coverage measurement means, and / or the constant measured by the constant parameter coverage measurement means A consistency inspection apparatus, further comprising display means for displaying parameter coverage information on the display unit.
コード変更前後の旧コードおよび新コードのコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置に実行させるためのプログラムであって、
上記制御部において実行される、
テストデータを、上記記憶部に格納するテストデータ格納ステップと、
上記テストデータ格納ステップにて上記記憶部に格納された上記テストデータを、新・旧コード別に実行する実行ステップと、
上記実行ステップにて実行された、上記コード中に記述された演算子のカバレッジ率を算出するための演算子カバレッジ情報を、新・旧コード別に測定する演算子カバレッジ測定ステップと、
上記実行ステップにて実行された、上記コード中に記述された定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を、新・旧コード別で測定する定数パラメータカバレッジ測定ステップと、
を実行させるためのプログラム。
A program for evaluating a code coverage of an old code and a new code before and after a code change, and causing a consistency checking device including at least a storage unit and a control unit to execute the code coverage,
Executed in the control unit,
A test data storage step for storing the test data in the storage unit;
An execution step of executing the test data stored in the storage unit in the test data storage step according to new and old codes;
An operator coverage measurement step for measuring operator coverage information for calculating the coverage rate of the operator described in the code executed in the execution step according to new and old codes;
Constant parameter coverage measurement step for measuring the constant parameter coverage information for calculating the coverage ratio of the constant described in the code executed in the execution step according to new and old codes, and
A program for running
複数のコードによる出力値の一致性を検査しながらコードカバレッジを評価する、記憶部と制御部とを少なくとも備えた一致性検査装置において実行される一致性検査方法であって、
上記制御部において実行される、
複数のテストデータを上記記憶部に格納するテストデータ格納ステップと、
上記テストデータ格納ステップにて上記記憶部に格納された上記テストデータを入力値として、上記複数のコードに実行させる実行ステップと、
上記実行ステップにて所定の複数回実行された、上記コード中の演算子のカバレッジ率を算出するための演算子カバレッジ情報を測定する演算子カバレッジ測定ステップと、
上記実行ステップにて実行された上記コードにより出力された上記所定の複数の上記出力値により、上記演算子に記述された定数が一意に推定可能である定数のカバレッジ率を算出するための定数パラメータカバレッジ情報を測定する定数パラメータカバレッジ測定ステップと、
を含むことを特徴とする一致性検査方法。
A consistency check method executed in a consistency check apparatus including at least a storage unit and a control unit, which evaluates code coverage while checking the match of output values by a plurality of codes,
Executed in the control unit,
A test data storage step of storing a plurality of test data in the storage unit;
An execution step of causing the plurality of codes to execute the test data stored in the storage unit in the test data storage step as an input value;
An operator coverage measurement step for measuring operator coverage information for calculating a coverage rate of an operator in the code, which is executed a plurality of times in the execution step, and
A constant parameter for calculating a coverage rate of a constant that is capable of uniquely estimating the constant described in the operator from the predetermined plurality of output values output by the code executed in the execution step. A constant parameter coverage measurement step for measuring coverage information;
A method for checking consistency, comprising:
請求項10に記載の一致性検査方法において、
上記制御部において実行される、
上記演算子カバレッジ測定ステップにて測定された上記演算子カバレッジ情報、または、上記定数パラメータカバレッジ測定ステップにて測定された上記定数パラメータカバレッジ情報に基づいて、上記カバレッジ率を上昇させる上記テストデータを上記記憶部に格納するテスト評価ステップ、
を更に含むことを特徴とする一致性検査方法。
In the consistency check method according to claim 10,
Executed in the control unit,
The test data for increasing the coverage rate based on the operator coverage information measured in the operator coverage measurement step or the constant parameter coverage information measured in the constant parameter coverage measurement step A test evaluation step to be stored in the storage unit;
The consistency check method characterized by further including.
請求項11に記載の一致性検査方法において、
上記演算子カバレッジ測定ステップは、
上記実行ステップにて実行された上記演算子の上記コード中の行情報を、上記演算子カバレッジ情報に格納し、
上記定数パラメータカバレッジ測定ステップは、
上記実行ステップにて上記コードにより出力された上記出力値により推定した上記定数の上記コード中の行情報を、上記定数パラメータカバレッジ情報に格納し、
上記テスト評価ステップは、
上記記憶部に格納された上記テストデータに対応する上記行情報と、上記実行ステップにて新たに実行された上記テストデータに対応する上記行情報と、を比較することにより、当該テストデータが上記カバレッジ率を上昇させるか否か判定し、上昇させると判定した場合に当該テストデータを当該行情報に対応付けて上記記憶部に格納すること、
を特徴とする一致性検査方法。
In the consistency check method according to claim 11,
The operator coverage measurement step is
The line information in the code of the operator executed in the execution step is stored in the operator coverage information,
The constant parameter coverage measurement step is
The line information in the code of the constant estimated by the output value output by the code in the execution step is stored in the constant parameter coverage information,
The test evaluation step is
By comparing the line information corresponding to the test data stored in the storage unit and the line information corresponding to the test data newly executed in the execution step, the test data is Determining whether to increase the coverage rate, and storing the test data in the storage unit in association with the row information when it is determined to increase the coverage rate;
A method for checking consistency.
JP2008002528A 2008-01-09 2008-01-09 Consistency checking method, apparatus, and program Pending JP2009163636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008002528A JP2009163636A (en) 2008-01-09 2008-01-09 Consistency checking method, apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008002528A JP2009163636A (en) 2008-01-09 2008-01-09 Consistency checking method, apparatus, and program

Publications (1)

Publication Number Publication Date
JP2009163636A true JP2009163636A (en) 2009-07-23

Family

ID=40966158

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008002528A Pending JP2009163636A (en) 2008-01-09 2008-01-09 Consistency checking method, apparatus, and program

Country Status (1)

Country Link
JP (1) JP2009163636A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011138428A (en) * 2009-12-29 2011-07-14 Hitachi Ltd Verification apparatus and verification method
CN103838666A (en) * 2012-11-27 2014-06-04 百度在线网络技术(北京)有限公司 Method and device for determining code execution coverage rate
CN112597007A (en) * 2020-12-14 2021-04-02 中国航发控制系统研究所 Embedded software integration test integrity analysis method
WO2022249421A1 (en) * 2021-05-27 2022-12-01 日本電信電話株式会社 Code implementation omission detection device, code implementation omission detection method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011138428A (en) * 2009-12-29 2011-07-14 Hitachi Ltd Verification apparatus and verification method
CN103838666A (en) * 2012-11-27 2014-06-04 百度在线网络技术(北京)有限公司 Method and device for determining code execution coverage rate
CN112597007A (en) * 2020-12-14 2021-04-02 中国航发控制系统研究所 Embedded software integration test integrity analysis method
CN112597007B (en) * 2020-12-14 2023-10-03 中国航发控制系统研究所 Integrated test integrity analysis method for embedded software
WO2022249421A1 (en) * 2021-05-27 2022-12-01 日本電信電話株式会社 Code implementation omission detection device, code implementation omission detection method, and program

Similar Documents

Publication Publication Date Title
Fenton et al. A critique of software defect prediction models
US8386851B2 (en) Functional coverage using combinatorial test design
US7958400B2 (en) Detecting unexpected impact of software changes using coverage analysis
Aimran et al. The development of comparative bias index
US8397104B2 (en) Creation of test plans
US7457729B2 (en) Model based testing for electronic devices
US8595676B2 (en) BDD-based functional modeling
US20150025872A1 (en) System, method, and apparatus for modeling project reliability
KR20060045568A (en) Method and system for probe optimization while instrumenting a program
JP2009163636A (en) Consistency checking method, apparatus, and program
Ozment Software security growth modeling: Examining vulnerabilities with reliability growth models
US11023368B1 (en) Reduction of testing space for system testing infrastructure using combinatorics
JPWO2008010291A1 (en) Data processing method and apparatus regarding scalability of parallel computer system
AU2021227739B2 (en) Executing tests in deterministic order
US11086768B1 (en) Identifying false positives in test case failures using combinatorics
Patel et al. An information theoretic notion of software testability
JP4312799B2 (en) Reliability evaluation program and reliability evaluation apparatus
CN113608953A (en) Test data generation method and device, electronic equipment and readable storage medium
WO2019142266A1 (en) Test case generation device, test case generation method, and test case generation program
Elbaum et al. Software evolution and the code fault introduction process
CN117112398B (en) Incremental code coverage rate detection method and device, electronic equipment and storage medium
Marijan et al. Detecting and Reducing Redundancy in Software Testing for Highly Configurable Systems
JP2009134518A (en) Verification method for test program, and verification system therefor
JP2010140326A (en) Coverage measurement device
US20210286704A1 (en) Runtime metrics based test ordering