JP3531728B2 - Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium - Google Patents

Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium

Info

Publication number
JP3531728B2
JP3531728B2 JP30564399A JP30564399A JP3531728B2 JP 3531728 B2 JP3531728 B2 JP 3531728B2 JP 30564399 A JP30564399 A JP 30564399A JP 30564399 A JP30564399 A JP 30564399A JP 3531728 B2 JP3531728 B2 JP 3531728B2
Authority
JP
Japan
Prior art keywords
file
class
source file
relationship
configuration
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
Application number
JP30564399A
Other languages
Japanese (ja)
Other versions
JP2001125779A (en
Inventor
裕毅男 尾崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP30564399A priority Critical patent/JP3531728B2/en
Publication of JP2001125779A publication Critical patent/JP2001125779A/en
Application granted granted Critical
Publication of JP3531728B2 publication Critical patent/JP3531728B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明が属する技術分野】本発明は、オブジェクト指向
型プログラミング言語で作成されたプログラムに対して
資産の構成関係を管理する構成関係管理装置及び構成関
係管理方法並びに構成関係管理プログラムを格納した記
憶媒体関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a configuration relationship management device and a configuration relationship management method for managing the configuration relationship of an asset for a program created in an object-oriented programming language, and a storage medium storing the configuration relationship management program. Concerned.

【0002】[0002]

【従来の技術】システム開発などの大規模なプログラミ
ング作業を行う場合、複数のプログラマーにより作業が
行われるため、作業全体の見通しを良くして効率よく作
業を行うためにプログラムにおける資産の構成関係を管
理することが必要である。また今日、システム開発など
にはオブジェクト指向型プログラミング言語が頻繁に用
いられるようになってきている。
2. Description of the Related Art When conducting large-scale programming work such as system development, the work is done by a plurality of programmers. It is necessary to manage. In addition, today, an object-oriented programming language is frequently used for system development.

【0003】オブジェクト指向型プログラミング言語に
おいて、資産とは、いくつかのオブジェクトに共通する
機能や性質(属性)を定義した「クラス」や、オブジェク
トの実行する手続きを記述した「メソッド(メンバ関
数)」等を意味する。また、構成関係とは、クラスとク
ラスの関係やクラスとメソッドの関係、メソッドの呼び
出し関係などを意味する。
In an object-oriented programming language, an asset is a "class" that defines functions and properties (attributes) common to some objects, and a "method (member function)" that describes a procedure to be executed by the object. Means etc. Further, the configuration relationship means a relationship between classes, a relationship between classes and methods, a calling relationship between methods, and the like.

【0004】従来、作成されたプログラムにおける資産
を解析して、構成関係を出力する手段(ツールなど)は
存在したが、いずれも作成されたプログラム自体を解析
して構成関係を抽出するものであり、当該プログラムの
実行時に実際に利用されている資産を解析するものでは
なかった。
Conventionally, there have been means (tools, etc.) for analyzing the assets in the created program and outputting the compositional relationship, but all of them analyze the created program itself to extract the compositional relationship. , It did not analyze the assets actually used when the program was executed.

【0005】[0005]

【発明が解決しようとする課題】上述したように、従
来、オブジェクト指向型プログラミング言語における構
成関係の管理手段は、実際にプログラムの実行時の動作
をトレースしないため、プログラムの実行時に実際に使
用されている実資産を検証することができなかった。そ
のため、プログラム中に実行時に実際には使用されない
無駄な資産が含まれてしまうおそれがあるという欠点が
あった。
As described above, conventionally, the means for managing the relation of structure in the object-oriented programming language is not actually used when the program is executed because it does not actually trace the operation when the program is executed. I couldn't verify the real assets. Therefore, there is a drawback that the program may include useless assets that are not actually used at the time of execution.

【0006】本発明は、上記従来の欠点を解決し、オブ
ジェクト指向型プログラミング言語における資産の構成
関係を管理し、資産の利用状態を解析できる構成関係管
理装置及び構成関係管理方法並びに構成関係管理プログ
ラムを格納した記憶媒体を提供することを目的とする。
The present invention solves the above-mentioned conventional drawbacks, manages the compositional relation of assets in an object-oriented programming language, and can analyze the usage state of the asset, a configurational relation management device, a configurational relation management method, and a configuration relational management program. An object of the present invention is to provide a storage medium in which is stored.

【0007】[0007]

【課題を解決するための手段】上記の目的を達成する本
発明の構成関係管理装置は、資産の構成関係を抽出する
ために設定されたキーワードをコメントとして含むソー
スファイルを入力し、該ソースファイル中の該キーワー
ドを参照して該ソースファイルの資産の構成関係を抽出
すると共に、該キーワードに対応する構成関係を出力す
るためのクラスとそのクラスのメソッド呼び出しを該ソ
ースファイルに埋め込むソースファイル解析手段と、前
記ソースファイル解析手段により構成関係を出力するた
めのクラスを埋め込まれたソースファイルからコンピュ
ータで実行可能なプログラムを生成する実行可能ファイ
ル生成手段と、前記ソースファイル解析手段により抽出
された前記ソースファイルに書き込まれている全資産の
構成関係に関するデータファイルと、前記実行可能ファ
イル生成手段が前記構成関係を出力するためのクラス
そのクラスのメソッド呼び出しを埋め込まれたプログラ
ムを実行することによって得られる実際に使用される資
産の構成関係に関するデータファイルとを比較して、前
記ソースファイルにおける資産の利用状態を解析する構
成関係解析手段とを備えることを特徴とする。
A configuration relation management apparatus of the present invention that achieves the above object inputs a source file containing a keyword set as a comment for extracting a configuration relation of an asset, and inputs the source file. A source file analyzing means for extracting a compositional relationship of assets of the source file with reference to the keyword in the class and embedding a class and a method call of the class for outputting the compositional relationship corresponding to the keyword in the source file An executable file generating means for generating a computer-executable program from a source file in which a class for outputting a configuration relation by the source file analyzing means is embedded; and the source extracted by the source file analyzing means. Regarding the composition relationship of all assets written in the file And over datafile, and classes for the executable file generating means for outputting the configuration relationship
A configuration relation analyzing means for analyzing the utilization state of the asset in the source file by comparing the method call of the class with a data file relating to the configuration relation of the asset actually used, which is obtained by executing the program. And is provided.

【0008】このような構成とすることにより、プログ
ラムの実行時に資産の利用状態をトレースすることがで
きるため、プログラムに書き込まれている全資産とプロ
グラムの実行時に実際に利用されている資産を比較する
ことができるため、無駄な資産がないか、利用頻度の高
い資産はどれかといった、資産の利用状態を検証するこ
とが可能である。
With such a configuration, it is possible to trace the usage status of the assets when the program is executed, so that all the assets written in the program are compared with the assets that are actually used when the program is executed. Therefore, it is possible to verify the usage status of the assets, such as whether there are wasted assets or which assets are frequently used.

【0009】請求項2の本発明の構成関係管理装置は、
前記ソースファイル解析部が、前記ソースファイルを読
み込んで、該ソースファイルに前記キーワードがコメン
トとして埋め込まれていないかを検索し、検出されたキ
ーワードに対応する構成関係に関するデータファイルを
作成して出力する構成関係抽出手段と、前記検出された
キーワードに対応するクラスとそのクラスのメソッド呼
び出しを前記ソースファイルの該当個所に埋め込む前処
理手段とを備え、前記実行可能ファイル生成手段が、コ
ンピュータに実行可能なプログラムを生成する際に、前
記ソースファイル解析手段の前記前処理手段により前記
ソースファイルに埋め込まれたクラスとそのクラスのメ
ソッド呼び出しの実体を生成したプログラムにリンクさ
せるリンク手段を備えることを特徴とする。
According to another aspect of the present invention, there is provided a configuration relation management device as follows.
The source file analysis unit reads the source file, searches whether the keyword is embedded in the source file as a comment, and creates and outputs a data file relating to a configuration relationship corresponding to the detected keyword. Configuration relation extracting means, class corresponding to the detected keyword and method call of the class
And a preprocessing unit for embedding a protrusion in a corresponding portion of the source file, wherein the executable file generating unit generates the computer executable program by the preprocessing unit of the source file analyzing unit. The class embedded in the source file and the class
It is characterized in that it comprises a link means for linking the entity of the sod call to the generated program.

【0010】請求項3の本発明の構成関係管理装置は、
前記ソースファイル解析手段により抽出された前記ソ
ースファイルに書き込まれている全資産の構成関係に関
するデータファイルと、前記実行可能ファイル生成手段
が前記構成関係を出力するためのクラスとそのクラスの
メソッド呼び出しを埋め込まれたプログラムを実行する
ことによって得られる実際に使用される資産の構成関係
に関するデータファイルとを登録して保持するデータベ
ースを更に備え、前記構成関係解析手段が、任意のタイ
ミングで該2種類のデータファイルを読み込み、比較を
行うことを特徴とする。
According to another aspect of the present invention, there is provided a configuration relation management device as follows:
A data file relating to the structural relationship of all assets written in the source file extracted by the source file analyzing means, a class for the executable file generating means to output the structural relationship, and a class
The system further comprises a database for registering and holding a data file relating to the compositional relationship of the asset actually used, which is obtained by executing the program in which the method call is embedded, and the compositional relationship analysis means stores the data at a desired timing. The feature is that two types of data files are read and compared.

【0011】また、上記の目的を達成する本発明の構成
関係管理方法は、ソースファイルを作成する際に、資産
の構成関係を抽出するために設定されたキーワードをコ
メントとして書き込むステップと、前記ソースファイル
を入力し、該ソースファイル中の前記キーワードを参照
して該ソースファイルの資産の構成関係を抽出するステ
ップと、前記キーワードに対応する構成関係を出力する
ためのクラスとそのクラスのメソッド呼び出しを前記ソ
ースファイルに埋め込むステップと、構成関係抽出ステ
ップでためのクラスを埋め込まれた前記ソースファイル
からコンピュータで実行可能なプログラムを生成するス
テップと、生成された前記コンピュータで実行可能なプ
ログラムを実行するステップと、前記構成関係抽出ステ
ップにおいて抽出された前記ソースファイルに書き込ま
れている全資産の構成関係に関するデータファイルと、
前記ファイル実行ステップにおいて前記構成関係を出力
するためのクラスとそのクラスのメソッド呼び出しを埋
め込まれたプログラムを実行することによって得られる
実際に使用される資産の構成関係に関するデータファイ
ルとを比較して、前記ソースファイルにおける資産の利
用状態を解析するステップとを含むことを特徴とする。
Further, the composition relation management method of the present invention which achieves the above object, when a source file is created, a step of writing a keyword set for extracting a composition relation of an asset as a comment, and the source A step of inputting a file and extracting the compositional relationship of the assets of the source file by referring to the keyword in the source file; a class for outputting the compositional relationship corresponding to the keyword and a method call of the class. Embedding in the source file, generating a computer-executable program from the source file in which the classes for the configuration relation extracting step are embedded, and executing the generated computer-executable program And extracted in the configuration relation extraction step And data files relating to the configuration relationship between all assets written in the source file,
In the file execution step, a class for outputting the configuration relationship and a data file relating to the configuration relationship of the actually used asset obtained by executing the program in which the method call of the class is embedded are compared, Analyzing the usage status of the asset in the source file.

【0012】請求項5の本発明の構成関係管理方法は、
前記コンピュータで実行可能なプログラムを生成するス
テップが、前記クラスの埋め込みステップにおいて前記
ソースファイルに埋め込まれたクラスとそのクラスのメ
ソッド呼び出しの実体を生成したプログラムにリンクさ
せるステップを含むことを特徴とする。
The configuration relation management method of the present invention according to claim 5 is
The step of generating the computer-executable program includes the class embedded in the source file and the class
And a step of linking the entity of the sod call to the generated program.

【0013】[0013]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態について説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0014】本実施の形態の前提として、予め、資産の
構成関係を抽出するために用いるキーワードが設定され
る。キーワードは、関係の種別ごとに用意する。オブジ
ェクト指向型プログラミング言語を用いてプログラムを
作成するプログラマーは、開発中のソースコード(Java
なら.javaファイル、C++なら.hと.cppファイルなど)の
中の適切な箇所に、当該キーワードをコメントとして埋
め込む。この際、クラスの継承関係や集約関係、クラス
とメソッドやメンバ変数との関係などが構成関係情報の
対象になる。すなわち、以上のように設定されたキーワ
ードを適宜埋め込んだソースファイルが本実施の形態に
よる処理の対象となる。
As a premise of the present embodiment, a keyword used to extract the structural relationship of assets is set in advance. Keywords are prepared for each type of relationship. Programmers who write programs using an object-oriented programming language can use the source code (Java
.Java file, C ++ .h and .cpp files, etc.) and embed the keyword as a comment in an appropriate place. At this time, the inheritance relationship, the aggregation relationship of the class, the relationship between the class and the method or the member variable, etc. are targets of the configuration relationship information. That is, the source file in which the keywords set as described above are appropriately embedded is the target of the processing according to the present embodiment.

【0015】図1は、本発明の一実施形態による構成関
係管理装置の構成を示すブロック図である。本実施形態
の構成関係管理装置100は、オブジェクト指向型プロ
グラミング言語で記述されたソースファイルから、クラ
スやメソッドなどの資産を解析して抽出し当該資産の構
成関係を把握すると共に、当該ソースファイルを実行し
て実際に使用される実資産の構成関係を把握し、両方の
構成関係を比較解析する。ここで、構成関係管理装置1
00に入力されるソースファイルは上述したキーワード
が埋め込まれたファイルである。そして、ソースファイ
ル中のキーワードを手掛かりとして資産の構成関係が把
握される。
FIG. 1 is a block diagram showing the configuration of a configuration relationship management device according to an embodiment of the present invention. The configuration relationship management apparatus 100 according to the present embodiment analyzes and extracts assets such as classes and methods from a source file written in an object-oriented programming language, grasps the configuration relationship of the asset, and extracts the source file. Execute and grasp the compositional relationship of the actual assets that are actually used, and compare and analyze both compositional relationships. Here, the configuration relationship management device 1
The source file input to 00 is a file in which the above-mentioned keyword is embedded. Then, the structural relationship of the assets is grasped by using the keyword in the source file as a clue.

【0016】図1を参照すると、本実施の形態の構成関
係管理装置100は、ソースファイル中の資産を解析し
て構成関係を抽出するソースファイル解析部10と、抽
出された構成関係をデータベース60に登録する第1構
成関係情報登録部20と、ソースファイルから実行可能
なプログラムファイルを生成して実行させると共に実資
産の構成関係を抽出する実行可能ファイル生成部30、
抽出された実資産の構成関係をデータベース60に登録
する第2構成関係情報登録部40と、データベース60
に登録されたソースファイル中の資産の構成関係と実資
産の構成関係とを比較する構成関係解析部50とを備え
る。
Referring to FIG. 1, the configuration relationship management apparatus 100 according to the present embodiment analyzes a property in a source file to extract a configuration relationship, and a database 60 for the extracted configuration relationship. A first configuration relationship information registration unit 20 to be registered in the above, and an executable file generation unit 30 that generates and executes an executable program file from a source file and extracts the configuration relationship of real assets,
A second configuration relationship information registration unit 40 for registering the configuration relationship of the extracted real assets in the database 60, and the database 60
And a configuration relationship analysis unit 50 that compares the configuration relationship of the assets in the source file registered with the configuration relationship of the real asset.

【0017】また、構成関係管理部100には、ソース
ファイルや各種のコマンドを入力するための入力装置1
10と、実行可能ファイル生成部30により生成された
実行可能なプログラムファイルを実行するファイル実行
部120と、構成関係解析部50による解析結果を出力
する出力装置130とが接続されており、構成関係管理
部100の動作を支援する。
The configuration relationship management section 100 also has an input device 1 for inputting source files and various commands.
10, the file execution unit 120 that executes the executable program file generated by the executable file generation unit 30, and the output device 130 that outputs the analysis result by the configuration relationship analysis unit 50 are connected, and the configuration relationship The operation of the management unit 100 is supported.

【0018】図1を参照して構成関係管理装置100の
動作を概略的に説明する。まず、入力装置110からオ
ブジェクト指向型プログラミング言語で記述されキーワ
ードの埋め込まれたソースファイルが入力される。そし
て、ソースファイル解析部10において、キーワードを
手掛かりとしてソースファイルから資産が抽出されて構
成関係のファイル(第1構成関係情報ファイル)が作成
される。また、ソースファイル解析部10において、ソ
ースコードには、埋め込まれているキーワードに対応し
て、構成関係を出力する特殊なクラスとそのクラスのメ
ソッド呼び出しコードが追加される。さらに、実行可能
ファイル生成部30により、追加コードの挿入されたソ
ースファイルからコンピュータで実行可能なプログラム
ファイルが生成されてファイル実行部120に送られ
る。ファイル実行部120で当該プログラムファイルが
実行され、追加コードに基づいて、実行時に使用された
実資産の構成関係のファイル(第2構成関係情報ファイ
ル)が作成される。作成された第1、第2構成関係情報
ファイルはデータベース60に登録される。この後、構
成関係解析部50によりデータベース60から読み出さ
れた第1、第2構成関係情報ファイルが比較され、比較
結果が出力装置130から出力される。
The operation of the configuration relationship management apparatus 100 will be briefly described with reference to FIG. First, a source file described in an object-oriented programming language and having a keyword embedded therein is input from the input device 110. Then, in the source file analysis unit 10, the asset is extracted from the source file by using the keyword as a clue, and a configuration-related file (first configuration-related information file) is created. Further, in the source file analysis unit 10, a special class that outputs a configuration relationship and a method call code of the class are added to the source code in correspondence with the embedded keyword. Further, the executable file generation unit 30 generates a computer-executable program file from the source file in which the additional code is inserted and sends it to the file execution unit 120. The program file is executed by the file execution unit 120, and a file relating to the configuration relationship of the real asset (second configuration relationship information file) used at the time of execution is created based on the additional code. The created first and second configuration relation information files are registered in the database 60. Thereafter, the configuration relationship analysis unit 50 compares the first and second configuration relationship information files read from the database 60, and the comparison result is output from the output device 130.

【0019】なお、ソースファイルに追加される、構成
関係を出力するためのクラスやメソッドの実体は、ライ
ブラリなどで予め用意されている。また、実行可能ファ
イル生成部30によるコンピュータで実行可能なプログ
ラムファイルの生成において、処理対象であるプログラ
ミング言語がコンパイラ言語である場合は、ソースコー
ドはコンパイルされ、オブジェクトプログラムになり、
用意してあったライブラリをリンクして実行ファイルが
作成される。一方、処理対象であるプログラミング言語
がインタプリタ言語である場合は、ソースコードからイ
ンタプリタ実行可能な形式のファイルが作成される。以
下、ソースファイルを記述したオブジェクト指向型プロ
グラミング言語がコンパイラ言語である場合を主に説明
するが、必要に応じてインタプリタ言語である場合につ
いても説明する。
It should be noted that the substance of the class or method to be added to the source file for outputting the configuration relationship is prepared in advance in a library or the like. In the generation of the computer-executable program file by the executable file generation unit 30, if the programming language to be processed is the compiler language, the source code is compiled into an object program,
An executable file is created by linking the prepared library. On the other hand, when the programming language to be processed is an interpreter language, a file in an interpreter executable format is created from the source code. Hereinafter, the case where the object-oriented programming language in which the source file is described is a compiler language will be mainly described, but the case where the object language is an interpreter language will be described as necessary.

【0020】次に、各構成要素について詳細に説明す
る。図2はソースファイル解析部10の構成を示すブロ
ック図である。図2を参照すると、ソースファイル解析
部10は、ソースファイルの解析を行う構成関係抽出部
11と、ソースファイルに構成関係を出力するためのク
ラスやクラスのメソッドを埋め込むプリプロセッサ部1
2とを備える。構成関係抽出部11は、ソースファイル
アクセス部111と、解析処理部112と、関係情報出
力部113とを備え、プリプロセッサ部121は、キー
ワード展開部121と、ソース出力部122とを備え
る。また、図示のように、ソースファイル解析部10の
処理には、資産の構成関係を出力するのキーワードを集
めた構成関係出力用キーワードファイル210と、構成
関係出力用キーワードファイル210に格納されている
各キーワードに対応して資産の構成関係を出力するクラ
スやクラスのメソッド呼び出しを集めた構成関係出力ク
ラス外部ファイル220とが使用される。
Next, each component will be described in detail. FIG. 2 is a block diagram showing the configuration of the source file analysis unit 10. Referring to FIG. 2, a source file analysis unit 10 includes a configuration relation extraction unit 11 that analyzes a source file, and a preprocessor unit 1 that embeds a class or a method of a class for outputting a configuration relation in a source file.
2 and. The configuration relation extraction unit 11 includes a source file access unit 111, an analysis processing unit 112, and a relation information output unit 113, and the preprocessor unit 121 includes a keyword expansion unit 121 and a source output unit 122. Further, as shown in the figure, in the processing of the source file analysis unit 10, a keyword file 210 for output of the configuration relationship and a keyword file 210 for the configuration relationship output in which keywords for outputting the configuration relationship of the assets are collected are stored. A class for outputting the compositional relationship of assets corresponding to each keyword and a compositional relationship output class external file 220 that collects method calls of the class are used.

【0021】構成関係抽出部11において、ソースファ
イルアクセス部111は、入力装置110から入力され
たソースファイルを読み込み、所定の記憶装置に展開す
る。記憶装置としては、RAMその他の内部メモリを用
いることができる。解析処理部112は、ソースファイ
ルアクセス部111により記憶装置に展開されたソース
ファイルを解析し、構成関係出力用キーワードファイル
210に含まれているキーワードが、当該ソースファイ
ルのコメントとして埋め込まれていないか検索する。そ
して、ソースファイル中にキーワードに該当するコメン
トが見つかれば、当該キーワードに対応する構成関係を
抽出して記憶装置に格納する。関係情報出力部113
は、解析処理部112により抽出された構成関係を記憶
装置から読み出して、第1構成関係情報ファイルとして
出力する。
In the configuration relation extraction unit 11, the source file access unit 111 reads the source file input from the input device 110 and expands it in a predetermined storage device. A RAM or other internal memory can be used as the storage device. The analysis processing unit 112 analyzes the source file expanded in the storage device by the source file access unit 111, and checks whether the keyword included in the configuration-related output keyword file 210 is embedded as a comment of the source file. Search for. Then, if a comment corresponding to the keyword is found in the source file, the structural relationship corresponding to the keyword is extracted and stored in the storage device. Relationship information output unit 113
Reads the configuration relation extracted by the analysis processing unit 112 from the storage device and outputs it as a first configuration relation information file.

【0022】プリプロセッサ部12において、キーワー
ド展開部121は、ソース解析部112と同様に、記憶
装置上に展開されたソースファイルの中からキーワード
に該当するコメントを検索し、見つかれば、構成関係出
力クラス外部ファイル220に含まれている構成関係を
出力するためのクラスやクラスのメソッド呼び出しの中
から該当するものを選んでソースファイルの該当個所に
埋め込む。この作業をキーワードの展開という。ソース
出力部122は、キーワード展開部121によりキーワ
ードが展開されたソースファイルを解析済みソースファ
イルとして出力する。
In the preprocessor unit 12, the keyword expansion unit 121 searches for a comment corresponding to a keyword from the source files expanded in the storage device, and if found, the structure relation output class, as in the source analysis unit 112. A corresponding one is selected from the class and the method call of the class for outputting the configuration relationship included in the external file 220 and embedded in the corresponding part of the source file. This work is called keyword expansion. The source output unit 122 outputs the source file in which the keywords are expanded by the keyword expansion unit 121 as an analyzed source file.

【0023】図3は第1構成関係登録部20の構成を示
すブロック図である。図3を参照すると、第1構成関係
登録部20は、ソースファイル解析部10の構成関係抽
出部11から出力された第1構成関係情報ファイルを読
み込む構成関係読み込み部21と、構成関係読み込み部
21にて読み込んだ第1構成関係情報ファイルをデータ
ベース60に登録するデータベースアクセス部22とを
備える。
FIG. 3 is a block diagram showing the configuration of the first configuration relationship registration section 20. Referring to FIG. 3, the first configuration relationship registration unit 20 reads the first configuration relationship information file output from the configuration relationship extraction unit 11 of the source file analysis unit 10, and the configuration relationship reading unit 21. The database access unit 22 for registering the first configuration relation information file read in step 3 in the database 60.

【0024】図4は実行可能ファイル生成部30の構成
を示すブロック図である。図4を参照すると、実行ファ
イル生成部30は、ソースファイルをコンパイルするコ
ンパイル部31と、コンパイル部31によりコンパイル
されたオブジェクトプログラムを結合するリンク部32
とを備える。また、図示のように、実行可能ファイル生
成部30の処理には、構成関係を出力するためのクラス
やメソッドの実体を集めた構成関係出力ライブラリ41
0が使用される。
FIG. 4 is a block diagram showing the configuration of the executable file generator 30. Referring to FIG. 4, the execution file generating unit 30 includes a compiling unit 31 that compiles a source file and a link unit 32 that combines the object programs compiled by the compiling unit 31.
With. Further, as shown in the figure, the processing of the executable file generation unit 30 includes a configuration relation output library 41 that collects entities of classes and methods for outputting the configuration relation.
0 is used.

【0025】コンパイル部31は、ソースファイル解析
部10のプリプロセッサ部12から出力された解析済み
ソースファイルを読み込み、コンパイラを呼び出してオ
ブジェクトファイルを生成する。
The compiling section 31 reads the analyzed source file output from the preprocessor section 12 of the source file analyzing section 10 and calls a compiler to generate an object file.

【0026】リンク部32は、コンパイル部31により
生成されたオブジェクトファイルを読み込み、リンカを
呼び出して当該オブジェクトファイルと構成関係出力ラ
イブラリ410とをリンクさせ、コンピュータが実行可
能なプログラムファイル(実行可能ファイル)として出
力する。
The link unit 32 reads the object file generated by the compiling unit 31, calls the linker to link the object file with the configuration output library 410, and a computer-executable program file (executable file). Output as.

【0027】実行可能ファイル生成部30のリンク部3
2から出力された実行可能ファイルはファイル実行部1
20に送られる。ファイル実行部120は、入力した実
行可能ファイルを実行する。当該実行可能ファイルには
ソースファイル解析部10及び実行可能ファイル生成部
30の処理により、構成関係を出力するためのクラスや
メソッドが埋め込まれているため、当該実行可能ファイ
ルを実行すると、実行時に実際に使用された実資産の構
成関係が出力されることとなる。出力された実資産の構
成関係は、第2構成関係情報ファイルとして出力され
る。
Link section 3 of executable file generating section 30
The executable file output from 2 is the file execution unit 1
Sent to 20. The file execution unit 120 executes the input executable file. Since the class and method for outputting the configuration relationship are embedded in the executable file by the processing of the source file analysis unit 10 and the executable file generation unit 30, when the executable file is executed, the actual The compositional relationship of the real assets used for will be output. The output structural relationship of the real asset is output as a second structural relationship information file.

【0028】ここで、プログラミング言語がJavaのよう
なインタプリタ言語である場合について説明する。プロ
グラミング言語がインタプリタ言語である場合、図5に
示すように、実行可能ファイル生成部30は、コンパイ
ル部33を備え、ソースファイル解析部10のプリプロ
セッサ部12から出力された解析済みソースファイルを
読み込み、コンパイラを呼び出してインタプリタが実行
可能な中間コードのインタプリタ実行可能ファイルにし
て出力する。
Here, a case where the programming language is an interpreter language such as Java will be described. When the programming language is an interpreter language, as shown in FIG. 5, the executable file generating unit 30 includes a compiling unit 33 and reads the analyzed source file output from the preprocessor unit 12 of the source file analyzing unit 10, Invokes the compiler to output an interpreter executable file of intermediate code that can be executed by the interpreter.

【0029】この場合ファイル実行部120は、インタ
プリタにより当該インタプリタ実行可能ファイルを実行
する。上述したコンパイラ言語の場合と同様に、当該イ
ンタプリタ実行可能ファイルにはソースファイル解析部
10及び実行可能ファイル生成部30の処理により、構
成関係を出力するためのクラスやメソッドが埋め込まれ
ているため、当該インタプリタ実行可能ファイルを実行
すると、実行時に実際に使用された実資産の構成関係が
出力されることとなる。出力された実資産の構成関係
は、第2構成関係情報ファイルとして出力される。
In this case, the file executing section 120 executes the interpreter executable file by the interpreter. As in the case of the above-described compiler language, the interpreter executable file is embedded with classes and methods for outputting the configuration relationship by the processing of the source file analysis unit 10 and the executable file generation unit 30. When the interpreter executable file is executed, the configuration relationship of the real assets actually used at the time of execution will be output. The output structural relationship of the real asset is output as a second structural relationship information file.

【0030】第2構成関係登録部40は、図3に示した
第1構成関係登録部20と同様の構成をしており、ファ
イル実行部120により出力された第2構成関係情報フ
ァイルを読み込んで、データベース60に登録する。
The second configuration relationship registration unit 40 has the same configuration as the first configuration relationship registration unit 20 shown in FIG. 3, and reads the second configuration relationship information file output by the file execution unit 120. , Register in the database 60.

【0031】図6は構成関係解析部50の構成を示すブ
ロック図である。図6を参照すると、構成関係解析部5
0は、構成関係情報読み込み部51と、構成関係情報比
較部52と、解析結果出力部53とを備える。構成関係
読み込み部51は、データベース60から第1構成関係
情報ファイルと第2構成関係情報ファイルとを読み込ん
で、所定の記憶装置に展開する。構成関係情報比較部5
2は、記憶装置に展開された第1構成関係情報ファイル
と第2構成関係情報ファイルとを比較する。すなわち、
ソースファイルの段階でファイル中に含まれている資産
全体の構成関係と、実際にプログラムを実行した際に使
用された実資産の構成関係とが比較される。ソースファ
イル中に、プログラムを実行した際には使用されない資
産が含まれているときは、この比較によってそのような
無駄な資産が検出されることとなる。解析結果出力部5
3は、構成関係情報比較部52の比較結果を受け取って
出力装置130に出力する。
FIG. 6 is a block diagram showing the configuration of the configuration relationship analysis unit 50. Referring to FIG. 6, the configuration relation analysis unit 5
0 includes a configuration relationship information reading unit 51, a configuration relationship information comparison unit 52, and an analysis result output unit 53. The configuration relationship reading unit 51 reads the first configuration relationship information file and the second configuration relationship information file from the database 60 and expands them in a predetermined storage device. Configuration-related information comparison unit 5
2 compares the first configuration relationship information file and the second configuration relationship information file developed in the storage device. That is,
At the stage of the source file, the compositional relationship of the entire assets contained in the file is compared with the compositional relationship of the real assets used when the program is actually executed. If the source file contains assets that are not used when running the program, this comparison will detect such useless assets. Analysis result output unit 5
3 receives the comparison result of the configuration relationship information comparison unit 52 and outputs it to the output device 130.

【0032】次に、本実施の形態の動作について、図7
及び図8のフローチャートを参照して説明する。図7は
ソースファイルのビルド時(コンパイル時)の動作を示
し、図8は生成されたアプリケーションプログラム(オ
ブジェクトプログラム)の実行時の動作を示す。前提条
件として、ソースファイルには、上述したように関係情
報を出力するためのキーワードをコメントとして書き込
んである。
Next, the operation of this embodiment will be described with reference to FIG.
8 and the flowchart of FIG. FIG. 7 shows the operation at the time of building (compiling) the source file, and FIG. 8 shows the operation at the time of executing the generated application program (object program). As a precondition, a keyword for outputting the related information is written as a comment in the source file as described above.

【0033】図7を参照すると、まず、ソースファイル
がソースファイル解析部10の構成関係抽出部11に読
み込まれ、記憶装置上に展開される(ステップ70
1)。そして、解析処理部112によりソースファイル
上のコメント内のキーワードの検索が行われる(ステッ
プ702)。
Referring to FIG. 7, first, the source file is read by the configuration relation extraction unit 11 of the source file analysis unit 10 and expanded on the storage device (step 70).
1). Then, the analysis processing unit 112 searches for a keyword in the comment on the source file (step 702).

【0034】プログラミング言語としてC++を用いた
場合を例として、キーワードの検索を具体的に説明す
る。ここでは、キーワードの書き込みに関して図9に示
すような規則があるものとする。図9を参照すると、ク
ラスCabcは、クラスCbaseを継承しており、クラスCothe
rを集約している。メンバ関数は、func1、func2、func3
の3つある。クラススコープの中で、関数スコープの外
に// inheritance、// aggregation、// member-functi
on のようなコメントがあれば、クラスの継承関係、集
約関係とクラスとメンバ関数の関係が出力される。関数
のスコープの中で// calling member-functionのような
コメントがあれば、関数の呼び出し関係が出力される。
図9の例では、まず、コメントが順番に検索され、コメ
ントの中に特定のキーワードがないか検索する。もし、
クラスのスコープ内に特定のキーワード(// inheritan
ce)が見つかれば、そのクラスと親クラスとの関係を関
係種別と共に記憶装置上に待避する。// aggregation、
// member-functionなども同様に待避する。もし、関数
のスコープ内に// calling member-functionが見つかれ
ば、その関数と呼び出し関数との呼び出し関係を記憶装
置上に待避する。
The keyword search will be specifically described by taking the case of using C ++ as the programming language as an example. Here, it is assumed that there is a rule as shown in FIG. 9 regarding the writing of the keyword. Referring to FIG. 9, the class Cabc inherits the class Cbase, and the class Cothe
r is aggregated. The member functions are func1, func2, func3
There are three. In class scope, outside function scope, // inheritance, // aggregation, // member-functi
If there is a comment such as on , the class inheritance relationship, aggregation relationship, and class-member function relationship are output. If there is a comment such as // calling member-function in the function scope, the function call relationship is output.
In the example of FIG. 9, first, the comments are sequentially searched, and the comment is searched for a specific keyword. if,
Certain keywords (// inheritan within the scope of the class
ce) is found, the relationship between the class and the parent class is saved in the storage device together with the relationship type. // aggregation,
// Save member-functions as well. If // calling member-function is found in the scope of the function, the calling relationship between the function and the calling function is saved in the storage device.

【0035】以上のようにして、ソースファイルの全て
の解析が完了した後、記憶装置上に待避された関係情報
が第1構成関係情報ファイルとして出力される(ステッ
プ703)。第1構成関係情報ファイルには、例えば図
10に示すような構成関係が記述される。
After all the source files have been analyzed as described above, the relational information saved on the storage device is output as the first configuration relational information file (step 703). In the first configuration relationship information file, the configuration relationship as shown in FIG. 10, for example, is described.

【0036】次に、第1構成関係情報登録部20によ
り、第1構成関係情報ファイルがデータベース60に登
録される(ステップ704)。なお、当該処理は、ステ
ップ703で第1構成関係情報ファイルが出力された際
に直ちに行うのではなく、後で単独で動作させることも
できる。
Next, the first configuration relationship information registration unit 20 registers the first configuration relationship information file in the database 60 (step 704). It should be noted that this process may be performed independently instead of immediately after the first configuration relation information file is output in step 703.

【0037】次に、ソースファイルから生成されるオブ
ジェクトプログラムの実行時に構成関係情報の出力が行
えるように、プリプロセッサ部12のキーワード展開部
121により、コメントとして書き込まれているキーワ
ードがソースコードとして展開される(ステップ70
5)。このとき展開される内容は、構成関係情報を出力
するためのクラスの宣言とそのクラスのメソッド呼び出
しである。クラススコープの中のコメントは、クラスの
コンストラクタに関係を出力する処理として展開され
る。関数のスコープの中のコメントは、その関数内で関
係を出力する処理として展開される。// calling membe
r-functionの場合、実際に関数が呼び出される直前に関
係を出力する処理が展開される。なお、ステップ705
のキーワード展開処理は、必ずしも図7に示すように第
1構成関係情報ファイルの出力(ステップ703)やデ
ータベース60への登録(ステップ704)の後に行わ
なくても良く、キーワードの検索(ステップ702)後
に、第1構成関係情報ファイルの出力の前、あるいは並
行して実行しても良い。
Next, the keywords written as comments are expanded as source code by the keyword expansion section 121 of the preprocessor section 12 so that the configuration-related information can be output when the object program generated from the source file is executed. (Step 70
5). The contents expanded at this time are a class declaration and a method call of the class for outputting the configuration related information. The comment in the class scope is expanded as a process that outputs the relationship to the class constructor. The comment in the function scope is expanded as a process to output the relation within the function. // calling membe
In the case of r-function, the process of outputting the relationship is expanded just before the function is actually called. Note that step 705
The keyword expansion processing of does not necessarily have to be performed after the output of the first configuration related information file (step 703) or the registration in the database 60 (step 704) as shown in FIG. 7, and the keyword search (step 702). It may be executed after the output of the first configuration relation information file or in parallel.

【0038】次に、プリプロセッサ部12から出力され
た、キーワードがソースコードとして展開されたソース
ファイルが、実行可能ファイル生成部30に読み込まれ
てコンパイルされ、コンピュータで実行可能な実行可能
ファイル(アプリケーションプログラム)に変換されて
出力される(ステップ706)。
Next, the source file, which is output from the preprocessor 12 and in which the keywords are expanded as source code, is read by the executable file generator 30 and compiled, and an executable file (application program executable by a computer) is compiled. ) And is output (step 706).

【0039】次に、図8を参照してアプリケーションプ
ログラムの実行時の動作を説明する。まず、実行可能フ
ァイル生成部30により作成されたアプリケーションプ
ログラムが、ファイル実行部120により実行される
(ステップ801)。ファイル実行部120は、実行に
際してアプリケーションプログラムの制御により、実際
に動作した部分の構成関係情報を第2構成関係情報ファ
イルとして出力する。具体的には、例えば実行時に、ク
ラスのインスタンスが生成されたときにコンストラクタ
でクラスの関係を出力する。また実際にメソッド呼び出
される直前にメソッドとメソッドの関係を出力する。
Next, the operation at the time of executing the application program will be described with reference to FIG. First, the application program created by the executable file creation unit 30 is executed by the file execution unit 120 (step 801). The file execution unit 120 outputs the configuration relation information of the portion that actually operated as a second configuration relation information file under the control of the application program at the time of execution. Specifically, for example, at runtime, when a class instance is generated, the constructor outputs the class relationship. It also outputs the relationship between methods just before the method is actually called.

【0040】次に、第2構成関係情報登録部40によ
り、第2構成関係情報ファイルがデータベース60に登
録される(ステップ802)。なお、当該処理は、ステ
ップ801で第2構成関係情報ファイルが出力された際
に直ちに行うのではなく、後で任意のタイミングで動作
させることもできる。
Next, the second configuration relationship information registration unit 40 registers the second configuration relationship information file in the database 60 (step 802). It should be noted that the process may not be performed immediately when the second configuration related information file is output in step 801, but may be operated later at an arbitrary timing.

【0041】次に、以下の手順で構成関係情報解析処理
(ステップ803〜ステップ806)が行われる。当該
処理は、第1、第2構成関係情報ファイルがデータベー
スに登録された後であれば、任意のタイミングで動作さ
せることができる。言い換えれば、ステップ704にお
ける第1構成関係情報ファイルのデータベース60への
登録と、ステップ802における第2構成関係情報ファ
イルのデータベース60への登録とは、構成関係情報解
析処理を実行する前に行われていれば良い。
Next, the configuration relation information analysis processing (steps 803 to 806) is performed in the following procedure. The process can be operated at an arbitrary timing after the first and second configuration relation information files are registered in the database. In other words, the registration of the first configuration relationship information file in the database 60 in step 704 and the registration of the second configuration relationship information file in the database 60 in step 802 are performed before executing the configuration relationship information analysis process. I'm good.

【0042】構成関係情報解析処理において、まず、解
析対象となる資産が指定される(ステップ803)。デ
ータベース60上に第1構成関係情報ファイルによる資
産全体の構成関係と第2構成関係情報ファイルによる実
行時の構成関係とが存在するとき、指定された資産をキ
ーに、構成関係情報読み込み部51により、ソースファ
イル解析時の構成関係情報と実行時の構成関係情報とが
取得される(ステップ804)。次に、構成関係情報比
較部52により、当該処理で得られたデータが比較さ
れ、資産の利用状況が解析される(ステップ805)。
具体的には、例えば実行時に実際に利用されている資
産、利用されていない資産、利用頻度等が解析される。
そして、解析結果出力部53により、構成関係情報比較
部52の解析結果がファイル、画面、印刷物等の形式で
出力される(ステップ806)。
In the configuration relation information analysis process, first, an asset to be analyzed is designated (step 803). When the configuration relationship of the entire asset based on the first configuration relationship information file and the runtime configuration relationship based on the second configuration relationship information file exist in the database 60, the configuration relationship information reading unit 51 uses the specified asset as a key. The configuration relationship information at the time of analyzing the source file and the configuration relationship information at the time of execution are acquired (step 804). Next, the configuration relationship information comparison unit 52 compares the data obtained by the processing, and analyzes the usage status of the asset (step 805).
Specifically, for example, the assets that are actually used, the assets that are not used, and the frequency of use are analyzed at the time of execution.
Then, the analysis result output unit 53 outputs the analysis result of the configuration relation information comparing unit 52 in the form of a file, a screen, a printed matter or the like (step 806).

【0043】以上のようにして、本実施の形態によれ
ば、作成されたソースファイルに含まれている資産全体
の構成関係に加え、当該ソースファイルから生成された
オブジェクトプログラム(アプリケーションプログラ
ム)を実行する際に実際に使用される実資産の構成関係
を取得でき、さらに二つの構成関係を比較することによ
ってオブジェクトプログラムの実行の際に使用されない
無駄な構成関係を検出することができる。
As described above, according to this embodiment, the object program (application program) generated from the source file is executed in addition to the structural relation of the entire assets included in the created source file. It is possible to acquire the compositional relationship of the real assets that are actually used when executing, and it is possible to detect the useless compositional relationship that is not used when the object program is executed by comparing the two compositional relationships.

【0044】上述した実施の形態では、ソースファイル
を解析して作成される第1構成関係情報ファイルとオブ
ジェクトプログラムを実行して得られる第2構成関係情
報ファイルとをデータベース60に登録しておき、任意
のタイミングで比較するようにしたが、第1、第2構成
関係情報ファイルをデータベース60に格納せず、直接
構成関係解析部50に入力して二つのファイルを比較す
ることもできる。この場合の構成情報管理装置の構成を
図11に示す。
In the above-described embodiment, the first configuration relation information file created by analyzing the source file and the second configuration relation information file obtained by executing the object program are registered in the database 60. Although the first and second configuration relation information files are not stored in the database 60, they may be directly input to the configuration relation analysis unit 50 to compare the two files, although the comparison is performed at an arbitrary timing. The configuration of the configuration information management device in this case is shown in FIG.

【0045】図11に示すように、構成関係管理装置1
40は、ソースファイル解析部10と、実行可能ファイ
ル生成部30と、構成関係解析部50とを備えており、
図1に示す構成関係管理装置100と比較して、第1構
成関係情報登録部20と第2構成関係情報登録部40と
を省略した構成となっている。動作においても、第1、
第2構成関係情報ファイルがデータベース60に登録さ
れず、直接構成関係解析部50に参照されること以外は
図1の構成関係管理装置100と同様である。ただし、
第1、第2構成関係情報ファイルがデータベース60に
登録されないため、構成関係解析部50が処理において
使用する記憶装置の記憶容量を考慮すれば、構成関係解
析部50による二つのファイルの比較は任意のタイミン
グで行うのではなく、ファイルの作成後、直ちに行われ
るのが好ましい。また、解析すべき資産の量が多い場合
は、データベースを利用するべきである。しかしなが
ら、解析すべき資産が少量であれば、データベース60
を利用せずに作成される第1、第2構成関係情報ファイ
ルを直接利用するほうが、動作環境が単純となり、手軽
に利用できる。
As shown in FIG. 11, the configuration relationship management device 1
40 includes a source file analysis unit 10, an executable file generation unit 30, and a configuration relation analysis unit 50,
Compared to the configuration relationship management device 100 shown in FIG. 1, the configuration is such that the first configuration relationship information registration unit 20 and the second configuration relationship information registration unit 40 are omitted. In operation, the first
The configuration relationship management device 100 is the same as that of FIG. 1 except that the second configuration relationship information file is not registered in the database 60 and is directly referenced by the configuration relationship analysis unit 50. However,
Since the first and second configuration relationship information files are not registered in the database 60, if the storage capacity of the storage device used by the configuration relationship analysis unit 50 is taken into consideration, the comparison of the two files by the configuration relationship analysis unit 50 is arbitrary. It is preferable that the processing is performed immediately after the file is created, instead of at the timing of. If you have a large amount of assets to analyze, you should use a database. However, if the assets to be analyzed are small, the database 60
It is easier to use the first and second configuration relation information files directly without using, because the operating environment is simpler.

【0046】以上、好ましい実施の形態をあげて本発明
を説明したが、本発明は必ずしも上記実施の形態に限定
されるものではない。
Although the present invention has been described with reference to the preferred embodiments, the present invention is not necessarily limited to the above embodiments.

【0047】[0047]

【発明の効果】以上説明したように、本発明の構成関係
管理装置及び構成関係管理方法並びに構成関係管理プロ
グラムを格納した記憶媒体によれば、プログラムの実行
時に資産の利用状態をトレースし、プログラムに書き込
まれている全資産とプログラムの実行時に実際に利用さ
れている資産とを比較することができるため、利用され
ていない無駄な資産がないか、頻繁に利用されている資
産はどれなのか、資産の利用の流れといった、実際のプ
ログラムの実行に伴う資産の利用状態を解析し管理する
ことができるという効果がある。
As described above, according to the configuration relation management apparatus, the configuration relation management method, and the storage medium storing the configuration relation management program of the present invention, the utilization state of the asset is traced when the program is executed, You can compare all the assets written in to the assets that are actually used when the program is executed, so there is no unused asset that is not used or which is used frequently. There is an effect that it is possible to analyze and manage the usage state of the assets associated with the actual execution of the program such as the flow of the usage of the assets.

【0048】これにより、無駄な資産が検出された場合
に当該資産を削除するようにソースファイルを書き換え
れば、無駄のない最適化されたプログラムを得ることが
できる。
Thus, if a wasteful asset is detected and the source file is rewritten so that the asset is deleted, an optimized program without waste can be obtained.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の一実施の形態による構成関係管理装
置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a configuration relationship management device according to an embodiment of the present invention.

【図2】 本実施の形態におけるソースファイル解析部
の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a source file analysis unit in the present embodiment.

【図3】 本実施の形態における第1構成関係情報登録
部の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of a first configuration related information registration unit in the present embodiment.

【図4】 本実施の形態における実行可能ファイル生成
部の構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of an executable file generation unit according to the present embodiment.

【図5】 本実施の形態における実行可能ファイル生成
部の他の構成を示すブロック図である。
FIG. 5 is a block diagram showing another configuration of the executable file generator according to the present embodiment.

【図6】 本実施の形態における構成関係解析部の構成
を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a configuration relationship analysis unit in the present embodiment.

【図7】 本実施の形態によるソースファイルのビルド
時の動作を示すフローチャートである。
FIG. 7 is a flowchart showing an operation at the time of building a source file according to this embodiment.

【図8】 本実施の形態によるアプリケーションプログ
ラムの実行時の動作を示すフローチャートである。
FIG. 8 is a flowchart showing an operation at the time of executing an application program according to the present embodiment.

【図9】 本実施の形態に用いるキーワードの書き込み
に関する規則を示す図である。
FIG. 9 is a diagram showing rules regarding writing of keywords used in the present embodiment.

【図10】 第1構成関係情報ファイルに記述される構
成関係の例を示す図である。
FIG. 10 is a diagram showing an example of a configuration relationship described in a first configuration relationship information file.

【図11】 本発明の一実施の形態による構成関係管理
装置の変形例を示すブロック図である。
FIG. 11 is a block diagram showing a modification of the configuration relationship management device according to the exemplary embodiment of the present invention.

【符号の説明】[Explanation of symbols]

10 ソースファイル解析部 11 構成関係抽出部 111 ソースファイルアクセス部 112 解析処理部 113 関係情報出力部 12 プリプロセッサ部 121 キーワード展開部 122 ソース出力部 20 第1関係情報登録部 21 構成関係読み込み部 22 データベースアクセス部 30 実行可能ファイル生成部 31、33 コンパイル部 32 リンク部 40 第2構成関係情報登録部 50 構成関係解析部 51 構成関係情報読み込み部 52 構成関係情報比較部 53 解析結果出力部 60 データベース 100、140 構成関係管理装置 110 入力装置 120 ファイル実行部 130 出力装置 210 構成関係出力用キーワードファイル 220 構成関係出力クラス外部ファイル 410 構成関係出力ライブラリ 10 Source file analysis section 11 Configuration relation extraction unit 111 Source file access section 112 Analysis processing unit 113 Related information output section 12 Preprocessor section 121 Keyword Development Department 122 Source output section 20 1st relation information registration section 21 Configuration reading section 22 Database Access Department 30 Executable file generator 31, 33 Compile section 32 Link 40 Second configuration related information registration unit 50 Configuration relationship analysis unit 51 Configuration related information reading section 52 Configuration information comparison unit 53 Analysis result output section 60 databases 100, 140 Configuration relationship management device 110 input device 120 file execution section 130 Output device 210 Keyword file for configuration output 220 Configuration related output class external file 410 Configuration output library

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】資産の構成関係を抽出するために設定され
たキーワードをコメントとして含むソースファイルを入
力し、該ソースファイル中の該キーワードを参照して該
ソースファイルの資産の構成関係を抽出すると共に、該
キーワードに対応する構成関係を出力するためのクラス
とそのクラスのメソッド呼び出しを該ソースファイルに
埋め込むソースファイル解析手段と、 前記ソースファイル解析手段により構成関係を出力する
ためのクラスを埋め込まれたソースファイルからコンピ
ュータで実行可能なプログラムを生成する実行可能ファ
イル生成手段と、 前記ソースファイル解析手段により抽出された前記ソー
スファイルに書き込まれている全資産の構成関係に関す
るデータファイルと、前記実行可能ファイル生成手段が
前記構成関係を出力するためのクラスとそのクラスのメ
ソッド呼び出しを埋め込まれたプログラムを実行するこ
とによって得られる実際に使用される資産の構成関係に
関するデータファイルとを比較して、前記ソースファイ
ルにおける資産の利用状態を解析する構成関係解析手段
とを備えることを特徴とする構成関係管理装置。
1. A source file containing a keyword set as a comment for extracting a compositional relationship of an asset is input, and the compositional relationship of the asset of the source file is extracted by referring to the keyword in the source file. Together with the class for outputting the structural relationship corresponding to the keyword
And a source file analysis means for embedding a method call of the class in the source file, and an executable program for generating a computer-executable program from the source file in which the class for outputting the configuration relationship by the source file analysis means is embedded. File generating means, a data file relating to the structural relationship of all assets written in the source file extracted by the source file analyzing means, a class for the executable file generating means to output the structural relationship, and a class thereof. Class Me
And a configuration relation analysis means for analyzing the utilization state of the asset in the source file by comparing with a data file relating to the configuration relation of the actually used asset obtained by executing the program in which the sod call is embedded. A configuration relationship management device characterized by the above.
【請求項2】前記ソースファイル解析部が、 前記ソースファイルを読み込んで、該ソースファイルに
前記キーワードがコメントとして埋め込まれていないか
を検索し、検出されたキーワードに対応する構成関係に
関するデータファイルを作成して出力する構成関係抽出
手段と、 前記検出されたキーワードに対応するクラスとそのクラ
スのメソッド呼び出しを前記ソースファイルの該当個所
に埋め込む前処理手段とを備え、 前記実行可能ファイル生成手段が、 コンピュータに実行可能なプログラムを生成する際に、
前記ソースファイル解析手段の前記前処理手段により前
記ソースファイルに埋め込まれたクラスとそのクラスの
メソッド呼び出しの実体を生成したプログラムにリンク
させるリンク手段を備えることを特徴とする請求項1に
記載の構成関係管理装置。
2. The source file analysis unit reads the source file, searches whether the keyword is embedded in the source file as a comment, and retrieves a data file relating to a structural relationship corresponding to the detected keyword. A composition relation extracting means for creating and outputting, a class corresponding to the detected keyword and its class
And a preprocessing means for embedding a method call of a file in a corresponding part of the source file, wherein the executable file generating means generates a computer executable program,
The class embedded in the source file by the preprocessing unit of the source file analysis unit and the class
The configuration relationship management device according to claim 1, further comprising a link unit that links a method call entity to a generated program.
【請求項3】前記ソースファイル解析手段により抽出さ
れた前記ソースファイルに書き込まれている全資産の構
成関係に関するデータファイルと、前記実行可能ファイ
ル生成手段が前記構成関係を出力するためのクラスとそ
のクラスのメソッド呼び出しを埋め込まれたプログラム
を実行することによって得られる実際に使用される資産
の構成関係に関するデータファイルとを登録して保持す
るデータベースを更に備え、 前記構成関係解析手段が、任意のタイミングで該2種類
のデータファイルを読み込み、比較を行うことを特徴と
する請求項1または請求項2に記載の構成関係管理装
置。
3. class for the data file relating to the configuration relationship between all assets written in the source file extracted by said source file analyzing means, said executable file generating means for outputting the configuration relationship and its
The method further comprises a database for registering and holding a data file relating to the compositional relationship of the assets actually used, which is obtained by executing the program in which the method call of the class is embedded, The configuration relationship management device according to claim 1, wherein the two types of data files are read at a timing and compared.
【請求項4】ソースファイルを作成する際に、資産の構
成関係を抽出するために設定されたキーワードをコメン
トとして書き込むステップと、 前記ソースファイルを入力し、該ソースファイル中の前
記キーワードを参照して該ソースファイルの資産の構成
関係を抽出するステップと、 前記キーワードに対応する構成関係を出力するためのク
ラスとそのクラスのメソッド呼び出しを前記ソースファ
イルに埋め込むステップと、 構成関係抽出ステップでためのクラスを埋め込まれた前
記ソースファイルからコンピュータで実行可能なプログ
ラムを生成するステップと、 生成された前記コンピュータで実行可能なプログラムを
実行するステップと、 前記構成関係抽出ステップにおいて抽出された前記ソー
スファイルに書き込まれている全資産の構成関係に関す
るデータファイルと、前記ファイル実行ステップにおい
て前記構成関係を出力するためのクラスとそのクラスの
メソッド呼び出しを埋め込まれたプログラムを実行する
ことによって得られる実際に使用される資産の構成関係
に関するデータファイルとを比較して、前記ソースファ
イルにおける資産の利用状態を解析するステップとを含
むことを特徴とする構成関係管理方法。
4. When creating a source file, a step of writing a keyword set as a comment for extracting a structural relationship of assets as a comment, inputting the source file, and referring to the keyword in the source file The step of extracting the structural relationship of the assets of the source file, the step of embedding a class for outputting the structural relationship corresponding to the keyword and the method call of the class in the source file, and the step of extracting the structural relationship. A step of generating a computer-executable program from the source file in which a class is embedded; a step of executing the generated computer-executable program; and the source file extracted in the configuration relation extracting step, Of all assets written And data files relating to the relationship, the class for outputting the configuration relationship in the file execution step and the class
Comparing the utilization state of the asset in the source file by comparing with a data file relating to the configuration relationship of the asset actually used obtained by executing the program in which the method call is embedded. And configuration management method.
【請求項5】前記コンピュータで実行可能なプログラム
を生成するステップが、 前記クラスの埋め込みステップにおいて前記ソースファ
イルに埋め込まれたクラスとそのクラスのメソッド呼び
出しの実体を生成したプログラムにリンクさせるステッ
プを含むことを特徴とする請求項4に記載の構成関係管
理方法。
5. The class which is embedded in the source file in the step of embedding the class and a method call of the class in the step of generating the computer-executable program.
5. The configuration relationship management method according to claim 4, further comprising the step of linking the originating entity with the generated program.
【請求項6】コンピュータで読み込み、実行可能なプロ
グラムを格納した記憶媒体であって、 前記プログラムが、 資産の構成関係を抽出するために設定されたキーワード
をコメントとして含むソースファイルを入力し、該ソー
スファイル中の該キーワードを参照して該ソースファイ
ルの資産の構成関係を抽出するステップと、 前記キーワードに対応する構成関係を出力するためのク
ラスとそのクラスのメソッド呼び出しを前記ソースファ
イルに埋め込むステップと、 構成関係抽出ステップでためのクラスを埋め込まれた前
記ソースファイルからコンピュータで実行可能なプログ
ラムを生成するステップと、 生成された前記コンピュータで実行可能なプログラムを
実行するステップと、 前記構成関係抽出ステップにおいて抽出された前記ソー
スファイルに書き込まれている全資産の構成関係に関す
るデータファイルと、前記ファイル実行ステップにおい
て前記構成関係を出力するためのクラスとそのクラスの
メソッド呼び出しを埋め込まれたプログラムを実行する
ことによって得られる実際に使用される資産の構成関係
に関するデータファイルとを比較して、前記ソースファ
イルにおける資産の利用状態を解析するステップとを含
むことを特徴とする記憶媒体。
6. A computer-readable storage medium that stores an executable program, wherein the program inputs a source file including a keyword set as a comment to extract a structural relationship of assets, Extracting the compositional relationship of the assets of the source file by referring to the keyword in the source file; embedding a class for outputting the compositional relationship corresponding to the keyword and a method call of the class in the source file A step of generating a computer-executable program from the source file in which a class for the step of extracting a configuration relationship is executed; a step of executing the generated computer-executable program; The source extracted in step And data files relating to the configuration relationship between all assets written to the scan file, class for outputting the configuration relationship in the file execution step and the class
Comparing the utilization state of the asset in the source file by comparing with a data file relating to the configuration relationship of the asset actually used obtained by executing the program in which the method call is embedded. Storage medium.
【請求項7】前記記憶媒体に格納されるプログラムにお
ける前記コンピュータで実行可能なプログラムを生成す
るステップが、 前記クラスの埋め込みステップにおいて前記ソースファ
イルに埋め込まれたクラスとそのクラスのメソッド呼び
出しの実体を生成したプログラムにリンクさせるステッ
プを含むことを特徴とする請求項6に記載の記憶媒体。
7. The step of generating a computer-executable program in a program stored in the storage medium includes a class embedded in the source file in the class embedding step and a method call of the class.
Storage medium according to claim 6, characterized in that it comprises a step of linking the program that generated the entity out.
JP30564399A 1999-10-27 1999-10-27 Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium Expired - Fee Related JP3531728B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30564399A JP3531728B2 (en) 1999-10-27 1999-10-27 Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30564399A JP3531728B2 (en) 1999-10-27 1999-10-27 Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium

Publications (2)

Publication Number Publication Date
JP2001125779A JP2001125779A (en) 2001-05-11
JP3531728B2 true JP3531728B2 (en) 2004-05-31

Family

ID=17947611

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30564399A Expired - Fee Related JP3531728B2 (en) 1999-10-27 1999-10-27 Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium

Country Status (1)

Country Link
JP (1) JP3531728B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7316591B2 (en) * 2017-04-28 2023-07-28 エルゼットラブズ ゲーエムベーハー Containerized deployment of microservices based on monolithic legacy applications
JP7057571B2 (en) * 2017-04-28 2022-04-20 エルゼットラブズ ゲーエムベーハー Containerized deployment of microservices based on monolithic legacy applications

Also Published As

Publication number Publication date
JP2001125779A (en) 2001-05-11

Similar Documents

Publication Publication Date Title
Goldsmith et al. Relational queries over program traces
Sălcianu et al. Purity and side effect analysis for Java programs
US6535903B2 (en) Method and apparatus for maintaining translated routine stack in a binary translation environment
US6199095B1 (en) System and method for achieving object method transparency in a multi-code execution environment
US7484205B2 (en) Preprocessor-based source code instrumentation
Navas et al. User-definable resource bounds analysis for logic programs
Rountev Precise identification of side-effect-free methods in Java
US8423971B2 (en) Generating an application software library
Lam et al. A type system and analysis for the automatic extraction and enforcement of design information
WO1996012224A1 (en) Method and apparatus for testing object-oriented programming constructs
KR19980080502A (en) System and method for optimizing template object files
Washizaki et al. A technique for automatic component extraction from object-oriented programs by refactoring
Favre Preprocessors from an abstract point of view
Aiken et al. A toolkit for constructing type-and constraint-based program analyses
Dean et al. Using design recovery techniques to transform legacy systems
EP2141587A1 (en) Method and system for generating of a control flow graph for representing a program code
JP2018510445A (en) Domain-specific system and method for improving program performance
US7624381B1 (en) Portable detection of start and completion of object construction
Chong et al. Static analysis of accessed regions in recursive data structures
JP3531728B2 (en) Apparatus and method for managing configuration relation of program described in object-oriented programming language, and storage medium
Ferrarotti et al. Stepwise abstraction of high-level system specifications from source code
Şora Unified modeling of static relationships between program elements
Guo et al. Unique renaming of java using source transformation
Van Reeuwijk Rapid and robust compiler construction using template-based metacompilation
Sora A Meta-model for Representing Language-independent Primary Dependency Structures.

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040119

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: 20040212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040225

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: 20080312

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090312

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees