JP2011008628A - Program model inspection method and program model inspection program - Google Patents

Program model inspection method and program model inspection program Download PDF

Info

Publication number
JP2011008628A
JP2011008628A JP2009152826A JP2009152826A JP2011008628A JP 2011008628 A JP2011008628 A JP 2011008628A JP 2009152826 A JP2009152826 A JP 2009152826A JP 2009152826 A JP2009152826 A JP 2009152826A JP 2011008628 A JP2011008628 A JP 2011008628A
Authority
JP
Japan
Prior art keywords
function
execution
state
program
current state
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
JP2009152826A
Other languages
Japanese (ja)
Other versions
JP5321286B2 (en
Inventor
Tadahiro Uehara
忠弘 上原
Kazuki Munakata
一樹 宗像
Kenji Oki
憲二 大木
Asako Katayama
朝子 片山
Yoshiharu Maeda
芳晴 前田
Shoichiro Fujiwara
翔一朗 藤原
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009152826A priority Critical patent/JP5321286B2/en
Publication of JP2011008628A publication Critical patent/JP2011008628A/en
Application granted granted Critical
Publication of JP5321286B2 publication Critical patent/JP5321286B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program model inspection which avoids a phenomenon in which functions to be inspected are not executed owing to the order of inspection of program models, safely restricts the number of execution times of the functions, and reduces the execution time for program model inspection.SOLUTION: In the program model inspection device, the program model inspection executes steps of: suppressing function execution to end the inspection of execution sequence of functions and associating the function with the current state to record the function suppressing the execution in an execution suppressing function table with the function suppressing the execution defined therein when the number of execution times of executable functions in the current state is equal to or more than the upper limit of execution times; determining whether there is a combination of the current state and executable functions in the current state in the execution suppressing function table when transition to the current station is already done in the other function execution sequence; and executing the functions only when such a combination is found in the determination step.

Description

本発明は、プログラムモデル検査の検査時間を削減するプログラムモデル検査方法、プログラムモデル検査プログラムに関する。   The present invention relates to a program model checking method and a program model checking program for reducing an inspection time of program model checking.

プログラムモデル検査は、対象プログラムの規模が大きくなるにつれて検査時間が増大する。つまり、対象のプログラムの規模が大きくなると探索する状態遷移グラフが巨大になり、探索時間が膨大になる。   In the program model check, the check time increases as the size of the target program increases. That is, as the scale of the target program increases, the state transition graph to be searched becomes huge, and the search time becomes enormous.

そこで、従来は関数の実行回数に制限を設けることで現実的な時間で計算可能な規模に探索範囲を抑える方法が用いられている。例えば、実行する関数を選択する際、その状態に至る関数実行系列のなかでN回呼び出だされた関数は除外するという制限をいれて規模を抑える技術が知られている。   Therefore, conventionally, a method of limiting the search range to a scale that can be calculated in a realistic time by setting a limit on the number of times the function is executed is used. For example, when a function to be executed is selected, a technique is known that reduces the scale by excluding a function that has been called N times in a function execution sequence that reaches that state.

また以下の2つの例はプログラムモデル検査の例ではないが、関数の実行回数を制限することで処理すべき規模を抑えた技術の例である。例えば、人手によるシミュレーションベクトルの作り直しやソフトウェアの作り直しを必要とせずに、不要なシミュレーションの繰返しを避けることが可能な論理検証の高速化手法が知られている。すなわち、シミュレータのシミュレーションモデルがメインルーチンを動作させることによってソフトウェアのシミュレーションを行い。トレーサがシミュレーションモデルによるメインルーチンの動作をトレースし、同じルーチンが繰返し行われることを検出すると、そのルーチンの代行をエージェントに指示する。エージェントはそのルーチンを代行して実行し、その結果をシミュレーションモデルに渡す。   The following two examples are not examples of program model checking, but are examples of techniques in which the scale to be processed is suppressed by limiting the number of executions of a function. For example, there is known a high-speed logic verification method that can avoid unnecessary repetition of simulation without requiring manual re-creation of simulation vectors or software. In other words, the simulation model of the simulator performs software simulation by operating the main routine. When the tracer traces the operation of the main routine by the simulation model and detects that the same routine is repeated, the tracer instructs the agent to substitute the routine. The agent executes the routine on its behalf and passes the result to the simulation model.

また、プログラムのテスト方法において、テスト対象プログラムに含まれる頻出経路の繰り返しの計測を抑止し、無用なオーバーヘッドを回避する方法が知られている。すなわち、情報処理装置のカバレジ計測制御プログラムは、計測対象プログラムの実行によって通過した各命令あるいは少なくとも分岐命令の通過回数がその測定上限回数に達したか否か判定する。カバレジ計測プログラムは、その命令が測定回数に達していない場合に呼び出され、その命令の通過回数を更新する。   As a program test method, a method is known in which the repeated measurement of frequent paths included in a test target program is suppressed and unnecessary overhead is avoided. In other words, the coverage measurement control program of the information processing apparatus determines whether or not the number of passages of each instruction or at least a branch instruction passed through the execution of the measurement target program has reached the upper limit number of measurements. The coverage measurement program is called when the instruction has not reached the number of measurements, and updates the number of times the instruction has passed.

しかしながら、プログラムモデル検査で関数の実行回数を制限して検査を実施した場合、ある状態から実行する関数の選択順の違いによって、探索の結果できあがる状態遷移グラフが異なる場合がある。例えば、ある状態から2つの関数が実行可能な場合において、一方の関数を先に探索するとすべての関数を実行できるが、他方の関数を先に実行して探索すると一方の関数と他方の関数以外の関数を呼び出す前に実行回数の制限により探索が終了してしまうという場合がある。   However, when checking is performed by limiting the number of executions of a function in program model checking, the state transition graph obtained as a result of the search may differ depending on the selection order of functions to be executed from a certain state. For example, when two functions can be executed from a certain state, if one function is searched first, all functions can be executed, but if the other function is executed first and searched, one function and the other function are not included. In some cases, the search ends due to a limit on the number of executions before calling this function.

プログラムモデル検査で関数の実行回数を制限して検査を実施する状態遷移図と表を図21に示す。図21のA、B、Cに示す例では、実行可能な関数として開始関数、商品選択関数、入力完了関数、購入関数があり、各関数に実行回数の制限回数として1回が予め設定されているとする。   FIG. 21 shows a state transition diagram and a table for performing the inspection by limiting the number of executions of the function in the program model inspection. In the example shown in FIGS. 21A, 21B, and 21C, there are a start function, a product selection function, an input completion function, and a purchase function as executable functions. Each function is preset with a limit of the number of execution times. Suppose that

まず、図21のAでは初期状態において(1)開始関数が実行されると状態1に遷移し、開始関数に関連付けて実行回数1が記録される(Aの表参照)。次に、図21のBでは状態1において、(2)商品選択関数が実行され状態2に移行し、商品選択関数に関連付けて実行回数1が記録される(Bの表参照)。次に、状態2において商品選択関数を実行しようとした場合、既に商品選択関数は実行されているため、予め設定した制限回数1回に基づいて商品選択関数の実行を制限されてしまう。よって、図21のBの状態2では入力完了関数を選択し状態3に遷移する。状態3では購入関数を選択して実行する。   First, in FIG. 21A, in the initial state, (1) when the start function is executed, the state transits to state 1, and the execution count 1 is recorded in association with the start function (see the table of A). Next, in FIG. 21B, in state 1, (2) the product selection function is executed and the state shifts to state 2, and the execution count 1 is recorded in association with the product selection function (see table B). Next, when the product selection function is to be executed in the state 2, since the product selection function has already been executed, the execution of the product selection function is restricted based on the preset limit number of one. Therefore, in the state 2 of FIG. 21B, the input completion function is selected and the state is changed to the state 3. In state 3, a purchase function is selected and executed.

図21のCに示す例では、初期状態において(1)開始関数が実行して状態1に遷移し、状態1において(3)入力完了関数を実行して状態4に遷移する。このとき開始関数と入力完了関数に関連付けられて実行回数1が記録される(Cの表参照)。この場合、開始関数と入力完了関数は、予め設定した制限回数1回に基づいて開始関数と入力完了関数の実行を制限されてしまうため、(4)商品選択関数を選択し状態2に遷移する。しかし、状態2に遷移したときには開始関数、入力完了関数、商品選択関数は既に1回実行されているため状態3に移行することができなくなる(Cの表参照)。すなわち、制限回数により状態3に遷移しても購入関数が実行することができないため、検査対象の関数が実行されないまま探索が終了してしまい検査を十分に行えない。   In the example shown in FIG. 21C, in the initial state, (1) the start function executes and transitions to state 1, and in state 1 (3) the input completion function executes and transitions to state 4. At this time, the number of executions 1 is recorded in association with the start function and the input completion function (see table C). In this case, since the start function and the input completion function are restricted from executing the start function and the input completion function based on a preset limit number of times, (4) the product selection function is selected and the state transitions to state 2. . However, since the start function, the input completion function, and the product selection function are already executed once when the state 2 is transitioned to, it becomes impossible to transition to the state 3 (see table C). In other words, since the purchase function cannot be executed even if the state is shifted to the state 3 due to the limited number of times, the search ends without executing the function to be inspected, and the inspection cannot be performed sufficiently.

特開2000−20346号公報JP 2000-20346 A 特開2005−339204号公報JP-A-2005-339204

上記のような実情に鑑みてなされたものであり、プログラムモデル検査の探索順序に起因して検査対象の関数が実行されなくなる現象を回避し、関数の実行回数の制限を安全に行うことができ、プログラムモデル検査の実行時間を削減するプログラムモデル検査方法、プログラムモデル検査プログラムを提供することを目的とする。   It was made in view of the above situation, and it is possible to avoid the phenomenon that the function to be checked is not executed due to the search order of the program model checking, and to safely limit the number of times the function is executed. Another object of the present invention is to provide a program model checking method and a program model checking program for reducing the execution time of program model checking.

プログラムモデル検査において、複数の関数実行系列を備える検査対象プログラムにおける各状態から実行可能な関数のうち、該関数実行系列内での実行回数が実行回数上限値未満のものを実行する。現在の状態から実行可能な関数の実行回数が、上記実行回数上限値以上である場合に、該関数の実行を抑止して該関数実行系列の検査を終了し、該関数を該現在の状態に関連付けて実行を抑止する関数を定義した実行抑止関数テーブルに記録する。他の関数実行系列において、現在の状態への遷移がすでに行われているとき、上記実行抑止関数テーブルに該現在の状態と該現在の状態から実行可能な関数との組み合わせがあるか否かを判定し、判定において上記組み合わせがある場合にのみ該関数を実行する。   In the program model check, a function that can be executed from each state in a test target program having a plurality of function execution series is executed with the number of executions within the function execution series being less than the upper limit of execution times. If the number of executions of a function that can be executed from the current state is equal to or greater than the upper limit value of the number of executions, the execution of the function is suppressed and the inspection of the function execution sequence is terminated, and the function is brought into the current state. Record in the execution suppression function table that defines the functions that are associated and suppress execution. In another function execution sequence, when transition to the current state has already been performed, whether or not there is a combination of the current state and a function executable from the current state in the execution suppression function table The function is executed only when there is a combination in the determination.

また、実行抑止関数テーブルにおいて、予め設定した数以上の状態と関連付けられている関数が検出されたときに、該関数の上記実行回数上限値を増加させる。   In addition, when a function associated with a predetermined number or more states is detected in the execution suppression function table, the upper limit value of the number of executions of the function is increased.

プログラムモデル検査の探索順序に起因して検査対象の関数が実行されなくなる現象を回避し、関数の実行回数の制限を安全に行うことができ、プログラムモデル検査の実行時間を削減することができる。   It is possible to avoid the phenomenon that the function to be checked is not executed due to the search order of the program model checking, to safely limit the number of times the function is executed, and to reduce the execution time of the program model checking.

プログラムモデル検査装置の構成の一例について示した図である。It is the figure shown about an example of the structure of the program model test | inspection apparatus. 実施例1のプログラムモデル検査装置の構成を示す図である。It is a figure which shows the structure of the program model test | inspection apparatus of Example 1. FIG. Aは商品注文システムの表示画面を示す図である。Bは商品注文システムの状態遷移を示す図である。Cは商品注文システムの状態遷移グラフ管理テーブルの一例を示す図である。A is a figure which shows the display screen of a goods ordering system. B is a figure which shows the state transition of a goods order system. C is a figure which shows an example of the state transition graph management table of a goods ordering system. プログラム制御部の動作を示す図を示す(プログラム制御処理)。The figure which shows operation | movement of a program control part is shown (program control processing). Aは初期状態で開始関数が実行され状態1に遷移する場合の状態遷移を示す図である。Bは初期状態の実行選択肢テーブルを示す図である。Cは状態1の実行選択肢テーブルを示す図である。A is a figure which shows a state transition in case a start function is performed in an initial state, and it changes to the state 1. FIG. B is a diagram showing an execution option table in an initial state. C is a diagram showing an execution option table in state 1. FIG. Aは初期状態で開始関数が実行され状態1に遷移し、状態1から商品選択関数を実行することにより状態2に遷移した場合の状態遷移を示す図である。Bは状態1、2の実行系列テーブルを示す図である。A is a diagram showing a state transition in a case where the start function is executed in the initial state and the state transitions to the state 1, and the state selection transitions from the state 1 to the state 2 by executing the product selection function. B is a diagram showing an execution sequence table in states 1 and 2. FIG. Aは状態2において商品選択をしても状態2に戻るような状態遷移を示す図である。Bは実行系列テーブルを示す図である。Cは実行選択肢テーブルを示す図である。A is a figure which shows the state transition which returns to the state 2 even if it selects goods in the state 2. B is a diagram showing an execution sequence table. C is a diagram showing an execution option table. Aは実行可能関数絞込部による実行回数による選択肢の絞込みのフローを示す図である。Bは実行系列テーブルを示す図である。Cは実行回数テーブルを示す図である。D、Fは実行選択肢テーブルを示す図である。Eは実行抑止関数テーブルを示す図である。A is a diagram showing a flow of narrowing down options based on the number of executions by the executable function narrowing unit. B is a diagram showing an execution sequence table. C is a diagram showing an execution count table. D and F are diagrams showing an execution option table. E is a diagram showing an execution inhibition function table. 実行可能関数絞込処理を説明するための状態遷移の例を示す図である。It is a figure which shows the example of the state transition for demonstrating executable function narrowing-down process. 実行可能関数絞込処理の動作を示すフロー図である。It is a flowchart which shows the operation | movement of an executable function narrowing-down process. 実行可能関数絞込処理を説明するための状態遷移の例を示す図である。It is a figure which shows the example of the state transition for demonstrating executable function narrowing-down process. Aは実行回数により関数の実行抑止を行った状態に再度到達した場合の実行可能関数絞込部の実行回数による選択肢の絞込みのフローを示す図である。Bは実行系列テーブルを示す図である。Cは実行回数テーブルを示す図である。D、Fは実行選択肢テーブルを示す図である。Eは実行抑止関数テーブルを示す図である。A is a diagram showing a flow of narrowing down options according to the number of execution times of the executable function narrowing unit when the execution of the function is inhibited again according to the number of executions. B is a diagram showing an execution sequence table. C is a diagram showing an execution count table. D and F are diagrams showing an execution option table. E is a diagram showing an execution inhibition function table. 実行抑止関数テーブルを示す図である。It is a figure which shows an execution suppression function table. 実施例2のプログラムモデル検査装置の構成を示す図である。It is a figure which shows the structure of the program model test | inspection apparatus of Example 2. FIG. Aは実施例2の動作を示すフロー図を示す。Bは実行回数上限テーブルを示す図である。A shows the flowchart which shows operation | movement of Example 2. FIG. B is a diagram showing an execution count upper limit table. 実施例3のプログラムモデル検査装置の構成を示す図である。It is a figure which shows the structure of the program model test | inspection apparatus of Example 3. 実施例3の動作を示すフロー図である(モデル検査再実行処理)。It is a flowchart which shows operation | movement of Example 3 (model check re-execution process). Aは1回目の状態遷移を示す図である。Bは実行抑止関数テーブルを示す図である。Cは実行回数上限テーブルを示す図である。A is a diagram illustrating a first state transition. B is a diagram showing an execution inhibition function table. C is a diagram illustrating an execution count upper limit table. Aは2回目の状態遷移を示す図である。Bは実行抑止関数テーブルを示す図である。Cは実行回数上限テーブルを示す図である。A is a diagram showing a second state transition. B is a diagram showing an execution inhibition function table. C is a diagram illustrating an execution count upper limit table. 実施形態の装置を実現できるコンピュータのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the computer which can implement | achieve the apparatus of embodiment. A〜Cはプログラムモデル検査で関数の実行回数を制限して検査を実施する従来例を示す遷移図と表である。FIGS. 8A to 8C are a transition diagram and a table showing a conventional example in which checking is performed by limiting the number of executions of a function in program model checking.

以下図面に基づいて、本発明の実施形態について詳細に説明する。
(実施例1)
(構成)
図1はプログラムモデル検査装置の一例について示した図である。図1はプログラムモデル検査を実施するときに用いる構成例を示す図である。ここで、プログラムモデル検査は、テスト対象システムの振舞いを設計書・仕様書から取り出し、モデル検査の専用言語で記述したソフトウェア(擬似システム)を作成し、当該擬似システムにテストデータを入力することで実施するテストである。プログラムモデル検査を行うためには一般に対象プログラムを動かすドライバとデータベースやネットワークなどの外部環境を抽象化するためのスタブが必要となる。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
Example 1
(Constitution)
FIG. 1 is a diagram showing an example of a program model checking apparatus. FIG. 1 is a diagram showing a configuration example used when program model checking is performed. Here, program model checking involves extracting the behavior of the test target system from the design document / specification, creating software (pseudo system) described in the model checking dedicated language, and inputting test data to the pseudo system. It is a test to be performed. In order to perform program model checking, a driver for moving the target program and a stub for abstracting an external environment such as a database or a network are generally required.

プログラムモデル検査装置5は、ドライバ1を介してクライアントの代わりに検査対象プログラム2に対してユーザ操作を模倣した入力データ6を検査対象プログラム2に入力して、検査対象プログラム2とデータベーススタブ3とネットワークスタブ4に対して網羅的な検査を行う。そして、プログラムモデル検査装置5は、検査結果がプロパティ7に格納されている内容(機能仕様)を満たしているかをチェックして判定を行う。
なお、プログラムモデル検査装置5は、上記説明したプログラムモデル検査を実行するソフトウェアを、コンピュータ(PCなど)にインストールした装置でもよい。
The program model checking device 5 inputs the input data 6 imitating the user operation with respect to the inspection target program 2 instead of the client via the driver 1 to the inspection target program 2, and the inspection target program 2, the database stub 3, Exhaustive inspection is performed on the network stub 4. Then, the program model checking device 5 checks whether or not the check result satisfies the content (functional specification) stored in the property 7 and makes a determination.
Note that the program model checking device 5 may be a device in which software for executing the above-described program model checking is installed in a computer (such as a PC).

図2はプログラムモデル検査装置5の構成を示す図である。プログラムモデル検査装置5は、プログラム制御部21、プログラム実行部22、実行可能関数絞込部23、記録部24を備えている。なお、プログラム制御部21、プログラム実行部22、実行可能関数絞込部23は、CPUやプログラマブルなデバイスを用いて実現することもできる。また、プログラム制御部21、プログラム実行部22、実行可能関数絞込部23の機能を実現するソフトウェアを、コンピュータ(PCなど)にインストールしたものでもよい。また、記録部24はCPUに内蔵されているメモリでもよいし外部に設けた記録装置などであってもよい。   FIG. 2 is a diagram showing the configuration of the program model checking device 5. The program model checking device 5 includes a program control unit 21, a program execution unit 22, an executable function narrowing unit 23, and a recording unit 24. In addition, the program control part 21, the program execution part 22, and the executable function narrowing down part 23 can also be implement | achieved using CPU and a programmable device. Further, software that realizes the functions of the program control unit 21, the program execution unit 22, and the executable function narrowing unit 23 may be installed in a computer (such as a PC). The recording unit 24 may be a memory built in the CPU or a recording device provided outside.

プログラム制御部21は、検査対象プログラムから内部状態と実行可能関数を取得し、実行可能関数絞込部23に実行可能関数の絞込みを指示し、絞り込んだ実行選択肢テーブル26の中から関数を一つ選択し、プログラム実行部22にその関数での実行を指示する。   The program control unit 21 acquires the internal state and the executable function from the inspection target program, instructs the executable function narrowing unit 23 to narrow down the executable functions, and selects one function from the narrowed execution option table 26. Select and instruct the program execution unit 22 to execute the function.

プログラム実行部22は、プログラム制御部21により指示された関数によりプログラムを実行する。
実行可能関数絞込部23は、実行系列テーブル27を参照して実行回数が上限に到達した関数を実行選択肢テーブル26から削除し、実行抑止関数テーブル29に追加する。また、別の実行系列において実行回数の上限に到達せずに実行抑止関数テーブル29に記録されている関数は実行抑止関数テーブル29から削除し、実行選択肢テーブル26に追加する。
The program execution unit 22 executes the program using a function instructed by the program control unit 21.
The executable function narrowing unit 23 refers to the execution sequence table 27, deletes the function whose number of executions has reached the upper limit from the execution option table 26, and adds it to the execution suppression function table 29. In addition, a function recorded in the execution suppression function table 29 without reaching the upper limit of the number of executions in another execution series is deleted from the execution suppression function table 29 and added to the execution option table 26.

記録部24は、状態遷移グラフ管理テーブル25、実行選択肢テーブル26、実行系列テーブル27、実行回数テーブル28、実行抑止関数テーブル29を有している。
状態遷移グラフ管理テーブル25は、状態遷移グラフを「遷移元状態」「実行関数」「遷移先状態」により示すテーブルである。状態遷移グラフ管理テーブル25の「遷移元状態」にはプログラムの関数が実行されるたびに遷移元のプログラムの状態を示す識別番号などが記録され、「実行関数」には実行した関数を識別するために関数名などが記録され、「遷移先状態」には現在のプログラムの状態が記録される。なお、「遷移元状態」「実行関数」「遷移先状態」は、プログラム制御部21により「遷移元状態」に関連付けて「実行関数」と「遷移先状態」が記録される。
The recording unit 24 includes a state transition graph management table 25, an execution option table 26, an execution series table 27, an execution frequency table 28, and an execution suppression function table 29.
The state transition graph management table 25 is a table showing a state transition graph by “transition source state”, “execution function”, and “transition destination state”. In the “transition source state” of the state transition graph management table 25, an identification number indicating the state of the transition source program is recorded every time the program function is executed, and the executed function is identified in the “execution function”. Therefore, the function name and the like are recorded, and the current program state is recorded in the “transition destination state”. The “transition source state”, “execution function”, and “transition destination state” are recorded by the program control unit 21 in association with the “transition source state”.

検査対象プログラムを商品注文システムとし、図3のAに示す表示画面から商品を購入する例を用いて状態遷移グラフの生成について説明する。
商品注文システムは、PCなどのディスプレイに表示され商品購入画面31の入力ボックス32に、購入する商品に対応する商品コードを入力して商品を注文するものとする。商品注文システムは、商品コード入力後、ユーザが「商品選択」ボタン33を画面上で押下(選択)すると、「入力完了」ボタン34、「入力変更」ボタン35がアクティブ状態になる。この状態で「入力完了」ボタン34を画面上で押下(選択)すると購入する商品が決定され、「購入」ボタン36がアクティブ状態になり、「購入」ボタン36を画面上で押下(選択)すると、ネットワークを介して注文が発注される。「入力変更」ボタン35を画面上で押下(選択)すると、再度商品コードを入力する状態に遷移する。
The generation of the state transition graph will be described using an example in which the inspection target program is a product ordering system and a product is purchased from the display screen shown in FIG.
In the merchandise ordering system, a merchandise code corresponding to a merchandise to be purchased is entered into an input box 32 of a merchandise purchase screen 31 displayed on a display such as a PC and the merchandise is ordered. In the product ordering system, after the product code is input, when the user presses (selects) the “product selection” button 33 on the screen, the “input completion” button 34 and the “input change” button 35 are activated. In this state, when the “input complete” button 34 is pressed (selected) on the screen, a product to be purchased is determined, the “purchase” button 36 becomes active, and when the “purchase” button 36 is pressed (selected) on the screen. An order is placed through the network. When the “input change” button 35 is pressed (selected) on the screen, a transition is made to a state in which a product code is input again.

なお、商品購入画面31により入力された情報(商品コード、「商品選択」ボタン33、「入力完了」ボタン34、「入力変更」ボタン35、「購入」ボタン36、が選択されたときにシステムに入力される情報など)によって決まるシステム内部の状態を内部状態という。   It should be noted that when the information (product code, “product selection” button 33, “input completion” button 34, “input change” button 35, “purchase” button 36) input on the product purchase screen 31 is selected, The internal state of the system determined by the input information) is called the internal state.

図3のBに上記説明した商品注文システムの状態遷移を示し、図3のCに商品注文システムの状態遷移グラフ管理テーブル25を示す。
図3のBに示す状態遷移の例であれば、初期状態において「開始」が実行され、現在の状態である「状態1」に遷移する。このとき、状態遷移グラフ管理テーブル25には「遷移元状態」に「初期状態」、「実行関数」に「開始」、「遷移先状態」に「状態1」が記録される。
FIG. 3B shows the state transition of the product ordering system described above, and FIG. 3C shows the state transition graph management table 25 of the product ordering system.
In the example of the state transition shown in FIG. 3B, “Start” is executed in the initial state, and the current state is changed to “State 1”. At this time, in the state transition graph management table 25, “initial state” is recorded in “transition source state”, “start” is recorded in “execution function”, and “state 1” is recorded in “transition destination state”.

ここで、「状態1」が示す状態とは、ディスプレイに商品購入画面31が表示され、入力ボックス32から購入する商品に対応する商品コードが入力可能になり、商品コードを入力すると「商品選択」ボタン33と「入力完了」ボタン34を選択することが可能な状態である。   Here, the state indicated by “state 1” means that the product purchase screen 31 is displayed on the display, and the product code corresponding to the product to be purchased can be input from the input box 32. When the product code is input, “product selection” is entered. The button 33 and the “input complete” button 34 can be selected.

次に、「状態1」に示す状態からは、「商品選択」ボタン33を選択して「状態2」に遷移する場合と、「入力完了」ボタン34して「状態5」に遷移する場合が考えられる。そのため、図3のCの例では、「遷移元状態」の「状態1」に関連付けて「実行関数」に「商品選択」が記録され、「遷移先状態」に「状態2」が記録される。さらに、「遷移元状態」の「状態1」に関連付けて「実行関数」に「入力完了」が記録され、「遷移先状態」に「状態5」が記録される。また、「遷移元状態」の「状態2」〜「状態5」についても同様に、「遷移元状態」に関連付けて「実行関数」「遷移先状態」の内容が記録される。   Next, from the state shown in “state 1”, there are a case where the “product selection” button 33 is selected and transition is made to “state 2”, and a case where the “input completion” button 34 is transited to “state 5”. Conceivable. Therefore, in the example of FIG. 3C, “product selection” is recorded in “execution function” in association with “state 1” of “transition source state”, and “state 2” is recorded in “transition destination state”. . Furthermore, “input completion” is recorded in “execution function” in association with “state 1” of “transition source state”, and “state 5” is recorded in “transition destination state”. Similarly, the contents of “execution function” and “transition destination state” are recorded in association with “transition source state” for “state 2” to “state 5” of “transition source state”.

なお、本例では、記録する内容を「初期状態」「開始」「状態1」などと便宜上記載するが、実際の「遷移元状態」「遷移先状態」に対応するセルには「初期状態」「状態1」・・・などに対応する識別番号またはコードなどが記録される。また、「実行関数」にはプログラムソースで使用されている関数名などを用いる。   In this example, the contents to be recorded are described as “initial state”, “start”, “state 1”, etc. for convenience, but “initial state” is included in the cells corresponding to the actual “transition source state” and “transition destination state”. An identification number or code corresponding to “state 1”... Is recorded. The “execution function” uses a function name used in the program source.

実行選択肢テーブル26は、現在の状態を記録する「状態」と、現在の「状態」と関連付けて、現在の状態において実行可能な関数の関数名を記録する「選択肢」を有している。また、実行選択肢テーブル26の「状態」と「選択肢」には、それぞれ状態の識別番号と実行可能な関数の関数名がプログラム制御部21により関連付けられて記録される。   The execution option table 26 has a “state” that records the current state and a “option” that records the function name of a function that can be executed in the current state in association with the current “state”. Further, in the “state” and “option” of the execution option table 26, the state identification number and the function name of the executable function are recorded in association with each other by the program control unit 21.

実行系列テーブル27は、初期状態から現在の状態までの関数の実行系列を記録する。実行系列テーブル27は、遷移元の状態を識別する識別番号などを記録する「遷移元状態」と、実行した関数の関数名を記録する「実行関数」と、遷移先の状態を識別する識別番号などを記録する「遷移先状態」を有している。そして、実行系列テーブル27の「遷移元状態」「実行関数」「遷移先状態」に、遷移元状態の識別番号と関連付けて実行可能な関数の関数名と遷移先状態の識別番号がプログラム制御部21により記録される。   The execution sequence table 27 records the execution sequence of functions from the initial state to the current state. The execution sequence table 27 includes an “transition source state” for recording an identification number for identifying a transition source state, an “execution function” for recording a function name of an executed function, and an identification number for identifying a transition destination state. Etc. have a “transition destination state”. Then, in the “transition source state”, “execution function”, and “transition destination state” of the execution sequence table 27, the function name of the function that can be executed in association with the identification number of the transition source state and the identification number of the transition destination state are the program control unit. 21 is recorded.

実行回数テーブル28は、現在の実行系列において各関数の実行された回数を記録する。実行回数テーブル28は、関数の関数名を記録する「関数」と、対象の関数が実行された回数を記録する「実行回数」を有し、「関数」「実行回数」に、実行した関数の関数名と関連付けて対象の関数が実行された回数が、実行可能関数絞込部23により記録される。   The execution count table 28 records the number of times each function is executed in the current execution sequence. The execution count table 28 has a “function” that records the function name of the function and an “execution count” that records the number of times the target function has been executed. The number of times the target function is executed in association with the function name is recorded by the executable function narrowing unit 23.

実行抑止関数テーブル29は、各状態において実行回数制約によって実行しなかった関数を記録する。実行抑止関数テーブル29は、現在の状態を識別する識別番号などを記録する「状態」と、選択肢として除外した関数の関数名を記録する「抑止関数」を有する。また、「状態」「実行回数」に、現在の状態の識別番号と関連付けて選択肢として除外した関数の関数名が、実行可能関数絞込部23により記録される。   The execution suppression function table 29 records a function that has not been executed due to the execution frequency restriction in each state. The execution suppression function table 29 has a “state” that records an identification number for identifying the current state, and a “suppression function” that records a function name of a function excluded as an option. In addition, in “state” and “number of executions”, the function name of the function excluded as an option in association with the identification number of the current state is recorded by the executable function narrowing unit 23.

(動作説明)
プログラムモデル検査において、プログラム制御部21が、プログラムモデル検査を実行した検査対象プログラムの関数の実行後の状態を、現在の状態まで記録部に記録する。そして、実行可能関数絞込部23が、各状態において関数を実行した回数が予め設定された実行回数上限値以上であるとき、関数が実行を抑止する抑止関数であると判定し、抑止関数を上記状態に関連付けて記録部の実行抑止関数テーブルに記録する。また、関数の実行後の現在の状態がすでに実行済みであるとき、実行抑止関数テーブルの抑止関数と状態に基づいて、該現在の状態において実行可能な関数の実行を抑止したか否かを判定する、実行抑止再評価を行う。
(Description of operation)
In the program model check, the program control unit 21 records the state after execution of the function of the program to be checked that has executed the program model check in the recording unit up to the current state. Then, the executable function narrowing unit 23 determines that the function is a deterrence function that inhibits execution when the number of times the function is executed in each state is equal to or greater than a preset upper limit of the number of executions. The information is recorded in the execution suppression function table of the recording unit in association with the above state. Also, when the current state after the execution of the function has already been executed, it is determined whether execution of the function executable in the current state is suppressed based on the suppression function and the state in the execution suppression function table Re-evaluate execution suppression.

そして、現在の状態から実行可能な関数を抽出し、抽出した関数を実行した回数が予め設定された実行回数上限値より小であり、実行が抑止されている関数を検出して、現在の状態から検出した関数のうちひとつをプログラム実行部21が実行する。   Then, an executable function is extracted from the current state, the number of times the extracted function is executed is smaller than a preset upper limit of the number of executions, and a function whose execution is suppressed is detected. The program execution unit 21 executes one of the functions detected from the above.

図4にプログラム制御部21の動作を示す図を示す(プログラム制御処理)。
ステップS1では、初期状態から次の状態への遷移するときに、プログラム制御部21が検査対象プログラム2に対してプログラムモデル検査を実行した現在の内部状態を抽出して記録部24に記録する。
FIG. 4 shows the operation of the program control unit 21 (program control processing).
In step S <b> 1, when the transition from the initial state to the next state is made, the program control unit 21 extracts the current internal state in which the program model check has been performed on the inspection target program 2 and records it in the recording unit 24.

例えば、上記商品注文システム31が、図5のAに示す初期状態で開始関数が実行され状態1に遷移する場合、プログラム制御部21により初期状態で実行可能な関数の情報、入力されたデータなどが、初期状態に対応する内部状態として抽出され、記録部24に記録される。   For example, when the product ordering system 31 executes the start function in the initial state shown in FIG. 5A and transitions to the state 1, information on the function executable by the program control unit 21 in the initial state, input data, etc. Are extracted as the internal state corresponding to the initial state and recorded in the recording unit 24.

ステップS2では、プログラム制御部21が現在の状態から実行可能な関数を検出し、現在の状態と関連付けて実行選択肢テーブル26に記録する。
例えば、上記説明した商品注文システムにプログラムモデル検査を行い、現在の状態が図5のAに示す初期状態の場合、プログラム制御部21が「初期状態」に対応する内部状態から実行可能な関数である開始関数を検出する。そして、実行選択肢テーブル26の「選択肢」に「初期状態」に関連付けて開始関数に対応する「開始」を記録する(図5のB)。
In step S2, the program control unit 21 detects an executable function from the current state and records it in the execution option table 26 in association with the current state.
For example, when the program model check is performed on the product ordering system described above and the current state is the initial state shown in FIG. 5A, the program control unit 21 is a function that can be executed from the internal state corresponding to the “initial state”. Detect a start function. Then, “start” corresponding to the start function is recorded in “option” of the execution option table 26 in association with the “initial state” (B in FIG. 5).

また、後述するステップS10から移行してきた場合、例えば現在の状態が図5のAに示す状態1の場合、プログラム制御部21が「状態1」に対応する内部状態から実行可能な関数である入力選択関数、商品選択関数を検出する。そして、実行選択肢テーブル26の「選択肢」に「状態1」に関連付けて入力選択関数、商品選択関数に対応する「商品選択」「入力完了」を記録する(図5のC)。   Further, when the process proceeds from step S10 described later, for example, when the current state is state 1 shown in FIG. 5A, the program control unit 21 is an input that is a function that can be executed from the internal state corresponding to “state 1”. A selection function and a product selection function are detected. Then, “product selection” and “input completion” corresponding to the input selection function and the product selection function are recorded in “option” of the execution option table 26 in association with “state 1” (C in FIG. 5).

ステップS3では、プログラム制御部21が状態遷移グラフ管理テーブル25を参照して、既に実行ずみの状態か、すなわち過去に検査した関数実行系列において該状態への遷移済みかを判定し、実行ずみでなければステップS4に移行し、実行ずみであればステップS5に移行する。   In step S3, the program control unit 21 refers to the state transition graph management table 25 to determine whether the state has already been executed, that is, whether the state has already been changed to the state in the function execution sequence examined in the past. If not, the process proceeds to step S4, and if completed, the process proceeds to step S5.

例えば、状態遷移グラフ管理テーブル25の「遷移元状態」と現在の状態を比較して、一致するものがあるかを検索する。一致する場合、実行ずみであるとしてステップS5に移行する。一致するものがない場合は実行ずみでないとしてステップS4に移行する。   For example, the “transition source state” in the state transition graph management table 25 is compared with the current state to search for a match. If they match, the process proceeds to step S5 because it has been executed. If there is no match, it is determined that it has not been executed and the process proceeds to step S4.

ステップS4(実行可能関数絞込処理)では実行可能関数絞込部23が選択肢の絞込みをする。実行可能関数絞込部23が、プログラムモデル検査時に実行された各関数の実行回数と、予め設定した実行回数上限値を比較して、実行回数上限値に達している関数を検出する。次に、該当する関数をキーにして実行選択肢テーブル26の「選択肢」から対応する関数を検出し、該「選択肢」に関連付けられた「状態」と該「選択肢」の内容を削除する。なお、選択肢の絞込み(実行可能関数絞込処理)の詳細については後述する。   In step S4 (executable function narrowing process), the executable function narrowing unit 23 narrows down the options. The executable function narrowing unit 23 compares the number of execution times of each function executed at the time of the program model check with a preset execution number upper limit value, and detects a function that has reached the execution number upper limit value. Next, the corresponding function is detected from the “option” in the execution option table 26 using the corresponding function as a key, and the “state” associated with the “option” and the contents of the “option” are deleted. The details of the selection of options (executable function screening process) will be described later.

ステップS5(実行抑止再評価処理)では、実行可能関数絞込部23が関数の実行を抑止したかを判定して、判定結果に基づいて実行選択肢テーブル26、実行抑止関数テーブル29を制御する。なお、実行抑止再評価(実行抑止再評価処理)の詳細については後述する。   In step S5 (execution suppression re-evaluation process), it is determined whether the executable function narrowing unit 23 has suppressed the execution of the function, and the execution option table 26 and the execution suppression function table 29 are controlled based on the determination result. Details of the execution suppression re-evaluation (execution suppression re-evaluation process) will be described later.

ステップS6では、プログラム制御部21が現在の状態に対応する実行可能な関数(選択肢)が残っているかを判定し、残っていればステップS7に移行し、残っていなければステップS11に移行する。   In step S6, the program control unit 21 determines whether or not an executable function (option) corresponding to the current state remains. If it remains, the process proceeds to step S7, and if not, the process proceeds to step S11.

例えば、プログラム制御部21が現在の状態をキーにして実行選択肢テーブル26の「状態」を検索して、対応する状態があれば選択肢が残っているのでステップS7に移行し、対応する状態がなければ選択肢が残っていないのでステップS11に移行する。   For example, the program control unit 21 searches the execution option table 26 for “state” using the current state as a key, and if there is a corresponding state, the option remains, so the process proceeds to step S7, and there is no corresponding state. If no option remains, the process proceeds to step S11.

ステップS7では、プログラム制御部21が現在の状態に対応する実行可能な関数(選択肢)のうちから任意の1つの関数を選択し、選択した関数を実行選択肢テーブル26から削除する。   In step S <b> 7, the program control unit 21 selects an arbitrary function from the executable functions (options) corresponding to the current state, and deletes the selected function from the execution option table 26.

例えば、図5のCに示した実行選択肢テーブル26のような場合、「状態1」に対応付けられた「入力完了」「商品選択」があるので、どちらか一方の関数を選択して選択した関数を実行する指示を、プログラム制御部21からプログラム実行部22にする。その後、例えば「商品選択」を選択したのであれば入力完了関数に対応する状態「状態1」を実行選択肢テーブル26から削除する。   For example, in the case of the execution option table 26 shown in C of FIG. 5, since there is “input completed” and “product selection” associated with “state 1”, either one of the functions is selected and selected. An instruction to execute the function is sent from the program control unit 21 to the program execution unit 22. Thereafter, for example, if “product selection” is selected, the state “state 1” corresponding to the input completion function is deleted from the execution option table 26.

ステップS8では、プログラム制御部21から検査対象プログラムを実行する指示をプログラム実行部22が受信し、検査対象プログラム2を実行する。
ステップS9では、ステップS8で実行した検査対象プログラム2により変化した現在の内部状態を記録部24に記録する。図6のAに示すように状態1から商品選択関数を実行することにより状態2に遷移した場合、状態2に対応する内部状態(入力データ、実行可能な関数、表示画面情報など)を記録部24に記録する。
In step S8, the program execution unit 22 receives an instruction to execute the inspection target program from the program control unit 21, and executes the inspection target program 2.
In step S9, the current internal state changed by the inspection target program 2 executed in step S8 is recorded in the recording unit 24. As shown in A of FIG. 6, when the product selection function is executed from state 1 to state 2, the internal state (input data, executable function, display screen information, etc.) corresponding to state 2 is recorded. 24.

ステップS10では、プログラム制御部21が状態遷移グラフ管理テーブル25と実行系列テーブル27に、一つ前の状態を示す「遷移元状態」、選択した関数に対応する「実行関数」、現在の状態に対応する「遷移先状態」を記録する。   In step S10, the program control unit 21 sets the “transition source state” indicating the previous state, the “execution function” corresponding to the selected function, and the current state in the state transition graph management table 25 and the execution sequence table 27. Record the corresponding "transition destination state".

図6のBの場合、初期状態から状態1に遷移するとき、プログラム制御部21により実行系列テーブル27の「遷移元状態」に初期状態に対応する「初期状態」が、「実行関数」に開始関数に対応する「開始」が、「遷移先状態」に現在の状態に対応する「状態1」が、記録される。また、状態1から状態2に遷移するとき、プログラム制御部21により実行系列テーブル27の「遷移元状態」に状態1に対応する「状態1」、「実行関数」に商品選択関数に対応する「商品選択」、「遷移先状態」に現在の状態に対応する「状態2」が、記録される。   In the case of B in FIG. 6, when transitioning from the initial state to the state 1, the program control unit 21 starts the “initial state” corresponding to the initial state in the “transition source state” of the execution sequence table 27 in the “execution function”. “Start” corresponding to the function is recorded, and “State 1” corresponding to the current state is recorded in “Transition destination state”. Further, when the state transitions from state 1 to state 2, the program control unit 21 causes the “transition source state” of the execution sequence table 27 to be “state 1” corresponding to the state 1 and “execution function” to correspond to the product selection function “ “State 2” corresponding to the current state is recorded in “Product selection” and “Transition destination state”.

ステップS10の処理を完了するとステップS2に移行する。また、ステップ3でステップS5に移行し、ステップS5の処理によりステップS6に移行する場合は、上記ステップS6以降の処理を行い、ステップS11に移行する場合には以下の処理を行う。   When the process of step S10 is completed, the process proceeds to step S2. When the process proceeds to step S5 in step 3 and the process proceeds to step S6 by the process of step S5, the process after step S6 is performed. When the process proceeds to step S11, the following process is performed.

ステップS11では、プログラム制御部21が実行系列テーブル27から現在の状態が遷移元になっている行を削除する。図7のAに示すように状態2において商品選択をしても状態2に戻るような場合、プログラム制御部21が図7のBに示すように「状態2」「商品選択」「状態2」から構成される行を削除する。なお、現在の状態が遷移元になっているとは、プログラムで使用する変数の値が変わらない場合などである。   In step S <b> 11, the program control unit 21 deletes the line whose current state is the transition source from the execution sequence table 27. As shown in FIG. 7A, when the product selection in state 2 returns to state 2 as shown in FIG. 7, the program control unit 21 displays “state 2”, “product selection”, and “state 2” as shown in FIG. 7B. Delete the line consisting of. Note that the current state is the transition source, for example, when the value of a variable used in the program does not change.

ステップS12では、プログラム制御部21が一つ前の状態を現在の状態にする。図7のBの場合、一つ前の状態が「状態2」であるので「状態2」の状態に遷移する。
ステップS13では、プログラム制御部21が現在の状態に実行可能な関数(選択肢)が残っているかを判定し、残っていればステップS7に移行し、残っていなければS14に移行する。例えば、図7のAの場合であれば、状態2において入力完了関数に対応する「入力完了」が、図7のCの実行選択肢テーブル26に記録されているのでステップS7に移行する。
In step S12, the program control unit 21 changes the previous state to the current state. In the case of B in FIG. 7, since the previous state is “state 2”, the state transitions to the “state 2” state.
In step S13, the program control unit 21 determines whether or not an executable function (option) remains in the current state. If it remains, the process proceeds to step S7, and if not, the process proceeds to S14. For example, in the case of A in FIG. 7, since “input completion” corresponding to the input completion function in state 2 is recorded in the execution option table 26 of C in FIG. 7, the process proceeds to step S <b> 7.

ステップS14では、プログラム制御部21が現在の状態が初期状態(実行選択肢テーブル26が空)かを判定し、初期状態であればプログラムモデル検査を終了し、初期状態でない場合はステップS11に移行する。   In step S14, the program control unit 21 determines whether the current state is the initial state (execution option table 26 is empty). If the initial state, the program model check is terminated. If not, the process proceeds to step S11. .

(実行可能関数絞込処理の説明)
実行可能関数絞込部23の実行回数による選択肢の絞込みの動作について説明する。図8のAは、実行可能関数絞込部23の実行回数による選択肢の絞込みのフローを示す図である。
(Explanation of executable function narrowing process)
An operation for narrowing down options according to the number of executions of the executable function narrowing unit 23 will be described. FIG. 8A is a diagram illustrating a flow of narrowing down options according to the number of executions of the executable function narrowing unit 23.

ステップS21では、実行可能関数絞込部23が実行系列テーブル27から各実行関数が呼び出された回数を集計して、実行回数テーブル28を更新する。
例えば、実行系列テーブル27の更新は次のように行われる。まず、図9の初期状態から状態1に遷移し現在の状態が状態1のとき、実行系列テーブル27の「実行関数」には「開始」のみが記録されている。実行可能関数絞込部23は、実行回数テーブル28の「関数」に「開始」を記録するとともに、「開始」に対応する開始関数が1回実行されたことを実行回数テーブル28の「実行回数」に記録する。
In step S <b> 21, the executable function narrowing unit 23 aggregates the number of times each execution function is called from the execution sequence table 27 and updates the execution number table 28.
For example, the execution sequence table 27 is updated as follows. First, when the state transitions from the initial state of FIG. 9 to state 1 and the current state is state 1, only “start” is recorded in the “execution function” of the execution sequence table 27. The executable function narrowing unit 23 records “start” in the “function” of the execution count table 28 and also indicates that the start function corresponding to “start” has been executed once in the “execution count” of the execution count table 28. To record.

次に、図9に示す状態1から状態5に入力完了関数を選択して遷移すると、実行系列テーブル27の「実行関数」には「開始」に加え「入力完了」が記録されるため、実行可能関数絞込部23は、実行回数テーブル28の「関数」に「入力完了」を記録する。また、「入力完了」が1回実行されたことを実行回数テーブル28の「実行回数」に記録する。   Next, when an input completion function is selected and transitioned from state 1 to state 5 shown in FIG. 9, “input completion” is recorded in “execution function” of the execution sequence table 27 in addition to “start”. The possible function narrowing unit 23 records “input completion” in “function” of the execution frequency table 28. Further, the fact that “input completion” has been executed once is recorded in “execution count” of the execution count table 28.

次に、図9に示す状態5から状態2に商品選択関数を選択して遷移すると、実行系列テーブル27の「実行関数」にさらに「商品選択」が加えて記録されるため、実行可能関数絞込部23は、実行回数テーブル28の「関数」に「商品選択」を記録する。また、「入力完了」が1回実行されたことを実行回数テーブル28の「実行回数」に記録する。   Next, when a product selection function is selected and transitioned from state 5 to state 2 shown in FIG. 9, “product selection” is recorded in addition to “execution function” in the execution sequence table 27. The inserting unit 23 records “product selection” in the “function” of the execution frequency table 28. Further, the fact that “input completion” has been executed once is recorded in “execution count” of the execution count table 28.

上記のように実行回数テーブル28を更新することにより、現在の状態が状態2に至ったとき、実行回数テーブル28が図8のCに示すように、「開始」「入力完了」「商品選択」に対応する実行回数にそれぞれ「1」「1」「1」が記録される。   When the current state reaches state 2 by updating the execution number table 28 as described above, the execution number table 28 indicates “start”, “input completion”, “product selection” as shown in C of FIG. “1”, “1”, and “1” are recorded in the number of executions corresponding to.

ステップS22では、実行可能関数絞込部23が実行選択肢テーブル26から現在の状態に対応する行を1つ選択する。
ステップS23では、実行可能関数絞込部23がステップS22で選択した行の「選択肢」に記録されている関数をキーに実行回数テーブル28から、その関数の実行回数を取得する。
In step S <b> 22, the executable function narrowing unit 23 selects one row corresponding to the current state from the execution option table 26.
In step S23, the executable function narrowing unit 23 acquires the number of executions of the function from the execution number table 28 using the function recorded in the “option” of the row selected in step S22 as a key.

ステップS24では、実行可能関数絞込部23がステップS22で選択した関数の実行回数が、予め設定した指定回数(実行回数上限値)以上であるかを判定する。指定回数以上であればステップS25に移行し、指定回数に達していなければステップS27に移行する。   In step S24, it is determined whether the number of executions of the function selected by the executable function narrowing unit 23 in step S22 is equal to or greater than a preset designated number (execution number upper limit). If the specified number of times is exceeded, the process proceeds to step S25, and if the specified number has not been reached, the process proceeds to step S27.

ステップS25では、実行可能関数絞込部23が実行抑止関数テーブル29に現在の状態と選択肢から除外した関数を記録する。
ステップS26では、実行可能関数絞込部23が実行選択肢テーブル26からステップS22で選択した行を削除する。
In step S <b> 25, the executable function narrowing unit 23 records the function excluded from the current state and options in the execution inhibition function table 29.
In step S26, the executable function narrowing unit 23 deletes the line selected in step S22 from the execution option table 26.

ステップS27では、実行可能関数絞込部23が実行選択肢テーブル26の現在の状態に対応する全ての行を処理したかを判定する。
例えば、図9の状態2に遷移すると、実行選択肢テーブル26の記録内容は図8のDに示すような状態になる。ステップS22では、実行可能関数絞込部23が図8のDの実行選択肢テーブル26から状態2に対応する「状態2」「入力完了」または「状態2」「商品選択」を有する行のどちらかを選択する。本例では「状態2」「入力完了」を選択する。
In step S <b> 27, it is determined whether the executable function narrowing unit 23 has processed all the rows corresponding to the current state of the execution option table 26.
For example, when the state transits to the state 2 in FIG. 9, the recorded content of the execution option table 26 becomes a state as shown in D of FIG. In step S22, the executable function narrowing-down unit 23 selects one of the rows having “state 2”, “input completed” or “state 2” “product selection” corresponding to the state 2 from the execution option table 26 in FIG. Select. In this example, “state 2” and “input completed” are selected.

ステップS23では、実行可能関数絞込部23が「入力完了」をキーにして、実行回数テーブル28の「入力完了」に対応する「実行回数」に記録されている「1」を取得する。ステップS24では、「入力完了」に対応する実行回数「1」と予め設定されている実行回数上限値「1」を比較し、実行回数が実行回数上限値に達しているためステップS25に移行する。ステップS25では、実行可能関数絞込部23が、入力完了関数が既に実行された関数であると判断して、実行選択肢テーブル26から「状態2」「入力完了」の行を削除する。ステップS26では、実行可能関数絞込部23が実行抑止関数テーブル29の「状態」「抑止関数」に対応する箇所に「状態2」「入力完了」をそれぞれ記録する。ステップS27では、実行可能関数絞込部23が実行選択肢テーブル26の現在の状態に対応するすべての行を処理したかを判定する。本例では実行選択肢テーブル26にまだ「状態2」「商品選択」があるためステップS22に移行する。   In step S <b> 23, the executable function narrowing down unit 23 acquires “1” recorded in “execution count” corresponding to “input completion” in the execution count table 28 using “input completion” as a key. In step S24, the number of executions “1” corresponding to “input completion” is compared with the preset number of executions upper limit “1”. Since the number of executions has reached the number of executions upper limit, the process proceeds to step S25. . In step S <b> 25, the executable function narrowing unit 23 determines that the input completion function has already been executed, and deletes the “status 2” and “input completion” rows from the execution option table 26. In step S <b> 26, the executable function narrowing unit 23 records “state 2” and “input completed” in the locations corresponding to “state” and “suppression function” in the execution suppression function table 29. In step S <b> 27, it is determined whether the executable function narrowing unit 23 has processed all the rows corresponding to the current state of the execution option table 26. In this example, since there are still “state 2” and “product selection” in the execution option table 26, the process proceeds to step S22.

実行選択肢テーブル26の「状態2」「商品選択」についても、上記と同じようにステップS22〜S27の処理を行う。その結果、実行抑止関数テーブル29、実行選択肢テーブル26が図8のE、Fに示すように更新され、実行可能関数絞込処理を終了する。
なお、図9の「×」は抑止された関数であることを示す。
For “state 2” and “product selection” in the execution option table 26, the processes of steps S22 to S27 are performed in the same manner as described above. As a result, the execution suppression function table 29 and the execution option table 26 are updated as indicated by E and F in FIG. 8, and the executable function narrowing process is terminated.
Note that “x” in FIG. 9 indicates a inhibited function.

(実行可能関数絞込処理の実行抑止再評価の説明)
図10は、図4のステップS5(実行可能関数絞込処理)の動作を示すフロー図である。
図4のステップS3において、状態遷移グラフ管理テーブル25に記録されている状態のためステップS5に移行したとき、ステップS31〜S38の処理を行う。
(Explanation of execution suppression re-evaluation of executable function screening processing)
FIG. 10 is a flowchart showing the operation of step S5 (executable function narrowing process) in FIG.
In step S3 of FIG. 4, when the process proceeds to step S5 due to the state recorded in the state transition graph management table 25, the processes of steps S31 to S38 are performed.

図11を用いて実行可能関数絞込処理の実行抑止再評価の説明をする。図11は、ステップS5に移行したとき、初期状態−状態5−状態2に至るプログラムモデル検査を実施し、その後バックトラックして状態1において商品選択関数を実行し状態2へ遷移したことを示す図である。   Execution suppression re-evaluation of the executable function narrowing process will be described with reference to FIG. FIG. 11 shows that when the process proceeds to step S5, a program model check from initial state-state 5 to state 2 is performed, and after that, the product selection function is executed in state 1 and a transition to state 2 is made. FIG.

ステップS31では、実行可能関数絞込部23が実行抑止関数テーブル29に現在の状態に対応する行があるか判定する。実行抑止関数テーブル29に現在の状態があればステップS32に移行し、なければ図4のステップS11に移行する。   In step S31, the executable function narrowing unit 23 determines whether there is a row corresponding to the current state in the execution inhibition function table 29. If there is a current state in the execution suppression function table 29, the process proceeds to step S32. If not, the process proceeds to step S11 in FIG.

例えば、現在の状態が状態2であれば、実行可能関数絞込部23が図11のBの実行抑止関数テーブル29の「状態」に「状態2」があるかを検索する。図11のBの実行抑止関数テーブル29には「状態2」があるためステップS32に移行する。   For example, if the current state is state 2, the executable function narrowing unit 23 searches for “state 2” in the “state” of the execution suppression function table 29 in FIG. 11B. Since there is “state 2” in the execution inhibition function table 29 of FIG. 11B, the process proceeds to step S32.

ステップS32では、ステップ4と同じように実行可能関数絞込部23が実行回数による選択肢の絞込みを行う。
図12のAは、実行回数により関数の実行抑止を行った状態に再度到達した場合の実行可能関数絞込部23の実行回数による選択肢の絞込みのフローを示す図である。
In step S32, as in step 4, the executable function narrowing unit 23 narrows down options based on the number of executions.
FIG. 12A is a diagram illustrating a flow of narrowing down options according to the number of execution times of the executable function narrowing unit 23 when the function execution suppression state is reached again according to the number of executions.

ステップS21では、実行可能関数絞込部23が、図12のBの実行系列テーブル27から各実行関数が呼び出された回数を集計して図12のCの実行回数テーブル28を更新する。状態2において実行された関数は、図12のBの実行系列テーブル27に記録された「開始」「商品選択」に対応付けられた関数である。図12のCの実行回数テーブル28には、「開始」「商品選択」がそれぞれ1回実行されているので「実行回数」にそれぞれ「1」が記録される。   In step S21, the executable function narrowing unit 23 adds up the number of times each execution function is called from the execution sequence table 27 in FIG. 12B, and updates the execution number table 28 in FIG. The function executed in the state 2 is a function associated with “start” and “product selection” recorded in the execution sequence table 27 in FIG. In the execution count table 28 of FIG. 12C, “start” and “product selection” are each executed once, so “1” is recorded in “execution count”.

ステップS22では、実行可能関数絞込部23が現在の状態で実行可能な関数(選択肢)を実行選択肢テーブル26から1つ選択する。本例では、状態2に対応する選択肢として実行選択肢テーブル26に「入力完了」「商品選択」があるため、「状態2」「商品選択」を有する行を選択する。   In step S <b> 22, the executable function narrowing unit 23 selects one function (option) that can be executed in the current state from the execution option table 26. In this example, since there are “input completed” and “product selection” in the execution option table 26 as options corresponding to the state 2, a row having “state 2” and “product selection” is selected.

ステップS23では、ステップS22で選択した行の選択肢をキーに実行回数テーブル28から、その関数の実行回数を取得する。
ステップS24では、実行可能関数絞込部23がステップS22で選択した関数の実行回数が、予め設定した指定回数(実行回数上限値)以上であるかを判定する。本例では、実行回数上限値「1」に商品選択関数の実行回数「1」が達しているためステップS25に移行し、達していなければステップS27に移行する。
In step S23, the number of executions of the function is acquired from the number-of-executions table 28 using the row option selected in step S22 as a key.
In step S24, it is determined whether the number of executions of the function selected by the executable function narrowing unit 23 in step S22 is equal to or greater than a preset designated number (execution number upper limit). In this example, since the execution count “1” of the product selection function has reached the execution count upper limit “1”, the process proceeds to step S25, and if not, the process proceeds to step S27.

ステップS25では、実行可能関数絞込部23が実行抑止関数テーブル29に現在の状態と選択肢「商品選択」を記録する。
ステップS26では、実行可能関数絞込部23が実行選択肢テーブル26からステップS22で選択した行を削除する。
In step S <b> 25, the executable function narrowing unit 23 records the current state and the option “product selection” in the execution inhibition function table 29.
In step S26, the executable function narrowing unit 23 deletes the line selected in step S22 from the execution option table 26.

ステップS25、S26の処理をした結果、実行抑止関数テーブル29、実行選択肢テーブル26は、図12のE、Fに示すような状態になる。
ステップS27では、実行可能関数絞込部23が実行選択肢テーブル26の現在の状態に対応する全ての行を処理したかを判定する。本例では、実行選択肢テーブル26の「状態2」「入力完了」が残っているのでステップS22に移行する。
As a result of the processing in steps S25 and S26, the execution suppression function table 29 and the execution option table 26 are in a state as shown in E and F of FIG.
In step S <b> 27, it is determined whether the executable function narrowing unit 23 has processed all the rows corresponding to the current state of the execution option table 26. In this example, since “status 2” and “input completion” remain in the execution option table 26, the process proceeds to step S22.

ステップS22に移行した後、実行選択肢テーブル26の「状態2」「入力完了」についても、上記と同じようにステップS22〜S27の処理を行う。ステップS27において実行選択肢テーブル26の全ての行に対して処理を行えば、実行可能関数絞込処理を終了して図10のAのステップS33に移行する。   After shifting to step S22, the processing of steps S22 to S27 is performed in the same manner as described above for “state 2” and “input completed” in the execution option table 26. If processing is performed for all the rows in the execution option table 26 in step S27, the executable function narrowing-down processing is terminated, and the process proceeds to step S33 in FIG.

ステップS33では、実行可能関数絞込部23が実行抑止関数テーブル29に現在の状態に対応する行があるか判定し、現在の状態に対応する行があればステップS34に移行し、なければステップS6に移行する。本例では、図12のEに示されているように現在の実行抑止関数テーブル29には、現在の状態である状態2に対応する「状態2」「入力完了」を有する行と「状態2」「商品選択」を有する行があるのでステップS34に移行する。   In step S33, the executable function narrowing unit 23 determines whether there is a line corresponding to the current state in the execution inhibition function table 29. If there is a line corresponding to the current state, the process proceeds to step S34. The process proceeds to S6. In this example, as shown in E of FIG. 12, the current execution inhibition function table 29 includes a line having “state 2” and “input completed” corresponding to the current state 2 and “state 2”. "There is a line having" product selection ", the process proceeds to step S34.

ステップS34では、実行可能関数絞込部23が実行選択肢テーブル26から現在の状態に対応する行を1つ選択する。本例では、図12のFに示されるように現在の実行選択肢テーブル26から現在の状態である状態2に対応する「状態2」「入力完了」を選択する。   In step S <b> 34, the executable function narrowing unit 23 selects one row corresponding to the current state from the execution option table 26. In this example, as shown in F of FIG. 12, “state 2” and “input completed” corresponding to the current state 2 are selected from the current execution option table 26.

ステップS35では、実行可能関数絞込部23がステップS34で選択した行の選択肢と現在の状態に対応する行が実行抑止関数テーブル29にあるか判定し、ある場合にはステップS36に移行し、ない場合はステップS37に移行する。本例では、図12のFに示したように現在の実行選択肢テーブル26に、現在の状態である状態2に対応する「状態2」「入力完了」が、現在の実行抑止関数テーブル29にあるためステップS36に移行する。   In step S35, it is determined whether or not the executable function narrowing unit 23 has the line option selected in step S34 and the line corresponding to the current state in the execution suppression function table 29. If there is, the process proceeds to step S36. If not, the process proceeds to step S37. In this example, as shown in F of FIG. 12, the current execution option table 26 has “state 2” and “input completion” corresponding to the current state 2 in the current execution suppression function table 29. Therefore, the process proceeds to step S36.

ステップS36では、実行可能関数絞込部23が対応する実行抑止関数テーブル29の行を削除する。本例では、図12のEに示す実行抑止関数テーブル29から「状態2」「入力完了」を有する行を削除する。その結果、図13に示すように実行抑止関数テーブル29が更新される。   In step S36, the executable function narrowing unit 23 deletes the corresponding row of the execution suppression function table 29. In this example, the line having “status 2” and “input completed” is deleted from the execution suppression function table 29 shown in E of FIG. As a result, the execution suppression function table 29 is updated as shown in FIG.

ステップS37では、実行可能関数絞込部23が選択した実行選択肢テーブル26の行を削除する。つまり、抑止されていないので既にこの状態から実行済みであると判断できるため実行選択肢テーブル26から「状態2」「入力完了」を有する行を削除する。   In step S37, the row of the execution option table 26 selected by the executable function narrowing unit 23 is deleted. In other words, since it is not suppressed, it can be determined that it has already been executed from this state, and therefore, the row having “state 2” and “input completed” is deleted from the execution option table 26.

ステップS38では、実行可能関数絞込部23が実行選択肢テーブル26の全ての行の処理をしたか判定し、全ての行に対して処理が終了すれば図4のステップS6に移行し、未処理の行が残っていればステップS34に移行する。   In step S38, it is determined whether the executable function narrowing unit 23 has processed all the rows in the execution option table 26. If the processing is completed for all the rows, the process proceeds to step S6 in FIG. If the line remains, the process proceeds to step S34.

上記のように実行可能関数絞込処理をすることで、プログラムモデル検査中の関数の実行系列において、同じ関数の予め設定した回数以上の呼出を抑止することができる。且つ、実行可能関数絞込処理と実行抑止再評価をすることにより、抑止した関数を実行すべきかを実行済み状態到達時に再度評価することで、関数の選択順序の違いによる探索結果の違いをなくし、関数の実行を過剰に抑止することなくモデル検査の探索範囲を抑えることができる。
よって、大規模なプログラムに対するプログラムモデル検査が現実的な時間で実施できるようになる。
By executing the executable function narrowing-down process as described above, it is possible to prevent the same function from being called more than a preset number in the execution sequence of the function being checked. In addition, by executing executable function narrowing processing and execution suppression re-evaluation, it is possible to eliminate differences in search results due to differences in the function selection order by re-evaluating whether the suppressed function should be executed when the completed state is reached. The search range of model checking can be suppressed without excessively suppressing the execution of functions.
Therefore, program model checking for a large-scale program can be performed in a realistic time.

(実施例2)
実施例2は、実行可能関数絞込処理を実施する際に、関数ごとに実行回数の実行回数上限値を設定するものである。関数ごとに予め実行回数上限値を記録実行回数上限テーブルに記録し、関数ごとに予め実行回数上限値に基づいて、現在の状態における実行可能な関数の実行を抑止するか否かを判定する。
(Example 2)
In the second embodiment, when the executable function narrowing process is performed, the upper limit value of the number of executions is set for each function. For each function, the execution number upper limit value is recorded in advance in the recording execution number upper limit table, and it is determined for each function in advance whether execution of an executable function in the current state is to be suppressed based on the execution number upper limit value.

図14は実施例2におけるプログラムモデル検査装置40の構成を示す図である。実施例2では、プログラムモデル検査装置40の記録部24に実行回数上限テーブル41を有し、実行可能関数絞込部23が実行回数上限値を取得して、関数ごとの実行回数が最適になるように設定する。   FIG. 14 is a diagram illustrating the configuration of the program model checking apparatus 40 according to the second embodiment. In the second embodiment, the recording unit 24 of the program model checking device 40 has the execution number upper limit table 41, and the executable function narrowing unit 23 acquires the execution number upper limit value, so that the number of executions for each function is optimized. Set as follows.

実行回数上限テーブル41は、プログラムモデル検査で実行される関数に対応する関数名などを記録する「関数」、関数ごとに実行回数の上限値を設定する「実行回数上限」を有している。なお、「実行回数上限」への上限値の入力はユーザが行う。   The execution number upper limit table 41 has a “function” that records a function name corresponding to a function executed in the program model check, and an “execution number upper limit” that sets an upper limit value for the number of executions for each function. Note that the user inputs the upper limit value in the “execution count upper limit”.

図15のAに実施例2の動作を示すフロー図を示す。ステップS21〜S23では実施例1と同じように処理を行う。
ステップS41では、実行可能関数絞込部23がステップS22で選択した関数の上限を実行回数上限テーブル41から取得する。例えば、図15のBに示すように実行回数上限テーブル41に、「関数」として「開始」「入力完了」・・・「終了」、「実行回数上限」として「開始」「入力完了」・・・「終了」に対応する「1」「3」・・・「1」が記録されているとする。ステップS23で「入力完了」の実行回数が取得されていれば、実行可能関数絞込部23が実行回数上限テーブル41の「入力完了」に対応する実行回数上限値を取得する。
FIG. 15A is a flowchart showing the operation of the second embodiment. In steps S21 to S23, processing is performed in the same manner as in the first embodiment.
In step S41, the executable function narrowing unit 23 acquires the upper limit of the function selected in step S22 from the execution frequency upper limit table 41. For example, as shown in FIG. 15B, in the execution count upper limit table 41, “start” “input completion”... “End” as “function”, “start” “input completion” as “execution count upper limit”. It is assumed that “1”, “3”... “1” corresponding to “End” is recorded. If the number of executions of “input completion” has been acquired in step S 23, the executable function narrowing unit 23 acquires the execution number upper limit value corresponding to “input completion” in the execution number upper limit table 41.

ステップS24では、ステップS41で取得した実行回数と実行回数上限値を比較して、実行回数が実行回数上限値以上であるかを判定する。実行回数が実行回数上限値以上であればステップS25に移行し、実行回数上限値より小さければステップS27に移行する。なお、図15のBに示されている「無制限」ついては上限値がないことを意味しており、必ずステップS25に移行し、購入関数が指定された場合は何度でも実行する。   In step S24, the execution count acquired in step S41 is compared with the execution count upper limit value to determine whether the execution count is equal to or greater than the execution count upper limit value. If the number of executions is greater than or equal to the upper limit of execution times, the process proceeds to step S25, and if smaller than the upper limit of execution times, the process proceeds to step S27. Note that “unlimited” shown in FIG. 15B means that there is no upper limit value, and the process always moves to step S25, and is executed any number of times when a purchase function is designated.

ステップS25以降は、実施例1と同じように処理を行う。
上記のように実行回数上限値を関数ごとに設定することにより、関数実行抑止を制御できるので、目的の関数の動作を詳しく調べることができる。
After step S25, processing is performed in the same manner as in the first embodiment.
As described above, the function execution inhibition can be controlled by setting the upper limit number of executions for each function, so that the operation of the target function can be examined in detail.

(実施例3)
実施例3は、プログラムモデル検査終了後、実行抑止関数テーブル29にm箇所以上の状態で抑止された関数がある場合、実行回数上限テーブル41の中の対応する関数の実行回数上限値を増やして、再度プログラムモデル検査を実行するものである。なお、mは1以上の整数である。
(Example 3)
In the third embodiment, after the program model check is completed, when there are functions inhibited in m or more places in the execution inhibition function table 29, the execution number upper limit value of the corresponding function in the execution number upper limit table 41 is increased. The program model check is executed again. Note that m is an integer of 1 or more.

図16は、実施例3におけるプログラムモデル検査装置50の構成を示す図である。実施例3のプログラムモデル検査装置50は、実施例2の機能にさらに、記録部24の実行回数上限テーブル41を制御するとともに、再度プログラムモデル検査の実行を指示するモデル検査再実行部51を備える。   FIG. 16 is a diagram illustrating a configuration of the program model checking apparatus 50 according to the third embodiment. The program model checking apparatus 50 according to the third embodiment further includes a model checking re-execution unit 51 that controls the execution number upper limit table 41 of the recording unit 24 and instructs the execution of the program model checking again in addition to the functions of the second embodiment. .

モデル検査再実行部51は、実行抑止関数テーブル29にm箇所以上の状態で抑止された関数がある場合、実行回数上限テーブル41の中の対応する関数の実行回数上限値を予め設定した値に更新する。また、モデル検査再実行部51は、更新した実行回数上限テーブル41を利用して再度プログラムモデル検査を実行する指示をプログラム実行部22に通知する。   The model checking re-execution unit 51 sets the execution number upper limit value of the corresponding function in the execution number upper limit table 41 to a preset value when there are functions inhibited in m or more states in the execution inhibition function table 29. Update. The model checking re-execution unit 51 notifies the program execution unit 22 of an instruction to execute the program model checking again using the updated execution count upper limit table 41.

図17に実施例3の動作を示すフロー図を示す(モデル検査再実行処理)。
ステップS51では、1回目のプログラムモデル検査が完了したことを、モデル検査再実行部51が検知する。
FIG. 17 is a flowchart showing the operation of the third embodiment (model check re-execution process).
In step S51, the model checking re-execution unit 51 detects that the first program model checking has been completed.

ステップS52では、モデル検査再実行部51が実行抑止関数テーブル29の「抑止関数」に基づいて抑止された関数ごとの集計を行い、集計の結果、予め設定した値よりm箇所以上の状態で抑止されている関数を検出する。   In step S52, the model checking re-execution unit 51 performs aggregation for each function that is inhibited based on the “suppression function” in the execution inhibition function table 29, and inhibits the result of aggregation in a state of m locations or more from a preset value. Detect the function that is being used.

ステップS53では、モデル検査再実行部51が実行回数上限テーブル41の該当する関数の実行回数上限値を変更する。
ステップS52、S53の動作について図18、19を用いて説明する。
In step S53, the model checking re-execution unit 51 changes the execution frequency upper limit value of the corresponding function in the execution frequency upper limit table 41.
Operations in steps S52 and S53 will be described with reference to FIGS.

例えば、1回目のプログラムモデル検査を行ったとき、図18のAに示すような状態遷移をしたとし、1回目のプログラムモデル検査が完了した時点の実行抑止関数テーブル29の記録内容が図18のBに示されるようになったとする。また、図18のBの実行抑止関数テーブル29の結果を得たときの実行回数上限テーブル41が図18のCに示す設定であったとする。なお、図18のA、B、Cに示される「a」「b」「c」は関数を示している。   For example, when the first program model check is performed, the state transition as shown in FIG. 18A is performed, and the recorded content of the execution suppression function table 29 at the time when the first program model check is completed is shown in FIG. Suppose that it comes to be shown by B. Further, it is assumed that the execution number upper limit table 41 when the result of the execution suppression function table 29 of B of FIG. 18 is obtained has the setting shown in C of FIG. Note that “a”, “b”, and “c” shown in A, B, and C of FIG. 18 indicate functions.

図18のBにおいて、モデル検査再実行部51が実行抑止関数テーブル29の「抑止関数」に記録されているa関数に基づいて「状態2」「状態5」においてa関数が抑止されていることを検出する。モデル検査再実行部51が、a関数が2箇所の状態で抑止されているため、a関数に関連付けて「2」を記録する。   In B of FIG. 18, the model check re-execution unit 51 has the function a suppressed in “state 2” and “state 5” based on the a function recorded in the “suppression function” of the execution suppression function table 29. Is detected. The model checking re-execution unit 51 records “2” in association with the a function because the a function is suppressed in two states.

次に、モデル検査再実行部51が、予め設定されている実行回数上限値に加算する値である「1」とa関数に対応する実行回数上限値を「1」を加算して「2」を算出する。そして、図19のCに示すように実行回数上限テーブル41のa関数に対応する実行回数上限値を「1」から「2」に変更する。
なお、本例では実行回数上限値に加算する値は「1」にしているが限定されるものではなく、ユーザが設定してもよい。
Next, the model checking re-execution unit 51 adds “1”, which is a value to be added to a preset execution count upper limit value, and “2”, by adding “1” to the execution count upper limit value corresponding to the a function. Is calculated. Then, as shown in FIG. 19C, the execution number upper limit value corresponding to the a function of the execution number upper limit table 41 is changed from “1” to “2”.
In this example, the value added to the upper limit of the number of executions is set to “1”, but the value is not limited and may be set by the user.

ステップS53では、モデル検査再実行部51が実行回数上限テーブル41の実行回数上限値の変更が完了したことを検知して、2回目のプログラムモデル検査を実行する指示を通知する。   In step S <b> 53, the model checking re-execution unit 51 detects that the change of the execution number upper limit value in the execution number upper limit table 41 has been completed, and notifies an instruction to execute the second program model checking.

プログラムモデル検査装置50はプログラムモデル検査を実行する。その結果、図19のAに示すように、状態2、状態5から状態3に移行し、状態3から状態4(d関数を実行)に移行し、状態4から終了(e関数を実行)する新しい状態遷移についてプログラムモデル検査を実行することができる。
ステップS54では、プログラムモデル検査装置50が2回目のプログラムモデル検査が完了する。
The program model checking device 50 performs program model checking. As a result, as shown in FIG. 19A, the state 2 and the state 5 are shifted to the state 3, the state 3 is shifted to the state 4 (execution of the d function), and the state 4 is terminated (the e function is executed). Program model checking can be performed on new state transitions.
In step S54, the program model checking apparatus 50 completes the second program model checking.

上記のように実行回数上限テーブル41の実行回数上限値を、実行抑止関数テーブル29の抑止関数ごとの集計結果に基づいて行うことにより、1回目(図18のA、B)と2回目(図19のA、B)に示すように実行回数上限値の設定に起因した、検査対象の関数が実行されなくなる現象を避けることができる。そのため、実行回数の制限を安全に行うことができる。また、全ての実行系列のなかで、実行回数制限数までの実行が保証される。   As described above, the upper limit of the number of executions in the execution number upper limit table 41 is performed based on the total result for each inhibition function in the execution inhibition function table 29, so that the first time (A and B in FIG. 18) and the second time (FIG. As shown in 19 A and B), it is possible to avoid the phenomenon that the function to be inspected is not executed due to the setting of the upper limit of the number of executions. Therefore, it is possible to safely limit the number of executions. In addition, the execution up to the limited number of executions is guaranteed in all execution series.

(本実施例がコンピュータプログラムとして実現される場合の構成)
図20は、上記実施形態の装置を実現できるコンピュータのハードウェア構成の一例を示す図である。
コンピュータのハードウェア90は、CPU91、記録部92(24)(ROM、RAM、ハードディスクドライブなど)、記録媒体読取装置93、入出力インタフェース94(入出力I/F)、通信インタフェース95(通信I/F)などを備えている。また、上記各構成部はバス96によってそれぞれ接続されている。
(Configuration when this embodiment is realized as a computer program)
FIG. 20 is a diagram illustrating an example of a hardware configuration of a computer that can implement the apparatus according to the embodiment.
The computer hardware 90 includes a CPU 91, a recording unit 92 (24) (ROM, RAM, hard disk drive, etc.), a recording medium reader 93, an input / output interface 94 (input / output I / F), and a communication interface 95 (communication I / F). F). Further, each of the components is connected by a bus 96.

CPU91は、記録部92に格納されている上記説明したプログラムモデル検査を実行するプログラム実行処理と、プログラム制御処理、実行可能関数絞込処理、実行抑止再評価処理、モデル検査再実行処理(図4、8、10、12、15、17に示した処理)を実行する。   The CPU 91 stores a program execution process for executing the above-described program model check stored in the recording unit 92, a program control process, an executable function narrowing process, an execution suppression re-evaluation process, and a model check re-execution process (FIG. 4). , 8, 10, 12, 15, 17).

記録部92は、CPU91が実行するプログラムやデータが記録されている。また、ワークエリアなどとして使用される。
記録媒体読取装置93は、CPU91の制御にしたがって記録媒体93aに対するデータのリード/ライトを制御する。そして、記録媒体93a、記録媒体読取装置93の制御で書き込まれたデータを記憶したり、記録媒体93aに記憶されたデータを読み取らせたりする。また、着脱可能な記録媒体93aは、コンピュータで読み取り可能な記録媒体として、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記録装置には、ハードディスク装置(HDD)などがある。光ディスクには、DVD(Digital Versatile Disc)、DVD−RAM(Random Access Memory)、CD−ROM(Compact Disc Read Only Memory)、CD−R(Recordable)/RW(ReWritable)などがある。光磁気記録媒体には、MO(Magneto-Optical disk)などがある。
The recording unit 92 records programs and data executed by the CPU 91. It is also used as a work area.
The recording medium reading device 93 controls reading / writing of data with respect to the recording medium 93 a according to the control of the CPU 91. And the data written by control of the recording medium 93a and the recording medium reader 93 are memorize | stored, or the data memorize | stored in the recording medium 93a are read. The detachable recording medium 93a includes a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, and the like as a computer-readable recording medium. The magnetic recording device includes a hard disk device (HDD). Examples of the optical disc include a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), and a CD-R (Recordable) / RW (ReWritable). Magneto-optical recording media include MO (Magneto-Optical disk).

入出力インタフェース94には、入出力装置94a(マウス、キーボード、ディスプレイなど)が接続され、ユーザが入力した情報を受信し、バス96を介してCPU91に送信する。また、CPU91からの命令に従ってディスプレイの画面上に操作情報などを表示する。   An input / output device 94 a (mouse, keyboard, display, etc.) is connected to the input / output interface 94, receives information input by the user, and transmits it to the CPU 91 via the bus 96. Further, operation information and the like are displayed on the screen of the display according to a command from the CPU 91.

通信インタフェース95は、必要に応じ、他のコンピュータとの間のLAN接続やインターネット接続や無線接続のためのインタフェースである。また、他の装置に接続され、外部装置からのデータの入出力を制御する。   The communication interface 95 is an interface for LAN connection, Internet connection, or wireless connection with another computer as necessary. It is also connected to other devices and controls data input / output from external devices.

このようなハードウェア構成を有するコンピュータを1台または2台以上用いることによって、上記説明した各種処理機能(実施例で説明した処理(フローチャートなど))が実現される。その場合システムが有すべき機能の処理内容を記述したプログラムが提供される。そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体93aに記録しておくことができる。   By using one or more computers having such a hardware configuration, the various processing functions described above (the processing described in the embodiments (such as flowcharts)) are realized. In that case, a program describing the processing contents of the functions that the system should have is provided. By executing the program on a computer, the above processing functions are realized on the computer. The program describing the processing contents can be recorded in a computer-readable recording medium 93a.

プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CD−ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。   When distributing the program, for example, a portable recording medium such as a DVD or a CD-ROM in which the program is recorded is sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.

プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、サーバコンピュータからプログラムが転送されるごとに、逐次、受け取ったプログラムに従った処理を実行することもできる。   The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. Further, each time the program is transferred from the server computer, the computer can sequentially execute processing according to the received program.

また、本発明は、上記実施の形態に限定されるものでなく、本発明の要旨を逸脱しない範囲内で種々の改良、変更が可能である。   The present invention is not limited to the above-described embodiment, and various improvements and modifications can be made without departing from the gist of the present invention.

1 ドライバ、
2 検査対象プログラム、
3 データベーススタブ、
4 ネットワークスタブ、
5 プログラムモデル検査装置、
6 入力データ、
7 プロパティ、
21 プログラム制御部、
22 プログラム実行部、
23 実行可能関数絞込部、
24 記録部、
25 状態遷移グラフ管理テーブル、
26 実行選択肢テーブル、
27 実行系列テーブル、
28 実行回数テーブル、
29 実行抑止関数テーブル、
40 プログラムモデル検査装置、
41 実行回数上限テーブル、
50 プログラムモデル検査装置、
51 モデル検査再実行部、
90 ハードウェア、
91 CPU、
92 記録部、
93 記録媒体読取装置、
93a 記録媒体、
94 入出力インタフェース、
94a 入出力装置、
95 通信インタフェース、
96 バス、
1 driver,
2 Program to be inspected,
3 Database stub,
4 Network stub,
5 Program model checking device,
6 Input data,
7 properties
21 Program control unit,
22 program execution unit,
23 Executable function narrowing down part,
24 recording section,
25 State transition graph management table,
26 execution option table,
27 execution sequence table,
28 Execution count table,
29 Execution suppression function table,
40 Program model checking device,
41 Execution count upper limit table,
50 program model checking device,
51 Model inspection re-execution unit,
90 hardware,
91 CPU,
92 recording section,
93 recording medium reader,
93a recording medium,
94 I / O interface,
94a I / O device,
95 communication interface,
96 buses,

Claims (3)

プログラムモデル検査装置が、複数の関数実行系列を備える検査対象プログラムにおける各状態から実行可能な関数のうち、該関数実行系列内での実行回数が実行回数上限値未満のものを実行する、プログラムモデル検査方法であって、
前記プログラムモデル検査装置が、
現在の状態から実行可能な関数の実行回数が、前記実行回数上限値以上である場合に、該関数の実行を抑止して該関数実行系列の検査を終了し、該関数を該現在の状態に関連付けて実行を抑止する関数を定義した実行抑止関数テーブルに記録するステップと、
他の関数実行系列において、現在の状態への遷移がすでに行われているとき、前記実行抑止関数テーブルに該現在の状態と該現在の状態から実行可能な関数との組み合わせがあるか否かを判定する判定ステップと、
前記判定ステップにおいて前記組み合わせがある場合にのみ該関数を実行するステップと、
を実行することを特徴とするプログラムモデル検査方法。
A program model in which a program model checking device executes a function that can be executed from each state in a test target program having a plurality of function execution sequences and whose execution count within the function execution sequence is less than the upper limit of execution counts. An inspection method,
The program model checking device is
When the number of executions of a function that can be executed from the current state is equal to or greater than the upper limit value of the number of executions, the execution of the function is suppressed and the inspection of the function execution sequence is terminated, and the function is brought into the current state. A step of recording in the execution suppression function table in which the functions to suppress execution in association are defined;
In another function execution sequence, when a transition to the current state has already been made, whether or not there is a combination of the current state and a function executable from the current state in the execution suppression function table A determination step for determining;
Executing the function only when there is the combination in the determining step;
A program model checking method comprising:
前記実行抑止関数テーブルにおいて、予め設定した数以上の状態と関連付けられている関数が検出されたときに、該関数の前記実行回数上限値を増加させるステップをさらに実行することを特徴とする請求項1に記載のプログラムモデル検査方法。   The step of increasing the upper limit value of the number of executions of the function is further executed when a function associated with a predetermined number or more states is detected in the execution suppression function table. 2. The program model checking method according to 1. 複数の関数実行系列を備える検査対象プログラムにおける各状態から実行可能な関数のうち、該関数実行系列内での実行回数が実行回数上限値未満のものを実行する、プログラムモデル検査プログラムであって、
コンピュータに、
現在の状態から実行可能な関数の実行回数が、前記実行回数上限値以上である場合に、該関数の実行を抑止して該関数実行系列の検査を終了し、該関数を該現在の状態に関連付けて実行を抑止する関数を定義した実行抑止関数テーブルに記録する処理と、
他の関数実行系列において、現在の状態への遷移がすでに行われているとき、前記実行抑止関数テーブルに該現在の状態と該現在の状態から実行可能な関数との組み合わせがあるか否かを判定する判定処理と、
前記判定処理において前記組み合わせがある場合にのみ該関数を実行する処理と、
を実行させることを特徴とするプログラムモデル検査プログラム。
A program model checking program that executes a function that can be executed from each state in a test target program having a plurality of function execution series, and that has an execution count within the function execution series that is less than the upper limit of execution counts.
On the computer,
When the number of executions of a function that can be executed from the current state is equal to or greater than the upper limit value of the number of executions, the execution of the function is suppressed and the inspection of the function execution sequence is terminated, and the function is brought into the current state. Processing to record in the execution suppression function table that defines the functions to suppress execution in association with each other;
In another function execution sequence, when a transition to the current state has already been made, whether or not there is a combination of the current state and a function executable from the current state in the execution suppression function table A determination process for determining;
A process of executing the function only when there is the combination in the determination process;
A program model checking program characterized in that
JP2009152826A 2009-06-26 2009-06-26 Program model checking method, program model checking program Expired - Fee Related JP5321286B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009152826A JP5321286B2 (en) 2009-06-26 2009-06-26 Program model checking method, program model checking program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009152826A JP5321286B2 (en) 2009-06-26 2009-06-26 Program model checking method, program model checking program

Publications (2)

Publication Number Publication Date
JP2011008628A true JP2011008628A (en) 2011-01-13
JP5321286B2 JP5321286B2 (en) 2013-10-23

Family

ID=43565181

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009152826A Expired - Fee Related JP5321286B2 (en) 2009-06-26 2009-06-26 Program model checking method, program model checking program

Country Status (1)

Country Link
JP (1) JP5321286B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014063415A (en) * 2012-09-24 2014-04-10 Mitsubishi Electric Corp Test case automatic generation device and test case automatic generation program
WO2019142266A1 (en) * 2018-01-17 2019-07-25 三菱電機株式会社 Test case generation device, test case generation method, and test case generation program
US11994977B2 (en) 2019-03-25 2024-05-28 Mitsubishi Electric Corporation Test case generation apparatus, test case generation method, and computer readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004005399A (en) * 2002-04-05 2004-01-08 Sharp Corp Method and device for testing software
JP2007018378A (en) * 2005-07-08 2007-01-25 I L C:Kk Debugging support system, method, target program, and host program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004005399A (en) * 2002-04-05 2004-01-08 Sharp Corp Method and device for testing software
JP2007018378A (en) * 2005-07-08 2007-01-25 I L C:Kk Debugging support system, method, target program, and host program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014063415A (en) * 2012-09-24 2014-04-10 Mitsubishi Electric Corp Test case automatic generation device and test case automatic generation program
WO2019142266A1 (en) * 2018-01-17 2019-07-25 三菱電機株式会社 Test case generation device, test case generation method, and test case generation program
JPWO2019142266A1 (en) * 2018-01-17 2020-04-16 三菱電機株式会社 Test case generation device, test case generation method, and test case generation program
US11347628B2 (en) 2018-01-17 2022-05-31 Mitsubishi Electric Corporation Test case generation apparatus, test case generation method, and computer readable medium
US11994977B2 (en) 2019-03-25 2024-05-28 Mitsubishi Electric Corporation Test case generation apparatus, test case generation method, and computer readable medium

Also Published As

Publication number Publication date
JP5321286B2 (en) 2013-10-23

Similar Documents

Publication Publication Date Title
JP4941040B2 (en) Test specification generation program and test specification generation device
JP5198132B2 (en) State transition test support device, state transition test support program, and state transition test support method
KR20090084905A (en) Method and system for graphical user interface testing
CN105446874A (en) Method and device for detecting resource configuration file
US7512913B2 (en) Designing apparatus, designing method, and program thereof
CN106484389A (en) Stream of action sectional management
JP5321286B2 (en) Program model checking method, program model checking program
US20130326466A1 (en) Human Readable Software Program Test Step
JP6120607B2 (en) Requirement detection apparatus and requirement detection program
US8015523B2 (en) Method and system for sequential netlist reduction through trace-containment
JP5799823B2 (en) Test data generation device, test data generation program, and test data generation method
JP2013003854A (en) Test data generation program, test data generation method and test data generation device
JP2008305019A (en) Simulation device, simulation method and program
WO2013058252A1 (en) Model examination support method, model examination support program, and model examination support device
US6745374B2 (en) Algorithms for determining path coverages and activity
JP5319643B2 (en) Software product line development support apparatus and method
JP2019091130A (en) Question presentation control program, retrieval method, and retrieval device
KR102417677B1 (en) Similar circuit searching method and apparatus for verifing circuit
CN111259063B (en) Method and device for realizing data export in API mode
JPWO2018154784A1 (en) Influence extraction device, influence extraction program and influence extraction method
JP5417359B2 (en) Document evaluation support system and document evaluation support method
JP2013012082A (en) Test data generation program, test data generation method, and test data generation device
JP6959513B2 (en) Analytical device and analysis method
Velozo et al. Evaluation of a Mobile Software Development Company
JP2008191796A (en) Analysis device, analysis method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130612

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130701

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