JP2001350624A - Device and method for proposing module subdivision, and recording medium - Google Patents

Device and method for proposing module subdivision, and recording medium

Info

Publication number
JP2001350624A
JP2001350624A JP2000169866A JP2000169866A JP2001350624A JP 2001350624 A JP2001350624 A JP 2001350624A JP 2000169866 A JP2000169866 A JP 2000169866A JP 2000169866 A JP2000169866 A JP 2000169866A JP 2001350624 A JP2001350624 A JP 2001350624A
Authority
JP
Japan
Prior art keywords
program
module
data
instruction
access
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.)
Granted
Application number
JP2000169866A
Other languages
Japanese (ja)
Other versions
JP3763247B2 (en
Inventor
Hiroaki Nagano
浩明 長野
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 JP2000169866A priority Critical patent/JP3763247B2/en
Publication of JP2001350624A publication Critical patent/JP2001350624A/en
Application granted granted Critical
Publication of JP3763247B2 publication Critical patent/JP3763247B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To analyze the behavior of a program under operation to propose a module subdivision for reconstruction of a module constitution. SOLUTION: When a CPU 1 executes the program stored n a program storage part 1, a command access detection part 3 detects the access of the CPU 1 to the command portion of the program, and supplies the address of this command to a correlation estimation part 6. A data access detection part 4 detects the access of the CPU 1 to the data portion of the program and supplies the address of the data portion to the correlation estimation part 6. The correlation estimation part 6 estimates the correlation on the original program of the command portion and the data portion on the basis of the address supplied from the command access detection part 3, the address supplied from the data access detection part 4, and the information of a symbol table, and a module division proposing part 7 proposes a module subdivision on the basis of the estimation result.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、モジュール再分割
提案装置およびモジュール再分割提案方法、並びに記録
媒体に関し、特に、プログラムを分析し、プログラムの
モジュール構成を再構築するための提案を行うモジュー
ル再分割提案装置およびモジュール再分割提案方法、並
びに記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a module subdivision proposal device, a module subdivision proposal method, and a recording medium, and more particularly to a module subdivision that analyzes a program and makes a proposal to reconstruct the program module configuration. The present invention relates to a division proposal device, a module re-division proposal method, and a recording medium.

【0002】[0002]

【従来の技術】従来、分散システムなどではデータ主体
のオブジェクト分割が望ましいが、このようなオブジェ
クト分割を行うために既存のシステムのプログラムの分
析を行う場合、分析の対象となる現用システムが稼働中
であることが多いため、プログラムを静的に分析するこ
とにより(例えば、ソースプログラムを分析することに
より)、システムのプログラムの再構築を行うための情
報を得ていた。
2. Description of the Related Art Conventionally, in a distributed system, it is desirable to divide an object mainly by data. However, when analyzing a program of an existing system in order to perform such an object division, an active system to be analyzed is in operation. Therefore, by statically analyzing the program (for example, by analyzing the source program), information for reconstructing the system program has been obtained.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、プログ
ラムを静的に分析する場合、システムのプログラムの再
構築に匹敵するシステム分析の知識と手間が必要になる
場合がある課題があった。いわば、システムの一からの
再設計にも相当するシステム分析の知識と手間が必要に
なる場合がある。稼働中の現用システムの情報を有効利
用できれば、再構成作業を効率化できるはずである。
However, in the case of statically analyzing a program, there has been a problem that knowledge and labor of system analysis equivalent to restructuring of a system program may be required. In other words, system analysis knowledge and effort equivalent to redesigning the system from scratch may be required. If information on the active system in operation can be used effectively, the reconfiguration work should be more efficient.

【0004】本発明はこのような状況に鑑みてなされた
ものであり、システムが稼働中にシステムのプログラム
の情報を取得して、効率的にシステムの再構築のための
提案を行うことができるようにするものである。
The present invention has been made in view of such a situation, and it is possible to acquire information on a program of a system while the system is operating, and to make a proposal for efficient system reconstruction. Is to do so.

【0005】[0005]

【課題を解決するための手段】請求項1に記載のモジュ
ール再分割提案装置は、動作中のプログラムの挙動を分
析し、プログラムのモジュール構成を再構築するために
モジュールの再分割提案を行うモジュール再分割提案装
置であって、プログラムを展開するプログラム展開手段
と、プログラム展開手段に展開されたプログラムを実行
する実行手段と、実行手段によってプログラムが実行さ
れるとき、実行手段によってプログラム展開手段に展開
されているプログラムの命令部位へのアクセスが行われ
たときの命令部位のプログラム展開手段上での第1のア
ドレスを検出する命令アクセス検出手段と、実行手段に
よってプログラムが実行されるとき、実行手段によって
プログラム展開手段に展開されているプログラムのデー
タ部位へのアクセスが行われたときのデータ部位のプロ
グラム展開手段上での第2のアドレスを検出するデータ
アクセス検出手段と、命令アクセス検出手段によって検
出された第1のアドレスと、データアクセス検出手段に
よって検出された第2のアドレスとに基づいて、命令部
位とデータ部位の相関を推定する相関推定手段と、相関
推定手段による推定結果に基づいて、プログラムのモジ
ュール構成の再構築のためのモジュールの再分割を提案
するモジュール再分割提案手段とを備えることを特徴と
する。また、プログラムがプログラム展開手段に展開さ
れる前の原プログラムのシンボルと、プログラム展開手
段に展開されたプログラムのアドレスとの対応を示す情
報からなるシンボルテーブルをさらに設け、相関推定手
段は、シンボルテーブルの情報に基づいて、原プログラ
ムの命令部位とデータ部位の相関を推定するようにする
ことができる。また、モジュール再分割提案手段は、相
関推定手段による推定結果を、プログラムがプログラム
展開手段に展開される前の原プログラム上でのモジュー
ル単位にまとめ、データ部位を主インデックスとして、
データ部位を操作した命令部位を整列することにより、
データ主体のモジュール分割を行ったときの各データ部
位を操作する命令部位の原プログラム上での位置を検出
し、検出結果に基づいて、プログラムのモジュール構成
のオブジェクト指向的再構築のためのモジュールの再分
割を提案するようにすることができる。また、モジュー
ル再分割提案手段は、相関推定手段による推定結果を、
プログラムがプログラム展開手段に展開される前の原プ
ログラム上でのモジュール単位にまとめ、命令部位を主
インデックスとして、命令部位が操作したデータ部位を
整列することにより、命令主体のモジュール分割を行っ
たときの各命令部位が操作するデータ部位の原プログラ
ム上での位置を検出し、検出結果に基づいて、プログラ
ムのモジュール構成の手続き型再構築のためのモジュー
ルの再分割を提案するようにすることができる。請求項
5に記載のモジュール再分割提案方法は、所定のメモリ
に展開され、動作中のプログラムの挙動を分析し、プロ
グラムのモジュール構成を再構築するためにモジュール
の再分割提案を行うモジュール再分割提案方法であっ
て、プログラムをメモリに展開するプログラム展開ステ
ップと、プログラム展開ステップにおいて展開されたプ
ログラムを実行する実行ステップと、実行ステップにお
いてプログラムが実行されるとき、実行ステップにおい
てメモリに展開されたプログラムの命令部位へのアクセ
スが行われたときの命令部位のメモリ上での第1のアド
レスを検出する命令アクセス検出ステップと、実行ステ
ップにおいてプログラムが実行されるとき、実行ステッ
プにおいてメモリに展開されたプログラムのデータ部位
へのアクセスが行われたときのデータ部位のメモリ上で
の第2のアドレスを検出するデータアクセス検出ステッ
プと、命令アクセス検出ステップにおいて検出された第
1のアドレスと、データアクセス検出ステップにおいて
検出された第2のアドレスとに基づいて、命令部位とデ
ータ部位の相関を推定する相関推定ステップと、相関推
定ステップにおける推定結果に基づいて、プログラムの
モジュール構成の再構築のためのモジュールの再分割を
提案するモジュール再分割提案ステップとを備えること
を特徴とする。請求項6に記載の記録媒体は、請求項5
に記載のモジュール再分割提案方法を実行可能なプログ
ラムが記録されていることを特徴とする。本発明に係る
モジュール再分割提案装置およびモジュール再分割提案
方法、並びに記録媒体においては、プログラムをメモリ
に展開し、展開されたプログラムを実行し、プログラム
が実行されるとき、メモリに展開されたプログラムの命
令部位へのアクセスが行われたときの命令部位のメモリ
上での第1のアドレスを検出し、プログラムが実行され
るとき、メモリに展開されたプログラムのデータ部位へ
のアクセスが行われたときのデータ部位のメモリ上での
第2のアドレスを検出し、検出された第1のアドレス
と、第2のアドレスとに基づいて、命令部位とデータ部
位の相関を推定し、推定結果に基づいて、プログラムの
モジュール構成の再構築のためのモジュールの再分割を
提案する。
According to a first aspect of the present invention, there is provided a module redistribution proposal apparatus which analyzes the behavior of a running program and proposes a module redistribution in order to reconstruct a module configuration of the program. A subdivision proposal device, comprising: a program expanding means for expanding a program; an executing means for executing the program expanded on the program expanding means; and when the program is executed by the executing means, expanding the program to the program expanding means. Instruction access detecting means for detecting a first address on the program expanding means of the instruction part when the instruction part of the program being executed is accessed, and executing means when the program is executed by the executing means Access to the data part of the program expanded by the program expansion means Data access detecting means for detecting a second address of the data portion on the program development means when the data access is performed, the first address detected by the instruction access detecting means, and the data address detected by the data access detecting means. A correlation estimating means for estimating a correlation between an instruction part and a data part based on the second address, and a module re-division for reconstructing a module configuration of the program based on an estimation result by the correlation estimating means are proposed. And a module re-partitioning proposal means. Further, a symbol table comprising information indicating a correspondence between a symbol of the original program before the program is expanded in the program expanding means and an address of the program expanded in the program expanding means is further provided, and the correlation estimating means includes a symbol table. , The correlation between the instruction part and the data part of the original program can be estimated. Further, the module re-division suggesting unit summarizes the estimation result by the correlation estimating unit in units of modules on the original program before the program is developed by the program developing unit, and uses the data part as a main index,
By arranging the instruction parts that operated the data parts,
Detect the position in the original program of the instruction part that operates each data part when performing data-based module division, and based on the detection result, create a module for object-oriented reconstruction of the module configuration of the program. Subdivision may be suggested. Further, the module re-partitioning suggestion unit calculates the estimation result by the correlation estimation unit,
When a module is divided into modules consisting mainly of instructions by grouping modules in the original program before the program is expanded by the program expansion means and using the instruction parts as the main index to arrange the data parts operated by the instruction parts It is possible to detect the position of the data part operated by each instruction part in the original program, and propose a module division for the procedural reconstruction of the module configuration of the program based on the detection result. it can. A module subdivision method according to claim 5, which is developed in a predetermined memory, analyzes the behavior of a running program, and proposes a module subdivision in order to reconstruct a module configuration of the program. A method, comprising: a program development step of developing a program in a memory; an execution step of executing the program developed in the program development step; and, when the program is executed in the execution step, the program is developed in a memory in the execution step. An instruction access detecting step of detecting a first address of the instruction portion on the memory when the instruction portion of the program is accessed; and, when the program is executed in the execution step, the program is expanded in the execution step. Access to the data part of the program A data access detecting step of detecting a second address of the data portion on the memory when the data access is performed, a first address detected in the instruction access detecting step, and a second address detected in the data access detecting step. A correlation estimating step of estimating a correlation between the instruction part and the data part based on the address; and a module re-producing module re-dividing module for reconstructing a module configuration of the program based on the estimation result in the correlation estimating step. And a division proposal step. The recording medium according to claim 6 is the recording medium according to claim 5
A program capable of executing the module re-partitioning proposal method described in (1) is recorded. In the module subdivision proposal device, the module subdivision proposal method, and the recording medium according to the present invention, the program is developed in a memory, the developed program is executed, and when the program is executed, the program is developed in the memory. The first address on the memory of the instruction part when the access to the instruction part was performed was detected, and when the program was executed, the data part of the program expanded in the memory was accessed. The second address of the data part on the memory at the time is detected, the correlation between the instruction part and the data part is estimated based on the detected first address and the second address, and based on the estimation result. Then, we propose subdivision of modules to reconstruct the module configuration of the program.

【0006】[0006]

【発明の実施の形態】本発明は、既存のプログラムの動
作を外部から観察して得た情報に基づいて、プログラム
を再分割するための提案を行うものである。以下、図面
を参照して詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention proposes to re-divide a program based on information obtained by externally observing the operation of an existing program. The details will be described below with reference to the drawings.

【0007】図1は、本発明のモジュール再分割提案装
置の一実施の形態の構成例を示すブロック図である。図
1に示すように、本実施の形態は、分析対象となるプロ
グラムを格納し、展開するためのプログラム格納部2
と、プログラム格納部2に格納されたプログラム(実行
形式ファイル)を実行するCPU(central p
rocessing unit)1と、上記分析対象と
なるプログラムを実行しているCPU1の命令のアクセ
ス(プログラムの命令部分を読み出して実行したこと)
を検出する命令アクセス検出部3と、データのアクセス
(プログラムのデータ部分に対する読み出し又は書き込
みを行ったこと)を検出するデータアクセス検出部4
と、シンボルテーブル5と、命令アクセス検出部3の検
出結果と、データアクセス検出部4の検出結果とに基づ
いて、プログラムのどのデータ部分(以下では適宜単に
データと記載する)に、プログラムのどの命令部分(以
下では適宜単にプログラムと記載する)がアクセスした
のかを検出し、これをシンボルテーブル5の情報と合わ
せて、データとプログラムのモジュールレベルの相関を
算出する相関推定部6と、相関推定部6によって算出さ
れた相関に基づいて、モジュール分割提案を行うモジュ
ール分割提案部7とから構成されている。
FIG. 1 is a block diagram showing an example of the configuration of an embodiment of the module re-partitioning proposal device of the present invention. As shown in FIG. 1, in the present embodiment, a program storage unit 2 for storing and developing a program to be analyzed is provided.
And a CPU (central program) that executes a program (executable file) stored in the program storage unit 2.
processing unit) 1 and access of instructions of the CPU 1 executing the program to be analyzed (reading and executing the instruction portion of the program)
Instruction detection unit 3 for detecting data access, and data access detection unit 4 for detecting data access (reading or writing to the data portion of the program)
Based on the symbol table 5, the detection result of the instruction access detection unit 3, and the detection result of the data access detection unit 4, which data part of the program (hereinafter simply referred to as data as appropriate) A correlation estimating unit 6 for detecting whether an instruction part (hereinafter simply referred to as a program as appropriate) has accessed the information and combining the information with the information in the symbol table 5 to calculate a module-level correlation between the data and the program; And a module division proposal unit 7 for making a module division proposal based on the correlation calculated by the unit 6.

【0008】相関推定部6は、例えば、データ毎に、各
データにアクセスしたプログラムの命令部分をまとめる
ことによって、モジュール構成をオブジェクト指向型の
モジュール構成とするためのモジュール再分割のための
データとプログラムの相関の推定などを行う。これによ
り、モジュール分割提案部7は、オブジェクト指向のモ
ジュール分割提案を行うことができる。また、データと
プログラムを入れ替えると、手続き指向のモジュール再
分割のためのデータとプログラムの相関の推定を行うこ
とができ、モジュール構成を手続き指向のモジュール構
成とするためのモジュール分割提案を行うことができ
る。即ち、プログラム毎に、各プログラムがアクセスし
たデータをまとめることにより、手続き指向のモジュー
ル分割提案を行うことができる。この提案は、モジュー
ル分割提案部7により提示される。
The correlation estimating unit 6 collects, for example, for each data, an instruction portion of a program that has accessed each data, thereby obtaining data for module subdivision for converting the module configuration into an object-oriented module configuration. Estimate the correlation of programs. As a result, the module division proposal unit 7 can make an object-oriented module division proposal. Also, when data and programs are exchanged, it is possible to estimate the correlation between data and programs for procedure-oriented module subdivision, and to make module division proposals to make the module configuration a procedure-oriented module configuration. it can. That is, a procedure-oriented module division proposal can be made by collecting data accessed by each program for each program. This proposal is presented by the module division proposal unit 7.

【0009】通常、このような分析は、プログラムの静
的解析によって人間が行うようにしていたが、本実施の
形態では、現在動作しているシステムのプログラムの挙
動を分析し、その挙動をベースにして新たなモジュール
構成を構築するためのモジュール分割を提案する。従っ
て、実際の動作に則したモジュール分割提案を行うこと
ができるとともに、システム解析作業を大幅に効率化す
ることができる。
Normally, such analysis is performed by a human by static analysis of the program. In the present embodiment, the behavior of the program of the currently operating system is analyzed, and the behavior is based on the analysis. Then, a module division for constructing a new module configuration is proposed. Therefore, it is possible to propose a module division in accordance with the actual operation, and to greatly improve the efficiency of the system analysis work.

【0010】上述したように、本実施の形態は、プログ
ラムを実行するCPU1と、CPU1が実行しているプ
ログラムを格納しているプログラム格納部2と、CPU
1の動作を監視する命令アクセス検出部3と、データア
クセス検出部4を有している。これらの命令アクセス検
出部3とデータアクセス検出部4の検出方法は、ハード
ウェア的なバス監視であっても良いし、定期的なサンプ
リング手法などによるソフトウェア的なものであっても
良い。このように、ハードウェア的に見る方法と、サン
プリングによってどこを実行していたかをソフトウェア
的に見る方法があるが、どちらの方法で行っても良い。
どちらの方法を選ぶかは、本発明にとって本質的な問題
ではない。
As described above, this embodiment comprises a CPU 1 for executing a program, a program storage unit 2 for storing a program executed by the CPU 1,
1 and a data access detection unit 4 for monitoring the operation of the instruction 1. The detection method of the instruction access detection unit 3 and the data access detection unit 4 may be hardware bus monitoring or software based on a periodic sampling method. As described above, there are a method of looking at the hardware and a method of looking at the software where the execution was performed by sampling, but either method may be used.
The choice of which method is not essential to the present invention.

【0011】また、現在実行しているプログラムについ
て、プログラムが展開される仮想空間上のアドレスが、
元のプログラム(原プログラム)のどの部分に対応して
いたかを識別するために、原プログラムを構成する例え
ば「main」や「a」などの文字列と、それらの文字
列が割り付けられた仮想空間上の仮想アドレスとの関係
を示す情報が、コンパイラ及びリンカによって生成さ
れ、シンボルテーブル5とされる。
[0011] In the program currently being executed, the address in the virtual space where the program is expanded is
In order to identify which part of the original program (original program) it corresponds to, a character string such as “main” or “a” that constitutes the original program and a virtual space to which those character strings are assigned Information indicating the relationship with the above virtual address is generated by a compiler and a linker, and is set as a symbol table 5.

【0012】即ち、本実施の形態は、プログラム格納部
2に展開されたプログラム(実行形式ファイル)におけ
る各アドレスが、原プログラム上においてどのようなシ
ンボルを持っていたかを示す情報を保持しているシンボ
ルテーブル5を有し、これを用いて、命令アクセス検出
部3及びデータアクセス検出部4が得た各アドレスと、
原プログラムとの関係を知ることができる。
That is, in the present embodiment, each address in the program (executable file) expanded in the program storage unit 2 holds information indicating what kind of symbol the original program has. It has a symbol table 5 and, using this, each address obtained by the instruction access detection unit 3 and the data access detection unit 4;
Learn about the relationship with the original program.

【0013】例えば、C言語で書かれた次のようなプロ
グラムがあるとする。
For example, assume that there is the following program written in C language.

【0014】 int data1; main() { data1 = 0; for (i = 0; i < 10; i++) { a(data1); data1++; } } a(int d) { printf(”%d¥n”, d); }Int data1; main () {data1 = 0; for (i = 0; i <10; i ++) {a (data1); data1 ++; , D);}

【0015】このプログラムがコンパイルされて実行形
式ファイルになったとき、関数mainの実行命令列、
関数aの実行命令列、データdata1などは、仮想空
間のどこかに割り付けられるが、その各々のアドレスが
原プログラムのどの部分に対応していたかを識別する情
報として、「main」や「a」などの文字列と、それ
らの文字列が割り付けられたアドレスの関係情報が、コ
ンパイラ及びリンカによって一般に生成される。
When this program is compiled into an executable file, an execution instruction sequence of the function "main",
The execution instruction sequence of the function a, the data data1, and the like are allocated somewhere in the virtual space, and "main" or "a" is used as information for identifying which part of the original program corresponds to each address. Generally, a compiler and a linker generate information on a relationship between a character string such as "" and an address to which the character string is allocated.

【0016】ここで、「main」や「a」などをシン
ボル、対応表をシンボルテーブルと呼び、多くの場合、
実行形式ファイルに結合されている。
Here, "main" or "a" is called a symbol, and the correspondence table is called a symbol table.
Linked to the executable file.

【0017】これらの情報を用いて、プログラムとデー
タアクセスの相関を算出する相関推定部6があり、算出
された相関に基づいて、モジュール分割提案部7によ
り、モジュール分割提案が出力される。
There is provided a correlation estimating unit 6 for calculating a correlation between a program and data access using these pieces of information. Based on the calculated correlation, a module division proposal unit 7 outputs a module division proposal.

【0018】次に、本実施の形態の動作について説明す
る。CPU1は、プログラム格納部2に展開されたプロ
グラムに従って動作し、プログラムの所定の部分を実行
し、また、プログラムのデータに対して読み出し及び書
き込みを行う(アクセスする)。この例では、プログラ
ム格納部2には、プログラムの実行時に必要なデータも
格納されており、データはプログラムの一部として実行
形式ファイルの中に含まれている。
Next, the operation of the present embodiment will be described. The CPU 1 operates according to the program developed in the program storage unit 2, executes a predetermined part of the program, and reads and writes (accesses) data of the program. In this example, the program storage unit 2 also stores data necessary for executing the program, and the data is included in the executable file as a part of the program.

【0019】命令アクセス検出部3は、CPU1がプロ
グラム格納部2のプログラムの命令部分を読み出して実
行したことを検出し、その命令に関する情報(例えば、
その命令が展開されている仮想空間上でのアドレス等の
命令アクセス情報)を相関推定部6に供給する。データ
アクセス検出部4は、CPU1が、プログラム格納部2
の所定のデータにアクセスしたことを検出し、アクセス
されたデータに関する情報(例えば、そのデータが展開
されている仮想空間上でのアドレス等のデータアクセス
情報)を相関推定部6に供給する。
The instruction access detecting section 3 detects that the CPU 1 has read and executed an instruction portion of a program in the program storage section 2 and has information on the instruction (for example,
Instruction access information such as an address in a virtual space where the instruction is expanded is supplied to the correlation estimating unit 6. The data access detection unit 4 includes the CPU 1
, And provides information relating to the accessed data (for example, data access information such as an address in a virtual space where the data is expanded) to the correlation estimating unit 6.

【0020】以下、図2のフローチャートを参照して、
相関推定部6の動作について説明する。まず、ステップ
S1において、相関推定部6は、命令アクセス検出部3
によって得られた命令アクセス情報と、データアクセス
検出部4によって得られたデータアクセス情報と、シン
ボルテーブル5の情報により、命令アクセス検出部3と
データアクセス検出部4によって得られた各情報が、シ
ンボルテーブル単位(即ち、モジュール単位)に総括さ
れる。次に、ステップS2において、データ領域(デー
タ部分)毎に、各領域(部分)のデータにアクセスする
プログラム(命令部分)の検出が行われる。次に、ステ
ップS3において、データ部分をインデックスとしたテ
ーブルが生成される。
Hereinafter, referring to the flowchart of FIG.
The operation of the correlation estimating unit 6 will be described. First, in step S1, the correlation estimating unit 6 sets the instruction access detecting unit 3
According to the instruction access information obtained by the command access, the data access information obtained by the data access detection unit 4, and the information of the symbol table 5, each information obtained by the instruction access detection unit 3 and the data access detection unit 4 is symbolized. It is summarized in table units (that is, module units). Next, in step S2, a program (instruction portion) for accessing data in each region (portion) is detected for each data region (data portion). Next, in step S3, a table is generated using the data portion as an index.

【0021】このように、命令アクセス情報とデータア
クセス情報とが原プログラム上でのモジュール構成単位
にまとめられる。この実施の形態では、データを主体と
し、それに従属するプログラム(命令部分)を検出する
ことにより、オブジェクト指向的モジュール再分割提案
が行われる。
As described above, the instruction access information and the data access information are put together in the unit of module configuration on the original program. In this embodiment, an object-oriented module subdivision proposal is made by mainly detecting data and detecting a program (instruction portion) depending on the data.

【0022】即ち、命令アクセス情報とデータアクセス
情報に基づいて、データを主インデックスとしてそのデ
ータに対して操作を行ったプログラム(命令部分又は命
令部位)を求め、そのプログラムを整列させる。そし
て、同一データにアクセスするプログラム部分(命令部
位)をまとめて1つのモジュールとすることにより、デ
ータを主体としたモジュール分割を行うことができる。
この場合、データに従属するプログラム(命令部位)
が、原プログラム上ではどこにあるのかを検出してい
る。従って、原プログラムにおけるモジュール分割を行
うことができる。
That is, based on the instruction access information and the data access information, a program (an instruction portion or an instruction portion) that has performed an operation on the data is determined using the data as a main index, and the programs are aligned. Then, by combining the program parts (instruction parts) that access the same data into one module, module division mainly using data can be performed.
In this case, the program (instruction part) that depends on the data
However, it detects where it is in the original program. Therefore, module division in the original program can be performed.

【0023】この検出結果が、モジュール分割提案部7
によりモジュール分割提案として提示される。このモジ
ュール分割提案は、現在のプログラムを、データを主体
として再モジュール分割する場合に、プログラムの再構
成の提案の意味を持つこととなる。
This detection result is transmitted to the module division
Is presented as a module division proposal. This module division proposal has the meaning of a proposal for reconfiguring a program when the current program is re-divided into modules mainly using data.

【0024】このように、プログラムのオブジェクト指
向型プログラムへの再構成や、現在のシステムで稼働し
ているプログラムの再構成を、プログラムが動作してい
ることをベースとした動的な情報を検出し、分析するこ
とによって行うことにより、プログラムの再構成を、従
来の静的分析による再構成に比して大幅に効率化するこ
とができる。
As described above, the reconfiguration of a program into an object-oriented program and the reconfiguration of a program operating in the current system can be performed by detecting dynamic information based on the operation of the program. By performing the analysis, the reconfiguration of the program can be made much more efficient than the conventional reconfiguration by static analysis.

【0025】次に、本発明の他の実施の形態について説
明する。本実施の形態の構成は図1に示した実施の形態
の場合と同様であるが、本実施の形態においては、相関
推定部6は、命令アクセス検出部3が検出した命令アク
セス情報と、データアクセス検出部4が検出したデータ
アクセス情報とに基づいて、命令アクセス情報を主イン
デックスとして、それに従属するデータを求めるように
する。これにより、プログラムの手続き型再構成を行う
ためのモジュール分割提案を行うことができる。
Next, another embodiment of the present invention will be described. Although the configuration of the present embodiment is the same as that of the embodiment shown in FIG. 1, in the present embodiment, the correlation estimating unit 6 uses the instruction access information detected by the instruction access detecting unit 3 and the data Based on the data access information detected by the access detection unit 4, the instruction access information is used as a main index, and data dependent on the index is obtained. This makes it possible to propose a module division for performing procedural reconstruction of a program.

【0026】また、本発明のさらに他の実施の形態とし
て、シンボルテーブル5のデータを用いないようにすれ
ば、命令アクセス検出部3及びデータアクセス検出部4
の検出結果の可読性は減少するが、現在のプログラム構
成にとらわれないプログラムの再構成を行うためのモジ
ュール分割提案を行うことができる。
As still another embodiment of the present invention, if the data of the symbol table 5 is not used, the instruction access detecting unit 3 and the data access detecting unit 4
Although the readability of the detection result of 減少 is reduced, it is possible to propose a module division for reconstructing a program irrespective of the current program configuration.

【0027】また、上述したような処理を実行するプロ
グラムは、CD−ROM(compact disc
read only memory)、DVD(dig
ital versatile disc)、フロッピ
ディスク、メモリカード等の様々な記録媒体に記録して
提供することができる。そして、そのプログラムは、コ
ンピュータの動作を制御し、プログラム制御されたその
コンピュータが上記プログラムにより指令される所定の
処理を実行する。
A program for executing the above-described processing is a CD-ROM (compact disc).
read only memory), DVD (dig)
It can be provided by being recorded on various recording media such as an italical disc, a floppy disk, and a memory card. The program controls the operation of the computer, and the computer controlled by the program executes a predetermined process instructed by the program.

【0028】また、上記実施の形態の構成及び動作は例
であって、本発明の趣旨を逸脱しない範囲で適宜変更す
ることができることは言うまでもない。
Further, the configuration and operation of the above embodiment are merely examples, and it goes without saying that the configuration and operation can be appropriately changed without departing from the spirit of the present invention.

【0029】[0029]

【発明の効果】以上の如く、本発明に係るモジュール再
分割提案装置およびモジュール再分割提案方法、並びに
記録媒体によれば、プログラムをメモリに展開し、展開
されたプログラムを実行し、プログラムが実行されると
き、メモリに展開されたプログラムの命令部位へのアク
セスが行われたときの命令部位のメモリ上での第1のア
ドレスを検出し、プログラムが実行されるとき、メモリ
に展開されたプログラムのデータ部位へのアクセスが行
われたときのデータ部位のメモリ上での第2のアドレス
を検出し、検出された第1のアドレスと、第2のアドレ
スとに基づいて、命令部位とデータ部位の相関を推定
し、推定結果に基づいて、プログラムのモジュール構成
の再構築のためのモジュールの再分割を提案するように
したので、プログラムが動作中に、プログラムの命令部
位とデータ部位の相関を推定することができ、プログラ
ムの再構築のためのモジュール再分割提案を効率的に行
うことができる。
As described above, according to the module subdivision proposal device, module subdivision proposal method, and recording medium of the present invention, a program is developed in a memory, the developed program is executed, and the program is executed. The first address of the instruction portion on the memory when the instruction portion of the program expanded in the memory is accessed, and when the program is executed, the program expanded in the memory is detected. A second address of the data portion on the memory when the data portion is accessed, and based on the detected first address and the second address, the instruction portion and the data portion are detected. Of the module, and based on the estimation result, propose a module subdivision for reconstructing the module configuration of the program. There during operation, it is possible to estimate the correlation of the instruction portion and the data portion of the program, it is possible to perform module subdivision proposed for reconstruction programs efficiently.

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

【図1】本発明のモジュール再分割提案装置の一実施の
形態の構成例を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of a module re-partitioning proposal device of the present invention.

【図2】図1の実施の形態の動作を説明するためのフロ
ーチャートである。
FIG. 2 is a flowchart for explaining the operation of the embodiment of FIG. 1;

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

1 CPU 2 プログラム格納部 3 命令アクセス検出部 4 データアクセス検出部 5 シンボルテーブル 6 相関推定部 7 モジュール分割提案部 DESCRIPTION OF SYMBOLS 1 CPU 2 Program storage part 3 Instruction access detection part 4 Data access detection part 5 Symbol table 6 Correlation estimation part 7 Module division proposal part

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 動作中のプログラムの挙動を分析し、前
記プログラムのモジュール構成を再構築するために前記
モジュールの再分割提案を行うモジュール再分割提案装
置であって、 前記プログラムを展開するプログラム展開手段と、 前記プログラム展開手段に展開された前記プログラムを
実行する実行手段と、 前記実行手段によって前記プログラムが実行されると
き、前記実行手段によって前記プログラム展開手段に展
開されている前記プログラムの命令部位へのアクセスが
行われたときの前記命令部位の前記プログラム展開手段
上での第1のアドレスを検出する命令アクセス検出手段
と、 前記実行手段によって前記プログラムが実行されると
き、前記実行手段によって前記プログラム展開手段に展
開されている前記プログラムのデータ部位へのアクセス
が行われたときの前記データ部位の前記プログラム展開
手段上での第2のアドレスを検出するデータアクセス検
出手段と、 前記命令アクセス検出手段によって検出された前記第1
のアドレスと、前記データアクセス検出手段によって検
出された前記第2のアドレスとに基づいて、前記命令部
位と前記データ部位の相関を推定する相関推定手段と、 前記相関推定手段による推定結果に基づいて、前記プロ
グラムのモジュール構成の再構築のためのモジュールの
再分割を提案するモジュール再分割提案手段とを備える
ことを特徴とするモジュール再分割提案装置。
1. A module subdivision suggestion apparatus that analyzes the behavior of a running program and proposes subdivision of the module in order to reconstruct the module configuration of the program. Means for executing the program expanded in the program expanding means; and an instruction portion of the program expanded in the program expanding means by the executing means when the program is executed by the executing means. An instruction access detecting means for detecting a first address of the instruction part on the program expanding means when an access is made to the program, and when the program is executed by the executing means, Data part of the program expanded in the program expansion means Detecting a second address on said program loading means of said data portion when the access is performed data access detecting means and said command said first detected by the access detecting means
And a correlation estimating means for estimating a correlation between the instruction part and the data part based on the address of the instruction and the second address detected by the data access detecting means. A module subdivision suggesting unit for proposing subdivision of a module for reconstructing a module configuration of the program.
【請求項2】 前記プログラムが前記プログラム展開手
段に展開される前の原プログラムのシンボルと、前記プ
ログラム展開手段に展開された前記プログラムのアドレ
スとの対応を示す情報からなるシンボルテーブルをさら
に備え、 前記相関推定手段は、前記シンボルテーブルの前記情報
に基づいて、前記原プログラムの前記命令部位と前記デ
ータ部位の相関を推定することを特徴とする請求項1に
記載のモジュール再分割提案装置。
2. The apparatus further comprises a symbol table including information indicating a correspondence between a symbol of an original program before the program is expanded on the program expansion unit and an address of the program expanded on the program expansion unit. 2. The module re-partitioning proposal device according to claim 1, wherein the correlation estimating unit estimates a correlation between the instruction part and the data part of the original program based on the information of the symbol table.
【請求項3】 モジュール再分割提案手段は、前記相関
推定手段による推定結果を、前記プログラムが前記プロ
グラム展開手段に展開される前の原プログラム上でのモ
ジュール単位にまとめ、前記データ部位を主インデック
スとして、前記データ部位を操作した前記命令部位を整
列することにより、データ主体のモジュール分割を行っ
たときの各データ部位を操作する前記命令部位の前記原
プログラム上での位置を検出し、前記検出結果に基づい
て、前記プログラムのモジュール構成のオブジェクト指
向的再構築のためのモジュールの再分割を提案すること
を特徴とする請求項1または2に記載のモジュール再分
割提案装置。
3. A module re-partitioning suggestion unit summarizes an estimation result by the correlation estimation unit in a module unit on an original program before the program is developed by the program development unit, and stores the data part in a main index. By arranging the instruction parts operating the data parts, detecting the position of the instruction parts operating the respective data parts when the data-based module division is performed on the original program, 3. The module subdivision proposal device according to claim 1, wherein a module subdivision for object-oriented reconstruction of a module configuration of the program is proposed based on the result.
【請求項4】 モジュール再分割提案手段は、前記相関
推定手段による推定結果を、前記プログラムが前記プロ
グラム展開手段に展開される前の原プログラム上でのモ
ジュール単位にまとめ、前記命令部位を主インデックス
として、前記命令部位が操作した前記データ部位を整列
することにより、命令主体のモジュール分割を行ったと
きの各命令部位が操作する前記データ部位の前記原プロ
グラム上での位置を検出し、前記検出結果に基づいて、
前記プログラムのモジュール構成の手続き型再構築のた
めのモジュールの再分割を提案することを特徴とする請
求項1または2に記載のモジュール再分割提案装置。
4. A module re-partitioning proposal unit summarizes an estimation result by the correlation estimation unit in a module unit on an original program before the program is developed by the program development unit, and stores the instruction part in a main index. By arranging the data parts operated by the instruction parts, a position on the original program of the data parts operated by each instruction part when the instruction-based module division is performed is detected. Based on the result,
The module subdivision proposal device according to claim 1, wherein a module subdivision for procedural reconstruction of a module configuration of the program is proposed.
【請求項5】 所定のメモリに展開され、動作中のプロ
グラムの挙動を分析し、前記プログラムのモジュール構
成を再構築するために前記モジュールの再分割提案を行
うモジュール再分割提案方法であって、 前記プログラムを前記メモリに展開するプログラム展開
ステップと、 前記プログラム展開ステップにおいて展開された前記プ
ログラムを実行する実行ステップと、 前記実行ステップにおいて前記プログラムが実行される
とき、前記実行ステップにおいて前記メモリに展開され
た前記プログラムの命令部位へのアクセスが行われたと
きの前記命令部位の前記メモリ上での第1のアドレスを
検出する命令アクセス検出ステップと、 前記実行ステップにおいて前記プログラムが実行される
とき、前記実行ステップにおいて前記メモリに展開され
た前記プログラムのデータ部位へのアクセスが行われた
ときの前記データ部位の前記メモリ上での第2のアドレ
スを検出するデータアクセス検出ステップと、 前記命令アクセス検出ステップにおいて検出された前記
第1のアドレスと、前記データアクセス検出ステップに
おいて検出された前記第2のアドレスとに基づいて、前
記命令部位と前記データ部位の相関を推定する相関推定
ステップと、 前記相関推定ステップにおける推定結果に基づいて、前
記プログラムのモジュール構成の再構築のためのモジュ
ールの再分割を提案するモジュール再分割提案ステップ
とを備えることを特徴とするモジュール再分割提案方
法。
5. A module re-segmentation proposal method which is developed in a predetermined memory, analyzes the behavior of a running program, and proposes a re-segmentation of the module in order to reconstruct a module configuration of the program. A program expanding step of expanding the program in the memory; an executing step of executing the program expanded in the program expanding step; when the program is executed in the executing step, expanding the program in the memory in the executing step An instruction access detecting step of detecting a first address of the instruction part on the memory when an access is made to the instruction part of the executed program; and when the program is executed in the execution step, Expanded to the memory in the execution step A data access detection step of detecting a second address of the data part on the memory when an access is made to the data part of the program, and the first access point detected in the instruction access detection step. A correlation estimation step of estimating a correlation between the instruction part and the data part based on the address of the second part and the second address detected in the data access detection step. A module subdivision proposal step of proposing a module subdivision for reconstructing the module configuration of the program.
【請求項6】 請求項5に記載のモジュール再分割提案
方法を実行可能なプログラムが記録されている記録媒
体。
6. A recording medium on which a program capable of executing the method for proposing a module subdivision according to claim 5 is recorded.
JP2000169866A 2000-06-07 2000-06-07 Module subdivision proposing device, module subdivision proposing method, and recording medium Expired - Fee Related JP3763247B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000169866A JP3763247B2 (en) 2000-06-07 2000-06-07 Module subdivision proposing device, module subdivision proposing method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000169866A JP3763247B2 (en) 2000-06-07 2000-06-07 Module subdivision proposing device, module subdivision proposing method, and recording medium

Publications (2)

Publication Number Publication Date
JP2001350624A true JP2001350624A (en) 2001-12-21
JP3763247B2 JP3763247B2 (en) 2006-04-05

Family

ID=18672660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000169866A Expired - Fee Related JP3763247B2 (en) 2000-06-07 2000-06-07 Module subdivision proposing device, module subdivision proposing method, and recording medium

Country Status (1)

Country Link
JP (1) JP3763247B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012014526A (en) * 2010-07-01 2012-01-19 Hitachi Ltd Structure conversion apparatus for program code, and code structure conversion program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593240B (en) * 2013-11-08 2016-11-23 华为技术有限公司 The dispatching method of a kind of optimization and management equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63219036A (en) * 1986-10-17 1988-09-12 Hitachi Ltd Software development support system
JPH03248227A (en) * 1990-02-27 1991-11-06 Fujitsu Ltd Object candidate selecting method
JPH05250152A (en) * 1992-03-09 1993-09-28 Toshiba Corp Software designing assistance device
JPH08241193A (en) * 1995-01-17 1996-09-17 At & T Corp Method for analysis of code segment
JPH09160765A (en) * 1995-12-08 1997-06-20 Hitachi Ltd Production of software parts
JPH09292985A (en) * 1996-04-26 1997-11-11 Hitachi Ltd Program-reusing parts generating method
JP2000089966A (en) * 1998-09-08 2000-03-31 Hitachi Building Systems Co Ltd Method for shifting existing program to object direction

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63219036A (en) * 1986-10-17 1988-09-12 Hitachi Ltd Software development support system
JPH03248227A (en) * 1990-02-27 1991-11-06 Fujitsu Ltd Object candidate selecting method
JPH05250152A (en) * 1992-03-09 1993-09-28 Toshiba Corp Software designing assistance device
JPH08241193A (en) * 1995-01-17 1996-09-17 At & T Corp Method for analysis of code segment
JPH09160765A (en) * 1995-12-08 1997-06-20 Hitachi Ltd Production of software parts
JPH09292985A (en) * 1996-04-26 1997-11-11 Hitachi Ltd Program-reusing parts generating method
JP2000089966A (en) * 1998-09-08 2000-03-31 Hitachi Building Systems Co Ltd Method for shifting existing program to object direction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012014526A (en) * 2010-07-01 2012-01-19 Hitachi Ltd Structure conversion apparatus for program code, and code structure conversion program

Also Published As

Publication number Publication date
JP3763247B2 (en) 2006-04-05

Similar Documents

Publication Publication Date Title
TWI410864B (en) Controlling instruction execution in a processing environment
JP3480973B2 (en) Behavior analysis device for parallel processing system
JP5404204B2 (en) Device, system, and method for detection and processing of misaligned data access
JP4681491B2 (en) Profiling program and profiling method
US7698690B2 (en) Identifying code that wastes time performing redundant computation
KR19990077480A (en) A method and apparatus for structured memory analysis of data processing systems and applications
KR19990077479A (en) A method and apparatus for structured memory analysis of data processing systems and applications
JPH06222952A (en) Debug supporting device
US20120131559A1 (en) Automatic Program Partition For Targeted Replay
EP3577564B1 (en) Efficient retrieval of memory values during trace replay
JP3608915B2 (en) Multiprocessing system performance evaluation method and apparatus, and storage medium storing multiprocessing system performance evaluation program
WO2006022204A1 (en) Source program analysis device and method
CN115328796A (en) Software vulnerability auxiliary positioning method and system for ARM architecture
JP2005284418A (en) Terminal emulation program, recording medium, load testing method, load testing device
US6308324B1 (en) Multi-stage profiler
US10380313B1 (en) Implementation and evaluation of designs for heterogeneous computing platforms with hardware acceleration
JP2007207120A (en) System verifying apparatus and its verification method
JP2001350624A (en) Device and method for proposing module subdivision, and recording medium
CN109344083B (en) Program debugging method, device and equipment and readable storage medium
US20030070117A1 (en) Simulation apparatus and simulation method
JP3833626B2 (en) Test case generation apparatus and test case generation method
CN112905474A (en) Hardware-based advanced program dynamic control flow tracking method and device
JP2663893B2 (en) Architecture simulator
KR20090095573A (en) Employing a buffer to facilitate instruction execution
JP2003015914A (en) Method for producing test program for evaluating information processing unit, device and program describing processing therefor

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041124

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050124

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050816

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050909

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050909

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20050909

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20051024

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051205

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060109

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3763247

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100127

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110127

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110127

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120127

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130127

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130127

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees