JP2011180632A - Device, method and program for verification - Google Patents

Device, method and program for verification Download PDF

Info

Publication number
JP2011180632A
JP2011180632A JP2010041384A JP2010041384A JP2011180632A JP 2011180632 A JP2011180632 A JP 2011180632A JP 2010041384 A JP2010041384 A JP 2010041384A JP 2010041384 A JP2010041384 A JP 2010041384A JP 2011180632 A JP2011180632 A JP 2011180632A
Authority
JP
Japan
Prior art keywords
model
domain
verification
specific
specifications
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
JP2010041384A
Other languages
Japanese (ja)
Inventor
Toshihiro Ichihara
利浩 市原
Koichiro Ueno
浩一郎 上野
Makoto Isoda
誠 磯田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2010041384A priority Critical patent/JP2011180632A/en
Publication of JP2011180632A publication Critical patent/JP2011180632A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To allow even a general designer not knowing model verification technology well to perform model verification by facilitating creation of an input model. <P>SOLUTION: In this verification device 20, a domain specialization model (a verification target) generation part 24 generates the domain specialization model (the verification target) wherein a specification of a specific system is described according to a domain specialization model grammar from a UML (Unified Modeling Language) model 13 (the verification target) wherein the specification of the system is described in UML based on a "UML model To domain specialization model mapping rule". A model verification code generation part 27 generates a model verification code wherein the specification of the system is described, from the domain specialization model (the verification target) based on a "domain specialization model To model verification code mapping rule". A model verification execution part 30 executes Spin with the model verification code as input, and acquires data indicating a counter example of the specification of the system as a verification result (the counter example). <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、検証装置及び検証方法及び検証プログラムに関するものである。本発明は、特に、設計モデル検証方式に関するものである。   The present invention relates to a verification apparatus, a verification method, and a verification program. The present invention particularly relates to a design model verification method.

従来、Spin等のモデル検証ツール(「モデル検査ツール」ともいう)による設計仕様の検証では、設計者がモデル検証ツールの記述文法に従って振舞いの仕様をコード化することで、モデル検証を行っている。しかし、ツール独自の記述文法を理解して厳密にコード化するのは、一般の設計者にとっては非常に困難である。そのため、独自の図形式(独自モデル)により振舞いを記述することで、記述容易性を向上させる技術がある(例えば、特許文献1参照)。また、UML(Unified・Modeling・Language)モデルからツールの記述文法に則ったモデル検証コードを生成する技術がある(例えば、非特許文献1参照)。   Conventionally, in design specification verification using a model verification tool such as Spin (also referred to as “model checking tool”), the designer performs model verification by coding the behavior specification according to the description grammar of the model verification tool. . However, it is very difficult for general designers to understand and strictly code the description grammar unique to the tool. Therefore, there is a technique for improving the ease of description by describing the behavior in a unique diagram format (unique model) (see, for example, Patent Document 1). In addition, there is a technique for generating a model verification code in accordance with a tool description grammar from a UML (Unified / Modeling / Language) model (see, for example, Non-Patent Document 1).

特開2008−305079号公報JP 2008-305079 A

吉岡信和、青木利晃、田原康之著、「SPINによる設計モデル検証」、近代科学社、2008年9月30日、pp.218〜223Yoshioka Nobukazu, Aoki Toshiaki and Tahara Yasuyuki, “Design Model Verification by SPIN”, Modern Science Co., Ltd., September 30, 2008, pp. 218-223

従来、モデル検証ツールによる設計仕様の検証において、一般の設計者がモデル検証ツールに依存した記述文法に従い、振舞いの仕様をコード化することは困難であるため、上記の独自モデルやUMLモデルを利用した技術によって、コード(「モデル検証コード」ともいう)を生成し、このコードをモデル検証ツールに入力してモデル検証を実行させている。しかし、上記の独自モデルを利用した技術では、独自の図形式の仕様を理解する必要があるため、導入の際、設計者のイニシャルコストが大きいという課題があった。また、上記のUMLモデルを利用した技術では、UMLが汎用的過ぎるため、ある特定分野においてサブセット化できる共通的な記述をその都度最初から記述しなければならなく、冗長であるという課題があった。   Conventionally, in verification of design specifications using model verification tools, it is difficult for general designers to code behavior specifications according to the description grammar that depends on model verification tools. With this technique, a code (also referred to as “model verification code”) is generated, and this code is input to a model verification tool to execute model verification. However, in the technology using the above-mentioned original model, it is necessary to understand the specifications of the original diagram format, and thus there is a problem that the initial cost of the designer is large at the time of introduction. Further, in the technology using the above UML model, since UML is too general, there is a problem that a common description that can be subsets in a specific field must be described from the beginning each time and is redundant. .

また、モデル検証ツールにより検証結果として出力される反例(例えば、デッドロック)のモデルは、モデル検証コードレベルのデータやモデル検証ツールの内部用データを含んでいるため、出力される反例のモデル要素と入力モデル(上記の独自モデルやUMLモデル)の要素が対応しておらず、出力モデルの意味解析が困難であるという課題があった。   Also, the counterexample (for example, deadlock) model output as a verification result by the model verification tool includes model verification code level data and model verification tool internal data. And the elements of the input model (the above-mentioned original model and UML model) do not correspond, and there is a problem that it is difficult to analyze the output model.

これらの課題を乗り越えるにはモデル検証に関する知識や経験が必要とされるため、開発現場へのモデル検証技術の導入は、難しいのが現状である。   In order to overcome these challenges, knowledge and experience related to model verification are required, so it is difficult to introduce model verification technology to development sites.

本発明は、例えば、入力モデルの作成又は出力される反例モデルの意味解析を容易にして、モデル検証技術を熟知しない一般の設計者でもモデル検証を行えるようにすることを目的とする。   An object of the present invention is, for example, to facilitate the semantic analysis of a counterexample model that is created or output as an input model so that even a general designer who is not familiar with model verification technology can perform model verification.

本発明の一の態様に係る検証装置は、
検証対象のシステムの仕様を記述したモデル検証コードを用いて特定のシステムの仕様を検証する検証装置であって、
任意のシステムの仕様を記述するために共通で用いられる汎用モデリング言語の要素と前記特定のシステムの仕様を記述するために用いられるドメイン特化モデリング言語の要素との対応関係を示す第1マッピング情報と、前記ドメイン特化モデリング言語の要素と前記モデル検証コードを構成する要素との対応関係を示す第2マッピング情報とを予め記憶装置に記憶するデータベースと、
前記特定のシステムの仕様を前記汎用モデリング言語で記述した第1汎用モデルデータの入力を入力装置で受け付け、前記データベースにより記憶された第1マッピング情報に基づいて、当該第1汎用モデルデータから、前記特定のシステムの仕様を前記ドメイン特化モデリング言語で記述した第1ドメイン特化モデルデータを処理装置で生成する第1ドメイン特化モデル生成部と、
前記データベースにより記憶された第2マッピング情報に基づいて、前記第1ドメイン特化モデル生成部により生成された第1ドメイン特化モデルデータから、前記特定のシステムの仕様を記述したモデル検証コードを処理装置で生成するモデル検証コード生成部と、
前記モデル検証コード生成部により生成されたモデル検証コードを用いて前記特定のシステムの仕様を処理装置で検証し、検証結果を示す検証結果データを取得するモデル検証実行部とを備えることを特徴とする。
A verification apparatus according to one aspect of the present invention includes:
A verification device that verifies the specifications of a specific system using a model verification code that describes the specifications of the system to be verified,
First mapping information indicating a correspondence relationship between elements of a general-purpose modeling language commonly used to describe the specifications of an arbitrary system and elements of a domain-specific modeling language used to describe the specifications of the specific system A database that stores in advance in a storage device second mapping information indicating a correspondence relationship between the elements of the domain-specific modeling language and the elements constituting the model verification code;
The input device accepts input of first general model data describing the specifications of the specific system in the general modeling language, and based on the first mapping information stored in the database, from the first general model data, A first domain-specific model generation unit that generates first domain-specific model data in which a specification of a specific system is described in the domain-specific modeling language by a processing device;
Based on the second mapping information stored in the database, the model verification code describing the specifications of the specific system is processed from the first domain specific model data generated by the first domain specific model generation unit A model verification code generator generated by the device;
A model verification execution unit that verifies the specifications of the specific system with a processing device using the model verification code generated by the model verification code generation unit, and acquires verification result data indicating a verification result; To do.

本発明の一の態様において、検証装置の第1ドメイン特化モデル生成部は、特定のシステムの仕様を汎用モデリング言語で記述した第1汎用モデルデータの入力を受け付け、第1マッピング情報に基づいて、当該第1汎用モデルデータから、上記特定のシステムの仕様をドメイン特化モデリング言語で記述した第1ドメイン特化モデルデータを生成する。検証装置のモデル検証コード生成部は、第2マッピング情報に基づいて、当該第1ドメイン特化モデルデータから、上記特定のシステムの仕様を記述したモデル検証コードを生成する。検証装置のモデル検証実行部は、当該モデル検証コードを用いて上記特定のシステムの仕様を検証し、検証結果を示す検証結果データを取得する。これにより、入力モデルの作成が容易になるため、モデル検証技術を熟知しない一般の設計者でもモデル検証を行えるようになる。   In one aspect of the present invention, the first domain specific model generation unit of the verification device accepts input of first general model data in which a specification of a specific system is described in a general modeling language, and based on the first mapping information First domain specific model data in which the specifications of the specific system are described in a domain specific modeling language is generated from the first general model data. The model verification code generation unit of the verification apparatus generates a model verification code describing the specifications of the specific system from the first domain specific model data based on the second mapping information. The model verification execution unit of the verification apparatus verifies the specification of the specific system using the model verification code, and acquires verification result data indicating the verification result. This makes it easy to create an input model, so that even a general designer who is not familiar with model verification technology can perform model verification.

実施の形態1に係る設計モデル検証方式の構成図である。2 is a configuration diagram of a design model verification method according to Embodiment 1. FIG. 実施の形態1に係るドメイン特化モデルのメタモデルを示す図である。6 is a diagram illustrating a meta model of a domain specific model according to Embodiment 1. FIG. 実施の形態1に係るドメイン特化モデル文法と各マッピングルールの関係を示す図である。It is a figure which shows the relationship between the domain specialization model grammar which concerns on Embodiment 1, and each mapping rule. 実施の形態1に係る「UMLモデルToドメイン特化モデルマッピングルール」の(a)スキーマ、(b)テーブルデータの一例を示す表である。4 is a table showing an example of (a) schema and (b) table data of “UML model To domain specific model mapping rule” according to the first exemplary embodiment. 実施の形態1に係る「ドメイン特化モデルToモデル検証コードマッピングルール」の(a)スキーマ、(b)テーブルデータの一例を示す表である。4 is a table showing an example of (a) schema and (b) table data of “domain specific model To model verification code mapping rule” according to the first exemplary embodiment. 実施の形態1に係る「検証結果Toドメイン特化モデルマッピングルール」の(a)スキーマ、(b)テーブルデータの一例を示す表である。10 is a table showing an example of (a) schema and (b) table data of “verification result To domain specific model mapping rule” according to the first exemplary embodiment. 実施の形態1に係る「ドメイン特化モデルToUMLモデルマッピングルール」の(a)スキーマ、(b)テーブルデータの一例を示す表である。7 is a table showing an example of (a) schema and (b) table data of “domain specific model ToUML model mapping rule” according to the first exemplary embodiment. 実施の形態1に係る検証装置のハードウェア構成の一例を示す図である。2 is a diagram illustrating an example of a hardware configuration of a verification device according to Embodiment 1. FIG. 実施の形態1に係るドメイン特化モデル文法の例を示すクラス図である。FIG. 4 is a class diagram illustrating an example of a domain specific model grammar according to the first embodiment. 実施の形態1に係るドメイン特化モデル文法の例を示すコンポジット構造図である。3 is a composite structure diagram illustrating an example of a domain-specific model grammar according to Embodiment 1. FIG. 実施の形態1に係る「UMLモデルToドメイン特化モデルマッピングルール」の例を示す表である。10 is a table showing an example of “UML model To domain specific model mapping rule” according to the first exemplary embodiment. 実施の形態1に係る「ドメイン特化モデルToモデル検証コードマッピングルール」の例を示す表である。7 is a table showing an example of “domain specific model To model verification code mapping rule” according to the first exemplary embodiment. 実施の形態1に係る「検証結果Toドメイン特化モデルマッピングルール」の例を示す表である。10 is a table showing an example of “verification result To domain specific model mapping rule” according to the first exemplary embodiment. 実施の形態1に係る「ドメイン特化モデルToUMLモデルマッピングルール」の例を示す表である。10 is a table showing an example of “domain specific model ToUML model mapping rule” according to the first exemplary embodiment. 実施の形態1に係る検証装置全体の動作を示すフローチャートである。3 is a flowchart showing the operation of the entire verification apparatus according to the first embodiment. 実施の形態1に係るUMLモデル(検証対象)の例を示すクラス図である。4 is a class diagram illustrating an example of a UML model (verification target) according to Embodiment 1. FIG. 実施の形態1に係るUMLモデル(検証対象)の例を示すアクティビティ図である。6 is an activity diagram illustrating an example of a UML model (verification target) according to Embodiment 1. FIG. 実施の形態1に係るUMLモデル(検証対象)の例を示すアクティビティ図である。6 is an activity diagram illustrating an example of a UML model (verification target) according to Embodiment 1. FIG. 図15のステップS101の詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process of step S101 of FIG. 実施の形態1に係る1段階目のドメイン特化モデル(検証対象)の一例を示す図である。5 is a diagram illustrating an example of a first stage domain specialization model (verification target) according to Embodiment 1. FIG. 実施の形態1に係る1段階目のドメイン特化モデル(検証対象)の一例を示す図である。5 is a diagram illustrating an example of a first stage domain specialization model (verification target) according to Embodiment 1. FIG. 実施の形態1に係る2段階目のドメイン特化モデル(検証対象)の一例を示す図である。It is a figure which shows an example of the domain specialization model (verification object) of the 2nd step which concerns on Embodiment 1. FIG. 実施の形態1に係る2段階目のドメイン特化モデル(検証対象)の一例を示す図である。It is a figure which shows an example of the domain specialization model (verification object) of the 2nd step which concerns on Embodiment 1. FIG. 実施の形態1に係るモデル検証コードの一例を示す図である。3 is a diagram illustrating an example of a model verification code according to Embodiment 1. FIG. 実施の形態1に係る検証結果(反例)の一例を示す図である。It is a figure which shows an example of the verification result (counterexample) which concerns on Embodiment 1. FIG. 図15のステップS104の詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process of FIG.15 S104. 実施の形態1に係る1段階目のドメイン特化モデル(反例)の一例を示す図である。It is a figure which shows an example of the domain specialization model (counterexample) of the 1st step which concerns on Embodiment 1. FIG. 実施の形態1に係る2段階目のドメイン特化モデル(反例)の一例を示す図である。It is a figure which shows an example of the domain specialization model (counterexample) of the 2nd step which concerns on Embodiment 1. FIG. 実施の形態1に係るUMLモデル(反例)の一例を示す図である。It is a figure which shows an example of the UML model (counterexample) which concerns on Embodiment 1. FIG.

以下、本発明の実施の形態について、図を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

実施の形態1.
図1は、本実施の形態に係る、入力モデルの作成と出力された反例結果の解析を容易にする設計モデル検証方式10の構成図である。
Embodiment 1 FIG.
FIG. 1 is a configuration diagram of a design model verification method 10 that facilitates creation of an input model and analysis of the output counterexample result according to the present embodiment.

図1において、SE11(システムエンジニア)はシステム開発の設計者である。ドメインエンジニア12はドメイン特化モデル文法と4種類のマッピングルールの作成者であり、UML文法とドメイン、モデル検証コード記述文法の有識者である。   In FIG. 1, SE11 (system engineer) is a system development designer. The domain engineer 12 is a creator of a domain specific model grammar and four types of mapping rules, and is an expert in UML grammar, domain, and model verification code description grammar.

UMLモデル13(検証対象)は、検証したい仕様をドメイン特化モデル文法に則り、SE11がモデル化したもので、検証装置20の入力となる。UMLモデル13(検証対象)は、特定のシステムの仕様を汎用モデリング言語(「仕様記述言語」ともいう)で記述した第1汎用モデルデータの一例である。なお、汎用モデリング言語は、任意のシステムの仕様を記述するために共通で用いられる言語である。本実施の形態では、汎用モデリング言語の一例としてUMLを用いるが、他の汎用モデリング言語を用いても構わない。   The UML model 13 (verification target) is modeled by the SE 11 in accordance with the domain-specific model grammar for the specification to be verified, and is input to the verification device 20. The UML model 13 (verification target) is an example of first general-purpose model data in which specifications of a specific system are described in a general-purpose modeling language (also referred to as “specification description language”). The general-purpose modeling language is a language that is commonly used to describe the specifications of an arbitrary system. In the present embodiment, UML is used as an example of a general-purpose modeling language, but other general-purpose modeling languages may be used.

検証装置20は、UML文法のDB21(データベース)、ドメイン特化モデル文法のDB22、モデル検証コード記述文法のDB23、ドメイン特化モデル(検証対象)生成部24、「UMLモデルToドメイン特化モデルマッピングルール」のDB25、ドメイン特化モデル(検証対象)のDB26、モデル検証コード生成部27、「ドメイン特化モデルToモデル検証コードマッピングルール」のDB28、モデル検証コードのDB29、モデル検証実行部30、検証結果(反例)のDB31、ドメイン特化モデル(反例)生成部32、「検証結果Toドメイン特化モデルマッピングルール」のDB33、ドメイン特化モデル(反例)のDB34、UMLモデル(反例)生成部35、「ドメイン特化モデルToUMLモデルマッピングルール」のDB36を備える。   The verification apparatus 20 includes a UML grammar DB 21 (database), a domain-specific model grammar DB 22, a model verification code description grammar DB 23, a domain-specific model (verification target) generation unit 24, “UML model To domain-specific model mapping”. "Rule" DB25, domain-specific model (verification target) DB26, model verification code generation unit 27, "domain-specific model To model verification code mapping rule" DB28, model verification code DB29, model verification execution unit 30, DB 31 for verification result (counterexample), domain specific model (counterexample) generating unit 32, DB33 for "verification result To domain specific model mapping rule", DB34 for domain specific model (counterexample), UML model (counterexample) generating unit 35, “Domain specific model ToUML model mapping Equipped with a DB36 of Lumpur ".

また、図示していないが、検証装置20は、処理装置、記憶装置、入力装置、出力装置等のハードウェアを備える。ハードウェアは検証装置20の各部によって利用される。例えば、処理装置は、検証装置20の各部でデータや情報の演算、加工、読み取り、書き込み等を行うために利用される。記憶装置は、そのデータや情報を記憶するために、入力装置は、そのデータや情報を入力するために、出力装置は、そのデータや情報を出力するために利用される。記憶装置は、特に、それぞれのDB21,22,23,25,26,28,29,31,33,34,36でデータを格納するために利用される。   Although not shown, the verification device 20 includes hardware such as a processing device, a storage device, an input device, and an output device. The hardware is used by each unit of the verification device 20. For example, the processing device is used to perform calculation, processing, reading, writing, and the like of data and information in each unit of the verification device 20. The storage device stores the data and information, the input device inputs the data and information, and the output device uses the data and information. The storage device is used in particular for storing data in each DB 21, 22, 23, 25, 26, 28, 29, 31, 33, 34, 36.

検証装置20は、SE11によって定義された検証対象のUMLモデル13が入力されると、以下のように各部を動作させて反例のUMLモデル14を出力する。   When the verification target UML model 13 defined by SE11 is input, the verification device 20 operates each unit as described below and outputs a counter example UML model 14.

まず、ドメイン特化モデル(検証対象)生成部24が、UMLモデルとドメイン特化モデルのマッピングルールである「UMLモデルToドメイン特化モデルマッピングルール」を用いてUMLモデル13(検証対象)をドメイン特化モデル(検証対象)へ変換する。ドメイン特化モデル(検証対象)は、第1汎用モデルデータに記述された特定のシステムの仕様をドメイン特化モデリング言語(「ドメイン固有モデリング言語」ともいう)で記述した第1ドメイン特化モデルデータの一例である。なお、ドメイン特化モデリング言語は、前述した汎用モデリング言語と異なり、特定のシステムの仕様を記述するために用いられる言語である。   First, the domain-specific model (verification target) generation unit 24 uses the “UML model To domain-specific model mapping rule”, which is a mapping rule between the UML model and the domain-specific model, to convert the UML model 13 (verification target) into the domain. Convert to a specialized model (verification target). The domain-specific model (verification target) is the first domain-specific model data in which the specifications of a specific system described in the first general-purpose model data are described in a domain-specific modeling language (also referred to as “domain-specific modeling language”). It is an example. The domain-specific modeling language is a language used to describe the specifications of a specific system, unlike the general-purpose modeling language described above.

次に、モデル検証コード生成部27が、ドメイン特化モデルとモデル検証コードのマッピングルールである「ドメイン特化モデルToモデル検証コードマッピングルール」を用いてドメイン特化モデル(検証対象)をモデル検証コードへ変換する。モデル検証コードは、第1ドメイン特化モデルデータに記述された特定のシステムの仕様を、モデル検証ツール(例えば、Spin)が解釈可能な言語(例えば、Promela)で記述したものである。モデル検証ツールは、モデル検証コードが入力されると、モデル検証コードに記述された検証対象のシステムの仕様を検証し、その仕様の反例を検出して出力するプログラムである。   Next, the model verification code generation unit 27 performs model verification on the domain specific model (verification target) using the “domain specific model To model verification code mapping rule” which is a mapping rule between the domain specific model and the model verification code. Convert to code. The model verification code is a description of the specification of a specific system described in the first domain specific model data in a language (for example, Promela) that can be interpreted by a model verification tool (for example, Spin). The model verification tool is a program that, when a model verification code is input, verifies the specification of the system to be verified described in the model verification code, and detects and outputs a counterexample of the specification.

次に、モデル検証実行部30が、生成されたモデル検証コードを入力としてモデル検証を行うことにより検証結果(反例)を出力する。このとき、モデル検証実行部30によってモデル検証ツールが実行され、検証結果(反例)を示す検証結果データが取得される。   Next, the model verification execution unit 30 performs model verification with the generated model verification code as an input, and outputs a verification result (counterexample). At this time, the model verification execution unit 30 executes the model verification tool and acquires verification result data indicating a verification result (counterexample).

次に、ドメイン特化モデル(反例)生成部32が、検証結果とドメイン特化モデルのマッピングルールである「検証結果Toドメイン特化モデルマッピングルール」を用いて検証結果(反例)をドメイン特化モデル(反例)へ変換する。ドメイン特化モデル(反例)は、モデル検証ツールにより検出された反例をドメイン特化モデリング言語で記述した第2ドメイン特化モデルデータの一例である。   Next, the domain-specific model (counterexample) generating unit 32 uses the “verification result To domain-specific model mapping rule”, which is a mapping rule between the verification result and the domain-specific model, to domain-specify the verification result (counterexample). Convert to model (counterexample). The domain-specific model (counterexample) is an example of second domain-specific model data in which a counterexample detected by the model verification tool is described in a domain-specific modeling language.

最後に、UMLモデル(反例)生成部35が、ドメイン特化モデルとUMLモデルのマッピングルールである「ドメイン特化モデルToUMLモデルマッピングルール」を用いてドメイン特化モデル(反例)をUMLモデル14(反例)へ変換する。UMLモデル14(反例)は、モデル検証ツールにより検出された反例を汎用モデリング言語で記述した第2汎用モデルデータの一例である。   Finally, the UML model (counterexample) generating unit 35 uses the “domain-specific model ToUML model mapping rule”, which is a mapping rule between the domain-specific model and the UML model, to convert the domain-specific model (counterexample) into the UML model 14 ( Convert to counterexample). The UML model 14 (counterexample) is an example of second general model data in which a counterexample detected by the model verification tool is described in a general modeling language.

UML文法のDB21は、UMLの記述仕様を定義したデータ(UMLメタモデル)を格納するDBである。UMLメタモデル(UML文法)は、OMG(Object・Management・Group)が策定したものである。   The UML grammar DB 21 is a DB that stores data (UML metamodel) defining UML description specifications. The UML metamodel (UML grammar) is developed by OMG (Object Management Group).

ドメイン特化モデル文法のDB22は、各ドメインのドメイン特化モデル(「ドメイン固有モデル」ともいう)の記述仕様(メタモデル)を格納するDBである。ドメイン特化モデルのメタモデル(ドメイン特化モデル文法)はUMLメタモデル(UML文法)を拡張したものであり、ドメインエンジニア12が予め定義しておくものである。ここで、図2にドメイン特化モデルのメタモデルを示す。図2において、ドメイン特化モデルのメタモデルのSE記述構成要素とSE記述振舞い要素はSE11が入力のモデル(検証対象)を定義する際の要素を意味する。暗黙的構成要素と暗黙的振舞い要素はドメイン特化モデル(検証対象)生成部24とドメイン特化モデル(反例)生成部32においてドメイン特化モデルへの変換を行う際にドメイン特化モデルに追加する要素であり、SE11が入力モデルを定義する際には使用しない要素である。つまり、暗黙的構成要素と暗黙的振舞い要素はドメインにてサブセット化される要素であり、UMLで定義する必要のない要素である。これらのSE記述構成要素、SE記述振舞い要素、暗黙的構成要素、暗黙的振舞い要素は、ドメイン特化モデル(検証対象)で使われる要素である。動作要素は、ドメイン特化モデル(反例)で使われる要素である。ドメイン特化モデル(反例)では、他に、SE記述構成要素、SE記述振舞い要素、暗黙的構成要素、暗黙的振舞い要素が使われる。なお、ドメイン特化モデル(反例)生成部32が検証結果をドメイン特化モデル(反例)に変換する際、「検証結果Toドメイン特化モデルマッピングルール」の参照による変換だけではドメイン特化モデル(反例)のモデル要素が不足し、出力モデルの要素が入力モデルの要素と対応しない。そのため、ドメイン特化モデル(反例)生成部32は、ドメイン特化モデル文法においてドメイン特化モデルのメタモデルの検証トレースに相当する関連と、不足する要素との関連から、別の要素との関連を辿ることで、不足する要素を特定し、補足するようにしている。   The domain specific model grammar DB 22 is a DB that stores a description specification (meta model) of a domain specific model (also referred to as a “domain specific model”) of each domain. The domain-specific model metamodel (domain-specific model grammar) is an extension of the UML metamodel (UML grammar) and is defined in advance by the domain engineer 12. Here, FIG. 2 shows a meta model of the domain specific model. In FIG. 2, SE description constituent elements and SE description behavior elements of the meta model of the domain specific model mean elements when SE 11 defines an input model (verification target). The implicit component and the implicit behavior element are added to the domain specialization model when the domain specialization model (verification target) generation unit 24 and the domain specialization model (counterexample) generation unit 32 perform conversion to the domain specialization model. Is an element that is not used when SE11 defines an input model. In other words, the implicit component and the implicit behavior element are elements that are sub-set in the domain and do not need to be defined in UML. These SE description component, SE description behavior element, implicit configuration element, and implicit behavior element are elements used in the domain specific model (verification target). The action element is an element used in the domain specific model (counterexample). In the domain specific model (counterexample), SE description constituent element, SE description behavior element, implicit constituent element, and implicit behavior element are used in addition. When the domain-specific model (counterexample) generating unit 32 converts the verification result into the domain-specific model (counterexample), the domain-specific model (only by conversion based on the “verification result To domain-specific model mapping rule”) ( The model element of (counterexample) is insufficient, and the element of the output model does not correspond to the element of the input model. Therefore, the domain-specific model (counterexample) generation unit 32 uses the relationship corresponding to the verification trace of the meta-model of the domain-specific model in the domain-specific model grammar and the relationship with another element from the relationship with the missing element. By tracing, the missing elements are identified and supplemented.

ドメイン特化モデル文法を定義する際に、ドメインエンジニア12は併せて、4種類のマッピングルール(「UMLモデルToドメイン特化モデルマッピングルール」、「ドメイン特化モデルToモデル検証コードマッピングルール」、「検証結果Toドメイン特化モデルマッピングルール」、「ドメイン特化モデルToUMLモデルマッピングルール」)も定義する。ここで、図3にドメイン特化モデル文法と各マッピングルールの関係を示す。図3において、「UMLモデルToドメイン特化モデルマッピングルール」と「ドメイン特化モデルToUMLモデルマッピングルール」は、UML文法の要素とドメイン特化モデル文法の要素との対応を定義したマッピングルールである。「ドメイン特化モデルToモデル検証コードマッピングルール」と「検証結果Toドメイン特化モデルマッピングルール」は、ドメイン特化モデル文法の要素とモデル検証コード記述文法の要素との対応を定義したマッピングルールである。   When defining the domain-specific model grammar, the domain engineer 12 combines four types of mapping rules (“UML model To domain-specific model mapping rule”, “domain-specific model To model verification code mapping rule”, “ The verification result To domain specific model mapping rule "and" domain specific model ToUML model mapping rule ") are also defined. FIG. 3 shows the relationship between the domain specific model grammar and each mapping rule. In FIG. 3, “UML model To domain specific model mapping rule” and “domain specific model ToUML model mapping rule” are mapping rules that define the correspondence between the elements of the UML grammar and the elements of the domain specific model grammar. . “Domain-specific model To model verification code mapping rule” and “Verification result To domain-specific model mapping rule” are mapping rules that define the correspondence between domain-specific model grammar elements and model verification code description grammar elements. is there.

上記4種類のマッピングルールのうち、「UMLモデルToドメイン特化モデルマッピングルール」と「ドメイン特化モデルToUMLモデルマッピングルール」は、汎用モデリング言語の要素とドメイン特化モデリング言語の要素との対応関係を示す第1マッピング情報の一例である。「ドメイン特化モデルToモデル検証コードマッピングルール」は、ドメイン特化モデリング言語の要素とモデル検証コードを構成する要素との対応関係を示す第2マッピング情報の一例である。「検証結果Toドメイン特化モデルマッピングルール」は、検証結果データを構成する要素とドメイン特化モデリング言語の要素との対応関係を示す第3マッピング情報の一例である。各マッピングルールは、DB25,28,33,36によって予め記憶装置に記憶される。   Of the above four types of mapping rules, “UML model To domain specific model mapping rule” and “Domain specific model ToUML model mapping rule” are correspondences between elements of general-purpose modeling language and elements of domain specific modeling language. It is an example of the 1st mapping information which shows. The “domain specific model To model verification code mapping rule” is an example of second mapping information indicating a correspondence relationship between elements of the domain specific modeling language and elements constituting the model verification code. The “verification result To domain specific model mapping rule” is an example of third mapping information indicating a correspondence relationship between elements constituting the verification result data and elements of the domain specific modeling language. Each mapping rule is stored in advance in the storage device by the DBs 25, 28, 33, and 36.

モデル検証コード記述文法のDB23は、モデル検証ツールが解釈可能なプログラムの記述文法と検証結果の仕様を定義したものを格納するDBである。モデル検証を行うには、この記述文法に則って検証対象となるモデル(仕様)をコード化し、モデル検証実行部30に入力する。   The model verification code description grammar DB 23 is a DB that stores a description grammar of a program that can be interpreted by the model verification tool and a specification of a verification result. In order to perform model verification, a model (specification) to be verified is coded in accordance with the description grammar and input to the model verification execution unit 30.

ドメイン特化モデル(検証対象)生成部24は、入力されたUMLモデル13(検証対象)のドメインに対応する「UMLモデルToドメイン特化モデルマッピングルール」のマッピングルールとドメイン特化モデル文法を参照し、UMLモデル13(検証対象)をドメイン特化モデル(検証対象)に変換する。ドメイン特化モデル(検証対象)生成部24は、第1ドメイン特化モデル生成部の一例である。   The domain specific model (verification target) generation unit 24 refers to the mapping rule and domain specific model grammar of “UML model To domain specific model mapping rule” corresponding to the domain of the input UML model 13 (verification target). Then, the UML model 13 (verification target) is converted into a domain specific model (verification target). The domain-specific model (verification target) generation unit 24 is an example of a first domain-specific model generation unit.

「UMLモデルToドメイン特化モデルマッピングルール」のDB25は、UMLモデルとドメイン特化モデルのマッピングルールを格納したDBである。ここで、図4の(a)に「UMLモデルToドメイン特化モデルマッピングルール」のスキーマを示す。「UMLモデルToドメイン特化モデルマッピングルール」のDB25には、例えば図4の(b)に示すようなテーブルデータが格納される。このマッピングルールは、ドメインエンジニア12がUML文法とドメイン特化モデル文法を参照して、予め定義して格納しておく。   The DB 25 of “UML model To domain specific model mapping rule” is a DB that stores the mapping rule between the UML model and the domain specific model. Here, FIG. 4A shows a schema of “UML model To domain specific model mapping rule”. For example, table data as shown in FIG. 4B is stored in the DB 25 of “UML model To domain specific model mapping rule”. This mapping rule is defined and stored in advance by the domain engineer 12 with reference to the UML grammar and the domain specific model grammar.

ドメイン特化モデル(検証対象)のDB26は、ドメイン特化モデル(検証対象)生成部24により生成される検証対象のドメイン特化モデルを、モデル検証コード生成部27がロードするまで一時的に格納するDBである。   The domain-specific model (verification target) DB 26 temporarily stores the domain-specific model to be verified generated by the domain-specific model (verification target) generation unit 24 until the model verification code generation unit 27 loads it. It is DB to do.

モデル検証コード生成部27は、ドメイン特化モデル(検証対象)のドメインに対応する「ドメイン特化モデルToモデル検証コードマッピングルール」のマッピングルールを参照し、ドメイン特化モデル(検証対象)をモデル検証コードに変換する。   The model verification code generation unit 27 refers to the mapping rule of the “domain specific model To model verification code mapping rule” corresponding to the domain of the domain specific model (verification target), and models the domain specific model (verification target). Convert to verification code.

「ドメイン特化モデルToモデル検証コードマッピングルール」のDB28は、ドメイン特化モデル(検証対象)とモデル検証コードのマッピングルールを格納したDBである。ここで、図5の(a)に「ドメイン特化モデルToモデル検証コードマッピングルール」のスキーマを示す。「ドメイン特化モデルToモデル検証コードマッピングルール」のDB28には、例えば図5の(b)に示すようなテーブルデータが格納される。このマッピングルールは、ドメインエンジニア12がドメイン特化モデル文法とモデル検証コード記述文法を参照して、予め定義して格納しておく。   The DB 28 of “domain specific model To model verification code mapping rule” is a DB that stores a mapping rule between a domain specific model (verification target) and a model verification code. Here, FIG. 5A shows the schema of the “domain specific model To model verification code mapping rule”. For example, table data as shown in FIG. 5B is stored in the DB 28 of the “domain specific model To model verification code mapping rule”. This mapping rule is defined and stored in advance by the domain engineer 12 with reference to the domain specific model grammar and the model verification code description grammar.

モデル検証コードのDB29は、モデル検証コード生成部27により生成されるモデル検証コードを、モデル検証実行部30がロードするまで一時的に格納するDBである。なお、モデル検証コードとは、モデル検証ツールが解釈可能なコードにより記述されたプログラムである。   The model verification code DB 29 is a DB that temporarily stores the model verification code generated by the model verification code generation unit 27 until the model verification execution unit 30 loads it. The model verification code is a program described by a code that can be interpreted by the model verification tool.

モデル検証実行部30は、Spin等、既存のモデル検証ツールのコマンドを実行する部分であり、モデル検証コードのDB29よりロードしたモデル検証コードを入力として、検証結果(反例)を出力する。   The model verification execution unit 30 is a part for executing a command of an existing model verification tool such as Spin, and inputs a model verification code loaded from the model verification code DB 29 and outputs a verification result (counterexample).

検証結果(反例)のDB31は、モデル検証実行部30から出力される検証結果(反例)を、ドメイン特化モデル(反例)生成部32がロードするまで一時的に格納するDBである。   The verification result (counterexample) DB 31 is a DB that temporarily stores the verification result (counterexample) output from the model verification execution unit 30 until the domain-specific model (counterexample) generation unit 32 loads it.

ドメイン特化モデル(反例)生成部32は、検証結果(反例)のドメインに対応する「検証結果Toドメイン特化モデルマッピングルール」のマッピングルールとドメイン特化モデル文法を参照し、検証結果(反例)をドメイン特化モデル(反例)に変換する。ドメイン特化モデル(反例)生成部32は、第2ドメイン特化モデル生成部の一例である。   The domain-specific model (counterexample) generation unit 32 refers to the mapping rule and domain-specific model grammar of the “verification result To domain-specific model mapping rule” corresponding to the domain of the verification result (counterexample), and the verification result (counterexample) ) Into a domain-specific model (counterexample). The domain specific model (counterexample) generation unit 32 is an example of a second domain specific model generation unit.

「検証結果Toドメイン特化モデルマッピングルール」のDB33は、検証結果とドメイン特化モデルのマッピングルールを格納したDBである。ここで、図6の(a)に「検証結果Toドメイン特化モデルマッピングルール」のスキーマを示す。「検証結果Toドメイン特化モデルマッピングルール」のDB33には、例えば図6の(b)に示すようなテーブルデータが格納される。このマッピングルールは、ドメインエンジニア12がモデル検証コード記述文法とドメイン特化モデル文法を参照して、予め定義して格納しておく。   The DB 33 of “verification result To domain specific model mapping rule” is a DB that stores the mapping result of the verification result and the domain specific model. Here, FIG. 6A shows a schema of the “verification result To domain specific model mapping rule”. For example, table data as shown in FIG. 6B is stored in the DB 33 of “verification result To domain specific model mapping rule”. This mapping rule is defined and stored in advance by the domain engineer 12 with reference to the model verification code description grammar and the domain specific model grammar.

ドメイン特化モデル(反例)のDB34は、ドメイン特化モデル(反例)生成部32により生成されるドメイン特化モデル(反例)を、UMLモデル(反例)生成部35がロードするまで一時的に格納するDBである。   The domain specialization model (counterexample) DB 34 temporarily stores the domain specialization model (counterexample) generated by the domain specialization model (counterexample) generation unit 32 until the UML model (counterexample) generation unit 35 loads it. It is DB to do.

UMLモデル(反例)生成部35は、ドメイン特化モデル(反例)のドメインに対応する「ドメイン特化モデルToUMLモデルマッピングルール」のマッピングルールを参照し、ドメイン特化モデル(反例)をUMLモデル14(反例)に変換する。UMLモデル(反例)生成部35は、汎用モデル生成部の一例である。   The UML model (counterexample) generating unit 35 refers to the mapping rule of the “domain-specific model ToUML model mapping rule” corresponding to the domain of the domain-specific model (counterexample), and converts the domain-specific model (counterexample) into the UML model 14. Convert to (counterexample). The UML model (counterexample) generation unit 35 is an example of a general-purpose model generation unit.

「ドメイン特化モデルToUMLモデルマッピングルール」のDB36は、ドメイン特化モデルとUMLモデルのマッピングルールを格納したDBである。ここで、図7の(a)に「ドメイン特化モデルToUMLモデルマッピングルール」のスキーマを示す。「ドメイン特化モデルToUMLモデルマッピングルール」のDB36には、例えば図7の(b)に示すようなテーブルデータが格納される。このマッピングルールは、ドメインエンジニア12がドメイン特化モデル文法とUML文法を参照して、予め定義して格納しておく。   The DB 36 of “domain specific model ToUML model mapping rule” is a DB that stores a mapping rule between the domain specific model and the UML model. Here, FIG. 7A shows a schema of “domain specific model ToUML model mapping rule”. For example, table data as shown in FIG. 7B is stored in the DB 36 of the “domain specific model ToUML model mapping rule”. This mapping rule is defined and stored in advance by the domain engineer 12 with reference to the domain specific model grammar and the UML grammar.

UMLモデル14(反例)は、UMLモデル(反例)生成部35により生成される反例のUMLモデルである。   The UML model 14 (counterexample) is a counterexample UML model generated by the UML model (counterexample) generation unit 35.

このように、本実施の形態に係る設計モデル検証方式10では、ドメイン特化モデル文法をベースにしてSE11が記述したUMLモデル13(検証対象)と検証したい性質を定義した制約を入力として反例のUMLモデル14を生成する。   As described above, in the design model verification method 10 according to the present embodiment, the UML model 13 (verification target) described by the SE 11 based on the domain specific model grammar and the constraint defining the property to be verified are input as counter examples. A UML model 14 is generated.

図8は、検証装置20のハードウェア構成の一例を示す図である。   FIG. 8 is a diagram illustrating an example of a hardware configuration of the verification device 20.

図8において、検証装置20は、コンピュータであり、LCD901(Liquid・Crystal・Display)、キーボード902(K/B)、マウス903、FDD904(Flexible・Disk・Drive)、CDD905(Compact・Disc・Drive)、プリンタ906といったハードウェアデバイスを備えている。これらのハードウェアデバイスはケーブルや信号線で接続されている。LCD901の代わりに、CRT(Cathode・Ray・Tube)、あるいは、その他の表示装置が用いられてもよい。マウス903の代わりに、タッチパネル、タッチパッド、トラックボール、ペンタブレット、あるいは、その他のポインティングデバイスが用いられてもよい。   In FIG. 8, the verification device 20 is a computer and includes an LCD 901 (Liquid / Crystal / Display), a keyboard 902 (K / B), a mouse 903, an FDD 904 (Flexible / Disk / Drive), and a CDD 905 (Compact / Disc / Drive). , A hardware device such as a printer 906 is provided. These hardware devices are connected by cables and signal lines. Instead of the LCD 901, a CRT (Cathode / Ray / Tube) or other display device may be used. Instead of the mouse 903, a touch panel, a touch pad, a trackball, a pen tablet, or other pointing devices may be used.

検証装置20は、プログラムを実行するCPU911(Central・Processing・Unit)を備えている。CPU911は、処理装置の一例である。CPU911は、バス912を介してROM913(Read・Only・Memory)、RAM914(Random・Access・Memory)、通信ボード915、LCD901、キーボード902、マウス903、FDD904、CDD905、プリンタ906、HDD920(Hard・Disk・Drive)と接続され、これらのハードウェアデバイスを制御する。HDD920の代わりに、フラッシュメモリ、光ディスク装置、メモリカードリーダライタ又はその他の記憶媒体が用いられてもよい。   The verification apparatus 20 includes a CPU 911 (Central Processing Unit) that executes a program. The CPU 911 is an example of a processing device. The CPU 911 includes a ROM 913 (Read / Only / Memory), a RAM 914 (Random / Access / Memory), a communication board 915, an LCD 901, a keyboard 902, a mouse 903, an FDD 904, a CDD 905, a printer 906, and an HDD 920 (Hard / Disk) via a bus 912. Connected with Drive) to control these hardware devices. Instead of the HDD 920, a flash memory, an optical disk device, a memory card reader / writer, or other storage medium may be used.

RAM914は、揮発性メモリの一例である。ROM913、FDD904、CDD905、HDD920は、不揮発性メモリの一例である。これらは、記憶装置の一例である。通信ボード915、キーボード902、マウス903、FDD904、CDD905は、入力装置の一例である。また、通信ボード915、LCD901、プリンタ906は、出力装置の一例である。   The RAM 914 is an example of a volatile memory. The ROM 913, the FDD 904, the CDD 905, and the HDD 920 are examples of nonvolatile memories. These are examples of the storage device. The communication board 915, the keyboard 902, the mouse 903, the FDD 904, and the CDD 905 are examples of input devices. The communication board 915, the LCD 901, and the printer 906 are examples of output devices.

通信ボード915は、LAN(Local・Area・Network)等に接続されている。通信ボード915は、LANに限らず、IP−VPN(Internet・Protocol・Virtual・Private・Network)、広域LAN、ATM(Asynchronous・Transfer・Mode)ネットワークといったWAN(Wide・Area・Network)、あるいは、インターネットに接続されていても構わない。LAN、WAN、インターネットは、ネットワークの一例である。   The communication board 915 is connected to a LAN (Local / Area / Network) or the like. The communication board 915 is not limited to a LAN, but is an IP-VPN (Internet, Protocol, Private, Network), a wide area LAN, an ATM (Asynchronous / Transfer / Mode) network, a WAN (Wide / Area / Network), or the Internet. It does not matter if it is connected to. LAN, WAN, and the Internet are examples of networks.

HDD920には、オペレーティングシステム921(OS)、ウィンドウシステム922、プログラム群923、ファイル群924が記憶されている。プログラム群923のプログラムは、CPU911、オペレーティングシステム921、ウィンドウシステム922により実行される。プログラム群923には、本実施の形態の説明において「〜部」として説明する機能を実行するプログラムが含まれている。プログラムは、CPU911により読み出され実行される。ファイル群924には、本実施の形態の説明において、「〜データ」、「〜情報」、「〜ID(識別子)」、「〜フラグ」、「〜結果」として説明するデータや情報や信号値や変数値やパラメータが、「〜ファイル」や「〜データベース」や「〜テーブル」の各項目として含まれている。「〜ファイル」や「〜データベース」や「〜テーブル」は、RAM914やHDD920等の記憶媒体に記憶される。RAM914やHDD920等の記憶媒体に記憶されたデータや情報や信号値や変数値やパラメータは、読み書き回路を介してCPU911によりメインメモリやキャッシュメモリに読み出され、抽出、検索、参照、比較、演算、計算、制御、出力、印刷、表示といったCPU911の処理(動作)に用いられる。抽出、検索、参照、比較、演算、計算、制御、出力、印刷、表示といったCPU911の処理中、データや情報や信号値や変数値やパラメータは、メインメモリやキャッシュメモリやバッファメモリに一時的に記憶される。   The HDD 920 stores an operating system 921 (OS), a window system 922, a program group 923, and a file group 924. The programs in the program group 923 are executed by the CPU 911, the operating system 921, and the window system 922. The program group 923 includes programs that execute the functions described as “˜units” in the description of the present embodiment. The program is read and executed by the CPU 911. The file group 924 includes data, information, and signal values described as “˜data”, “˜information”, “˜ID (identifier)”, “˜flag”, and “˜result” in the description of this embodiment. And variable values and parameters are included as items of “˜file”, “˜database”, and “˜table”. The “˜file”, “˜database”, and “˜table” are stored in a storage medium such as the RAM 914 or the HDD 920. Data, information, signal values, variable values, and parameters stored in a storage medium such as the RAM 914 and the HDD 920 are read out to the main memory and the cache memory by the CPU 911 via a read / write circuit, and extracted, searched, referenced, compared, and calculated. It is used for processing (operation) of the CPU 911 such as calculation, control, output, printing, and display. During the processing of the CPU 911 such as extraction, search, reference, comparison, calculation, calculation, control, output, printing, and display, data, information, signal values, variable values, and parameters are temporarily stored in the main memory, cache memory, and buffer memory. Remembered.

本実施の形態の説明において用いるブロック図やフローチャートの矢印の部分は主としてデータや信号の入出力を示す。データや信号は、RAM914等のメモリ、FDD904のフレキシブルディスク(FD)、CDD905のコンパクトディスク(CD)、HDD920の磁気ディスク、光ディスク、DVD(Digital・Versatile・Disc)、あるいは、その他の記録媒体に記録される。また、データや信号は、バス912、信号線、ケーブル、あるいは、その他の伝送媒体により伝送される。   The arrows in the block diagrams and flowcharts used in the description of this embodiment mainly indicate input / output of data and signals. Data and signals are recorded in memory such as RAM 914, FDD904 flexible disk (FD), CDD905 compact disk (CD), HDD920 magnetic disk, optical disk, DVD (Digital Versatile Disc), or other recording media Is done. Data and signals are transmitted by a bus 912, a signal line, a cable, or other transmission media.

本実施の形態の説明において「〜部」として説明するものは、「〜回路」、「〜装置」、「〜機器」であってもよく、また、「〜ステップ」、「〜工程」、「〜手順」、「〜処理」であってもよい。即ち、「〜部」として説明するものは、ROM913に記憶されたファームウェアで実現されていても構わない。あるいは、「〜部」として説明するものは、ソフトウェアのみ、あるいは、素子、デバイス、基板、配線といったハードウェアのみで実現されていても構わない。あるいは、「〜部」として説明するものは、ソフトウェアとハードウェアとの組み合わせ、あるいは、ソフトウェアとハードウェアとファームウェアとの組み合わせで実現されていても構わない。ファームウェアとソフトウェアは、プログラムとして、フレキシブルディスク、コンパクトディスク、磁気ディスク、光ディスク、DVD等の記録媒体に記憶される。プログラムはCPU911により読み出され、CPU911により実行される。即ち、プログラムは、本実施の形態の説明で述べる「〜部」としてコンピュータを機能させるものである。あるいは、プログラムは、本実施の形態の説明で述べる「〜部」の手順や方法をコンピュータに実行させるものである。   In the description of the present embodiment, what is described as “to part” may be “to circuit”, “to device”, “to device”, and “to step”, “to process”, “to”. ~ Procedure "," ~ process ". That is, what is described as “˜unit” may be realized by firmware stored in the ROM 913. Alternatively, what is described as “˜unit” may be realized only by software, or only by hardware such as an element, a device, a board, and wiring. Alternatively, what is described as “to part” may be realized by a combination of software and hardware, or a combination of software, hardware and firmware. Firmware and software are stored as programs in a recording medium such as a flexible disk, a compact disk, a magnetic disk, an optical disk, and a DVD. The program is read by the CPU 911 and executed by the CPU 911. That is, the program causes the computer to function as “to part” described in the description of the present embodiment. Or a program makes a computer perform the procedure and method of "-part" described by description of this Embodiment.

以下、検証装置20の動作(本実施の形態に係る検証方法、本実施の形態に係る検証プログラムの処理手順)について、下記のプリンタ・スキャナの獲得仕様を例にして説明する。なお、本例では、モデル検証ツールとしてSpinを用いることを想定しているが、他のモデル検証ツールを用いても構わない。   Hereinafter, the operation of the verification apparatus 20 (the verification method according to the present embodiment and the processing procedure of the verification program according to the present embodiment) will be described using the following printer / scanner acquisition specification as an example. In this example, it is assumed that Spin is used as the model verification tool, but other model verification tools may be used.

プリンタ・スキャナの獲得の際の振舞い仕様(獲得仕様):ユーザAとユーザBがプリンタとスキャナの2つの資源を使って作業をする。ユーザAとユーザBがプリンタとスキャナを利用する手順は下記の通りとする。なお、一方が獲得しようとした資源を既に他方が獲得している場合は、その資源がリリースされてフリー状態になるまで待つ。
・ユーザAは、プリンタ→スキャナの順に資源を獲得し、2つの資源を同時に利用した後、プリンタ→スキャナの順に資源を解放する。
・ユーザBは、スキャナ→プリンタの順に資源を獲得し、2つの資源を同時に利用した後、プリンタ→スキャナの順に資源を解放する。
Behavior specification (acquisition specification) when acquiring a printer / scanner: User A and user B work by using two resources of a printer and a scanner. The procedure for user A and user B to use the printer and scanner is as follows. Note that if the other side has already acquired the resource that one side has attempted to acquire, it waits until the resource is released and becomes free.
User A acquires resources in the order of printer → scanner, uses two resources simultaneously, and then releases resources in the order of printer → scanner.
User B acquires resources in the order of scanner → printer, uses the two resources simultaneously, and then releases resources in the order of printer → scanner.

プリンタ・スキャナの獲得仕様のドメインを“共有資源獲得”とした場合の、共有資源獲得用のドメイン特化モデル文法の例を図9、図10に示す。ドメイン特化モデル文法のDB22には、例えば図9のクラス図、図10のコンポジット構造図で定義されるメタモデルデータが格納される。また、共有資源獲得用のドメイン特化モデル文法に対応する4種類のマッピングルールの例を図11〜図14に示す。「UMLモデルToドメイン特化モデルマッピングルール」のDB25には、例えば図11に示すようなテーブルデータが格納される。「ドメイン特化モデルToモデル検証コードマッピングルール」のDB28には、例えば図12に示すようなテーブルデータが格納される。「検証結果Toドメイン特化モデルマッピングルール」のDB33には、例えば図13に示すようなテーブルデータが格納される。「ドメイン特化モデルToUMLモデルマッピングルール」のDB36には、例えば図14に示すようなテーブルデータが格納される。各マッピングルールは、定義されたドメイン特化モデル文法とUML文法、モデル検証コード記述文法から作成される。   Examples of domain-specific model grammars for acquiring shared resources when the domain of the acquisition specification of the printer / scanner is “shared resource acquisition” are shown in FIGS. For example, meta model data defined by the class diagram of FIG. 9 and the composite structure diagram of FIG. 10 is stored in the domain specific model grammar DB 22. Examples of four types of mapping rules corresponding to the domain-specific model grammar for acquiring shared resources are shown in FIGS. For example, table data as shown in FIG. 11 is stored in the DB 25 of “UML model To domain specific model mapping rule”. For example, table data as shown in FIG. 12 is stored in the DB 28 of the “domain specific model To model verification code mapping rule”. For example, table data as shown in FIG. 13 is stored in the DB 33 of the “verification result To domain specific model mapping rule”. For example, table data as shown in FIG. 14 is stored in the DB 36 of “domain specific model ToUML model mapping rule”. Each mapping rule is created from the defined domain-specific model grammar, UML grammar, and model verification code description grammar.

図15は、検証装置20全体の動作を示すフローチャートである。   FIG. 15 is a flowchart showing the overall operation of the verification apparatus 20.

まずSE11が、検証したい仕様に関わるドメインのドメイン特化モデル文法を参照し、その文法に則ってUMLモデル13(検証対象)を定義し、ドメイン特化モデル(検証対象)生成部24に入力する。プリンタ・スキャナの資源獲得仕様の場合のUMLモデル13(検証対象)を図16〜図18に示す。SE11は、例えば図16のクラス図、図17のユーザAのアクティビティ図、図18のユーザBのアクティビティ図で定義されるUMLモデル13(検証対象)を入力する。   First, the SE 11 refers to the domain specific model grammar of the domain related to the specification to be verified, defines the UML model 13 (verification target) according to the grammar, and inputs it to the domain specific model (verification target) generation unit 24. . FIGS. 16 to 18 show the UML model 13 (verification target) in the case of the resource acquisition specification of the printer / scanner. SE11 inputs, for example, the UML model 13 (verification target) defined in the class diagram of FIG. 16, the activity diagram of user A in FIG. 17, and the activity diagram of user B in FIG.

図16に示すように、このUMLモデル13(検証対象)は、要素として、ユーザA(UserA)やユーザB(UserB)を含んでいる。また、図17及び図18に示すように、このUMLモデル13(検証対象)は、要素として、プリンタ(printer)やスキャナ(scanner)を含んでいる。そして、図17に示すように、このUMLモデル13(検証対象)では、ユーザA(UserA)がプリンタ(printer)、スキャナ(scanner)を順番に獲得(get)した後、プリンタ(printer)、スキャナ(scanner)を順番に解放(release)することが記述されている。また、図18に示すように、このUMLモデル13(検証対象)では、ユーザB(UserB)がスキャナ(scanner)、プリンタ(printer)を順番に獲得(get)した後、プリンタ(printer)、スキャナ(scanner)を順番に解放(release)することが記述されている。   As shown in FIG. 16, the UML model 13 (verification target) includes user A (User A) and user B (User B) as elements. As shown in FIGS. 17 and 18, the UML model 13 (verification target) includes a printer and a scanner as elements. As shown in FIG. 17, in this UML model 13 (verification target), after a user A (User A) acquires (print) a printer and a scanner (scanner) in order, the printer (printer) and the scanner It is described that (scanner) is released in order. Also, as shown in FIG. 18, in this UML model 13 (verification target), after user B (UserB) acquires (scanner) and printer (printer) in order, the printer (printer) and scanner It is described that (scanner) is released in order.

図15のステップS101において、ドメイン特化モデル(検証対象)生成部24は、特定のシステムの仕様としてプリンタ・スキャナの獲得仕様をUMLで記述したUMLモデル13(検証対象)の入力を入力装置で受け付ける。ドメイン特化モデル(検証対象)生成部24は、DB25により記憶された「UMLモデルToドメイン特化モデルマッピングルール」に基づいて、そのUMLモデル13(検証対象)から、プリンタ・スキャナの獲得仕様をドメイン特化モデリング言語で(即ち、DB22により記憶されたドメイン特化モデル文法に従って)記述したドメイン特化モデル(検証対象)を処理装置で生成する。そして、ドメイン特化モデル(検証対象)生成部24は、生成したドメイン特化モデル(検証対象)をDB26に記憶する。   In step S101 of FIG. 15, the domain specific model (verification target) generation unit 24 uses the input device to input the UML model 13 (verification target) in which the acquisition specifications of the printer / scanner are described in UML as the specifications of a specific system. Accept. Based on the “UML model To domain specific model mapping rule” stored in the DB 25, the domain specific model (verification target) generation unit 24 obtains the printer / scanner acquisition specifications from the UML model 13 (verification target). A domain-specific model (verification target) described in the domain-specific modeling language (that is, according to the domain-specific model grammar stored by the DB 22) is generated by the processing device. Then, the domain specialization model (verification target) generation unit 24 stores the generated domain specialization model (verification target) in the DB 26.

ここで、ステップS101の詳細な処理を図19に示す。   Here, the detailed process of step S101 is shown in FIG.

図19において、ドメイン特化モデル(検証対象)生成部24は、入力されたUMLモデル13(検証対象)の要素を抽出して、対応するドメインの「UMLモデルToドメイン特化モデルマッピングルール」を参照して、UMLモデル13(検証対象)を1段階目のドメイン特化モデル(検証対象)に変換する(ステップS201)。図20は、図11に示した「UMLモデルToドメイン特化モデルマッピングルール」に従って、図16及び図17に示したユーザAのUMLモデル13(検証対象)から生成されるユーザAの1段階目のドメイン特化モデル(検証対象)の一例である。同様に、図21は、図11に示した「UMLモデルToドメイン特化モデルマッピングルール」に従って、図16及び図18に示したユーザBのUMLモデル13(検証対象)から生成されるユーザBの1段階目のドメイン特化モデル(検証対象)の一例である。図20及び図21に示すように、1段階目のドメイン特化モデル(検証対象)は、UserTypeやResourceといったSE記述構成要素、getやreleaseといったSE記述振舞い要素を含んでいる。   In FIG. 19, the domain specific model (verification target) generation unit 24 extracts the elements of the input UML model 13 (verification target) and sets the “UML model To domain specific model mapping rule” of the corresponding domain. With reference to the UML model 13 (verification target), the UML model 13 (verification target) is converted into a first stage domain specific model (verification target) (step S201). FIG. 20 shows the first stage of the user A generated from the UML model 13 (verification target) of the user A shown in FIGS. 16 and 17 in accordance with the “UML model To domain specific model mapping rule” shown in FIG. It is an example of a domain specialization model (verification object). Similarly, FIG. 21 shows the user B's generated from the UML model 13 (verification target) of user B shown in FIGS. 16 and 18 according to the “UML model To domain specific model mapping rule” shown in FIG. It is an example of the domain specialization model (verification object) of the 1st step. As shown in FIGS. 20 and 21, the domain specialization model (verification target) at the first stage includes SE description constituent elements such as UserType and Resource, and SE description behavior elements such as get and release.

次に、ドメイン特化モデル(検証対象)生成部24は、対応するドメインのドメイン特化モデル文法を参照して、暗黙的要素を1段階目のドメイン特化モデル(検証対象)に付加して、2段階目のドメイン特化モデル(検証対象)を生成し、ドメイン特化モデル(検証対象)のDB26に格納する(ステップS202)。図22は、図20に示したユーザAの1段階目のドメイン特化モデル(検証対象)から生成されるユーザAの2段階目のドメイン特化モデル(検証対象)の一例である。同様に、図23は、図21に示したユーザBの1段階目のドメイン特化モデル(検証対象)から生成されるユーザBの2段階目のドメイン特化モデル(検証対象)の一例である。図22及び図23に示すように、この2段階目のドメイン特化モデル(検証対象)は、SE記述構成要素やSE記述振舞い要素だけでなく、暗黙的構成要素であるstateを含んでいる。そして、この2段階目のドメイン特化モデル(検証対象)では、資源(Resource)が獲得(get)されると状態(state)が使用中(used)になること、及び、資源(Resource)が解放(release)されると状態(state)が空き(idle)になることが記述されている。これらの記述はUMLモデル13では省略されていたものである。   Next, the domain specialization model (verification target) generation unit 24 refers to the domain specialization model grammar of the corresponding domain, and adds an implicit element to the first stage domain specialization model (verification target). A second stage domain specialization model (verification target) is generated and stored in the DB 26 of the domain specialization model (verification target) (step S202). FIG. 22 is an example of the second stage domain specialization model (verification target) of user A generated from the first stage domain specialization model (verification target) of user A shown in FIG. Similarly, FIG. 23 is an example of the second stage domain specialization model (verification target) of user B generated from the first stage domain specialization model (verification target) of user B shown in FIG. . As shown in FIGS. 22 and 23, the domain-specific model (verification target) in the second stage includes not only the SE description component and the SE description behavior element but also a state that is an implicit component. In the second stage domain specialization model (verification target), when a resource (Resource) is acquired, the state becomes “used” and the resource (Resource) is It is described that when released, the state becomes idle. These descriptions are omitted in the UML model 13.

図22及び図23に示すように、このドメイン特化モデル(検証対象)は、要素として、ユーザA(userA)やユーザB(userB)、プリンタ(printer)やスキャナ(scanner)、使用中(used)や空き(idle)を含んでいる。そして、図22に示すように、このドメイン特化モデル(検証対象)では、ユーザA(userA)がプリンタ(printer)、スキャナ(scanner)を順番に獲得(get)して各資源(Resource)の状態(state)を使用中(used)に変化させた後、プリンタ(printer)、スキャナ(scanner)を順番に解放(release)して各資源(Resource)の状態(state)を空き(idle)に変化させることが記述されている。また、図23に示すように、このドメイン特化モデル(検証対象)では、ユーザB(userB)がスキャナ(scanner)、プリンタ(printer)を順番に獲得(get)して各資源(Resource)の状態(state)を使用中(used)に変化させた後、プリンタ(printer)、スキャナ(scanner)を順番に解放(release)して各資源(Resource)の状態(state)を空き(idle)に変化させることが記述されている。   As shown in FIGS. 22 and 23, this domain-specific model (verification target) includes, as elements, user A (userA), user B (userB), printer (printer), scanner (scanner), and in use (used). ) And idle (idle). As shown in FIG. 22, in this domain specific model (verification target), user A (user A) obtains (gets) a printer (printer) and a scanner (scanner) in order, and each resource (Resource) is obtained. After changing the state (used) to “used”, the printer (printer) and the scanner (scanner) are released in order, and the state (state) of each resource (Resource) is set to an idle state. It is described to change. In addition, as shown in FIG. 23, in this domain specific model (verification target), user B (user B) obtains (gets) a scanner (scanner) and a printer (printer) in order and obtains each resource (Resource). After changing the state (used) to “used”, the printer (printer) and the scanner (scanner) are released in order, and the state (state) of each resource (Resource) is set to an idle state. It is described to change.

図15のステップS102において、モデル検証コード生成部27は、DB28により記憶された「ドメイン特化モデルToモデル検証コードマッピングルール」に基づいて、ドメイン特化モデル(検証対象)生成部24により生成されたドメイン特化モデル(検証対象)から、プリンタ・スキャナの獲得仕様を記述したモデル検証コードを処理装置で生成する。   In step S102 of FIG. 15, the model verification code generation unit 27 is generated by the domain specific model (verification target) generation unit 24 based on the “domain specific model To model verification code mapping rule” stored in the DB 28. From the domain-specific model (verification target), a processing unit generates a model verification code describing the acquisition specifications of the printer / scanner.

具体的には、モデル検証コード生成部27は、ドメイン特化モデル(検証対象)のDB26からドメイン特化モデル(検証対象)をロードする。モデル検証コード生成部27は、ロードしたドメイン特化モデル(検証対象)の要素を抽出して、対応するドメインの「ドメイン特化モデルToモデル検証コードマッピングルール」を参照して、ドメイン特化モデル(検証対象)の個々の要素を対応するモデル検証コードに変換する。そして、モデル検証コード生成部27は、各モデル検証コードの要素をモデル検証コードのテンプレートに埋め込み、モデル検証コードを生成し、モデル検証コードのDB29に格納する。図24は、図12に示した「ドメイン特化モデルToモデル検証コードマッピングルール」に従って、図22及び図23に示したドメイン特化モデル(検証対象)から生成されるモデル検証コードの一例である。図中、白抜きで示した部分がモデル検証コード生成部27によって埋め込まれる部分であり、その他の部分はテンプレートである。   Specifically, the model verification code generation unit 27 loads the domain specific model (verification target) from the DB 26 of the domain specific model (verification target). The model verification code generation unit 27 extracts the elements of the loaded domain specific model (verification target), refers to the “domain specific model To model verification code mapping rule” of the corresponding domain, and performs the domain specific model Each element of (verification target) is converted into a corresponding model verification code. Then, the model verification code generation unit 27 embeds each model verification code element in the model verification code template, generates a model verification code, and stores it in the model verification code DB 29. FIG. 24 is an example of a model verification code generated from the domain specific model (verification target) shown in FIGS. 22 and 23 in accordance with the “domain specific model To model verification code mapping rule” shown in FIG. . In the drawing, the white portions are portions embedded by the model verification code generation unit 27, and the other portions are templates.

図24に示すように、このモデル検証コードは、要素として、プリンタ(Printer)やスキャナ(Scanner)、ユーザA(UserA)やユーザB(UserB)を含んでいる。そして、このモデル検証コードでは、ドメイン特化モデル(検証対象)と同様に、プリンタ(Printer)やスキャナ(Scanner)が獲得(Get)されると状態(printer_stateやscanner_state)が使用中(Used)になること、及び、プリンタ(Printer)やスキャナ(Scanner)が解放(Release)されると状態(printer_stateやscanner_state)が空き(Idle)になることが記述されている。また、このモデル検証コードでは、ユーザA(UserA)がプリンタ、スキャナを順番に獲得した(printer_ch!Get、scanner_ch!Get)後、プリンタ、スキャナを順番に解放する(printer_ch!Release、scanner_ch!Release)ことが記述されている。また、このモデル検証コードでは、ユーザB(UserB)がスキャナ、プリンタを順番に獲得した(scanner_ch!Get、printer_ch!Get)後、プリンタ、スキャナを順番に解放する(printer_ch!Release、scanner_ch!Release)ことが記述されている。   As shown in FIG. 24, this model verification code includes, as elements, a printer (Printer), a scanner (Scanner), a user A (UserA), and a user B (UserB). In this model verification code, as in the domain-specific model (verification target), when a printer (Scanner) or a scanner (Scanner) is acquired (Get), the state (printer_state or scanner_state) is in use (Used). And that the state (printer_state or scanner_state) becomes idle when the printer (Printer) or scanner (Scanner) is released (Release). Further, in this model verification code, after the user A (User A) acquires the printer and the scanner in order (printer_ch! Get, scanner_ch! Get), the printer and the scanner are released in order (printer_ch! Release, scanner_ch! Release). It is described. Further, in this model verification code, after the user B (UserB) acquires the scanner and the printer in order (scanner_ch! Get, printer_ch! Get), the printer and the scanner are released in order (printer_ch! Release, scanner_ch! Release). It is described.

図15のステップS103において、モデル検証実行部30は、モデル検証コード生成部27により生成されたモデル検証コードを用いてプリンタ・スキャナの獲得仕様を処理装置で検証し、検証結果(反例)を取得する。このとき、モデル検証実行部30は、モデル検証コード生成部27により生成されたモデル検証コードに記述されたプリンタ・スキャナの獲得仕様の反例を検出するモデル検証ツールとしてSpinを処理装置で実行し、当該反例を示すデータを検証結果(反例)として取得する。   In step S103 of FIG. 15, the model verification execution unit 30 uses the model verification code generated by the model verification code generation unit 27 to verify the acquired specifications of the printer / scanner with the processing device, and obtains a verification result (counterexample). To do. At this time, the model verification execution unit 30 executes Spin as a model verification tool for detecting a counter-example of the acquisition specification of the printer / scanner described in the model verification code generated by the model verification code generation unit 27, and Data indicating the counterexample is acquired as a verification result (counterexample).

具体的には、モデル検証実行部30は、モデル検証コードのDB29からモデル検証コードをロードする。そして、モデル検証実行部30は、ロードしたモデル検証コードを入力としてモデル検証ツール(Spin)の検証コマンドを実行し、実行結果(反例)を検証結果(反例)のDB31に格納する。図25は、図24に示したモデル検証コードを入力して検証ツールを実行した場合に出力される検証結果(反例)の一例である。   Specifically, the model verification execution unit 30 loads the model verification code from the DB 29 of the model verification code. Then, the model verification execution unit 30 executes the verification command of the model verification tool (Spin) with the loaded model verification code as an input, and stores the execution result (counterexample) in the DB 31 of the verification result (counterexample). FIG. 25 is an example of a verification result (counterexample) output when the verification tool is executed by inputting the model verification code shown in FIG.

図25に示すように、ここでは反例が検出されており、この反例では、まず、プロセス番号4がプロセス番号1に対してGetメッセージを送信し(printer_ch!Get)、プロセス番号1がこのGetメッセージを受信している(c?Get)。即ち、ユーザA(UserA)がプリンタ(Printer)を獲得(Get)している。次に、プロセス番号3がプロセス番号2に対してGetメッセージを送信し(scanner_ch!Get)、プロセス番号2がこのGetメッセージを受信している(c?Get)。即ち、ユーザB(UserB)がスキャナ(Scanner)を獲得(Get)している。ユーザA(UserA)もユーザB(UserB)も他方の資源を獲得しなければ、獲得済みの資源を解放しないため、この時点でデッドロックが発生している。   As shown in FIG. 25, a counterexample is detected here. In this counterexample, first, the process number 4 transmits a Get message to the process number 1 (printer_ch! Get), and the process number 1 is this Get message. (C? Get). That is, the user A (User A) has acquired (Get) the printer (Printer). Next, process number 3 transmits a Get message to process number 2 (scanner_ch! Get), and process number 2 receives this Get message (c? Get). That is, user B (User B) has acquired (Get) the scanner (Scanner). If neither the user A (User A) nor the user B (User B) acquire the other resource, the acquired resource is not released, so that a deadlock has occurred at this point.

図15のステップS104において、ドメイン特化モデル(反例)生成部32は、DB33により記憶された「検証結果Toドメイン特化モデルマッピングルール」に基づいて、モデル検証実行部30により取得された検証結果(反例)から、Spinにより検出された反例をドメイン特化モデル文法に従って記述したドメイン特化モデル(反例)を処理装置で生成する。   In step S104 of FIG. 15, the domain specific model (counterexample) generation unit 32 verifies the verification result acquired by the model verification execution unit 30 based on the “verification result To domain specific model mapping rule” stored in the DB 33. From the (counterexample), a domain specific model (counterexample) describing the counterexample detected by Spin according to the domain specific model grammar is generated by the processing device.

ここで、ステップS104の詳細な処理を図26に示す。   Here, the detailed process of step S104 is shown in FIG.

図26において、ドメイン特化モデル(反例)生成部32は、検証結果(反例)のDB31から検証結果(反例)をロードする。そして、ドメイン特化モデル(反例)生成部32は、ロードした検証結果(反例)を字句解析して出力に必要な要素を抽出する(ステップS301)。ドメイン特化モデル(反例)生成部32は、対応するドメインの「検証結果Toドメイン特化モデルマッピングルール」を参照して、検証結果(反例)を1段階目のドメイン特化モデル(反例)に変換する(ステップS302)。図27は、図13に示した「検証結果Toドメイン特化モデルマッピングルール」に従って、図25に示した検証結果(反例)から生成される1段階目のドメイン特化モデル(反例)の一例である。図27に示すように、1段階目のドメイン特化モデル(反例)は、UserTypeやResourceといった要素のほか、messageやstateといった要素を含んでいるが、stateオブジェクトのインスタンス名が不足している。   In FIG. 26, the domain specific model (counterexample) generating unit 32 loads the verification result (counterexample) from the DB 31 of the verification result (counterexample). Then, the domain-specific model (counterexample) generation unit 32 performs lexical analysis on the loaded verification result (counterexample) and extracts elements necessary for output (step S301). The domain-specific model (counterexample) generation unit 32 refers to the “verification result To domain-specific model mapping rule” of the corresponding domain, and converts the verification result (counterexample) into the first stage domain-specific model (counterexample). Conversion is performed (step S302). FIG. 27 is an example of the first stage domain specialization model (counterexample) generated from the verification result (counterexample) shown in FIG. 25 in accordance with the “verification result To domain specialization model mapping rule” shown in FIG. is there. As shown in FIG. 27, the domain specialization model (counterexample) at the first stage includes elements such as message and state in addition to elements such as UserType and Resource, but the instance name of the state object is insufficient.

次に、ドメイン特化モデル(反例)生成部32は、対応するドメイン特化モデル文法を参照して、1段階目のドメイン特化モデル(反例)で不足している要素をドメイン特化モデル文法から抽出して、1段階目のドメイン特化モデル(反例)に付加することで、2段階目のドメイン特化モデル(反例)を生成する。そして、ドメイン特化モデル(反例)生成部32は、生成したドメイン特化モデル(反例)をDB34に格納する(ステップS303)。付加する要素は、不足している要素とドメイン特化モデル文法においてドメイン特化モデルのメタモデルの検証トレースに相当する関連、及び、不足する要素に関する情報から、ドメイン特化モデル文法の他の要素の中から該当する要素を探すことで、抽出できる。前述したように、プリンタ・スキャナ獲得仕様の例の場合、1段階目のドメイン特化モデル(反例)で不足している要素は、stateオブジェクトのインスタンス名である。ドメイン特化モデル(反例)生成部32は、stateクラスに関し、図9に示したドメイン特化モデルのメタモデルの検証トレースに相当する関連(stateクラスとmessageクラス間の関連)を抽出する。そして、ドメイン特化モデル(反例)生成部32は、図10に示したstateクラスのインスタンスとmessageクラスのインスタンスとの関連より、messageクラスのインスタンス名が“get”の場合のstateクラスのインスタンス名が“used”であることから、1段階目のドメイン特化モデル(反例)にて不足している要素(stateオブジェクトのインスタンス名)は“used”であると判断する。   Next, the domain specialization model (counterexample) generation unit 32 refers to the corresponding domain specialization model grammar and identifies the elements that are missing in the first stage domain specialization model (counterexample). Are extracted and added to the first stage domain specialization model (counterexample) to generate the second stage domain specialization model (counterexample). Then, the domain-specific model (counterexample) generation unit 32 stores the generated domain-specific model (counterexample) in the DB 34 (step S303). The elements to be added are the other elements in the domain-specific model grammar from the information related to the missing elements and the domain-specific model grammar related to the verification trace of the meta-model of the domain-specific model in the domain-specific model grammar. It can be extracted by searching for the corresponding element from the list. As described above, in the case of the printer / scanner acquisition specification example, the missing element in the first stage domain specific model (counterexample) is the instance name of the state object. The domain specific model (counterexample) generation unit 32 extracts a relation (relation between the state class and the message class) corresponding to the verification trace of the meta model of the domain specific model shown in FIG. Then, the domain specific model (counterexample) generation unit 32 determines the instance name of the state class when the instance name of the message class is “get” based on the association between the instance of the state class and the instance of the message class illustrated in FIG. 10. Is “used”, it is determined that the missing element (instance name of the state object) in the first stage domain specialization model (counterexample) is “used”.

図15のステップS105において、UMLモデル(反例)生成部35は、DB36により記憶された「ドメイン特化モデルToUMLモデルマッピングルール」に基づいて、ドメイン特化モデル(反例)生成部32により生成されたドメイン特化モデル(反例)から、Spinにより検出された反例をUMLで記述したUMLモデル14(反例)を処理装置で生成する。   In step S105 of FIG. 15, the UML model (counterexample) generation unit 35 is generated by the domain specific model (counterexample) generation unit 32 based on the “domain specific model ToUML model mapping rule” stored in the DB 36. From the domain-specific model (counterexample), a UML model 14 (counterexample) describing the counterexample detected by Spin in UML is generated by the processing device.

具体的には、UMLモデル(反例)生成部35は、ドメイン特化モデル(反例)のDB34からドメイン特化モデル(反例)をロードする。そして、UMLモデル(反例)生成部35は、ロードしたドメイン特化モデル(反例)の要素を抽出して、対応する「ドメイン特化モデルToUMLモデルマッピングルール」を参照して、ドメイン特化モデル(反例)をUMLモデル14(反例)に変換し、出力する。図29は、図14に示した「ドメイン特化モデルToUMLモデルマッピングルール」に従って、図28に示したドメイン特化モデル(反例)から生成されるUMLモデル14(反例)の一例である。   Specifically, the UML model (counterexample) generation unit 35 loads a domain specific model (counterexample) from the DB 34 of the domain specific model (counterexample). Then, the UML model (counterexample) generation unit 35 extracts the elements of the loaded domain specialization model (counterexample) and refers to the corresponding “domain specialization model ToUML model mapping rule” to obtain the domain specialization model ( Counterexample) is converted into UML model 14 (counterexample) and output. FIG. 29 is an example of the UML model 14 (counterexample) generated from the domain-specific model (counterexample) shown in FIG. 28 in accordance with the “domain-specific model ToUML model mapping rule” shown in FIG.

図29に示すように、このUMLモデル14(反例)では、ユーザA(userA)によってプリンタ(printer)が獲得(get)されてプリンタ(printer)の状態が空き(idle)から使用中(used)に変化し、続けてユーザB(userB)によってスキャナ(scanner)が獲得(get)されてスキャナ(scanner)の状態が空き(idle)から使用中(used)に変化すると、デッドロックが発生するということが記述されている。   As shown in FIG. 29, in this UML model 14 (counterexample), a printer (printer) is acquired by a user A (userA), and the printer (printer) is in an unused (used) state (used). If a scanner is acquired by user B (user B) and the scanner status changes from idle to used, a deadlock occurs. It is described.

以上のように、本実施の形態によれば、以下に示す効果を得ることができる。
・ドメイン内で共通した記述(ドメイン特化モデル文法における暗黙的要素)をサブセットとしてドメインエンジニア12が事前に定義しておき、共通した記述(ドメイン特化モデル文法における暗黙的要素)はドメイン特化モデル(検証対象)生成部24が行うようにすることにより、SE11が定義する検証対象のモデルは、ドメイン特化モデルのメタモデル(ドメイン特化モデル文法)のSE記述構成要素とSE記述振舞い要素のみの部分となるため、記述量を汎用的なUMLよりも減らすことができる。
・ドメイン特化モデル文法は、一般的なモデリング言語として知られているUMLを拡張したものであるため、UMLの知識があるSE11にとっては、検証対象のモデル定義のためだけに新たな記述文法を学ぶ必要がない。
・ドメイン特化モデル(反例)生成部32が「検証結果Toドメイン特化モデルマッピングルール」の参照によるモデル変換と、モデル変換により生成したドメイン特化モデル(反例)に不足する要素の付加を行うことにより、入力モデルと出力モデルの要素が対応するため、出力モデルの意味解析が従来よりも容易になる。
As described above, according to the present embodiment, the following effects can be obtained.
-Domain engineer 12 defines in advance a common description (implicit element in domain-specific model grammar) as a subset, and common description (implicit element in domain-specific model grammar) is domain-specific. As the model (verification target) generation unit 24 performs the verification target model defined by SE11, the SE description constituent element and the SE description behavior element of the meta model (domain specific model grammar) of the domain specific model Therefore, the amount of description can be reduced as compared with general-purpose UML.
-The domain-specific model grammar is an extension of UML, which is known as a general modeling language. Therefore, for SE11 with UML knowledge, a new description grammar is created only for the definition of the model to be verified. There is no need to learn.
The domain-specific model (counterexample) generation unit 32 performs model conversion by referring to the “verification result To domain-specific model mapping rule” and adds elements that are insufficient to the domain-specific model (counterexample) generated by model conversion. Thus, since the elements of the input model and the output model correspond to each other, semantic analysis of the output model becomes easier than before.

10 設計モデル検証方式、11 SE、12 ドメインエンジニア、13,14 UMLモデル、20 検証装置、21,22,23,25,26,28,29,31,33,34,36 DB、24 ドメイン特化モデル(検証対象)生成部、27 モデル検証コード生成部、30 モデル検証実行部、32 ドメイン特化モデル(反例)生成部、35 UMLモデル(反例)生成部、901 LCD、902 キーボード、903 マウス、904 FDD、905 CDD、906 プリンタ、911 CPU、912 バス、913 ROM、914 RAM、915 通信ボード、920 HDD、921 オペレーティングシステム、922 ウィンドウシステム、923 プログラム群、924 ファイル群。   10 Design model verification method, 11 SE, 12 Domain engineer, 13, 14 UML model, 20 Verification device, 21, 22, 23, 25, 26, 28, 29, 31, 33, 34, 36 DB, 24 Domain specialization Model (verification target) generation unit, 27 Model verification code generation unit, 30 Model verification execution unit, 32 Domain specific model (counterexample) generation unit, 35 UML model (counterexample) generation unit, 901 LCD, 902 keyboard, 903 mouse, 904 FDD, 905 CDD, 906 printer, 911 CPU, 912 bus, 913 ROM, 914 RAM, 915 communication board, 920 HDD, 921 operating system, 922 window system, 923 program group, 924 file group.

Claims (7)

検証対象のシステムの仕様を記述したモデル検証コードを用いて特定のシステムの仕様を検証する検証装置であって、
任意のシステムの仕様を記述するために共通で用いられる汎用モデリング言語の要素と前記特定のシステムの仕様を記述するために用いられるドメイン特化モデリング言語の要素との対応関係を示す第1マッピング情報と、前記ドメイン特化モデリング言語の要素と前記モデル検証コードを構成する要素との対応関係を示す第2マッピング情報とを予め記憶装置に記憶するデータベースと、
前記特定のシステムの仕様を前記汎用モデリング言語で記述した第1汎用モデルデータの入力を入力装置で受け付け、前記データベースにより記憶された第1マッピング情報に基づいて、当該第1汎用モデルデータから、前記特定のシステムの仕様を前記ドメイン特化モデリング言語で記述した第1ドメイン特化モデルデータを処理装置で生成する第1ドメイン特化モデル生成部と、
前記データベースにより記憶された第2マッピング情報に基づいて、前記第1ドメイン特化モデル生成部により生成された第1ドメイン特化モデルデータから、前記特定のシステムの仕様を記述したモデル検証コードを処理装置で生成するモデル検証コード生成部と、
前記モデル検証コード生成部により生成されたモデル検証コードを用いて前記特定のシステムの仕様を処理装置で検証し、検証結果を示す検証結果データを取得するモデル検証実行部とを備えることを特徴とする検証装置。
A verification device that verifies the specifications of a specific system using a model verification code that describes the specifications of the system to be verified,
First mapping information indicating a correspondence relationship between elements of a general-purpose modeling language commonly used to describe the specifications of an arbitrary system and elements of a domain-specific modeling language used to describe the specifications of the specific system A database that stores in advance in a storage device second mapping information indicating a correspondence relationship between the elements of the domain-specific modeling language and the elements constituting the model verification code;
The input device accepts input of first general model data describing the specifications of the specific system in the general modeling language, and based on the first mapping information stored in the database, from the first general model data, A first domain-specific model generation unit that generates first domain-specific model data in which a specification of a specific system is described in the domain-specific modeling language by a processing device;
Based on the second mapping information stored in the database, the model verification code describing the specifications of the specific system is processed from the first domain specific model data generated by the first domain specific model generation unit A model verification code generator generated by the device;
A model verification execution unit that verifies the specifications of the specific system with a processing device using the model verification code generated by the model verification code generation unit, and acquires verification result data indicating a verification result; Verification device to do.
前記モデル検証実行部は、前記モデル検証コードに記述されたシステムの仕様の反例を検出するモデル検証ツールを処理装置で実行し、当該反例を示すデータを前記検証結果データとして取得することを特徴とする請求項1に記載の検証装置。   The model verification execution unit executes a model verification tool for detecting a counter example of the specification of the system described in the model verification code by a processing device, and acquires data indicating the counter example as the verification result data, The verification device according to claim 1. 前記データベースは、さらに、前記検証結果データを構成する要素と前記ドメイン特化モデリング言語の要素との対応関係を示す第3マッピング情報を予め記憶装置に記憶し、
前記検証装置は、さらに、
前記データベースにより記憶された第3マッピング情報に基づいて、前記モデル検証実行部により取得された検証結果データから、前記モデル検証ツールにより検出された反例を前記ドメイン特化モデリング言語で記述した第2ドメイン特化モデルデータを処理装置で生成する第2ドメイン特化モデル生成部と、
前記データベースにより記憶された第1マッピング情報に基づいて、前記第2ドメイン特化モデル生成部により生成された第2ドメイン特化モデルデータから、前記モデル検証ツールにより検出された反例を前記汎用モデリング言語で記述した第2汎用モデルデータを処理装置で生成する汎用モデル生成部とを備えることを特徴とする請求項2に記載の検証装置。
The database further stores, in a storage device in advance, third mapping information indicating a correspondence relationship between elements constituting the verification result data and elements of the domain-specific modeling language,
The verification device further includes:
A second domain in which counterexamples detected by the model verification tool are described in the domain-specific modeling language from the verification result data acquired by the model verification execution unit based on the third mapping information stored in the database A second domain specialized model generation unit that generates specialized model data in the processing device;
A counterexample detected by the model verification tool from the second domain specific model data generated by the second domain specific model generation unit based on the first mapping information stored in the database. The verification apparatus according to claim 2, further comprising: a general-purpose model generation unit configured to generate the second general-purpose model data described in the above item by a processing device.
前記モデル検証ツールは、Spinであることを特徴とする請求項2又は3に記載の検証装置。   The verification apparatus according to claim 2, wherein the model verification tool is Spin. 前記汎用モデリング言語は、UML(Unified・Modeling・Language)であることを特徴とする請求項1から4までのいずれかに記載の検証装置。   5. The verification apparatus according to claim 1, wherein the universal modeling language is UML (Unified / Modeling / Language). 検証対象のシステムの仕様を記述したモデル検証コードを用いて特定のシステムの仕様を検証する検証方法であって、
任意のシステムの仕様を記述するために共通で用いられる汎用モデリング言語の要素と前記特定のシステムの仕様を記述するために用いられるドメイン特化モデリング言語の要素との対応関係を示す第1マッピング情報と、前記ドメイン特化モデリング言語の要素と前記モデル検証コードを構成する要素との対応関係を示す第2マッピング情報とを予め記憶装置に記憶するデータベースを備えるコンピュータが、前記特定のシステムの仕様を前記汎用モデリング言語で記述した第1汎用モデルデータの入力を入力装置で受け付け、前記データベースにより記憶された第1マッピング情報に基づいて、当該第1汎用モデルデータから、前記特定のシステムの仕様を前記ドメイン特化モデリング言語で記述した第1ドメイン特化モデルデータを処理装置で生成し、
前記コンピュータが、前記データベースにより記憶された第2マッピング情報に基づいて、生成した第1ドメイン特化モデルデータから、前記特定のシステムの仕様を記述したモデル検証コードを処理装置で生成し、
前記コンピュータが、生成したモデル検証コードを用いて前記特定のシステムの仕様を処理装置で検証し、検証結果を示す検証結果データを取得することを特徴とする検証方法。
A verification method that verifies the specifications of a specific system using a model verification code that describes the specifications of the system to be verified,
First mapping information indicating a correspondence relationship between elements of a general-purpose modeling language commonly used to describe the specifications of an arbitrary system and elements of a domain-specific modeling language used to describe the specifications of the specific system And a computer having a database that stores in advance a second mapping information indicating a correspondence relationship between elements of the domain-specific modeling language and elements constituting the model verification code. The input of first generic model data described in the generic modeling language is received by an input device, and based on the first mapping information stored in the database, the specification of the specific system is determined from the first generic model data. Process first domain specific model data described in domain specific modeling language Generated by the apparatus,
Based on the second mapping information stored by the database, the computer generates a model verification code that describes the specifications of the specific system from the generated first domain specific model data by a processing device,
A verification method characterized in that the computer verifies the specifications of the specific system using a generated model verification code by a processing device, and acquires verification result data indicating a verification result.
検証対象のシステムの仕様を記述したモデル検証コードを用いて特定のシステムの仕様を検証する検証プログラムであって、
任意のシステムの仕様を記述するために共通で用いられる汎用モデリング言語の要素と前記特定のシステムの仕様を記述するために用いられるドメイン特化モデリング言語の要素との対応関係を示す第1マッピング情報と、前記ドメイン特化モデリング言語の要素と前記モデル検証コードを構成する要素との対応関係を示す第2マッピング情報とを予め記憶装置に記憶するデータベースを備えるコンピュータにより実行され、
前記特定のシステムの仕様を前記汎用モデリング言語で記述した第1汎用モデルデータの入力を入力装置で受け付け、前記データベースにより記憶された第1マッピング情報に基づいて、当該第1汎用モデルデータから、前記特定のシステムの仕様を前記ドメイン特化モデリング言語で記述した第1ドメイン特化モデルデータを処理装置で生成する第1ドメイン特化モデル生成処理と、
前記データベースにより記憶された第2マッピング情報に基づいて、前記第1ドメイン特化モデル生成処理により生成された第1ドメイン特化モデルデータから、前記特定のシステムの仕様を記述したモデル検証コードを処理装置で生成するモデル検証コード生成処理と、
前記モデル検証コード生成処理により生成されたモデル検証コードを用いて前記特定のシステムの仕様を処理装置で検証し、検証結果を示す検証結果データを取得するモデル検証実行処理とを前記コンピュータに実行させることを特徴とする検証プログラム。
A verification program that verifies the specifications of a specific system using a model verification code that describes the specifications of the system to be verified,
First mapping information indicating a correspondence relationship between elements of a general-purpose modeling language commonly used to describe the specifications of an arbitrary system and elements of a domain-specific modeling language used to describe the specifications of the specific system And a second mapping information indicating a correspondence relationship between the elements of the domain-specific modeling language and the elements constituting the model verification code, and executed by a computer including a database that stores in advance in a storage device,
The input device accepts input of first general model data describing the specifications of the specific system in the general modeling language, and based on the first mapping information stored in the database, from the first general model data, A first domain-specific model generation process for generating first domain-specific model data in which a specific system specification is described in the domain-specific modeling language with a processing device;
Based on the second mapping information stored in the database, the model verification code describing the specifications of the specific system is processed from the first domain specific model data generated by the first domain specific model generation process Model verification code generation processing generated by the device,
Using the model verification code generated by the model verification code generation process, the specification of the specific system is verified by a processing device, and the computer executes a model verification execution process for acquiring verification result data indicating the verification result A verification program characterized by that.
JP2010041384A 2010-02-26 2010-02-26 Device, method and program for verification Pending JP2011180632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010041384A JP2011180632A (en) 2010-02-26 2010-02-26 Device, method and program for verification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010041384A JP2011180632A (en) 2010-02-26 2010-02-26 Device, method and program for verification

Publications (1)

Publication Number Publication Date
JP2011180632A true JP2011180632A (en) 2011-09-15

Family

ID=44692103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010041384A Pending JP2011180632A (en) 2010-02-26 2010-02-26 Device, method and program for verification

Country Status (1)

Country Link
JP (1) JP2011180632A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799530A (en) * 2012-07-24 2012-11-28 浙江工商大学 Performance predicating method for software system based on UML (Unified Modeling Language) architecture
JP2020067976A (en) * 2018-10-26 2020-04-30 株式会社デンソー Model generation device
CN113923143A (en) * 2020-07-07 2022-01-11 中移(苏州)软件技术有限公司 Cloud network adjusting method and device and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799530A (en) * 2012-07-24 2012-11-28 浙江工商大学 Performance predicating method for software system based on UML (Unified Modeling Language) architecture
CN102799530B (en) * 2012-07-24 2015-03-18 浙江工商大学 Performance predicating method for software system based on UML (Unified Modeling Language) architecture
JP2020067976A (en) * 2018-10-26 2020-04-30 株式会社デンソー Model generation device
CN113923143A (en) * 2020-07-07 2022-01-11 中移(苏州)软件技术有限公司 Cloud network adjusting method and device and storage medium
CN113923143B (en) * 2020-07-07 2023-04-07 中移(苏州)软件技术有限公司 Cloud network adjusting method and device and storage medium

Similar Documents

Publication Publication Date Title
US11526481B2 (en) Incremental dynamic document index generation
Shah et al. From UML to Alloy and back again
US8719770B2 (en) Verifying programming artifacts generated from ontology artifacts or models
CN106547681B (en) Method and device for testing data automatic loading and multiplexing simulation service
JP2008269136A (en) Device and method for supporting model drive type development
JP6479184B2 (en) Computer-executable model reverse engineering method and apparatus
KR20160054629A (en) Methods to adapt user interfaces and input controls
US20160004579A1 (en) Method of generating automatic code for remote procedure call
US7752596B2 (en) Connecting alternative development environment to interpretive runtime engine
CN115952758A (en) Chip verification method and device, electronic equipment and storage medium
WO2021120664A1 (en) Abnormal inode dynamic repair method and system, and related component
CN112395843A (en) PHP code-based service processing method, device, equipment and medium
JP2011180632A (en) Device, method and program for verification
Bao et al. RM2Doc: A tool for automatic generation of requirements documents from requirements models
Andreotti et al. Carcara: An efficient proof checker and elaborator for SMT proofs in the Alethe format
Jongeling et al. Lightweight Consistency Checking for Agile Model-Based Development in Practice.
JP5233355B2 (en) Property generation system and property verification system
Son et al. Metamodel design for model transformation from Simulink to ECML in cyber physical systems
CN101976582A (en) Storage modeling method and device
Curland et al. Enhanced verbalization of ORM models
Taylor Software architecture and design
JP5545133B2 (en) Static analysis processing system, method, and program
US20090319983A1 (en) Intellectual property model creating apparatus, intellectual property model creating method, and computer product
Liang AI Empowered Program Performance Analysis
JP5233354B2 (en) Property verification system, property verification method, and program