JP5207314B2 - Test pattern compression method and test pattern compression system - Google Patents

Test pattern compression method and test pattern compression system Download PDF

Info

Publication number
JP5207314B2
JP5207314B2 JP2009185405A JP2009185405A JP5207314B2 JP 5207314 B2 JP5207314 B2 JP 5207314B2 JP 2009185405 A JP2009185405 A JP 2009185405A JP 2009185405 A JP2009185405 A JP 2009185405A JP 5207314 B2 JP5207314 B2 JP 5207314B2
Authority
JP
Japan
Prior art keywords
row
test pattern
branch
column
rows
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.)
Expired - Fee Related
Application number
JP2009185405A
Other languages
Japanese (ja)
Other versions
JP2011039718A (en
Inventor
晃嗣 山崎
育生 原田
孝 青木
晃 小野澤
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2009185405A priority Critical patent/JP5207314B2/en
Publication of JP2011039718A publication Critical patent/JP2011039718A/en
Application granted granted Critical
Publication of JP5207314B2 publication Critical patent/JP5207314B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Debugging And Monitoring (AREA)

Description

本発明は、プログラムのテストを無駄なく網羅的に行うためのテストパタン圧縮方法およびテストパタン圧縮システムに関する。   The present invention relates to a test pattern compression method and a test pattern compression system for comprehensively testing a program without waste.

システムLSI設計において、上流工程で実施するプログラムのテストは、要求仕様や機能レベルの設計誤りが下流工程に混入することを防ぐために重要である。本テストが対象とするプログラムには、LSIハードウェア化する機能を記述したプログラムだけでなく、LSIと協調して動作する組み込みプログラムが含まれる。効率的なテストを実施するためには、無駄が少なく、高い網羅率を実現するシミュレーションパタン(以下、テストパタン)が必要となる。すなわち、テストパタンの高品質化が求められている。   In system LSI design, a test of a program executed in an upstream process is important in order to prevent a design error in required specifications or a function level from being mixed in a downstream process. The programs targeted by this test include not only programs that describe functions to be implemented as LSI hardware, but also embedded programs that operate in cooperation with LSI. In order to perform an efficient test, a simulation pattern (hereinafter referred to as a test pattern) that requires little waste and realizes a high coverage rate is required. That is, there is a demand for higher quality test patterns.

検証の進捗度合いは、通常、幾つかの網羅性指標に基づいて評価する。理想的には、上流工程においても、高い検証網羅率を達成することが望ましい。しかし、現実には、検証リソースの制限や、メソドロジが完備されていない点がネックとなり、上流工程のテストは下流工程に比べて十分に行われにくい傾向がある。したがって、上流工程での検証漏れを解決するには、低コストで質の高い検証を実現する手法が不可欠である。   The progress of verification is usually evaluated based on several comprehensive indexes. Ideally, it is desirable to achieve a high verification coverage even in the upstream process. However, in reality, the limitation of verification resources and the lack of methodology are the bottleneck, and the test of the upstream process tends to be more difficult than the downstream process. Therefore, a method for realizing high-quality verification at a low cost is indispensable to solve the verification omission in the upstream process.

上記の問題を解決する一手法として、形式手法のひとつであるモデル検査を応用することにより、プログラムのテストパタンを自動生成する方法が提案されている(非特許文献1、2、3)。これらは、逐次処理プログラム(C言語等)を、静的な制御構造の解析に適した中間表現に変換し、プログラムの実行パスを検査する。特定の実行パスが実行可能であれば、対応する実行パスの条件式を形式的に解いて、分岐網羅率を可能な限り高めるようなテストパタンを自動生成することができる。   As a method for solving the above problem, a method for automatically generating a test pattern of a program by applying model checking which is one of formal methods has been proposed (Non-Patent Documents 1, 2, and 3). These convert a sequential processing program (C language or the like) into an intermediate representation suitable for analysis of a static control structure, and inspect the execution path of the program. If a specific execution path can be executed, a conditional pattern of the corresponding execution path can be formally solved to automatically generate a test pattern that increases the branch coverage rate as much as possible.

分岐網羅率とは、プログラム内の全ての条件分岐において、真の場合、偽の場合が、テストパタンによって各々少なくとも1回は実行されるような網羅性指標のことであり、条件分岐の枝の総数に対する、選択された枝の割合で定義される。分岐網羅率は、ソフトウェア・テストの分野だけでなく、ハードウェアの機能検証でも広く使われている。   The branch coverage is a coverage index that is executed at least once according to a test pattern in all conditional branches in a program, when true or false. It is defined as the ratio of the selected branch to the total number. Branch coverage is widely used not only in the field of software testing, but also in hardware functional verification.

Ball T., “Abstraction-guided Test Generation: A Case Study,” Technical Report MSR-TR-2003-86, Microsoft Research, 2003.Ball T., “Abstraction-guided Test Generation: A Case Study,” Technical Report MSR-TR-2003-86, Microsoft Research, 2003. D. Beyer, A.J. Chlipala, and R. Majumdar, “Generating Tests from Counterexample,” ICSE ’04: Proceedings of the 26th International Conference on Software Engineering, pp.326-335, 2004.D. Beyer, A.J.Chlipala, and R. Majumdar, “Generating Tests from Counterexample,” ICSE '04: Proceedings of the 26th International Conference on Software Engineering, pp.326-335, 2004. K. Sen, D. Marinov, and G. Agha, “CUTE: aconcolic unit testing engine for C,” ESEC/FSE-13: Proceedings of the 10th European software engineering conference, pp.263-272, 2005.K. Sen, D. Marinov, and G. Agha, “CUTE: aconcolic unit testing engine for C,” ESEC / FSE-13: Proceedings of the 10th European software engineering conference, pp.263-272, 2005. G.C. Necula, S. Mcpeak, S.P. Rahul, and W. Weimer,“CIL: Intermediate language and tools for analysis and transformation of C programs,” In International Conference on Compiler Construction, pp.213-228, 2002.G.C. Necula, S. Mcpeak, S.P. Rahul, and W. Weimer, “CIL: Intermediate language and tools for analysis and transformation of C programs,” In International Conference on Compiler Construction, pp.213-228, 2002. 笹尾 勤、「論理設計−スイッチング回路理論」、近代科学社、2005年。Tsutomu Hagio, “Logic Design-Switching Circuit Theory”, Modern Science, 2005.

しかし、当該手法により生成されたテストパタンには、冗長なパタンが含まれるという課題がある。説明のため、非特許文献3の手法を用いて、図8に示すプログラムのテストパタンを生成した結果を図9に示す。尚、非特許文献3では、未選択の実行パスを探索する探索方法として、制限つき縦形探索(Bounded Depth-First Search:以下、DFS)を用いている。   However, there is a problem that the test pattern generated by the method includes a redundant pattern. For the sake of explanation, FIG. 9 shows the result of generating the test pattern of the program shown in FIG. 8 using the method of Non-Patent Document 3. In Non-Patent Document 3, a restricted vertical search (Bounded Depth-First Search: hereinafter referred to as DFS) is used as a search method for searching for an unselected execution path.

図9は、横軸として、DFSの探索の深さに制限をかけるための Depth値(以下、D)を、縦軸として、テストパタンの生成回数 Iterations(以下、I)と、分岐網羅率 Branch Coverage(以下、BC)を示している。   FIG. 9 shows the Depth value (hereinafter referred to as D) for limiting the DFS search depth on the horizontal axis, the test pattern generation count Iterations (hereinafter referred to as I), and the branch coverage rate on the vertical axis. Coverage (hereinafter referred to as BC) is shown.

図9より、Dが小さいほどIは少なくて済むが、D<4の場合、BCが100%に満たないことがわかる。一方、D>4の場合、既にBCが飽和しているので、生成結果には冗長なテストパタンが含まれる。したがって、この場合D=4をしきい値として、テストパタンを生成するのが得策である。D=4の時は、I=5、すなわちテストパタンが5パタン生成される。しかし、この場合、分岐網羅率を100%にするためには、5パタンは必要なく、最小3パタンあれば十分である。   From FIG. 9, it can be seen that I is smaller as D is smaller, but BC is less than 100% when D <4. On the other hand, when D> 4, since BC is already saturated, a redundant test pattern is included in the generation result. Therefore, in this case, it is a good idea to generate a test pattern with D = 4 as a threshold value. When D = 4, I = 5, that is, five test patterns are generated. However, in this case, in order to set the branch coverage rate to 100%, 5 patterns are not necessary, and a minimum of 3 patterns is sufficient.

本発明は上記課題を考慮してなされたものであり、その目的は、プログラムのテストを効率的に行うため、分岐網羅率を損なわずに、冗長なテストパタンを圧縮することにより、テストパタンの高品質化を図ることにある。   The present invention has been made in consideration of the above-mentioned problems. The purpose of the present invention is to compress a redundant test pattern without compromising the branch coverage rate in order to efficiently test a program. The aim is to improve quality.

上記目的を達成するために、請求項1にかかる発明は、プログラムのテストを無駄なく網羅的に行うためのテストパタン圧縮方法であって、システムLSIとしてハードウェア化する機能を記述したプログラムをテスト対象プログラムとし、該テスト対象プログラムに対するテストパタンを形式手法におけるモデル検査を用いることにより自動生成するテストパタン生成ステップと、前記テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出ステップと、前記テストパタン生成ステップで生成した冗長なパタンが含まれるテストパタンを行とし、前記分岐制御枝抽出ステップで抽出した分岐制御枝を列とする被覆表を構成する被覆表構成ステップと、前記被覆表から特異列を選択削除する特異列選択削除ステップと、前記被覆表の前記特異列を含む行を必須行として、該必須行を保存し、該必須行を前記被覆表から選択削除する必須行選択削除ステップと、前記必須行に包含される残りの列を削除する必須行包含列選択削除ステップと、前記被覆表の残りのいずれかの行が被覆する列の集合が前記被覆表の残りの他の行の列の集合を包含するとき、該他の行を被支配行として選択削除する被支配行選択削除ステップと、前記被支配行選択削除ステップにより前記被覆表に残った行について、特定の列を被覆する行の集合が別の列の行の集合を包含するとき、前記特定の列を支配列として選択削除する支配列選択削除ステップと、前記被覆表に残った行について、前記特異列選択削除ステップから前記支配列選択削除ステップまでを前記被覆表の行が消滅するまで繰り返すステップと、を備え、前記必須行を最終解として得ることを特徴とする。
請求項2にかかる発明は、プログラムのテストを無駄なく網羅的に行うためのテストパタン圧縮システムであって、システムLSIとしてハードウェア化する機能を記述したプログラムをテスト対象プログラムとし、該テスト対象プログラムに対するテストパタンを形式手法におけるモデル検査を用いることにより自動生成するテストパタン生成装置と、前記テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出装置と、前記テストパタン生成装置で生成した冗長なパタンが含まれるテストパタンを行とし、前記分岐制御枝抽出装置で抽出した分岐制御枝を列とする被覆表を構成する被覆表構成装置と、前記被覆表から特異列を選択削除する特異列選択削除装置と、前記被覆表の前記特異列を含む行を必須行として、該必須行を保存し、該必須行を前記被覆表から選択削除する必須行選択削除装置と、前記必須行に包含される残りの列を削除する必須行包含列選択削除装置と、前記被覆表の残りのいずれかの行が被覆する列の集合が前記被覆表の残りの他の行の列の集合を包含するとき、該他の行を被支配行として選択削除する被支配行選択削除装置と、前記被支配行選択削除装置により前記被覆表に残った行について、特定の列を被覆する行の集合が別の列の行の集合を包含するとき、前記特定の列を支配列として選択削除する支配列選択削除装置と、を備えることを特徴とする。
In order to achieve the above object, the invention according to claim 1 is a test pattern compression method for exhaustively testing a program without waste, and tests a program describing a function to be implemented as hardware as a system LSI. targeted program, a test pattern generating step of automatically generating by using a model checking the test pattern in the form approach to the test target program, branch control branches to extract the control branches to be branch coverage from the test target program An extraction step, and a coverage table configuration step that configures a coverage table in which the test pattern including the redundant pattern generated in the test pattern generation step is a row, and the branch control branch extracted in the branch control branch extraction step is a column. The singular column selection / deletion step for selectively deleting singular columns from the covering table. And a mandatory row selection / deletion step that saves the mandatory row with the row including the singular column of the coverage table as a mandatory row, and selectively deletes the mandatory row from the coverage table, and the remaining included in the mandatory row A mandatory row inclusion column selection / deletion step that deletes the columns of the covering table, and a set of columns covered by any of the remaining rows of the covering table includes a set of columns of the remaining other rows of the covering table, A controlled row selection / deletion step that selectively deletes other rows as controlled rows, and a row remaining in the covering table by the controlled row selection / deletion step is a set of rows covering a specific column. When a set of rows is included, a support array selection deletion step for selectively deleting the specific column as a support array, and a row remaining in the covering table, from the singular column selection deletion step to the support array selection deletion step. The row of the covering table disappears Comprising the steps repeated until the, and wherein the obtaining the required row as the final solution.
The invention according to claim 2 is a test pattern compression system for exhaustively testing a program without waste, and a program describing a function to be implemented as hardware as a system LSI is a test target program, and the test target program test pattern generation device, and a branch control branches extracting apparatus for extracting a control branches to be branch coverage from the test target program for automatically generating by using a model checking the test pattern in the form approach to the test pattern generation A covering table forming device for forming a covering table with a row of test patterns including redundant patterns generated by the device and having a branch control branch extracted by the branch control branch extracting device as a column; and a unique column from the covering table. Singular column selective deletion device for selective deletion, and a row including the singular column of the covering table as a mandatory row A mandatory row selection / deletion device that saves the mandatory row and selectively deletes the mandatory row from the covering table, a mandatory row inclusion column selection / deletion device that removes the remaining columns included in the mandatory row, When a set of columns covered by any of the remaining rows of the covering table includes a set of columns of the remaining other rows of the covering table, the selected row is selected and deleted as a controlled row. And the row remaining in the covering table by the deletion device and the controlled row selection / deletion device, when the set of rows covering a specific column includes a set of rows of another column, the specific column is arranged And a branch arrangement selection / deletion device that selectively deletes.

請求項2にかかる発明は、プログラムのテストを無駄なく網羅的に行うためのテストパタン圧縮システムであって、テスト対象プログラムのテストパタンを自動生成するテストパタン生成装置と、
前記テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出装置と、前記テストパタン生成装置で生成したテストパタンを行とし、前記分岐制御枝抽出装置で抽出した分岐制御枝を列とする被覆表を構成する被覆表構成装置と、前記被覆表から特異列を選択削除する特異列選択削除装置と、前記被覆表の前記特異列を含む行を必須行として、該必須行を保存し、該必須行を前記被覆表から選択削除する必須行選択削除装置と、前記必須行に包含される残りの列を削除する必須行包含列選択削除装置と、前記被覆表の残りのいずれかの行が被覆する列の集合が前記被覆表の残りの他の行の列の集合を包含するとき、該他の行を被支配行として選択削除する被支配行選択削除装置と、前記被支配行選択削除装置により前記被覆表に残った行について、特定の列を被覆する行の集合が別の列の行の集合を包含するとき、前記特定の列を支配列として選択削除する支配列選択削除装置と、を備えることを特徴とする。
The invention according to claim 2 is a test pattern compression system for exhaustively testing a program without waste, a test pattern generation device that automatically generates a test pattern of a test target program,
A branch control branch extraction apparatus that extracts a control branch that is a target of the branch coverage from the test target program, and a branch control branch extracted by the branch control branch extraction apparatus using the test pattern generated by the test pattern generation apparatus as a row. A mandatory table, a mandatory table selecting / deleting device for selectively deleting a unique column from the coverage table, and a row including the unique column of the coverage table as an essential row. A mandatory row selection / deletion device that selectively deletes the mandatory row from the covering table, a mandatory row inclusion column selection / deletion device that deletes the remaining columns included in the mandatory row, and a remaining portion of the covering table. When a set of columns covered by any row includes a set of columns of the remaining other rows of the covering table, the controlled row selection / deletion device that selectively deletes the other row as a controlled row; By controlled row selection and deletion device A row arrangement selection / deletion device that selectively deletes the specific column as a branch arrangement when a set of rows covering a specific column includes a set of rows of another column for the rows remaining in the coverage table; It is characterized by providing.

本発明によれば、テストパタンが生成された後に、冗長なテストパタンを除去し、最小化を試みる方式であるため、しきい値を用いたテストパタン生成さえ行えば、分岐網羅率を保証しながら、テストパタン数を低減できる効果がある。テストパタン生成側のアルゴリズムが完全に冗長性を排除できない限り、本発明による圧縮効果が期待できる。テストパタン生成側アルゴリズムが改良されたとしても、冗長パタン数削減効果が得られる分、より広い探索範囲から結果として同数の候補パタンを得ることも可能になる。それらに本発明を適用することにより、一層の高品質化が期待できる。本発明は、テストの対象となるプログラム言語の別を問わず、逐次処理プログラム一般に適用することができる。   According to the present invention, after the test pattern is generated, the redundant test pattern is removed and an attempt is made to minimize. Therefore, if the test pattern is generated using the threshold value, the branch coverage rate is guaranteed. However, there is an effect that the number of test patterns can be reduced. As long as the algorithm on the test pattern generation side cannot completely eliminate redundancy, the compression effect according to the present invention can be expected. Even if the test pattern generation side algorithm is improved, it is possible to obtain the same number of candidate patterns as a result from a wider search range because the effect of reducing the number of redundant patterns is obtained. By applying the present invention to them, further improvement in quality can be expected. The present invention can be applied to general sequential processing programs regardless of the programming language to be tested.

本発明の、テストパタン圧縮方法を実施するシステムのブロック図である。It is a block diagram of the system which implements the test pattern compression method of this invention. 本実施例におけるCFG全体図と、分岐制御枝のみに着目したCFGを示す図である。It is a figure which shows CFG whole drawing in a present Example, and CFG which paid its attention only to the branch control branch. 本実施例における被覆表を示す図である。It is a figure which shows the coating | coated table | surface in a present Example. 本発明の、テストパタン圧縮方法の処理手順を示す図である。It is a figure which shows the process sequence of the test pattern compression method of this invention. 本実施例における図3を簡約化した被覆表を示す図である。It is a figure which shows the coating | covering table which simplified FIG. 3 in a present Example. 本実施例における図5を簡約化した被覆表を示す図である。It is a figure which shows the coating | covering table which simplified FIG. 5 in a present Example. 本実施例における図6を簡約化した被覆表を示す図である。It is a figure which shows the coating | covering table which simplified FIG. 6 in a present Example. 図9の動作例に用いたプログラムを示す図である。It is a figure which shows the program used for the operation example of FIG. テストパタン生成装置の動作例を示す図である。It is a figure which shows the operation example of a test pattern production | generation apparatus.

本発明の実施例について図面を参照して説明する。図1は本発明のテストパタン圧縮方法を実施するシステムのブロック図である。本システムは、テスト対象プログラムのテストパタンを自動生成するテストパタン生成装置1と、テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出装置2と、テストパタン生成装置1で生成したテストパタンを行とし、同様に分岐制御枝抽出装置2で抽出した分岐制御枝を列とする被覆表を構成する被覆表構成装置3と、得られた被覆表の中の特異列を選択削除する特異列選択削除装置4と、被覆表の中の必須行を選択削除する必須行選択削除装置5と、必須行による包含列を削除する必須行包含列選択削除装置6と、被支配行を選択削除する被支配行選択削除装置7と、支配列を選択削除する支配列選択削除装置8とで構成されている。9は信号線である。本発明では、これらの装置を用いて、所定の処理手順により、テストパタンを圧縮(削除)する。以下、図8に示したプログラムをテスト対象プログラムとして具体的に説明する。   Embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a system that implements the test pattern compression method of the present invention. The system includes a test pattern generation device 1 that automatically generates a test pattern of a test target program, a branch control branch extraction device 2 that extracts a control branch that is subject to a branch coverage from the test target program, and a test pattern generation device 1. A cover table forming device 3 that forms a cover table having the test pattern generated in step 1 as a row and the branch control branch extracted by the branch control branch extracting device 2 as a column, and a unique column in the obtained cover table Singular column selection / deletion device 4 for selective deletion, mandatory row selection / deletion device 5 for selective deletion of essential rows in the covering table, mandatory row inclusion column selection / deletion device 6 for deleting inclusion columns of essential rows, and controlled A controlled row selection / deletion device 7 that selectively deletes rows and a support array selection / deletion device 8 that selectively deletes support sequences are configured. Reference numeral 9 denotes a signal line. In the present invention, these devices are used to compress (delete) the test pattern according to a predetermined processing procedure. Hereinafter, the program shown in FIG. 8 will be specifically described as a test target program.

図2(a)は、図8のプログラムの制御フローグラフ(以下、CFG)を表す。n個の節(楕円)の集合をV={v1,v2,・・・,vn}、m個の有向枝(矢印)の集合をE={e1,e2,・・・,em}とするとき、CFG=(V,E)である。Vは図8のプログラムの各文に対応し、Eは制御の流れを表す。   FIG. 2A shows a control flow graph (hereinafter, CFG) of the program of FIG. A set of n nodes (ellipses) is represented by V = {v1, v2,..., vn}, and a set of m directed branches (arrows) is represented by E = {e1, e2,. CFG = (V, E). V corresponds to each sentence of the program of FIG. 8, and E represents the flow of control.

図2(b)に、図2(a)のCFGのうち、if文のみに着目した様子を示す。12、15、20、22の各節から分岐している枝e1,e2,・・・,e8を分岐制御枝といい、この場合、分岐制御枝の総数は8本となる。分岐網羅率とは、分岐制御枝の総数に対し、あるテストパタンによって選択された分岐制御枝数の割合を表す網羅性指標のことである。任意の数のテストパタンを用いてシミュレーションをするとき、100%の分岐網羅率を達成するには、分岐制御枝e1,e2,・・・,e8のすべてが、少なくとも1回選択される必要がある。   FIG. 2B shows a state where attention is paid only to the “if” sentence in the CFG of FIG. Branches e1, e2,..., E8 branching from the nodes 12, 15, 20, and 22 are called branch control branches. In this case, the total number of branch control branches is eight. The branch coverage rate is a coverage index that represents the ratio of the number of branch control branches selected by a certain test pattern to the total number of branch control branches. When simulating with an arbitrary number of test patterns, all of the branch control branches e1, e2,..., E8 need to be selected at least once to achieve 100% branch coverage. is there.

テストパタン生成装置1は、分岐網羅率を可能な限り高めるようなテストパタンを生成する手段を具備する。これには、例えば、非特許文献1〜3のような公知の技術を用いて実現できる。また、テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出装置2は、非特許文献4の公知の技術を用いて容易に実現できる。   The test pattern generation device 1 includes means for generating a test pattern that increases the branch coverage rate as much as possible. This can be realized by using known techniques such as Non-Patent Documents 1 to 3, for example. Further, the branch control branch extraction apparatus 2 that extracts the control branch that is the target of the branch coverage from the test target program can be easily realized by using a known technique of Non-Patent Document 4.

しかし、これら従来技術だけでは冗長なパタンが生成される問題があることは前述の通りである。分岐網羅率上の重複したテストパタンを除去するため、本発明では、テストパタン生成装置1で生成されたテストパタンを行とし、同様に分岐制御枝抽出装置2で抽出された分岐制御枝を列とする被覆表を構成する被覆表構成装置3を用いる。   However, as described above, there is a problem that a redundant pattern is generated only by these conventional techniques. In order to remove duplicate test patterns on the branch coverage rate, in the present invention, the test pattern generated by the test pattern generation device 1 is used as a row, and the branch control branches extracted by the branch control branch extraction device 2 are arranged in a row. The covering table forming device 3 that forms the covering table is used.

図3に、非特許文献3の手法を用いて、Depth値としてD=5を指定したときに生成されたテストパタンを行に、図2(b)の分岐制御枝e1,e2,・・・,e8を列にとり、表の形で表した図を示す。   FIG. 3 shows the branch control branches e1, e2,... In FIG. 2B with the test pattern generated when D = 5 is designated as the Depth value using the method of Non-Patent Document 3. , E8 are shown in a column and shown in the form of a table.

表の交点(i、j)に×印があるとき、行iは列jを被覆するといい、図3の表を被覆表と呼ぶ。例えば、tp1は、e1の分岐制御枝を被覆する。tp2は、e2とe4の分岐制御枝を被覆する(以下同様)。本発明では、このとき、全ての分岐制御枝を網羅するのに必要最小限のテストパタン数を求めたい。   When there is a cross in the intersection (i, j) of the table, the row i covers the column j, and the table in FIG. 3 is called a covering table. For example, tp1 covers the branch control branch of e1. tp2 covers the branch control branches of e2 and e4 (the same applies hereinafter). In the present invention, at this time, the minimum number of test patterns necessary to cover all branch control branches is desired.

以上のように、本問題は、すべての列を被覆するような最小数の行の集合を求める最小被覆問題として定式化することができる。最小被覆問題は、Quine-McCluskey(QM)法の後半部の手続きを使って、多くの場合、実用的な時間内で解くことが期待できる。QM法は、例えば、非特許文献5に示されているような公知の技術を用いて容易に実現できる。   As described above, this problem can be formulated as a minimum covering problem for obtaining a set of the minimum number of rows covering all the columns. The minimum coverage problem can often be expected to be solved in a practical time using the procedure in the latter half of the Quine-McCluskey (QM) method. The QM method can be easily realized by using a known technique as shown in Non-Patent Document 5, for example.

本発明では、QM法の知見を応用し、同等の分岐網羅率を達成する上で不要なテストパタンを圧縮(削除)する方法を考案した。これをCRTP(Compression of Redundant Test Patterns)法と呼ぶ。CRTP法が備える所定の計算手順を図4示す。   In the present invention, the knowledge of the QM method is applied to devise a method of compressing (deleting) test patterns that are unnecessary for achieving the same branch coverage rate. This is called CRTP (Compression of Redundant Test Patterns) method. FIG. 4 shows a predetermined calculation procedure provided in the CRTP method.

CRTP法では、図4のステップS1でテストパタン生成装置1を用いてテストパタンを自動生成し、ステップS2で分岐制御枝抽出装置2を用いてCFGから分岐制御枝を抽出する。ステップS3で被覆表構成装置3を用いて図3の被覆表を構成する。以下、ステップS4,S5,S6の処理について詳しく説明する。   In the CRTP method, a test pattern is automatically generated using the test pattern generation device 1 in step S1 of FIG. 4, and a branch control branch is extracted from the CFG using the branch control branch extraction device 2 in step S2. In step S3, the cover table shown in FIG. Hereinafter, the processes of steps S4, S5, and S6 will be described in detail.

図3の被覆表において、交点(i、j)に×印をただ1つしかもたない列を特異列という。特異列はCFG上の特異な分岐制御枝を表す。この場合、e1とe4が特異列である。特異列の×印を含む行を必須行という。必須行は分岐網羅率を増やす上で不可欠なテストパタンを意味する。この場合、tp1とtp2が必須行に該当する。特異列選択削除装置4と必須行選択削除装置5を用いて、特異列と必須行のチェック完了後、求める最小解に必須行tp1とtp2を保存し、特異列と必須行を削除する(ステップS4、S5)。さらに、必須行包含列選択削除装置6は必須行によって包含される列をチェックし、削除する(ステップS6)。この場合、e2が削除されることになる。ステップS6の完了後、簡約化された被覆表を、図5に示す。   In the covering table of FIG. 3, a column having only one cross mark at the intersection (i, j) is called a singular column. The singular row represents a unique branch control branch on the CFG. In this case, e1 and e4 are singular columns. A row including a cross column of a singular column is called a required row. An essential line means a test pattern that is indispensable for increasing the branch coverage rate. In this case, tp1 and tp2 correspond to essential rows. Using the singular column selection / deletion device 4 and the essential row selection / deletion device 5, after the check of the singular column and the essential row is completed, the essential rows tp1 and tp2 are stored in the minimum solution to be obtained, and the singular column and the essential row are deleted (step) S4, S5). Furthermore, the mandatory row inclusion column selection / deletion device 6 checks and deletes the columns contained by the mandatory rows (step S6). In this case, e2 is deleted. After completion of step S6, a simplified coverage table is shown in FIG.

図5において、行Pが被覆する列の集合が行Qの列の集合を包含するとき、行Pは行Qを支配する、という。すなわち、QがPの部分集合であるとき、Qを被支配行と呼ぶ。この場合、行tp3,tp4,tp5,tp6は、行tp7に包含される関係にある。したがって、被支配行削除装置7を用いて、行tp3,tp4,tp5,tp6をチェックし、図5の表から削除する(ステップS7)。   In FIG. 5, when the set of columns covered by row P includes the set of columns of row Q, row P dominates row Q. That is, when Q is a subset of P, Q is called a controlled row. In this case, the rows tp3, tp4, tp5, and tp6 are included in the row tp7. Therefore, the rows tp3, tp4, tp5, tp6 are checked using the controlled row deletion device 7 and deleted from the table of FIG. 5 (step S7).

ステップS7の完了後、簡約化された被覆表を、図6に示す。図6において、列Mを被覆する行の集合が列Nの行の集合を包含するとき、列Mは列Nを支配する、という。Mを支配列と呼ぶ。これに該当するとき、支配列選択削除装置8を用いて支配列をチェックし、削除する。本実施例の場合、e3,e5,e6,e7,e8が被覆する行の集合は互いに等しい。このような場合、全て支配列と解釈できるので、どの列を削除しても結果に影響はない(ステップS8)。   After the completion of step S7, a simplified coverage table is shown in FIG. In FIG. 6, when the set of rows covering column M includes the set of rows of column N, column M dominates column N. M is called a branch arrangement. When this is the case, the branch arrangement is checked and deleted using the branch arrangement selection / deletion device 8. In the present embodiment, the sets of rows covered by e3, e5, e6, e7, e8 are equal to each other. In such a case, all the columns can be interpreted as a branch arrangement, and therefore, deleting any column does not affect the result (step S8).

ステップS8の完了後、簡約化された被覆表を、図7に示す。図7は、図6の支配列e5〜e8を削除した場合を示している。図7において、ステップS4とS5の手続きを繰返す。残ったe3は特異列であり、したがって行tp7は必須行となる。特異列選択削除装置4と必須行選択削除装置5を用いて、求める最小解に必須行tp7を保存し、必須行を削除する。最終的に被覆表は消滅し、最小解として
TP={tp1、tp2、tp7}
の3個のテストパタンが得られる。これにより手続きが終了する。
FIG. 7 shows a simplified coverage table after completion of step S8. FIG. 7 shows a case where the support arrays e5 to e8 in FIG. 6 are deleted. In FIG. 7, the procedures of steps S4 and S5 are repeated. The remaining e3 is a singular column, and therefore the row tp7 is an essential row. Using the singular column selection / deletion device 4 and the essential row selection / deletion device 5, the essential row tp7 is stored in the minimum solution to be obtained, and the essential row is deleted. Finally, the coverage table disappears and the minimum solution is TP = {tp1, tp2, tp7}
3 test patterns are obtained. This ends the procedure.

このとき、図3より、tp1,tp2,tp7の3個のテストパタンで、e1,e2,・・・,e8の分岐制御枝をすべて網羅できていることが確認できる。   At this time, it can be confirmed from FIG. 3 that all the branch control branches of e1, e2,..., E8 can be covered with the three test patterns of tp1, tp2, and tp7.

1:テストパタン生成装置
2:分岐制御枝抽出装置
3:被覆表構成装置
4:特異列選択削除装置
5:必須行選択削除装置
6:必須行包含列選択削除装置
7:被支配行選択削除装置
8:支配列選択削除装置
9:信号線
1: Test pattern generation device 2: Branch control branch extraction device 3: Cover table configuration device 4: Singular column selection deletion device 5: Mandatory row selection deletion device 6: Mandatory row inclusion column selection deletion device 7: Controlled row selection deletion device 8: Branch arrangement selection deletion device 9: Signal line

Claims (2)

プログラムのテストを無駄なく網羅的に行うためのテストパタン圧縮方法であって、
システムLSIとしてハードウェア化する機能を記述したプログラムをテスト対象プログラムとし、該テスト対象プログラムに対するテストパタンを形式手法におけるモデル検査を用いることにより自動生成するテストパタン生成ステップと、
前記テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出ステップと、
前記テストパタン生成ステップで生成した冗長なパタンが含まれるテストパタンを行とし、前記分岐制御枝抽出ステップで抽出した分岐制御枝を列とする被覆表を構成する被覆表構成ステップと、
前記被覆表から特異列を選択削除する特異列選択削除ステップと、
前記被覆表の前記特異列を含む行を必須行として、該必須行を保存し、該必須行を前記被覆表から選択削除する必須行選択削除ステップと、
前記必須行に包含される残りの列を削除する必須行包含列選択削除ステップと、
前記被覆表の残りのいずれかの行が被覆する列の集合が前記被覆表の残りの他の行の列の集合を包含するとき、該他の行を被支配行として選択削除する被支配行選択削除ステップと、
前記被支配行選択削除ステップにより前記被覆表に残った行について、特定の列を被覆する行の集合が別の列の行の集合を包含するとき、前記特定の列を支配列として選択削除する支配列選択削除ステップと、
前記被覆表に残った行について、前記特異列選択削除ステップから前記支配列選択削除ステップまでを前記被覆表の行が消滅するまで繰り返すステップと、
を備え、前記必須行を最終解として得ることを特徴とするテストパタン圧縮方法。
A test pattern compression method for exhaustively testing a program,
A test pattern generation step for automatically generating a test pattern for the test target program by using a model check in a formal method as a program to be tested, which describes a hardware implementation function as a system LSI ;
A branch control branch extraction step for extracting a control branch subject to a branch coverage from the test target program;
A coverage table configuration step for configuring a coverage table with a row of the test pattern including the redundant pattern generated in the test pattern generation step and the branch control branch extracted in the branch control branch extraction step as a column;
A singular column selection and deletion step of selectively deleting singular columns from the covering table;
A mandatory row selection and deletion step of saving the mandatory row as a mandatory row, including the singular column of the coverage table, and selectively deleting the mandatory row from the coverage table;
A mandatory row inclusion column selection deletion step of deleting the remaining columns included in the mandatory row;
When a set of columns covered by any of the remaining rows of the covering table includes a set of columns of the remaining other rows of the covering table, the controlled row that selectively deletes the other row as a controlled row A selective deletion step;
For a row remaining in the covering table by the controlled row selection / deletion step, when a set of rows covering a specific column includes a set of rows of another column, the specific column is selectively deleted as a supporting array. A branch arrangement selection deletion step;
Repeating the steps from the singular column selection and deletion step to the branch arrangement selection and deletion step until the rows of the coverage table disappear for the rows remaining in the coverage table;
A test pattern compression method comprising obtaining the essential row as a final solution.
プログラムのテストを無駄なく網羅的に行うためのテストパタン圧縮システムであって、
システムLSIとしてハードウェア化する機能を記述したプログラムをテスト対象プログラムとし、該テスト対象プログラムに対するテストパタンを形式手法におけるモデル検査を用いることにより自動生成するテストパタン生成装置と、
前記テスト対象プログラムから分岐網羅率の対象となる制御枝を抽出する分岐制御枝抽出装置と、
前記テストパタン生成装置で生成した冗長なパタンが含まれるテストパタンを行とし、前記分岐制御枝抽出装置で抽出した分岐制御枝を列とする被覆表を構成する被覆表構成装置と、
前記被覆表から特異列を選択削除する特異列選択削除装置と、
前記被覆表の前記特異列を含む行を必須行として、該必須行を保存し、該必須行を前記被覆表から選択削除する必須行選択削除装置と、
前記必須行に包含される残りの列を削除する必須行包含列選択削除装置と、
前記被覆表の残りのいずれかの行が被覆する列の集合が前記被覆表の残りの他の行の列の集合を包含するとき、該他の行を被支配行として選択削除する被支配行選択削除装置と、
前記被支配行選択削除装置により前記被覆表に残った行について、特定の列を被覆する行の集合が別の列の行の集合を包含するとき、前記特定の列を支配列として選択削除する支配列選択削除装置と、
を備えることを特徴とするテストパタン圧縮システム。
A test pattern compression system for comprehensively testing programs without waste,
A test pattern generation device for automatically generating a test pattern for a test target program as a test target program by using a model check in a formal method as a program to be described as a system LSI hardware function ;
A branch control branch extraction device that extracts a control branch subject to a branch coverage from the test target program;
A coverage table constituting device that configures a coverage table in which the test pattern including the redundant pattern generated by the test pattern generation device is a row and the branch control branch extracted by the branch control branch extraction device is a column;
A singular column selective deletion device for selectively deleting a singular column from the covering table;
A mandatory row selection / deletion device that saves the mandatory row as a mandatory row, including the singular column of the coverage table, and selectively deletes the mandatory row from the coverage table;
A mandatory row inclusion column selective deletion device that deletes the remaining columns contained in the mandatory row;
When a set of columns covered by any of the remaining rows of the covering table includes a set of columns of the remaining other rows of the covering table, the controlled row that selectively deletes the other row as a controlled row A selective deletion device;
For a row remaining in the covering table by the controlled row selection / deletion device, when a set of rows covering a specific column includes a set of rows of another column, the specific column is selectively deleted as a supporting array. A support array selective deletion device;
A test pattern compression system comprising:
JP2009185405A 2009-08-10 2009-08-10 Test pattern compression method and test pattern compression system Expired - Fee Related JP5207314B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009185405A JP5207314B2 (en) 2009-08-10 2009-08-10 Test pattern compression method and test pattern compression system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009185405A JP5207314B2 (en) 2009-08-10 2009-08-10 Test pattern compression method and test pattern compression system

Publications (2)

Publication Number Publication Date
JP2011039718A JP2011039718A (en) 2011-02-24
JP5207314B2 true JP5207314B2 (en) 2013-06-12

Family

ID=43767433

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009185405A Expired - Fee Related JP5207314B2 (en) 2009-08-10 2009-08-10 Test pattern compression method and test pattern compression system

Country Status (1)

Country Link
JP (1) JP5207314B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5743663B2 (en) * 2011-04-13 2015-07-01 日本電気通信システム株式会社 Test support system, test support method, and program
JP6003699B2 (en) 2013-02-08 2016-10-05 富士通株式会社 Test data generation program, method and apparatus
JP6144220B2 (en) * 2014-03-05 2017-06-07 西日本電信電話株式会社 How to verify the program

Also Published As

Publication number Publication date
JP2011039718A (en) 2011-02-24

Similar Documents

Publication Publication Date Title
CN104503917A (en) Method and system for analyzing change impact domain based on data flow function invoking path
US8875077B1 (en) Fault sensitivity analysis-based cell-aware automated test pattern generation flow
US8578309B2 (en) Format conversion from value change dump (VCD) to universal verification methodology (UVM)
US9235669B2 (en) Method and an apparatus for automatic processor design and verification
CN103365699A (en) System API and running character string extraction method and system based on APK
JP5207314B2 (en) Test pattern compression method and test pattern compression system
US20200019664A1 (en) Automated coverage convergence by correlating random variables with coverage variables sampled from simulation result data
JP6577914B2 (en) Business process generation program and business process generation method
US9626468B2 (en) Assertion extraction from design and its signal traces
CN103049374B (en) Automatic testing method and device
CN108572892B (en) PowerPC multi-core processor-based offline test method and device
US20150234966A1 (en) Method and an apparatus for automatic generation of verification environment for processor design and verification
CN105512372B (en) The data processing onboard emulation test method of modelling
Bozzoli et al. COMET: a configuration memory tool to analyze, visualize and manipulate FPGAs bitstream
CN104536880B (en) Gui program test case amplification method based on semiology analysis
El Mandouh et al. Accelerating the debugging of fv traces using k-means clustering techniques
CN109144806B (en) Function verification method and device for register transmission stage circuit
JP5463226B2 (en) Source code inspection method and source code inspection apparatus
KR20120000320A (en) Method generating test case for program error check
JP6574151B2 (en) Program analysis apparatus, program analysis method, and program analysis program
JPWO2016151710A1 (en) Specification configuration apparatus and method
US9703920B2 (en) Intra-run design decision process for circuit synthesis
JP2015069400A (en) Software test system
KR101934163B1 (en) Method and System for Selecting Automated Code-based Regression Test Item for Software Product Line
Wu et al. Improve transition fault diagnosability via observation point insertion

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110802

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130125

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130213

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130213

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160301

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5207314

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees