JP2009116643A - Device, method and program for controlling inspection time - Google Patents

Device, method and program for controlling inspection time Download PDF

Info

Publication number
JP2009116643A
JP2009116643A JP2007289334A JP2007289334A JP2009116643A JP 2009116643 A JP2009116643 A JP 2009116643A JP 2007289334 A JP2007289334 A JP 2007289334A JP 2007289334 A JP2007289334 A JP 2007289334A JP 2009116643 A JP2009116643 A JP 2009116643A
Authority
JP
Japan
Prior art keywords
inspection
search
time
depth
expected
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.)
Granted
Application number
JP2007289334A
Other languages
Japanese (ja)
Other versions
JP4947427B2 (en
Inventor
Takayuki Imoto
崇之 井元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2007289334A priority Critical patent/JP4947427B2/en
Publication of JP2009116643A publication Critical patent/JP2009116643A/en
Application granted granted Critical
Publication of JP4947427B2 publication Critical patent/JP4947427B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To previously detect that a program inspection is not completed within an inspection time limit allocated to the program to be inspected before the inspection time limit elapses, thereby terminating the inspection at the time when detected. <P>SOLUTION: A device for controlling an inspection time includes: a shortest search depth computation unit 32 for computing the shortest search depth that is required for transiting a state from an initial state of the program to a specification-satisfying state, which indicates that a program inspection specification is satisfied, among search depths for representing the number of times executing a program execution statement; an achievability inspection unit 13 for executing an inspection to check the possibility of transiting the state to the specification-satisfying state for every search depth to thereby output an inspection time according to the depth required for an inspection at each of search depth; and an estimated inspection time computation unit 41 for computing a specification-achieving estimation time everytime the achievability inspection unit completes inspection about each search depth. The achievability inspection unit terminates the inspection on the way, when the rest of the inspection time limits exceeds the specification-achieving estimation time, among the inspection time limits with respect to the program inspection. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、プログラム検証に関し、特にモデル検査手法のプログラム検証に関する。 The present invention relates to program verification, and more particularly to program verification of a model checking method.

ソフトウェアの検証方法として、形式的手法を応用したモデル検査手法が用いられている。モデル検査手法とは、Kripke構造の状態遷移において、計算木論理(CTL:Computation Tree Logic)で表された仕様を証明する状態集合が存在するか否かを検査する手法である。   As a software verification method, a model checking method applying a formal method is used. The model checking method is a method for checking whether or not there is a state set that proves a specification represented by a calculation tree logic (CTL) in the state transition of the Kripke structure.

従来のモデル検査方法について説明する。図1の従来のモデル検査装置は、検査対象プログラム1が検査仕様2を満たすことを証明するためのモデル検査(以下、検査)を、検査制限時間3の範囲内で行う。図2は、検査対象プログラム1の例を示している。図3は、検査仕様2の例を示している。
図2の検査対象プログラム1および、図3の検査仕様2を参照すると、検査仕様2は、検証プログラム1において、main関数が、INT範囲として取り得る任意の値からなるxを引数として受け取るとき、「L9のassert関数が実行されることがある。」ことを表す。なお、検査対象プログラム1と、検査仕様2と、検査制限時間3とは、従来の方法により外部から入力される。
A conventional model checking method will be described. The conventional model checking apparatus of FIG. 1 performs model checking (hereinafter referred to as inspection) for verifying that the inspection target program 1 satisfies the inspection specification 2 within the range of the inspection time limit 3. FIG. 2 shows an example of the inspection target program 1. FIG. 3 shows an example of the inspection specification 2.
Referring to the inspection target program 1 in FIG. 2 and the inspection specification 2 in FIG. 3, the inspection specification 2 is such that when the main function receives x as an argument in the verification program 1 as an arbitrary value that can be taken as an INT range, “L9 assert function may be executed.” The inspection target program 1, the inspection specification 2, and the inspection time limit 3 are input from the outside by a conventional method.

[従来装置の構成の説明]
従来のモデル検査装置の構成を説明する。図1は従来のモデル検査装置の構成を示している。図1のモデル検査装置は、検査処理部10と記憶装置20を備える。
検査処理部10及び記憶装置20は、図4に示すようなコンピュータにより実現される。図4を参照すると、検査処理部10と記憶装置20は、処理部100、記憶部200、入力部300、出力部400、通信部500をそれぞれ備える。それぞれの部位間は電気的に接続されている。処理部100はMPU(Micro Processing Unit)等で、記憶部200はRAM(Random Access Memory)やROM(Read Only Memory)等で、入力部300はキーボードやマウス等で、出力部400は液晶ディスプレイ等で、通信部500はLAN(Local Area Network)ポート等で、それぞれ実現される。検査処理部10と記憶装置20は、通信部500を介して接続されている。あるいは、検査処理部10と記憶装置20は、一つのコンピュータの中で実現される。従来のモデル検査装置の各機能は、検査対象プログラム1、検査仕様2、検査制限時間3に基づいて、記憶部200のRAMやROMに保存された処理用プログラムを、処理部100のMPU等が実行することによって実現される。
[Description of configuration of conventional device]
A configuration of a conventional model checking apparatus will be described. FIG. 1 shows the configuration of a conventional model checking apparatus. The model checking apparatus in FIG. 1 includes an inspection processing unit 10 and a storage device 20.
The inspection processing unit 10 and the storage device 20 are realized by a computer as shown in FIG. Referring to FIG. 4, the inspection processing unit 10 and the storage device 20 each include a processing unit 100, a storage unit 200, an input unit 300, an output unit 400, and a communication unit 500. Each part is electrically connected. The processing unit 100 is an MPU (Micro Processing Unit) or the like, the storage unit 200 is a RAM (Random Access Memory) or ROM (Read Only Memory), the input unit 300 is a keyboard, a mouse, or the like, and the output unit 400 is a liquid crystal display or the like. The communication unit 500 is realized by a LAN (Local Area Network) port or the like. The inspection processing unit 10 and the storage device 20 are connected via the communication unit 500. Alternatively, the inspection processing unit 10 and the storage device 20 are realized in one computer. Each function of the conventional model inspection apparatus is based on the inspection target program 1, the inspection specification 2, and the inspection time limit 3, and the processing program stored in the RAM or ROM of the storage unit 200 is stored in the MPU of the processing unit 100 or the like. It is realized by executing.

(検査処理部の説明)
まず、検査処理部10について説明する。検査処理部10は、記号モデル作成部11と、検査制御部12と、到達可能性検査部13と、検査結果出力部14を備える。
(Description of inspection processing unit)
First, the inspection processing unit 10 will be described. The inspection processing unit 10 includes a symbol model creation unit 11, an inspection control unit 12, a reachability inspection unit 13, and an inspection result output unit 14.

まず、記号モデル作成部11について説明する。記号モデル作成部11は、検査対象プログラム1と検査仕様2からKripke構造で構成する記号モデルを作成する。記号モデル作成部11は、非特許文献1に記載されているような従来の技術で、記号モデルの作成を行う。記号モデル作成部11は、作成した記号モデルを記憶装置20の記号モデル記憶部22へ保存する。   First, the symbol model creation unit 11 will be described. The symbol model creation unit 11 creates a symbol model having a Kripke structure from the inspection target program 1 and the inspection specification 2. The symbol model creation unit 11 creates a symbol model by a conventional technique as described in Non-Patent Document 1. The symbol model creation unit 11 stores the created symbol model in the symbol model storage unit 22 of the storage device 20.

図5は、記号モデル作成部11が、図2の検査対象プログラム1と図3の検査仕様2に基づいて作成したKripke構造で構成する記号モデルの例を示している。Kripke構造で構成する記号モデルは、状態の有限集合V、状態間の遷移関係R、初期状態の集合V0、検査仕様2の仕様を充足する仕様充足状態(以下、到達状態)の集合である到達状態集合Iとして、図5の式1のように定義できる。図3の検査対象プログラム1を記号モデルに変換した時の状態集合Vは、図5の式2のように表すことができる。式2において、右辺の前項は、プログラム1におけるラベルの集合をあらわしている。式2において、次項は、プログラム中の引数xを表している。状態間の遷移関係Rは、遷移前のラベル位置を表すpc、遷移前の引数xの値を表すd、プログラム実行文の実行による遷移後のラベル位置を表すpc’と、プログラム実行文の実行による遷移後の引数xの値を表すdとして、図5の式3で表すことができる。初期状態の集合Iは、図5の式4で表すことができる。検査仕様2の到達状態の集合Iは、図5の式5で表すことができる。   FIG. 5 shows an example of a symbol model configured by the Kripke structure created by the symbol model creation unit 11 based on the inspection target program 1 of FIG. 2 and the inspection specification 2 of FIG. A symbolic model configured with a Kripke structure is a reach of a finite set V of states, a transition relation R between states, a set V0 of initial states, and a specification satisfaction state (hereinafter, an arrival state) satisfying the specifications of the inspection specification 2. The state set I can be defined as in Equation 1 in FIG. A state set V when the inspection target program 1 in FIG. 3 is converted into a symbol model can be expressed as Equation 2 in FIG. In Equation 2, the previous term on the right side represents a set of labels in program 1. In Equation 2, the next term represents an argument x in the program. The transition relation R between the states is pc representing the label position before transition, d representing the value of the argument x before transition, pc ′ representing the label position after transition by execution of the program execution statement, and execution of the program execution statement As d which represents the value of the argument x after the transition according to, it can be expressed by Equation 3 in FIG. The set I in the initial state can be expressed by Equation 4 in FIG. The set I of the arrival states of the inspection specification 2 can be expressed by Equation 5 in FIG.

次に、検査制御部12について説明する。検査制御部12は、記号モデル作成部11が記号モデル記憶部22に保存した記号モデルを読み込み、検査制限時間3内で検査対象プログラム1の検査の実行するよう到達可能性検査部13へ命令する。検査制御部12は、検査制限時間3を外部から入力する。   Next, the inspection control unit 12 will be described. The inspection control unit 12 reads the symbol model stored in the symbol model storage unit 22 by the symbol model creation unit 11 and instructs the reachability inspection unit 13 to execute the inspection of the inspection target program 1 within the inspection time limit 3. . The inspection control unit 12 inputs the inspection time limit 3 from the outside.

次に、到達可能性検査部13について説明する。到達可能性検査部13は、検査制御部12からの命令に従って、検査対象プログラム1が検査仕様2を満たすか否かの検査を検査制限時間3内で実行する。   Next, the reachability inspection unit 13 will be described. The reachability inspection unit 13 executes an inspection within the inspection time limit 3 as to whether or not the inspection target program 1 satisfies the inspection specification 2 in accordance with an instruction from the inspection control unit 12.

図6は、図5の式1から式5で表すKripke構造の記号モデルを状態遷移図で表したものである。図6について説明する。四角は、検査対象プログラム1における各状態を表す。矢印は、各状態間の遷移を表す。四角内には、各状態における検査対象プログラム1のプログラム実行文のラベルと引数xとの組が示されている。矢印が表す遷移は、検査対象プログラム1のプログラム実行文の実行によって発生する。遷移は、プログラム実行文の実行前のラベルと引数xの値の組を表す状態から、プログラム実行文の実行後に変化したラベルと引数xの値の組を表す状態への移行を表す。   FIG. 6 is a state transition diagram showing a symbol model of the Kripke structure represented by Equations 1 to 5 in FIG. FIG. 6 will be described. A square represents each state in the inspection target program 1. Arrows represent transitions between the states. In the box, a set of the label of the program execution statement of the program 1 to be checked and the argument x in each state is shown. The transition indicated by the arrow is generated by executing the program execution statement of the inspection target program 1. The transition represents a transition from a state representing a label and argument x value pair before execution of the program execution statement to a state representing a label and argument x value pair changed after execution of the program execution statement.

図6を参照して、検査における状態間の遷移について説明する。例として、初期状態群集合V0において、ラベル(以下、L)が0で引数xが0である状態からの遷移を説明する。図2より、L0は、引数xを設定する処理を行うので、プログラム実行文のL0を実行すると、状態は(L0,0)から(L1,0)へ遷移する。(L1,0)は、L1において、引数xが0であることを意味する。図2より、L1は、引数xが0であるか否かを判定する処理を行う。引数xは0であるので、プログラム実行文L1を実行すると、状態は(L1,0)から(L6,0)へ遷移する。次に、図2より、L6は、引数xに3を加える処理を行う。そのため、プログラム実行文L6を実行すると、状態は(L6,0)から(L6,3)へ遷移する。このようにして、プログラム実行文を実行して状態遷移を行った結果、図3の検査仕様2が示す到達状態集合I「L9のassert関数が実行される」へ遷移することができれば、検査対象プログラム1が、検査仕様2を満たしていることが証明できる。   With reference to FIG. 6, the transition between the states in a test | inspection is demonstrated. As an example, a transition from a state where the label (hereinafter, L) is 0 and the argument x is 0 in the initial state group set V0 will be described. As shown in FIG. 2, L0 performs processing for setting the argument x. Therefore, when L0 of the program execution statement is executed, the state transitions from (L0,0) to (L1,0). (L1, 0) means that the argument x is 0 in L1. As shown in FIG. 2, L1 performs a process of determining whether or not the argument x is 0. Since the argument x is 0, when the program execution statement L1 is executed, the state transitions from (L1,0) to (L6,0). Next, referring to FIG. 2, L6 performs a process of adding 3 to the argument x. Therefore, when the program execution statement L6 is executed, the state transitions from (L6, 0) to (L6, 3). As a result of executing the state transition by executing the program execution statement in this way, if the transition to the arrival state set I “L9 assert function is executed” indicated by the inspection specification 2 in FIG. It can be proved that the program 1 satisfies the inspection specification 2.

到達可能性検査部13が実行する検査の方法を説明する。到達可能性検査部13は、初期状態集合V0からn回の遷移で到達できる各状態において、検査仕様2の到達状態集合Iが含まれているか否かを検査する。ここで、「初期状態集合V0からn回の遷移で到達できる各状態」を探索深度nとよぶ。プログラム実行文が実行されると、状態遷移が発生する。例えば、プログラム実行文が3回実行されると、初期状態から3回の状態遷移が発生する。この場合の各状態を探索深度3であるということができる。検査対象プログラム1の各プログラム実行文が実行される時にどのような引数を取るかによって、状態遷移で到達できる状態は変化する。到達可能性検査部13は、初期状態集合V0から探索深度nで到達できる各状態に、到達状態集合Iが含まれているかを検査する。   An inspection method performed by the reachability inspection unit 13 will be described. The reachability checking unit 13 checks whether or not the reachable state set I of the test specification 2 is included in each state that can be reached by n transitions from the initial state set V0. Here, “each state that can be reached by n transitions from the initial state set V0” is called a search depth n. When a program execution statement is executed, a state transition occurs. For example, when a program execution statement is executed three times, three state transitions from the initial state occur. Each state in this case can be said to be the search depth 3. The state that can be reached by the state transition changes depending on what argument is taken when each program execution statement of the inspection target program 1 is executed. The reachability check unit 13 checks whether or not the reachable state set I is included in each state that can be reached from the initial state set V0 at the search depth n.

検査開始にあたって、到達可能性検査部13は、記号モデル作成部11が記号モデル記憶部22に保存した記号モデルを読み込む。到達可能性検査部13は、初期状態として探索深度を0として検査を開始する。
到達可能性検査部13は、初期状態V0から探索深度nの遷移で到達することができる状態に、検査仕様2の到達状態集合Iが含まれていることが証明できた場合、検査対象プログラム1は、検査仕様2を満たすことを検査結果5に記録して検査結果出力部14へ出力する。
一方、到達可能性検査部13は、初期状態V0から探索深度nの遷移で到達することができる状態に、検査仕様2の到達状態集合Iが含まれておらず、探索深度nで新たに到達できる状態が他に存在しないときには、到達可能性検査部13は、探索深度をn+1に増やして検査を継続する。このように、到達可能性検査部13は、検査仕様2が証明されるまで探索深度を1づつ増加させて検査を繰り返す。到達可能性検査部13が行うこのような検査は、従来のプロパティ検証技術であって、特許文献1や非特許文献2に記載されている。
At the start of inspection, the reachability inspection unit 13 reads the symbol model stored in the symbol model storage unit 22 by the symbol model creation unit 11. The reachability inspection unit 13 starts the inspection with the search depth set to 0 as an initial state.
When the reachability checking unit 13 proves that the reachable state set I of the test specification 2 is included in the state that can be reached by the transition of the search depth n from the initial state V0, the test target program 1 Records that the inspection specification 2 is satisfied in the inspection result 5 and outputs it to the inspection result output unit 14.
On the other hand, the reachability checking unit 13 does not include the arrival state set I of the inspection specification 2 in the state that can be reached by the transition of the search depth n from the initial state V0, and newly arrives at the search depth n. When there is no other possible state, the reachability checking unit 13 increases the search depth to n + 1 and continues the check. In this manner, the reachability inspection unit 13 repeats the inspection by increasing the search depth by 1 until the inspection specification 2 is proved. Such an inspection performed by the reachability inspection unit 13 is a conventional property verification technique and is described in Patent Literature 1 and Non-Patent Literature 2.

また、到達可能性検査部13は、検査の開始からの経過した検査経過時間を測定している。到達可能性検査部13は、検査が完了する前に検査経過時間が検査制限時間3を経過してしまう場合は、検査経過時間が検査制限時間3の経過した時点で検査を終了する。この場合、到達可能性13は、検査制限時間3内で検査が完了しなかったことを検査結果5に記録して検査結果出力部14へ出力する。   In addition, the reachability inspection unit 13 measures the elapsed inspection time since the start of the inspection. When the inspection elapsed time has passed the inspection limit time 3 before the inspection is completed, the reachability inspection unit 13 ends the inspection when the inspection elapsed time has passed the inspection limitation time 3. In this case, the reachability 13 records in the inspection result 5 that the inspection has not been completed within the inspection time limit 3 and outputs it to the inspection result output unit 14.

次に、検査結果出力部14について説明する。検査結果出力部14は、到達可能性検査部13から入力した検査結果5を、検査の結果として外部装置へ出力する。   Next, the inspection result output unit 14 will be described. The inspection result output unit 14 outputs the inspection result 5 input from the reachability inspection unit 13 to the external device as the inspection result.

(記憶装置の説明)
次に、記憶装置20について説明する。記憶装置20は、記号モデル記憶部22を備える。
(Description of storage device)
Next, the storage device 20 will be described. The storage device 20 includes a symbol model storage unit 22.

記号モデル記憶部22について説明する。記号モデル記憶部22は、記号モデル作成部11が出力する記号モデルを保存する。   The symbol model storage unit 22 will be described. The symbol model storage unit 22 stores the symbol model output by the symbol model creation unit 11.

以上が、従来のモデル検査装置の構成説明である。   The above is the description of the configuration of the conventional model checking apparatus.

[従来装置の動作方法の説明]
次に、図7を使用して従来のモデル検査装置の動作方法を説明する。図7は、従来のモデル検査装置の動作方法を示している。
[Description of Operation Method of Conventional Device]
Next, an operation method of the conventional model checking apparatus will be described with reference to FIG. FIG. 7 shows an operation method of the conventional model checking apparatus.

(ステップA01)
検査処理部10の記号モデル作成部11は、外部から、検査対象プログラム1と検査仕様2を入力する。記号モデル作成部11は、検査対象プログラム1および検査仕様2に基づいて、記号モデルを作成する。記号モデル作成部11は、作成した記号モデルを記憶装置20の記号モデル記憶部22へ保存する。
(Step A01)
The symbol model creation unit 11 of the inspection processing unit 10 inputs the inspection target program 1 and the inspection specification 2 from the outside. The symbol model creation unit 11 creates a symbol model based on the inspection target program 1 and the inspection specification 2. The symbol model creation unit 11 stores the created symbol model in the symbol model storage unit 22 of the storage device 20.

(ステップA02)
検査処理部10の検査制御部12は、外部から検査制限時間3を入力する。検査制御部12は、記憶装置20の記号モデル記憶部22から記号モデルを読み込む。検査制御部12は、検査対象プログラム1が検査仕様2を満たすか否かの検査を検査制限時間3で実行するように到達可能性検査部13へ検査実行を命令する。
(Step A02)
The inspection control unit 12 of the inspection processing unit 10 inputs the inspection time limit 3 from the outside. The inspection control unit 12 reads a symbol model from the symbol model storage unit 22 of the storage device 20. The inspection control unit 12 instructs the reachability inspection unit 13 to execute the inspection so that the inspection whether the inspection target program 1 satisfies the inspection specification 2 is executed in the inspection time limit 3.

(ステップA03)
到達可能性検査部13は、検査制御部12からの検査実行の命令に従い、検査検査の開始にあたって、初期状態として探索深度n=0と設定する。
(Step A03)
The reachability inspection unit 13 sets the search depth n = 0 as an initial state at the start of the inspection inspection in accordance with the inspection execution instruction from the inspection control unit 12.

(ステップA04)
到達可能性検査部13は、初期状態集合V0から探索深度nの状態遷移で到達可能な各状態において、検査仕様2の到達状態集合Iが含まれているかの検査を実行する。また、到達可能性検査部13は、検査の開始と同時に検査の経過時間の測定を開始する。到達能性検査部13は、検査開始からの経過時間が検査制限時間3に到達した時点で検査を終了する。
(Step A04)
The reachability checking unit 13 checks whether or not the arrival state set I of the inspection specification 2 is included in each state that can be reached by the state transition of the search depth n from the initial state set V0. In addition, the reachability inspection unit 13 starts measuring the elapsed time of the inspection simultaneously with the start of the inspection. The reachability inspection unit 13 ends the inspection when the elapsed time from the start of the inspection reaches the inspection limit time 3.

(ステップA05)
到達可能性検査部13は、初期状態集合V0から探索深度nの状態遷移で到達可能な全ての状態において、到達状態集合Iが含まれているかを判定する。到達状態集合Iが含まれている場合は、ステップA06へ進む。到達状態集合Iが含まれていない場合は、ステップA07へ進む。
(Step A05)
The reachability check unit 13 determines whether or not the reachable state set I is included in all the states that can be reached by the state transition of the search depth n from the initial state set V0. When the arrival state set I is included, the process proceeds to step A06. If the arrival state set I is not included, the process proceeds to step A07.

(ステップA06)
探索深度nにおいて到達状態集合Iが含まれている場合、到達可能性検査部13は、検査対象プログラム1が検査仕様2を満たすことを検査結果5に記録して、検査結果出力部14へ出力する。検査結果出力部14は、検査結果5を入力し、検査結果5を外部へ出力する。到達可能性検査部13は、検査制御部12へ検査対象プログラム1の検査完了を通知して検査を完了する。
(Step A06)
When the arrival state set I is included at the search depth n, the reachability checking unit 13 records that the inspection target program 1 satisfies the inspection specification 2 in the inspection result 5 and outputs it to the inspection result output unit 14 To do. The inspection result output unit 14 inputs the inspection result 5 and outputs the inspection result 5 to the outside. The reachability inspection unit 13 notifies the inspection control unit 12 of the completion of the inspection of the inspection target program 1 and completes the inspection.

(ステップA07)
探索深度nにおいて到達状態集合Iが含まれていない場合、到達可能性検査部13は、検査を継続する。到達可能性検査部13は、探索深度n=n+1としてステップA04へ戻る。
(Step A07)
When the arrival state set I is not included in the search depth n, the reachability check unit 13 continues the inspection. The reachability check unit 13 sets the search depth n = n + 1 and returns to Step A04.

以上が、従来の記号モデル検査装置における動作方法の説明である。このようにして、到達可能性検査部13は、探索深度nで到達状態集合Iに到達することができるかを、探索深度0回から開始してnを増やしながら検査を繰り返す。   The above is the description of the operation method in the conventional symbol model checking apparatus. In this way, the reachability checking unit 13 repeats the inspection while starting from the search depth 0 times and increasing n to determine whether the arrival state set I can be reached at the search depth n.

以上が、従来のモデル検査装置の説明である。   The above is the description of the conventional model checking apparatus.

従来のモデル検査手法は、検査時間の長短が把握できないという課題がある。これは、検査を開始する時点で検査仕様の証明に必要な探索深度が不明なことによる。実際に検査を行ってみないことには、どの探索深度まで検査を繰り返せば検査仕様が証明できるかが不明であるため検査時間が把握できない。
また、従来のモデル検査手法では、検査時間が非常に長くなるという課題がある。探索深度が深くなるほど状態数が指数的に増加する状態爆発の問題によって、検査そのものが完了しないという状況に至ることがある。
このため、従来のモデル検査手法においては、あらかじめ制限時間を設けており、制限時間内に検査が完了しない場合には、検査開始からの経過時間が制限時間に達した時点で、検査を途中で終了するという方法がとられている。
しかし、このような方法は、仮に検査が膨大な時間を要するものであったとしても、制限時間の上限値まで検査を続ける以外に、検査が完了するか否かの判定がつかないという課題も存在する。つまり、元々、膨大な時間が掛かる可能性が高い検査であるにもかかわらず、実際に膨大な時間をかけて制限時間を使い切ってみて初めて、検証が完了しないことがわかるということである。特許文献2ならびに特許文献3には、モデル検査手法における検査時間を制御する例が開示されている。
特開2003−030270号公報 特開2004−005674号公報 特開平10−063537号公報 「抽象化を用いた検証ツールの調査」田辺良則、高井利憲、高橋孝一 産業技術総合研究所システム検証研究センター テクニカルレポート PS−2003−007,2003 「論理関数処理に基づく形式的検証手法」平石裕実、浜口清治、情報処理 Vol.35(8),1994
The conventional model checking method has a problem that the length of the checking time cannot be grasped. This is because the search depth necessary for proof of the inspection specification is unknown at the time of starting the inspection. If the inspection is not actually performed, the inspection time cannot be grasped because it is unclear whether the inspection specification can be proved by repeating the inspection to what search depth.
Further, the conventional model checking method has a problem that the checking time becomes very long. Due to the problem of state explosion where the number of states increases exponentially as the search depth increases, the situation can be such that the inspection itself is not completed.
For this reason, in the conventional model inspection method, a time limit is set in advance, and if the inspection is not completed within the time limit, the inspection is halfway when the elapsed time from the start of the inspection reaches the time limit. The method of ending is taken.
However, even if such a method requires a huge amount of time, there is a problem that it is impossible to determine whether or not the inspection is completed other than continuing the inspection up to the upper limit of the time limit. Exists. In other words, it is understood that the verification is not completed only after the time limit is actually used up over an enormous amount of time, even though the test is likely to take an enormous amount of time. Patent Document 2 and Patent Document 3 disclose examples of controlling the inspection time in the model inspection method.
JP 2003-030270 A JP 2004-005674 A JP-A-10-063537 “Investigation of verification tools using abstraction” Yoshinori Tanabe, Toshinori Takai, Koichi Takahashi Technical Report PS-2003-007, 2003 “Formal Verification Method Based on Logical Function Processing” Hiromi Hiraishi, Kiyoji Hamaguchi, Information Processing Vol. 35 (8), 1994

本発明の目的は、検査対象のプログラムに割り当てられた検査制限時間内に当該プログラムの検査が完了しないことを、検査制限時間が経過するより以前に検知し、検知した時点で検査を終了することが可能な検査時間制御装置を提供することである。   The object of the present invention is to detect that the inspection of the program is not completed within the inspection time limit assigned to the program to be inspected before the inspection time limit elapses, and end the inspection at the time of detection. It is to provide an inspection time control device capable of performing the above.

本発明の検査時間制御装置は、検査の対象であるプログラムの実行文を実行した回数を表す探索深度のうち、プログラムの初期状態からプログラムの検査仕様を満たすことを示す仕様充足状態へ状態を遷移するために要する最短探索深度を算出する最短探索深度算出部と、プログラムにおいて、探索深度毎に仕様充足状態へ状態を遷移することが可能であるかの検査を実行し、探索深度の各々における検査に要した深度別検査時間を出力する到達可能性検査部と、到達可能性検査部が各探索深度について検査を完了する毎に、最短探索深度まで検査を完了するために要する予想時間である仕様到達予想時間を算出する予想検査時間算出部を備え、到達可能性検査部は、プログラムの検査に対する検査制限時間のうち残りの残検査制限時間を仕様到達予想時間が超過する場合には、検査を途中で終了する。   The inspection time control device of the present invention changes the state from the initial state of the program to the specification satisfaction state indicating that the inspection specification of the program is satisfied, out of the search depth indicating the number of times the execution statement of the program to be inspected is executed. In the program, the shortest search depth calculation unit that calculates the shortest search depth required to perform a check to determine whether it is possible to change the state to the specification satisfaction state for each search depth, and to check each search depth A reachability inspection unit that outputs the inspection time according to depth required for each and a specification that is the expected time required to complete the inspection to the shortest search depth every time the reachability inspection unit completes the inspection for each search depth An expected inspection time calculation unit for calculating the expected arrival time is provided, and the reachability inspection unit provides the remaining remaining inspection time limit of the inspection time limit for the program inspection. If the estimated arrival time exceeds ends prematurely inspection.

本発明の検査時間制御方法は、
検査の対象であるプログラムの実行文を実行した回数を表す探索深度のうち、プログラムの初期状態からプログラムの検査仕様を満たすことを示す仕様充足状態へ状態を遷移するために要する最短探索深度を算出する最短探索深度算出ステップと、
プログラムにおいて、探索深度毎に仕様充足状態へ状態を遷移することが可能であるかの検査を実行する検査実行ステップと、
探索深度の各々における検査に要した深度別検査時間を出力する深度別検査時間出力ステップと、
到達可能性検査部が各探索深度について検査を完了する毎に、最短探索深度まで検査を完了するために要する予想時間である仕様到達予想時間を算出する予想時間算出ステップと、
到達可能性検査部は、プログラムの検査に対する検査制限時間のうち残りの残検査制限時間を仕様到達予想時間が超過する場合には、検査を途中で終了する検査終了ステップとを備える。
The inspection time control method of the present invention includes:
Calculates the shortest search depth required to change the state from the initial state of the program to the specification satisfaction state indicating that the inspection specification of the program is satisfied, among the search depths indicating the number of times the executable statement of the program to be inspected is executed The shortest search depth calculation step,
In the program, an inspection execution step for executing an inspection of whether it is possible to change the state to the specification satisfaction state for each search depth;
An inspection time output step by depth for outputting the inspection time by depth required for the inspection at each of the search depths;
Each time the reachability inspection unit completes the inspection for each search depth, an expected time calculation step of calculating a specification arrival time that is an expected time required to complete the inspection to the shortest search depth;
The reachability inspection unit includes an inspection end step for ending the inspection halfway when the specification arrival expected time exceeds the remaining remaining inspection time limit of the inspection time limit for the inspection of the program.

本発明のプログラムは、上述の検査時間制御方法をコンピュータによって実現する。   The program of the present invention realizes the above-described inspection time control method by a computer.

本発明によれば、検査対象のプログラムに割り当てられた検査制限時間内に当該プログラムの検査が完了しないことを、検査性制限時間が経過するより以前に検知し、検知した時点で検査を終了することが可能となるため、検査制限時間を使い切っても当該プログラムの検査が完了しない状態を未然に防ぐことができ、検査時間の効率化を図ることができる。   According to the present invention, it is detected that the inspection of the program is not completed within the inspection time limit assigned to the program to be inspected before the inspection time limit elapses, and the inspection is terminated at the time of detection. Therefore, it is possible to prevent the state where the inspection of the program is not completed even if the inspection time limit is used up, and the inspection time can be made more efficient.

添付図面を参照して、本発明による検査時間制御装置を実施するための最良の形態としての一実施例を、以下に説明する。   An embodiment as the best mode for carrying out an inspection time control apparatus according to the present invention will be described below with reference to the accompanying drawings.

図8は、本発明の本実施例の検査時間制御装置を示している。図8のモデル検査時間制御装置は、検査対象プログラム1が検査仕様2を満たすことを証明するためのモデル検査(以下、検査)を、検査制限時間3の範囲内で行う。
本実施例の説明において、検査対象プログラム1および検査仕様2は、従来のモデル検査装置の説明と同様のものである。図2は、検査対象プログラム1の例を示している。図3は、検査仕様2の例を示している。従来のモデル検査装置の説明と同様に、図2の検査対象プログラム1および、図3の検査仕様2を参照すると、検査仕様2は、検証プログラム1において、main関数が、INT範囲として取り得る任意値からなるxを引数として受け取るとき、「L9のassert関数が実行されることがある。」ことを表す。なお、検査対象プログラム1と、検査仕様2と、検査制限時間3とは、外部装置から、モデル検査時間制御装置の構成部位へ入力される。
FIG. 8 shows an inspection time control apparatus according to this embodiment of the present invention. The model checking time control device in FIG. 8 performs model checking (hereinafter referred to as checking) for verifying that the checking target program 1 satisfies the checking specification 2 within the range of the checking time limit 3.
In the description of this embodiment, the inspection target program 1 and the inspection specification 2 are the same as those of the conventional model inspection apparatus. FIG. 2 shows an example of the inspection target program 1. FIG. 3 shows an example of the inspection specification 2. Similar to the description of the conventional model checking apparatus, referring to the inspection target program 1 in FIG. 2 and the inspection specification 2 in FIG. 3, the inspection specification 2 is an arbitrary value that the main function can take as an INT range in the verification program 1. When x consisting of a value is received as an argument, it indicates that “the L9 assert function may be executed”. The inspection target program 1, the inspection specification 2, and the inspection time limit 3 are input from an external device to the constituent parts of the model inspection time control device.

[構成の説明]
図8を使用して、本実施例のモデル時間制御装置の構成を説明する。本実施例のモデル検査時間制御装置は、検査処理部10と、記憶装置20と、深度算出部30と、時間算出部40とを備える。検査処理部10、記憶装置20、深度算出部30及び時間算出部40は、図9に示すような従来のコンピュータにより実現される。検査処理部10、記憶装置20、深度算出部30及び時間算出部40は、処理部100、記憶部200、入力部300、出力部400、通信部500をそれぞれ備える。処理部100はMPU(Micro Processing Unit)等で、記憶部200はRAM(Random Access Memory)やROM(Read Only Memory)等で、入力部300はキーボードやマウス等で、出力部400は液晶ディスプレイ等で、通信部500はLAN(Local Area Netword)ポート等で、それぞれ実現される。本発明のモデル検査時間制御装置の各機能は、外部から入力される、検査対象プログラム1、検査仕様2、検査制限時間3に基づいて、記憶部200のRAMやROM等に保存された処理用プログラムを、処理部100のMPU等が実行することによって実現する。検査処理部10と、記憶装置20と、深度算出部30と、時間算出部40の各部位は、有線通信技術あるいは無線通信技術によって接続されている。これらは、直接的に接続されていてもよいし、ネットワークを介して接続されていてもよい。これらは、従来のデータ通信技術によって実現される。また、検査処理部10と、記憶装置20と、深度算出部30と、時間算出部40の各部位は、一つのコンピュータの中で実現されてもよい。
[Description of configuration]
The configuration of the model time control device of this embodiment will be described with reference to FIG. The model checking time control apparatus according to this embodiment includes an checking processing unit 10, a storage device 20, a depth calculating unit 30, and a time calculating unit 40. The inspection processing unit 10, the storage device 20, the depth calculation unit 30, and the time calculation unit 40 are realized by a conventional computer as shown in FIG. The inspection processing unit 10, the storage device 20, the depth calculation unit 30, and the time calculation unit 40 each include a processing unit 100, a storage unit 200, an input unit 300, an output unit 400, and a communication unit 500. The processing unit 100 is an MPU (Micro Processing Unit) or the like, the storage unit 200 is a RAM (Random Access Memory) or ROM (Read Only Memory), the input unit 300 is a keyboard, a mouse, or the like, and the output unit 400 is a liquid crystal display or the like. The communication unit 500 is realized by a LAN (Local Area Netword) port or the like. Each function of the model inspection time control device of the present invention is for processing stored in the RAM, ROM, or the like of the storage unit 200 based on the inspection target program 1, inspection specification 2, and inspection time limit 3 input from the outside. The program is realized by the MPU or the like of the processing unit 100 executing the program. Each part of the inspection processing unit 10, the storage device 20, the depth calculation unit 30, and the time calculation unit 40 is connected by wired communication technology or wireless communication technology. These may be directly connected or may be connected via a network. These are realized by conventional data communication technology. Moreover, each part of the test | inspection process part 10, the memory | storage device 20, the depth calculation part 30, and the time calculation part 40 may be implement | achieved in one computer.

(検査処理部の説明)
まず、検査処理部10について説明する。検査処理部10は、記号モデル作成部11と、検査制御部12と、到達可能性検査部13と、検査結果出力部14を備える。
(Description of inspection processing unit)
First, the inspection processing unit 10 will be described. The inspection processing unit 10 includes a symbol model creation unit 11, an inspection control unit 12, a reachability inspection unit 13, and an inspection result output unit 14.

まず、記号モデル作成部11について説明する。記号モデル作成部11は、検査対象プログラム1と検査仕様2からKripke構造で構成する記号モデルを作成する。記号モデル作成部11は、非特許文献1に記載されているような従来の技術で、記号モデルの作成を行う。記号モデル作成部11は、作成した記号モデルを記憶装置20の記号モデル記憶部22へ保存する。図5は、記号モデル作成部11が、図2の検査対象プログラム1と図3の検査仕様2に基づいて作成したKripke構造で構成する記号モデルの例を示している。図5に示した、Kripke構造で構成する記号モデルの例に関する説明は、前述した従来のモデル検査装置の説明と同様であるので省略する。   First, the symbol model creation unit 11 will be described. The symbol model creation unit 11 creates a symbol model having a Kripke structure from the inspection target program 1 and the inspection specification 2. The symbol model creation unit 11 creates a symbol model by a conventional technique as described in Non-Patent Document 1. The symbol model creation unit 11 stores the created symbol model in the symbol model storage unit 22 of the storage device 20. FIG. 5 shows an example of a symbol model configured by the Kripke structure created by the symbol model creation unit 11 based on the inspection target program 1 of FIG. 2 and the inspection specification 2 of FIG. The description of the example of the symbol model configured with the Kripke structure shown in FIG. 5 is the same as the description of the conventional model checking apparatus described above, and will be omitted.

次に、検査制御部12について説明する。検査制御部12は、記号モデル作成部11が記号モデル記憶部22に保存した記号モデルを読み込み、検査制限時間3内で検査対象プログラム1の検査の実行するよう到達可能性検査部13へ命令する。検査制御部12は、検査制限時間3を外部から入力する。
また、時間算出部40の予想検査時間算出部41が当該検査は検査制限時間3内に完了しないと判定し、予想検査時間算出部41が後述する検査完了不可通知を出力した場合には、検査制御部12は、検査完了不可通知を入力して、到達可能性検査部13へ検査終了命令を行う。この場合、到達可能性検査部13は、検査終了令を受けて当該検査を終了する。
Next, the inspection control unit 12 will be described. The inspection control unit 12 reads the symbol model stored in the symbol model storage unit 22 by the symbol model creation unit 11 and instructs the reachability inspection unit 13 to execute the inspection of the inspection target program 1 within the inspection time limit 3. . The inspection control unit 12 inputs the inspection time limit 3 from the outside.
In addition, when the expected examination time calculation unit 41 of the time calculation unit 40 determines that the examination is not completed within the examination time limit 3 and the expected examination time calculation unit 41 outputs a test completion failure notification described later, The control unit 12 inputs a test completion failure notification and issues a test end command to the reachability test unit 13. In this case, the reachability inspection unit 13 receives the inspection end order and ends the inspection.

次に、到達可能性検査部13について説明する。到達可能性検査部13は、検査制御部12からの命令に従って、検査対象プログラム1が検査仕様2を満たすか否かの検査を検査制限時間3内で実行する。図6は、図5の式1から式5で表すKripke構造の記号モデルを状態遷移図で表したものである。図6についての説明と、プログラム実行文を実行することによる状態間の遷移ついての説明と、到達可能性検査部13の検査方法についての説明は、前述した従来のモデル検査装置の説明と同様であるので省略する。到達可能性検査部13が行う検査は、従来のプロパティ検証技術であって、特許文献1や非特許文献2に記載されている。   Next, the reachability inspection unit 13 will be described. The reachability inspection unit 13 executes an inspection within the inspection time limit 3 as to whether or not the inspection target program 1 satisfies the inspection specification 2 in accordance with an instruction from the inspection control unit 12. FIG. 6 is a state transition diagram showing a symbol model of the Kripke structure represented by Equations 1 to 5 in FIG. The explanation about FIG. 6, the explanation about the transition between the states by executing the program execution statement, and the explanation about the inspection method of the reachability checking unit 13 are the same as the explanation of the conventional model checking apparatus described above. I will omit it. The inspection performed by the reachability inspection unit 13 is a conventional property verification technique and is described in Patent Literature 1 and Non-Patent Literature 2.

検査を実行した結果、初期状態集合V0から探索深度nの状態遷移で到達することができる状態に、検査仕様2の仕様を充足する仕様充足状態(以下、到達状態)の集合である到達状態集合Iが含まれている場合、到達可能性検査部13は、検査対象プログラム1が検査仕様2を満たすことを検査結果5に記録して検査結果出力部14へ出力する。
一方、初期状態集合V0から探索深度nの状態遷移で到達することができる状態に、検査仕様2の到達状態集合Iがふくまれておらず、探索深度nの状態遷移で新たに到達できる状態が他に存在しない場合、到達可能性検査部13は、探索深度をn+1に増やして検査を継続する。
また、検査制御部12から検査終了命令を受けた場合、到達可能性検査部13は、検査終了命令を受けた時点で検査を終了する。この場合、到達可能性検査部13は、検査終了命令により検査を終了したこと記録した検査結果5を検査結果出力部14へ出力する。
As a result of the inspection, an arrival state set, which is a set of specification satisfaction states (hereinafter referred to as arrival states) satisfying the specification of the inspection specification 2 to a state that can be reached from the initial state set V0 by the state transition of the search depth n. When I is included, the reachability inspection unit 13 records that the inspection target program 1 satisfies the inspection specification 2 in the inspection result 5 and outputs it to the inspection result output unit 14.
On the other hand, the arrival state set I of the inspection specification 2 is not included in the state that can be reached by the state transition of the search depth n from the initial state set V0, and the state that can be newly reached by the state transition of the search depth n. If there is no other, the reachability check unit 13 increases the search depth to n + 1 and continues the check.
Further, when the inspection end command is received from the inspection control unit 12, the reachability inspection unit 13 ends the inspection when the inspection end command is received. In this case, the reachability inspection unit 13 outputs the inspection result 5 in which the inspection is ended by the inspection end instruction to the inspection result output unit 14.

到達可能性検査部13は、検査開始からの経過時間を測定する。検査が完了する前に、検査開始からの経過時間が検査制限時間3に到達した場合、到達可能性検査部13は、その時点で検査を終了する。到達可能性検査部13は、検査制限時間3を使い切ったため検査を終了したことを記録した検査結果5を検査結果出力部14へ出力する。
さらに、本実施例において到達可能性検査部13は、探索深度n毎の検査に要した探索時間を測定する。到達可能性検査部13は、探索深度nにおける検査処理を完了する毎に、探索深度nにおいて検査に要した探索時間を、探索深度nに対応させて、記憶装置20の探索時間記憶部24へ保存する。
The reachability inspection unit 13 measures an elapsed time from the start of the inspection. If the elapsed time from the start of the inspection reaches the inspection limit time 3 before the inspection is completed, the reachability inspection unit 13 ends the inspection at that time. The reachability inspection unit 13 outputs to the inspection result output unit 14 the inspection result 5 that records that the inspection has been completed because the inspection time limit 3 has been used up.
Furthermore, in this embodiment, the reachability inspection unit 13 measures the search time required for the inspection for each search depth n. Each time the inspection process at the search depth n is completed, the reachability inspection unit 13 associates the search time required for the inspection at the search depth n with the search depth n to the search time storage unit 24 of the storage device 20. save.

次に、検査結果出力部14の説明をする。検査結果出力部14は、到達可能性検査部13から入力する検査結果5を、検査の結果として外部装置へ出力する。なお、検査結果5の形式については、本実施例において特に限定しない。これらは従来のデータ形式により技術により実現されるものである。   Next, the inspection result output unit 14 will be described. The inspection result output unit 14 outputs the inspection result 5 input from the reachability inspection unit 13 to the external device as the inspection result. The format of the inspection result 5 is not particularly limited in the present embodiment. These are realized by technology using conventional data formats.

(深度算出部の説明)
次に、深度算出部30について説明する。深度算出部30は、状態遷移モデル作成部31と最短探索深度算出部32を備える。
(Description of depth calculation unit)
Next, the depth calculation unit 30 will be described. The depth calculation unit 30 includes a state transition model creation unit 31 and a shortest search depth calculation unit 32.

まず、状態遷移モデル作成部31について説明する。状態遷移モデル作成部31は、検査対象プログラム1と検査仕様2を読み込み、コントロールフローグラフで表す状態遷移モデルを作成する。状態遷移モデル作成部31が検査対象プログラム1から状態遷移モデルを作成する処理は、コンパイラなどで一般的に使用されるプログラムからコントロールフローグラフを作成するための従来技術によって行われる。状態遷移モデル作成部31は、作成した状態遷移モデルを、記憶装置20の状態遷移モデル記憶部21へ保存する。   First, the state transition model creation unit 31 will be described. The state transition model creation unit 31 reads the inspection target program 1 and the inspection specification 2 and creates a state transition model represented by a control flow graph. The process in which the state transition model creation unit 31 creates the state transition model from the inspection target program 1 is performed by a conventional technique for creating a control flow graph from a program generally used by a compiler or the like. The state transition model creation unit 31 stores the created state transition model in the state transition model storage unit 21 of the storage device 20.

次に、最短探索深度算出部32について説明する。最短探索深度算出部32は、状態遷移モデル作成部31が作成した状態遷移モデルから最短探索深度Nを算出する。最短探索深度算出部32は、状態遷移モデル記憶部21から状態遷移モデルを読み込む。最短探索深度算出部32は、状態遷移モデル上で条件分岐の条件を無視した有効グラフとして、初期状態から検査仕様2が示す到達状態への最短経路の状態遷移数を求める。最短探索深度Nは、初期状態集合V0から検査仕様2の要求する到達状態へ到達するために最低必要な探索深度を意味する。最短探索深度算出部32は、ダイクストラ法等の従来技術により有効グラフにおける最短経路を算出する。最短探索深度算出部32は、算出した最短探索深度Nを記憶装置20の最短探索深度記憶部23に保存する。   Next, the shortest search depth calculation unit 32 will be described. The shortest search depth calculation unit 32 calculates the shortest search depth N from the state transition model created by the state transition model creation unit 31. The shortest search depth calculation unit 32 reads a state transition model from the state transition model storage unit 21. The shortest search depth calculation unit 32 obtains the number of state transitions of the shortest path from the initial state to the arrival state indicated by the inspection specification 2 as an effective graph ignoring the condition branch condition on the state transition model. The shortest search depth N means the minimum search depth required to reach the arrival state required by the inspection specification 2 from the initial state set V0. The shortest search depth calculation unit 32 calculates the shortest path in the effective graph by a conventional technique such as the Dijkstra method. The shortest search depth calculation unit 32 stores the calculated shortest search depth N in the shortest search depth storage unit 23 of the storage device 20.

図10を使用して、本実施例における最短探索深度Nの算出方法を説明する。図10は、状態遷移モデル作成部31が図2の検査対象プログラム1と検査仕様2から作成した状態遷移モデルを表している。図10に示されている四角は、検査対象プログラム1において取りうる各状態である。各状態は、検査対象プログラム1の各プログラム実行文のラベル(L0〜L9)位置を表している。また、図10に示されている状態から状態への矢印は、状態から状態への状態遷移を表す。状態から状態への状態遷移は、検査対象プログラム1において、プログラム実行文を実行することによって発生する。プログラム実行文の実行によって、プログラム実行文を実行前のラベル位置の状態から、プログラム実行文を実行後のラベル位置の状態へ状態遷移する。検査対象プログラム1内のIF文は、遷移における遷移条件として表されている。検査仕様2の「assert関数が実行されることがある。」は、「開始時の状態L0から状態L9へ到達する経路が存在する。」ことを意味する。   The calculation method of the shortest search depth N in a present Example is demonstrated using FIG. FIG. 10 shows a state transition model created by the state transition model creation unit 31 from the inspection target program 1 and the inspection specification 2 of FIG. Squares shown in FIG. 10 are states that can be taken in the inspection target program 1. Each state represents a label (L0 to L9) position of each program execution statement of the inspection target program 1. Moreover, the arrow from the state to the state shown in FIG. 10 represents the state transition from the state to the state. A state transition from state to state occurs by executing a program execution statement in the inspection target program 1. By executing the program execution statement, a state transition is made from the state of the label position before the execution of the program execution statement to the state of the label position after the execution of the program execution statement. The IF statement in the inspection target program 1 is represented as a transition condition in transition. “Assert function may be executed” in the inspection specification 2 means that “there is a path from the start state L0 to the state L9”.

次に、図10において、初期状態(図10においてL0)から検査対象プログラム1の検査仕様2が示す到達状態(図10においてL9)へ状態遷移するために最低限必要なプログラム実行回数の算出について説明する。最短探索深度算出部32は、分岐条件の条件を無視した有効グラフとして、プログラム開始位置L0から検査仕様2が示す到達状態であるL9への最短経路をもとめる。この最短経路は、検査対象プログラム1において、初期状態から検査仕様2が示す到達状態に到達するまでに最低限必要な状態遷移数であり、検査対象プログラム1における最低限必要なプログラム実行文の実行回数である。検査対象プログラム1の各状態における条件分岐がいかなるものであろうとも、この状態遷移数より少ない状態遷移数で初期状態から検査仕様2が示す到達状態へ到達することはできない。同様に、この実行回数より少ないプログラム実行文の実行回数で、初期状態から検査仕様2が示す到達状態へ到達することはできない。このプログラム実行文の実行回数である状態遷移数が最短探索深度Nとなる。
図10において、分岐条件の条件を無視した有効グラフとして考える場合、初期状態のL0から検査仕様2が示す到達状態のL9への最短経路は、L0からL1、L6、L7、L8、L9と遷移する経路となる。この最短経路は、状態間を5回遷移している。これにより、検査対象プログラム1において初期状態から検査仕様2が示す到達状態への最短探索深度Nは「N=5」となる。
Next, in FIG. 10, calculation of the minimum number of program executions required for state transition from the initial state (L0 in FIG. 10) to the arrival state (L9 in FIG. 10) indicated by the inspection specification 2 of the inspection target program 1 is performed. explain. The shortest search depth calculation unit 32 finds the shortest path from the program start position L0 to L9, which is the arrival state indicated by the inspection specification 2, as an effective graph ignoring the condition of the branch condition. This shortest path is the minimum number of state transitions required to reach the arrival state indicated by the inspection specification 2 from the initial state in the inspection target program 1, and the execution of the minimum necessary program execution statement in the inspection target program 1 Is the number of times. Whatever the conditional branch in each state of the inspection target program 1, it is not possible to reach the arrival state indicated by the inspection specification 2 from the initial state with the number of state transitions smaller than the number of state transitions. Similarly, it is not possible to reach the arrival state indicated by the inspection specification 2 from the initial state with the number of executions of the program execution statement smaller than the number of executions. The number of state transitions, which is the number of executions of this program execution statement, is the shortest search depth N.
In FIG. 10, when considered as an effective graph ignoring the condition of the branch condition, the shortest path from L0 in the initial state to L9 in the arrival state indicated by the inspection specification 2 transitions from L0 to L1, L6, L7, L8, and L9. It becomes a route to do. This shortest path transitions between states five times. Thereby, the shortest search depth N from the initial state to the arrival state indicated by the inspection specification 2 in the inspection object program 1 is “N = 5”.

(時間算出部の説明)
次に、時間算出部40の説明をする。時間算出部40は、予想検査時間算出部41を備える。
(Explanation of time calculator)
Next, the time calculation unit 40 will be described. The time calculation unit 40 includes an expected examination time calculation unit 41.

予想検査時間算出部41について説明する。予想検査時間算出部41は、最短探索深度Nまでの検査が検査制限時間3内に完了する否かを判定する。
以下に、予想検査時間算出部41が行う判定方法を説明する。まず、予想検査時間算出部41は、到達可能性検査部13が探索深度nの検査を完了する毎に、仕様到達予想時間を算出する。仕様到達予想時間とは、到達可能性検査部13が探索深度nの検査を完了した時点で、探索深度n+1から最短探索深度Nまでの検査に必要と予想する残り時間である。予想検査時間算出部41は、記憶装置20の探索時間記憶部24に保存された探索深度毎の探索時間と、記憶装置20の最短探索深度記憶部23に保存された最短探索深度Nとに基づいて、仕様到達予想時間を算出する。
The expected inspection time calculation unit 41 will be described. The expected inspection time calculation unit 41 determines whether the inspection up to the shortest search depth N is completed within the inspection time limit 3.
Hereinafter, a determination method performed by the expected inspection time calculation unit 41 will be described. First, the expected inspection time calculation unit 41 calculates the expected specification arrival time each time the reachability inspection unit 13 completes the inspection at the search depth n. The specification arrival expected time is the remaining time that is expected to be required for the inspection from the search depth n + 1 to the shortest search depth N when the reachability inspection unit 13 completes the inspection of the search depth n. The expected examination time calculation unit 41 is based on the search time for each search depth stored in the search time storage unit 24 of the storage device 20 and the shortest search depth N stored in the shortest search depth storage unit 23 of the storage device 20. Then, the expected specification arrival time is calculated.

次に、予想検査時間算出部41は、検査制限時間3から、検査開始から現在までの経過時間を減算した残りの検査制限時間3(以下、残検査制限時間)を算出する。検査開始から現在まで経過した経過時間は、探索深度n=0とした検査初期状態から探索深度nの探索が完了した現在までの各探索深度毎の探索時間の累計により求められる。予想検査時間算出部41は、記憶装置20の探索時間記憶部24に保存された探索深度毎の探索時間を合計し、検査開始から現在までに経過した経過時間を求める。この経過時間を検査制限時間3から減算して残検査制限時間を算出する。   Next, the expected inspection time calculation unit 41 calculates the remaining inspection time limit 3 (hereinafter, “remaining inspection time limit”) obtained by subtracting the elapsed time from the start of the inspection to the present time from the inspection time limit 3. The elapsed time from the start of the inspection to the present time is obtained by accumulating the search time for each search depth from the initial inspection state where the search depth n = 0 to the present when the search of the search depth n is completed. The expected examination time calculation unit 41 sums up the search times for each search depth stored in the search time storage unit 24 of the storage device 20, and obtains the elapsed time from the start of the examination to the present. The remaining inspection time limit is calculated by subtracting the elapsed time from the inspection time limit 3.

次に、予想検査時間算出部41は、残検査制限時間を仕様到達予想時間が超過するか否かを判定する。予想検査時間算出部41は、残検査制限時間から仕様到達予測時間を減算する。予想検査時間算出部41は、残検査制限時間から仕様到達予測時間を減算結果が0より大きい場合、仕様到達予想時間は残検査制限時間を超過せず、当該検査は検査制限時間3内に完了すると判定する。一方、予想検査時間算出部41は、残検査制限時間から仕様到達予測時間を減算結果が0以下である場合、仕様到達予想時間は残検査制限時間を超過し、当該検査は検査制限時間3内に完了しないと判定する。
予想検査時間算出部41は、当該検査が検査制限時間3内に完了しないと判定した場合、検査完了不可通知を検査制御部12へ出力する。検査制御部12は、検査完了不可通知を受けて到達可能性検査部13へ当該検査の終了を命令する。一方、予想検査時間算出部41は、当該検査が検査制限時間3内に完了すると判定した場合、特に命令は出力せず検査を続行する。
なお、予想検査時間算出部41による、仕様到達予測時間の算出方法、検査制限時間3内に検査が完了するか否かの判定方法、検査の終了または続行の命令方法はこれに限定しない。例えば、予想検査時間算出部41は、当該検査が検査制限時間3内に完了すると判定した場合に、検査続行命令を出力し、検査制御部12は検査続行命令に従って到達可能性検査部13へ検査の続行を命令してもよい。また、予想検査時間算出部41は、仕様到達予測時間を算出のみを実行し、検査を終了するか続行するかの判定は、検査制御部12が行ってもよい。
Next, the expected inspection time calculation unit 41 determines whether or not the expected arrival time exceeds the remaining inspection time limit. The predicted inspection time calculation unit 41 subtracts the specification arrival predicted time from the remaining inspection time limit. The expected inspection time calculation unit 41 subtracts the specification arrival prediction time from the remaining inspection time limit. If the result is greater than 0, the specification arrival expected time does not exceed the remaining inspection time limit, and the inspection is completed within the inspection time limit 3. Judge that. On the other hand, if the result of subtracting the specification arrival prediction time from the remaining inspection time limit is 0 or less, the expected inspection time calculation unit 41 exceeds the remaining inspection time limit and the inspection is within the inspection time limit 3 Is determined not to be completed.
When the predicted inspection time calculation unit 41 determines that the inspection is not completed within the inspection time limit 3, the predicted inspection time calculation unit 41 outputs an inspection completion failure notification to the inspection control unit 12. The inspection control unit 12 receives the notification of the completion of the inspection and instructs the reachability inspection unit 13 to end the inspection. On the other hand, when the expected inspection time calculation unit 41 determines that the inspection is completed within the inspection time limit 3, the inspection is not output and the inspection is continued.
Note that the method of calculating the specification arrival prediction time, the method of determining whether or not the inspection is completed within the inspection limit time 3, and the method of instructing to end or continue the inspection are not limited to this. For example, when the expected inspection time calculation unit 41 determines that the inspection is completed within the inspection time limit 3, the inspection inspection unit 12 outputs an inspection continuation instruction, and the inspection control unit 12 inspects the reachability inspection unit 13 according to the inspection continuation instruction. May be ordered to continue. In addition, the predicted inspection time calculation unit 41 may execute only the calculation of the specification arrival predicted time, and the inspection control unit 12 may determine whether to end or continue the inspection.

図11の式6は、本実施例において予想検査時間算出41が、仕様到達予想時間を算出するための算出式である。モデル検査では、探索深度が増加するにつれ、探索時間が指数関数的に増加する(参考文献:特許文献2)。指数関数的に増加する探索深度毎の探索時間の類推は、指数近似法で計算することができる。しかし、指数近似法は、探索深度nが少ない段階では誤差が大きく、本来、制限時間内で検査が完了することが可能な検査対象プログラム1の検査まで、タイムアウトすると誤判定してしまう可能性がある。そこで、実施例においては、探索深度nと探索深度n−1の差分である探索時間の増加率に基づいた、図11の式6を使用して仕様到達予想時間を算出することで誤判定を防ぐ。なお、仕様到達予測時間の算出式はこれの例に限定しない。各探索深度毎の探索時間に基づいて算出する方法や、探索深度nでの探索時間と探索深度n−1での探索時間との差分に基づいて算出する方法等、他の算出式を用いて計算することも可能である。   Expression 6 in FIG. 11 is a calculation expression for the expected inspection time calculation 41 in this embodiment to calculate the specification arrival expected time. In model checking, as the search depth increases, the search time increases exponentially (reference document: Patent Document 2). The analogy of the search time for each search depth that increases exponentially can be calculated by the exponential approximation method. However, the exponential approximation method has a large error at a stage where the search depth n is small, and there is a possibility that it may be erroneously determined to time out until the inspection of the inspection target program 1 that can complete the inspection within the time limit. is there. Therefore, in the embodiment, an erroneous determination is made by calculating the expected specification arrival time using Equation 6 of FIG. 11 based on the increase rate of the search time that is the difference between the search depth n and the search depth n−1. prevent. The calculation formula for the specification arrival prediction time is not limited to this example. Using other calculation formulas such as a method of calculating based on the search time for each search depth, a method of calculating based on the difference between the search time at the search depth n and the search time at the search depth n−1, etc. It is also possible to calculate.

図12は、ある検査対象プログラム1と検査仕様2において、最短探索深度N=15である場合に、探索深度n=1〜8の各段階で、図11の式6を用いて残りの探索深度毎の予想探索時間を算出した例を表している。この残りの探索深度毎の予想探索時間を合計した値が仕様到達予想時間であり、検査仕様2が示す到達状態集合Iが含まれる最短探索深度N=15の到達可能性の検査完了に必要な残り時間である。   FIG. 12 shows the remaining search depths using Expression 6 in FIG. 11 at each stage of the search depth n = 1 to 8 when the shortest search depth N = 15 in a certain inspection target program 1 and inspection specification 2. The example which calculated every prediction search time is represented. A value obtained by summing up the expected search times for the remaining search depths is a specification arrival prediction time, which is necessary for completing the reachability check of the shortest search depth N = 15 including the arrival state set I indicated by the check specification 2. Remaining time.

図12の項目を説明する。「探索深度n」は、各探索深度を示している。「探索深度nでの探索時間」は、各探索時間において実際に検査に要した探索時間を示している。図12を参照すると、当該検査対象プログラム1において、探索深度n=1の時に13秒、探索深度n=2の時に22秒、探索深度n=3の時に32秒、探索深度n=4の時に41秒、の探索時間を要したことが確認できる。この探索深度nでの探索時間は、到達可能性検査部13によって、各探索深度毎の検査が完了する毎に、探索時間記憶部24へ保存された時間である。「探索深度nまでの経過時間」は、検査開始(初期状態のため探索深度n=0)から、探索深度nの検査完了までに経過した時間である。「探索深度nまでの経過時間」は、各探索深度毎の探索時間の累計を示している。図12を参照すると、検査の開始から探索深度6における検査の完了までに638秒を要したことが確認できる。これは、探索深度0から探索深度5までの各探索深度での探索時間の累計時間である。「探索深度nにおいて予想した探索深度別の予想探索時間」は、予想検査時間算出部41が、ある探索深度nの検査が完了した時点において、図11の式6を用いて探索深度n+1から最短探索深度N=15までの各探索深度における予想探索時間を算出した結果を示している。図12を参照すると、現在が探索深度n=4の検査が完了した状態とすると、予想検査時間算出部41が、探索深度n=5では50秒、探索深度n=6では59秒の探索時間を要すると予想していることが確認できる。「仕様到達予想時間」は、予想検査時間算出部41が、各探索深度nの検査が完了したときに算出した、探索深度n+1から最短探索深度N=15までの各探索深度毎の予想探索時間を累計したものである。図12を参照すると、予想検査時間算出部41は、探索深度n=4の検査が完了した時点での仕様到達予想時間を1,045秒と予想していることが確認できる。   The items in FIG. 12 will be described. “Search depth n” indicates each search depth. “Search time at search depth n” indicates the search time actually required for inspection at each search time. Referring to FIG. 12, in the inspection target program 1, 13 seconds when the search depth n = 1, 22 seconds when the search depth n = 2, 32 seconds when the search depth n = 3, and when the search depth n = 4 It can be confirmed that the search time of 41 seconds was required. The search time at the search depth n is a time saved in the search time storage unit 24 by the reachability inspection unit 13 every time inspection for each search depth is completed. “Elapsed time to search depth n” is the time elapsed from the start of inspection (search depth n = 0 because of the initial state) until the completion of inspection of search depth n. “Elapsed time to search depth n” indicates the total search time for each search depth. Referring to FIG. 12, it can be confirmed that 638 seconds were required from the start of the inspection to the completion of the inspection at the search depth 6. This is the accumulated time of the search time at each search depth from the search depth 0 to the search depth 5. The “expected search time for each search depth predicted at the search depth n” is the shortest from the search depth n + 1 using the equation 6 in FIG. 11 when the expected inspection time calculation unit 41 completes the inspection at a certain search depth n. The result of calculating the expected search time at each search depth up to the search depth N = 15 is shown. Referring to FIG. 12, assuming that the inspection at the search depth n = 4 is currently completed, the expected inspection time calculation unit 41 performs a search time of 50 seconds at the search depth n = 5 and 59 seconds at the search depth n = 6. It can be confirmed that it is expected to require. The “specification expected arrival time” is the expected search time for each search depth from the search depth n + 1 to the shortest search depth N = 15 calculated by the expected inspection time calculation unit 41 when the inspection at each search depth n is completed. Is the cumulative total. Referring to FIG. 12, the expected inspection time calculation unit 41 can confirm that the expected specification arrival time at the time when the inspection at the search depth n = 4 is completed is expected to be 1045 seconds.

図12を参照して、予想検査時間算出部41による判定方法の例を説明する。図12に示した検査の例において、検査制限時間3が、10,000秒であったとする。図12より、到達可能性検査部13が探索深度n=5の検査を完了した時点で、予想検査時間算出部41は、最短探索深度N=15までの仕様到達予想時間を5,675秒と算出している。次に、予想検査時間算出部41は、検査制限時間3から現在までの経過時間を減算して残検査制限時間を算出する。予想検査時間算出部41は、図12より、残検査制限時間を「10,000秒−234=9,766秒」と算出する。次に、予想検査時間算出部41は、残検査制限時間から仕様予想到達時間を減算して、仕様到達予想時間が残検査制限時間を超過していないかを判定する。予想検査時間算出部41は、図12より、「9,766秒−5675秒=4,091秒」であるので、この時点ではまだ仕様到達予想時間が残検査制限時間を超過するとは判定しない。そのため、到達可能性検査部13は、探索深度n=n+1(この場合は探索深度6)として検査を継続する。   With reference to FIG. 12, the example of the determination method by the estimated examination time calculation part 41 is demonstrated. In the example of the inspection shown in FIG. 12, it is assumed that the inspection time limit 3 is 10,000 seconds. From FIG. 12, when the reachability inspection unit 13 completes the inspection at the search depth n = 5, the expected inspection time calculation unit 41 sets the expected specification arrival time up to the shortest search depth N = 15 to 5,675 seconds. Calculated. Next, the expected inspection time calculation unit 41 calculates the remaining inspection time limit by subtracting the elapsed time from the inspection time limit 3 to the present time. The expected inspection time calculation unit 41 calculates the remaining inspection time limit as “10,000 seconds−234 = 9,766 seconds” from FIG. 12. Next, the expected inspection time calculation unit 41 subtracts the expected specification arrival time from the remaining inspection time limit, and determines whether the expected specification arrival time has exceeded the remaining inspection time limit. As shown in FIG. 12, the expected inspection time calculation unit 41 is “9,766 seconds−5675 seconds = 4,091 seconds”, and at this point in time, the expected specification arrival time does not yet exceed the remaining inspection limit time. Therefore, the reachability inspection unit 13 continues the inspection with the search depth n = n + 1 (in this case, the search depth 6).

さらに検査が継続され、到達可能性検査部13は、探索深度6の検査を完了する。図12より、到達可能性検査部13は探索深度n=6の検査に404秒要している。予想検査時間算出部41は、図11の式6を用いて仕様到達予想時間を算出する。図12より、予想検査時間算出部41は、到達可能性検査部13が探索深度n=6の検査を完了した時点で、最短探索深度N=15までの仕様到達予想時間を16,326秒と算出している。次に、予想検査時間算出部41は、検査制限時間3から現在までの経過時間を減算した時間を減算して残検査制限時間を算出する。予想検査時間算出部41は、残検査制限時間を「10,000秒−638秒=9,362秒」と算出する。次に、予想検査時間算出部41は、残検査制限時間から仕様予想到達時間を減算して、仕様到達予想時間が残検査制限時間を超過していないかを判定する。予想検査時間算出部41は、図12より、「9,362秒−16,326秒=−6,964秒」であるので、仕様到達予想時間が残検査制限時間を超過すると判定する。これにより、予想検査時間算出部41は、この時点で当該検査は検査制限時間3内で完了しないと判定する。判定結果に伴い、予想検査時間算出部41は、検査制御部12へ検査完了不可通知を出力する。なお、予想検査時間算出部41による、残検査制限時間を仕様到達予想時間が超過するかを判定するための計算方法はこの例に限定しない。   Further, the inspection is continued, and the reachability inspection unit 13 completes the inspection at the search depth 6. From FIG. 12, the reachability check unit 13 requires 404 seconds to check the search depth n = 6. The expected inspection time calculation unit 41 calculates the specification arrival expected time using Expression 6 in FIG. From FIG. 12, the expected inspection time calculation unit 41, when the reachability inspection unit 13 completes the inspection with the search depth n = 6, sets the expected specification arrival time up to the shortest search depth N = 15 to 16,326 seconds. Calculated. Next, the expected inspection time calculation unit 41 calculates the remaining inspection time limit by subtracting the time obtained by subtracting the elapsed time from the inspection time limit 3 to the present time. The expected inspection time calculation unit 41 calculates the remaining inspection time limit as “10,000 seconds−638 seconds = 9,362 seconds”. Next, the expected inspection time calculation unit 41 subtracts the expected specification arrival time from the remaining inspection time limit, and determines whether the expected specification arrival time has exceeded the remaining inspection time limit. As shown in FIG. 12, the predicted inspection time calculation unit 41 determines that the expected specification arrival time exceeds the remaining inspection limit time because “9,362 seconds−16,326 seconds = −6,964 seconds”. Thereby, the expected examination time calculation unit 41 determines that the examination is not completed within the examination time limit 3 at this time. Along with the determination result, the expected inspection time calculation unit 41 outputs an inspection completion failure notification to the inspection control unit 12. In addition, the calculation method for determining whether the expected arrival time exceeds the remaining inspection limit time by the expected inspection time calculation unit 41 is not limited to this example.

図13は、図12をグラフに表したものである。図13において、縦軸は探索時間、横軸は探索深度である。「A」は、探索深度n毎の実探索時間を示している。「A」を参照すると、探索深度nが増加するにつれて、実探索時間は指数関数的に増加することが確認できる。「B」は、探索深度n=7において算出した、残りの各探索深度における予想探索時間を表している。同様に「C」は探索深度n=6において、「D」は探索深度n=4において、「E」は探索深度n=2において、それぞれ算出した、残りの各探索深度における予想探索時間を示している。予想検査時間算出部41は、「B」から「D」の各探索深度nの段階において、探索予想時間を「A」の実探索時間より短い値に算出していることが確認できる。図11の式6を用いることにより、制限時間内で検査が完了する検査を、制限時間内で完了しない検査と誤って判定することを防ぐことができる。   FIG. 13 is a graph of FIG. In FIG. 13, the vertical axis represents the search time, and the horizontal axis represents the search depth. “A” indicates the actual search time for each search depth n. Referring to “A”, it can be confirmed that the actual search time increases exponentially as the search depth n increases. “B” represents the expected search time at each remaining search depth calculated at the search depth n = 7. Similarly, “C” indicates the estimated search time at each remaining search depth, calculated at search depth n = 6, “D” at search depth n = 4, and “E” at search depth n = 2. ing. The predicted examination time calculation unit 41 can confirm that the predicted search time is calculated to be shorter than the actual search time of “A” at each search depth n from “B” to “D”. By using Equation 6 in FIG. 11, it is possible to prevent an inspection that is completed within the time limit from being erroneously determined as an inspection that is not completed within the time limit.

(記憶装置の説明)
次に、記憶装置20の説明をする。記憶装置20は、状態遷移モデル記憶部21と、記号モデル記憶部22と、最短探索深度記憶部23と、探索時間記憶部24とを備える。
(Description of storage device)
Next, the storage device 20 will be described. The storage device 20 includes a state transition model storage unit 21, a symbol model storage unit 22, a shortest search depth storage unit 23, and a search time storage unit 24.

まず、状態遷移モデル記憶部21について説明する。状態遷移モデル記憶部21は、深度算出部30の状態遷移モデル作成部31が出力する状態遷移モデルを保存する。状態遷移モデル記憶部21は、最短深度算出部32の要求に応じて状態遷移モデルを出力する。   First, the state transition model storage unit 21 will be described. The state transition model storage unit 21 stores the state transition model output by the state transition model creation unit 31 of the depth calculation unit 30. The state transition model storage unit 21 outputs a state transition model in response to a request from the shortest depth calculation unit 32.

次に、記号モデル記憶部22について説明する。記号モデル記憶部22は、検査処理部10の記号モデル作成部11の出力する記号モデルを保存する。記号モデル記憶部22は、検査制御部12の要求に応じて記号モデルを出力する。   Next, the symbol model storage unit 22 will be described. The symbol model storage unit 22 stores the symbol model output from the symbol model creation unit 11 of the inspection processing unit 10. The symbol model storage unit 22 outputs a symbol model in response to a request from the inspection control unit 12.

次に、最短探索深度記憶部23について説明する。最短探索深度記憶部23は、深度算出部30の最短探索深度算出部32の出力する最短探索深度Nを保存する。最短探索深度記憶部23は、予想検査時間算出部41の要求に応じて最短探索深度Nを出力する。   Next, the shortest search depth storage unit 23 will be described. The shortest search depth storage unit 23 stores the shortest search depth N output from the shortest search depth calculation unit 32 of the depth calculation unit 30. The shortest search depth storage unit 23 outputs the shortest search depth N in response to a request from the predicted examination time calculation unit 41.

次に、探索時間記憶部24について説明する。探索時間記憶部24は、検査処理部10の到達可能性検査部13が出力する探索深度nでの探索時間を探索深度nに対応させて保存する。探索時間記憶部24は、予想検査時間算出部41の要求に応じて探索深度nでの探索時間を出力する。   Next, the search time storage unit 24 will be described. The search time storage unit 24 stores the search time at the search depth n output from the reachability test unit 13 of the test processing unit 10 in association with the search depth n. The search time storage unit 24 outputs the search time at the search depth n in response to a request from the expected examination time calculation unit 41.

以上が、本実施例における構成の説明である。
状態遷移モデル作成部31は、検査対象プログラム1と検査仕様2に基づいて状態遷移モデルを作成する。最短探索深度算出部32は、状態遷移モデルに基づいて最短探索深度Nを算出する。最短探索深度Nが算出されることで、当該検査がどの探索深度まで検査が行われることによって完了するのかを判断できる。
さらに、到達可能性検査部13は、探索深度nの検査が完了する毎に、探索深度毎の探索時間を出力する。予想検査時間算出部41は、探索深度毎の探索時間に基づいて、仕様到達予想時間する。予想検査時間算出部41は、図11の式6によって適切な仕様到達予測時間を算出することができる。
加えて、予想検査時間算出部41は、探索深度毎の探索時間の合計することで検査開始からの経過時間を算出する。予想検査時間算出部41は、検査制限時間3から、検査開始からの経過時間を減算して残検査制限時間を求める。予想検査時間算出部41は、残検査制限時間から仕様到達予測時間を減算することで、検査が検査制限時間3内に完了可能か否かを容易に判定できる。
これによって、検査が検査制限時間3内に完了しないと判定した場合にはその時点で検査を終了することが可能となり、検査制限時間3が全て経過してようやく検査が完了しないことが判明するという状態を防ぐことが可能となる。
The above is the description of the configuration in this embodiment.
The state transition model creation unit 31 creates a state transition model based on the inspection target program 1 and the inspection specification 2. The shortest search depth calculation unit 32 calculates the shortest search depth N based on the state transition model. By calculating the shortest search depth N, it is possible to determine to what search depth the inspection is completed by performing the inspection.
Further, the reachability checking unit 13 outputs the search time for each search depth every time the search depth n is completed. The expected inspection time calculation unit 41 calculates the expected arrival time based on the search time for each search depth. The predicted inspection time calculation unit 41 can calculate an appropriate specification arrival predicted time using Equation 6 in FIG.
In addition, the expected inspection time calculation unit 41 calculates the elapsed time from the start of the inspection by adding the search times for each search depth. The expected inspection time calculation unit 41 subtracts the elapsed time from the start of the inspection from the inspection time limit 3 to obtain the remaining inspection time limit. The predicted inspection time calculation unit 41 can easily determine whether or not the inspection can be completed within the inspection time limit 3 by subtracting the specification arrival prediction time from the remaining inspection time limit.
As a result, if it is determined that the inspection is not completed within the inspection time limit 3, it is possible to end the inspection at that time, and it is found that the inspection is not completed only after the inspection time limit 3 has elapsed. It becomes possible to prevent the state.

[動作の説明]
次に、図14を使用して本発明の本実施例における動作を説明する。図14は本発明の本実施例における動作方法を示している。図14において、ステップA01からステップA07については、前述した従来のモデル検査装置の動作方法と同様である。ステップB01からステップB08が、本実施例に特有の動作方法である。
[Description of operation]
Next, the operation in this embodiment of the present invention will be described with reference to FIG. FIG. 14 shows an operation method in this embodiment of the present invention. In FIG. 14, Step A01 to Step A07 are the same as the operation method of the conventional model checking apparatus described above. Steps B01 to B08 are operation methods unique to this embodiment.

(ステップB01)
深度算出部30の状態モデル作成部31は、検査対象プログラム1と検査仕様2を読み込み、状態遷移モデルを作成する。状態モデル作成部31は、作成した状態遷移モデルを記憶装置20の状態遷移モデル記憶部21へ保存する。なお、状態モデルの作成命令は外部から入力されても検査制御部12から入力されてもよい。状態モデルの作成命令を出力する動作主体と動作方法については本実施例において特に限定はしない。
(Step B01)
The state model creation unit 31 of the depth calculation unit 30 reads the inspection target program 1 and the inspection specification 2 and creates a state transition model. The state model creation unit 31 stores the created state transition model in the state transition model storage unit 21 of the storage device 20. The state model creation command may be input from the outside or from the inspection control unit 12. In this embodiment, there is no particular limitation on the operation subject and the operation method that output the state model creation command.

(ステップB02)
深度算出部30の最短探索深度算出部32は、記憶装置20の状態遷移モデル記憶部21から状態遷移モデルを読み込む。最短探索深度算出部32は、状態遷移モデルにおいて、初期状態から検査仕様2が示す到達状態への最短探索深度Nを求める。最短探索深度算出部32は、求めた最短探索深度Nを、記憶装置20の最短探索深度記憶部23へ保存する。
(Step B02)
The shortest search depth calculation unit 32 of the depth calculation unit 30 reads the state transition model from the state transition model storage unit 21 of the storage device 20. The shortest search depth calculation unit 32 obtains the shortest search depth N from the initial state to the arrival state indicated by the inspection specification 2 in the state transition model. The shortest search depth calculation unit 32 stores the obtained shortest search depth N in the shortest search depth storage unit 23 of the storage device 20.

(ステップA01)
検査処理部10の記号モデル作成部11は、外部から、検査対象プログラム1と検査仕様2を入力する。記号モデル作成部11は、検査対象プログラム1および検査仕様2に基づいて、記号モデルを作成する。記号モデル作成部11は、作成した記号モデルを記憶装置20の記号モデル記憶部22へ保存する。なお、記号モデルの作成命令は外部から入力されても検査制御部12から入力されてもよい。記号モデルの作成命令を出力する動作主体と動作方法については本実施例において特に限定はしない。
(Step A01)
The symbol model creation unit 11 of the inspection processing unit 10 inputs the inspection target program 1 and the inspection specification 2 from the outside. The symbol model creation unit 11 creates a symbol model based on the inspection target program 1 and the inspection specification 2. The symbol model creation unit 11 stores the created symbol model in the symbol model storage unit 22 of the storage device 20. The symbol model creation command may be input from the outside or from the inspection control unit 12. In this embodiment, there is no particular limitation on the operation subject and the operation method for outputting the symbol model creation command.

(ステップA02)
検査処理部10の検査制御部12は、外部から検査制限時間3を入力する。検査制御部12は、記憶装置20の記号モデル記憶部22から記号モデルを読み込む。検査制御部12は、検査対象プログラム1が検査仕様2を満たすか否かの検査を検査制限時間3で実行するように到達可能性検査部13へ検査実行を命令する。なお、本実施例において、検査制御部12への検査開始命令は外部から入力されるものとする。検査開始命令を出力する動作主体と動作方法については本実施例において特に限定はしない。
(Step A02)
The inspection control unit 12 of the inspection processing unit 10 inputs the inspection time limit 3 from the outside. The inspection control unit 12 reads a symbol model from the symbol model storage unit 22 of the storage device 20. The inspection control unit 12 instructs the reachability inspection unit 13 to execute the inspection so that the inspection whether the inspection target program 1 satisfies the inspection specification 2 is executed in the inspection time limit 3. In this embodiment, it is assumed that an inspection start command to the inspection control unit 12 is input from the outside. In this embodiment, there is no particular limitation on the operation subject and operation method for outputting the inspection start command.

(ステップA03)
到達可能性検査部13は、検査制御部12からの検査実行の命令に従い、検査検査の開始にあたって、初期状態として探索深度n=0と設定する。
(Step A03)
The reachability inspection unit 13 sets the search depth n = 0 as an initial state at the start of the inspection inspection in accordance with the inspection execution instruction from the inspection control unit 12.

(ステップA04)
到達可能性検査部13は、初期状態集合V0から探索深度nの状態遷移で到達可能な各状態において、検査仕様2の到達状態集合Iが含まれているかの検査を実行する。また、到達可能性検査部13は、検査の開始と同時に検査の経過時間の測定を開始する。到達能性検査部13は、検査開始からの経過時間が検査制限時間3に到達した時点で検査を終了する。さらに、到達可能性検査部13は、検査を開始すると探索深度n毎の探索時間を測定する。
(Step A04)
The reachability checking unit 13 checks whether or not the arrival state set I of the inspection specification 2 is included in each state that can be reached by the state transition of the search depth n from the initial state set V0. In addition, the reachability inspection unit 13 starts measuring the elapsed time of the inspection simultaneously with the start of the inspection. The reachability inspection unit 13 ends the inspection when the elapsed time from the start of the inspection reaches the inspection limit time 3. Furthermore, the reachability inspection unit 13 measures the search time for each search depth n when the inspection is started.

(ステップA05)
到達可能性検査部13は、初期状態集合V0から探索深度nの状態遷移において、到達状態集合Iが含まれているか否かを判定する。探索深度nにおいて到達状態集合Iが含まれている場合は、ステップA06へ進む。探索深度nにおいて到達状態集合Iが含まれていない場合は、ステップB03へ進む。
(Step A05)
The reachability checking unit 13 determines whether or not the reachable state set I is included in the state transition from the initial state set V0 to the search depth n. If the reaching state set I is included in the search depth n, the process proceeds to step A06. If the reaching state set I is not included in the search depth n, the process proceeds to step B03.

(ステップA06)
探索深度nにおいて到達状態集合Iが含まれている場合、到達可能性検査部13は、検査対象プログラム1が検査仕様2を満たすことを検査結果5に記録して、検査結果出力部14へ出力する。検査結果出力部14は、検査結果5を入力し、検査結果5を外部へ出力する。到達可能性検査部13は、検査制御部12へ検査対象プログラム1の検査完了を通知して検査を完了する。
また、検査が検査制限時間3内に完了しないと判定し検査を終了した場合、到達可能性検査部13は、検査完了不可通知により検査を終了したことを記録した検査結果5を検査結果出力部14へ出力する。検査結果出力部14は、検査結果5を入力し、検査結果5を外部へ出力する。到達可能性検査部13は、検査制御部12へ検査対象プログラム1の検査完了を通知して検査を完了する。
(Step A06)
When the arrival state set I is included at the search depth n, the reachability checking unit 13 records that the inspection target program 1 satisfies the inspection specification 2 in the inspection result 5 and outputs it to the inspection result output unit 14 To do. The inspection result output unit 14 inputs the inspection result 5 and outputs the inspection result 5 to the outside. The reachability inspection unit 13 notifies the inspection control unit 12 of the completion of the inspection of the inspection target program 1 and completes the inspection.
Further, when it is determined that the inspection is not completed within the inspection time limit 3 and the inspection is terminated, the reachability inspection unit 13 displays the inspection result 5 in which the inspection is completed due to the notification of the completion of the inspection not being completed. 14 to output. The inspection result output unit 14 inputs the inspection result 5 and outputs the inspection result 5 to the outside. The reachability inspection unit 13 notifies the inspection control unit 12 of the completion of the inspection of the inspection target program 1 and completes the inspection.

(ステップB03)
到達可能性検査部13は、探索深度nにおける検査が完了する毎に、探索深度nの探索に要した時間と探索深度nの組を、記憶装置20の探索時間記憶部24へ保存する。
(Step B03)
Each time the inspection at the search depth n is completed, the reachability inspection unit 13 saves the set of the time required for searching the search depth n and the search depth n in the search time storage unit 24 of the storage device 20.

(ステップB04)
時間算出部40の予想検査時間算出部41は、記憶装置20の探索時間記憶部24に保存されている、探索深度n=0から探索深度nまでの各探索深度n毎の探索時間と、最短探索深度記憶部23に保存されている最短探索深度Nと、を読み込み、図11の式6に基づいて、探索深度n+1から最短探索深度Nまでの各探索深度における予想深度別探索時間を算出する。
(Step B04)
The expected examination time calculation unit 41 of the time calculation unit 40 stores the search time for each search depth n from the search depth n = 0 to the search depth n stored in the search time storage unit 24 of the storage device 20 and the shortest. The shortest search depth N stored in the search depth storage unit 23 is read, and the search time for each predicted depth at each search depth from the search depth n + 1 to the shortest search depth N is calculated based on Expression 6 in FIG. .

(ステップB05)
予想検査時間算出部41は、探索深度n+1から最短探索深度Nまでの各探索深度における予想深度別探索時間の総和をとることで、仕様到達予想時間を算出する。
(Step B05)
The predicted inspection time calculation unit 41 calculates the specification arrival expected time by taking the sum of the search time by predicted depth at each search depth from the search depth n + 1 to the shortest search depth N.

(ステップB06)
予想検査時間算出部41は、探索深度0から探索深度nまでの探索深度毎の探索時間を合計して、検査開始からの経過時間を算出する。予想検査時間算出部41は、検査制限時間3から、検査開始からの経過時間を減算した残検査制限時間を算出する。予想検査時間算出部41は、残検査制限時間から仕様到達予想時間を減算して、仕様到達予想時間が残検査制限時間を超過していないかを判定する。判定の結果、仕様到達予想時間が残検査制限時間を超過している場合、予想検査時間算出部41は、検査が検査制限時間3内に完了しないと判定し、ステップB07へ進む。仕様到達予測時間が残検査制限時間を超えていない場合、検査は続行されるため、ステップA07へ進む。
(Step B06)
The expected inspection time calculation unit 41 calculates the elapsed time from the start of the inspection by summing the search times for each search depth from the search depth 0 to the search depth n. The expected inspection time calculation unit 41 calculates the remaining inspection time limit obtained by subtracting the elapsed time from the start of the inspection from the inspection time limit 3. The expected inspection time calculation unit 41 subtracts the expected specification arrival time from the remaining inspection time limit, and determines whether the expected specification arrival time exceeds the remaining inspection time limit. As a result of the determination, if the expected specification arrival time exceeds the remaining inspection time limit, the predicted inspection time calculation unit 41 determines that the inspection is not completed within the inspection time limit 3, and proceeds to step B07. If the specification arrival prediction time does not exceed the remaining inspection limit time, the inspection is continued, and the process proceeds to step A07.

(ステップA07)
探索深度nにおいて到達状態集合Iが含まれていない場合、到達可能性検査部13は、探索深度n=n+1として、検査を続行するためにステップA04へ戻る。
(Step A07)
When the reach state set I is not included in the search depth n, the reachability check unit 13 sets the search depth n = n + 1 and returns to step A04 to continue the check.

(ステップB07)
予想検査時間算出部41は、検査が検査制限時間3内に完了しないと判定し、検査処理部10の検査制御部12へ、検査完了不可通知を出力する。検査制御部12は、予想検査時間算出部41が出力する検査完了不可通知を入力し、到達可能性検査部13へ検査終了を命令する。到達可能性検査部13は、検査制御部12から検査終了の命令を入力し、当該検査を終了する。予想検査時間算出部41は、検査結果5を出力するために、ステップA06へ進む。
(Step B07)
The expected inspection time calculation unit 41 determines that the inspection is not completed within the inspection time limit 3, and outputs an inspection completion failure notification to the inspection control unit 12 of the inspection processing unit 10. The inspection control unit 12 inputs the inspection completion failure notification output from the predicted inspection time calculation unit 41 and instructs the reachability inspection unit 13 to end the inspection. The reachability inspection unit 13 inputs an instruction to end the inspection from the inspection control unit 12 and ends the inspection. The predicted inspection time calculation unit 41 proceeds to step A06 in order to output the inspection result 5.

以上が、本実施例における動作方法の説明である。このようにして、到達可能性検査部13が探索深度nの検査を完了する度に、予想検査時間算出部41は、当該検査が検査制限時間3内で完了するか否かを判定することで、検査制限時間3が経過するまで待たずとも、当該検査が検査制限時間3内で完了しないことを検知することが可能となる。これによって、モデル検査時間制御装置は、検査制限時間3を使い切るまで検査を続行する必要が無いため、検査の効率化を計ることができる。
また、到達可能性検査部13が探索深度nの検査が完了する毎に、探索深度nの探索時間を探索時間記憶部24へ保存し、予想検査時間算出部41は、探索時間記憶部24に保存された探索深度nの探索時間と探索深度n−1の探索時間との差分に基づいて、仕様到達予想時間を算出するため、本来、検査制限時間3内で検査が完了する検査を、検査制限時間3内に検査が完了しないと誤って判定することを防ぐことができる。
The above is the description of the operation method in this embodiment. Thus, every time the reachability inspection unit 13 completes the inspection at the search depth n, the expected inspection time calculation unit 41 determines whether or not the inspection is completed within the inspection time limit 3. Even without waiting until the inspection time limit 3 elapses, it is possible to detect that the inspection is not completed within the inspection time limit 3. As a result, the model inspection time control device does not need to continue the inspection until the inspection time limit 3 is used up, and therefore the inspection efficiency can be improved.
In addition, every time the reachability check unit 13 completes the inspection at the search depth n, the search time at the search depth n is stored in the search time storage unit 24, and the predicted inspection time calculation unit 41 is stored in the search time storage unit 24. Based on the difference between the saved search time of the search depth n and the search time of the search depth n-1, the expected arrival time of the specification is calculated. It is possible to prevent erroneous determination that the inspection is not completed within the time limit 3.

以上が、本発明の本実施例の説明である。本発明により、検査対象プログラム1に割り当てられた検査制限時間3に検査対象プログラム1の検査が完了しないことを、検査性制限時間が経過するより以前に検知して、検査を終了することが可能となるため、検査制限時間3を使い切っても検査対象プログラム1の検査が完了しない状態を未然に防ぐことができ、検査に要する時間の効率化を図ることができる。   The above is the description of this embodiment of the present invention. According to the present invention, it is possible to detect that the inspection of the inspection target program 1 is not completed at the inspection time limit 3 assigned to the inspection target program 1 before the inspection limit time elapses and to end the inspection. Therefore, it is possible to prevent a state in which the inspection of the inspection target program 1 is not completed even if the inspection time limit 3 is used up, and to increase the time required for the inspection.

従来のモデル検査装置の構成を表すブロック図である。It is a block diagram showing the structure of the conventional model inspection apparatus. 検査対象プログラム1の例の図である。It is a figure of the example of the test object program. 検査仕様2の例の図である。It is a figure of the example of the inspection specification. 従来のモデル検査装置における、各構成部位の構成図である。It is a block diagram of each structure part in the conventional model inspection apparatus. 検査対象プログラム1と検査仕様2から作成したKripke構造の記号モデルの図である。It is a figure of the symbol model of Kripke structure created from inspection object program 1 and inspection specification 2. 図5のKripke構造の記号モデルから作成した状態遷移図である。FIG. 6 is a state transition diagram created from the symbol model of the Kripke structure in FIG. 5. 従来のモデル検査装置における動作方法のフローチャートである。It is a flowchart of the operation | movement method in the conventional model check apparatus. 本発明のモデル検査時間制御装置の構成を表すブロック図である。It is a block diagram showing the structure of the model check time control apparatus of this invention. 本発明のモデル検査制御装置における、各構成部位の構成図である。It is a block diagram of each component in the model check control device of the present invention. 検査対象プログラム1を、コントロールフローグラフで表した状態遷移図である。It is a state transition diagram showing the inspection target program 1 in a control flow graph. 本発明のおける、予想探索時間の算出式を表した図である。It is a figure showing the calculation formula of estimated search time in this invention. 本発明における、探索深度毎に予想探索時間と仕様到達予想時間を、図11の算出式を用いて算出した表である。12 is a table in which an expected search time and an expected specification arrival time are calculated for each search depth using the calculation formula of FIG. 11 in the present invention. 本発明における、探索深度と探索時間との関係を表したグラフである。It is a graph showing the relationship between search depth and search time in the present invention. 本発明のモデル検査時間制御装置における動作方法のフローチャートである。It is a flowchart of the operation | movement method in the model check time control apparatus of this invention.

符号の説明Explanation of symbols

1 検査対象プログラム
2 検査仕様
3 検査制限時間
5 検査結果
10 検査処理部
11 記号モデル作成部
12 検査制御部
13 到達可能性検査部
14 検査結果出力部
20 記憶装置
21 状態遷移モデル記憶部
22 記号モデル記憶部
23 最短探索深度記憶部
24 探索時間記憶部
30 深度算出部
31 状態遷移モデル作成部
32 最短探索深度算出部
40 時間算出部
41 予想検査時間算出部
100 処理部
200 記憶部
300 入力部
400 出力部
500 通信部
DESCRIPTION OF SYMBOLS 1 Inspection object program 2 Inspection specification 3 Inspection time limit 5 Inspection result 10 Inspection processing part 11 Symbol model creation part 12 Inspection control part 13 Reachability inspection part 14 Inspection result output part 20 Storage device 21 State transition model storage part 22 Symbol model Storage unit 23 Shortest search depth storage unit 24 Search time storage unit 30 Depth calculation unit 31 State transition model creation unit 32 Shortest search depth calculation unit 40 Time calculation unit 41 Predictive examination time calculation unit 100 Processing unit 200 Storage unit 300 Input unit 400 Output 500 communication unit

Claims (19)

検査の対象であるプログラムの実行文を実行した回数を表す探索深度のうち、前記プログラムの初期状態から前記プログラムの検査仕様を満たすことを示す仕様充足状態へ状態を遷移するために要する最短探索深度を算出する最短探索深度算出部と、
前記プログラムにおいて、前記探索深度毎に前記仕様充足状態へ状態を遷移することが可能であるかの検査を実行し、前記探索深度の各々における前記検査に要した深度別検査時間を出力する到達可能性検査部と、
前記到達可能性検査部が前記各探索深度について検査を完了する毎に、前記最短探索深度まで前記検査を完了するために要する予想時間である仕様到達予想時間を算出する予想検査時間算出部を備え、
前記到達可能性検査部は、前記プログラムの前記検査に対する検査制限時間のうち残りの残検査制限時間を前記仕様到達予想時間が超過する場合には、前記検査を途中で終了する検査時間制御装置。
Among search depths representing the number of times the executable statement of the program to be examined is executed, the shortest search depth required to change the state from the initial state of the program to a specification satisfaction state indicating that the inspection specification of the program is satisfied A shortest search depth calculation unit for calculating
In the program, an inspection is performed to determine whether it is possible to change the state to the specification satisfaction state for each search depth, and the inspection time by depth required for the inspection at each of the search depths is output. Sex testing department;
Each time the reachability inspection unit completes the inspection for each search depth, it includes an expected inspection time calculation unit that calculates an expected arrival time for specifications that is an expected time required to complete the inspection up to the shortest search depth. ,
The reachability inspection unit is an inspection time control device that terminates the inspection halfway when the expected remaining time of the specification exceeds the remaining remaining inspection time limit of the inspection time limit for the inspection of the program.
請求項1に記載の検査時間制御装置であって、
前記予想検査時間算出部は、これから前記検査が行われるべき前記探索深度の各々について前記検査に要すると予想する予想深度別探索時間を算出し、前記予想深度別探索時間を合計することによって、前記仕様到達予想時間を算出する検査時間制御装置。
The inspection time control device according to claim 1,
The expected inspection time calculation unit calculates a search time for each expected depth that is expected to be required for the inspection for each of the search depths from which the inspection is to be performed, and totals the search time for each expected depth, Inspection time control device that calculates expected specification arrival time.
請求項2に記載の検査時間制御装置であって、
前記予想検査時間算出部は、前記深度別探索時間に基づいて、前記予想深度別探索時間を算出する検査時間制御装置。
The inspection time control device according to claim 2,
The predicted inspection time calculation unit is an inspection time control device that calculates the predicted depth-specific search time based on the depth-specific search time.
請求項2または請求項3に記載の検査時間制御装置であって、
前記予想検査時間算出部は、前記到達可能性検査部が前記探索深度のうち探索深度nの前記検査を完了したときに、前記探索深度nの前記深度別探索時間と前記探索深度のうち探索深度n−1の深度別探索時間との差分に基づいて、前記予想深度別探索時間を算出する検査時間制御装置。
The inspection time control device according to claim 2 or claim 3, wherein
When the reachability checking unit completes the inspection at the search depth n of the search depth, the expected inspection time calculation unit is configured to search the depth of search of the search depth n and the search depth of the search depth. The inspection time control apparatus which calculates the search time classified by said prediction depth based on the difference with the search time classified by n-1 depth.
請求項2から請求項4までのいずれかに記載の検査時間制御装置であって、
前記予想検査時間算出部は、前記予想探索深度別探索時間を算出する探索深度x、探索深度xの前記予想深度別探索時間g(x)、探索深度iの時の前記深度別探索時間f(i)として、
g(x)={f(n)−f(n−1)}×(x−n)+f(n)
に基づいて、前記予想深度別探索時間を算出する検査時間制御装置。
An inspection time control device according to any one of claims 2 to 4,
The predicted inspection time calculation unit calculates a search depth x for calculating the search time according to the predicted search depth, the search time g (x) according to the predicted depth of the search depth x, and the search time according to the depth f ( i)
g (x) = {f (n) -f (n-1)} * (xn) + f (n)
The inspection time control device which calculates the search time according to the expected depth based on the above.
請求項1から請求項5までのいずれかに記載の検査時間制御装置であって、
前記予想検査時間算出部は、前記到達可能性検査部が探索深度nの前記検査を完了したときに、探索深度0から探索深度nまでの前記深度別検査時間を合計した時間を、前記検査制御時間から減算することによって前記残検査制限時間を算出する検査時間制御装置。
An inspection time control device according to any one of claims 1 to 5,
The expected inspection time calculation unit, when the reachability inspection unit completes the inspection at the search depth n, calculates the total time of the inspection times by depth from the search depth 0 to the search depth n. An inspection time control device for calculating the remaining inspection time limit by subtracting from the time.
請求項1から請求項6までのいずれかに記載の検査時間制御装置であって、
前記プログラムと前記検査仕様に基づいて、前記プログラムの前記初期状態から前記仕様充足状態までの状態遷移モデルを作成する状態遷移モデル作成部をさらに備え、
前記最短探索深度算出部は、前記状態遷移モデルに基づいて、前記最短探索深度を算出する検査時間制御装置。
An inspection time control device according to any one of claims 1 to 6,
Based on the program and the inspection specification, further comprising a state transition model creating unit that creates a state transition model from the initial state of the program to the specification satisfaction state,
The shortest search depth calculation unit is an inspection time control device that calculates the shortest search depth based on the state transition model.
請求項7に記載の検査時間制御装置であって、
前記最短探索深度算出部は、前記状態遷移モデルを各状態での条件分岐を考慮しない有向グラフとして扱い、前記初期状態から前記仕様充足状態まで到達するための最短経路での前記状態遷移数を求めることにより前記最短探索深度を算出する検査時間制御装置。
The inspection time control device according to claim 7,
The shortest search depth calculation unit treats the state transition model as a directed graph that does not consider conditional branching in each state, and obtains the number of state transitions on the shortest path from the initial state to the specification satisfaction state. The inspection time control apparatus which calculates the said shortest search depth by.
請求項1から請求項8までのいずれかに記載の検査時間制御装置であって、
前記状態遷移モデルと、前記最短探索深度と、前記深度別探索時間とを保存する記憶装置をさらに備え、
前記最短探索深度算出部は、前記記憶装置に保存された前記状態遷移モデルに基づいて、前記最短探索深度を算出し、
前記予想検査時間算出部は、前記記憶装置に保存された前記最短探索深度と前記深度別探索時間とに基づいて、前記仕様到達予想時間を算出する検査時間制御装置。
An inspection time control device according to any one of claims 1 to 8,
A storage device for storing the state transition model, the shortest search depth, and the search time by depth;
The shortest search depth calculation unit calculates the shortest search depth based on the state transition model stored in the storage device,
The expected inspection time calculation unit is an inspection time control device that calculates the expected specification arrival time based on the shortest search depth and the search time by depth stored in the storage device.
検査の対象であるプログラムの実行文を実行した回数を表す探索深度のうち、前記プログラムの初期状態から前記プログラムの検査仕様を満たすことを示す仕様充足状態へ状態を遷移するために要する最短探索深度を算出する最短探索深度算出ステップと、
前記プログラムにおいて、前記探索深度毎に前記仕様充足状態へ状態を遷移することが可能であるかの検査を実行する検査実行ステップと、
前記探索深度の各々における前記検査に要した深度別検査時間を出力する深度別検査時間出力ステップと、
前記到達可能性検査部が前記各探索深度について検査を完了する毎に、前記最短探索深度まで前記検査を完了するために要する予想時間である仕様到達予想時間を算出する予想時間算出ステップと、
前記到達可能性検査部は、前記プログラムの前記検査に対する検査制限時間のうち残りの残検査制限時間を前記仕様到達予想時間が超過する場合には、前記検査を途中で終了する検査終了ステップと
を備える検査時間制御方法。
Among search depths representing the number of times the executable statement of the program to be examined is executed, the shortest search depth required to change the state from the initial state of the program to a specification satisfaction state indicating that the inspection specification of the program is satisfied Shortest search depth calculation step for calculating
In the program, a test execution step for performing a test of whether or not it is possible to transition the state to the specification satisfaction state for each search depth;
An inspection time output step by depth for outputting an inspection time by depth required for the inspection at each of the search depths;
Each time the reachability inspection unit completes the inspection for each search depth, an expected time calculation step of calculating a specification arrival time that is an expected time required to complete the inspection to the shortest search depth;
The reachability inspection unit includes an inspection ending step for ending the inspection halfway when the remaining expected time limit for the inspection exceeds the remaining inspection time limit of the inspection time limit for the inspection of the program. An inspection time control method provided.
請求項10に記載の検査時間制御方法であって、前記予想時間算出ステップは、
これから前記検査が行われるべき前記探索深度の各々について前記検査に要すると予想する深度別探索時間算出ステップと、
前記予想深度別探索時間を合計することによって、前記仕様到達予想時間を算出する深度別探索時間合計ステップと
を含む検査時間制御方法。
The inspection time control method according to claim 10, wherein the expected time calculation step includes:
A depth-specific search time calculation step for predicting that the inspection is required for each of the search depths from which the inspection is to be performed;
An inspection time control method comprising: a search time by depth step for calculating the expected arrival time by adding the search times by expected depth.
請求項11に記載の検査時間制御方法であって、前記深度別探索時間算出ステップは、
前記深度別探索時間に基づいて、前記予想深度別探索時間を算出するステップ
を含む検査時間制御方法。
The inspection time control method according to claim 11, wherein the depth-specific search time calculation step includes:
An inspection time control method comprising: calculating the search time for each predicted depth based on the search time for each depth.
請求項11または請求項12に記載の検査時間制御方法であって、前記深度別探索時間算出ステップは、
前記到達可能性検査部が前記探索深度のうち探索深度nの前記検査を完了したときに、前記探索深度nの前記深度別探索時間と前記探索深度のうち探索深度n−1の深度別探索時間との差分に基づいて、前記予想深度別探索時間を算出するステップ
を含む検査時間制御方法。
The inspection time control method according to claim 11 or 12, wherein the search time calculation step for each depth includes:
When the reachability inspection unit completes the inspection at the search depth n of the search depths, the search time by the depth of the search depth n and the search time by the depth of the search depth n-1 of the search depths An inspection time control method including a step of calculating the search time for each predicted depth based on a difference between the search time and the expected depth.
請求項11から請求項13までのいずれかに記載の検査時間制御方法であって、前記深度別探索時間算出ステップは、
前記予想探索深度別探索時間を算出する探索深度x、探索深度xの前記予想深度別探索時間g(x)、探索深度iの時の前記深度別探索時間f(i)として、
g(x)={f(n)−f(n−1)}×(x−n)+f(n)
に基づいて、前記予想深度別探索時間を算出するステップ
を含む検査時間制御方法。
The inspection time control method according to any one of claims 11 to 13, wherein the search time calculation step for each depth includes:
As the search depth x for calculating the search time by the expected search depth, the search time by the expected depth of the search depth x, g (x), and the search time by depth f (i) at the search depth i,
g (x) = {f (n) -f (n-1)} * (xn) + f (n)
An inspection time control method including the step of calculating the search time for each predicted depth based on the above.
請求項10から請求項14までのいずれかに記載の検査時間制御装置であって、前記検査終了ステップは、
前記到達可能性検査部が探索深度nの前記検査を完了したときに、探索深度0から探索深度nまでの前記深度別検査時間を合計した時間を、前記検査制御時間から減算することによって前記残検査制限時間を算出するステップ
を含む検査時間制御方法。
The inspection time control device according to any one of claims 10 to 14, wherein the inspection end step includes:
When the reachability inspection unit completes the inspection at the search depth n, the remaining time is obtained by subtracting, from the inspection control time, the total time of the inspection times by depth from the search depth 0 to the search depth n. An inspection time control method including a step of calculating an inspection time limit.
請求項10から請求項15までのいずれかに記載の検査時間制御方法であって、前記最短探索深度算出ステップは、
前記プログラムと前記検査仕様に基づいて、前記プログラムの前記初期状態から前記仕様充足状態までの状態遷移モデルを作成するステップと、
前記状態遷移モデルに基づいて、前記最短探索深度を算出するステップと
を含む検査時間制御方法。
The inspection time control method according to any one of claims 10 to 15, wherein the shortest search depth calculation step includes:
Creating a state transition model from the initial state of the program to the specification satisfaction state based on the program and the inspection specification;
An inspection time control method comprising: calculating the shortest search depth based on the state transition model.
請求項16に記載の検査時間制御方法であって、前記状態遷移モデルに基づいて前記最短探索深度を算出するステップは、
前記状態遷移モデルを各状態での条件分岐を考慮しない有向グラフとして扱い、前記初期状態から前記仕様充足状態まで到達するための最短経路での前記状態遷移数を求めることにより前記最短探索深度を算出するステップ
を含む検査時間制御方法。
The inspection time control method according to claim 16, wherein the step of calculating the shortest search depth based on the state transition model includes:
Treat the state transition model as a directed graph that does not consider conditional branching in each state, and calculate the shortest search depth by obtaining the number of state transitions in the shortest path from the initial state to the specification satisfaction state An inspection time control method including steps.
請求項10から請求項17までのいずれかに記載の検査時間制御方法であって、
前記最短探索深度算出ステップは、
前記状態遷移モデルを記憶装置へ保存するステップと、
前記記憶装置に保存された前記状態遷移モデルに基づいて前記最短探索深度を算出するステップと、
前記最短探索深度を前記記憶装置へ保存するステップと、
前記検査実行ステップは、
前記深度別探索時間を前記記憶装置へ保存するステップと、
前記仕様到達予想時間算出ステップは、
前記記憶装置に保存された前記最短探索深度と前記深度別探索時間とに基づいて前記仕様到達予想時間を算出するステップと
をさらに備える検査時間制御方法。
An inspection time control method according to any one of claims 10 to 17,
The shortest search depth calculation step includes:
Storing the state transition model in a storage device;
Calculating the shortest search depth based on the state transition model stored in the storage device;
Storing the shortest search depth in the storage device;
The inspection execution step includes:
Storing the search time by depth in the storage device;
The expected specification arrival time calculating step includes:
An inspection time control method, further comprising: calculating the expected specification arrival time based on the shortest search depth and the search time by depth stored in the storage device.
請求項10から請求項18までのいずれかに記載の検査時間制御方法を実現するためのコンピュータプログラム。 A computer program for realizing the inspection time control method according to any one of claims 10 to 18.
JP2007289334A 2007-11-07 2007-11-07 Inspection time control apparatus, method, and program Expired - Fee Related JP4947427B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007289334A JP4947427B2 (en) 2007-11-07 2007-11-07 Inspection time control apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007289334A JP4947427B2 (en) 2007-11-07 2007-11-07 Inspection time control apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2009116643A true JP2009116643A (en) 2009-05-28
JP4947427B2 JP4947427B2 (en) 2012-06-06

Family

ID=40783724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007289334A Expired - Fee Related JP4947427B2 (en) 2007-11-07 2007-11-07 Inspection time control apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP4947427B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011154671A (en) * 2009-12-28 2011-08-11 Canon It Solutions Inc Electronic mail audit device, control method therefor, and program
JP2012174166A (en) * 2011-02-24 2012-09-10 Mitsubishi Electric Corp Program testing apparatus, program testing method for program testing apparatus, and program testing program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1063537A (en) * 1996-08-21 1998-03-06 Fujitsu Ltd Property verifying method and device therefor
JPH10289124A (en) * 1997-02-17 1998-10-27 Nippon Steel Corp Data flow abnormality check device
JP2000181939A (en) * 1998-12-17 2000-06-30 Fujitsu Ltd Method and device for verifying logical unit and recording medium
JP2003030270A (en) * 2001-07-19 2003-01-31 Nec Corp Method and device for verifying property of synchronous sequential circuit
JP2004005399A (en) * 2002-04-05 2004-01-08 Sharp Corp Method and device for testing software
JP2004005674A (en) * 2002-05-30 2004-01-08 Nec Corp Efficient bound model inspecting method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1063537A (en) * 1996-08-21 1998-03-06 Fujitsu Ltd Property verifying method and device therefor
JPH10289124A (en) * 1997-02-17 1998-10-27 Nippon Steel Corp Data flow abnormality check device
JP2000181939A (en) * 1998-12-17 2000-06-30 Fujitsu Ltd Method and device for verifying logical unit and recording medium
JP2003030270A (en) * 2001-07-19 2003-01-31 Nec Corp Method and device for verifying property of synchronous sequential circuit
JP2004005399A (en) * 2002-04-05 2004-01-08 Sharp Corp Method and device for testing software
JP2004005674A (en) * 2002-05-30 2004-01-08 Nec Corp Efficient bound model inspecting method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011154671A (en) * 2009-12-28 2011-08-11 Canon It Solutions Inc Electronic mail audit device, control method therefor, and program
JP2012174166A (en) * 2011-02-24 2012-09-10 Mitsubishi Electric Corp Program testing apparatus, program testing method for program testing apparatus, and program testing program

Also Published As

Publication number Publication date
JP4947427B2 (en) 2012-06-06

Similar Documents

Publication Publication Date Title
JP6607565B2 (en) Integrated automated test case generation for safety critical software
JP5107131B2 (en) Test case generation device, generation method thereof, and program for test case generation
WO2021042924A1 (en) Inspection robot, inspection system, and inspection method
US9891959B2 (en) Stage-aware performance modeling for computer cluster sizing
KR20110130366A (en) Maintaining time series models for information technology system parameters
US9639454B2 (en) Computer-readable recording medium storing therein test data generating program, test data generating method, test data generating apparatus and information processing system
US8832839B2 (en) Assessing system performance impact of security attacks
JP2015049606A (en) Management system, management object device, management device, method, and program
US10929265B2 (en) Optimizing automated interactions with web applications
JP4947427B2 (en) Inspection time control apparatus, method, and program
US8972706B2 (en) Performance in predicting branches
KR101656012B1 (en) IT Infra Quality Monitoring System and Method therefor
JP2018014107A (en) Approximate computing for application performance in heterogeneous systems
JP5304972B1 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
US10908902B2 (en) Distance based branch prediction and detection of potential call and potential return instructions
JP2009134360A (en) Model inspection system, model inspection method, and model inspection program
Godara et al. A review of studies on change proneness prediction in object oriented software
US11561801B2 (en) Predicting execution duration for user-defined functions on function-as-a-service (FaaS) cloud computing platforms
US10990405B2 (en) Call/return stack branch target predictor to multiple next sequential instruction addresses
US9239927B2 (en) Static analysis for discovery of timing attack vulnerabilities in a computer software application
JP2016218636A (en) System model generation assist device, system model generation assist method, and program
US10180999B2 (en) Model generating device and method
US10921167B1 (en) Methods and apparatus for validating event scenarios using reference readings from sensors associated with predefined event scenarios
JP5807732B2 (en) Performance prediction apparatus, performance prediction method, and performance prediction program
JP6761788B2 (en) Predictor, prediction method and prediction program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110715

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110913

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111003

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111208

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120124

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: 20120210

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120223

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

Free format text: PAYMENT UNTIL: 20150316

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees