JP6301803B2 - Data flow diagram generator - Google Patents
Data flow diagram generator Download PDFInfo
- Publication number
- JP6301803B2 JP6301803B2 JP2014208413A JP2014208413A JP6301803B2 JP 6301803 B2 JP6301803 B2 JP 6301803B2 JP 2014208413 A JP2014208413 A JP 2014208413A JP 2014208413 A JP2014208413 A JP 2014208413A JP 6301803 B2 JP6301803 B2 JP 6301803B2
- Authority
- JP
- Japan
- Prior art keywords
- data flow
- list
- data
- flow list
- record
- 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.)
- Active
Links
Images
Description
本明細書に記載の実施の形態は、データフロー図生成装置に関する。 Embodiments described herein relate to a data flow diagram generation apparatus.
既存のソフトウェアを活用して新たにソフトウェア開発を行う際には、その既存のソフトウェアの全体像の理解が重要で、そのためにはデータフロー図を用いると効果的である。なぜならば、データフロー図は、どのデータからどのデータが導かれるかその関係を直感的に表現した図であり、データの関係がわかると、ソフトにどんな機能が含まれているか予測でき、そして、どんな機能が含まれているかの予測がつけば、おおよそどんな動きをするソフトなのかも自ずとわかってくるためである。 When developing new software using existing software, it is important to understand the overall image of the existing software. For this purpose, it is effective to use a data flow diagram. This is because the data flow diagram is an intuitive representation of which data is derived from which data. When the data relationship is known, the software can predict what functions are included, and This is because if you predict what functions will be included, you will naturally know what kind of movement the software will perform.
但し、データフロー図は、その図が書かれてあったとしても、ソースコードの修正に追随できずに古い情報になってしまっていることが多い。結局、ソースコードを読解して手作業で新たなデータフロー図を生成せざるを得ないが、その生成には莫大な時間がかかる。そこで、ソフトウェアの全体像の理解が容易なデータフロー図を短時間で生成する技術が提案されている。 However, even if the data flow diagram is written, the data flow diagram is often out of date without being able to follow the correction of the source code. In the end, you have to read the source code and manually generate a new data flow diagram, but that generation takes a lot of time. Therefore, a technique for generating a data flow diagram that allows easy understanding of the entire image of software in a short time has been proposed.
しかし、従来のデータフロー図生成技術は、その抽出したデータフロー図が理解しにくいという問題点があった。 However, the conventional data flow diagram generation technique has a problem that the extracted data flow diagram is difficult to understand.
その理由の一つとして、単純に可視化しただけでは規模が大きく複雑で読めない点がある。ソースコード上の変数、演算の関係を忠実に可視化すると、規模が膨大で複雑になり、人が見て理解できる範囲を超えてしまうのである。 One of the reasons is that simply visualizing is large and complex and cannot be read. If the relationship between the variables and operations in the source code is visualized faithfully, the scale becomes enormous and complicated, exceeding the range that humans can see and understand.
理解し難い二つ目の理由は、データフロー図の規模を小さくするために、設計で決めた括りを利用するからである。可視化する際に、表示する最小単位を丸めて、データフロー図の規模を押さえる技術がある。その丸める単位に関数やモジュールといった設計で決める単位を利用している。 The second reason that is difficult to understand is that the design-determined binding is used to reduce the scale of the data flow diagram. There is a technique for reducing the scale of the data flow diagram by rounding the minimum unit to be displayed at the time of visualization. A unit determined by design such as a function or a module is used as the rounding unit.
しかし、設計で決める括りと、本来的な機能の括りは一致しないことが多い。設計では、保守性や拡張性なども考慮して機能を括るため、本来的な機能のくくりとは異なる。
本発明の目的は、ソースコードを入力として、理解が容易なデータフロー図を短時間で抽出する技術を提供することにある。
However, it is often the case that the binding determined by the design does not match the intrinsic function. In design, the functions are integrated in consideration of maintainability, extensibility, and the like, which is different from the original function.
An object of the present invention is to provide a technique for extracting a data flow diagram that is easy to understand in a short time by using source code as input.
本発明の実施の形態はデータフロー図生成装置として提案される。このデータフロー図生成装置は、第1の手段と、第2の手段とを有する。 The embodiment of the present invention is proposed as a data flow diagram generation apparatus. This data flow diagram generating device has first means and second means.
第1の手段は、ソースコードに含まれる命令文であって、代入、分岐、繰り返しのいずれかに該当する命令文に相当する機能を特定する第1情報と、当該機能への入力となる変数を示す第2情報と、当該機能において、分岐又は繰り返しが存在する場合、当該分岐又は繰り返しの条件になっている変数を示す第3情報と、当該機能の出力となる変数を示す第4情報を一つのレコード中に有するデータである第1のデータフローリストを生成し、その第1のデータフローリストにおける構造同値の変数同士及び機能同士を統合するように当該第1のデータフローリストを書き換えて第2のデータフローリストを出力する。 The first means is a command statement included in the source code, and includes first information for specifying a function corresponding to a command statement corresponding to any of assignment, branching, and repetition, and a variable serving as an input to the function If there is a branch or repetition in the function, third information indicating a variable that is a condition for the branch or repetition, and fourth information indicating a variable that is an output of the function A first data flow list, which is data included in one record, is generated, and the first data flow list is rewritten so that the structurally equivalent variables and functions in the first data flow list are integrated. A second data flow list is output.
第2の手段は、前記第2のデータフローリストを受け取り、当該第2のデータフローリストから、データのみの関係を取り出したリストであるデータ関係リストを生成し、当該データ関係リストを元に、当該データ関係リストにおける関係が密なデータ同士をまとめる処理であるクラスタリングを実行し、当該クラスタリングの結果を元に当該第2のデータフローリストを書き換えて第3のデータフローリストを出力する。 The second means receives the second data flow list, generates a data relation list that is a list obtained by extracting a data-only relation from the second data flow list, and based on the data relation list, Clustering, which is a process of collecting data having a close relationship in the data relation list, is executed, and the second data flow list is rewritten based on the result of the clustering to output a third data flow list.
以下、図面を参照して本発明の実施の形態にかかるデータフロー図生成装置を説明する。
[0.用語の定義]
本明細書中で使用する用語の定義を述べる。
[0.1.データフロー図]
「データフロー図」とは、どのデータから、どんな演算(=機能)を経て、どのデータが生成されるかの関係を有向グラフで示したものをいう。データフロー図において、矢印の元から先の方向にデータが流れることを意味する。また、データフロー図において、データとデータの間には、必ず機能が介在する。データ同士が直接接続される関係はありえない。
A data flow diagram generating apparatus according to an embodiment of the present invention will be described below with reference to the drawings.
[0. Definition of terms]
Definitions of terms used in this specification will be described.
[0.1. Data flow diagram]
The “data flow diagram” refers to a directed graph showing the relationship of which data is generated from what data and what operation (= function) is generated. In the data flow diagram, this means that data flows in the direction from the origin of the arrow. In the data flow diagram, functions always exist between data. There can be no direct connection between data.
データフロー図の例を図48に示す。この図48に示すデータフロー図では、データAとデータBを入力として機能Aによる演算を経てデータCが出力されるという関係を示している。 An example of a data flow diagram is shown in FIG. The data flow diagram shown in FIG. 48 shows a relationship in which data A and data B are input and data C is output through calculation by function A.
[0.2.演算ブロック]
「演算ブロック」とは、ソースコードに含まれる以下の固まりをいう。
(1)分岐
「分岐」とは、分岐の条件式と、その条件成立/不成立時に実行される代入文のセットをいう。
例:if(varA > varB){ varA = varC;} else{ varC = varA; }
[0.2. Calculation block]
The “arithmetic block” means the following block included in the source code.
(1) Branch A “branch” is a set of conditional expressions for a branch and an assignment statement that is executed when the condition is met.
Example: if (varA> varB) {varA = varC;} else {varC = varA;}
(2)繰り返し
「繰り返し」とは、繰り返しの条件式と、繰り返し実行される代入文のセットをいう。
例:for(int i=0;i<10;i++){ varA = varA+1;}
(2) Repetition “Repetition” refers to a set of conditional expressions and assignment statements that are repeatedly executed.
Example: for (int i = 0; i <10; i ++) {varA = varA + 1;}
(3)関数呼び出し
「関数呼び出し」とは、関数の呼び出しと、(もし関数の戻り値を格納するのであれば)その代入文のセットをいう。
例:varA = funcA();
(3) Function call “Function call” refers to a function call and a set of assignment statements (if the return value of the function is stored).
Example: varA = funcA ();
(4)単純代入
「単純代入」とは、上記(1)から(4)のいずれにも含まれない代入文のことをいう。
例:varA = varB;
(4) Simple assignment “Simple assignment” refers to an assignment statement that is not included in any of (1) to (4) above.
Example: varA = varB;
[0.3.エントリ関数]
「エントリ関数」とは、プログラムの実行開始時に最初に呼び出しされる関数をいう。例えばC言語ではmainという名前の関数がエントリ関数に相当する。
[0.3. Entry function]
The “entry function” is a function that is called first when the execution of the program is started. For example, in C language, the function named main corresponds to the entry function.
[0.4.スコープ]
「スコープ」とは、変数の名前の有効範囲をいい、ローカル又はグローバルのいずれかである。本明細書では、ローカルとは、当該変数を含む関数の中でのみ有効なものを指し、グローバルとは、当該変数を含む関数の外でも有効なものとする。例えば、スコープがローカルな変数varAがあり、それが関数func1とfunc2の中に登場したとしても、func1でのvarAとfunc2でのvarAは別の変数を指すということを意味する。一方で、スコープがグローバルな変数varBがあり、それが関数func1とfunc2の中に登場したとすると、func1でのvarBとfunc2でのvarBは同じ変数を指すということを意味する。
[0.4. scope]
“Scope” refers to the scope of the name of a variable, either local or global. In this specification, “local” refers to a function that is valid only in a function including the variable, and global refers to a function that is valid outside the function including the variable. For example, even if there is a variable varA whose scope is local and it appears in the functions func1 and func2, it means that varA in func1 and varA in func2 point to different variables. On the other hand, if there is a variable varB whose scope is global and it appears in the functions func1 and func2, it means that varB in func1 and varB in func2 point to the same variable.
[0.5.クラスタリング]
「クラスタリング」とは、データの集まりをデータ間の類似度(あるい. は非類似度)に従って、いつかのグループに. 分けることをいう。クラスタリング手法には、最短距離法などの階層的手法 (hierarchical) と,k-means法などの分割最適化手法 (partitioning-optimization)がある。本実施の形態で用いるクラスタリング手法は、Louvain法であるが、本実施の形態で使用可能なクラスタリング手法がこれに限定される趣旨ではない。
[0.5. Clustering]
“Clustering” refers to dividing a collection of data into groups according to the degree of similarity (or dissimilarity) between the data. Clustering methods include a hierarchical method such as the shortest distance method and a partitioning-optimization method such as the k-means method. The clustering method used in the present embodiment is the Louvain method, but the clustering method that can be used in the present embodiment is not limited to this.
[1.実施の形態]
[1.1.構成例]
本発明の実施の形態の一つは、データフロー図生成装置として提案される。このデータフロー図生成装置は、ソースコードからデータフロー図を生成する装置である。
[1. Embodiment]
[1.1. Configuration example]
One embodiment of the present invention is proposed as a data flow diagram generation device. This data flow diagram generation device is a device that generates a data flow diagram from source code.
データフロー図生成装置1は、コンピュータ、ワークステーション、サーバなどの情報処理装置であって、この情報処理装置は、演算処理装置(CPU)、主メモリ(RAM)、読み出し専用メモリ(ROM)、入出力装置(I/O)、及び必要な場合にはハードディスク装置等の外部記憶装置を具備している装置である。
The data flow
本発明の実施の形態にかかるデータフロー図生成装置1の構成例について説明する。図1は、本実施の形態にかかるデータフロー図生成装置1の構成例を示す機能ブロック図である。なお、機能ブロック図中に示す構成要素は、構成要素の機能を機能ごとにまとめてブロックとして捉えたものであり、データフロー図生成装置1が各構成要素に対応する基板、装置、回路、部品などの物理的構成要素を備えていなければならないことを意味するわけではない。また、「接続」とは、データ、情報、命令などの送信及び/又は受信、受け取り、受け渡しなどが可能な状態になっていることをいい、互いに配線で連結されているような物理的な接続に限られる意味ではない。本明細書中の他の構成要素の機能ブロック図の説明についても同様である。
A configuration example of the data flow
本実施の形態にかかるデータフロー図生成装置1は、データフローリスト生成部10と、データフローリスト抽象化部20と、データフローリスト図式化部30を有する。なお、データフローリスト生成部10は本実施の形態の第1の手段に相当し、データフローリスト抽象化部20は本実施の形態の第2の手段に相当する。
The data flow
データフローリスト生成部10はデータフローリスト抽象化部20に接続されている。データフローリスト抽象化部20は、データフローリスト図式化部30に接続されている。
The data flow
[1.1.1.データフローリスト生成部]
データフローリスト生成部10は、ソースコード100及びパラメータ200を読み取り、ソースコード100から関数を機能とみなし、当該機能を特定する情報と、当該機能への入力となる変数を示す情報と、当該機能において、分岐/繰り返しが存在する場合、当該分岐/繰り返しの条件になっている変数を示す情報とを一つのレコード中に有するデータであるデータフローリストを生成し、そのデータフローリストにおける構造同値の範囲の有無を判定し、構造同値の範囲同士を統合するように当該データフローリストを書き換える機能を有する。パラメータ200は、全体のデータフローから構造同値な部分フローを見つけるのは一般にNP困難な問題なので、構造同値の探索範囲をパラメータで限定することで演算量を減らすために用いられるデータである。なお、「変数」は、単一の変数のみの場合だけでなく複数の変数からなる集合を含み、以下の記述においても同様である。
[1.1.1. Data flow list generator]
The data flow
[1.1.2.データフローリスト抽象化部]
データフローリスト抽象化部20は、データフローリスト生成部10からデータフローリストを受信し、当該データフローリストから、データのみの関係を取り出したリストであるデータ関係リストを生成し、当該データ関係リストを元に、当該データ関係リストにおける関係が密なデータ同士をまとめる処理であるクラスタリングを実行し、当該クラスタリングの結果を元に当該データフローリストを書き換える機能を有する。
[1.1.2. Data flow list abstraction section]
The data flow
[1.1.3.データフローリスト図式化部]
データフローリスト図式化部30は、データフローリスト抽象化部20から出力された、クラスタリングの結果を元に書き換えられたデータフローリストを受信し、当該データフローリストから、所定の図式化規則に従って、データフロー図を生成する機能を有する。
[1.2.データフロー図生成装置の動作例]
[1.1.3. Data flow list schematization section]
The data flow
[1.2. Operation example of data flow diagram generation device]
本実施の形態にかかるデータフロー図生成装置1の動作を説明する。図2は、データフロー図生成装置1が実行する処理であるデータフロー図生成処理の一例を示すフローチャートである。
The operation of the data flow
データフロー図生成処理において、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリスト生成処理を実行する(S10)。データフローリスト生成処理は、入力データであるソースコード100を取得し、当該ソースコード100に含まれる関数それぞれの演算ブロックを生成し、各演算ブロックから、関数に含まれる命令文を機能とみなし、当該機能を特定する情報(機能のIDと呼ぶ)と、当該機能への入力となる変数を示す情報(値入力と呼ぶ)と、当該機能において、分岐/繰り返しが存在する場合、当該分岐/繰り返しの条件になっている変数を示す情報(条件入力と呼ぶ)とを一つのレコード中に有するデータであるデータフローリストを生成し、そのデータフローリストにおける構造同値の範囲の有無を判定し、当該構造同値の範囲同士を統合するように当該データフローリストを書き換える処理であるデータフローリスト生成処理を実行する。
In the data flow diagram generation process, the data flow
上記ステップS10に続いて、データフロー図生成装置1、より詳しくはデータフローリスト抽象化部20は、データフローリスト生成部10からデータフローリストを受信し、当該データフローリストから、データのみの関係を取り出したリストであるデータ関係リストを生成し、当該データ関係リストを元に、当該データ関係リストにおける関係が密なデータ同士をまとめる処理であるクラスタリングを実行し、当該クラスタリングの結果を元に当該データフローリストを書き換える処理であるデータフローリスト抽象化処理を実行する(S20)。
Subsequent to step S10, the data flow
上記ステップS20に続いて、データフロー図生成装置1、より詳しくはデータフローリスト図式化部30は、データフローリスト抽象化処理実行後のデータフローリストを受信し、当該データフローリストから、所定の図式化規則に従って、データフロー図を生成する処理であるデータフローリスト図式化処理を実行する(S30)。
以上でデータフロー図生成処理が終了する。
Subsequent to step S20, the data flow
This completes the data flow diagram generation process.
[1.2.1.データフローリスト生成処理の例]
上記データフローリスト生成処理(S10参照)を詳述する。図3はデータフローリスト生成処理の例を示したフローチャートである。以下、図3を参照しながらデータフローリスト生成処理を説明する。
[1.2.1. Example of data flow list generation process]
The data flow list generation process (see S10) will be described in detail. FIG. 3 is a flowchart showing an example of data flow list generation processing. The data flow list generation process will be described below with reference to FIG.
データフローリスト生成処理において、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、入力されたソースコード100を読み込み、このソースコードを構文解析し、当該ソースコードに含まれる各関数について、演算ブロックと変数リストを生成し、これらを記憶する(S101)。
In the data flow list generation process, the data flow
図4に、データフロー図生成装置1に入力されるソースコード100の例を示す。ここの例のソースコード100は、3つの関数、main、func1、func2を含んでいる。
FIG. 4 shows an example of the
図5に、図4に示すソースコード100から生成される演算ブロックのデータ構成例を示す。データフローリスト生成部10は、3つの関数、main、func1、func2を含むソースコード100から3つの演算ブロック、関数mainに対応する演算ブロック501_1,関数func1に対応する演算ブロック501_2、関数func2に対応する演算ブロック501_3を生成する。なお、演算ブロックを他の演算ブロックと区別しない場合には、単に「演算ブロック501」と呼ぶ。
FIG. 5 shows a data configuration example of an operation block generated from the
演算ブロック501は、対応する関数の命令文ごとに1のレコードを有するデータであって、各レコードは、当該演算ブロックに対応する関数を示す情報を格納するフィールド502と、当該レコードに対応する命令文の演算ブロック種別を示す情報を格納するフィールド503と、当該レコードに対応する命令文の内容を示す情報を格納するフィールド504とを有する。なお、本実施の形態では、演算ブロック種別は、分岐、繰り返し、関数呼び出し、単純代入のいずれかである。
The
なお、本明細書中、特に断りのない限り、図面に示すデータ中のレコードを特定する場合に、図中の最上行のレコードから順番に、第1のレコード、第2のレコード、第3のレコードのように呼ぶ。 In the present specification, unless otherwise specified, when a record in the data shown in the drawing is specified, the first record, the second record, the third record, in order from the record in the top row in the drawing. Call like a record.
変数リストは、対応する関数に含まれるごとに一つのレコードを有し、各レコードは、該当する変数の変数名を示す情報を格納するフィールド602と、当該変数のスコープを示す情報を格納するフィールド603を有するデータである。図6に、図4に示したソースコード100から生成される変数リストのデータ構成例を示す。変数リスト601_1は、関数mainに対応する変数リストである。変数リスト601_2は、関数func1に対応する変数リストである。変数リスト601_3は、関数func2に対応する変数リストである。
The variable list has one record for each included in the corresponding function, and each record has a
図3に戻りデータフローリスト生成処理の説明を続ける。ソースコード100を読み込んだデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ソースコード100中のエントリ関数に対応する演算ブロック501_1の中に、演算ブロック種別を示す情報が「関数呼び出し」であるレコードであるか否かを判定する(S102)。ステップS102において当該レコードにおける演算ブロック種別を示す情報が「関数呼び出し」であると判定した場合(S102、Yes)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、当該レコードを展開する(S103)。レコードを展開するとは、関数の引数と戻り値を呼び出し元と先でつなげ、変数の名前の重複を回避した上で、呼び出し元に、呼び出し先の内容を展開する。言い換えると、当該レコードを当該レコードの内容を示すフィールド504に記述されている、呼び出しされる関数(呼び出し先関数という)の演算ブロック501_1に含まれる各レコードに置き換え、且つ、置き換えたレコードのフィールド504以下の手法で書き換える。
Returning to FIG. 3, the description of the data flow list generation process will be continued. The data flow
(1)引数のつなげかた:引数の単純代入文の右辺を、呼び出し元が渡している引数の変数名で置き換える。
(2)戻り値のつなげかた:戻り値の単純代入文の左辺を、呼び出し元が格納している引数の変数名で置き換える。
(3)スコープがローカルである変数と同じ変数が呼び出し元に既に存在していた場合は、変数名の末尾に任意の識別子を付加して名前の重複を回避する。
なお、上記は一般にインライン展開と呼ばれる手法であるが、当該手法に本実施の形態が限定される趣旨ではない。
(1) How to connect arguments: Replace the right side of the simple assignment statement of the argument with the variable name of the argument passed by the caller.
(2) Connecting return values: Replace the left side of the simple assignment statement of the return value with the variable name of the argument stored by the caller.
(3) If the same variable as the variable whose scope is local already exists in the caller, an arbitrary identifier is added to the end of the variable name to avoid duplication of the name.
The above is a technique generally called inline expansion, but the present embodiment is not limited to this technique.
ステップS103の実行後、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS102に戻り、エントリ関数に対応する演算ブロックの次のレコードについて同様の判定を行う。
After execution of step S103, the data flow
図7に、図5に示した演算ブロック501_1、501_2、501_3から生成された展開後のエントリ関数の演算ブロックのデータ構成例を示す。展開後のエントリ関数の演算ブロック501_1_Aにおいて、エントリ関数である関数mainに対応する演算ブロック501_1の第1のレコードを、当該レコードのフィールド504に記述された呼び出し先関数func1に対応する演算ブロック501_2の3つのレコードに置き換え(但し、関数名を示すフィールド502は元の演算ブロック501_1の内容のまま)、同じく第2のレコードを、当該レコードのフィールド503に記述された呼び出し先関数func2に対応する演算ブロック501_2の3つのレコードに置き換わる(但し、関数名を示すフィールド502は元の演算ブロック501_1の内容のまま)。
FIG. 7 illustrates a data configuration example of the expanded entry function calculation block generated from the calculation blocks 501_1, 501_2, and 501_3 illustrated in FIG. In the operation block 501_1_A of the expanded entry function, the first record of the operation block 501_1 corresponding to the function main that is the entry function is stored in the operation block 501_2 corresponding to the callee function func1 described in the
また演算ブロック501_1_Aのフィールド504は、演算ブロック501_2における引数の単純代入の右辺が、演算ブロック501_1の第1レコードのフィールド504に記述されている当該引数の変数名に置き換えられ、同様に、演算ブロック501_2における戻り値の単純代入の左辺が、演算ブロック501_1の第1レコードのフィールド504に記述されている当該引数の変数名に置き換える。
In the
演算ブロック501_3に記述された引数、戻り値も、同様に演算ブロック501_1_Aにおいて、演算ブロック501_1の第2レコード、フィールド504に記述された変数名に書き換えられる。
Similarly, the argument and return value described in the calculation block 501_3 are also rewritten to the variable name described in the second record and
ステップS102に戻り、データフローリスト生成処理の説明を続ける。ステップS102において、判定の対象となるレコードの演算ブロック種別を示す情報が「関数呼び出し」でないと判定した場合(S102、No)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、エントリ関数の演算ブロック501_1_Aからデータフローリストを生成する(S104)。
Returning to step S102, the description of the data flow list generation process will be continued. In step S102, when it is determined that the information indicating the calculation block type of the record to be determined is not “function call” (No in S102), the data flow
データフローリストは、エントリ関数の演算ブロック501の各レコードに対応するレコードを有するデータである。データフローリストのレコードは、エントリ関数の演算ブロック501のレコードそれぞれをデータフロー図における「機能」とみなし、各機能への入力となる変数、出力となる変数を記述する。
The data flow list is data having a record corresponding to each record of the
図8にデータフローリストのデータ構成例を示す。データフローリスト800は、レコード801を有し、レコード801のそれぞれは、当該レコードに相当する「機能」を特定する情報を格納するフィールド802、当該機能への入力となる変数を示す情報を格納するフィールド803、当該機能における条件入力を示す情報を格納するフィールド804、当該機能が出力する変数を示す情報を格納するフィールド805を有する。図8に示す演算ブロック501_10は、同じく図8に示したデータフローリスト800の生成の元となるレコードを有する演算ブロックである。なお、データフローリスト800は本実施の形態の第1のデータフローリストに相当する。
FIG. 8 shows a data configuration example of the data flow list. The
また、図8に示したデータフローリスト800のレコードは、データフロー図として示すことが可能である。図8のデータフローリストに対応するデータフロー図を図9に示す。
Further, the records of the
[単純代入のデータフローリスト生成規則]
演算ブロックのレコードであって、その演算ブロック種別が単純代入である場合、データフローリスト生成部10は、データフローリストのレコードを以下の規則に従って生成する。
第1のフィールド802(「機能のID」列)には、他と重複しない任意の数値を格納する。
[Simple assignment data flow list generation rules]
If the calculation block record is a simple substitution, the data flow
The first field 802 (“function ID” column) stores an arbitrary numerical value that does not overlap with the others.
第2のフィールド803(「値入力」列)には、元の演算ブロック501のレコードのフィールド504に記述されている命令文の代入の右辺に現れる変数名を格納する。
第3のフィールド804(「条件入力」列)には、何も格納しない(空欄とする)
In the second field 803 (“value input” column), variable names appearing on the right side of the assignment of the statement described in the
Nothing is stored in the third field 804 (“condition input” column) (blank)
第4のフィールド805(「出力」列)には、元の演算ブロック501のレコードのフィールド504に記述されている命令文の代入の左辺に現れる変数名を格納する。
なお、図8に示すデータフローリスト800は、上記単純代入データフローリスト生成規則に従って生成されたものである。
The fourth field 805 (“output” column) stores the variable name that appears on the left side of the assignment of the statement described in the
Note that the
[分岐又は繰り返しのデータフローリスト生成規則]
演算ブロックのレコードであって、その演算ブロック種別が分岐又は繰り返しである場合、データフローリスト生成部10は、データフローリストのレコードを以下の規則に従って生成する。
第1のフィールド802(「機能のID」列)には、他と重複しない任意の数値
[Branch or repeated data flow list generation rules]
If the calculation block type is a branch or repetition, the data flow
In the first field 802 ("Function ID" column), any numeric value that does not overlap with the others
第2のフィールド803(「値入力」列)には、元の演算ブロック501のレコードのフィールド504に記述されている命令文の代入の右辺に現れる変数名を格納する。
In the second field 803 (“value input” column), variable names appearing on the right side of the assignment of the statement described in the
第3のフィールド804(「条件入力」列)には、元の演算ブロック501のレコードのフィールド504に記述されている命令文の分岐或いは繰り返しの条件になっている変数名を格納する。
The third field 804 (“condition input” column) stores the variable names that are the conditions for branching or repeating the statement described in the
第4のフィールド805(「出力」列)には、元の演算ブロック501のレコードのフィールド504に記述されている命令文の代入の左辺に現れる変数名を格納する。
上記分岐又は繰り返しのデータフローリスト生成規則に従って生成されたデータフローリストと、その元である演算ブロックの例を図10に示す。
The fourth field 805 (“output” column) stores the variable name that appears on the left side of the assignment of the statement described in the
FIG. 10 shows an example of a data flow list generated according to the branch or repeated data flow list generation rule and an operation block that is a source of the data flow list.
[データフローリストの例]
上記単純代入、分岐又は繰り返しのデータフローリスト生成規則に従って、元となる演算ブロックから生成されたデータフローリストの例を示す。図11は、図7に示した演算ブロック501_1_Aから生成されたデータフローリスト800_11のデータ構成例を示す図である。また、図12に、図11に示したデータフローリストをデータフロー図の形式で表示した図を示す。
[Example of data flow list]
An example of the data flow list generated from the original operation block in accordance with the above simple assignment, branching or repeated data flow list generation rule will be shown. FIG. 11 is a diagram illustrating a data configuration example of the data flow list 800_11 generated from the calculation block 501_1_A illustrated in FIG. FIG. 12 shows a diagram in which the data flow list shown in FIG. 11 is displayed in the form of a data flow diagram.
図3に戻り、データフローリスト生成処理の説明を続ける。データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS104において生成されたデータフローリストを、構造同値となる部分同士を統合するように更新する(S105)。「構造同値」とは、1つの範囲に含まれる任意のデータ(変数)を、別の範囲に含まれる任意のデータ(変数)に置き換えたときに、データ(変数)の名称以外に一切変化がないような置き換えが可能であることをいい、本実施の形態では、ソースコード中の一つの範囲に含まれる各機能の入力の数及び出力の数が、別の範囲の各機能の入力の数及び出力の数と一致する場合には、構造同値であるものとする。
Returning to FIG. 3, the description of the data flow list generation process will be continued. The data flow
上記ステップS105の処理内容を詳述する。図13は、ステップS105の処理内容の例を示したフローチャートである。この処理において、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、探索開始点を見つける(S1301)。
The processing content of step S105 will be described in detail. FIG. 13 is a flowchart showing an example of the processing content of step S105. In this process, the data flow
次に、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、探索開始点から所定の回数で辿れる範囲(レコード)を取り出す(S1303)。なお、取り出された範囲(レコード)を部分データフローリストと呼ぶ。
Next, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、上記部分データフローリストに含まれる機能の出力数を数える(S1305)。データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1305の処理を各部分データフローリストについて実行する(S1304、S1306)。
Next, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、それぞれの部分データフローリストに含まれる機能の入出力数が、他の部分データフローリストに含まれる機能の入出力数と全て一致するか否かを判定する(S1307)。機能の入出力数が全て一致すると判定した場合(S1307、Yes)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、一致する部分フローデータをまとめる(S1309)。一方、機能の入出力数が一致しないと判定した場合(S1307、No)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、当該部分フローデータをそのままとする。
Next, the data flow
ステップS1308終了後、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、未処理の探索開始点があればその探索開始点についてステップS1303からステップS1308を実行する(S1302,S1309)。全ての探索開始点について処理が終了すると、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS105の処理を終了する。
After step S1308, if there is an unprocessed search start point, the data flow
[探索開始点の検出(ステップS1301)]
上述のステップS1301の処理を詳述する。探索開始点を検出するため、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリストの値入力と条件入力の列に登録されている各変数の登場回数を集計し、登場回数がm回以上だった変数を探索開始点とする。なお、mはパラメータ200に含まれる情報で、m=2をデフォルト値とし、2以上の任意の整数にユーザが変更してもよい。
[Detection of Search Start Point (Step S1301)]
The process of step S1301 described above will be described in detail. In order to detect the search start point, the data flow
図14に、探索開始点を検出する例を説明するためのデータフローリストを示す。このデータフローリスト800_14の全レコードの値入力を格納するフィールド803及び条件入力を格納するフィールド804に現れる変数名はAからLまでの12個である。この12個の変数のうち、登場回数がパラメータ値m(=2)以上であるものはB(登場回数3回)のみである。よって、このデータフローリスト800_14の探索開始点はBと決定される。
FIG. 14 shows a data flow list for explaining an example of detecting a search start point. There are twelve variable names A to L that appear in the
図15に、図14に示したデータフローリストに対応するデータブロー図を示す。図15において、2以上の機能(丸枠内に数字で図示されている要素)の入力となっている変数(四角枠内に英文字で図示されている要素)は、Bのみであることがわかる。言い換えると、ステップS1301の処理は、データフロー図からm個以上の機能の入力となっているデータを見つけることに相当する。 FIG. 15 shows a data blow diagram corresponding to the data flow list shown in FIG. In FIG. 15, the variable (the element shown in English within the square frame) that is the input of two or more functions (elements shown as numbers inside the round frame) is only B. Recognize. In other words, the processing in step S1301 corresponds to finding data that is input to m or more functions from the data flow diagram.
[部分データフローリストの取り出し(S1303)]
上述のステップS1303の処理内容を詳述する。図16に、ステップS1303の処理内容を示すフローチャートを掲げる。
ステップS1303の処理において、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリスト中の、値入力(フィールド803)及び条件入力(フィールド804)に、ステップS1301で求めた探索開始点である変数名が記述されているレコードを見つける(S1602)。データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1602で見つけたレコードの機能のID(フィールド802)を記憶する(S1603)。
[Retrieve Partial Data Flow List (S1303)]
The processing content of step S1303 will be described in detail. FIG. 16 is a flowchart showing the processing content of step S1303.
In the processing of step S1303, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1603で記憶した機能のIDに対応するレコードの出力(フィールド805)に記述された値が、値入力(フィールド803)又は条件入力(フィールド804)に現れるレコードを見つける(S1606)。
Next, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1603の実行により、該当するレコードが一以上見つかったか否かを判定する(S1607)。
Next, the data flow
該当するレコードが一以上見つかったと判定した場合(S1607、Yes)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、当該レコードを記憶する(S1608)。該当するレコードが一以上見つからなかったと判定した場合(S1607、No)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、そのままステップS1604に戻り、記憶している他のレコードについてステップS1605以降の処理を実行する。
If it is determined that one or more corresponding records have been found (S1607, Yes), the data flow
データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、上記ステップS1606からステップS1608をn−1回繰り返す(S1605、S1609)。これは、探索開始点から所定回数nで辿れる範囲で部分データフローリストを取り出すことを意味する。なお、nはパラメータ200に含まれる情報でn=2をデフォルト値とし、1以上の任意の整数にユーザが変更してもよい。
The data flow
データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、上記ステップS1605からステップS1609までの処理を、ステップS1603及びステップS1608で記憶したレコードのそれぞれについて実行する(S1604、1610)。
The data flow
ステップS1610の後、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリストから、ステップS1603及びステップS1608で記憶したレコードを取り出し、部分データフローリストを生成する(S1611)。
以上で、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1303の処理を終了する。
上記処理の具体例を示す。図14に示したデータフローリストから部分データフローリストを生成する場合を以下に述べる。
After step S1610, the data flow
As described above, the data flow
The specific example of the said process is shown. A case where a partial data flow list is generated from the data flow list shown in FIG. 14 will be described below.
図14のデータフローリスト800_14において、登場回数が2以上の変数はBであり、変数Bを値入力(フィールド803)、若しくは条件入力(フィールド804)に有するレコードは、第2のレコード、第3のレコード、第4のレコードの3つのレコードである。 In the data flow list 800_14 of FIG. 14, the variable having the appearance count of 2 or more is B, and the record having the variable B in the value input (field 803) or the condition input (field 804) is the second record, the third record And the fourth record.
データフロー図生成装置1、より詳しくは、データフローリスト生成部10はデータフローリスト800_14の第2のレコードについて部分データフローリストを生成する。第2のレコードの出力(フィールド805)に記述されている変数はFであり、Fを値入力(フィールド803)、若しくは条件入力(フィールド804)に有するレコードは第5のレコードのみである。繰り返し回数nー1(但し、n=2)なので、第5のレコードからさらに辿らない。データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、第2のレコード及び第5のレコードからなる第1の部分データフローリストを生成する。
The data flow
また、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は第3のレコードについて部分データフローリストを生成する。第3のレコードの出力(フィールド805)に記述されている変数はGであり、Gを値入力(フィールド803)、若しくは条件入力(フィールド804)に有するレコードは第6のレコードのみである。繰り返し回数nー1(但し、n=2)なので、第6のレコードからさらに辿らない。データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、第3のレコード及び第6のレコードからなる第2の部分データフローリストを生成する。
In addition, the data flow
さらにまた、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は第4のレコードについて部分データフローリストを生成する。第4のレコードの出力(フィールド805)に記述されている変数名はHであり、Hを値入力(フィールド803)、若しくは条件入力(フィールド804)に有するレコードは第7のレコードのみである。繰り返し回数nー1(但し、n=2)なので、第7のレコードからさらに辿らない。データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、第4のレコード及び第7のレコードからなる第3の部分データフローリストを生成する。
Furthermore, the data flow
図17に、上記第1の部分データフローリスト1700_1、第2の部分データフローリスト1700_2、第3の部分データフローリスト1700_3のデータ構成例を示す。 FIG. 17 shows a data configuration example of the first partial data flow list 1700_1, the second partial data flow list 1700_2, and the third partial data flow list 1700_3.
図18に、上記第1の部分データフローリスト1700_1、第2の部分データフローリスト1700_2、第3の部分データフローリスト1700_3と、図14に示した元のデータフローリスト800_14との関係を、データフロー図として示した図を掲げる。図18に示す通り、この処理は、データフロー図上で探索開始点からn個の機能を経由して辿れる範囲を部分フローデータリストとして抽出することに相当する。 FIG. 18 shows the relationship between the first partial data flow list 1700_1, the second partial data flow list 1700_2, the third partial data flow list 1700_3, and the original data flow list 800_14 shown in FIG. The figure shown as a flow chart is listed. As shown in FIG. 18, this process corresponds to extracting a range that can be traced from the search start point via n functions on the data flow diagram as a partial flow data list.
[部分データフローリストの入出力数の計数(S1305)]
上述のステップS1305の処理内容の具体例を説明する。図19は、図17に示した各部分データフローリストにおける入出力数を記述したデータ(入出力数リストと呼ぶ)を示す図である。入出力数リスト1900_1は、部分データフローリスト1700_1から生成されたデータであり、入出力数リスト1900_2は、部分データフローリスト1700_2から生成されたデータであり、入出力数リスト1900_3は、部分データフローリスト1700_3から生成されたデータである。
[Counting the number of input / output of partial data flow list (S1305)]
A specific example of the processing content in step S1305 will be described. FIG. 19 is a diagram showing data describing the number of inputs and outputs in each partial data flow list shown in FIG. 17 (referred to as an input / output number list). The input / output number list 1900_1 is data generated from the partial data flow list 1700_1, the input / output number list 1900_2 is data generated from the partial data flow list 1700_2, and the input / output number list 1900_3 is partial data flow. Data generated from the list 1700_3.
[入出力数の一致の判定(S1307)]
上述のステップS1307の処理内容を詳述する。図20に、ステップS1307の処理内容を示すフローチャートを掲げる。
[Determination of coincidence of input / output count (S1307)]
The processing content of step S1307 will be described in detail. FIG. 20 is a flowchart showing the processing content of step S1307.
ステップS1307の処理において、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1303で生成された部分データフローリストから、任意の部分データフローリストを一つ選択する(S2001)。説明の便宜上、選択された部分フローリストをaと呼ぶ。
In the process of step S1307, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、上記部分データフローリストaのレコードから一つ選択して、選択したレコードにおける値入力の数、条件入力の数、出力の数が全て同じとなるレコードを上記部分データフローリストa以外の部分データフローリストそれぞれから探索する(S2003)。但し、後述するステップS2005で記憶したレコードはこの探索から除外する。
Next, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS2003で選択したレコードと値入力の数、条件入力の数、出力の数が全て同じとなるレコードが、上記部分データフローリストa以外の部分データフローリストの全てで見つかったか否かを判定する(S2004)。
Next, the data flow
上記ステップS2004で該当するレコードが見つかったと判定した場合(S2004,Yes)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、該当するレコードを記憶する(S2005)。
If it is determined in step S2004 that the corresponding record has been found (S2004, Yes), the data flow
データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、部分データフローリストaの他のレコードのそれぞれについて、ステップS2003からステップS2005の処理を実行する(S2002、S2006)。ステップS2006の完了後、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1307の判定の結果を「Yes」と出力する(S2008)。その後データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1307の処理を終了する。
The data flow
一方、ステップS2004において該当するレコードが見つからなかったと判定した場合(S2004,No)、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1307の判定の結果を「No」と出力する(S2007)。その後データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1307の処理を終了する。
On the other hand, if it is determined in step S2004 that the corresponding record was not found (S2004, No), the data flow
ステップS1307の処理の具体例を図19に示した入出力数リスト1900_1、1900_2、1900_3を用いて説明する。
入出力数リスト1900_1の第1のレコードの値入力の数、条件入力の数、出力の数は、「2,0,1」である。他の入出力数リスト1900_2、1900_3に値入力の数、条件入力の数、出力の数が「2,0,1」であるレコードがあるか否かを調べると、入出力数リスト1900_2の第1のレコード、入出力数リスト1900_3の第1のレコードが該当する。よって、入出力数リスト1900_1の第1のレコードの値入力の数、条件入力の数、出力の数の全てが一致するレコードが全ての他の入出力数リストに存在するとわかる。
A specific example of the processing in step S1307 will be described using the input / output number lists 1900_1, 1900_2, and 1900_3 illustrated in FIG.
The number of value inputs, the number of condition inputs, and the number of outputs of the first record in the input / output number list 1900_1 are “2, 0, 1”. When it is checked whether or not the other input / output number lists 1900_2 and 1900_3 have records with the number of value inputs, the number of condition inputs, and the number of outputs being “2, 0, 1”, the first list in the input / output number list 1900_2. 1 record corresponds to the first record in the input / output number list 1900_3. Therefore, it can be understood that a record in which the number of value inputs, the number of condition inputs, and the number of outputs of the first record in the input / output number list 1900_1 all match is present in all other input / output number lists.
同様に入出力数リスト1900_1の第2のレコードについて、他の入出力数リストに該当するレコードが存在するか調べる。入出力数リスト1900_1の第2のレコードの値入力の数、条件入力の数、出力の数は、「1,0,1」である。他の入出力数リスト1900_2、1900_3に値入力の数、条件入力の数、出力の数が「1,0,1」であるレコードがあるか否かを調べると、入出力数リスト1900_2の第2のレコード、入出力数リスト1900_3の第2のレコードが該当する。よって、入出力数リスト1900_1の第2のレコードの値入力の数、条件入力の数、出力の数の全てが一致するレコードが全ての他の入出力数リストに存在するとわかる。 Similarly, for the second record in the input / output number list 1900_1, it is checked whether there is a record corresponding to another input / output number list. The number of value inputs, the number of condition inputs, and the number of outputs of the second record in the input / output number list 1900_1 are “1, 0, 1”. When the other input / output number lists 1900_2 and 1900_3 check whether or not there is a record whose number of value inputs, number of condition inputs, and number of outputs is “1, 0, 1”, the list of the input / output number list 1900_2. 2 records and the second record in the input / output number list 1900_3. Therefore, it can be seen that a record in which the number of value inputs, the number of condition inputs, and the number of outputs of the second record in the input / output number list 1900_1 all match is present in all other input / output number lists.
よって、選択された部分データフローリストに相当する入出力数リスト1900_1の全てのレコードについて、他の部分フローデータリストに該当するレコードが存在すると判定される。この結果、ステップS1307の判定結果として、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は「Yes」を出力する。これは、3つの部分データフローリスト1700_1、1700_2、1700_3が構造同値であることを意味する。
Therefore, for all records in the input / output number list 1900_1 corresponding to the selected partial data flow list, it is determined that there is a record corresponding to another partial flow data list. As a result, the data flow
なお、構造同値か否かの厳密な判定はNP(Non-deterministic Polynomial time)困難な問題になるので、本実施の形態では機能の入出力数の比較によって近似的に判定して、高速に判定できるようにしている。 In addition, since it is difficult to determine NP (Non-deterministic Polynomial time), it is difficult to determine strictly whether structural equivalence exists. I can do it.
[部分データフローリストをまとめる(S1308)]
上述のステップS1308の処理内容を詳述する。図21に、ステップS1308の処理内容を示すフローチャートを掲げる。
ステップS1308において、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、全ての部分フローリストの同一レコードを結合した結合部分データフローリストを生成する(S2101)。
[Collect partial data flow list (S1308)]
The processing content of the above-described step S1308 will be described in detail. FIG. 21 is a flowchart showing the processing content of step S1308.
In step S1308, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリスト800から部分データフローリストが有する各レコードの機能のID(フィールド802)と同じ機能のID(フィールド802)のレコードを削除する(S2102)。
Next, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリスト800の各レコードにおいて、値入力、条件入力、出力の中の要素αに、結合部分データフローリストを作成する際にまとめた要素βに含まれるものがあるならば、要素αを要素βで置き換える(S2103)。なお、ここにいう「要素」とは、一の変数又は複数の変数をいう。
Next, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、上記データフローリストに結合部分データフローリストを追加したものを新たなデータフローリスト800とする(S2104)。
以上でデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、ステップS1308の処理を終了する。
[ステップS2101からステップS2104の具体例]
Next, the data flow
As described above, the data flow
[Specific Example of Steps S2101 to S2104]
上記ステップS2101からステップS2104の具体例を示す。上述の図17に示した3つの部分データフローリスト1700_1、1700_2、1700_3を用いてステップS2101からステップS2104を行うものとする。 A specific example of steps S2101 to S2104 will be described. Steps S2101 to S2104 are performed using the three partial data flow lists 1700_1, 1700_2, and 1700_3 shown in FIG.
図22に、上記部分データフローリスト1700_1、1700_2、1700_3の同一レコードを結合した結合部分データフローリストのデータ構成例を示す。結合部分データフローリスト2200は、データフローリスト800と同一のデータ構成を有する。すなわち、結合部分データフローリスト2200は、一の機能ごとに一つのレコードを有し、各レコードは第1のフィールド802、第2のフィールド803、第3のフィールド804、第4のフィールド805を有する。
第1のフィールド802は、当該レコードに対応する機能を一意に特定する情報(例えば、機能のID)を格納する。
第2のフィールド803には、当該機能に相当する関数への入力となる変数名が格納される。
第3のフィールド804には、当該機能に相当する関数が分岐若しくは繰り返しの条件文を有する場合に、当該条件文に含まれる変数名が格納される。
第4のフィールド805には、当該機能に相当する関数の出力となる変数名が格納される。
FIG. 22 shows a data configuration example of a combined partial data flow list in which the same records of the partial data flow lists 1700_1, 1700_2, and 1700_3 are combined. The combined partial
The
The
The
A
データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、結合部分データフローリスト2200の第1のフィールド802に、データフローリスト800及び部分データフローリスト1700に登録されている機能のIDいずれとも重複しない任意の数値を書き込む。また、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、結合部分データフローリスト2200の第2のフィールド803、第3のフィールド804、第4のフィールド805に、部分データフローリスト1700_1、1700_2、1700_3の同一レコード・同一フィールドの要素をひとまとめにした内容を格納する。図22では、ひとまとめにしたことを記号「+」でつないで表現している。
The data flow
例えば、結合部分データフローリスト2200、第1のレコードの第2のフィールド803には、第1の部分データフローリスト1700_1、第1のレコードの第2のフィールド803に格納されている「B,C」と、第2の部分データフローリスト1700_2、第1のレコードの第2のフィールド803に格納されている「B,D」と、第3の部分データフローリスト1700_3、第1のレコードの第2のフィールド803に格納されている「B,E」を一つにまとめた内容である「B,C+D+E」を格納する。なお、同一フィールドに複数の変数名(例えば、第1の変数名、と第2の変数名)が格納されている場合には、第1の変数名同士でまとめ、第2の変数名同士でまとめるものとする。
For example, “B, C” stored in the first partial data flow list 1700_1 and the
同様に、結合部分データフローリスト2200、第1のレコードの第4のフィールド805には、第1の部分データフローリスト1700_1、第1のレコードの第4のフィールド805に格納されている「F」と、第2の部分データフローリスト1700_2、第1のレコードの第4のフィールド805に格納されている「G」と、第3の部分データフローリスト1700_3、第1のレコードの第4のフィールド805に格納されている「H」を一つにまとめた内容である「F+G+H」を格納する。
Similarly, “F” stored in the first partial data flow list 1700_1 and the
また、結合部分データフローリスト2200、第2のレコードの第2のフィールド803には、第1の部分データフローリスト1700_1、第2のレコードの第2のフィールド803に格納されている「F」と、第2の部分データフローリスト1700_2、第2のレコードの第2のフィールド803に格納されている「G」と、第3の部分データフローリスト1700_3、第2のレコードの第2のフィールド803に格納されている「H」を一つにまとめた内容である「F+G+H」を格納する。
In addition, the combined partial
同様に、結合部分データフローリスト2200、第2のレコードの第4のフィールド805には、第1の部分データフローリスト1700_1、第2のレコードの第4のフィールド805に格納されている「I」と、第2の部分データフローリスト1700_2、第2のレコードの第4のフィールド805に格納されている「J」と、第3の部分データフローリスト1700_3、第2のレコードの第4のフィールド805に格納されている「K」を一つにまとめた内容である「I+J+K」を格納する。
Similarly, in the combined partial
また、部分データフローリスト1700_1、1700_2、1700_3の第1及び第2レコードの第3のフィールド804はいずれも空欄(データ無し)なので、結合部分データフローリスト第1及び第2レコードの第3のフィールド804は、いずれも空欄(データ無し)となる。
Also, since the
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、データフローリスト800_14から、部分データフローリスト1700_1、1700_2、1700_3の各レコードの第1のフィールド802に格納されている情報(本例では機能のID番号)と、同一の情報を第1のフィールド802に格納しているレコードを削除する。
Next, the data flow
図23に、データフローリスト800_14から、部分データフローリストのレコードに対応するレコードを削除した状態のデータフローリスト(削除後データフローリストと呼ぶ)のデータ構成例を示す。 FIG. 23 shows a data configuration example of a data flow list (referred to as a post-deletion data flow list) in a state in which a record corresponding to a record in the partial data flow list is deleted from the data flow list 800_14.
データフローリスト800_14の第1から第8のレコードの第1のフィールド802には、それぞれ「1」、「2」、「3」、「4」、「5」、「6」、「7」、「8」が格納されている。
一方、第1の部分データフローリスト1700_1の第1及び第2のレコードの第1のフィールド802には、「2」と「5」が格納されており、第2の部分データフローリスト1700_2の第1及び第2のレコードの第1のフィールド802には、「3」と「6」が格納されており、第3の部分データフローリスト1700_3の第1及び第2のレコードの第1のフィールド802には、「4」と「7」が格納されている。
In the
On the other hand, “2” and “5” are stored in the
よって、データフローリスト800_14から「2」と「5」、「3」と「6」、「4」と「7」に対応するレコードを削除し、削除後データフローリスト2300が生成される。
Therefore, records corresponding to “2” and “5”, “3” and “6”, “4” and “7” are deleted from the data flow list 800_14, and the post-deletion
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、削除後データフローリスト2300の各レコードの第2のフィールド803(値入力)、第3のフィールド804(条件入力)、第4のフィールド805(出力)の中の要素(要素αと呼ぶ)に、結合部分データフローリスト2200を作成する際にまとめた要素(要素βと呼ぶ)に含まれるものがあるならば、その要素αを要素βで置き換える(ステップS2103)。
Next, the data flow
前述した結合部分データフローリスト2200を作成する際にまとめた要素は、結合部分データフローリスト2200の第1のレコードの第2のフィールド803の「C,D,E」と、第1のレコードの第4のフィールド805の「F,G,H」と、第2のレコードの第2のフィールド803の「F,G,H」と、第2のレコードの第4のフィールド805の「I,J,K」である。削除後データフローリスト2300の各レコードの第2のフィールド803(値入力)、第3のフィールド804(条件入力)、第4のフィールド805(出力)の中に、上記に該当するものは、削除後データフローリスト2300の第2のレコードの第2のフィールド803の「I,J,K」である。よって、データフロー図生成装置1、より詳しくは、データフローリスト生成部10は、削除後データフローリスト2300の第2のレコードの第2のフィールド803の内容を「I,J,K」から「I+J+K」へ書き換える。図24に書き換えられた削除後データフローリスト(まとめ削除後データフローリスト2400と呼ぶ)のデータ構成例を示す。
The elements collected when the combined partial
[ステップS2104の具体例]
次にデータフロー図生成装置1、より詳しくは、データフローリスト生成部10は、まとめ削除後データフローリスト2400に結合部分データフローリスト2200の全レコードを追加して、新たなデータフローリスト(統合後データフローリスト2500と呼ぶ)を生成し、出力する(S2104)。
[Specific Example of Step S2104]
Next, the data flow
図25に、まとめ削除後データフローリスト2400に結合部分データフローリスト2200の全レコードを追加することによって生成されたデータフローリストのデータ構成例を示す。統合後データフローリスト2500は、構造同値の複数の部分を一つに統合した結果のデータフローリストである。図26に、統合後データフローリスト2500をデータフロー図の形式で表示した図を示す。図15に示したデータフロー図が、図26に示す内容に統合されていることがわかる。なお、統合後データフローリスト2500は、本実施の形態の第2のデータフローリストに相当する。
FIG. 25 shows a data configuration example of the data flow list generated by adding all the records of the combined partial
[1.2.2.データフローリスト抽象化処理の例]
図2に戻り、上記データフローリスト抽象化処理(S20参照)を詳述する。図27はデータフローリスト抽象化処理の例を示したフローチャートである。以下、図27を参照しながらデータフローリスト抽象化処理を説明する。なお、本実施の形態では、Louvain法を用いたクラスタリングを行うものとして説明するが、本実施の形態がLouvain法に限定される趣旨ではなく、その他のクラスタリング手法を用いても本実施の形態は成立する。
[1.2.2. Example of data flow list abstraction processing]
Returning to FIG. 2, the data flow list abstraction process (see S20) will be described in detail. FIG. 27 is a flowchart showing an example of data flow list abstraction processing. The data flow list abstraction process will be described below with reference to FIG. Although this embodiment is described as performing clustering using the Louvain method, the present embodiment is not intended to be limited to the Louvain method, and the present embodiment is not limited to using other clustering methods. To establish.
データフローリスト抽象化処理において、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、データフローリスト生成部10から統合後データフローリスト2500を受信し、この統合後データフローリスト2500からデータ(変数)のみの関係を取り出したデータ関係リストを生成する(S2701)。図28に、統合後データフローリスト2500の例と、その統合後データフローリスト2500から生成されるデータ関係リストのデータ構成例を示す。
In the data flow list abstraction processing, the data flow
統合後データフローリスト2500は、図25に示したものと同様のデータ構成を有する。データ関係リスト2800は、統合後データフローリスト2500の値入力(フィールド802)、条件入力(フィールド802)、出力(フィールド802)に格納されている変数を全て列挙して、変数の重複除去した後に残った変数ごとに一つのレコードを有するデータである。各レコードは、変数を特定する情報を格納するフィールド2801と、同一レコードの「データ」列(フィールド2801)の変数が、元となる統合後データフローリスト2500の値入力(フィールド803)又は条件入力(フィールド804)に格納されている変数として現れる機能(レコード)の出力に登録されている変数を格納する「関係するデータ」列(フィールド2802)を有する。なお、フィールド2802については重複除去はしない。なお、上記「データ」列(フィールド2801)の変数は、本実施の形態の「残った変数を示す情報」に相当する。
The post-integration
図28に示すデータ関係リスト2800を例として説明する。統合後データフローリストの全レコードの各フィールドに含まれるデータ(変数)は、A,B,C,Dの4種類のみであり、よってデータ関係リスト2800は、A,B,C,Dに対応する4つのレコードを有し、この4つのレコードのフィールド2801には、それぞれA,B,C,Dが格納される。
The
データ関係リスト2800のデータ(変数)Aに対応するレコードである第1のレコードのフィールド2802は、統合後データフローリストにおいてAが値入力(フィールド803)又は条件入力(フィールド804)に登場する機能(レコード)は第1のレコードであり、当該1のレコードの出力(フィールド805)はBであるので、データ関係リスト2800のデータ(変数)Aに対応するレコードのフィールド2802には、Bが格納される。
A
データ関係リスト2800のデータ(変数)Bに対応するレコードである第2のレコードのフィールド2802は、統合後データフローリストにおいてBが値入力(フィールド803)又は条件入力(フィールド804)に登場する機能(レコード)は第2のレコードと第3のレコードであり、当該2、第3のレコードの出力(フィールド805)はAとCであるので、データ関係リスト2800のBに対応するレコードである第2のレコードのフィールド2802には、AとCが格納される。
A
データ関係リスト2800のCに対応するレコードである第3のレコードのフィールド2802は、統合後データフローリストにおいてCが値入力(フィールド803)又は条件入力(フィールド804)に登場する機能(レコード)は第4のレコードであり、当該4のレコードの出力(フィールド805)はDであるので、データ関係リスト2800のデータCに対応するレコードのフィールド2802には、Dが格納される。
In the
データ関係リスト2800のデータDに対応するレコードである第4のレコードのフィールド2802は、統合後データフローリストにおいてCが値入力(フィールド803)又は条件入力(フィールド804)に登場する機能(レコード)は第5のレコードのみであり、当該5のレコードの出力(フィールド805)はCであるので、データ関係リスト2800のデータDに対応するレコードである第4のレコードのフィールド2802には、Cが格納される。
A
図29は、図28に示した統合後データフローリスト2500に対応するデータフロー図であり、図30は、データ関係リスト2800に対応する、データの関係を模式的に示す図である。図29、図30からわかるように、データ関係リストは、統合後データフローリストから機能を抜いて、データ間のみを
つないであげたものに相当する。
29 is a data flow diagram corresponding to the post-integration
図27に戻り、データフローリスト抽象化処理の説明を続ける。データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、ステップS2701で生成されたデータ関係リスト2800を元に、クラスタリングによって、関係が密なデータ同士をまとめる(S2702)。
Returning to FIG. 27, the description of the data flow list abstraction process will be continued. The data flow
上記ステップS2702の処理内容を詳述する。図31は、ステップS2702の処理内容の一例を示したフローチャートである。まず、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、データ関係リスト2800の各レコード(より詳しくは当該レコードに対応するデータ)を一つのクラスタとするように、データ関係リスト2800にクラスタを示す情報を格納するフィールドを付加し、各レコードの当該フィールドに、クラスタを示す情報(この例では、クラスタ番号1,2,3,4)を格納する。このクラスタを示す情報を付加されたデータ関係リストをクラスタ化データ関係リストと呼ぶ。図32に、図28に示したデータ関係リスト2800から生成されたクラスタ化データ関係リスト3200のデータ構成例を示す。
The processing content of step S2702 will be described in detail. FIG. 31 is a flowchart showing an example of the processing content of step S2702. First, the data flow
クラスタ化データ関係リスト3200は、クラスタごとに一つ又は複数のレコードを有するデータであって、各レコードはクラスタを示す情報を格納するフィールド3201と、データ(変数)名を格納するフィールド3202と、フィールド3202に格納されたデータに関係するデータを示す情報を格納するフィールド3203を有する。
The clustered
図31に戻り、ステップS2702の処理内容の説明を続ける。データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20はクラスタ化データ関係リスト3200のモジュラリティを算出する(S3102)。
モジュラリティの算出式の例を以下に示す。
モジュラリティ = Σm
m = y/x - (z/(2*x))^2
x =クラスタ化データ関係リスト3200の全レコードの「関係するデータ」列(フィールド3202)の変数の数の合計値
y =当該クラスタの、「データ」列(フィールド3202)の変数と「関係するデータ」列(フィールド3203)の変数とで、重複している変数の数
Returning to FIG. 31, the description of the processing content of step S2702 will be continued. The data flow
An example of the modularity calculation formula is shown below.
Modularity = Σm
m = y / x-(z / (2 * x)) ^ 2
x = total value of the number of variables in the “related data” column (field 3202) of all records in the clustered
y = the number of overlapping variables in the “data” column (field 3202) and the “related data” column (field 3203) of the cluster
z = (当該クラスタの「データ」列(フィールド3202)の変数が、全レコードの「関係するデータ」列(フィールド3203)で登場する回数)+(当該クラスタの「関係するデータ」列(フィールド3203)の変数数) z = (Number of times the variable in the “data” column (field 3202) of the cluster appears in the “related data” column (field 3203) of all records) + (“related data” column (field 3203) of the cluster ) Number of variables)
図33に、図32に示したクラスタ化データ関係リスト3200のモジュラリティの計算を示すデータ(モジュラリティ算出リスト3300と呼ぶ)を掲げる。この計算結果として、モジュラリティ=−0.26が得られる。なお、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20はこのモジュラリティの値を判定基準値iとして記憶する。
FIG. 33 shows data (referred to as a modularity calculation list 3300) indicating modularity calculation of the clustered
図31に戻り、ステップS2702の処理内容の説明を続ける。データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、クラスタ化データ関係リスト3200の任意のクラスタの2つを選び、選んだクラスタを組み合わせたクラスタ化データ関係リスト(展開クラスタ化データ関係リストと呼ぶ)を生成する(S3103,S3105)。
Returning to FIG. 31, the description of the processing content of step S2702 will be continued. The data flow
一例をあげると、上記クラスタ1からクラスタ4に相当する4つのレコードを有するクラスタ化データ関係リストから、クラスタ1と2、クラスタ1と3、クラスタ1と4、クラスタ2と3、クラスタ2と4、クラスタ3と4のそれぞれが組み合わされた6つの展開クラスタ化データ関係リストが生成される。
As an example, from the clustered data relationship list having four records corresponding to cluster 1 to
データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、上記展開クラスタ化データ関係リストそれぞれのモジュラリティを算出する(S3404)。
The data flow
図34に上記6つの展開クラスタ化データ関係リストに対応するモジュラリティ算出リスト 3300_1、3300_2、3300_3、3300_4、3300_5、3300_6を示す。これらのモジュラリティ算出リスト 3300_1から330_6を区別の便宜上、図34の上から順番に第1のモジュラリティ算出リスト 、第2のモジュラリティ算出リスト 、第3のモジュラリティ算出リスト 、第4のモジュラリティ算出リスト 、第5のモジュラリティ算出リスト 、第6のモジュラリティ算出リスト と呼ぶ。
以下に、上記第1から第5のモジュラリティ算出リスト から得られたモジュラリティの値を示す。
第1のモジュラリティ算出リスト 3300_1から得られるモジュラリティ=k1=0.02
第2のモジュラリティ算出リスト 3300_2から得られるモジュラリティ=k2=−0.38
第3のモジュラリティ算出リスト 3300_3から得られるモジュラリティ=k3=−0.29
第4のモジュラリティ算出リスト 3300_4から得られるモジュラリティ=k4=−0.24
第5のモジュラリティ算出リスト 3300_5から得られるモジュラリティ=k5=−0.33
第6のモジュラリティ算出リスト 3300_6から得られるモジュラリティ=k6=0.02
FIG. 34 shows modularity calculation lists 3300_1, 3300_2, 3300_3, 3300_4, 3300_5, and 3300_6 corresponding to the six expanded clustered data relation lists. For the convenience of distinguishing these modularity calculation lists 3300_1 to 330_6, the first modularity calculation list, the second modularity calculation list, the third modularity calculation list, and the fourth modularity are sequentially arranged from the top of FIG. The calculation list, the fifth modularity calculation list, and the sixth modularity calculation list are called.
The modularity values obtained from the first to fifth modularity calculation lists are shown below.
Modularity obtained from first modularity calculation list 3300_1 = k1 = 0.02
Modularity obtained from the second modularity calculation list 3300_2 = k2 = −0.38
Modularity obtained from the third modularity calculation list 3300_3 = k3 = −0.29
Modularity obtained from the fourth modularity calculation list 3300_4 = k4 = −0.24
Modularity obtained from the fifth modularity calculation list 3300_5 = k5 = −0.33
Modularity obtained from sixth modularity calculation list 3300_6 = k6 = 0.02
図31に戻り、ステップS2702の処理内容の説明を続ける。データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、ステップS3104で算出したモジュラリティの値のうち最大値(max(kn)と呼ぶ)がステップS3102で算出した判定基準値iより大きいか否かを判定する(S3106)。
なお、図34に示した例の場合は、
k1=0.02
k2=-0.38
k3=-0.29
k4=-0.24
k5=-0.33
k6=0.02
Returning to FIG. 31, the description of the processing content of step S2702 will be continued. The data flow
In the case of the example shown in FIG.
k1 = 0.02
k2 = -0.38
k3 = -0.29
k4 = -0.24
k5 = -0.33
k6 = 0.02
上記より、max(kn) = k1 = k6 = 0.02であり、一方、判定基準値i=-0.26 なので、max(kn) > iが成立するため、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20はステップS3107に進み処理を続行することになる。
From the above, since max (kn) = k1 = k6 = 0.02 and the criterion value i = −0.26, max (kn)> i is established, so the data flow
図31に戻り説明を続ける。上記最大値max(kn)がステップS3102で算出した判定基準値iより大きくないと判定した場合(S3106、No)、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20はステップS2702の処理を終了する。
Returning to FIG. 31, the description will be continued. When it is determined that the maximum value max (kn) is not larger than the determination reference value i calculated in step S3102 (No in S3106), the data flow
一方、上記最大値max(kn)がステップS3102で算出した判定基準値iより大きいと判定した場合(S3106、Yes)、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、モジュラリティの値が最大値max(kn)となった展開クラスタ化データ関係リストにおいて結合されている2つのクラスタについて、当該展開クラスタ化データ関係リストの元となるクラスタ化データ関係リスト3200におけるレコード同士を実際に結合して一つのクラスタとする(S3107)。なお、展開クラスタ化データ関係リストにおいて結合されている2つのクラスタの組が複数ある場合には、元となるクラスタ化データ関係リスト3200における任意の一つの組のクラスタ同士を結合する。
On the other hand, if it is determined that the maximum value max (kn) is larger than the determination reference value i calculated in step S3102 (S3106, Yes), the data flow
図35に、図34に示すモジュラリティの計算結果から、図32に示したクラスタ化データ関係リストのクラスタ(レコード)を結合して一つのクラスタ(レコード)としたクラスタ化データ関係リストのデータ構成例を示す。 FIG. 35 shows the data structure of the clustered data relation list obtained by combining the clusters (records) of the clustered data relation list shown in FIG. 32 from the modularity calculation results shown in FIG. An example is shown.
クラスタ化データ関係リスト3200_Aは、ステップS3101において生成されたクラスタ化データ関係リストであり、クラスタ結合データ関係リスト3200_Bは、クラスタ化データ関係リスト3200_AからステップS3104を経て、ステップS3107で生成されたクラスタ化データ関係リストである。 The clustered data relationship list 3200_A is the clustered data relationship list generated in step S3101, and the cluster combined data relationship list 3200_B is passed from the clustered data relationship list 3200_A through step S3104 to the clustered data generated in step S3107. It is a data relation list.
図34に示した例では、複数の展開クラスタ化データ関係リストのうち、最大のモジュラリティの値max(kn)となるのはk1及びk6の展開クラスタ化データ関係リストである。k1である展開クラスタ化データ関係リスト(モジュラリティ算出リスト 3300_1参照)では、クラスタ1とクラスタ2が組み合わされており、k6である展開クラスタ化データ関係リスト(モジュラリティ算出リスト 3300_6参照)ではクラスタ3とクラスタ4が組み合わされている。よって、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、元となるデータ関係リスト3200_Aにおいて、上記クラスタの組のいずれかを実際に結合して新たなクラスタとする。ここではクラスタ化データ関係リスト3200_Bは、クラスタ1とクラスタ2を結合して新たにクラスタ1としたデータとなる。なお、いずれの組を用いるかは任意である。
In the example shown in FIG. 34, the maximum modularity value max (kn) among the plurality of expanded clustered data relationship lists is the expanded clustered data relationship list of k1 and k6. In the expanded clustered data relationship list (refer to modularity calculation list 3300_1) that is k1,
上記クラスタ化データ関係リスト3200_Bの生成後、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、前記判定基準値iの値を直近のmax(kn)の値に置き換える(S3108)。なお、この場合の判定基準値iは直近のmax(kn)=0.02に置き換えられる。
その後、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、前述のステップS3103に戻り、処理を続行する。
After the generation of the clustered data relation list 3200_B, the data flow
Thereafter, the data flow
[上記処理の具体例]
上記図35に示したクラスタ化データ関係リスト3200_Bの生成後に、ステップS3103に戻った場合の処理内容を述べる。
[Specific example of the above process]
Processing contents when returning to step S3103 after generating the clustered data relation list 3200_B shown in FIG. 35 will be described.
クラスタ化データ関係リスト3200_Bのクラスタ(レコード)はクラスタ1に該当する第1及び第2のレコードと、クラスタ3に該当する第3のレコードと、クラスタ4に該当する第4のレコードである。これらのクラスタの2つの組み合わせはクラスタ1とクラスタ3の組み合わせ、クラスタ1とクラスタ4の組み合わせ、クラスタ3とクラスタ4の組み合わせの三通りである。
The clusters (records) in the clustered data relation list 3200_B are the first and second records corresponding to the
データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、クラスタ化データ関係リスト3200_Bのクラスタ1とクラスタ3に相当するレコードを結合した第1の展開クラスタ化データ関係リストと、クラスタ1とクラスタ4に相当するレコードを結合した第2の展開クラスタ化データ関係リストと、クラスタ3とクラスタ4に相当するレコードを結合した第3の展開クラスタ化データ関係リストを生成し、当該クラスタ化データ関係リストのモジュラリティを算出する(S3104)。
The data flow
図36に、上記第1から第3の展開クラスタ化データ関係リストのモジュラリティを算出するモジュラリティ算出リスト3300のデータ構成例を示す。モジュラリティ算出リスト3300_11は、上記第1の展開クラスタ化データ関係リストのモジュラリティを計算したデータであり、モジュラリティ算出リスト3300_12は、上記第2の展開クラスタ化データ関係リストのモジュラリティを計算したデータであり、モジュラリティ算出リスト3300_13は、上記第3の展開クラスタ化データ関係リストのモジュラリティを計算したデータである。
FIG. 36 shows a data configuration example of the
上記モジュラリティ算出リスト3300_11に示すように、第1の展開クラスタ化データ関係リストのモジュラリティ=k1=−0.08と計算されている。同様に、モジュラリティ算出リスト 3300_12に示すように、第2の展開クラスタ化データ関係リストのモジュラリティ=k2=−0.18と計算され、モジュラリティ算出リスト 3300_13に示すように、第3の展開クラスタ化データ関係リストのモジュラリティ=k3=0.3と計算されている。 As shown in the modularity calculation list 3300_11, the modularity of the first expanded clustering data relation list is calculated as k1 = −0.08. Similarly, as shown in the modularity calculation list 3300_12, the modularity in the second expanded clustered data relation list is calculated as k2 = −0.18, and as shown in the modularity calculation list 3300_13, the third expansion is performed. The modularity of the clustered data relation list is calculated as k3 = 0.3.
次にデータフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、モジュラリティの最大値max(kn)が判定基準値iより大きいか否かを判定する(S3106)。図36に示す通り、k1=−0.08、k2=−0.18、k3=0.3、より、モジュラリティの最大値max(kn) = k3= 0.3である。一方、判定基準値i=0.02なので、max(kn) > iが成立のため、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、その後ステップS3107に進み、データフローリスト抽象化処理を続行する。
Next, the data flow
ステップS3107において、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、図35に示すクラスタ化データ関係リスト3200_Bにおいて、max(kn)となるのは、n=3である、クラスタ3とクラスタ4に相当するレコードを結合した第3の展開クラスタ化データ関係リストだったので、ここで結合されている2つのクラスタ(クラスタ3とクラスタ4)を実際に結合して新たなクラスタ2とするようにクラスタ化データ関係リスト3200_Bを更新する。図37に、クラスタ化データ関係リスト3200_Bを上記のように更新した結果得られる新たなクラスタ化データ関係リスト3200_Cのデータ構成例を示す。
In step S3107, the data flow
ステップS3107の後、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、判定基準値iをモジュラリティの最大値max(kn) = k3 = 0.3に更新し(S3108)、ステップS3104に進む。
After step S3107, the data flow
データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、クラスタ化データ関係リスト3200_Cのクラスタ1とクラスタ2を結合した展開クラスタ化データ関係リストを生成し、当該展開クラスタ化データ関係リストのモジュラリティを算出する(S3104)。図38に、上記展開クラスタ化データ関係リストのモジュラリティを算出するモジュラリティ算出リスト 3300_38のデータ構成例を示す。このモジュラリティ算出リスト 3300_38からモジュラリティ=k1=0と計算されている。
The data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、モジュラリティの最大値max(kn)が判定基準値iより大きいか否かを判定する(S3106)。図38に示す通り、k1=0より、max(kn) = k1 = 0である。一方、判定基準値i=0.3なので、max(kn) > iが不成立のため、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、データフローリスト抽象化処理を終了する。なお、実際にクラスタ1とクラスタ2は結合しないで処理を終了し、最終的なクラスタ化データ関係リストとして図37に示すクラスタ化データ関係リスト3200_Cを得る。
Next, the data flow
図39に、ステップS2701で得られたデータ関係リストに対応する、データ(変数)の関係を示す図と、図37に示すクラスタ化データ関係リスト3200_Cに対応する、データ(変数)の関係を示す図を対比して示す。データ(変数)Aとデータ(変数)Bが一つのクラスタに、データ(変数)Cとデータ(変数)Dが別のクラスタにクラスタリングされたことがわかる。
以上で図27に示すステップS2702の説明を終了する。
FIG. 39 shows a data (variable) relationship corresponding to the data relationship list obtained in step S2701 and a data (variable) relationship corresponding to the clustered data relationship list 3200_C shown in FIG. The figures are shown in contrast. It can be seen that data (variable) A and data (variable) B are clustered in one cluster, and data (variable) C and data (variable) D are clustered in another cluster.
Above, description of step S2702 shown in FIG. 27 is complete | finished.
図27に戻り、データフローリスト抽象化処理の説明を続ける。データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、クラスタリング結果である、ステップS2702の結果得られるクラスタ化データ関係リストを元に、データフローリストを更新する(S2703)。
Returning to FIG. 27, the description of the data flow list abstraction process will be continued. The data flow
上記ステップS2703の処理内容を詳述する。図40は、図27に示すステップS2703の処理内容の一例を示したフローチャートである。まず、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、ステップS2702の実行結果として得られたクラスタ化データ関係リストに基づいて、各クラスタの出力データを特定する(S4001)。
The processing contents of step S2703 will be described in detail. FIG. 40 is a flowchart showing an example of the processing content of step S2703 shown in FIG. First, the data flow
具体的には、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、クラスタ化データ関係リストにおける各クラスタについて、当該クラスタの「関係するデータ」列であるフィールド3203に格納されているデータ(変数)の中で、当該クラスタの「データ列」であるフィールド3202に格納されているデータ(変数)に含まれないデータ(変数)があるレコードを全て探す。
Specifically, the data flow
上記条件に該当するレコードが見つかった場合、それらのレコードの「データ」列であるフィールド3202に格納されているデータ(変数)を全てまとめたものを当該クラスタの出力データとする。
When records satisfying the above conditions are found, a collection of all the data (variables) stored in the
上記条件に該当するレコードが見つからなかった場合、当該クラスタに含まれるレコードの「データ」列の変数を全てまとめたものを当該クラスタの出力データとする。 If no record corresponding to the above condition is found, the output data of the cluster is the sum of all the variables in the “data” column of the records included in the cluster.
本実施の形態では、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、クラスタの出力データをクラスタ化データ関係リストに付加したデータである、出力付きクラスタ化データ関係リストを生成する。図41に、出力付きクラスタ化データ関係リストのデータ構成例を示す。図41に示す出力付きクラスタ化データ関係リスト4100は、図37に示すクラスタ化データ関係リスト3200_Cから生成された出力付きクラスタ化データ関係リストである。出力付きクラスタ化データ関係リスト4100は、クラスタごとに一つ又は複数のレコードを有するデータであって、各レコードはクラスタを示す情報を格納するフィールド3201と、データ(変数)名を格納するフィールド3202と、フィールド3202に格納されたデータに関係するデータを示す情報を格納するフィールド3203と、該当するクラスタの出力データを示す情報を格納するフィールド3204を有する。
図41に示す出力付きクラスタ化データ関係リスト4100におけるフィールド3204に格納される情報は以下のように決定される。
In the present embodiment, the data flow
The information stored in the
クラスタ化データ関係リスト3200_Cにおけるクラスタ1に相当する第1のレコード及び第2のレコードでは、Cのみがクラスタ1に該当する第1及び第2のレコードのデータ列(フィールド3202)に含まれない変数なので、そのCを格納する第2のレコードのデータ列(フィールド3202)に格納されているBが、出力付きクラスタ化データ関係リスト4100のクラスタ1の出力データ(フィールド3204)に格納される。
In the first record and the second record corresponding to cluster 1 in the clustered data relation list 3200_C, only C is a variable that is not included in the data string (field 3202) of the first and second records corresponding to
クラスタ化データ関係リスト3200_Cにおけるクラスタ2に該当する第3及び第4のレコードにおいては、関係するデータ列(フィールド3203)の変数がいずれもデータ列(フィールド3202)に含まれるので、上記条件に該当するレコードは存在しない。よって、クラスタ2に含まれるデータ列の変数全て(C、D)をまとめたもの(「C+D」と表記)が、出力付きクラスタ化データ関係リスト4100のクラスタ2の出力データ(フィールド3204)に格納される。
In the third and fourth records corresponding to cluster 2 in the clustered data relation list 3200_C, the variables of the related data string (field 3203) are both included in the data string (field 3202). No record exists. Therefore, all the variables (C, D) in the data string included in cluster 2 (indicated as “C + D”) are stored in the output data (field 3204) of
図40に戻り、図27に示すステップS2703の処理内容の一例の説明を続ける。
出力付きクラスタ化データ関係リストを生成した後、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、データフローリストにおいて同一クラスタに含まれるデータと機能をまとめて、出力付きクラスタ化データ関係リストにおける当該クラスタの出力データに置き換えるようにデータフローリストを更新する(S4002)。
Returning to FIG. 40, description of an example of the processing content of step S2703 shown in FIG. 27 is continued.
After generating the clustered data relation list with output, the data flow
ステップS4002の処理内容の具体例を詳述する。まず、データフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、統合後データフローリスト2500の各レコードについて、値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数全てが、出力付きクラスタ化データ関係リスト4100における同一クラスタに該当するレコードに含まれる変数であった場合は、そのレコードを削除する。よって、統合後データフローリスト2500のレコードであって、当該レコードに格納されている変数が異なるクラスタであったレコードのみ残る。
A specific example of the processing content in step S4002 will be described in detail. First, the data flow
次にデータフロー図生成装置1、より詳しくは、データフローリスト抽象化部20は、統合後データフローリスト2500のレコードのうち、残されたレコードの各変数について、値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数を、出力付きクラスタ化データ関係リスト4100において、その変数を「データ」列(フィールド3202)に含むクラスタの出力データ(フィールド3204)で置き換える。この置き換えを行った結果得られるデータフローリストを抽象化データフローリストと呼ぶ。
Next, the data flow
上記の具体例を示す。図25に示した統合後データフローリスト2500と、図41に示した出力付きクラスタ化データ関係リスト4100に基づいて、ステップS4002を実行した場合の例を述べる。
Specific examples of the above will be shown. An example in which step S4002 is executed based on the post-integration
図42は、図28に示した統合後データフローリスト2500と、図41に示した出力付きクラスタ化データ関係リスト4100に基づいて、統合後データフローリスト2500の各レコードについて、値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数全てが、出力付きクラスタ化データ関係リスト4100における同一クラスタに該当するレコードに含まれる変数であった場合、そのレコードを削除する処理の結果得られたデータフローリストを示す。図42に示すデータフローリスト4200は、以下のように生成される。
42 shows a value input (field 803) for each record of the post-integration
統合後データフローリスト2500における機能のID=1(フィールド802)に該当する第1のレコードの値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数はAとBである。図41に示す出力付きクラスタ化データ関係リスト4100において、Aはクラスタ1に該当する第1のレコード及び第2のレコードに格納されており、Bはクラスタ1に該当する第1のレコード及び第2のレコードに格納されている。よって、AとBは同一クラスタのデータであるため、統合後データフローリスト2500の第1のレコードは削除される。
Variables included in the value input (field 803), condition input (field 804), and output (field 805) of the first record corresponding to the function ID = 1 (field 802) in the post-integration
統合後データフローリスト2500における機能のID=2(フィールド802)に該当する第2のレコードの値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数はBとAである。図41に示す出力付きクラスタ化データ関係リスト4100において、Bはクラスタ1に該当する第1のレコード及び第2のレコードに格納されており、Aはクラスタ1に該当する第1のレコード及び第2のレコードに格納されている。よって、BとAは同一クラスタのデータであるため、統合後データフローリスト2500の第2のレコードは削除される。
Variables included in the value input (field 803), condition input (field 804), and output (field 805) of the second record corresponding to the function ID = 2 (field 802) in the post-integration
統合後データフローリスト2500における機能のID=3(フィールド802)に該当する第3のレコードの値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数はBとCである。図41に示す出力付きクラスタ化データ関係リスト4100において、Bはクラスタ1に該当する第2のレコードの値入力(フィールド3202)に格納されており、Cはクラスタ2に該当する第3のレコード及び第4のレコードに格納されている。よって、BとCは異なるクラスタのデータであるため、統合後データフローリスト2500の第3のレコードは削除されない。
Variables included in the value input (field 803), condition input (field 804), and output (field 805) of the third record corresponding to the function ID = 3 (field 802) in the post-integration
統合後データフローリスト2500における機能のID=4フィールド802)に該当する第4レコードの値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数はCとDである。図41に示す出力付きクラスタ化データ関係リスト4100において、Cはクラスタ2に該当する第3のレコード及び第4のレコード格納されており、Dはクラスタ2に該当する第3のレコード及び第4のレコードに格納されている。よって、CとDは同一クラスタのデータであるため、統合後データフローリスト2500の第4のレコードは削除される。
Variables included in the value input (field 803), condition input (field 804), and output (field 805) of the fourth record corresponding to the function ID = 4 field 802) in the post-integration
統合後データフローリスト2500における機能のID=5(フィールド802)に該当する第4レコードの値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数はDとCである。図41に示す出力付きクラスタ化データ関係リスト4100において、Dはクラスタ2に該当する第3のレコード及び第4のレコード格納されており、Cはクラスタ2に該当する第3のレコード及び第4のレコードに格納されている。よって、DとCは同一クラスタのデータであるため、統合後データフローリスト2500の第5のレコードは削除される。
Variables included in the value input (field 803), condition input (field 804), and output (field 805) of the fourth record corresponding to the function ID = 5 (field 802) in the integrated
よって、統合後データフローリスト2500の第1、第2、第4、第5のレコードが削除され、第3のレコードのみが残り、その結果図42に示すデータフローリスト4200が生成される。
Therefore, the first, second, fourth, and fifth records in the post-integration
図43に、データフローリスト4200のレコードの各変数について、値入力(フィールド803)、条件入力(フィールド804)、出力(フィールド805)に含まれる変数を、出力付きクラスタ化データ関係リスト4100において、その変数を「データ」列(フィールド3202)に含むクラスタの出力データ(フィールド3204)で置き換えることによって得られた抽象化データフローリストのデータ構成例を示す。
FIG. 43 shows the variables included in the value input (field 803), condition input (field 804), and output (field 805) for each variable in the record of the
図43に示す抽象化データフローリスト4300は、以下のように生成される。
(1)データフローリスト4200の値入力(フィールド803)のBについて
出力付きクラスタ化データ関係リスト4100においてBを「データ」列(フィールド3202)に含むレコードは、クラスタ1に該当する第1のレコードである。一方、出力付きクラスタ化データ関係リスト4100においてクラスタ1に該当するレコードの出力データ(フィールド3204)に格納されている変数はBである。よって、データフローリスト4200の値入力(フィールド803)に格納されているBをBで置き換える(実質変わらない)。
The abstract
(1) About B of Value Input (Field 803) of
(2)データフローリスト4200の出力(フィールド805)のCについて
出力付きクラスタ化データ関係リスト4100においてCを「データ」列(フィールド3202)に含むレコードは、クラスタ2に該当する第3のレコードである。一方、出力付きクラスタ化データ関係リスト4100において上記クラスタ2に該当するレコードの出力データ(フィールド3204)に格納されている変数はC+Dである。よって、データフローリスト4200の出力(フィールド805に格納されているCをC+Dで置き換える。
(2) Regarding C in Output of Data Flow List 4200 (Field 805) In the clustered data relation list with output 4100, a record including C in the “data” column (field 3202) is a third record corresponding to
上記のようにデータフローリスト4200が格納する各変数(変数名)の置き換えを行った結果として、抽象化データフローリスト4300が得られる。なお、抽象化データフローリスト4300は本実施の形態の第3のデータフローリストに相当する。
As a result of replacing each variable (variable name) stored in the
上述ステップS2703の処理の結果として、データフローリスト抽象化部20は、統合後データフローリストを、抽象化データフローリストに変換することによって、データフロー図の規模と複雑さを低減する。
As a result of the processing in step S2703, the data flow
図44に、図28に示すデータフローリスト2500に相当するデータフロー図を示し、図45に抽象化データフローリスト4300に相当するデータフロー図を示す。図45に示すデータフロー図は、図44のデータフロー図に比べて規模と複雑さが低減されていることがわかる。
44 shows a data flow diagram corresponding to the
[1.2.3.データフローリスト図式化処理の例]
図2に戻り、上記データフローリスト図式化処理(S30参照)を詳述する。データフローリスト図式化処理において、データフロー図生成装置1、より詳しくは、データフローリスト図式化部30は、以下の処理手順に従って、抽象化データフローリスト4300からデータフロー図(若しくはデータフロー図を描画或いは印刷させるためのデータ)を生成する。
抽象化データフローリスト4300の各レコードについて以下の処理を行う。
まず、データフローリスト図式化部30は、第1の図形(例えば、楕円枠)を一つ用意する。
[1.2.3. Example of data flow list schematization process]
Returning to FIG. 2, the data flow list schematization process (see S30) will be described in detail. In the data flow list diagramming process, the data flow
The following processing is performed for each record of the abstract
First, the data flow
データフローリスト図式化部30は、対象とするレコードの「値入力」列(フィールド803)に格納されている各変数について、対応する変数の名前を付けた第2の図形(例えば、四角枠)を作り、その第2の図形から上記第1の図形への向きに、実線の矢印でつなぐ。
なお、既に同じ名前を有する第2の図形がある場合には、同じ名前の第2の図形を作らずに、その第2の図形と上記第1の図形とを矢印でつなぐ。
The data flow
If there is a second graphic having the same name, the second graphic and the first graphic are connected with an arrow without creating the second graphic with the same name.
データフローリスト図式化部30は、上記レコードの「条件入力」列(フィールド804)に格納されている各変数の名前を付けた第2の図形を作り、その第2の図形から第1の図形への向きに、点線の矢印でつなぐ。なお、既に同じ名前の第2の図形がある場合には、同じ名前の第2の図形を作らずに、その第2の図形と上記第1の図形を矢印でつなぐ。
The data flow
データフローリスト図式化部30は、上記レコードの「出力」列(フィールド805)の各変数の名前を付けた第2の図形を作り、上記第1の図形からその第2の図形への向きに、実線の矢印でつなぐ。なお、既に同じ名前の第2の図形がある場合には、同じ名前の第2の図形を作らずに、その第2の図形と上記第1の図形を矢印でつなぐ。
The data flow
データフローリスト図式化処理の具体例を示す。図46に、データフローリスト図式化処理によって生成されるデータフロー図の例を示し、図47に、図46のデータフロー図の元となるデータフローリスト4700を示す。
以上でデータフローリスト図式化処理の例の説明を終える。
A specific example of the data flow list schematization process is shown. FIG. 46 shows an example of a data flow diagram generated by the data flow list schematization process, and FIG. 47 shows a
This is the end of the description of the example of the data flow list schematization process.
[2.利点]
本実施の形態によれば、ソースコードを入力として、理解が容易なデータフロー図を短時間で抽出することが可能である。
[2. advantage]
According to this embodiment, it is possible to extract a data flow diagram that is easy to understand in a short time by using source code as input.
[3.まとめ、その他]
本実施の形態によれば、ソースコードを入力として、理解が容易なデータフロー図を短時間で抽出することができる。
[3. Summary, Others]
According to the present embodiment, a data flow diagram that is easy to understand can be extracted in a short time by using source code as input.
別の実施例として、本発明を実装した試作ツールを用いて、C言語で記述された約1万行のソフトウェアで試行したところ、約15分でA3用紙1枚に収まる規模のデータフロー図が生成できた。またそれが十分に理解できるものであることが確認できた。 As another example, when a trial tool that implements the present invention was used and trialed with about 10,000 lines of software written in C, a data flow diagram that fits on one A3 sheet in about 15 minutes was obtained. I was able to generate. It was also confirmed that it was fully understandable.
試作ツールの利用者が、得られたデータフロー図を使って、そのソフトウェアをよく知る人に見せながら、全体のデータフローの流れを説明したところ、概ね正しくデータフローが生成されており、また、理解に必要十分なフローが残っていることが確認できた。 The user of the prototype tool explained the overall data flow using the obtained data flow diagram and showing it to those who know the software well. It was confirmed that there was sufficient flow necessary for understanding.
ソフトウェアでは、変数はデータを格納する器である。1つの変数に、常に同じデータ(値は変わるかもしれないが)が格納されるとは限らないので、単に変数の読み書きの関係を線で結んだだけでは正しいデータフロー図にならない場合がある。同じデータが複数変数に格納される場合、同じ形状のデータフロー(構造同値)が複数あるならば、それらは同じデータが入っている可能性が高い。本実施の形態はそれらをまとめることができ、それによって理解が容易なデータフロー図を短時間で抽出することができる。 In software, a variable is a container that stores data. Since the same data (although the value may change) is not always stored in one variable, there may be cases where a correct data flow diagram may not be obtained simply by connecting the read / write relationship of variables with a line. When the same data is stored in a plurality of variables, if there are a plurality of data flows (structural equivalence) having the same shape, it is highly likely that the same data is included. In the present embodiment, they can be put together, whereby a data flow diagram that is easy to understand can be extracted in a short time.
以上、本発明の実施の形態を説明したが、本発明はこれらに限定されるものではなく、発明の趣旨を逸脱しない範囲内において、種々の変更、追加、組み合わせ等が可能である。 As mentioned above, although embodiment of this invention was described, this invention is not limited to these, A various change, addition, a combination, etc. are possible in the range which does not deviate from the meaning of invention.
1…データフロー図生成装置; 10…データフローリスト生成部; 20…データフローリスト抽象化部; 30…データフローリスト図式化部
DESCRIPTION OF
Claims (3)
当該機能への入力となる変数を示す第2情報と、
当該機能において、分岐又は繰り返しが存在する場合、当該分岐又は繰り返しの条件になっている変数を示す第3情報と、
当該機能の出力となる変数を示す第4情報を
一つのレコード中に有するデータである第1のデータフローリストを生成し、その第1のデータフローリストにおける構造同値の変数同士及び機能同士を統合するように当該第1のデータフローリストを書き換えて第2のデータフローリストを出力する第1の手段と、
前記第2のデータフローリストを受け取り、当該第2のデータフローリストから、データのみの関係を取り出したリストであるデータ関係リストを生成し、当該データ関係リストを元に、当該データ関係リストにおける関係が密なデータ同士をまとめる処理であるクラスタリングを実行し、当該クラスタリングの結果を元に当該第2のデータフローリストを書き換えて第3のデータフローリストを出力する第2の手段と
を有するデータフロー図生成装置。 First information for specifying a function corresponding to an instruction sentence included in the source code and corresponding to one of assignment, branch, and repetition;
Second information indicating a variable to be input to the function;
In the function, when there is a branch or repetition, third information indicating a variable that is a condition of the branch or repetition;
A first data flow list, which is data having fourth information indicating a variable to be output of the function in one record, is generated, and the structural equivalence variables and functions in the first data flow list are integrated. First means for rewriting the first data flow list to output a second data flow list,
Receiving the second data flow list, generating a data relationship list that is a list in which only data relationships are extracted from the second data flow list, and based on the data relationship list, relationships in the data relationship list A data flow having a second means for executing clustering, which is a process of collecting dense data, rewriting the second data flow list based on the result of the clustering, and outputting a third data flow list Figure generator.
上記探索開始点から所定の回数で辿れる範囲である部分データフローリストを決定し、
前記部分データフローリストのそれぞれについて、当該部分データフローリストに含まれる各機能の入力の数及び出力の数を決定し、
前記部分データフローリストの各機能の入力の数及び出力の数が、他の部分データフローリストの各機能の入力の数及び出力の数と一致するか否かを判定し、
各機能の入力の数及び出力の数と一致する部分データフローリスト同士を一つにまとめるように、前記第1のデータフローリストのレコードを統合し、レコードを削除し、又はレコード中の変数を書き換えて第2のデータフローリストを生成する
請求項1に記載のデータフロー図生成装置。 The first means is a variable included in the first data flow list, and in the first data flow list, second information indicating a variable to be input to a function, and the branch or repetition The variable whose number of times of appearance as the third information indicating the variable that is the condition is a predetermined number or more is determined as the search start point,
Determine a partial data flow list that is a range that can be traced a predetermined number of times from the search start point,
For each of the partial data flow lists, determine the number of inputs and the number of outputs of each function included in the partial data flow list,
Determining whether the number of inputs and the number of outputs of each function of the partial data flow list match the number of inputs and the number of outputs of each function of another partial data flow list;
The records of the first data flow list are integrated, the records are deleted, or the variables in the records are combined so that the partial data flow lists that match the number of inputs and the number of outputs of each function are combined. The data flow diagram generation device according to claim 1, wherein the second data flow list is generated by rewriting.
前記データ関係リストから、前記第2のデータフローリストに含まれる各機能の関係の密さの値を算出し、前記関係の密さの値に基づいて、関係が密なレコードまたは変数をまとめるように、前記第2のデータフローリストのレコードを統合し、レコードを削除し、又はレコード中の変数を書き換えて前記第3のデータフローリストを生成する
請求項1又は2に記載のデータフロー図生成装置。 The second means receives the second data flow list, the second information indicating the data to be input to the function in the second data flow list, the second data indicating the condition of branching or repetition. 3 variables, enumerate variables that are the fourth information indicating the data to be output of the function, and have one record for each variable that remains after removing the duplicate of the enumerated variables, In the second information indicating the remaining variable and the second data flow list, the remaining variable is stored as a variable that becomes an output of the function in a record that appears as a variable that becomes an input to the function. Generating a data relation list that is data having sixth information indicating a variable;
From the data relation list, the dense value of the relation of each function included in the second data flow list is calculated, and based on the dense relation value, records or variables having a dense relation are collected. The data flow diagram generation according to claim 1 or 2, wherein the records of the second data flow list are integrated, the records are deleted, or the variables in the records are rewritten to generate the third data flow list. apparatus.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014208413A JP6301803B2 (en) | 2014-10-09 | 2014-10-09 | Data flow diagram generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014208413A JP6301803B2 (en) | 2014-10-09 | 2014-10-09 | Data flow diagram generator |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016081089A JP2016081089A (en) | 2016-05-16 |
JP6301803B2 true JP6301803B2 (en) | 2018-03-28 |
Family
ID=55958625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014208413A Active JP6301803B2 (en) | 2014-10-09 | 2014-10-09 | Data flow diagram generator |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6301803B2 (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9170805B2 (en) * | 2010-07-20 | 2015-10-27 | Hitachi, Ltd. | Software maintenance supporting device for analyzing relationships between variables |
JP2013222327A (en) * | 2012-04-17 | 2013-10-28 | Toyota Motor Corp | Software verification device and software verification program |
-
2014
- 2014-10-09 JP JP2014208413A patent/JP6301803B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016081089A (en) | 2016-05-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Martinez et al. | Bottom-up technologies for reuse: automated extractive adoption of software product lines | |
KR101732764B1 (en) | Intelligent code differencing using code clone detection | |
WO2021007213A1 (en) | Techniques for creating, analyzing, and modifying neural networks | |
JP4872529B2 (en) | Reverse engineering support method | |
CN108279885B (en) | Method and device for integrating software of multiple model codes | |
JP6090850B2 (en) | Source program analysis system, source program analysis method and program | |
Bernal-Cárdenas et al. | Guigle: A gui search engine for android apps | |
KR20120040883A (en) | Use case diagrams are based on test case generation programs and use them to generate test cases | |
EP2827240A1 (en) | Method for generating control-code by a control-code-diagram | |
Maguire et al. | Visual compression of workflow visualizations with automated detection of macro motifs | |
WO2021007214A1 (en) | Techniques for visualizing the operation of neural networks | |
Sargsyan et al. | Scalable and accurate detection of code clones | |
JP6174469B2 (en) | Accident analysis utilization support apparatus and method | |
US20210012212A1 (en) | Techniques for modifying the operation of neural networks | |
JP4954674B2 (en) | Software development support method, software development support device, software development support program, and computer system | |
JP6301803B2 (en) | Data flow diagram generator | |
Chen et al. | DCTracVis: a system retrieving and visualizing traceability links between source code and documentation | |
JP2006277282A (en) | Model evaluation analysis system and model evaluation analysis program | |
Unterdechler et al. | Identifying repeating patterns in IEC 61499 systems using Feature-Based embeddings | |
Liu et al. | Visual exploration of software evolution via topic modeling | |
JP6185148B2 (en) | Dependency verification device between software specifications and dependency verification method between software specifications | |
JPWO2014108994A1 (en) | Project data creation device | |
JP6157166B2 (en) | Parts generation system, method and program | |
Rahiman et al. | CopyPoppy–A Source Code Plagiarism Detector | |
JP6437396B2 (en) | Trace information management system, method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170323 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180116 |
|
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: 20180130 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180301 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6301803 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |