JP2010140084A - Device for inspection model generation, device for model inspection, and method for inspection model generation - Google Patents

Device for inspection model generation, device for model inspection, and method for inspection model generation Download PDF

Info

Publication number
JP2010140084A
JP2010140084A JP2008313285A JP2008313285A JP2010140084A JP 2010140084 A JP2010140084 A JP 2010140084A JP 2008313285 A JP2008313285 A JP 2008313285A JP 2008313285 A JP2008313285 A JP 2008313285A JP 2010140084 A JP2010140084 A JP 2010140084A
Authority
JP
Japan
Prior art keywords
transition
event
list
model
preliminary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008313285A
Other languages
Japanese (ja)
Inventor
Satoko Takada
沙都子 高田
Nobuyuki Ikeda
信之 池田
Yukari Murata
由香里 村田
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008313285A priority Critical patent/JP2010140084A/en
Publication of JP2010140084A publication Critical patent/JP2010140084A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device for inspection model generation, generating a state transition model capable of reducing the occurrence of state explosion when executing model inspection. <P>SOLUTION: The device for inspection model generation is provided with: a model input part 20 for inputting a state transition model; a preliminary list generation part 21 for generating a preliminary transition list associating transitions for every event; a contraction list generation part 22 for retrieving a preliminarily transition list, for summarizing different events as one event group when transitions caused by the events are the same, and for generating a contraction transition list associating the summarized event group with the transitions caused by the events belonging to the event group; and a code conversion part 23 for converting model codes for inspection from the contraction transition list, and for generating model codes for inspection whose number of transition is smaller than that in the case of directly converting the model codes for inspection from the preliminary list. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、検査モデル生成装置、モデル検査装置、及び検査モデル生成方法に係り、特に、状態遷移モデルとして表される検査モデルの生成装置、生成された検査モデルに対して検査を行うモデル検査装置、及び検査モデル生成方法に関する。   The present invention relates to an inspection model generation device, a model inspection device, and an inspection model generation method, and in particular, an inspection model generation device represented as a state transition model, and a model inspection device that inspects a generated inspection model And an inspection model generation method.

今日、ソフトウェアが複雑化してきたことにより、ソフトウェア自体のみならずソフトウェア作成の基となるシステム仕様に誤りが混入しやすくなってきている。また、システム仕様の複雑化に伴って、人の手では、システム仕様を網羅した検証が困難になってきている。経験や知識のない誤りは発見しづらく、また、後工程で発見された誤りは取り除くために膨大なコストがかかる。このため、システム仕様の誤りを可能な限り人の手を借りずに網羅的に検証し、誤りを早期に取り除くための仕組みが必要不可欠となってきている。   Today, as software has become more complex, it is becoming easier for errors to be introduced not only in the software itself, but also in the system specifications that form the basis of software creation. In addition, as system specifications become more complex, it is becoming difficult for human hands to verify system specifications. Errors that have no experience or knowledge are difficult to detect, and errors that are discovered in subsequent processes are costly to remove. For this reason, a system for comprehensively verifying system specification errors without human assistance as much as possible and removing errors at an early stage has become indispensable.

システム仕様を状態遷移モデルで表現すると共に検証条件を論理式で記述し、状態遷移モデルが論理式を満たすかどうかを検証することで仕様の正しさを証明する手法として、モデル検査と呼ばれる手法が知られている(特許文献1,2等)。   A method called model checking is a method for proving the correctness of specifications by expressing system specifications in a state transition model and describing verification conditions in a logical expression and verifying whether the state transition model satisfies the logical expression. Known (Patent Documents 1, 2, etc.).

また、状態遷移モデルは状態遷移表として表すことができるが、特許文献2には、入力、出力、及び遷移後状態が総て同じであるような遷移前状態を状態遷移表の中でまとめ、これを1つのグループとして状態遷移表に記入することにより、状態遷移表の作成の手間を軽減する技術が開示されている。
特開2007−11605号公報 特開平03−19086号公報
Moreover, although the state transition model can be represented as a state transition table, Patent Document 2 summarizes the pre-transition states in which all the input, output, and post-transition states are the same in the state transition table, There has been disclosed a technique for reducing the trouble of creating a state transition table by entering this as a group in a state transition table.
JP 2007-11605 A Japanese Patent Laid-Open No. 03-19086

モデル検査では、状態遷移モデルとして記述されたシステム仕様と、時相論理式で記述された検査式をモデル検査装置に入力し、状態遷移モデルの動作(即ちシステム仕様)が検査式で表される検証条件を満たすか否かを網羅的に検査する。検証条件を満たさない動作(状態やイベント等)が検出された場合にはその動作は「反例」としてモデル検査装置から出力される。また、反例が検出された場合、その反例に至る直前の一連の動作もログデータとして出力される。モデル検査装置から出力される反例やログデータを人が解析することにより、システム仕様の誤りの発見とその修復を効率よく行うことができる。   In model checking, a system specification described as a state transition model and a check expression described in a temporal logic formula are input to a model checking device, and the operation of the state transition model (ie, system specification) is expressed by a check formula. Examine comprehensively whether the verification condition is satisfied. When an operation (state, event, etc.) that does not satisfy the verification condition is detected, the operation is output as a “counterexample” from the model checking apparatus. When a counterexample is detected, a series of operations immediately before reaching the counterexample is also output as log data. By analyzing counter examples and log data output from the model checking device, it is possible to efficiently find and repair system specification errors.

一般に、モデル検査では状態遷移の組み合わせをしらみつぶしに網羅的に検索して検査条件を満たすか否かを判定する。このため、システム仕様を機械的に状態遷移モデルに置き換えると、検査時における状態遷移の組み合わせが膨大となり、状態爆発と呼ばれる事象が発生して検査が収束しない事態が発生する場合がある。   In general, in model checking, it is determined whether or not a check condition is satisfied by exhaustively searching for combinations of state transitions. For this reason, when the system specification is mechanically replaced with a state transition model, the combination of state transitions at the time of inspection becomes enormous, and an event called state explosion may occur and a situation may occur where the inspection does not converge.

本発明は上記事情に鑑みてなされたものであり、モデル検査時における状態爆発の発生を低減可能な状態遷移モデルを生成することができる、検査モデル生成装置、モデル検査装置、及び検査モデル生成方法を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an inspection model generation device, a model inspection device, and an inspection model generation method capable of generating a state transition model capable of reducing the occurrence of a state explosion during model inspection The purpose is to provide.

上記課題を解決するため、本発明に係る検査モデル生成装置は、遷移前状態と遷移後状態とで規定される遷移、及びその遷移を起こすイベントを少なくとも含む状態遷移モデルを入力するモデル入力部と、前記イベントごとに前記遷移を関連付ける予備遷移リストを、入力した前記状態遷移モデルから生成する予備リスト生成部と、前記予備遷移リストを検索し、異なるイベントであっても、そのイベントによって起こされる遷移が同じ場合には、前記異なるイベントを1つのイベントグループとして集約し、集約した前記イベントグループと、そのイベントグループに属するイベントによって起こされる遷移とを関連付ける縮約遷移リストを、前記予備遷移リストから生成する縮約リスト生成部と、前記縮約遷移リストから検査用モデルコードに変換することにより、前記予備リストから直接検査用モデルコードを変換するよりも遷移数の少ない前記検査用モデルコードを生成するコード変換部と、を備えたことを特徴とする。   In order to solve the above problem, an inspection model generation device according to the present invention includes a model input unit that inputs a state transition model including at least a transition defined by a pre-transition state and a post-transition state, and an event that causes the transition; The preliminary transition list that associates the transition for each event is generated from the input state transition model, and the preliminary transition list is searched, and even if the event is different, the transition caused by the event When the two events are the same, the different events are aggregated as one event group, and a reduced transition list that associates the aggregated event group with transitions caused by events belonging to the event group is generated from the preliminary transition list. A contracted list generation unit that performs the test By conversion to de, characterized by comprising a code converting unit that generates less the testing model code of the number of transitions than to convert a test model cord directly from the preliminary list.

また、本発明に係るモデル検査装置は、遷移前状態と遷移後状態とで規定される遷移、及びその遷移を起こすイベントを少なくとも含む状態遷移モデル、及び検査条件が時相論理式によって表現された検査式を入力する入力部と、前記イベントごとに前記遷移を関連付ける予備遷移リストを、入力した前記状態遷移モデルから生成する予備リスト生成部と、前記予備遷移リストを検索し、異なるイベントであっても、そのイベントによって起こされる遷移が同じ場合には、前記異なるイベントを1つのイベントグループとして集約し、集約した前記イベントグループと、そのイベントグループに属するイベントによって起こされる遷移とを関連付ける縮約遷移リストを、前記予備遷移リストから生成する縮約リスト生成部と、前記縮約遷移リストから検査用モデルコードに変換することにより、前記予備リストから直接検査用モデルコードを変換するよりも遷移数の少ない前記検査用モデルコードを生成するコード変換部と、前記検査用モデルコードにおける状態遷移が前記検査条件を満たすか否かを前記検査式に基づいて検査し、前記状態遷移の中に前記検査条件を満たさない状態遷移を検出した場合は、その状態遷移を反例データとして出力すると共に、その状態遷移へ至る遷移系列をログデータとして出力するモデル検査部と、を備えたことを特徴とする。   In the model checking apparatus according to the present invention, the state transition model including at least the transition defined by the pre-transition state and the post-transition state, and the event that causes the transition, and the check condition are expressed by a temporal logic formula. An input unit for inputting a check expression, a preliminary transition list for associating the transition for each event, a preliminary list generation unit for generating the input from the state transition model, and the preliminary transition list are searched for different events. However, if the transitions caused by the event are the same, the different events are aggregated as one event group, and the reduced transition list associating the aggregated event group with the transitions caused by the events belonging to the event group Is generated from the preliminary transition list, and the contracted transition list is generated. A code conversion unit for generating the test model code having a smaller number of transitions than converting the test model code directly from the preliminary list by converting the test model code to the test model code, and a state in the test model code Inspecting whether or not a transition satisfies the inspection condition based on the inspection formula, and when a state transition that does not satisfy the inspection condition is detected in the state transition, the state transition is output as counterexample data. And a model checking unit that outputs a transition sequence leading to the state transition as log data.

また、本発明に係る検査モデル生成方法は、遷移前状態と遷移後状態とで規定される遷移、及びその遷移を起こすイベントを少なくとも含む状態遷移モデルを入力し、前記イベントごとに前記遷移を関連付ける予備遷移リストを、入力した前記状態遷移モデルから生成し、前記予備遷移リストを検索し、異なるイベントであっても、そのイベントによって起こされる遷移が同じ場合には、前記異なるイベントを1つのイベントグループとして集約し、集約した前記イベントグループと、そのイベントグループに属するイベントによって起こされる遷移とを関連付ける縮約遷移リストを、前記予備遷移リストから生成し、前記縮約遷移リストから検査用モデルコードに変換することにより、前記予備リストから直接検査用モデルコードを変換するよりも遷移数の少ない前記検査用モデルコードを生成する、ステップを備えたことを特徴とする。   The inspection model generation method according to the present invention inputs a state transition model including at least a transition defined by a pre-transition state and a post-transition state and an event that causes the transition, and associates the transition for each event. A preliminary transition list is generated from the input state transition model, the preliminary transition list is searched, and even when different events occur, if the transition caused by the event is the same, the different events are grouped into one event group. A reduced transition list that associates the event group thus aggregated with transitions caused by events belonging to the event group is generated from the preliminary transition list, and converted from the reduced transition list to a model code for inspection To convert the model code for inspection directly from the preliminary list. It generates less the test model code for the number of transitions than, and comprising the steps.

本発明に係る検査モデル生成装置、モデル検査装置、及び検査モデル生成方法によれば、モデル検査時における状態爆発の発生を低減可能な状態遷移モデルを生成することができ、これによりモデル検査の効率を向上させることができる。   According to the inspection model generation device, the model inspection device, and the inspection model generation method according to the present invention, it is possible to generate a state transition model that can reduce the occurrence of a state explosion during model inspection, thereby improving the efficiency of model inspection. Can be improved.

本発明に係る検査モデル生成装置、モデル検査装置、及び検査モデル生成方法の実施形態について、添付図面を参照して説明する。   Embodiments of an inspection model generation device, a model inspection device, and an inspection model generation method according to the present invention will be described with reference to the accompanying drawings.

(1)第1の実施形態
図1は、一般的なモデル検査装置の動作概念を模式的に示した図である。システム仕様は状態遷移モデルとして表現することが可能であり、システムがとりうる状態と、状態を遷移させるイベントやガード条件によって表すことができる。状態遷移モデルは、所定のモデル記述言語によってモデルデータとして記述することが可能であり、このモデルデータが検査対象としてモデル検査装置に入力される。
(1) First Embodiment FIG. 1 is a diagram schematically showing an operation concept of a general model checking apparatus. The system specification can be expressed as a state transition model, and can be expressed by a state that the system can take, an event that causes a state transition, and a guard condition. The state transition model can be described as model data in a predetermined model description language, and this model data is input to the model checking apparatus as a check target.

一方、システム仕様が所定の検査条件を満たすか否かを判定するための検査条件は、所定の言語で記述した検査式としてモデル検査装置に入力される。   On the other hand, an inspection condition for determining whether or not the system specification satisfies a predetermined inspection condition is input to the model checking apparatus as an inspection formula described in a predetermined language.

モデル検査装置では、モデルデータが取りうる総ての状態遷移の組み合わせに対して検査式を満たすか否かを判定する。検査式を満たさない状態が発見された場合は、その状態が反例としてモデル検査装置から出力される。また、その状態へ至る過程もログデータをして出力される。反例やログデータがモデル検査装置の検査結果となる。   In the model checking device, it is determined whether or not the checking formula is satisfied for all combinations of state transitions that the model data can take. When a state that does not satisfy the check expression is found, the state is output from the model checking device as a counter example. Also, the process to reach that state is output as log data. Counterexamples and log data are the test results of the model checking device.

前述したように、モデル検査では状態遷移の組み合わせをしらみつぶしに網羅的に検索して検査条件を満たすか否かを判定する。このため、システム仕様を機械的に状態遷移モデルに置き換えると、検査時における状態遷移の組み合わせが膨大となり、状態爆発と呼ばれる事象が発生して検査が収束しない事態が発生する。   As described above, in model checking, it is determined whether or not a check condition is satisfied by exhaustively searching for a combination of state transitions. For this reason, when the system specification is mechanically replaced with a state transition model, the number of combinations of state transitions at the time of inspection becomes enormous, and an event called state explosion occurs and the inspection does not converge.

本実施形態に係るモデル検査装置1は、このような状態爆発の発生を低減するように構成されている。より具体的には、モデル検査装置1が具備する検査モデル生成装置2によって、入力された状態遷移検査モデル(後述する予備遷移リスト)を解析し、検査の観点から冗長と判断される状態遷移を縮約して遷移数の少ないモデル(後述する縮約遷移リスト)に変換している。そして、遷移数が縮小されたモデルに対してモデル検査を行うことにより状態爆発の発生を低減するようにしている。   The model checking apparatus 1 according to the present embodiment is configured to reduce the occurrence of such a state explosion. More specifically, the inspection model generation device 2 included in the model inspection device 1 analyzes the input state transition inspection model (preliminary transition list described later), and determines the state transition determined to be redundant from the viewpoint of inspection. The contract is converted into a model with a small number of transitions (contracted transition list described later). Then, model explosion is performed on a model with a reduced number of transitions to reduce the occurrence of state explosion.

図2には、本実施形態に係るモデル検査装置1、及び検査モデル生成装置2の構成例を示すブロック図である。   FIG. 2 is a block diagram illustrating a configuration example of the model checking device 1 and the checking model generation device 2 according to the present embodiment.

モデル検査装置1は、検査モデル生成装置2、検査式入力部10、モデル検査部11等を備えて構成されている。   The model checking device 1 includes a checking model generation device 2, a checking expression input unit 10, a model checking unit 11, and the like.

また、検査モデル生成装置2は、モデル入力部20、予備リスト生成部21、縮約リスト生成部22、コード変換部23等を備えて構成されている。   The inspection model generation apparatus 2 includes a model input unit 20, a preliminary list generation unit 21, a contracted list generation unit 22, a code conversion unit 23, and the like.

上記のように構成されるモデル検査装置1のうち、まず検査モデル生成装置2の動作について、図3に示すフローチャートに基づいて説明する。   Of the model checking apparatus 1 configured as described above, the operation of the check model generating apparatus 2 will be described based on the flowchart shown in FIG.

ステップST1では、状態遷移モデルや検査に用いる変数等を入力する。ここで入力する状態遷移モデルは状態遷移仕様のことであり、状態遷移仕様の表現形式は特に限定するものではない。例えば、表の形式で状態の遷移が表現された状態遷移表の他、遷移前の状態と遷移後の状態が矢印付きのパス等で明示された状態遷移図等、状態遷移で表現できる動作仕様が適宜の言語や書式で表現されているものを入力することができる。   In step ST1, a state transition model, variables used for inspection, and the like are input. The state transition model input here is a state transition specification, and the expression form of the state transition specification is not particularly limited. For example, in addition to a state transition table that expresses state transitions in the form of a table, an operation specification that can be expressed by state transitions, such as a state transition diagram in which the state before transition and the state after transition are clearly indicated by a path with arrows, etc. Can be input in any language or format.

また、検査に用いる変数とは、状態遷移仕様に現れる変数のうち、検査時に用いる状態やイベントに対して割り当てられる変数や状態遷移に直接関わる変数のことである。状態遷移に直接関わる変数とは、例えば、遷移の際にフラグを確認する必要があるような場合において、そのフラグに対して割り当てられる変数である。   The variable used for inspection is a variable that is assigned to a state or event used during inspection or a variable that is directly related to state transition among variables appearing in the state transition specification. The variable directly related to the state transition is, for example, a variable assigned to the flag when it is necessary to check the flag at the time of transition.

状態遷移モデルや検査に用いる変数等は、検査モデル生成装置2のモデル入力部20から入力される。モデル入力部20は、例えばコンピュータのユーザインタフェースであり、キーボードやディスプレイ装置といった入出力デバイスを含む装置である。   The state transition model, variables used for inspection, and the like are input from the model input unit 20 of the inspection model generation device 2. The model input unit 20 is a user interface of a computer, for example, and is an apparatus including input / output devices such as a keyboard and a display device.

ステップST2では、入力された状態遷移モデルや検査に用いる変数から縮約前の状態遷移を表す予備遷移リストを生成する。予備遷移リストは、検査モデル生成装置2の予備リスト生成部21で生成する。   In step ST2, a preliminary transition list representing a state transition before contraction is generated from the input state transition model and variables used for inspection. The preliminary transition list is generated by the preliminary list generation unit 21 of the inspection model generation device 2.

予備遷移リストは、イベントごとに、イベントとそのイベントによって発生する遷移(遷移前の常態と遷移後の状態の対)とを関連付けるリストである。   The preliminary transition list is a list that associates an event and a transition (a pair of a normal state before the transition and a state after the transition) that is generated by the event for each event.

図4(a)は、状態遷移表の形式で表現された予備遷移リストの一例を示す図である。予備遷移リストの一番上の行には、状態遷移モデルに現れる遷移前の状態が配列される。図4(a)の例では、4つの状態S1、S2、S3、S4が配列されている。   FIG. 4A is a diagram showing an example of a preliminary transition list expressed in the form of a state transition table. In the top row of the preliminary transition list, the state before transition appearing in the state transition model is arranged. In the example of FIG. 4A, four states S1, S2, S3, and S4 are arranged.

一方、予備遷移リストの一番左の列には、状態遷移モデルにおいて遷移を引き起こすイベントが配列される。図4(a)の例では、4つのイベントE1、E2、E3、E4、E5が配列されている。   On the other hand, events that cause transitions in the state transition model are arranged in the leftmost column of the preliminary transition list. In the example of FIG. 4A, four events E1, E2, E3, E4, and E5 are arranged.

予備遷移リストの中央部のマスには遷移後の状態が配列される。また、斜線で示したマスは状態の遷移が起こらないことを示している。   The post-transition state is arranged in the central cell of the preliminary transition list. In addition, the hatched cells indicate that no state transition occurs.

いま、状態Snから状態Smへの遷移を、(Sn→Sm)のように記載すると、図4(a)に例示する予備遷移リストは、イベントE1によって、(S1→S4)、(S2→S3)、及び(S4→S2)の3つの遷移が起こることを示している。   Now, if the transition from the state Sn to the state Sm is described as (Sn → Sm), the preliminary transition list illustrated in FIG. 4A is (S1 → S4), (S2 → S3) depending on the event E1. ) And three transitions (S4 → S2) occur.

同様に、イベントE2によって(S2→S1)及び(S3→S1)の2つの遷移が起こり、イベントE3によって(S2→S1)及び(S3→S1)の2つの遷移が起こり、イベントE4によって(S1→S4)及び(S4→S2)の2つの遷移が起こり、イベントE5によって、(S2→S1)、(S3→S1)、及び(S4→S2)の3つの遷移が起こることを示している。   Similarly, two transitions of (S2 → S1) and (S3 → S1) occur by the event E2, two transitions of (S2 → S1) and (S3 → S1) occur by the event E3, and (S1 This indicates that two transitions of (S4) and (S4 → S2) occur, and three transitions of (S2 → S1), (S3 → S1), and (S4 → S2) occur due to the event E5.

このようにして、ステップST2にて生成された予備遷移リストは、検査モデル生成装置2の縮約リスト生成部22に入力され、予備遷移リストから縮約遷移リストを生成する。図4(b)は、図4(a)の予備遷移リストの例に対応する縮約遷移リストを示す図である。   In this way, the preliminary transition list generated in step ST2 is input to the contracted list generating unit 22 of the inspection model generating device 2, and a contracted transition list is generated from the preliminary transition list. FIG. 4B is a diagram illustrating a contracted transition list corresponding to the example of the preliminary transition list in FIG.

図4(a)と図4(b)を比較すると判るように、縮約遷移リストでは、同じ遷移を起こすイベントが複数ある場合は、これらのイベントを集約してグループ化している。例えば、イベントE2、E3、及びE5によって同一遷移(S2→S1)と同一遷移(S3→S1)とが起こるため、イベントE2、E3、及びE5を1つのイベントグループ(E2、E3、E5)に集約している。同様に、イベントE1及びイベントE4によって同一遷移(S1→S4)と同一遷移(S4→S2)とが起こるため、イベントE1及びイベントE4を1つのイベントグループ(E1、E4)に集約している。   As can be seen by comparing FIG. 4A and FIG. 4B, in the contracted transition list, when there are a plurality of events that cause the same transition, these events are aggregated and grouped. For example, since the same transition (S2 → S1) and the same transition (S3 → S1) occur due to the events E2, E3, and E5, the events E2, E3, and E5 are combined into one event group (E2, E3, E5). Aggregated. Similarly, since the same transition (S1 → S4) and the same transition (S4 → S2) occur due to the event E1 and the event E4, the event E1 and the event E4 are aggregated into one event group (E1, E4).

一方、遷移(S2→S3)を起こすイベントはE1のみであるため、遷移(S2→S3)に対応するイベントE1は、遷移(S2→S3)のみを関連付けて残している。同様に、遷移(S4→S2)を起こすイベントはE5のみであるため、遷移(S4→S2)に対応するイベントE5、遷移(S4→S2)のみを関連付けて残している。   On the other hand, since the event that causes the transition (S2 → S3) is only E1, the event E1 corresponding to the transition (S2 → S3) remains associated with only the transition (S2 → S3). Similarly, since only the event that causes the transition (S4 → S2) is E5, only the event E5 and the transition (S4 → S2) corresponding to the transition (S4 → S2) are left in association with each other.

フローチャート(図4)のステップST3からステップST9は、予備遷移リストから縮約遷移リストを生成する手順の具体例を示している。   Steps ST3 to ST9 of the flowchart (FIG. 4) show a specific example of a procedure for generating a reduced transition list from the preliminary transition list.

ステップST3では、イベントごとに遷移の一致数を比較する。例えば、まず、イベントE1とイベントE2との間で、遷移の一致数を比較する。上述したように、イベントE1によって起こる遷移は(S1→S4)、(S2→S3)、及び(S4→S2)であり、イベントE2によって起こる遷移は、(S2→S1)及び(S3→S1)であるため、イベントE1とイベントE2の間での遷移の一致数はゼロである(ステップST4のNO)。   In step ST3, the number of transition matches is compared for each event. For example, first, the number of transition matches is compared between the event E1 and the event E2. As described above, the transitions caused by the event E1 are (S1 → S4), (S2 → S3), and (S4 → S2), and the transitions caused by the event E2 are (S2 → S1) and (S3 → S1). Therefore, the number of transition matches between event E1 and event E2 is zero (NO in step ST4).

そこで、ステップST8を経由してステップST3に戻り、イベントE1と次のイベントE3との間で遷移の一致数を比較する。この場合にも、一致する遷移は存在しないため、さらに、イベントE1と次のイベントE4との間で遷移の一致数をさらに比較する。   Therefore, the process returns to step ST3 via step ST8, and the number of transition matches is compared between the event E1 and the next event E3. Also in this case, since there is no matching transition, the number of transition matches is further compared between the event E1 and the next event E4.

イベントE4によって起こる遷移は、(S1→S4)及び(S4→S2)である。これらの2つの遷移は、いずれもイベントE1によっても起こる遷移であり、イベントE1とイベントE4の間での遷移の一致数は2(1以上)となり(ステップST4のYES)、ステップST5へ進む。   Transitions caused by the event E4 are (S1 → S4) and (S4 → S2). These two transitions are both transitions caused by the event E1, and the number of transition matches between the event E1 and the event E4 is 2 (1 or more) (YES in step ST4), and the process proceeds to step ST5.

ステップST5では、イベントE1とイベントE2との間で総ての遷移が一致するか否かが判定される。今の例では、イベントE1で起こる遷移は、(S1→S4)、(S2→S3)、及び(S4→S2)であり、イベントE4で起こる遷移は、(S1→S4)及び(S4→S2)であるため、総ての遷移が一致しているわけではない(ステップST5のNO)。そこで、ステップST7へ進む。   In step ST5, it is determined whether or not all transitions match between event E1 and event E2. In this example, the transitions that occur at event E1 are (S1 → S4), (S2 → S3), and (S4 → S2), and the transitions that occur at event E4 are (S1 → S4) and (S4 → S2). ), All transitions do not match (NO in step ST5). Therefore, the process proceeds to step ST7.

ステップST7では、遷移の一致するイベントをイベントグループとして集約し、一致しないイベントは、一致しない遷移のみを関連付けて残す。   In step ST7, events with matching transitions are aggregated as an event group, and events that do not match leave only the transitions that do not match in association with each other.

今の例では、遷移(S1→S4)と遷移(S4→S2)の2つの遷移に関してはイベントE1とイベントE4とで一致しており、イベントE1、E4をイベントグループ(E1、E4)として集約する(ステップST6)。   In this example, regarding the two transitions of transition (S1 → S4) and transition (S4 → S2), event E1 and event E4 match, and events E1 and E4 are aggregated as event groups (E1 and E4). (Step ST6).

一方、イベントE1の遷移(S2→S3)に関しては、イベントE1とイベントE4とで一致していないため、遷移(S2→S3)のみを関連付けたイベントE1を残す。   On the other hand, regarding the transition of the event E1 (S2 → S3), the event E1 and the event E4 do not coincide with each other, so the event E1 in which only the transition (S2 → S3) is associated is left.

引き続きこのイベントE1と次のイベントE5との間で遷移の一致数を比較するが、一致する遷移は存在しないためイベントを集約することなく、次のイベント比較に進む。   Subsequently, the number of matching transitions is compared between this event E1 and the next event E5. However, since there is no matching transition, the processing proceeds to the next event comparison without aggregating the events.

次のイベント比較では、イベントE2とイベントE3、イベントE2とイベントE4、イベントE2とイベントE5とを順次比較していく。   In the next event comparison, event E2 and event E3, event E2 and event E4, and event E2 and event E5 are sequentially compared.

イベントE2とイベントE3との間では、イベントE2によって起こる遷移(S2→S1)及び(S3→S1)と、イベントE3によって起こる遷移(S2→S1)及び(S3→S1)の一致数は2であり(ステップST4のYES)、かつ、総ての遷移が一致している(ステップST5のYES)。そこで、遷移(S2→S1)及び(S3→S1)に関してイベントE2とイベントE3をイベントグループ(E2、E3)として集約する。   Between the event E2 and the event E3, the number of matches of the transitions (S2 → S1) and (S3 → S1) caused by the event E2 and the transitions (S2 → S1) and (S3 → S1) caused by the event E3 is 2. Yes (YES in step ST4), and all transitions match (YES in step ST5). Therefore, the event E2 and the event E3 are aggregated as an event group (E2, E3) with respect to the transitions (S2 → S1) and (S3 → S1).

イベントE2とイベントE4との間では一致する遷移は存在しない。一方、イベントE2とイベントE5との間では、総ての遷移((S2→S1)、(S3→S1))が一致しており、イベントE2とイベントE5をイベントグループ(E2、E5)として集約することができる。さらに、イベントグループ(E2、E3)とイベントグループ(E2、E5)との間においても、総ての遷移((S2→S1)、(S3→S1))が一致しているため、これら3つのイベントE2、E3、E5を1つのイベントグループ(E2、E3、E5)として集約する。   There is no matching transition between event E2 and event E4. On the other hand, all transitions ((S2 → S1), (S3 → S1)) match between the event E2 and the event E5, and the event E2 and the event E5 are aggregated as an event group (E2, E5). can do. Furthermore, since all transitions ((S2 → S1), (S3 → S1)) match between the event group (E2, E3) and the event group (E2, E5), these three Events E2, E3, E5 are aggregated as one event group (E2, E3, E5).

このような処理を、イベントの比較が総て完了するまで繰り返す(ステップST8)。この結果、同じ遷移を起こすイベントが複数ある場合は、これらのイベントがグループ化されて集約され、遷移数の縮約された縮約遷移リスト(図4(b))が生成される(ステップST9)。   Such processing is repeated until all event comparisons are completed (step ST8). As a result, when there are a plurality of events that cause the same transition, these events are grouped and aggregated, and a reduced transition list (FIG. 4B) with a reduced number of transitions is generated (step ST9). ).

予備遷移リスト(図4(a))と、縮約遷移リスト(図4(b))とを比較すると、遷移数が12から6に大幅に減少していることがわかる。   A comparison between the preliminary transition list (FIG. 4A) and the contracted transition list (FIG. 4B) shows that the number of transitions is greatly reduced from 12 to 6.

生成された縮約遷移リストは、検査モデル生成装置2のコード変換部23に出力される。コード変換部23では、公知の検査モデル記述言語変換ツールを用いて、縮約遷移リストをモデル検査用記述言語(縮約された検査用モデルコード)に変換する(ステップST10)。   The generated reduced transition list is output to the code conversion unit 23 of the inspection model generation device 2. The code conversion unit 23 converts the reduced transition list into a model checking description language (reduced checking model code) using a known checking model description language conversion tool (step ST10).

また、縮約遷移リストを、縮約された状態遷移表として、モデル検査装置1が具備するディスプレイ装置や外部のプリンタ等に出力するようにしてもよい。   Further, the contracted transition list may be output as a contracted state transition table to a display device provided in the model checking apparatus 1, an external printer, or the like.

縮約された検査用モデルコードは、モデル検査装置1のモデル検査部11に入力される。一方、検査用モデルコードが所定の検査条件を満たすか否かを検査するための検査式は、モデル検査装置1の検査式入力部10から入力され、さらにモデル検査部11に入力される。モデル検査部11では、縮約された検査用モデルコードにおける状態遷移が検査条件を満たすか否かを検査式に基づいて検査し、状態遷移の中に検査条件を満たさない状態遷移を検出した場合は、その状態遷移を反例データとして出力すると共に、その状態遷移へ至る遷移系列をログデータとして出力する。   The reduced model code for inspection is input to the model checking unit 11 of the model checking apparatus 1. On the other hand, an inspection expression for inspecting whether or not the inspection model code satisfies a predetermined inspection condition is input from the inspection expression input unit 10 of the model inspection apparatus 1 and further input to the model inspection unit 11. The model checking unit 11 checks whether or not the state transition in the contracted test model code satisfies the check condition based on the check expression, and detects a state transition that does not satisfy the check condition in the state transition Outputs the state transition as counterexample data, and outputs the transition sequence leading to the state transition as log data.

図5(a)は、予備遷移リストに対応する縮約前の状態遷移モデルを状態遷移図の形式で表現したものであり、状態S1、S2、S3、S4の遷移の方向が、矢印をもつパスで示され、遷移を起こす各イベントE1〜E5が各パスに付されている。   FIG. 5A shows the state transition model before contraction corresponding to the preliminary transition list in the form of a state transition diagram, and the transition directions of the states S1, S2, S3, and S4 have arrows. Each event E1 to E5 that is indicated by a path and causes a transition is attached to each path.

一方、図5(b)は、縮約遷移リストに対応する縮約後の状態遷移モデルを状態遷移図の形式で表現したものである。集約されたイベントグループ(E1、E4)、(E2、E3、E5)に対しては夫々1つのパスが対応しており、パス数(即ち遷移数)が図5(a)と比べて12から6に減少している。   On the other hand, FIG. 5B represents the state transition model after contraction corresponding to the contraction transition list in the form of a state transition diagram. One path corresponds to each of the aggregated event groups (E1, E4) and (E2, E3, E5), and the number of paths (that is, the number of transitions) is 12 from FIG. 5A. It has decreased to 6.

図5(a)に示す縮約前の状態遷移モデルでは、同じ遷移(例えば、遷移(S3→S1))に対してもイベントの異なる複数のパスが割り付けられているのに対して、図5(b)に示す縮約後の状態遷移モデルでは、同じ遷移(例えば、遷移(S3→S1))遷移に対しては、集約されたイベントグループ(例えば、イベントグループ(E2、E3、E5))の1つのパスが割り付けられている。   In the state transition model before contraction shown in FIG. 5A, a plurality of paths having different events are assigned to the same transition (for example, transition (S3 → S1)), whereas FIG. In the state transition model after reduction shown in (b), for the same transition (for example, transition (S3 → S1)), an aggregated event group (for example, event group (E2, E3, E5)) One path is assigned.

一般に、モデル検査においては、同じ遷移を異なるパスで検査することにあまり意味はなく、検査するパスが増えれば増えるほど、検査に必要となるデータの記憶量や検査に要する時間が長くなる。   In general, in model checking, it does not make much sense to check the same transition with different paths. As the number of paths to be checked increases, the amount of data required for checking and the time required for checking become longer.

図6(a)及び(b)は、状態遷移モデルに対してモデル検査を行うときの状態数を、適宜の検査用モデルコードで示した一例である。   FIGS. 6A and 6B are examples in which the number of states when model checking is performed on the state transition model is indicated by an appropriate checking model code.

縮約前の検査用モデルコード(図6(a))では、例えば、イベントE2、イベントE3、イベントE5ごとに場合分けして分岐させ、各イベントで起こりうる総ての状態の遷移について網羅的に検査していく。従って、分岐数(即ちイベント数)が多くなると、検査すべき状態数も急激に増加していくことになり、場合によっては状態爆発の事象が発生してモデル検査の実行が事実上不可能になってしまうこともある。   In the model code for inspection before contraction (FIG. 6A), for example, the event E2, the event E3, and the event E5 are divided into cases, and all state transitions that can occur in each event are comprehensively covered. I will inspect it. Therefore, if the number of branches (that is, the number of events) increases, the number of states to be checked will increase rapidly, and in some cases, a state explosion event will occur, making it impossible to execute model checking. Sometimes it becomes.

これに対して、縮約された検査用モデルコード(図6(b))では、イベントE2、イベントE3、及びイベントE5が集約された1つのイベントグループ(E2、E3,E5)に対して、イベントグループ(E2、E3,E5)で起こりうる状態の遷移についてのみ検査すればよいため、検査すべき状態の数は大幅に減少し、この結果、状態爆発の発生を抑制することが可能となる。   On the other hand, in the contracted model code for inspection (FIG. 6B), for one event group (E2, E3, E5) in which event E2, event E3, and event E5 are aggregated, Since only the state transitions that can occur in the event group (E2, E3, E5) need to be inspected, the number of states to be inspected is greatly reduced, and as a result, the occurrence of state explosion can be suppressed. .

縮約された検査用モデルコードに対してモデル検査を行うことは、上記の状態爆発の抑制という利点のほか、モデル検査によって得られる反例の解析効率が向上するという利点も得られる。   Performing model checking on the contracted model code for checking has the advantage of improving the analysis efficiency of counterexamples obtained by model checking, in addition to the above-described advantage of suppressing state explosion.

縮約前の検査用モデルコードに対してモデル検査を行った場合、図7(a)に例示したように、イベントA、イベントB、イベントCごとに反例が出力される。このため、同じ遷移に対する同じ反例であっても、夫々別の反例として出力される。その結果、総ての反例が出力されるまでに要する時間が長くなる。また、ユーザは出力された夫々の反例を確認して解析することになるため、解析に要する時間も長くなってしまう。   When model checking is performed on the model code for checking before contraction, counterexamples are output for each of event A, event B, and event C as illustrated in FIG. For this reason, even if it is the same counterexample with respect to the same transition, it is output as another counterexample. As a result, it takes a long time to output all counter examples. In addition, since the user confirms and analyzes each counterexample that is output, the time required for the analysis also increases.

これに対して、縮約された検査用モデルコードに対してモデル検査を行うと、図7(b)に例示したように、集約された1つのイベントグループ(A、B、C)に対しては1つの反例が出力される。この結果、反例が出力されるまでの時間は短縮され、さらに反例の解析時間も短縮されることになる。   On the other hand, when model checking is performed on the reduced model code for checking, as illustrated in FIG. 7B, for one aggregated event group (A, B, C). Produces one counterexample. As a result, the time until the counterexample is output is shortened, and the analysis time of the counterexample is also shortened.

(2)第2の実施形態
状態の遷移はイベントの発生によって引き起こされるが、このとき何らかのアクションも同時に引き起こされる場合がある。アクションの種類は特に限定するものではないが、状態の遷移自体に影響を与えるアクションと、影響を与えないアクションとに大別される。以下では、状態の遷移に影響を与えるアクションを「指定アクション」と呼び、影響を与えないアクションを「非指定アクション」と呼ぶものとする。
(2) Second Embodiment Although a state transition is caused by the occurrence of an event, some action may also be caused at the same time. The type of action is not particularly limited, but is roughly divided into an action that affects the state transition itself and an action that does not affect the action. Hereinafter, an action that affects state transition is referred to as a “designated action”, and an action that does not affect the action is referred to as a “non-designated action”.

第1の実施形態では、異なる複数のイベントであっても、それらのイベントによって引き起こされる遷移が同じ場合、異なる複数のイベントを1つのイベントグループとして集約することによって、縮約された状態遷移モデル(縮約遷移リスト)を生成している。   In the first embodiment, even if a plurality of different events have the same transition caused by the events, the reduced state transition model ( A reduced transition list).

これに対して、第2の実施形態では、イベントによる状態遷移の際に引き起こされるアクションを考慮して縮約された状態遷移モデル(縮約遷移リスト)を生成するようにしている。具体的には、第2の実施形態では、(a)そのイベントによって起こされる遷移とこれに伴う指定アクションが同じ場合、(b)そのイベントによって起こされる遷移が同じであり、かつ遷移に伴うアクションが非指定アクションである場合、又は、(c)そのイベントによって起こされる遷移が同じであり、かつ遷移がアクションを伴わない場合には、複数の異なるイベントを1つのイベントグループとして集約して、縮約された状態遷移モデル(縮約遷移リスト)を生成している。   On the other hand, in the second embodiment, a contracted state transition model (contracted transition list) is generated in consideration of an action caused at the time of a state transition due to an event. Specifically, in the second embodiment, when (a) the transition caused by the event is the same as the designated action associated therewith, (b) the transition caused by the event is the same and the action associated with the transition Is a non-designated action, or (c) if the transition caused by the event is the same and the transition does not involve an action, a plurality of different events are aggregated as one event group and reduced. A contracted state transition model (contracted transition list) is generated.

図8(a)は、第2の実施形態において生成される予備遷移リストの一例を示す図である。   FIG. 8A is a diagram illustrating an example of a preliminary transition list generated in the second embodiment.

第2の実施形態における予備遷移リストは、イベントごとに、そのイベントで起こる遷移とこの遷移に伴うアクションとが関連付けられている。図8(a)の例示では、イベントごとに、そのイベントで起こる遷移とこの遷移に伴うアクションとを上下2段のマスに示される変数によって関連付けている。   In the preliminary transition list in the second embodiment, for each event, a transition that occurs in the event and an action associated with the transition are associated with each other. In the example of FIG. 8A, for each event, a transition that occurs in the event and an action that accompanies the transition are associated with each other by variables shown in the upper and lower squares.

また各アクションの変数は、遷移に影響を与える指定アクションの変数と、遷移に影響を与えない非指定アクションの変数とが識別できるようになっている。図8(a)の例示では、B1、B2、及びB3が指定アクションに該当し、A1、A2、及びA3が非指定アクションに該当する。また、アクションを伴わない遷移も存在するが、図8(a)では、アクションを伴わない遷移であることを下段のマスの斜線で示している。   In addition, the variable of each action can identify the variable of the designated action that affects the transition and the variable of the non-designated action that does not affect the transition. In the example of FIG. 8A, B1, B2, and B3 correspond to designated actions, and A1, A2, and A3 correspond to non-designated actions. Although there are transitions that do not involve an action, in FIG. 8A, the transitions that do not involve an action are indicated by hatched lines in the lower row.

一方、図8(b)は、この予備遷移リストから生成される縮約遷移リストを示す図である。第2の実施形態では、遷移が指定アクションを伴う場合、遷移と指定アクションの双方に着目し、遷移と指定アクションの双方が同じイベント同士を、その遷移と指定アクションに関して集約し、1つのイベントグループとする。   On the other hand, FIG. 8B is a diagram showing a reduced transition list generated from this preliminary transition list. In the second embodiment, when a transition is accompanied by a designated action, focusing on both the transition and the designated action, events having the same both transition and designated action are aggregated with respect to the transition and the designated action, and one event group is collected. And

一方、遷移が非指定アクションを伴う場合や、アクションを伴わない場合には、遷移のみに着目し、遷移が同じイベント同士を、その遷移に関して集約し、1つのイベントグループとする。   On the other hand, when the transition is accompanied by a non-designated action or not accompanied by an action, attention is paid only to the transition, and events having the same transition are aggregated with respect to the transition to form one event group.

図8(a)の例示する予備遷移リストでは、イベントE3とイベントE6の間で、遷移(S2→S3)と指定アクションB3が同じであり、また、アクションを伴わない遷移(S3→S1)が同じである。そこで、図8(b)に示す縮約遷移リストでは、イベントE3とイベントE6を集約して、1つのイベントグループ(E3、E6)としている。但し、イベントE6における遷移(S4→S2)及び指定アクションB2は、イベントE3には存在しないため、遷移(S4→S2)及び指定アクションB2に関してはイベントE6をそのまま残している。   In the preliminary transition list illustrated in FIG. 8A, the transition (S2 → S3) and the designated action B3 are the same between the event E3 and the event E6, and the transition (S3 → S1) without an action is the same. The same. Therefore, in the contracted transition list shown in FIG. 8B, the event E3 and the event E6 are integrated into one event group (E3, E6). However, since the transition (S4 → S2) and the designated action B2 in the event E6 do not exist in the event E3, the event E6 is left as it is for the transition (S4 → S2) and the designated action B2.

また、図8(a)の例示する予備遷移リストでは、イベントE2とイベントE5の間で、遷移(S2→S1)と遷移(S3→S1)とがいずれも同じである。そこで、図8(b)に示す縮約遷移リストでは、イベントE2とイベントE5を集約して、1つのイベントグループ(E2、E5)としている。この場合、これらの遷移に伴うアクションはいずれも非指定アクション(A1、A2、A3)であるため、これらの非指定アクションを無視して遷移のみで同一性を判断している。但し、イベントE5における遷移(S4→S2)及び指定アクションB1は、イベントE2には存在しないため、遷移(S4→S2)及び指定アクションB1のみが関連付けられたイベントE5を残している。   In the preliminary transition list illustrated in FIG. 8A, the transition (S2 → S1) and the transition (S3 → S1) are both the same between the event E2 and the event E5. Therefore, in the contracted transition list shown in FIG. 8B, the event E2 and the event E5 are aggregated into one event group (E2, E5). In this case, since the actions associated with these transitions are all non-designated actions (A1, A2, A3), the identity is determined only by the transitions ignoring these non-designated actions. However, since the transition (S4 → S2) and the designated action B1 in the event E5 do not exist in the event E2, the event E5 associated only with the transition (S4 → S2) and the designated action B1 remains.

同様に、イベントE1とイベントE4の間では、遷移(S1→S4)と遷移(S4→S2)とがいずれも同じである。そこで、図8(b)に示す縮約遷移リストでは、イベントE1とイベントE4を集約して、1つのイベントグループ(E1、E4)としている。但し、この場合にも、イベントE1における遷移(S2→S3)及び指定アクションB1は、イベントE4には存在しないため、遷移(S2→S3)及び指定アクションB1のみが関連付けられたイベントE1を残している。   Similarly, the transition (S1 → S4) and the transition (S4 → S2) are the same between the event E1 and the event E4. Therefore, in the contracted transition list shown in FIG. 8B, the event E1 and the event E4 are aggregated into one event group (E1, E4). However, also in this case, since the transition (S2 → S3) and the designated action B1 in the event E1 do not exist in the event E4, the event E1 in which only the transition (S2 → S3) and the designated action B1 are associated is left. Yes.

このようなイベントの集約によって、縮約遷移リストにおける状態の遷移数は、16から9まで減少されている。   As a result of such event aggregation, the number of state transitions in the reduced transition list is reduced from 16 to 9.

図9は、第2の実施形態における検査モデル生成装置2の動作例を示すフローチャートである。   FIG. 9 is a flowchart illustrating an operation example of the inspection model generation device 2 according to the second embodiment.

ステップST21では、状態遷移モデルや状態、イベントの変数の他、遷移に伴うアクションに割り当てられた変数も入力する。   In step ST21, a variable assigned to an action associated with the transition is input in addition to the state transition model, the state, and the event variable.

ステップST22では、入力した状態遷移モデルや変数から図8(a)に該当する予備遷移リストを生成する。第2の実施形態に係る予備遷移リストでは、イベントごとに、そのイベントと遷移、及びアクションが関連付けられている。また、アクションは遷移に影響を与える指定アクションと影響を与えない非指定アクションとが識別されている。   In step ST22, a preliminary transition list corresponding to FIG. 8A is generated from the input state transition model and variables. In the preliminary transition list according to the second embodiment, the event, the transition, and the action are associated with each event. In addition, a designated action that affects transition and a non-designated action that does not affect the action are identified.

ステップST23からステップST29は、予備遷移リストから縮約遷移リストを生成する処理であり、基本的な処理の内容は、第1の実施形態と同じ(図3のステップST3からステップST9)であるため、詳細な説明は省略する。但し、図9に示すフローチャートでは、指定アクションを伴う遷移を「アクション付き遷移」として表記し、非指定アクションを伴う遷移やアクションを伴わない遷移をいずれも単に「遷移」として表記している。そして、第1の実施形態が遷移の同一性のみに着目してイベントを集約していたのに対して、第2の実施形態では、イベントによる状態遷移の際に引き起こされるアクションを考慮して縮約された状態遷移モデル(縮約遷移リスト)を生成するようにしている。具体的には、第2の実施形態では、(a)そのイベントによって起こされる遷移とこれに伴う指定アクションが同じ場合(「アクション付き遷移」が同じ場合)、(b)そのイベントによって起こされる遷移が同じであり、かつ遷移に伴うアクションが非指定アクションである場合(「遷移」が同じ場合)、又は、(c)そのイベントによって起こされる遷移が同じであり、かつ遷移がアクションを伴わない場合(「遷移」が同じ場合)には、複数の異なるイベントを1つのイベントグループとして集約して、縮約された状態遷移モデル(縮約遷移リスト)を生成している。   Steps ST23 to ST29 are processes for generating a contracted transition list from the preliminary transition list, and the content of the basic process is the same as in the first embodiment (step ST3 to step ST9 in FIG. 3). Detailed description will be omitted. However, in the flowchart shown in FIG. 9, a transition with a designated action is expressed as “transition with an action”, and a transition with an unspecified action or a transition without an action is simply expressed as “transition”. In contrast to the first embodiment, which concentrates events focusing only on the identity of transitions, the second embodiment reduces the scale by taking into account the actions caused during state transitions due to events. A contracted state transition model (contracted transition list) is generated. Specifically, in the second embodiment, (a) when the transition caused by the event is the same as the designated action associated therewith (when the “transition with action” is the same), (b) the transition caused by the event Are the same and the action associated with the transition is a non-designated action (if the "transition" is the same), or (c) the transition caused by the event is the same and the transition does not involve an action (When “transitions” are the same), a plurality of different events are aggregated as one event group to generate a reduced state transition model (reduced transition list).

第2の実施形態に係る検査モデル生成装置2では、第1の実施形態と同様に状態爆発を抑制し、反例解析の効率を向上させる検査用モデルコードを生成することが可能であり、さらに、遷移にアクションが伴う場合であっても、そのアクションによる遷移への影響が考慮された検査用モデルコードを生成することができる。   In the inspection model generation device 2 according to the second embodiment, it is possible to generate the inspection model code that suppresses the state explosion as in the first embodiment and improves the efficiency of counterexample analysis, Even when a transition is accompanied by an action, it is possible to generate an inspection model code in which the influence of the action on the transition is considered.

なお、本発明は上記の実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせても良い。   Note that the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, the constituent elements over different embodiments may be appropriately combined.

モデル検査装置の一般的動作概念を示す図。The figure which shows the general operation | movement concept of a model checker. 本発明の実施形態に係る検査モデル生成装置、及びモデル検査装置の構成例を示すブロック図。The block diagram which shows the structural example of the test | inspection model production | generation apparatus which concerns on embodiment of this invention, and a model inspection apparatus. 第1の実施形態に係る検査用モデルコードの生成手順の一例を示すフローチャート。5 is a flowchart showing an example of a procedure for generating a test model code according to the first embodiment. 第1の実施形態における予備遷移リストと縮約遷移リストの一例を示す図。The figure which shows an example of the preliminary transition list in the 1st Embodiment, and a contraction transition list. 縮約前の状態遷移モデルと縮約後の状態遷移モデルの一例を状態遷移図として示す図。The figure which shows an example of the state transition model before reduction and the state transition model after reduction as a state transition diagram. 縮約前の状態遷移モデルと縮約後の状態遷移モデルの一例を検査用モデルコードとして示す図。The figure which shows an example of the state transition model before contraction, and the state transition model after contraction as a model code for inspection. 縮約前と縮約後の状態遷移モデルに対してモデル検査を行った場合の反例の出力例を示す図。The figure which shows the output example of the counter example at the time of performing a model check with respect to the state transition model before reduction and after reduction. 第2の実施形態における予備遷移リストと縮約遷移リストの一例を示す図。The figure which shows an example of the preliminary transition list | wrist and a contraction transition list | wrist in 2nd Embodiment. 第2の実施形態に係る検査用モデルコードの生成手順の一例を示すフローチャート。9 is a flowchart illustrating an example of a procedure for generating an inspection model code according to the second embodiment.

符号の説明Explanation of symbols

1 モデル検査装置
2 検査モデル生成装置
10 検査式入力部
11 モデル検査部
20 モデル入力部
21 予備リスト生成部
22 縮約リスト生成部
23 コード変換部
DESCRIPTION OF SYMBOLS 1 Model test | inspection apparatus 2 Test | inspection model production | generation apparatus 10 Check type | formula input part 11 Model check part 20 Model input part 21 Preliminary list production | generation part 22 Reduction list production | generation part 23 Code conversion part

Claims (9)

遷移前状態と遷移後状態とで規定される遷移、及びその遷移を起こすイベントを少なくとも含む状態遷移モデルを入力するモデル入力部と、
前記イベントごとに前記遷移を関連付ける予備遷移リストを、入力した前記状態遷移モデルから生成する予備リスト生成部と、
前記予備遷移リストを検索し、異なるイベントであっても、そのイベントによって起こされる遷移が同じ場合には、前記異なるイベントを1つのイベントグループとして集約し、集約した前記イベントグループと、そのイベントグループに属するイベントによって起こされる遷移とを関連付ける縮約遷移リストを、前記予備遷移リストから生成する縮約リスト生成部と、
前記縮約遷移リストから検査用モデルコードに変換することにより、前記予備リストから直接検査用モデルコードを変換するよりも遷移数の少ない前記検査用モデルコードを生成するコード変換部と、
を備えたことを特徴とする検査モデル生成装置。
A model input unit for inputting a state transition model including at least a transition defined by a pre-transition state and a post-transition state, and an event that causes the transition; and
A preliminary list generation unit that generates a preliminary transition list that associates the transition for each event from the input state transition model;
When the preliminary transition list is searched and the transitions caused by the events are the same even if they are different events, the different events are aggregated as one event group, and the aggregated event group and the event group are aggregated. A reduced list generating unit that generates a reduced transition list that associates a transition caused by an event that belongs to the preliminary transition list; and
A code conversion unit that generates the test model code having a smaller number of transitions than converting the test model code directly from the preliminary list by converting the contracted transition list into the test model code;
An inspection model generation device characterized by comprising:
前記縮約リスト生成部は、
前記予備遷移リストをイベントごとに順次比較し、
比較するイベントに夫々関連付けられる前記遷移が総て一致する場合は、比較する各イベントを1つのイベントグループとして集約し、
前記遷移の一部が一致する場合には、一致する前記遷移に関わる各イベントを1つのイベントグループとして集約し、一致しない前記遷移に関わる各イベントは集約せずに残す、
ことを特徴とする請求項1に記載の検査モデル生成装置。
The contracted list generation unit includes:
The preliminary transition list is sequentially compared for each event,
When all the transitions associated with the events to be compared match, the events to be compared are aggregated as one event group,
When a part of the transition matches, each event related to the matching transition is aggregated as one event group, and each event related to the transition that does not match is left without being aggregated.
The inspection model generation apparatus according to claim 1.
前記状態遷移モデルは、
前記遷移に伴って実行するアクションがある場合はそのアクションを含み、
前記予備リスト生成部は、
前記イベントごとに、前記遷移と前記アクションとを関連付ける前記予備遷移リストを生成し、
前記縮約リスト生成部は、
前記アクションを、状態遷移に影響を与えるものとして指定される指定アクションとそれ以外の非指定アクションとに分類し、異なるイベントであっても、(a)そのイベントによって起こされる前記遷移とこれに伴う前記指定アクションが同じ場合、(b)そのイベントによって起こされる前記遷移が同じであり、かつ前記遷移に伴う前記アクションが前記非指定アクションである場合、又は、(c)そのイベントによって起こされる前記遷移が同じであり、かつ前記遷移が前記アクションを伴わない場合には、前記異なるイベントを1つのイベントグループとして集約する、
ことを特徴とする請求項1に記載の検査モデル生成装置。
The state transition model is
If there is an action to be executed with the transition, including that action,
The preliminary list generation unit includes:
For each event, generate the preliminary transition list associating the transition with the action,
The contracted list generation unit includes:
The actions are classified into designated actions that are designated as affecting state transitions and other non-designated actions. Even if they are different events, (a) the transition caused by the event and the accompanying actions If the specified actions are the same, (b) the transition caused by the event is the same, and the action associated with the transition is the non-designated action, or (c) the transition caused by the event Are the same and the transition does not involve the action, the different events are aggregated as one event group,
The inspection model generation apparatus according to claim 1.
遷移前状態と遷移後状態とで規定される遷移、及びその遷移を起こすイベントを少なくとも含む状態遷移モデル、及び検査条件が時相論理式によって表現された検査式を入力する入力部と、
前記イベントごとに前記遷移を関連付ける予備遷移リストを、入力した前記状態遷移モデルから生成する予備リスト生成部と、
前記予備遷移リストを検索し、異なるイベントであっても、そのイベントによって起こされる遷移が同じ場合には、前記異なるイベントを1つのイベントグループとして集約し、集約した前記イベントグループと、そのイベントグループに属するイベントによって起こされる遷移とを関連付ける縮約遷移リストを、前記予備遷移リストから生成する縮約リスト生成部と、
前記縮約遷移リストから検査用モデルコードに変換することにより、前記予備リストから直接検査用モデルコードを変換するよりも遷移数の少ない前記検査用モデルコードを生成するコード変換部と、
前記検査用モデルコードにおける状態遷移が前記検査条件を満たすか否かを前記検査式に基づいて検査し、前記状態遷移の中に前記検査条件を満たさない状態遷移を検出した場合は、その状態遷移を反例データとして出力すると共に、その状態遷移へ至る遷移系列をログデータとして出力するモデル検査部と、
を備えたことを特徴とするモデル検査装置。
A state transition model including at least a transition defined by a pre-transition state and a post-transition state, and an event that causes the transition, and an input unit that inputs a check expression in which a check condition is expressed by a temporal logic formula;
A preliminary list generation unit that generates a preliminary transition list that associates the transition for each event from the input state transition model;
When the preliminary transition list is searched and the transitions caused by the events are the same even if they are different events, the different events are aggregated as one event group, and the aggregated event group and the event group are aggregated. A reduced list generating unit that generates a reduced transition list that associates a transition caused by an event that belongs to the preliminary transition list; and
A code conversion unit for generating the test model code having a smaller number of transitions than converting the test model code directly from the preliminary list by converting the contracted transition list into the test model code;
Inspecting whether or not the state transition in the inspection model code satisfies the inspection condition based on the inspection formula, and when detecting a state transition that does not satisfy the inspection condition in the state transition, the state transition Is output as counterexample data, and a model checking unit that outputs a transition sequence leading to the state transition as log data;
A model checking apparatus characterized by comprising:
前記縮約モデル生成部は、
前記予備遷移リストをイベントごとに順次比較し、
比較するイベントに夫々関連付けられる前記遷移が総て一致する場合は、比較する各イベントを1つのイベントグループとして集約し、
前記遷移の一部が一致する場合には、一致する前記遷移に関わる各イベントを1つのイベントグループとして集約し、一致しない前記遷移に関わる各イベントは集約せずに残す、
ことを特徴とする請求項4に記載のモデル検査装置。
The contracted model generation unit includes:
The preliminary transition list is sequentially compared for each event,
When all the transitions associated with the events to be compared match, the events to be compared are aggregated as one event group,
When a part of the transition matches, each event related to the matching transition is aggregated as one event group, and each event related to the transition that does not match is left without being aggregated.
The model checking apparatus according to claim 4, wherein
前記状態遷移モデルは、
前記遷移に伴って実行するアクションがある場合はそのアクションを含み、
前記予備リスト生成部は、
前記イベントごとに、前記遷移と前記アクションとを関連付ける前記予備遷移リストを生成し、
前記縮約リスト生成部は、
前記アクションを、状態遷移に影響を与えるものとして指定される指定アクションとそれ以外の非指定アクションとに分類し、異なるイベントであっても、(a)そのイベントによって起こされる前記遷移とこれに伴う前記指定アクションが同じ場合、(b)そのイベントによって起こされる前記遷移が同じであり、かつ前記遷移に伴う前記アクションが前記非指定アクションである場合、又は、(c)そのイベントによって起こされる前記遷移が同じであり、かつ前記遷移が前記アクションを伴わない場合には、前記異なるイベントを1つのイベントグループとして集約する、
ことを特徴とする請求項4に記載のモデル検査装置。
The state transition model is
If there is an action to be executed with the transition, including that action,
The preliminary list generation unit includes:
For each event, generate the preliminary transition list associating the transition with the action,
The contracted list generation unit includes:
The actions are classified into designated actions that are designated as affecting state transitions and other non-designated actions. Even if they are different events, (a) the transition caused by the event and the accompanying actions If the specified actions are the same, (b) the transition caused by the event is the same, and the action associated with the transition is the non-designated action, or (c) the transition caused by the event Are the same and the transition does not involve the action, the different events are aggregated as one event group,
The model checking apparatus according to claim 4, wherein
遷移前状態と遷移後状態とで規定される遷移、及びその遷移を起こすイベントを少なくとも含む状態遷移モデルを入力し、
前記イベントごとに前記遷移を関連付ける予備遷移リストを、入力した前記状態遷移モデルから生成し、
前記予備遷移リストを検索し、異なるイベントであっても、そのイベントによって起こされる遷移が同じ場合には、前記異なるイベントを1つのイベントグループとして集約し、集約した前記イベントグループと、そのイベントグループに属するイベントによって起こされる遷移とを関連付ける縮約遷移リストを、前記予備遷移リストから生成し、
前記縮約遷移リストから検査用モデルコードに変換することにより、前記予備リストから直接検査用モデルコードを変換するよりも遷移数の少ない前記検査用モデルコードを生成する、
ステップを備えたことを特徴とする検査モデル生成方法。
Input a state transition model including at least the transition defined by the pre-transition state and the post-transition state, and the event that causes the transition,
A preliminary transition list that associates the transition for each event is generated from the input state transition model,
When the preliminary transition list is searched and the transitions caused by the events are the same even if they are different events, the different events are aggregated as one event group, and the aggregated event group and the event group are aggregated. Generating a reduced transition list that associates transitions caused by the event to which it belongs, from the preliminary transition list;
Generating the test model code having a smaller number of transitions than converting the test model code directly from the preliminary list by converting the contracted transition list into the test model code;
An inspection model generation method comprising steps.
前記縮約遷移リストを生成するステップでは、
前記予備遷移リストをイベントごとに順次比較し、
比較するイベントに夫々関連付けられる前記遷移が総て一致する場合は、比較する各イベントを1つのイベントグループとして集約し、
前記遷移の一部が一致する場合には、一致する前記遷移に関わる各イベントを1つのイベントグループとして集約し、一致しない前記遷移に関わる各イベントは集約せずに残す、
ことを特徴とする請求項7に記載の検査モデル生成方法。
In the step of generating the reduced transition list,
The preliminary transition list is sequentially compared for each event,
When all the transitions associated with the events to be compared match, the events to be compared are aggregated as one event group,
When a part of the transition matches, each event related to the matching transition is aggregated as one event group, and each event related to the transition that does not match is left without being aggregated.
The inspection model generation method according to claim 7.
前記状態遷移モデルは、
前記遷移に伴って実行するアクションがある場合はそのアクションを含み、
前記予備遷移リストを生成するステップでは、
前記イベントごとに、前記遷移と前記アクションとを関連付ける前記予備遷移リストを生成し、
前記縮約遷移リストを生成するステップでは、
前記アクションを、状態遷移に影響を与えるものとして指定される指定アクションとそれ以外の非指定アクションとに分類し、異なるイベントであっても、(a)そのイベントによって起こされる前記遷移とこれに伴う前記指定アクションが同じ場合、(b)そのイベントによって起こされる前記遷移が同じであり、かつ前記遷移に伴う前記アクションが前記非指定アクションである場合、又は、(c)そのイベントによって起こされる前記遷移が同じであり、かつ前記遷移が前記アクションを伴わない場合には、前記異なるイベントを1つのイベントグループとして集約する、
ことを特徴とする請求項7に記載の検査モデル生成方法。
The state transition model is
If there is an action to be executed with the transition, including that action,
In the step of generating the preliminary transition list,
For each event, generate the preliminary transition list associating the transition with the action,
In the step of generating the reduced transition list,
The actions are classified into designated actions that are designated as affecting state transitions and other non-designated actions. Even if they are different events, (a) the transition caused by the event and the accompanying actions If the specified actions are the same, (b) the transition caused by the event is the same, and the action associated with the transition is the non-designated action, or (c) the transition caused by the event Are the same and the transition does not involve the action, the different events are aggregated as one event group,
The inspection model generation method according to claim 7.
JP2008313285A 2008-12-09 2008-12-09 Device for inspection model generation, device for model inspection, and method for inspection model generation Pending JP2010140084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008313285A JP2010140084A (en) 2008-12-09 2008-12-09 Device for inspection model generation, device for model inspection, and method for inspection model generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008313285A JP2010140084A (en) 2008-12-09 2008-12-09 Device for inspection model generation, device for model inspection, and method for inspection model generation

Publications (1)

Publication Number Publication Date
JP2010140084A true JP2010140084A (en) 2010-06-24

Family

ID=42350204

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008313285A Pending JP2010140084A (en) 2008-12-09 2008-12-09 Device for inspection model generation, device for model inspection, and method for inspection model generation

Country Status (1)

Country Link
JP (1) JP2010140084A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013058252A1 (en) * 2011-10-19 2013-04-25 株式会社日立製作所 Model examination support method, model examination support program, and model examination support device
WO2018158939A1 (en) * 2017-03-03 2018-09-07 三菱電機株式会社 Communication test device, communication test method, and program
WO2019142266A1 (en) * 2018-01-17 2019-07-25 三菱電機株式会社 Test case generation device, test case generation method, and test case generation program
JP7101934B1 (en) * 2021-03-02 2022-07-19 株式会社Team F Information processing equipment and programs

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013058252A1 (en) * 2011-10-19 2013-04-25 株式会社日立製作所 Model examination support method, model examination support program, and model examination support device
WO2018158939A1 (en) * 2017-03-03 2018-09-07 三菱電機株式会社 Communication test device, communication test method, and program
JPWO2018158939A1 (en) * 2017-03-03 2019-11-07 三菱電機株式会社 COMMUNICATION TEST DEVICE, COMMUNICATION TEST METHOD, AND 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
JP7101934B1 (en) * 2021-03-02 2022-07-19 株式会社Team F Information processing equipment and programs

Similar Documents

Publication Publication Date Title
US20210049092A1 (en) Analyzing software test failures using natural language processing and machine learning
Wong et al. A crosstab-based statistical method for effective fault localization
US9857421B2 (en) Dynamic design partitioning for diagnosis
JP2016115175A (en) Software test apparatus and software test program
JP2010140084A (en) Device for inspection model generation, device for model inspection, and method for inspection model generation
JP5525225B2 (en) Failure cause analysis system and program
JP4631858B2 (en) Logic system failure verification method, failure verification apparatus, and failure verification program
JP4541196B2 (en) Failure detection improvement device, failure detection improvement program, failure detection improvement method
CN116932389A (en) Solver defect detection method based on large pre-training language model
JP2010250669A (en) Test case generation device, object inspection device, and program
CN112559359B (en) S-based 2 ML security critical system analysis and verification method
CN111125634B (en) Reliability analysis method and system based on quality method
JP2009134360A (en) Model inspection system, model inspection method, and model inspection program
JP6169302B2 (en) Specification configuration apparatus and method
JP2017224185A (en) Bug contamination probability calculation program and bug contamination probability calculation method
US20090293026A1 (en) Verification device of semiconductor integrated circuit, verification method of semiconductor integrated circuit, and computer readable medium storing verification program of semiconductor integrated circuit
Ye et al. Information-theoretic syndrome evaluation, statistical root-cause analysis, and correlation-based feature selection for guiding board-level fault diagnosis
JP5755861B2 (en) Test case generation apparatus, test case generation method, and test case generation program
Parsa et al. Finding causes of software failure using ridge regression and association rule generation methods
JP2013206310A (en) Model inspection device, model inspection method, and program
Zhang et al. ContextAug: model-domain failing test augmentation with contextual information
CN113590167B (en) Conditional statement defect patch generation and verification method in object-oriented program
JP2014067109A (en) Data transition trace device, data transition trace method, and data transition trace program
JP2012128727A (en) Reliability evaluation method and apparatus for software component
JP2016173756A (en) Test case generation program, test case generation method, and test case generation device

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20111201