JP2008140264A - Automatic model generation device and program - Google Patents

Automatic model generation device and program Download PDF

Info

Publication number
JP2008140264A
JP2008140264A JP2006327325A JP2006327325A JP2008140264A JP 2008140264 A JP2008140264 A JP 2008140264A JP 2006327325 A JP2006327325 A JP 2006327325A JP 2006327325 A JP2006327325 A JP 2006327325A JP 2008140264 A JP2008140264 A JP 2008140264A
Authority
JP
Japan
Prior art keywords
model
pattern
relationship
conversion
classes
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
JP2006327325A
Other languages
Japanese (ja)
Inventor
Katsuhiko Nakamura
勝彦 中村
Shigeru Ogawara
繁 大河原
Atsushi Kobayashi
敦 小林
Tomoya Shirakawa
智也 白川
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 JP2006327325A priority Critical patent/JP2008140264A/en
Publication of JP2008140264A publication Critical patent/JP2008140264A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To support efficient software development reusing an integrated model by identifying variability and commonality of a plurality of object-oriented models and automatically generating the model having a plurality of models integrated therein. <P>SOLUTION: A model element analysis part 6 receives a model A and a model B as input, extracts relation between classes from the two models, refers to a collation pattern included in a conversion rule definition part 8 to the pair of the extracted inter-class relation, and selects a collation pattern to be applied. An integration model generation part 7 converts and integrates the pair of the inter-class relation by use of a conversion pattern corresponding to the selected collation pattern to generate the integration model 3 wherein the model A and the model B are integrated. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、再利用可能なソフトウェア開発を支援するオブジェクト指向分析・設計モデルの自動生成装置、及びコンピュータを前記自動生成装置が備える各部として機能させるためのプログラムに関するものである。   The present invention relates to an object-oriented analysis / design model automatic generation apparatus that supports reusable software development, and a program for causing a computer to function as each unit included in the automatic generation apparatus.

オブジェクト指向によるソフトウェア開発においては、ソフトウェアの仕様として求められている機能を実現するための分析及び設計を、UML(Unified Modeling Language)を用いた分析・設計モデルとして記述し、その内容に基づいてプログラムを作成することが一般的に行なわれている。UMLはオブジェクト指向開発において標準的に利用されているモデルの表記法である。分析・設計モデルは、ソフトウェア全体をクラスという単位に分け、クラスとクラス間の関係からなる構造によってソフトウェアの機能を実現するという方法で構築される。そして、クラスとクラス間の関係は、多くの場合UMLで規定されたクラス図の記法に従って表記される。このようなオブジェクト指向開発を進める方法の従来技術の1つとしてIBM(登録商標)社の「ラショナル統一プロセス」がある。また、オブジェクト指向開発を支援するCASE(Computer Aided Software Engineering)ツールもいくつか製品化されており、その1つとしてIBM(登録商標)社のRational Rose(登録商標)がある。   In object-oriented software development, analysis and design for realizing the functions required as software specifications are described as an analysis / design model using UML (Unified Modeling Language), and the program is based on the contents. It is generally done to create. UML is a model notation standardly used in object-oriented development. The analysis / design model is constructed by dividing the entire software into units called classes and realizing the functions of the software with a structure composed of classes and relationships between the classes. The relationship between classes is often expressed in accordance with the notation of class diagrams defined by UML. One of the prior arts for such object-oriented development is IBM's “Rational Unified Process”. In addition, several CASE (Computer Aided Software Engineering) tools that support object-oriented development have been commercialized, and one of them is Rational Rose (registered trademark) of IBM (registered trademark).

通常、1つのソフトウェアを開発する際には、数十個から数百個のクラスを作成し、これらのクラスの各々に適切な名前を付けて、クラス間を適切な関係で結ぶ必要がある。UMLで定義されているクラス間の関係の1つに「関連」がある。関連は、2つのクラス間に意味的なつながりがあることを表す関係である。UMLのクラス図において、クラスと関連は、クラスを意味する四角形と、四角形どうしを接続する直線として記述される。接続された直線は、矢印で方向性を表すこともできる。   Usually, when developing one software, it is necessary to create tens to hundreds of classes, assign appropriate names to each of these classes, and connect the classes in an appropriate relationship. One of the relationships between classes defined in UML is “relation”. An association is a relationship that represents a semantic connection between two classes. In the UML class diagram, a class and an association are described as a square meaning a class and a straight line connecting the squares. The connected straight line can also indicate directionality by an arrow.

UMLで定義されているクラス間の関係には、関連の他に「汎化」がある。汎化は、複数の異なるクラス間の共通性に着目し、より一般的なクラスを定義することを表す関係である。あるクラスの性質をすべて引き継いだ上で、さらに性質を加えた新しいクラスを定義することを継承という。複数の異なるクラス間の共通性を持つ一般的なクラスを定義し、そのクラスを継承することにより、分析・設計モデルの構造を階層的に表すことができる。UMLにおいて継承されるクラスをスーパークラス、継承するクラスをサブクラスと定義されている。UMLのクラス図において、汎化は、サブクラスからスーパークラスに向かって白抜きの矢印を引いて記述される。   The relationship between classes defined in UML includes “generalization” in addition to association. Generalization is a relationship representing the definition of a more general class, focusing on the commonality between different classes. Inheritance is the process of inheriting all the properties of a class and defining a new class with additional properties. By defining a general class having commonality among a plurality of different classes and inheriting the class, the structure of the analysis / design model can be expressed hierarchically. A class inherited in UML is defined as a superclass, and a class inherited is defined as a subclass. In the UML class diagram, generalization is described by drawing a white arrow from the subclass toward the superclass.

クラス図ではクラスの他に、インターフェイスを用いてソフトウェア構造を表記する。インターフェイスは、クラスの使い方及び呼び出し方をまとめて定義したものである。インターフェイスはクラスと同様に四角形で表され、名前の上部に<<interface>>が付加される。UMLで定義されているインターフェイスとクラスとの間には実現関係を結ぶことができる。実現関係は、クラスからインターフェィスに向かって白抜きの点線矢印で記述される。インターフェイスと実現関係で結ばれているクラスは、インターフェイスを通して使われたり呼び出されたりすることを意味する。   In the class diagram, in addition to the class, the software structure is described using an interface. An interface defines how to use and call a class. An interface is represented by a rectangle like a class, and << interface >> is added to the top of the name. An implementation relationship can be established between an interface and a class defined in UML. The realization relationship is described by a white dotted arrow from the class toward the interface. A class tied to an interface in an implementation relationship means that it can be used and called through the interface.

前述のクラス図を用いたクラスとインターフェイス及びこれらの間の関係からなる構造によるソフトウェア機能の表現は、ソフトウェアの理解を容易にし、分析・設計といった開発作業を効率化する上で有用である。   The representation of software functions based on the structure composed of the class and interface using the class diagram described above and the relationship between them is useful for facilitating the understanding of the software and improving the efficiency of development work such as analysis and design.

同一分野で用いられる複数の類似したソフトウェアを開発する際に、個々のソフトウェアモデルを構築するよりも、個々のソフトウェアモデルを統合化したモデルを構築し、統合化されたモデルを再利用した開発が効率的である。複数の類似したソフトウェアの共通性を分析・抽出し、抽出した共通性を統合化することにより、共通モデルを構築することができる。   When developing multiple similar software used in the same field, rather than building individual software models, it is possible to develop a model that integrates individual software models and reuses the integrated models. Efficient. A common model can be constructed by analyzing and extracting the commonality of multiple similar softwares and integrating the extracted commonality.

再利用可能なソフトウェアの開発を支援する従来技術(例えば、特許文献1又は2を参照)としては、要求の変動性を管理し、ホットスポットとフローズンスポットとを識別することによって、フレームワークを生成する技術がある。ここで、ホットスポットとは、フレームワークのうち、アプリケーション毎に変動する仕様部分であり、フローズンスポットとは、フレームワークのうち、アプリケーション間で共通する仕様部分である。これらの従来技術では、開発者によって識別された共通性と変動性を、機械的に管理し活用することができる。   As a conventional technology that supports the development of reusable software (see, for example, Patent Document 1 or 2), a framework is generated by managing the variability of requirements and identifying hot spots and frozen spots. There is technology to do. Here, the hot spot is a specification portion that varies for each application in the framework, and the frozen spot is a specification portion that is common among applications in the framework. These conventional techniques can mechanically manage and utilize the commonality and variability identified by the developer.

特開平11−237982号公報Japanese Patent Laid-Open No. 11-237982 特開2002−157117号公報JP 2002-157117 A

しかしながら、上記の再利用可能なソフトウェアの開発を支援する従来技術によれば、同一分野内の類似したシステムを分析して共通性と変動性を認識する作業を、開発者が人手で行う必要があった。そのため、統合化されたモデルを効率的に構築することが難しく、統合化されたモデルに基づくソフトウェア開発の効率が低下するという問題があった。   However, according to the above-described conventional technology that supports the development of reusable software, it is necessary for a developer to manually perform the task of analyzing similar systems in the same field to recognize commonality and variability. there were. Therefore, it is difficult to efficiently construct an integrated model, and there is a problem that the efficiency of software development based on the integrated model is reduced.

本発明は、上記に鑑みてなされたものであって、オブジェクト指向に基づく複数のモデルの共通性と変動性を識別し、複数のモデルが統合化されたモデルを自動的に生成することにより、この統合化されたモデルを再利用した効率的なソフトウェア開発を支援するモデル自動生成装置、及びプログラムを得ることを目的とする。   The present invention has been made in view of the above, and identifies commonality and variability of a plurality of models based on object orientation, and automatically generates a model in which a plurality of models are integrated, It is an object of the present invention to obtain an automatic model generation apparatus and program for supporting efficient software development by reusing the integrated model.

上述した課題を解決し、目的を達成するために、本発明にかかるモデル自動生成装置は、オブジェクト指向に基づく表記を用いてクラス間の関係を含むソフトウェアの構造を表現するモデルを生成するモデル自動生成装置において、2つのクラス間の関係の同一性の度合いをモデルの構成要素であるモデル要素についての一致、不一致を含む組み合わせのパターンで表した複数の照合パターンと、前記各照合パターンに応じて前記2つのクラス間の関係を統合変換するための変換後のクラス間の関係を定義する変換パターンとが定義される変換ルール定義部と、2つのモデルからそれぞれ抽出されたクラス間の関係のペアを前記モデル要素毎に比較し、この比較結果に一致する照合パターンを前記変換ルール定義部から選び出すための解析を行うモデル要素解析部と、このモデル要素解析部により選び出された前記照合パターンに対応する変換パターンを前記変換ルール定義部から選択し、選択した変換パターンに従ってクラス間の関係を生成することにより、2つのモデルを統合する統合モデルを生成する統合モデル生成部と、を備えることを特徴とする。   In order to solve the above-described problems and achieve the object, an automatic model generation apparatus according to the present invention is an automatic model generation that generates a model that expresses a software structure including a relationship between classes using an object-oriented notation. In the generation device, a plurality of matching patterns expressing the degree of identity of the relationship between two classes as a combination pattern including matching and mismatching of model elements that are components of the model, and according to each of the matching patterns A conversion rule definition part in which a conversion pattern for defining a relationship between classes after conversion for integrating and converting a relationship between the two classes is defined, and a pair of relationships between classes respectively extracted from two models For each model element, and an analysis for selecting a matching pattern that matches the comparison result from the conversion rule definition unit. By selecting a conversion pattern corresponding to the collation pattern selected by the model element analysis unit and the conversion rule definition unit, and generating a relationship between classes according to the selected conversion pattern, And an integrated model generation unit that generates an integrated model that integrates the two models.

本発明によれば、オブジェクト指向に基づく表記を用いてクラス間の関係を含むソフトウェアの構造を表現する2つのモデルを統合する際に、2つのモデルからそれぞれ抽出されたクラス間の関係のペアの同一性の度合いを照合パターンと比較することにより評価し、各照合パターンに対応する変換パターンに従って関係のペアを統合変換して変換後のクラス間の関係を生成するようにしたので、個別に作成された2つのモデルから簡便に統合化されたモデルの作成が可能となる。従って、同一分野の類似したソフトウェアの開発において、新たに個々のソフトウェアに対してモデルを作成する必要がなく、統合化されたモデルを基礎としてソフトウェアを開発することができる。また、統合化されたモデルを再利用した効率的なソフトウェア開発を行うことができる。   According to the present invention, when two models that express the structure of software including relationships between classes using object-oriented notation are integrated, pairs of relationships between classes extracted from the two models, respectively. The degree of identity is evaluated by comparing with the matching pattern, and the pair of relationships are integrated and converted to generate the relationship between the converted classes according to the conversion pattern corresponding to each matching pattern. It is possible to easily create a model integrated from the two models. Therefore, in developing similar software in the same field, it is not necessary to newly create a model for each piece of software, and software can be developed based on an integrated model. In addition, efficient software development can be performed by reusing the integrated model.

以下に、本発明にかかるモデル自動生成装置、モデル自動生成方法、及びプログラムの実施の形態を添付の図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Embodiments of a model automatic generation device, a model automatic generation method, and a program according to the present invention will be described below in detail with reference to the accompanying drawings. Note that the present invention is not limited to the embodiments.

実施の形態.
図1は、本発明の実施の形態にかかるモデル自動生成装置の構成を示すブロック図である。図1に示すように、本実施の形態にかかるモデル自動生成装置10は、それぞれオブジェクト指向分析・設計モデルであるモデルAとモデルBとを入力とし、照合パターン及び変換パターンが定義された変換ルール定義部8と、変換ルール定義部8に定義された照合パターンを参照し、モデルA及びモデルBからそれぞれ抽出されたクラス間の関係(以下、単に関係という)からなる関係のペアに対して、この関係のペアを構成する2つの関係を比較し、その比較結果に一致する照合パターンを変換ルール定義部8から選び出すための解析を行うモデル要素解析部6と、モデル要素解析部6により選び出された照合パターンに応じて、対応する変換パターンを変換ルール定義部8から選択し、選択した変換パターンに従って、関係のペアを統合変換して変換後の関係を生成することにより、モデルAとモデルBとを統合して統合モデル3を生成する統合モデル生成部7と、を備えて構成される。
Embodiment.
FIG. 1 is a block diagram showing a configuration of an automatic model generation device according to an embodiment of the present invention. As shown in FIG. 1, the automatic model generation device 10 according to the present exemplary embodiment inputs a model A and a model B, which are object-oriented analysis / design models, respectively, and a conversion rule in which a matching pattern and a conversion pattern are defined. Referring to the definition unit 8 and the matching pattern defined in the conversion rule definition unit 8, with respect to a pair of relationships consisting of relationships between classes extracted from the model A and the model B (hereinafter simply referred to as relationships), The model element analysis unit 6 that performs analysis for comparing the two relationships that constitute the pair of the relationship and selects a matching pattern that matches the comparison result from the conversion rule definition unit 8, and the model element analysis unit 6 The corresponding conversion pattern is selected from the conversion rule definition unit 8 in accordance with the collation pattern thus selected, and the relationship pair is integrated according to the selected conversion pattern. By generating a relationship after conversion converted to, an integrated model generating unit 7 integrates the model A and model B to generate an integrated model 3, configured with a.

ここで、オブジェクト指向分析・設計モデルとは、クラスとクラス間の関係を含むUML(Unified Modeling Language)で規定された情報を含むモデルである。また、オブジェクト指向分析・設計モデルを構成する種々の構成要素をモデル要素といい、関係はクラス及び関係種別等の情報を含む複数個のモデル要素により規定される。以下では、関係に含まれるモデル要素を、関係要素ともいう。   Here, the object-oriented analysis / design model is a model including information defined by UML (Unified Modeling Language) including classes and relationships between the classes. Various components constituting the object-oriented analysis / design model are referred to as model elements, and the relationship is defined by a plurality of model elements including information such as classes and relationship types. Hereinafter, the model element included in the relationship is also referred to as a relationship element.

さらに、統合モデル生成部7は、表示装置4と入力装置5とを備え、選び出された照合パターンに対応する変換パターンが複数存在する場合に、表示装置4を介して本装置の利用者に変換パターンを1つ選択するよう要求し、利用者は入力装置5を介してどの変換パターンを選択するのかを本装置に通知する。   Furthermore, the integrated model generation unit 7 includes a display device 4 and an input device 5, and when there are a plurality of conversion patterns corresponding to the selected matching pattern, the integrated model generation unit 7 notifies the user of this apparatus via the display device 4. A request is made to select one conversion pattern, and the user notifies the apparatus of which conversion pattern to select via the input device 5.

図7は、本実施の形態へ入力されるモデルAの一例を示すクラス図であり、図8は、図7に示したモデルAに含まれる関係に対して、関係を規定するモデル要素である関係要素の一覧を示す図である。また、図9は、本実施の形態へ入力されるモデルBの一例を示すクラス図であり、図10は、図9に示したモデルBに含まれる関係要素の一覧を示す図である。   FIG. 7 is a class diagram showing an example of the model A input to the present embodiment, and FIG. 8 is a model element that defines the relationship with respect to the relationship included in the model A shown in FIG. It is a figure which shows the list of related elements. FIG. 9 is a class diagram showing an example of model B input to the present embodiment, and FIG. 10 is a diagram showing a list of related elements included in model B shown in FIG.

図7においては、「動物園」、「サル」、「サル山」、「キリン」、「芋」、「バナナ」、及び「ゾウ」の7つのクラスがあり、それらの間に「関連」が存在する場合を示している。関係のうち「関連」は、クラスを意味する四角形どうしを接続する直線として表現され、接続された直線には矢印を付することで方向性を表現することができる。また、矢印の起点にあるクラスをソースクラス、矢印の宛先にあるクラスをターゲットクラスという。矢印は、ソースクラスのインスタンスから、ターゲットクラスのインスタンスにアクセスできることを意味する。例えば、「サル」と「バナナ」は、「関連」で結ばれており、ソースクラスが「サル」、ターゲットクラスが「バナナ」である。また、クラス間を結ぶ直線の中央付近には、関係を示す言葉である「関係名」を付与することができ、例えば、「サル」と「バナナ」の関連に対しては、関係名「食べる」が付与されている。一方、「サル」と「芋」の関連に対しては、関係名は付与されておらず、以下ではこのような場合を「無名」という。また、関連には、関係名の他に、ロール(役割)名と多重度を付与することができる。例えば、「サル」と「バナナ」との関連に対しては、「サル」と「バナナ」を結ぶ直線の「バナナ」側の終端付近にロール名「好物」が記述されており、「バナナ」は「サル」の「好物」であることを意味する。また、「サル」と「バナナ」とを結ぶ直線の「バナナ」側の終端付近には、さらに、多重度「20」が記述されており、接続される可能性のあるインスタンスの数を表している。多重度は「下限値..上限値」のように記述し、例えば、「サル」と「芋」との関連に対しては、「芋」の多重度は「2..4」となっている。図9には、6つのクラスを有するモデルBについてのクラス図を示している。   In FIG. 7, there are seven classes of “zoo”, “monkey”, “monkey mountain”, “giraffe”, “芋”, “banana”, and “elephant”, and “association” exists between them. Shows when to do. Of the relationships, “relation” is expressed as a straight line that connects squares that represent classes, and the connected straight line can be expressed by adding an arrow. The class at the starting point of the arrow is called a source class, and the class at the destination of the arrow is called a target class. The arrow means that the target class instance can be accessed from the source class instance. For example, “monkey” and “banana” are connected by “related”, the source class is “monkey”, and the target class is “banana”. In addition, a “relation name” that is a word indicating a relationship can be given near the center of a straight line connecting classes. For example, for the relationship between “monkey” and “banana”, the relationship name “eat” Is given. On the other hand, no relation name is given to the relation between “monkey” and “芋”, and in the following, such a case is referred to as “anonymous”. In addition to the relation name, a role name and multiplicity can be given to the relation. For example, for the relationship between “monkey” and “banana”, the roll name “favorite” is described near the end of the “banana” side of the straight line connecting “monkey” and “banana”. Means “favorite” of “monkey”. In addition, near the end of the “banana” side of the straight line connecting “monkey” and “banana”, a multiplicity “20” is further described, indicating the number of instances that may be connected. Yes. The multiplicity is described as “lower limit .. upper limit”. For example, for the relationship between “monkey” and “芋”, the multiplicity of “芋” is “2.4”. Yes. FIG. 9 shows a class diagram for model B having six classes.

次に、図8及び図10においては、各関係にはID番号が付され、各関係は、それぞれ関係要素である、関係種類、ソースクラス名、ターゲットクラス名、ロール名、多重度、及び関係名から規定されている。例えば、図8において、ID=5の関係は、関係種類が「関連」であり、ソースクラス名が「サル」、ターゲットクラス名が「バナナ」、ロール名が「好物」、多重度が「20」、関係名が「食べる」となっている。   Next, in FIGS. 8 and 10, each relationship is given an ID number, and each relationship is a relationship element, such as relationship type, source class name, target class name, role name, multiplicity, and relationship. It is prescribed from the name. For example, in FIG. 8, the relationship of ID = 5 has the relationship type “relation”, the source class name “monkey”, the target class name “banana”, the roll name “favorite”, and the multiplicity “20”. "The relationship name is" eat ".

変換ルール定義部8には、複数の照合パターンと各照合パターンに対応する変換パターンとが定義されている。照合パターンは、2つの関係の比較結果と照合されるパターンであり、2つの関係の同一性の度合いをモデル要素についての一致、不一致を含む組み合わせのパターンで表すものである。以下、照合パターンの詳細について、具体例をもとに説明する。本実施の形態においては、2つの関係を比較するときのモデル要素は、例えば、図8における関係要素である「ソースクラス名」、「ターゲットクラス名」、「ロール名」、及び「関係名」である。図3は、本実施の形態における照合パターンの一例を示す図である。図3に示すように、本実施の形態においては、1つの照合パターンは、照合パターン番号、ソースクラス名、ターゲットクラス名、ロール名、関係名、及び優先度についての情報から構成されている。図3の例では、13個の照合パターンが定義されている。照合パターンは、比較対照の2つのモデルから、任意の関係をそれぞれ1つずつ取り出して、その2つの関係が統合モデル上で同一又は類似のものとして変換可能かどうかを評価するために用いられる。評価の方法は、取り出した2つの関係の関係要素について、ソースクラス名、ターゲットクラス名、ロール名及び関係名をそれぞれ比較し、一致/無名一致/不一致のいずれにあたるかを評価することで一致する照合パターンを見つけ、照合パターン番号を得ることができる。ここで、「一致」とは、該当すする関係要素が両モデルで一致し、「無名一致」とは、該当する関係要素が両モデルとも無名で一致し、「不一致」とは、該当する関係要素が両モデルで一致しないことを意味する。優先度は、モデル要素解析部6により照合パターンが参照される優先度を示し、数字が小さいほど優先度は高い。つまり、優先度が1である照合パターン番号が1の照合パターンから参照される。   The conversion rule definition unit 8 defines a plurality of verification patterns and conversion patterns corresponding to the verification patterns. The collation pattern is a pattern that is collated with the comparison result of the two relations, and represents the degree of identity of the two relations by a combination pattern including matching and mismatching of the model elements. Hereinafter, the details of the matching pattern will be described based on a specific example. In the present embodiment, model elements for comparing two relationships are, for example, “source class name”, “target class name”, “role name”, and “relation name” that are the relationship elements in FIG. It is. FIG. 3 is a diagram showing an example of a collation pattern in the present embodiment. As shown in FIG. 3, in the present embodiment, one collation pattern is composed of information on collation pattern numbers, source class names, target class names, role names, relation names, and priorities. In the example of FIG. 3, 13 collation patterns are defined. The matching pattern is used to take one arbitrary relationship from each of the two comparison models and evaluate whether the two relationships can be converted as the same or similar on the integrated model. The evaluation method is matched by comparing the source class name, the target class name, the role name, and the relation name for the relational elements of the two relations that are taken out, and evaluating whether the relational element matches, anonymously matches, or does not match. A matching pattern can be found and a matching pattern number can be obtained. Here, “match” means that the relevant relationship elements match in both models, “nameless match” means that the relevant relationship elements match both models anonymously, and “mismatch” means that the relevant relationship Means that the elements do not match in both models. The priority indicates the priority with which the matching pattern is referred to by the model element analysis unit 6, and the smaller the number, the higher the priority. In other words, a reference pattern having a priority of 1 is referred to from a verification pattern having a verification pattern number of 1.

変換パターンは、照合パターンに応じて、2つの関係を変換して、変換後の関係を生成するための定義を与えるものである。図4−1及び図4−2は、本実施の形態における変換パターン表のフォーマットの一例を示す図である。図4−1及び図4−2に示すように、変換パターン表のフォーマットは、図3における照合パターン番号と、照合パターンに適合したモデルに適用する一連の変換処理を識別する番号である変換パターン番号と、変換により作成する関係のソースクラス名と、ソースクラスに付加する要素(例えば、ステレオタイプ、制約等)であるソースクラス付加要素と、変換により作成する関係のターゲットクラス名と、ターゲットクラスに付加する要素(例えば、ステレオタイプ、制約等)であるターゲットクラス付加要素と、変換により作成する関係のターゲット側のロール名と、変換により作成する関係の種別(例えば、関連、汎化、実現、依存等)である関係種別と、変換により作成する関係の名称である関係名(関連の場合は関連名)と、関係に付加する要素(例えば、ステレオタイプ、汎化等)である関係付加要素と、変換により作成する関係のターゲット側の多重度と、から構成される。   The conversion pattern gives a definition for converting two relations according to the collation pattern and generating a relation after conversion. 4A and 4B are diagrams illustrating an example of the format of the conversion pattern table according to the present embodiment. As shown in FIGS. 4A and 4B, the format of the conversion pattern table is a conversion pattern that is a number for identifying a matching pattern number in FIG. 3 and a series of conversion processes applied to a model that matches the matching pattern. Numbers, source class names of relationships created by conversion, source class additional elements that are elements (for example, stereotypes, constraints, etc.) added to source classes, target class names of relationships created by conversion, and target classes Target class addition elements that are elements to be added to (for example, stereotypes, constraints, etc.), role names on the target side of relations created by conversion, and types of relations to be created by conversion (eg, relation, generalization, realization) , Dependency, etc.), the relationship name (relation name in the case of a relationship) Additional elements (e.g., stereotypes, generalization, etc.) configured and related additional element is, from a multiplicity of target-side relationship to create the conversion.

モデル要素解析部6は、モデルA及びモデルBからそれぞれ任意に関係を抽出し、各モデルから抽出された2つの関係を、複数個の関係要素ごとに相互に比較し、その比較結果に一致する照合パターンを変換ルール定義部8から選び出すための解析を行う機能を有する。前述のように、図8及び図10に示す例では、2つの関係の比較に用いられる比較要素は、関係要素「ソースクラス名」、「ターゲットクラス名」、「ロール名」、及び「関係名」である。   The model element analysis unit 6 arbitrarily extracts a relationship from each of the models A and B, compares the two relationships extracted from each model with each other for each of a plurality of relationship elements, and matches the comparison result. It has a function of performing an analysis for selecting a matching pattern from the conversion rule definition unit 8. As described above, in the example shown in FIGS. 8 and 10, the comparison elements used for comparing the two relationships are the relationship elements “source class name”, “target class name”, “role name”, and “relation name”. Is.

統合モデル生成部7は、モデル要素解析部6により選び出された照合パターンに応じて、この照合パターンに対応する変換パターンを変換ルール定義部8から選択する。そして、統合モデル生成部7は、選択した変換パターンに従って、照合パターンに適合した関係のペアを統合変換して変換後の関係を生成することにより、モデルAとモデルBとを統合して統合モデル3を生成する機能を有する。   The integrated model generation unit 7 selects a conversion pattern corresponding to the verification pattern from the conversion rule definition unit 8 according to the verification pattern selected by the model element analysis unit 6. Then, the integrated model generation unit 7 integrates the model A and the model B by integrating and converting the pair of relationships that match the matching pattern according to the selected conversion pattern, thereby generating an integrated model. 3 is generated.

次に、本実施の形態の動作、即ち、本実施の形態にかかるオブジェクト指向開発支援方法について、図3から図10に示した例をもとに、図2のフローチャートに従って説明する。図2は、本実施の形態において、2つのオブジェクト指向分析・設計モデルを入力して統合モデルを出力する処理の流れを表したフローチャートである。入力される2つのモデルは、モデルA及びモデルBである。   Next, the operation of the present embodiment, that is, the object-oriented development support method according to the present embodiment will be described with reference to the flowchart of FIG. 2 based on the example shown in FIGS. FIG. 2 is a flowchart showing the flow of processing for inputting two object-oriented analysis / design models and outputting an integrated model in the present embodiment. The two models that are input are model A and model B.

図2に示すように、ステップS101では、モデル要素解析部6は変換ルール定義部8を参照し、処理に適用する照合パターンを最も優先度の高いものから順に1つ選択する。優先度は、図3に示すように、照合パターンに予め付与された優先度である。以降のステップでは、ステップS101で選択された1つの照合パターンについて処理を行ない、優先度の高い照合パターンから優先度の低い照合パターンまで順次処理を適用する。   As shown in FIG. 2, in step S <b> 101, the model element analysis unit 6 refers to the conversion rule definition unit 8 and selects one matching pattern to be applied to the process in order from the highest priority. As shown in FIG. 3, the priority is a priority given in advance to the collation pattern. In subsequent steps, processing is performed for one matching pattern selected in step S101, and processing is sequentially applied from a matching pattern with a higher priority to a matching pattern with a lower priority.

ステップS102では、モデル要素解析部6は、ステップS101で選択された照合パターンに適合する関係のペアが存在するかどうかを調べる。ここで関係のペアとは、モデルAに含まれる任意の1つの関係と、モデルBに含まれる任意の1つの関係の組み合わせを意味する。また、図8及び図10からわかるように、関係のペアは関連のペアである。   In step S <b> 102, the model element analysis unit 6 checks whether there is a relationship pair that matches the matching pattern selected in step S <b> 101. Here, the relationship pair means a combination of any one relationship included in the model A and any one relationship included in the model B. As can be seen from FIGS. 8 and 10, the relationship pair is a relationship pair.

今、ステップS101で、第1優先度の照合パターンである照合パターン番号1の照合パターンが選ばれたとき、ステップS102において、モデル要素解析部6は、ソースクラス名、ターゲットクラス名、ロール名及び関係名のすべてが一致する関連のペアがあるか否かを、図8に示したモデルAと図10に示したモデルBの関係要素から探す。その結果、照合パターン番号1に対応する関連のペアが存在しないことが分かる。その場合は再びステップS101に戻り、次に高い優先度を持つ照合パターンを選択して以降の処理を続ける。   Now, when the collation pattern of collation pattern number 1 which is the collation pattern of the first priority is selected in step S101, the model element analysis unit 6 in step S102, the source class name, target class name, role name and Whether there is a related pair that matches all of the relationship names is searched from the relationship elements of the model A shown in FIG. 8 and the model B shown in FIG. As a result, it can be seen that there is no related pair corresponding to collation pattern number 1. In that case, the process returns to step S101 again, the matching pattern having the next highest priority is selected, and the subsequent processing is continued.

次に、ステップS101で、第2優先度の照合パターンである照合パターン番号2の照合パターンが選ばれたとき、ステップS102において、モデル要素解析部6は、ソースクラス名、ターゲットクラス名及びロール名が一致し、関係名がともに無名であるような関連のペアがあるか否かを、図8に示したモデルAと図10に示したモデルBの関係要素から探す。その結果、照合パターン番号2に対応する関連のペアとして、モデルAにおいてIDが1の関連(図8)とモデルBにおいてIDが1の関連(図10)のペアが見つかる。   Next, when the collation pattern of the collation pattern number 2 that is the collation pattern of the second priority is selected in step S101, the model element analysis unit 6 in step S102, the source class name, the target class name, and the role name Are searched for from the relational elements of the model A shown in FIG. 8 and the model B shown in FIG. As a result, as a pair of relations corresponding to the collation pattern number 2, a pair having an ID of 1 in the model A (FIG. 8) and a pair having an ID of 1 in the model B (FIG. 10) are found.

そこで、ステップS103に進む。ステップS103では、ステップS102で見つかった照合パターンに適合するすべてのペアについて、以降のステップの処理を適用する。   Therefore, the process proceeds to step S103. In step S103, the processing in the subsequent steps is applied to all pairs that match the matching pattern found in step S102.

ステップS104では、統合モデル生成部7は、ステップS102で選択された照合パターンに対応する変換パターンが複数あるかどうかを調べる。ステップS102で選択された照合パターンに対応する変換パターンは、図6−1に示すように、変換パターン番号2−1の1つだけであるので、この変換パターンを選択し、ステップS106に進む。ここで、図6−1、図6−2、図6−3は本実施の形態における変換パターン表の一例であり、図4に示す変換パターン表のフォーマットに従って、照合パターン番号順に与えられている。即ち、図6−1、図6−2、図6−3では、図3に示す照合パターンに対応する変換パターンが、照合パターン番号ごとに与えられている。また、1つの照合パターン番号に対して、1又は複数の変換パターンが対応している。また、図5は、変換パターン表の各項目に記入可能な内容の書式の説明を行う図である。図5に示すように、図6−1における変換パターン番号2−1が付された変換パターンにおいては、変換後の関係種別は関連であり、ソースクラス名はモデルAで注目している関係のソースクラス名(A.ソースクラス名)、ターゲットクラス名はモデルAで注目している関係のターゲットクラス名(A.ターゲットクラス名)、ロール名はモデルAで注目している関係のロール名(A.ロール名)、関係名はモデルAで注目している関係の関係名(A.関連名)、多重度はモデルAで注目している関連の多重度(A.多重度)とモデルBで注目している関連の多重度(B.多重度)との包含である。   In step S104, the integrated model generation unit 7 checks whether or not there are a plurality of conversion patterns corresponding to the matching pattern selected in step S102. Since the conversion pattern corresponding to the collation pattern selected in step S102 is only one conversion pattern number 2-1, as shown in FIG. 6A, this conversion pattern is selected and the process proceeds to step S106. 6A, 6B, and 6C are examples of the conversion pattern table in the present embodiment, and are given in the order of the collation pattern numbers according to the format of the conversion pattern table shown in FIG. . That is, in FIGS. 6A, 6B, and 6C, a conversion pattern corresponding to the matching pattern shown in FIG. 3 is given for each matching pattern number. One or more conversion patterns correspond to one collation pattern number. FIG. 5 is a diagram for explaining the format of contents that can be entered in each item of the conversion pattern table. As shown in FIG. 5, in the conversion pattern with the conversion pattern number 2-1 in FIG. 6-1, the relationship type after conversion is related, and the source class name is the relationship of interest in model A The source class name (A. source class name), the target class name is the target class name of the relationship focused on model A (A. target class name), and the role name is the role name of the relationship focused on model A ( A. Role name), the relation name is the relation name of the relation being noticed in model A (A. relation name), and the multiplicity is the multiplicity of the relation being noticed in model A (A. multiplicity) And the related multiplicity (B. multiplicity) that is focused on.

ステップS106では、統合モデル生成部7は、ステップS102で見つかった関連のペアに対し、図6に示した変換パターン表に基づいて変換パターンを適用して統合モデルに追加する。今、モデルAにおいてIDが1の関連要素とモデルBにおいてIDが1の関連とのペアに対して、照合パターン2に対応する変換パターン2−1を適用する。変換パターン2−1は、ソースクラス名、ターゲットクラス名及びロール名を、ペアのうちモデルAの側から採用し、多重度については、モデルAとモデルBにおける多重度を包含する多重度とすることを意味している。図11は、ステップS106で変換された関係が出力された後の、統合モデルに含まれる関係要素を示す。図11に示すように、統合モデルの関係要素として、ID=1を付し、関係種類は「関連」、ソースクラス名は「動物園」、ターゲットクラス名は「サル」、ロール名は「小型動物」である。また、多重度は、図8におけるID=1の関連の多重度「10..20」と、図10におけるID=1の関連の多重度「30..50」との包含である多重度「10..20,30..50」である。   In step S106, the integrated model generation unit 7 applies a conversion pattern to the related pair found in step S102 based on the conversion pattern table shown in FIG. 6 and adds it to the integrated model. Now, the conversion pattern 2-1 corresponding to the matching pattern 2 is applied to the pair of the related element having the ID of 1 in the model A and the relationship having the ID of 1 in the model B. In the conversion pattern 2-1, the source class name, the target class name, and the role name are adopted from the model A side of the pair, and the multiplicity is a multiplicity including the multiplicity in the model A and the model B. It means that. FIG. 11 shows the relationship elements included in the integrated model after the relationship converted in step S106 is output. As shown in FIG. 11, ID = 1 is assigned as a relation element of the integrated model, the relation type is “relation”, the source class name is “zoo”, the target class name is “monkey”, and the role name is “small animal”. It is. Further, the multiplicity is the inclusion of the multiplicity “10..20” of ID = 1 in FIG. 8 and the multiplicity “30..50” of ID = 1 in FIG. 10..20, 30..50 ".

ステップS107では、ステップS102で見つかったすべての関係要素のペアに対して処理を行なったかどうかを判断し、まだ未処理の関係要素のペアがあれば、ステップS103に戻る。そうでなければステップS108に進み、S103〜S106間のループ2を終了する。   In step S107, it is determined whether or not processing has been performed for all the relational element pairs found in step S102. If there is an unprocessed relational element pair, the process returns to step S103. Otherwise, the process proceeds to step S108, and the loop 2 between S103 and S106 is terminated.

ステップS109では、すべての照合パターンに対して処理を行なったかどうかを判断し、まだ未処理の照合パターンがあれば、ステップS101に戻る。そうでなければステップS110に進み、S101〜S109間のループを終了する。今、第2優先度である照合パターン2の処理が終わったが、第3優先度以降の照合パターンについてはまだ処理を行なっていないため、ステップS101に戻る。   In step S109, it is determined whether or not processing has been performed for all the matching patterns. If there is an unprocessed matching pattern, the process returns to step S101. Otherwise, the process proceeds to step S110, and the loop between S101 and S109 is terminated. Now, the processing of the collation pattern 2 that is the second priority is completed, but the processing is not yet performed for the collation patterns after the third priority, and the process returns to step S101.

以下、ステップS101からステップS109までのループ処理の流れは上記と同様であるので、パターンの相違に注目して処理の流れの説明を続ける。   Hereinafter, since the flow of the loop processing from step S101 to step S109 is the same as described above, the description of the processing flow will be continued focusing on the difference in pattern.

第3優先度の照合パターンは、照合パターン番号3の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアは存在しない。このため、この照合パターンに対応する変換パターンの処理は実施しない。   The collation pattern of the third priority is the collation pattern of the collation pattern number 3. In model A of FIG. 8 and model B of FIG. 10, there is no related pair that matches this pattern. For this reason, the process of the conversion pattern corresponding to this collation pattern is not implemented.

第4優先度の照合パターンは、照合パターン番号4の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアとして、モデルAにてIDが5の関連要素と、モデルBにてIDが4の関連のペアが見つかる。また、照合パターン番号4に対応する変換パターンは、図6−1に示すように、変換パターン4−1と変換パターン4−2の2通りがある。この場合、ステップS104にて変換パターンが複数あると判断され、ステップS105にて変換パターンの選択を行なう。変換パターンの選択は、表示装置4により変換パターンの選択をユーザに要求する表示を行い、入力装置5を通じてユーザが変換パターンを1つ選択する。ステップS106において、選択された変換パターンに従って関係の変換を行い、統合モデルに追加する。今、ステップS105で変換パターン4−2が選択されたものとする。図12は、ステップS106で変換された関係が出力された後の、統合モデルに含まれる関係要素を示す。図12において、IDが2の関連要素が、第4優先度の照合パターンに対応して追加された関係である。例えば、ロール名「好物_主食」は、図6に示す変換ルールに従い、モデルAからのロール名である「好物」とモデルBからのロール名である「主食」とを組み合わせたものであり、ロール名が2つのモデルを比較したときの変動性を示す変動要素であることがわかる。このように、統合モデルでは、関数要素ごとに一致又は不一致等の同一性を表すようなラベルが付加され、共通性、変動性を表現している。   The fourth priority collation pattern is a collation pattern of collation pattern number 4. In the model A in FIG. 8 and the model B in FIG. 10, a related element having an ID of 5 in the model A and a related pair having an ID of 4 in the model B are found as related pairs that match this pattern. As shown in FIG. 6A, there are two types of conversion patterns corresponding to the collation pattern number 4: a conversion pattern 4-1 and a conversion pattern 4-2. In this case, it is determined that there are a plurality of conversion patterns in step S104, and a conversion pattern is selected in step S105. Selection of the conversion pattern is performed by displaying on the display device 4 requesting the user to select a conversion pattern, and the user selects one conversion pattern through the input device 5. In step S106, the relationship is converted according to the selected conversion pattern and added to the integrated model. Now, assume that the conversion pattern 4-2 is selected in step S105. FIG. 12 shows the relationship elements included in the integrated model after the relationship converted in step S106 is output. In FIG. 12, the related element with ID 2 is a relationship added corresponding to the collation pattern of the fourth priority. For example, the role name “favorite_main staple” is a combination of “favorite” which is the role name from model A and “main staple” which is the role name from model B, according to the conversion rule shown in FIG. It can be seen that the role name is a variable element indicating variability when the two models are compared. As described above, in the integrated model, a label indicating the identity such as matching or mismatching is added to each function element to express commonality and variability.

第5優先度の照合パターンは、照合パターン番号5の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアとして、モデルAにてIDが3の関連と、モデルBにてIDが3の関連のペアが見つかる。また、照合パターン番号5に対応する変換パターンは、図6−1に示すように、変換パターン5−1の1通りのみがある。図13は、ステップS106で変換された関係が出力された後の、統合モデルに含まれる関係要素を示す。図13において、IDが3と4の関連が、第5優先度の照合パターンに対応して追加された関係である。例えば、IDが3の関連においては、多重度は「0,1」であり、IDが4の関連においては、多重度は「0,3」であり、それぞれ多重度0を許すことで、変動性をラベルしている。   The collation pattern of the fifth priority is the collation pattern of collation pattern number 5. In the model A in FIG. 8 and the model B in FIG. 10, as a pair of relations matching this pattern, a relation having an ID of 3 in the model A and a pair having an ID of 3 in the model B are found. Further, as shown in FIG. 6A, there is only one conversion pattern corresponding to the collation pattern number 5 of the conversion pattern 5-1. FIG. 13 shows the relationship elements included in the integrated model after the relationship converted in step S106 is output. In FIG. 13, the relationship between IDs 3 and 4 is a relationship added corresponding to the collation pattern of the fifth priority. For example, the multiplicity is “0, 1” in the relation of ID 3 and the multiplicity is “0, 3” in the relation of ID 4, which varies by allowing the multiplicity 0 respectively. Label sex.

第6優先度の照合パターンは、照合パターン番号6の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアは存在しない。このため、この照合パターンに対応する変換パターンの処理は実施しない。   The collation pattern of the sixth priority is the collation pattern of collation pattern number 6. In model A of FIG. 8 and model B of FIG. 10, there is no related pair that matches this pattern. For this reason, the process of the conversion pattern corresponding to this collation pattern is not implemented.

第7優先度の照合パターンは、照合パターン番号7の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアは存在しない。このため、この照合パターンに対応する変換パターンの処理は実施しない。   The collation pattern of the seventh priority is the collation pattern of the collation pattern number 7. In model A of FIG. 8 and model B of FIG. 10, there is no related pair that matches this pattern. For this reason, the process of the conversion pattern corresponding to this collation pattern is not implemented.

第8優先度の照合パターンは、照合パターン番号8の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアとして、モデルAにてIDが2の関連と、モデルBにてIDが2の関連のペアが見つかる。また、照合パターン番号8に対応する変換パターンは、図6−2に示すように、変換パターン8−1と変換パターン8−2と変換パターン8−3の3通りがある。この場合、ステップS104にて変換パターンが複数あると判断され、ステップS105にて変換パターンの選択を行なう。変換パターンの選択は、表示装置4に変換パターンの選択をユーザに要求する表示を行い、入力装置5を通じてユーザが変換パターンを1つ選択する。ステップS106において、選択された変換パターンに従って関係の変換を行い、統合モデルに追加する。今、ステップS105で変換パターン8−3が選択されたものとする。図14は、ステップS106で変換された関係が出力された後の、統合モデルに含まれる関係要素を示す。図14において、IDが5の関連、IDが6及び7の汎化関係が、第8優先度の照合パターンに対応して追加された関係である。関連のペアのターゲットクラス名がそれぞれ「キリン」、「ゾウ」と異なることから、統合モデルの関係では、共通部分を抽象化したクラス「abstract_大型動物」を介して、関連のペアを統合している。   The matching pattern of the eighth priority is a matching pattern of matching pattern number 8. In the model A in FIG. 8 and the model B in FIG. 10, a pair having an ID of 2 in the model A and a pair having an ID of 2 in the model B are found as a pair that is compatible with this pattern. Further, as shown in FIG. 6B, there are three conversion patterns corresponding to the collation pattern number 8: a conversion pattern 8-1, a conversion pattern 8-2, and a conversion pattern 8-3. In this case, it is determined that there are a plurality of conversion patterns in step S104, and a conversion pattern is selected in step S105. The selection of the conversion pattern is performed by displaying on the display device 4 requesting the user to select a conversion pattern, and the user selects one conversion pattern through the input device 5. In step S106, the relationship is converted according to the selected conversion pattern and added to the integrated model. Assume that the conversion pattern 8-3 is selected in step S105. FIG. 14 shows the relationship elements included in the integrated model after the relationship converted in step S106 is output. In FIG. 14, the relation of ID 5 and the generalization relation of IDs 6 and 7 are relations added corresponding to the collation pattern of the eighth priority. Since the target class names of the related pairs are different from “Kirin” and “Elephant”, respectively, in the relationship of the integrated model, the related pairs are integrated via the class “abstract_large animal” that abstracts the common part. Yes.

第9優先度の照合パターンは、照合パターン番号9の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアは存在しない。このため、この照合パターンに対応する変換パターンの処理は実施しない。   The collation pattern of the ninth priority is the collation pattern of the collation pattern number 9. In model A of FIG. 8 and model B of FIG. 10, there is no related pair that matches this pattern. For this reason, the process of the conversion pattern corresponding to this collation pattern is not implemented.

第10優先度の照合パターンは、照合パターン番号10の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアとして、モデルAにてIDが6の関連と、モデルBにてIDが5の関連のペアが見つかる。また、照合パターン番号10に対応する変換パターンは、図6−3に示すように、変換パターン10−1と変換パターン10−2と変換パターン10−3の3通りがある。この場合、ステップS104にて変換パターンが複数あると判断され、ステップS105にて変換パターンの選択を行なう。変換パターンの選択は、表示装置4に変換パターンの選択をユーザに要求する表示を行い、入力装置5を通じてユーザが変換パターンを1つ選択する。ステップS106において、選択された変換パターンに従って関係の変換を行い、統合モデルに追加する。今、ステップS105で変換パターン10−2が選択されたものとする。図15は、ステップS106で変換された関係が出力された後の、統合モデルに含まれる関係要素を示す。図15において、IDが8の関連、IDが9及び10の実現関係が、第10優先度の照合パターンに対応して追加された関係要素である。図15では、関連のペアの共通性をインターフェイス「I_食べる」として抽出している。   The collation pattern with the tenth priority is the collation pattern with the collation pattern number 10. In the model A in FIG. 8 and the model B in FIG. 10, as a pair of relations matching this pattern, a relation having an ID of 6 in the model A and a pair having an ID of 5 in the model B are found. Further, as shown in FIG. 6-3, there are three conversion patterns corresponding to the collation pattern number 10: a conversion pattern 10-1, a conversion pattern 10-2, and a conversion pattern 10-3. In this case, it is determined that there are a plurality of conversion patterns in step S104, and a conversion pattern is selected in step S105. The selection of the conversion pattern is performed by displaying on the display device 4 requesting the user to select a conversion pattern, and the user selects one conversion pattern through the input device 5. In step S106, the relationship is converted according to the selected conversion pattern and added to the integrated model. Assume that the conversion pattern 10-2 is selected in step S105. FIG. 15 shows the relationship elements included in the integrated model after the relationship converted in step S106 is output. In FIG. 15, the association with ID 8 and the realization relationship with IDs 9 and 10 are relation elements added corresponding to the collation pattern of the tenth priority. In FIG. 15, the commonality of related pairs is extracted as the interface “I_eat”.

第11優先度の照合パターンは、照合パターン番号11の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアは存在しない。このため、この照合パターンに対応する変換パターンの処理は実施しない。   The collation pattern of the eleventh priority is the collation pattern of the collation pattern number 11. In model A of FIG. 8 and model B of FIG. 10, there is no related pair that matches this pattern. For this reason, the process of the conversion pattern corresponding to this collation pattern is not implemented.

第12優先度の照合パターンは、照合パターン番号12の照合パターンである。図8のモデルAと図10のモデルBには、このパターンに適合する関連のペアは存在しない。このため、この照合パターンに対応する変換パターンの処理は実施しない。   The collation pattern of the twelfth priority is the collation pattern of the collation pattern number 12. In model A of FIG. 8 and model B of FIG. 10, there is no related pair that matches this pattern. For this reason, the process of the conversion pattern corresponding to this collation pattern is not implemented.

第13優先度の照合パターンは、照合パターン番号13の照合パターンである。これは、照合パターン番号1〜13のすべての照合パターンに当てはまらない場合である。図8のモデルAと図10のモデルBには、このパターンに適合する関連として、モデルAにてIDが4の関連が見つかる。また、照合パターン番号13に対応する変換パターンは、図6−3に示すように、変換パターン13−1と変換パターン13−2の2通りがある。この場合、ステップS104にて変換パターンが複数あると判断され、ステップS105にて変換パターンの選択を行なう。変換パターンの選択は、表示装置4に変換パターンの選択をユーザに要求する表示を行い、入力装置5を通じてユーザが変換パターンを1つ選択する。ステップS106において、選択された変換パターンに従って関係の変換を行い、統合モデルに追加する。今、ステップS105で変換パターン13−1が選択されたものとする。図16は、ステップS106で変換された関係が出力された後の、統合モデルに含まれる関係要素を示す。図16において、IDが11の関連が、第13優先度の照合パターンに対応して追加された関係である。   The 13th priority collation pattern is the collation pattern of collation pattern number 13. This is a case where it does not apply to all the collation patterns of the collation pattern numbers 1-13. In the model A shown in FIG. 8 and the model B shown in FIG. Further, as shown in FIG. 6-3, there are two conversion patterns corresponding to the collation pattern number 13: a conversion pattern 13-1 and a conversion pattern 13-2. In this case, it is determined that there are a plurality of conversion patterns in step S104, and a conversion pattern is selected in step S105. The selection of the conversion pattern is performed by displaying on the display device 4 requesting the user to select a conversion pattern, and the user selects one conversion pattern through the input device 5. In step S106, the relationship is converted according to the selected conversion pattern and added to the integrated model. Now, it is assumed that the conversion pattern 13-1 is selected in step S105. FIG. 16 shows the relationship elements included in the integrated model after the relationship converted in step S106 is output. In FIG. 16, the association with ID 11 is a relationship added corresponding to the collation pattern of the 13th priority.

以上のようにして、すべての照合パターンに対する処理を終えたらステップS111に進む。ステップS111では、ここまで作成した統合モデルをUMLのクラス図として出力する。図17に、ステップS111で出力される統合モデルのクラス図を示す。例えば、クラス「ゾウ」とインターフェイス「I_食べる」とは、関係名が「食べる」の「関連」で結ばれており、インターフェイス「I_食べる」のロール名は「好物_栄養源」、多重度は「50,100」である。この関連は、図15におけるIDが8の関連をUMLで表現したものである。なお、クラス「ゾウ」とインターフェイス「I_食べる」を結ぶ矢印には、これが優先度10の照合パターンに従って変換されたものであることを示すために、点線を介して「パターン10」が付されている。他のクラス間の関係も同様であり、通常のUMLの表記方法に従って図示されている。   As described above, when the processing for all the matching patterns is completed, the process proceeds to step S111. In step S111, the integrated model created so far is output as a UML class diagram. FIG. 17 shows a class diagram of the integrated model output in step S111. For example, the class “Elephant” and the interface “I_Eat” are connected by “Relation” with the relationship name “Eat”, the role name of the interface “I_Eat” is “Favorite_Nutrition”, and the multiplicity is “50,100”. This association is a UML representation of the association with ID 8 in FIG. The arrow connecting the class “elephant” and the interface “I_eat” is given “pattern 10” via a dotted line in order to indicate that this has been converted according to the collation pattern of priority 10. Yes. The relationship between other classes is the same, and is illustrated according to the normal UML notation.

上述のように、本実施の形態においては、2つのオブジェクト指向分析・設計モデルを入力とし、この2つの入力モデルの共通性と変動性を、照合パターンを参照することにより解析して、2つの入力モデルを統合する統合モデルを自動的に生成している。また、このような操作を順次繰り返すことにより、3つ以上のオブジェクト指向分析・設計モデルを統合する統合モデルを自動生成することができる。つまり、先ず、入力モデルを2つ選択し、これら2つのモデルを統合する統合モデルを生成する。次に、先に選択されたモデル以外のモデルを1つ選択して、選択されたモデルと前記統合モデルとを統合する統合モデルを生成する。このような操作を、繰り返してすべての入力モデルを統合する統合モデルを生成することができる。   As described above, in the present embodiment, two object-oriented analysis / design models are input, and the commonality and variability of the two input models are analyzed by referring to the matching pattern. An integrated model that integrates the input model is automatically generated. Further, by repeating such operations sequentially, an integrated model that integrates three or more object-oriented analysis / design models can be automatically generated. That is, first, two input models are selected, and an integrated model that integrates these two models is generated. Next, one model other than the previously selected model is selected to generate an integrated model that integrates the selected model and the integrated model. Such an operation can be repeated to generate an integrated model that integrates all input models.

本実施の形態に示されるモデル自動生成装置は、ハードディスク等の記憶手段、メモリ、及びCPU(Central Processing Unit)等を有するパーソナルコンピュータ等の情報処理装置により構成することができる。例えば、変換ルール定義部8は、ハードディスク等の記憶手段から実現され、モデル要素解析部6、統合モデル生成部7は、CPU、メモリ、及びハードディスク等から実現される。また、コンピュータを、本実施の形態における変換ルール定義部8、モデル要素解析部6、統合モデル生成部7として機能させるためのプログラムを情報処理装置の記憶手段に記憶させ、メモリ上に呼び出して実行させることにより、上記処理を実行させることが可能となる。このプログラムは、インストール可能な形式又は実行可能な形式のファイルとしてCD−ROM(Compact Disk Read Only Memory)、フレキシブルディスク、DVD(Digital Versatile Disc又はDigital Video Disc)、メモリーカード等のコンピュータで読み取り可能な記録媒体に記憶させて提供することができる。また、このプログラムを、インターネット等のネットワークに接続されたコンピュータに格納し、ネットワーク経由でダウンロードさせることにより提供することもできる。   The model automatic generation apparatus shown in the present embodiment can be configured by an information processing apparatus such as a personal computer having storage means such as a hard disk, memory, and a CPU (Central Processing Unit). For example, the conversion rule definition unit 8 is realized by a storage unit such as a hard disk, and the model element analysis unit 6 and the integrated model generation unit 7 are realized by a CPU, a memory, a hard disk, and the like. In addition, a program for causing a computer to function as the conversion rule definition unit 8, the model element analysis unit 6, and the integrated model generation unit 7 in the present embodiment is stored in the storage unit of the information processing apparatus, and is called and executed on the memory. This makes it possible to execute the above processing. This program can be read by a computer such as a CD-ROM (Compact Disk Read Only Memory), a flexible disk, a DVD (Digital Versatile Disc or Digital Video Disc), or a memory card as an installable or executable file. It can be provided by being stored in a recording medium. The program can also be provided by being stored in a computer connected to a network such as the Internet and downloaded via the network.

本発明の実施の形態によれば、個別に作成された複数のオブジェクト指向分析・設計モデルから簡便に統合化されたオブジェクト指向分析・設計モデルの作成が可能であり、同一分野の類似したソフトウェアの開発において、新たに個々のソフトウェアに対してオブジェクト指向分析・設計モデルを作成する必要がなく、統合化されたオブジェクト指向分析・設計モデルを基礎としてソフトウェアを開発することができる。そのため、統合化されたオブジェクト指向分析・設計モデルを再利用した効率的なソフトウェア開発を行うことができる。   According to the embodiment of the present invention, it is possible to create an object-oriented analysis / design model that is easily integrated from a plurality of individually created object-oriented analysis / design models. In development, it is not necessary to newly create an object-oriented analysis / design model for individual software, and software can be developed based on an integrated object-oriented analysis / design model. Therefore, efficient software development can be performed by reusing the integrated object-oriented analysis / design model.

なお、変換ルール定義部8には、本装置の利用者が、照合パターン及び変換パターンを入力設定する入力手段を備えることができる。これにより、照合パターン及び変換パターンをそれぞれ入力し、又はその内容を変更することができる。変換ルール定義部8に定義される照合パターンと変換パターンを利用者が適宜入力、変更できることから、利用者の目的に応じて統合化されたモデルを作成することができる。   Note that the conversion rule definition unit 8 can include an input means for the user of this apparatus to input and set a collation pattern and a conversion pattern. Thereby, a collation pattern and a conversion pattern can be input or their contents can be changed. Since the user can appropriately input and change the collation pattern and conversion pattern defined in the conversion rule definition unit 8, an integrated model can be created according to the purpose of the user.

以上のように、本発明にかかるモデル自動生成装置及びプログラムは、再利用可能なソフトウェアの開発作業に適している。   As described above, the model automatic generation apparatus and program according to the present invention are suitable for reusable software development work.

本発明の実施の形態にかかるモデル自動生成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the model automatic generation apparatus concerning embodiment of this invention. 本発明の実施の形態において、2つのオブジェクト指向分析・設計モデルを入力して統合モデルを出力する処理の流れを表したフローチャートである。4 is a flowchart showing a flow of processing for inputting two object-oriented analysis / design models and outputting an integrated model in the embodiment of the present invention. 本発明の実施の形態における照合パターンの一例を示す図である。It is a figure which shows an example of the collation pattern in embodiment of this invention. 本発明の実施の形態における変換パターン表のフォーマットの一例を示す図である。It is a figure which shows an example of the format of the conversion pattern table | surface in embodiment of this invention. 図4−1における項目の説明を行う図である。FIG. 4 is a diagram for explaining items in FIG. 本発明の実施の形態における変換パターン表の各項目に記入可能な内容の書式の説明を行う図である。It is a figure explaining the format of the content which can be entered in each item of the conversion pattern table | surface in embodiment of this invention. 本実施の形態における変換パターン表の一例を示す図である。It is a figure which shows an example of the conversion pattern table | surface in this Embodiment. 図6−1に続く変換パターン表の一例を示す図である。It is a figure which shows an example of the conversion pattern table following FIG. 図6−2に続く変換パターン表の一例を示す図である。It is a figure which shows an example of the conversion pattern table | surface following FIG. 6-2. 本発明の実施の形態へ入力されるモデルAの一例を示すクラス図である。It is a class diagram which shows an example of the model A input into embodiment of this invention. 図7に示したモデルAの例に含まれる関係要素の一覧を示す図である。It is a figure which shows the list of the relational elements contained in the example of the model A shown in FIG. 本発明の実施の形態へ入力されるモデルBの一例を示すクラス図である。It is a class diagram which shows an example of the model B input into embodiment of this invention. 図9に示したモデルBの例に含まれる関係要素の一覧を示す図である。It is a figure which shows the list of the relational elements contained in the example of the model B shown in FIG. 第2優先照合パターン処理後の統合モデルの関係要素を示す図である。It is a figure which shows the related element of the integrated model after a 2nd priority collation pattern process. 第4優先照合パターン処理後の統合モデルの関係要素を示す図である。It is a figure which shows the related element of the integrated model after a 4th priority collation pattern process. 第5優先照合パターン処理後の統合モデルの関係要素を示す図である。It is a figure which shows the related element of the integrated model after a 5th priority collation pattern process. 第8優先照合パターン処理後の統合モデルの関係要素を示す図である。It is a figure which shows the related element of the integrated model after an 8th priority collation pattern process. 第10優先照合パターン処理後の統合モデルの関係要素を示す図である。It is a figure which shows the related element of the integrated model after a 10th priority collation pattern process. 第13優先照合パターン処理後の統合モデルの関係要素を示す図である。It is a figure which shows the related element of the integrated model after a 13th priority collation pattern process. 本実施の形態がモデルAとモデルBとを統合することにより生成した統合モデルを表すクラス図である。It is a class diagram showing the integrated model produced | generated by this Embodiment integrating the model A and the model B. FIG.

符号の説明Explanation of symbols

3 統合モデル
4 表示装置
5 入力装置
6 モデル要素解析部
7 統合モデル生成部
8 変換ルール定義部
10 モデル自動生成装置
DESCRIPTION OF SYMBOLS 3 Integrated model 4 Display apparatus 5 Input device 6 Model element analysis part 7 Integrated model production | generation part 8 Conversion rule definition part 10 Model automatic generation apparatus

Claims (10)

オブジェクト指向に基づく表記を用いてクラス間の関係を含むソフトウェアの構造を表現するモデルを生成するモデル自動生成装置において、
2つのクラス間の関係の同一性の度合いをモデルの構成要素であるモデル要素についての一致、不一致を含む組み合わせのパターンで表した複数の照合パターンと、前記各照合パターンに応じて前記2つのクラス間の関係を統合変換するための変換後のクラス間の関係を定義する変換パターンとが定義される変換ルール定義部と、
2つのモデルからそれぞれ抽出されたクラス間の関係のペアを前記モデル要素毎に比較し、この比較結果に一致する照合パターンを前記変換ルール定義部から選び出すための解析を行うモデル要素解析部と、
このモデル要素解析部により選び出された前記照合パターンに対応する変換パターンを前記変換ルール定義部から選択し、選択した変換パターンに従ってクラス間の関係を生成することにより、2つのモデルを統合する統合モデルを生成する統合モデル生成部と、
を備えることを特徴とするモデル自動生成装置。
In a model automatic generation device that generates a model that expresses the structure of software including relationships between classes using object-oriented notation,
A plurality of matching patterns that represent the degree of identity of the relationship between two classes as a combination pattern including matching and mismatching of model elements that are components of the model, and the two classes according to each matching pattern A conversion rule definition part in which a conversion pattern that defines a relationship between classes after conversion to integrate and convert the relationship between
A model element analysis unit that compares a pair of relationships between classes extracted from two models for each model element and performs an analysis to select a matching pattern that matches the comparison result from the conversion rule definition unit;
Integration that integrates two models by selecting a conversion pattern corresponding to the collation pattern selected by the model element analysis unit from the conversion rule definition unit and generating a relationship between classes according to the selected conversion pattern An integrated model generation unit for generating a model;
A model automatic generation device comprising:
前記2つのモデルからそれぞれ抽出された前記クラス間の関係が、クラス間の関連であることを特徴とする請求項1に記載のモデル自動生成装置。   The model automatic generation apparatus according to claim 1, wherein the relationship between the classes extracted from the two models is a relationship between classes. 前記モデル要素には、関係の起点を表すソースクラス名と、関係の宛先を表すターゲットクラス名と、ロール名と、関係名と、が含まれ、前記照合パターンは、前記ソースクラス名、前記ターゲットクラス名、前記ロール名、及び前記関係名のそれぞれについて、一致、不一致、及び名前が双方に定義されていない無名一致を含む組み合わせパターンであることを特徴とする請求項1又は2に記載のモデル自動生成装置。   The model element includes a source class name that represents the origin of the relationship, a target class name that represents the destination of the relationship, a role name, and a relationship name, and the matching pattern includes the source class name, the target The model according to claim 1 or 2, wherein each of the class name, the role name, and the relation name is a combination pattern including matching, mismatching, and anonymous matching in which names are not defined in both. Automatic generator. 前記照合パターンは優先度の情報を含み、前記モデル要素解析部は、前記優先度の高い照合パターンから前記優先度の低い照合パターンまで順次参照することにより、前記関係のペアの比較結果に一致する照合パターンを前記変換ルール定義部から選び出すことを特徴とする請求項3に記載のモデル自動生成装置。   The matching pattern includes priority information, and the model element analysis unit matches the comparison result of the pair of relationships by sequentially referring to the matching pattern with the higher priority to the matching pattern with the lower priority. 4. The model automatic generation apparatus according to claim 3, wherein a collation pattern is selected from the conversion rule definition unit. 前記変換ルール定義部は、前記照合パターン及び前記変換パターンを入力設定する入力
手段を備えることを特徴とする請求項1〜4のいずれか1つに記載のモデル自動生成装置。
The model automatic generation apparatus according to claim 1, wherein the conversion rule definition unit includes an input unit configured to input and set the collation pattern and the conversion pattern.
前記モデル要素解析部は、2つのモデルからそれぞれクラス間の関係をすべて抽出して、モデル要素の一覧であるそれぞれ第1及び第2のモデル要素一覧を作成し、前記第1及び第2のモデル要素一覧を利用して、前記変換ルール定義部に定義された照合パターンにその比較結果が一致する関係のペアをみつけることを特徴とする請求項1〜5のいずれか1つに記載のモデル自動生成装置。   The model element analysis unit extracts all the relationships between classes from the two models, creates first and second model element lists that are lists of model elements, and the first and second models. The model automatic according to any one of claims 1 to 5, wherein an element list is used to find a pair of relationships whose comparison results match the matching pattern defined in the conversion rule definition unit. Generator. 前記統合モデル生成部は、前記統合変換後のクラス間の関係を規定するモデル要素に対して、前記照合パターンに応じて、前記関係のペアの同一性の度合いを表すラベルを付加することを特徴とする請求項1〜6のいずれか1つに記載のモデル自動生成装置。   The integrated model generation unit adds a label indicating a degree of identity of the relationship pair to a model element that defines a relationship between the classes after the integrated conversion according to the matching pattern. The model automatic generation device according to any one of claims 1 to 6. 前記統合モデル生成部は、入力手段と表示手段とを備え、前記統合モデル生成部は、1つの照合パターンに対し、複数の対応する変換パターンが存在するときに、前記モデル自動生成装置の利用者に前記表示手段を介して複数の変換パターンを表示し、前記入力手段を介して1つの変換パターンを選択させることを特徴とする請求項1〜7のいずれか1つに記載のモデル自動生成装置。   The integrated model generation unit includes an input unit and a display unit, and the integrated model generation unit is a user of the automatic model generation device when a plurality of corresponding conversion patterns exist for one matching pattern. The model automatic generation apparatus according to claim 1, wherein a plurality of conversion patterns are displayed on the display unit, and one conversion pattern is selected through the input unit. . 前記変換パターンは、対応する前記照合パターンに応じて、前記関係のペアを構成する一方のクラス間の関係における多重度と、他方のクラス間の関係における多重度とから、前記変換後のクラス間の関係における多重度を定義することを特徴とする請求項1〜8のいずれか1つに記載のモデル自動生成装置。   According to the corresponding matching pattern, the conversion pattern is obtained from the multiplicity in the relationship between one class constituting the pair of relationships and the multiplicity in the relationship between the other classes. The model automatic generation device according to claim 1, wherein the multiplicity in the relationship is defined. コンピュータを、請求項1〜9のいずれか1つに記載された、前記変換ルール定義部、前記モデル要素解析部、及び前記統合モデル生成部として機能させるためのプログラム。   The program for functioning a computer as the said conversion rule definition part, the said model element analysis part, and the said integrated model production | generation part described in any one of Claims 1-9.
JP2006327325A 2006-12-04 2006-12-04 Automatic model generation device and program Pending JP2008140264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006327325A JP2008140264A (en) 2006-12-04 2006-12-04 Automatic model generation device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006327325A JP2008140264A (en) 2006-12-04 2006-12-04 Automatic model generation device and program

Publications (1)

Publication Number Publication Date
JP2008140264A true JP2008140264A (en) 2008-06-19

Family

ID=39601628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006327325A Pending JP2008140264A (en) 2006-12-04 2006-12-04 Automatic model generation device and program

Country Status (1)

Country Link
JP (1) JP2008140264A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07152544A (en) * 1993-09-17 1995-06-16 Toshiba Corp Diagram production support system and its method
JPH1185492A (en) * 1997-09-05 1999-03-30 Mitsubishi Electric Corp Device for supporting preparation of object oriented data model
JP2000276344A (en) * 1999-03-23 2000-10-06 Nec Corp Program generation system using object and its program generating method
JP2001154837A (en) * 1999-11-29 2001-06-08 Hitachi Software Eng Co Ltd Device for supporting object directional development

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07152544A (en) * 1993-09-17 1995-06-16 Toshiba Corp Diagram production support system and its method
JPH1185492A (en) * 1997-09-05 1999-03-30 Mitsubishi Electric Corp Device for supporting preparation of object oriented data model
JP2000276344A (en) * 1999-03-23 2000-10-06 Nec Corp Program generation system using object and its program generating method
JP2001154837A (en) * 1999-11-29 2001-06-08 Hitachi Software Eng Co Ltd Device for supporting object directional development

Similar Documents

Publication Publication Date Title
JP5197688B2 (en) Integrated environment generator
US9304672B2 (en) Representation of an interactive document as a graph of entities
US8959481B2 (en) Determining system level dependencies
KR100672894B1 (en) Apparatus and method for product-line architecture description and verification
US20060129418A1 (en) Method and apparatus for analyzing functionality and test paths of product line using a priority graph
Gómez et al. An approach to the co-creation of models and metamodels in Enterprise Architecture Projects.
Rokis et al. Exploring Low-Code Development: A Comprehensive Literature Review
Fahad et al. Towards mapping certification rules over BIM
Mayer et al. On the applicability of workflow management systems for the preservation of business processes
Turkman et al. Business process model driven automatic software requirements generation
JP4080495B2 (en) Project management apparatus, project management method, and project management program
JP2008140264A (en) Automatic model generation device and program
Mou et al. Visual orchestration and autonomous execution of distributed and heterogeneous computational biology pipelines
Rutle et al. Model-Driven software engineering in Practice: A content analysis software for health reform agreements
Brink et al. Using cross-dependencies during configuration of system families
Aboud et al. Automated architectural component classification using concept lattices
Osis et al. Using Use Cases for Domain Modeling.
AbuJarour et al. Web services and business processes: A round trip
Dimitrieski et al. A comparison of Ecore and GOPPRR through an information system meta modeling approach
CN110599039B (en) Product management method and device, electronic equipment and storage medium
Martinez et al. A No Code XAI Framework for Policy Making
JP5600826B1 (en) Unstructured data processing system, unstructured data processing method and program
Baron et al. Using the ARCADIA/Capella Systems Engineering Method and Tool to Design Manufacturing Systems—Case Study and Industrial Feedback
Mou et al. Implementing computational biology pipelines using VisFlow
JP2001188673A (en) Software reuse assisting device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120117

A977 Report on retrieval

Effective date: 20120131

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A02 Decision of refusal

Effective date: 20120515

Free format text: JAPANESE INTERMEDIATE CODE: A02