JP4180099B2 - Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method - Google Patents
Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method Download PDFInfo
- Publication number
- JP4180099B2 JP4180099B2 JP2007297346A JP2007297346A JP4180099B2 JP 4180099 B2 JP4180099 B2 JP 4180099B2 JP 2007297346 A JP2007297346 A JP 2007297346A JP 2007297346 A JP2007297346 A JP 2007297346A JP 4180099 B2 JP4180099 B2 JP 4180099B2
- Authority
- JP
- Japan
- Prior art keywords
- class
- sequence
- acquired
- instance
- arrow
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明はシーケンス解析プログラムを記録した記録媒体、シーケンス解析装置およびシーケンス解析方法に関し、特に、オブジェクト指向言語で記述されたプログラムのシーケンスを解析するシーケンス解析プログラムを記録した記録媒体、シーケンス解析装置およびシーケンス解析方法に関する。 The present invention relates to a recording medium recording a sequence analysis program, a sequence analysis apparatus, and a sequence analysis method , and in particular, a recording medium recording a sequence analysis program for analyzing a sequence of a program described in an object-oriented language, a sequence analysis apparatus, and a sequence It relates to the analysis method .
オブジェクト指向言語によりシステム開発を行う場合には、OMG(Object Management Group)によって標準化されたUML(Unified Modeling Language)の中のシーケンス図が実装のためのドキュメントとして重視されている。 When system development is performed using an object-oriented language, a sequence diagram in UML (Unified Modeling Language) standardized by OMG (Object Management Group) is regarded as a document for implementation.
このシーケンス図は、所定の機能に関するクラス群のメソッド(手続き型言語の関数に対応するもの)の呼び出し関係を示すものであり、機能単位に作成されることが通例である。 This sequence diagram shows a calling relationship of methods (corresponding to functions in a procedural language) of a class group related to a predetermined function, and is usually created for each function.
ところで、システム全体に対するシーケンス図は、数百枚または数千枚のオーダーになることが多いため、例えば、メソッドのシーケンス図間での一貫性についてチェックすることが困難であるという問題があった。 By the way, since the sequence diagram for the entire system is often in the order of hundreds or thousands, for example, there is a problem that it is difficult to check the consistency between the sequence diagrams of the methods.
そこで、これらのシーケンス図を1枚の図面に集約し、チェックの簡易化を図ることも考えられるが、オブジェクト指向言語ではクラスがアトミック(Atomic)な操作単位であるため、単に集約して1枚の図面にし、クラスのメンバに対する編集を許可すると、クラス単位での編集がかえって困難になるという問題点もあった。 Therefore, it is possible to consolidate these sequence diagrams into a single drawing to simplify the check, but in an object-oriented language, the class is an atomic operation unit, so it is simply aggregated into one drawing. However, if class members are allowed to be edited, class-by-class editing becomes difficult.
本発明はこのような点に鑑みてなされたものであり、オブジェクト指向言語を用いたシステム全体の一覧性を高めることが可能なシーケンス解析プログラムを記録した記録媒体、シーケンス解析装置およびシーケンス解析方法を提供することを目的とする。 The present invention has been made in view of the above points, and provides a recording medium, a sequence analysis apparatus, and a sequence analysis method that record a sequence analysis program capable of enhancing the listability of the entire system using an object-oriented language. The purpose is to provide.
本発明では上記課題を解決するために、オブジェクト指向言語で記述されたプログラムに対し、プログラムの各機能毎にクラスから派生したインスタンスに含まれている呼び出し関係を矢印として表したシーケンス図、及び、クラスとクラスに含まれているメソッドとの対応関係を示すクラス図を記憶したデータベースにアクセス可能なコンピュータを、データベースよりシーケンス図を取得し、取得したシーケンス図に表された各矢印の接続元のクラス及びインスタンス、接続元のクラスが含まれるシーケンスの識別子、及びメソッド名を取得するとともに、矢印の接続先のクラス及びインスタンス、接続先のクラスが含まれるシーケンス図の識別子、及びメソッド名を取得し、取得した各クラスに対応する列と各矢印に対応する行とで構成され、各矢印に対応する行について、矢印の接続元のクラスに対応する欄に取得した接続元のインスタンスの名前、識別子、及びメソッド名を記載するとともに、矢印の接続先のクラスに対応する欄に取得した接続先のインスタンスの名前、識別子、及びメソッド名を記載した行列形式のシーケンス一覧表を生成する変換手段、変換手段が生成したシーケンス一覧表を表示する表示処理手段、データベースよりクラス図を取得し、取得したクラス図に示されたクラスに含まれているメソッドと変換手段が生成したシーケンス一覧表のクラスに対応する列に名前が記載されているメソッドとを比較して一致するか否かを判定し、一致しない場合に、表示処理手段が表示したシーケンス一覧表上にエラー表示を行うチェック手段として機能させることを特徴とするシーケンス解析プログラムを記録した記録媒体が提供される。 In the present invention, in order to solve the above-mentioned problem, a sequence diagram in which a call relationship included in an instance derived from a class for each function of a program is represented as an arrow for a program described in an object-oriented language, and The computer that can access the database that stores the class diagram that shows the correspondence between the class and the methods included in the class, acquires the sequence diagram from the database, and the connection source of each arrow shown in the acquired sequence diagram The class and instance, the identifier of the sequence that includes the connection source class, and the method name are acquired, and the identifier and method name of the sequence diagram that includes the connection destination class and instance of the arrow and the connection destination class are acquired. , Consists of a column corresponding to each acquired class and a row corresponding to each arrow. For each row corresponding to each arrow, the name, identifier, and method name of the acquired connection source instance are described in the column corresponding to the connection source class of the arrow, and the column corresponding to the class to which the arrow is connected The conversion means for generating a matrix-format sequence list in which the name, identifier, and method name of the connection destination instance obtained in the above are generated, the display processing means for displaying the sequence list generated by the conversion means, and the class diagram from the database. Whether the method included in the class shown in the acquired class diagram is compared with the method whose name is listed in the column corresponding to the class in the sequence list generated by the conversion means or it determines, when there is no match, to function as a check means for performing an error display on the sequence list by the display processing means and displayed Recording medium for recording a sequence analysis program, characterized in that there is provided.
ここで、変換手段が、データベースよりシーケンス図を取得し、取得したシーケンス図に表された各矢印の接続元のクラス及びインスタンス、接続元のクラスが含まれるシーケンスの識別子、及びメソッド名を取得するとともに、矢印の接続先のクラス及びインスタンス、接続先のクラスが含まれるシーケンス図の識別子、及びメソッド名を取得し、取得した各クラスに対応する列と各矢印に対応する行とで構成され、各矢印に対応する行について、矢印の接続元のクラスに対応する欄に取得した接続元のインスタンスの名前、識別子、及びメソッド名を記載するとともに、矢印の接続先のクラスに対応する欄に取得した接続先のインスタンスの名前、識別子、及びメソッド名を記載した行列形式のシーケンス一覧表を生成する。表示処理手段が、変換手段が生成したシーケンス一覧表を表示する。チェック手段が、データベースよりクラス図を取得し、取得したクラス図に示されたクラスに含まれているメソッドと変換手段が生成したシーケンス一覧表のクラスに対応する列に名前が記載されているメソッドとを比較して一致するか否かを判定し、一致しない場合に、表示処理手段が表示したシーケンス一覧表上にエラー表示を行う。 Here, the conversion means acquires the sequence diagram from the database, and acquires the class and instance of the connection source of each arrow shown in the acquired sequence diagram, the identifier of the sequence including the class of the connection source, and the method name. In addition, the class and instance of the connection destination of the arrow, the identifier of the sequence diagram including the class of the connection destination, and the method name are acquired, and it is composed of a column corresponding to each acquired class and a row corresponding to each arrow. For the line corresponding to each arrow, enter the name, identifier, and method name of the acquired connection source instance in the field corresponding to the arrow connection source class, and obtain it in the field corresponding to the arrow connection destination class. A matrix-type sequence list describing the name, identifier, and method name of the connected instance is generated. The display processing means displays the sequence list generated by the conversion means. The check means obtains a class diagram from the database, and the methods included in the class shown in the obtained class diagram and the methods whose names are listed in the columns corresponding to the classes in the sequence list generated by the transformation means Are compared to determine whether or not they match, and if they do not match, an error is displayed on the sequence list displayed by the display processing means.
本発明では、オブジェクト指向言語で記述されたプログラムに対し、プログラムの各機能毎にクラスから派生したインスタンスに含まれている呼び出し関係を矢印として表したシーケンス図、及び、クラスとクラスに含まれているメソッドとの対応関係を示すクラス図を記憶したデータベースにアクセス可能なコンピュータを、データベースよりシーケンス図を取得し、取得したシーケンス図に表された各矢印の接続元のクラス及びインスタンス、接続元のクラスが含まれるシーケンスの識別子、及びメソッド名を取得するとともに、矢印の接続先のクラス及びインスタンス、接続先のクラスが含まれるシーケンス図の識別子、及びメソッド名を取得し、取得した各クラスに対応する列と各矢印に対応する行とで構成され、各矢印に対応する行について、矢印の接続元のクラスに対応する欄に取得した接続元のインスタンスの名前、識別子、及びメソッド名を記載するとともに、矢印の接続先のクラスに対応する欄に取得した接続先のインスタンスの名前、識別子、及びメソッド名を記載した行列形式のシーケンス一覧表を生成する変換手段、変換手段が生成したシーケンス一覧表を表示する表示処理手段、データベースよりクラス図を取得し、取得したクラス図に示されたクラスに含まれているメソッドと変換手段が生成したシーケンス一覧表のクラスに対応する列に名前が記載されているメソッドとを比較して一致するか否かを判定し、一致しない場合に、表示処理手段が表示したシーケンス一覧表上にエラー表示を行うチェック手段として機能させるようにしたので、オブジェクト指向言語で記述されたシステムが有するシーケンスの一覧性を向上させることが可能になる。
In the present invention, for a program written in an object-oriented language, a sequence diagram representing an invocation relationship included in an instance derived from a class for each function of the program as an arrow, and included in a class and a class The computer that can access the database that stores the class diagram that shows the correspondence with the existing method, obtains the sequence diagram from the database, the class and instance of the connection source of each arrow shown in the acquired sequence diagram, the connection source Acquires the identifier and method name of the sequence that includes the class, and also acquires the identifier and method name of the sequence diagram that includes the connection destination class and instance, and the connection destination class, and corresponds to each acquired class. Column and a row corresponding to each arrow, corresponding to each arrow In the column corresponding to the connection source class of the arrow, the name, identifier, and method name of the acquired connection source instance are described, and the acquired connection destination instance is displayed in the column corresponding to the connection destination class of the arrow. Conversion means for generating a sequence list in a matrix format describing names, identifiers, and method names, display processing means for displaying the sequence list generated by the conversion means, a class diagram from the database, and the acquired class diagram If the method included in the indicated class is compared with the method whose name is listed in the column corresponding to the class in the sequence list generated by the conversion means to determine whether they match, and if they do not match in, since the function as the check means for performing an error display on the sequence list by the display processing means and displayed, Obuji It is possible to improve the list of sequences with the system described in transfected oriented language.
以下、本発明の実施の形態を図面を参照して説明する。
図1は、本発明の動作原理を説明する原理図である。この図において、本発明に係るシーケンス解析方法を実現するシーケンス解析装置2は、複数のシーケンス図1a〜1dを読み込んで解析し、シーケンス一覧表3を出力する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a principle diagram illustrating the operating principle of the present invention. In this figure, a
シーケンス解析装置2は、クラス名取得手段2a、インスタンス名取得手段2b、メソッド名取得手段2c、呼び出し関係取得手段2d、シーケンス一覧表表示手段2eによって構成されている。
The
ここで、クラス名取得手段2aは、プログラムを構成するクラスのクラス名を取得する。
インスタンス名取得手段2bは、各クラスから派生するインスタンスのインスタンス名を取得する。
Here, the class
The instance
メソッド名取得手段2cは、各インスタンスに含まれているメソッドのメソッド名を取得する。
呼び出し関係取得手段2dは、各メソッドの呼び出し関係を取得する。
The method
The call
シーケンス一覧表表示手段2eは、クラス名取得手段2a、インスタンス名取得手段2b、メソッド名取得手段2cによって取得された情報を表形式で一覧表示し、呼び出し関係取得手段2dによって取得した情報に基づいて、各メソッドの呼び出し関係を表示したシーケンス一覧表を表示する。 The sequence list display means 2e displays a list of information acquired by the class name acquisition means 2a, instance name acquisition means 2b, and method name acquisition means 2c in a table format, and is based on the information acquired by the call relationship acquisition means 2d. Display the sequence list that shows the call relationship of each method.
次に、以上の原理図の動作について説明する。
処理対象のシーケンス図として、クラスA、クラスB、および、クラスCから構成され、クラスAがクラスBのメソッドAを呼び出し、クラスBがクラスCのメソッドBおよびメソッドCを呼び出す構造を有するシーケンス図1aおよびその他のシーケンス図1b〜1dが選択されたとする。
Next, the operation of the above principle diagram will be described.
As a sequence diagram to be processed, a sequence diagram comprising a class A, a class B, and a class C has a structure in which the class A calls the method A of the class B and the class B calls the method B and the method C of the class C Assume that 1a and the other sequence diagrams 1b-1d are selected.
クラス名取得手段2aは、これらのシーケンス図1a〜1dに含まれているクラス名(例えば、クラスA〜クラスC)を取得する。
インスタンス名取得手段2bは、シーケンス図1a〜1dに含まれているインスタンス名(例えば、インスタンスA〜インスタンスB(図示せず))を取得する。
The class
The instance
メソッド名取得手段2cは、シーケンス図1a〜1dに含まれているメソッド名(例えば、メソッドA〜メソッドC)を取得する。
呼び出し関係取得手段2dは、シーケンス図1a〜1dに含まれているメソッドの呼び出し関係(「クラスAがクラスBのメソッドAを呼び出す」等)を取得する。
The method name acquisition means 2c acquires the method name (for example, method A to method C) included in the sequence diagrams 1a to 1d.
The call relationship acquisition means 2d acquires the call relationship of methods included in the sequence diagrams 1a to 1d (such as “class A calls method A of class B”).
シーケンス一覧表表示手段2eは、クラス名取得手段2a、インスタンス名取得手段2b、および、メソッド名取得手段2cによって取得されたクラス名、インスタンス名、および、メソッド名と、呼び出し関係取得手段2dによって取得された呼び出し関係に基づいてシーケンス一覧表3を生成し、表示出力する。
The sequence list display means 2e is obtained by the class name acquisition means 2a, the instance name acquisition means 2b, and the class name, instance name, and method name acquired by the method name acquisition means 2c, and the call relationship acquisition means 2d. The
ここで、シーケンス一覧表3は、シーケンス図1a〜1dに含まれている全てのクラスが列挙されており、各クラスのインスタンスとメソッドとが属性として示されている。また、メソッド同士の呼び出し関係は矢線によって示されている。
Here, in the
例えば、クラスBは、メソッドA(mA)を有しており、このメソッドAはクラスAから呼び出されている。また、クラスCはメソッドB(mB)とメソッドC(mC)とを有しており、これらのメソッドは、クラスBのインスタンスA(iA)から呼び出されている。なお、この図では、シーケンス図1aに対応する部分のみを示しているが、実際にはシーケンス図1b〜1dに対応するクラスに関する内容も表示されている。 For example, class B has method A (mA), and this method A is called from class A. The class C has a method B (mB) and a method C (mC), and these methods are called from an instance A (iA) of the class B. In this figure, only the portion corresponding to the sequence diagram 1a is shown, but the contents related to the classes corresponding to the sequence diagrams 1b to 1d are also actually displayed.
ところで、以上のようにして表示されたシーケンス一覧表3の表示内容は、クラスを単位としての編集(例えば、クラスの移動、複写、削除)のみが許可されるので、例えば、クラスBを異なる位置に移動させることは可能であるが、クラスBのメソッドAのみを移動させることは禁止される。従って、目的に応じて、表示の態様を変化させることが可能になるとともに、クラスを単位とする変更のみを許可することにより、操作の煩雑性(インスタンスとメソッドを個別に移動させる等)を解消することが可能になる。
By the way, the display contents of the
以上に説明したように、本発明によれば、複数のシーケンス図から1枚のシーケンス一覧表を生成するようにしたので、システム全体の一覧性を向上させることが可能になる。
また、表示内容の変更については、クラス単位での変更のみを許可するようにしたので、既述したように操作の煩雑性を解消させることが可能となる。
As described above, according to the present invention, since one sequence list is generated from a plurality of sequence diagrams, the listability of the entire system can be improved.
In addition, regarding the change of the display content, only the change in the class unit is permitted, so that it is possible to eliminate the complexity of the operation as described above.
次に、本発明の実施の形態の構成例について説明する。
図2は、本発明に係るシーケンス解析方法を実現するシーケンス解析装置の構成例を示すブロック図である。
Next, a configuration example of the embodiment of the present invention will be described.
FIG. 2 is a block diagram showing a configuration example of a sequence analysis apparatus that implements the sequence analysis method according to the present invention.
この図に示すように、シーケンス解析装置10は、CPU(Central Processing Unit)10a、ROM(Read Only Memory)10b、RAM(Random Access Memory)10c、HDD(Hard Disk Drive)10d、GB(Graphics Board)10e、I/F(Interface)10f、および、バス10gによって構成されており、その外部には表示装置11と入力装置12とが接続されている。
As shown in this figure, a
ここで、CPU10aは、HDD10dに格納されているプログラムに従って装置の各部を制御するとともに、種々の演算処理を実行する。
ROM10bは、CPU10aが実行する基本的なプログラムやデータを格納している。
Here, the
The
RAM10cは、CPU10aが実行の対象とするプログラムや、演算途中のデータを一時的に格納する。
HDD10dは、CPU10aが実行する各種プログラムや、解析対象となるシーケンス図や、解析結果であるシーケンス一覧表のデータを格納する。
The
The
GB10eは、CPU10aから供給された描画命令に従って描画された画像データを映像信号に変換して出力する。
I/F10fは、入力装置12から供給されたデータの表現形式を、シーケンス解析装置10の内部形式に適合するように変換する。
The GB 10e converts image data drawn in accordance with a drawing command supplied from the
The I /
表示装置11は、例えば、CRT(Cathode Ray Tube)モニタによって構成されており、GB10eから出力された映像信号を表示する。
入力装置12は、例えば、マウスやキーボード等の入力デバイスによって構成されている。
The
The
図3は、図2に示すシーケンス解析装置10のHDD10dに格納されているアプリケーションプログラムが起動された場合に、実現される機能ブロックについて説明する図である。
FIG. 3 is a diagram for explaining functional blocks realized when an application program stored in the
この図において、データベース20は、HDD10dによって構成され、処理の対象となるシーケンス図やクラス図(詳細は後述する)が格納されている。
変換部21は、CPU10aその他によって実現され、データベース20に格納されているシーケンス図から必要な項目を取得し、シーケンス一覧表に変換する処理を実行する。
In this figure, the
The
データベース22は、HDD10dによって構成され、変換部21によって生成されたシーケンス一覧表を格納する。
表示処理部23は、CPU10aその他の機能によって実現され、データベース22に格納されているシーケンス一覧表に対して所定の処理を施した後、表示部26に供給する。
The
The
逆変換部24は、データベース22に格納されているシーケンス一覧表の指定された部分を、シーケンス図に逆変換し、表示処理部23に供給する。
チェック部25は、データベース22に格納されているシーケンス一覧表の内容に瑕疵がないか否かをチェックし、チェック結果を表示処理部23に供給する。
The
The
表示部26は、GB10eおよび表示装置11によって構成されており、表示処理部23から出力された情報を表示出力する。
入力部27は、I/F10fおよび入力装置12によって構成されており、ユーザの操作に応じた情報を表示処理部23に供給する。
The
The
次に、以上の実施の形態の動作について説明する。
いま、図4に示すシーケンス図40〜43と、図5に示すクラス図50〜53がデータベース20に格納されているとする。ここで、シーケンス図は、クラスから派生したインスタンスに含まれているメソッドの呼び出し関係を示した図であり、機能毎に生成される図である。図4に示すシーケンス図40の例では、コントローラクラス40a、商品クラスの鉛筆インスタンス40b、および、在庫クラスのA倉庫インスタンス40cが表示されている。矢線によって示すように、コントローラクラス40aは、鉛筆インスタンス40bの受注メソッドを呼び出している。また、鉛筆インスタンス40bは、A倉庫インスタンス40cのget数量メソッドと、get在庫メソッドとを呼び出している。また、鉛筆インスタンス40bは、鉛筆インスタンス40b自身が有するcalc数量メソッドを呼び出している。なお、各メソッドの左側に表示されている数値は、メソッドの呼び出し関係の階層を示すものであるが、その詳細については後述する。
Next, the operation of the above embodiment will be described.
Assume that the sequence diagrams 40 to 43 shown in FIG. 4 and the class diagrams 50 to 53 shown in FIG. Here, the sequence diagram is a diagram illustrating a calling relationship of methods included in an instance derived from a class, and is a diagram generated for each function. In the example of the sequence diagram 40 shown in FIG. 4, the
図5は、クラスと、クラスに含まれているメソッドとの関係を示すクラス図である。この例は、クラス図50〜53を含んでおり、処理の対象となるクラス図50の内容が例示されている。この例では、コントローラクラス50a、商品クラス50b、および、在庫クラス50cが表示されており、商品クラス50bは、受注メソッドとcalc数量メソッドとを有している。また、在庫クラス50cは、get数量メソッドと、get在庫メソッドとを有している。本例では、クラス図を複数に分けた例を説明しているが、一枚にまとめて表示させてもよい。
FIG. 5 is a class diagram showing the relationship between classes and methods included in the classes. This example includes class diagrams 50 to 53, and the contents of the class diagram 50 to be processed are illustrated. In this example, a controller class 50a, a
このような対象データに対して解析処理を施すために、入力装置12を操作して解析用のアプリケーションプログラムを起動すると、CPU10aはHDD10dから該当するプログラムを読み込んで実行する。その結果、表示装置11には、図6に示すような解析用プログラムの画面60が表示される。
In order to perform analysis processing on such target data, when the application program for analysis is activated by operating the
この表示例では、タイトル「シーケンス解析」の下に、ボタン61〜66が表示され、また、その下には解析対象のデータや解析結果のデータが配置される表示領域67が表示されている。
In this display example,
図7は、図6に示すボタン61〜66が操作された場合に表示されるプルダウンメニューの一例を示す図である。なお、ボタン66については、プルダウンメニューは表示されずにコマンドが直接実行されるので、図7には表示していない。
FIG. 7 is a diagram illustrating an example of a pull-down menu displayed when the
図7に示すように、ボタン61が操作されると、解析対象となるファイルを読み込む際に選択される読み込み61aと、表示領域67に表示されている内容をプリントアウトする際に選択される印刷61bとがメニュー項目として表示される。
As shown in FIG. 7, when the
ボタン62が操作されると、表示領域67に表示されたシーケンス一覧表の所定のクラスを移動する際に選択される移動62a、指定されたクラスを削除する際に選択される削除62b、指定されたクラスを表示又は非表示とする際に選択される表示/非表示62cとがメニュー項目として表示される。
When the
ボタン63が操作されると、読み込まれたシーケンス図をシーケンス一覧表に変換する際に選択される変換63aおよびシーケンス一覧表の一部をシーケンス図に逆変換する際に選択される逆変換63bがメニュー項目として表示される。
When the
ボタン64が操作されると、表示領域67に表示されているシーケンス一覧表にメソッドの呼び出し関係を示す矢線を追加表示する際に選択される矢線64a、類似または同一のメソッドを集約して表示する際に選択されるメソッド集約64b、および、クラスの表示項目を省略または追加する際に選択される詳細/省略64cがメニュー項目として表示される。
When the
ボタン65が操作されると、シーケンス一覧表とクラス図の相互の内容のチェックを行う際に選択される相互チェック65a、シーケンス一覧表の各メソッドに付与されたシーケンス番号の適否をチェックする際に選択されるシーケンス番号65b、入り口のメソッドをチェックする際に選択される入り口65c、および、メソッドのパラメタをチェックする際に選択されるパラメタ65dがメニュー項目として表示される。
When the
次に、図6に示す画面60において、ボタン61が操作され、メニューの項目である読み込み61aが選択された後、図4に示すシーケンス図40〜43が解析対象として選択されたとすると、変換部21はデータベース20からシーケンス図40〜43を読み込む。その結果、画面60の表示領域67には、図6に示すようにシーケンス図40〜43が表示される。
Next, on the
次に、ボタン63が操作され、変換63aが選択されると、変換部21はシーケンス図をシーケンス一覧表に変換する処理を実行する。なお、この処理の一例を図8を参照して説明する。図8に示すフローチャートが開始されると、以下のステップが実行される。
Next, when the
ステップS10:
変換部21は、読み込み61aが選択されて指定されたシーケンス図をデータベース20から読み込む。
Step S10:
The
ステップS11:
変換部21は、ボタン63が操作されて変換63aが選択された場合にはステップS12に進み、それ以外の場合には同様の処理を繰り返す。
Step S11:
The
ステップS12:
変換部21は、シーケンス図から1本の矢線データを取得する。即ち、矢線の接続元と接続先のクラスのデータをデータベース20から取得する。
Step S12:
The
ステップS13:
変換部21は、矢線データの取得に成功した場合、即ち、未処理の矢線データが存在した場合にはステップS14に進み、それ以外の場合には処理対象となる矢線を全て処理し終えたとして処理を終了する。
Step S13:
The
ステップS14:
変換部21は、矢線の接続元の情報を解析する。即ち、変換部21は、矢線の接続元の情報を解析し、接続元クラス、接続元インスタンス、シーケンス図ID、インスタンス名、生成インスタンス、シーケンスNo.、メソッド名、パラメタ、返り値、接続先クラス、接続先インスタンスを取得する。
Step S14:
The
ここで、接続元クラスおよび接続元インスタンスは、矢線の接続元のクラスとインスタンスとを示す。シーケンス図IDは、矢線の接続元と接続先のクラスが含まれているシーケンス図のID(Identification)を示す。インスタンス名は、接続元インスタンスの名前を示し、生成インスタンスは変換部21が自動的に割り当てた識別コードである。シーケンスNo.は、クラスの階層構造を反映して各メソッドに付与されたシリアル番号である。メソッド名はメソッドの名前を示し、パラメタおよび返り値は、メソッドのパラメタ(引数)と返り値を示す。接続先クラスおよび接続先インスタンスは、接続先のクラスとそのインスタンスとを示す。
Here, the connection source class and the connection source instance indicate a connection source class and an instance indicated by an arrow. The sequence diagram ID indicates the ID (Identification) of the sequence diagram including the connection source and connection destination classes of the arrow. The instance name indicates the name of the connection source instance, and the generated instance is an identification code automatically assigned by the
ステップS15:
変換部21は、矢線の接続先の情報を解析する。即ち、変換部21は、矢線の接続先の情報を解析し、接続元クラス、接続元インスタンス、シーケンス図ID、インスタンス名、生成インスタンス、シーケンスNo.、メソッド名、パラメタ、返り値、接続先クラス、接続先インスタンスを取得する。なお、各情報は、前述した場合と同様である。
Step S15:
The
ステップS16:
シーケンス一覧表に対して、取得した矢線の接続元および接続先の情報を書き込む。そして、ステップS12に戻って同様の処理を繰り返す。
Step S16:
Write the connection source and connection destination information of the acquired arrow in the sequence list. And it returns to step S12 and repeats the same process.
以上に示す処理の結果として生成されたシーケンス一覧表は、図9に示すように、画面60の表示領域67に表示される。この表示例では、シーケンス一覧表のうち、コントローラクラス50aに関する部分のみが表示されている。なお、スライダ70またはボタン68,69を操作すると、商品クラス50bおよび在庫クラス50cを表示領域67に表示させることができる。
The sequence list generated as a result of the processing described above is displayed in the
なお、紙面の関係から、全てのクラスに関するシーケンス一覧表を同時に表示することができないので、シーケンス一覧表の各クラスに関する部分の詳細について個別に説明する。 Since the sequence list for all classes cannot be displayed at the same time due to space limitations, the details of the portions for each class in the sequence list will be described individually.
図10は、コントローラクラス50aに関するシーケンス一覧表の一例である。この例では、列の項目として、接続元クラス、接続元インスタンス、シーケンス図ID、インスタンス名、生成インスタンス、シーケンスNo.、メソッド名、パラメタ、返り値、接続先クラス、および、接続先インスタンスが表示されている。また、各行には、図4に示すシーケンス図の各矢線に該当するデータが1つずつ格納される。例えば、図10の例では、図4に示すシーケンス図の受注メソッドに該当するデータが格納されている。具体的には、受注メソッドのシーケンス図IDは、「Patten」であり、生成インスタンスは「Patten01」であり、シーケンス番号は「1」であり、メソッド名は「受注」であり、接続先クラスは「商品」であることが示されている。 FIG. 10 is an example of a sequence list regarding the controller class 50a. In this example, the connection source class, connection source instance, sequence diagram ID, instance name, generation instance, sequence number, etc. , Method name, parameter, return value, connection destination class, and connection destination instance are displayed. Each row stores data corresponding to each arrow in the sequence diagram shown in FIG. For example, in the example of FIG. 10, data corresponding to the order receiving method in the sequence diagram shown in FIG. 4 is stored. Specifically, the sequence diagram ID of the order receiving method is “Patten”, the generated instance is “Patten01”, the sequence number is “1”, the method name is “order received”, and the connection destination class is It is shown that it is a “product”.
図11は、商品クラス50bに関するシーケンス一覧表の一例である。この例において、第1行目の項目は、図10の第1行目に示す受注メソッドに対応する情報であり、接続元クラスとして「コントローラ」が、また、シーケンス図ID、インスタンス名、生成インスタンス、シーケンスNo.、および、メソッド名として、「Patten」、「鉛筆」、「Patten02」、「1」、および、「受注」がそれぞれ格納されている。
FIG. 11 is an example of a sequence list regarding the
従って、図10および図11の第1行目の項目を参照することにより、元のシーケンス図の矢線の接続元と接続先に関する情報を取得することができる。
図12は、在庫クラス50cに関するシーケンス一覧表の一例である。この例では、図11に示すメソッドget数量とget在庫の接続先に関する情報が格納されている。具体的には、メソッドget在庫に対応する情報として、接続元クラス、接続元インスタンス、シーケンス図ID、インスタンス名、生成インスタンス、シーケンスNo.、および、メソッド名のそれぞれについて、「商品」、「鉛筆」、「Patten」、「A倉庫」、「Patten03」、「1.1」、および、「get数量」が格納されている。
Therefore, by referring to the item in the first row of FIGS. 10 and 11, information regarding the connection source and connection destination of the arrow line in the original sequence diagram can be acquired.
FIG. 12 is an example of a sequence list regarding the
以上に説明したように、本実施の形態によれば、複数のシーケンス図から1枚のシーケンス一覧表を生成して表示するようにしたので、システム全体の構造を一瞥の下に参照することが可能になる。 As described above, according to the present embodiment, since one sequence list is generated and displayed from a plurality of sequence diagrams, the structure of the entire system can be referred to at a glance. It becomes possible.
また、シーケンス図をシーケンス一覧表に変換することにより、関係データベースへ格納することが可能になるので、以下に説明するように、関係データベースの機能を活用し、項目の検索や編集を簡易に行うことが可能になる。 In addition, by converting the sequence diagram into a sequence list, it becomes possible to store it in the relational database. As described below, the functions of the relational database are used to easily search and edit items. It becomes possible.
図13は、シーケンス一覧表に含まれている所定の文字列を検索する際の手続きについて説明する図である。文字列を検索する場合には、先ず、ボタン66を操作し、その結果として表示される文字列入力画面(図示せず)から、検索しようとする文字列を入力し、検索を開始する操作を行うと、表示処理部23は、入力部27から入力された文字列を取得し、シーケンス一覧表に含まれている該当する文字列を検索する。そして、該当する文字列が検出された場合には、シーケンス一覧表の該当部分を反転表示する。図13は、検索する文字列として「受注」が入力された場合における検索結果を示している。この例では、メソッド名「受注」が反転表示されており、入力された文字列に該当する項目を即座に見出すことが可能になる。
FIG. 13 is a diagram illustrating a procedure for searching for a predetermined character string included in the sequence list. When searching for a character string, first, the user operates the
次に、図14を参照し、ボタン64が操作された後、メソッド集約64bが選択された場合に実行される処理について説明する。
メソッド集約64bが選択されると、表示処理部23は、シーケンス一覧表に表示されているメソッドのうち、同一または類似の名前を有するものが近接するように並べ替えを行った後、表示部26に供給して表示を更新する。
Next, processing executed when the method aggregation 64b is selected after the
When the method aggregation 64b is selected, the
その結果、商品クラス50bに関するシーケンス一覧表は、図14に示すようにメソッドget数量およびメソッドget在庫が連続するように並べ替えがなされることになる。このように同一または類似するメソッドを近接して配置することで、従来においては、複数のシーケンス図に散在していた同一メソッドの呼び出し方、および、使い方等の一貫性および整合性を容易にチェックすることが可能となる。また、同一または類似するメソッドを近接して配置する他にも、例えば、アルファベット順やあいうえお順に並べ替えることにより、類似するメソッドが近接して表示されるので、メソッド名の誤記等を簡単に見つけることが可能になる。
As a result, the sequence list regarding the
次に、図15を参照し、ボタン64の詳細/省略64cが選択された場合の処理について説明する。
詳細/省略64cが選択されると、表示処理部23は、表示項目を選択するための画面(図示せず)を表示部26に表示させ、表示項目の選択を受ける。具体的には、接続元クラス、接続元インスタンス、シーケンス図ID、インスタンス名、生成インスタンス、シーケンスNo.、メソッド名、パラメタ、返り値、接続先クラス、および、接続先インスタンスのそれぞれについて表示の有無を入力する画面を表示させて、必要な項目の入力を受ける。
Next, with reference to FIG. 15, processing when the
When the detail / omission 64c is selected, the
続いて、表示処理部23は、シーケンス一覧表のうち、先に指定された必要な項目のみを選択して、表示部26に表示させる。例えば、必要な表示項目として、インスタンス名とメソッド名のみが選択された場合には、図15の表示領域67に示す情報が表示される。
Subsequently, the
この例では、各クラスのインスタンス名とメソッド名のみが表示されている。例えば、鉛筆インスタンスは、在庫クラスのインスタンスA倉庫のget数量メソッドを呼び出していることが分かる。又、calc数量メソッドは、商品クラスの鉛筆インスタンスが有するcalc数量自身を呼び出している。 In this example, only the instance name and method name of each class are displayed. For example, it can be seen that the pencil instance is calling the get quantity method of the instance A warehouse of the inventory class. The calc quantity method calls the calc quantity itself of the product class pencil instance.
このように、必要項目以外を画面上から排除することにより、シーケンス一覧表の全体の一覧性を高めることが可能になるとともに、検索速度を向上させることが可能になる。
次に、図15に示す画面60において、ボタン64が操作され、矢線64aが選択された場合の動作について説明する。
In this way, by excluding necessary items from the screen, it is possible to improve the overall listability of the sequence list and improve the search speed.
Next, an operation when the
ボタン64が操作され、矢線64aが選択されると、表示処理部23は、シーケンス一覧表上に現在矢線が表示されていない場合には、各メソッドの呼び出し関係に応じた矢線を表示する。また、矢線が表示状態である場合には、画面上から消去して非表示状態にする。いまの例では、図15に示すように、矢線は非表示状態であるので、表示処理部23は、矢線を表示状態にする。その結果、図16に示すように、矢線が表示されることになる。
When the
このように、矢線を必要に応じて表示または非表示の状態にすることにより、他の情報の視認性を高めたり、あるいは、矢線によるメソッドの呼び出し関係の視認性を高めたりすることを任意に選択することが可能になる。 In this way, by displaying or hiding the arrow line as necessary, it is possible to increase the visibility of other information or to improve the visibility of the method call relationship by the arrow line. It becomes possible to select arbitrarily.
次に、図16において、ボタン62が操作された後、移動62aが選択された場合に動作について説明する。
移動62aが選択されると、任意のクラスを任意の位置に移動させることが可能になる。なお、移動はクラス単位でのみ許可するものとする。例えば、図16において、コントローラクラスが移動の対象として選択(例えば、マウスでクリック)された後、このコントローラクラスを在庫クラスの右側に移動させる操作がなされたとすると、表示処理部23は、シーケンス一覧表上のコントローラクラスが在庫クラスの右側に配置されるように並べ替え処理を行い、並べ替えが終了したデータを表示部26に供給して表示させる。
Next, in FIG. 16, the operation when the movement 62a is selected after the
When the movement 62a is selected, an arbitrary class can be moved to an arbitrary position. Movement is permitted only in class units. For example, in FIG. 16, if a controller class is selected as an object to be moved (for example, clicked with the mouse) and then an operation is performed to move the controller class to the right side of the inventory class, the
その結果、図17の表示領域67に示すように、コントローラクラスが在庫クラスの後に表示されるとともに、矢線の方向が適宜修正されて表示されることになる。
このように、クラスの位置を自由に変更することを可能としたので、目的に応じてクラスを再配置することにより、メソッドの参照関係をより簡易に知ることが可能になる。
As a result, as shown in the
As described above, since the position of the class can be freely changed, it is possible to know the reference relationship of the method more easily by rearranging the class according to the purpose.
なお、以上の例では、クラスを移動させる場合について説明したが、クラスを削除したり、表示または非表示の状態にしたり、あるいは複写する処理を行うことも可能である。例えば、クラスを削除する場合には、呼び出し関係を有する他方のクラスとの関係が消滅するので、その点を考慮して削除する。また、非表示の状態にする場合も同様である。このように、表示されている内容に対してクラス単位で編集を許可することにより、目的に応じて表示の態様を変更し、作業性を向上させることが可能になる。 In the above example, the case of moving a class has been described, but it is also possible to delete a class, display or hide a class, or perform a process of copying. For example, when deleting a class, the relationship with the other class having the calling relationship disappears, so that the point is deleted. The same applies to the non-display state. Thus, by permitting editing of the displayed contents in units of classes, it is possible to change the display mode according to the purpose and improve workability.
次に、任意のクラスが選択された後、ボタン63が操作されて逆変換63bが選択された場合に実行される処理について図18を参照して説明する。このフローチャートが開始されると、以下のステップが実行される。
Next, processing executed when an arbitrary class is selected and then the
ステップS30:
逆変換部24は、表示処理部23を介して入力部27から取得した情報に応じて、指定されたクラスを特定する。例えば、入力部27から、複数のクラスを指定する情報が入力された場合には、逆変換部24は指定された複数のクラスを特定する。
Step S30:
The
ステップS31:
逆変換部24は、指定されたクラスに含まれている、シーケンス図における1本の矢線に対応するデータを取得する。具体的には、矢線の接続元と接続先のクラス、インスタンス、および、メソッド名等を取得する。
Step S31:
The
ステップS32:
逆変換部24は、矢線に対応するデータの取得に成功したか否かを判定し、取得に成功した場合にはステップS33に進み、それ以外の場合には処理を終了する。
Step S32:
The
ステップS33:
逆変換部24は、ステップS31において取得した矢線1本に対応するデータ(接続元および接続先のデータ)から、シーケンス図の矢線データ(ステップS31において取得したデータをクラス毎に分けて配置したデータ)を生成する。
Step S33:
The
ステップS34:
逆変換部24は、シーケンス図の該当する部分に対して、ステップS33で生成した矢線データを書き込み、ステップS31に戻って前述の場合と同様の処理を繰り返す。
Step S34:
The
以上の処理によれば、シーケンス一覧表上において所望のクラス群を指定し、指定されたクラス群に対応するシーケンス図を作成することが可能になるので、必要なクラスのみに着目したシーケンス図を簡易に作成することが可能になる。 According to the above processing, it is possible to specify a desired class group on the sequence list and create a sequence diagram corresponding to the specified class group. It can be created easily.
次に、ボタン65が操作され、相互チェック65aが選択された場合に実行される処理について説明する。
ボタン65が操作され、相互チェック65aが選択されると、チェック部25は、図19に示すフローチャートを実行する。
Next, a process executed when the
When the
ステップS50:
チェック部25は、データベース20から図5に示すクラス図を読み込む。
ステップS51:
チェック部25は、シーケンス一覧表の該当するクラス(ステップS50で読み込んだクラス図に対応するクラス)に含まれているメソッドの一覧表であるメソッド一覧表を作成する。
Step S50:
The
Step S51:
The
ステップS52:
チェック部25は、取得したクラスがシーケンス一覧表の最後の行であるか否かを判定し、最後の行である場合には処理を終了し、それ以外の場合にはステップS53に進む。
Step S52:
The
ステップS53:
チェック部25は、クラス図に含まれているメソッドと、メソッド一覧表に含まれているメソッドとを比較する。
Step S53:
The
ステップS54:
チェック部25は、ステップS53の比較により、両者が一致するか否かを判定し、両者が一致する場合には正常であるとしてステップS50に戻って同様の処理を繰り返し、それ以外の場合にはステップS55に進む。
Step S54:
The
ステップS55:
チェック部25は、シーケンス一覧表上の該当する行全体を反転表示する。
ステップS56:
チェック部25は、クラス図と不一致のメソッドが存在する旨を示すエラーメッセージを表示する。
Step S55:
The
Step S56:
The
ところで、シーケンス図上にあるメソッドはクラス図上のクラスのメソッドとして定義されている必要があるが、以上の処理によれば、シーケンス図上にあるメソッドがクラス図上のメソッドとして定義されているか否かを自動的に判定することが可能となる。 By the way, the method on the sequence diagram needs to be defined as a method of the class on the class diagram, but according to the above processing, is the method on the sequence diagram defined as a method on the class diagram? It is possible to automatically determine whether or not.
本例では、クラス図に含まれるクラスから呼び出されるメソッドと、シーケンス図上のメソッドが一致しているかをチェックしているが、本発明はクラス図とシーケンス図の不一致をチェックすることを目的とするものであるため、図示しないが、クラス図上のクラスとシーケンス図上のクラスとの不一致をチェックするものも本発明に含まれる。 In this example, it is checked whether the method called from the class included in the class diagram matches the method on the sequence diagram, but the present invention aims to check the mismatch between the class diagram and the sequence diagram. Therefore, although not shown in the drawings, the present invention includes a method for checking a mismatch between a class on a class diagram and a class on a sequence diagram.
次に、ボタン65が操作され、シーケンス番号65bが選択された場合に実行される処理について図20を参照して説明する。このフローチャートが開始されると、以下のステップが実行される。
Next, processing executed when the
ステップS70:
チェック部25は、シーケンス一覧表の所定の1行を読み込む。
ステップS71:
チェック部25は、読み込みに成功したか否か、即ち、未処理の行が残っていた場合にはステップS72に進み、それ以外の場合には処理対象が存在しないとして処理を終了する。
Step S70:
The
Step S71:
The
ステップS72:
チェック部25は、読み込んだ行のシーケンス番号が1.であるか否か、即ち、階層が最も上の(入り口の)メソッドであるか否かを判定する。1.である場合にはステップS73に進み、それ以外の場合にはステップS76に進む。
Step S72:
The
ステップS73:
チェック部25は、矢線の接続元の「接続元クラス」と、「接続元インスタンス」のカラムに格納されている情報を取得する。
Step S73:
The
ステップS74:
チェック部25は、これら双方のカラムが空であるか否かを判定し、空である場合には正常であるとしてステップS70に戻って同様の処理を繰り返し、それ以外の場合にはステップS75に進む。
Step S74:
The
ステップS75:
チェック部25は、シーケンス番号が1.であるクラスは、通常は入り口クラスであり、クラスの接続元クラスと接続元インスタンスは空であるのに、何らかの情報が格納されている場合にはエラーであるとして当該行を反転するとともに、エラーが発生した旨を示すメッセージを表示する。
Step S75:
The
ステップS76:
チェック部25は、1行上のシーケンス番号との関係を取得する。
ステップS77:
チェック部25は、1行上のシーケンス番号が1階層上のクラスのものであるか否かを判定し、1階層上のクラスのものである場合にはステップS79に進み、それ以外の場合にはステップS78に進む。ここで、1階層上であるか否かは、シーケンス番号に含まれているドット「.」の数を参照して決定する。即ち、ドットの数が多い程、階層が深いシーケンスだからである。
Step S76:
The
Step S77:
The
ステップS78:
チェック部25は、1行上の接続元クラスおよび接続元インスタンスと、当該行の接続元クラスおよび接続元インスタンスとが一致するか否かを判定し、一致する場合には同一階層のシーケンスとして正常であることから、ステップS70に戻って同様の処理を繰り返し、それ以外の場合にはステップS81に進む。
Step S78:
The
ステップS79:
チェック部25は、1行上の接続先クラスおよび接続先インスタンスと、当該行の接続元クラスおよび接続元インスタンスとが一致するか否かを判定する。
Step S79:
The
ステップS80:
チェック部25は、ステップS79の双方が一致するか否かを判定し、この双方が一致する場合には、1行上が1階層上のシーケンスであり、また、当該行が1階層下のシーケンスである場合に該当するとともに、正常な状態であるとして、ステップS70に戻って同様の処理を繰り返し、それ以外の場合にはステップS81に進む。
Step S80:
The
ステップS81:
チェック部25は、1行上と当該行のシーケンスとが正常でないとして、当該行を反転するとともに、正常でない旨を示すメッセージを表示し、ステップS70に戻って同様の処理を繰り返す。
Step S81:
The
以上の処理によれば、シーケンス番号の付与のしかたが正常であるか否かを自動的にチェックすることが可能になる。
次に、ボタン65が操作され、入り口65cが選択された場合に実行される処理について図21を参照して説明する。このフローチャートが開始されると、以下の処理が実行される。
According to the above processing, it is possible to automatically check whether the sequence number assignment method is normal.
Next, processing executed when the
ステップS100:
チェック部25は、シーケンス一覧表の所定の1行を読み込む。
ステップS101:
チェック部25は、読み込みに成功したか否か、即ち、未処理の行が残っていた場合にはステップS102に進み、それ以外の場合には処理対象が存在しないとして処理を終了する。
Step S100:
The
Step S101:
The
ステップS102:
チェック部25は、読み込んだ行のシーケンス番号が1.であるか否かを判定し、1.である場合にはステップS103に進み、それ以外の場合にはステップS100に戻って同様の処理を繰り返す。
Step S102:
The
ステップS103:
チェック部25は、矢線の接続元の「接続元クラス」と、「接続元インスタンス」のカラムに格納されている情報を取得する。
Step S103:
The
ステップS104:
チェック部25は、これら双方のカラムが空であるか否かを判定し、空である場合にはステップS105に進み、それ以外の場合には処理を終了する。
Step S104:
The
ステップS105:
チェック部25は、シーケンス番号が1.であるクラスは、通常は入り口クラスであり、クラスの接続元クラスと接続元インスタンスは空であるのに、何らかの情報が格納されている場合にはエラーであるとして当該行を反転するとともに、エラーが発生した旨を示すメッセージを表示した後、処理を終了する。
Step S105:
The
以上の処理によれば、入り口メソッドが正常であるか否かのチェックを行うことが可能になる。
次に、ボタン65が操作され、パラメタ65dが選択された場合に実行される処理について図22を参照して説明する。この処理は、シーケンス一覧表に記載されたメソッドのパラメタおよび返り値が正常であるか否かを判定する処理である。このフローチャートが開始されると、以下のステップが実行される。
According to the above processing, it is possible to check whether or not the entrance method is normal.
Next, processing executed when the
ステップS120:
チェック部25は、シーケンス一覧表の所定の1行を読み込む。
ステップS121:
チェック部25は、読み込みに成功したか否かを判定する。即ち、シーケンス一覧表に未処理の行が存在しない場合には処理を終了し、それ以外の場合にはステップS122に進む。
Step S120:
The
Step S121:
The
ステップS122:
チェック部25は、ステップS120で読み込んだ所定の行の接続元のパラメタと返り値とを取得する。
Step S122:
The
ステップS123:
チェック部25は、ステップS120で読み込んだ所定の行の接続先のパラメタと返り値とを取得する。
Step S123:
The
ステップS124:
チェック部25は、接続元と接続先のパラメタおよび返り値の型および個数を比較する。
Step S124:
The
ステップS125:
チェック部25は、ステップS124の比較の結果、両者が一致したか否かを判定し、一致した場合には正常であるとしてステップS120に戻って同様の処理を繰り返し、それ以外の場合にはステップS126に進む。
Step S125:
As a result of the comparison in step S124, the
ステップS126:
チェック部25は、現在の行を反転するとともに、パラメタと返り値が正常でない旨を示すメッセージを表示し、ステップS120に戻って同様の処理を繰り返す。
Step S126:
The
以上の処理によれば、シーケンス一覧表に含まれている接続元と接続先のパラメタが一致しない、エラーを有する行を自動的に検出することが可能になる。
なお、以上の実施の形態においては、シーケンス図からシーケンス一覧表を生成するようにしたが、例えば、ソースファイルからシーケンス一覧表を生成することも可能である。その場合には、ソースファイルを各クラス毎に分解し、各クラスから派生するインスタンスと、各インスタンスに含まれているメソッドを特定し、メソッドの呼び出し関係を、テキスト解析によって解析することにより得ることができる。そして、そのようにして得られた情報に基づいて、上述の場合と同様の処理を施すことにより、メソッド一覧表を生成することができる。
According to the above processing, it is possible to automatically detect a row having an error in which the connection source and connection destination parameters included in the sequence list do not match.
In the above embodiment, the sequence list is generated from the sequence diagram. However, for example, it is also possible to generate the sequence list from the source file. In that case, the source file is decomposed for each class, the instances derived from each class and the methods included in each instance are identified, and the method call relationship is obtained by analyzing the text by text analysis. Can do. Then, based on the information thus obtained, a method list can be generated by performing the same processing as described above.
また、以上に示したシーケンス一覧表の表示は一例であり、このような場合のみに本発明が限定されるものではない。
最後に、上記の処理機能は、コンピュータによって実現することができる。その場合、シーケンス解析装置が有すべき機能の処理内容は、コンピュータで読み取り可能な記録媒体に記録されたプログラムに記述されており、このプログラムをコンピュータで実行することにより、上記処理がコンピュータで実現される。コンピュータで読み取り可能な記録媒体としては、磁気記録装置や半導体メモリ等がある。市場へ流通させる場合には、CD−ROM(Compact Disk Read Only Memory)やフロッピーディスク(登録商標)等の可搬型記録媒体にプログラムを格納して流通させたり、ネットワークを介して接続されたコンピュータの記憶装置に格納しておき、ネットワークを通じて他のコンピュータに転送することもできる。コンピュータで実行する際には、コンピュータ内のハードディスク装置等にプログラムを格納しておき、メインメモリにロードして実行する。
Moreover, the display of the sequence list shown above is an example, and the present invention is not limited only to such a case.
Finally, the above processing functions can be realized by a computer. In this case, the processing contents of the functions that the sequence analysis apparatus should have are described in a program recorded on a computer-readable recording medium, and the above processing is realized by the computer by executing this program on the computer. Is done. Examples of the computer-readable recording medium include a magnetic recording device and a semiconductor memory. In the case of distribution to the market, a program is stored and distributed on a portable recording medium such as a CD-ROM (Compact Disk Read Only Memory) or a floppy disk (registered trademark), or a computer connected via a network. It can also be stored in a storage device and transferred to another computer via a network. When executed by a computer, the program is stored in a hard disk device or the like in the computer, loaded into the main memory and executed.
1a〜1d シーケンス図
2 シーケンス解析装置
2a クラス名取得手段
2b インスタンス名取得手段
2c メソッド名取得手段
2d 呼び出し関係取得手段
2e シーケンス一覧表表示手段
3 シーケンス一覧表
10 シーケンス解析装置
10a CPU
10b ROM
10c RAM
10d HDD
10e GB
10f I/F
10g バス
11 表示装置
12 入力装置
20 データベース
21 変換部
22 データベース
23 表示処理部
24 逆変換部
25 チェック部
26 表示部
27 入力部
DESCRIPTION OF
10b ROM
10c RAM
10d HDD
10e GB
10f I / F
10
Claims (3)
前記データベースより前記シーケンス図を取得し、取得した前記シーケンス図に表された各矢印の接続元のクラス及びインスタンス、接続元のクラスが含まれるシーケンスの識別子、及びメソッド名を取得するとともに、該矢印の接続先のクラス及びインスタンス、接続先のクラスが含まれるシーケンス図の識別子、及びメソッド名を取得し、取得した各クラスに対応する列と各矢印に対応する行とで構成され、各矢印に対応する行について、該矢印の接続元のクラスに対応する欄に取得した接続元のインスタンスの名前、識別子、及びメソッド名を記載するとともに、該矢印の接続先のクラスに対応する欄に取得した接続先のインスタンスの名前、識別子、及びメソッド名を記載した行列形式のシーケンス一覧表を生成する変換手段、
前記変換手段が生成した前記シーケンス一覧表を表示する表示処理手段、
前記データベースより前記クラス図を取得し、取得した前記クラス図に示されたクラスに含まれているメソッドと前記変換手段が生成した前記シーケンス一覧表の該クラスに対応する列に名前が記載されているメソッドとを比較して一致するか否かを判定し、一致しない場合に、前記表示処理手段が表示した前記シーケンス一覧表上にエラー表示を行うチェック手段、
として機能させることを特徴とするシーケンス解析プログラムを記録した記録媒体。 For a program written in an object-oriented language, a sequence diagram showing the calling relationship included in an instance derived from the class for each function of the program as an arrow, and a method included in the class and the class A computer that can access a database that stores a class diagram showing the correspondence between
The sequence diagram is acquired from the database, and the connection source class and instance of each arrow represented in the acquired sequence diagram, the identifier of the sequence including the connection source class, and the method name are acquired, and the arrow The connection destination class and instance, the identifier of the sequence diagram that includes the connection destination class, and the method name are acquired, and it consists of a column corresponding to each acquired class and a row corresponding to each arrow. For the corresponding line, write the name, identifier, and method name of the connection source instance acquired in the column corresponding to the class of the connection source of the arrow, and acquire it in the column corresponding to the class of the connection destination of the arrow A conversion means for generating a matrix-type sequence list in which the name, identifier, and method name of a connection destination instance are described;
Display processing means for displaying the sequence list generated by the conversion means;
The class diagram is acquired from the database, and a name is described in a column corresponding to the class in the sequence list generated by the method included in the class shown in the acquired class diagram and the conversion unit. A check means for displaying an error on the sequence list displayed by the display processing means if they do not match,
A recording medium on which is recorded a sequence analysis program characterized by functioning as
前記データベースより前記シーケンス図を取得し、取得した前記シーケンス図に表された各矢印の接続元のクラス及びインスタンス、接続元のクラスが含まれるシーケンスの識別子、及びメソッド名を取得するとともに、該矢印の接続先のクラス及びインスタンス、接続先のクラスが含まれるシーケンス図の識別子、及びメソッド名を取得し、取得した各クラスに対応する列と各矢印に対応する行とで構成され、各矢印に対応する行について、該矢印の接続元のクラスに対応する欄に取得した接続元のインスタンスの名前、識別子、及びメソッド名を記載するとともに、該矢印の接続先のクラスに対応する欄に取得した接続先のインスタンスの名前、識別子、及びメソッド名を記載した行列形式のシーケンス一覧表を生成する変換手段と、
前記変換手段が生成した前記シーケンス一覧表を表示する表示処理手段と、
前記データベースより前記クラス図を取得し、取得した前記クラス図に示されたクラスに含まれているメソッドと前記変換手段が生成した前記シーケンス一覧表の該クラスに対応する列に名前が記載されているメソッドとを比較して一致するか否かを判定し、一致しない場合に、前記表示処理手段が表示した前記シーケンス一覧表上にエラー表示を行うチェック手段と、
を有することを特徴とするシーケンス解析装置。 For a program written in an object-oriented language, a sequence diagram showing the calling relationship included in an instance derived from the class for each function of the program as an arrow, and a method included in the class and the class A database that stores a class diagram showing the correspondence between
The sequence diagram is acquired from the database, and the connection source class and instance of each arrow represented in the acquired sequence diagram, the identifier of the sequence including the connection source class, and the method name are acquired, and the arrow The connection destination class and instance, the identifier of the sequence diagram that includes the connection destination class, and the method name are acquired, and it consists of a column corresponding to each acquired class and a row corresponding to each arrow. For the corresponding line, write the name, identifier, and method name of the connection source instance acquired in the column corresponding to the class of the connection source of the arrow, and acquire it in the column corresponding to the class of the connection destination of the arrow A conversion means for generating a matrix-type sequence list in which the name, identifier, and method name of a connection destination instance are described;
Display processing means for displaying the sequence list generated by the conversion means;
The class diagram is acquired from the database, and a name is described in a column corresponding to the class in the sequence list generated by the method included in the class shown in the acquired class diagram and the conversion unit. A check means for displaying an error on the sequence list displayed by the display processing means if they do not match,
A sequence analysis apparatus comprising:
前記データベースより前記シーケンス図を取得し、取得した前記シーケンス図に表された各矢印の接続元のクラス及びインスタンス、接続元のクラスが含まれるシーケンスの識別子、及びメソッド名を取得するとともに、該矢印の接続先のクラス及びインスタンス、接続先のクラスが含まれるシーケンス図の識別子、及びメソッド名を取得し、取得した各クラスに対応する列と各矢印に対応する行とで構成され、各矢印に対応する行について、該矢印の接続元のクラスに対応する欄に取得した接続元のインスタンスの名前、識別子、及びメソッド名を記載するとともに、該矢印の接続先のクラスに対応する欄に取得した接続先のインスタンスの名前、識別子、及びメソッド名を記載した行列形式のシーケンス一覧表を生成する変換ステップと、
前記変換手段が生成した前記シーケンス一覧表を表示する表示処理ステップと、
前記データベースより前記クラス図を取得し、取得した前記クラス図に示されたクラスに含まれているメソッドと前記変換手段が生成した前記シーケンス一覧表の該クラスに対応する列に名前が記載されているメソッドとを比較して一致するか否かを判定し、一致しない場合に、前記表示処理手段が表示した前記シーケンス一覧表上にエラー表示を行うチェックステップと、
を実行することを特徴とするシーケンス解析方法。 For a program written in an object-oriented language, a sequence diagram showing the calling relationship included in an instance derived from the class for each function of the program as an arrow, and a method included in the class and the class A computer that can access a database that stores a class diagram showing the correspondence between
The sequence diagram is acquired from the database, and the connection source class and instance of each arrow represented in the acquired sequence diagram, the identifier of the sequence including the connection source class, and the method name are acquired, and the arrow The connection destination class and instance, the identifier of the sequence diagram that includes the connection destination class, and the method name are acquired, and it consists of a column corresponding to each acquired class and a row corresponding to each arrow. For the corresponding line, write the name, identifier, and method name of the connection source instance acquired in the column corresponding to the class of the connection source of the arrow, and acquire it in the column corresponding to the class of the connection destination of the arrow A conversion step for generating a matrix-type sequence list that describes the name, identifier, and method name of the instance to connect to
A display processing step for displaying the sequence list generated by the conversion means;
The class diagram is acquired from the database, and a name is described in a column corresponding to the class in the sequence list generated by the method included in the class shown in the acquired class diagram and the conversion unit. A check step of displaying an error on the sequence list displayed by the display processing means when the method is compared to determine whether the method matches,
The sequence analysis method characterized by performing this.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007297346A JP4180099B2 (en) | 2007-11-15 | 2007-11-15 | Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007297346A JP4180099B2 (en) | 2007-11-15 | 2007-11-15 | Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002548582A Division JP4588295B2 (en) | 2000-12-08 | 2000-12-08 | Sequence analysis method and sequence analysis apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008090857A JP2008090857A (en) | 2008-04-17 |
JP4180099B2 true JP4180099B2 (en) | 2008-11-12 |
Family
ID=39374872
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007297346A Expired - Fee Related JP4180099B2 (en) | 2007-11-15 | 2007-11-15 | Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4180099B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5948926B2 (en) * | 2012-02-09 | 2016-07-06 | 富士電機株式会社 | Object-oriented program generator, program |
-
2007
- 2007-11-15 JP JP2007297346A patent/JP4180099B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008090857A (en) | 2008-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4588295B2 (en) | Sequence analysis method and sequence analysis apparatus | |
CN111602114B (en) | System and method for providing instant messaging channels within an integrated development environment | |
US8909597B2 (en) | Document-based workflows | |
US11513793B2 (en) | Systems and methods for providing an instant communication channel within integrated development environments | |
KR101312848B1 (en) | Browse mode designer | |
US7840895B2 (en) | System and method for data manipulation | |
US20050060653A1 (en) | Object operation apparatus, object operation method and object operation program | |
US20210263833A1 (en) | Code Generation Platform with Debugger | |
US8548967B1 (en) | System for visual query and manipulation of configuration management records | |
CN102067117B (en) | Method for displaying and operating table | |
JP2004348310A (en) | Review support apparatus, method, and program | |
US6999966B2 (en) | Content management system and methodology for implementing a complex object using nested/recursive structures | |
JPH11265368A (en) | Working procedure management system | |
JP4180099B2 (en) | Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method | |
US7936356B2 (en) | Information processing method for information registration, and information processing method for information retrieval | |
JPH05313969A (en) | File list display method | |
JP2001134424A (en) | Method and device for preparing system parameter and computer readable storage medium recording system parameter preparation program and computer readable storage medium storing system parameter preparation data | |
JP3424558B2 (en) | Object management method | |
JP4805491B2 (en) | Dictionary management program and computer system | |
US20240036890A1 (en) | System and method of a modular framework for configuration and reuse of web components | |
CN117453713A (en) | SQL sentence generation method, device and storage medium for multi-type database | |
US20040172414A1 (en) | CAD generation management system and computer-readable storage medium | |
US20070206026A1 (en) | Computer readable recording medium recorded with graphics editing program, and graphics editing apparatus | |
CN111427882A (en) | Data editing method and system, data processing device and storage medium | |
JPH1195992A (en) | Data preparation supporting device, object-oriented analytic design supporting device and data managing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080507 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080707 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080826 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080826 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120905 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130905 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |