JPH04278632A - Software converting/reforming method - Google Patents

Software converting/reforming method

Info

Publication number
JPH04278632A
JPH04278632A JP4161091A JP4161091A JPH04278632A JP H04278632 A JPH04278632 A JP H04278632A JP 4161091 A JP4161091 A JP 4161091A JP 4161091 A JP4161091 A JP 4161091A JP H04278632 A JPH04278632 A JP H04278632A
Authority
JP
Japan
Prior art keywords
module
modules
program
software conversion
converting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4161091A
Other languages
Japanese (ja)
Inventor
Toshihiro Kawakami
川上 利浩
Shigeru Otsuki
繁 大槻
Yuki Takahashi
勇喜 高橋
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP4161091A priority Critical patent/JPH04278632A/en
Publication of JPH04278632A publication Critical patent/JPH04278632A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To improve the maintenance properties, the reliability and the reuse performance of software by attaining a method to convert the structure based on the inter-module coupling relation for a program consisting of plural modules. CONSTITUTION:An existing source program 5 analyzes the constitution, the structure, the variable, etc., of a module based on a module analyzing program 2 and then converts and reforms these constitution, structure and variable, etc., based on a coupling degree conversion program 3. Therefore the inter- module coupling degree is improved to a program already produced with a simple operation. Then the independence is secured for each module. As a result, the maintenance properties, the reliability and the reuse performance can be improved for the program itself.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、プログラムの変数構造
および処理構造のソフトウェア支援変換・再構成方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a software-assisted conversion and reconfiguration method for program variable structures and processing structures.

【0002】0002

【従来の技術】従来の方法は、Glenford J.
Myersの著で、國友義久、伊藤武夫訳の「ソフトウ
ェアの複合/構造化設計」の中に論じられている様に、
作成されたソフトウェアの設計における概念の定義のみ
しか行っていない。また、ソフトウェアの変換・再構成
の観点からみると、特開平1−55643号公報に記載
のように、変数ごとにプログラム内の影響波及範囲を調
べ、記憶装置内に定義しておきユーザの問合せに対し波
及範囲を知らせるだけのものである。プログラム内のモ
ジュール間の関係を調べ、その関係を変換・再構成し、
それぞれで使用されている変数の整合性を確保する方法
、もしくは機能の保存を行う方法についての文献は見当
らなかった。
BACKGROUND OF THE INVENTION A conventional method is described by Glenford J.
As discussed in "Composite/Structured Design of Software" by John Myers, translated by Yoshihisa Kunitomo and Takeo Ito,
It only defines the concepts in the design of the created software. Also, from the viewpoint of converting and reconfiguring software, as described in Japanese Patent Application Laid-Open No. 1-55643, the scope of influence within the program is investigated for each variable, and it is defined in the storage device and the user can make inquiries. It is only intended to inform the public of the scope of influence. Examine the relationships between modules in a program, convert and reconfigure those relationships,
I could not find any literature on how to ensure the consistency of variables used in each, or how to preserve functionality.

【0003】0003

【発明が解決しようとする課題】上記従来技術は、変数
の変換の自動化の点について配慮がされておらず、ユー
ザ操作における変数の変換・再構成による整合性に対す
る信頼度の低さの問題があった。
[Problems to be Solved by the Invention] The above-mentioned prior art does not take into consideration the automation of variable conversion, and has the problem of low reliability regarding consistency due to variable conversion and reconfiguration during user operations. there were.

【0004】本発明の目的は、モジュール間の変数の整
合性を確保する方法、もしくは機能の保存をすることに
ある。
[0004] An object of the present invention is to provide a method for ensuring consistency of variables between modules or preserving functionality.

【0005】本発明の他の目的は、複合設計法の支援を
行ない、ソフトウェアに対してよいモジュール構造の獲
得を行い、ソフトウェアの生産性の向上および、信頼性
の向上または、性能の向上を図ることにある。
Another object of the present invention is to support a composite design method, obtain a good modular structure for software, and improve the productivity, reliability, or performance of software. There is a particular thing.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、ある変数の変換・再構成による他モジュールに対す
る波及効果を調べ、変換された規則に従い機能の保存の
観点から波及効果を生じたモジュールの変数に関する処
理を全て自動的に修正するようにしたものである。
[Means for solving the problem] In order to achieve the above objective, the ripple effect on other modules due to conversion/reconfiguration of a certain variable is investigated, and a module that generates a ripple effect from the viewpoint of preserving functions according to the converted rules. All processing related to variables is automatically corrected.

【0007】上記他の目的を達成するために、プログラ
ム内におけるモジュール間のモジュール間結合度を自動
的に変換するようにしたものである。
[0007] In order to achieve the other object mentioned above, the degree of inter-module coupling between modules within a program is automatically converted.

【0008】[0008]

【作用】本発明によれば、ソフトウェアの機能の保存を
前提とし、ソフトウェアに対してよいモジュール構造の
獲得を行い、ソフトウェアの生産性の向上および、信頼
性の向上または、性能の向上を図るものである。また、
それに付随してソフトウェアのライフサイクルを延ばす
ものである。
[Operation] According to the present invention, on the premise of preserving the functions of the software, a good module structure is obtained for the software, and the productivity, reliability, and performance of the software are improved. It is. Also,
This also extends the life cycle of software.

【0009】[0009]

【実施例】最初に、モジュール間結合度(module
 coupling)の概要を説明する。モジュール間
結合度は、プログラムを構成する複数のモジュールにつ
いて、それぞれのモジュール間の関係および依存度につ
いて、その度合いを定義したものである。モジュール間
結合度の概念については、Glenford J.My
ersの著で、國友義久,伊藤武夫訳の「ソフトウェア
の複合/構造化設計」の中の、第39頁から第80頁に
おいて論じられているので、ここでは簡単にその概念を
説明する。
[Example] First, the degree of coupling between modules (module
An overview of coupling) will be explained below. The degree of inter-module coupling defines the degree of relationship and dependence between the plurality of modules constituting a program. The concept of inter-module coupling is discussed in Glenford J. My
The concept is discussed on pages 39 to 80 of "Composite/Structured Design of Software" by Yoshihisa Kunitomo and Takeo Ito, translated by Yoshihisa Kunitomo and Takeo Ito.

【0010】モジュールとは、実行可能なプログラム命
令の集合であり、独立してコンパイルできる可能性を持
つものである。モジュール間の呼び出し関係を図2をも
とに説明する。図2において、モジュールB(22),
D(24)はモジュールA(21)より呼び出される。 モジュールC(23)はモジュールBに呼び出される。 このとき、モジュールB,C,DはモジュールAに『従
属している』といい、モジュールB,DはモジュールA
に『直接従属している』という。また、モジュールA,
BはモジュールCの『上位モジュールである』といい、
モジュールBはモジュールCの『直接上位モジュールで
ある』という。今後は、以上の定義を用いて説明する。
A module is a collection of executable program instructions that may be independently compiled. The calling relationship between modules will be explained based on FIG. 2. In FIG. 2, module B (22),
D (24) is called by module A (21). Module C (23) is called by module B. In this case, modules B, C, and D are said to be "dependent" on module A, and modules B and D are said to be "dependent" on module A.
It is said to be ``directly dependent'' on. Also, module A,
B is said to be a "superior module" to module C.
Module B is said to be a "direct upper module" of module C. From now on, we will explain using the above definition.

【0011】今回、対象とするモジュール間結合度は、
モジュール間の関係の深さから、次の5段階に分類され
る。ここでは、モジュール間結合度の強い順に説明する
[0011] The degree of coupling between modules targeted this time is:
Based on the depth of the relationship between modules, they are classified into the following five stages. Here, the modules will be explained in descending order of the degree of coupling between modules.

【0012】図3は、共通結合(common cou
pling)のプログラムを概念的に表す図である。(
31)は、プログラムを構成するモジュール(32)が
共通で外部に持っている「構造を持つ変数」を表してい
る。共通結合は、2つ以上の制御関係を持つモジュール
において、構造を持つ外部変数をモジュール間の共通の
変数として使用することで、モジュール間のデータの受
け渡しを行うことを特徴とする。
FIG. 3 shows a common coupling.
FIG. (
31) represents a "variable with a structure" that is common and external to the modules (32) that make up the program. Common coupling is characterized in that data is exchanged between modules by using an external variable with a structure as a common variable between the modules in two or more modules that have a control relationship.

【0013】図4は、外部結合(external c
oupling)のプログラムを概念的に表す図である
。(41)は、プログラムを構成するモジュール(42
)が共通で外部に持っている構造を持たない大域的変数
を表している。外部結合は、2つ以上の制御関係を持つ
モジュールにおいて、構造を持たない大域的変数(外部
変数)をモジュール間の共通の変数として使用すること
で、モジュール間のデータの受け渡しを行うことを特徴
とする。
FIG. 4 shows an external join (external c
FIG. 2 is a diagram conceptually representing a program of "upling". (41) is a module (42) that constitutes a program.
) represents a global variable that has no common external structure. External coupling is characterized by passing data between modules by using unstructured global variables (external variables) as common variables between modules in two or more modules that have a control relationship. shall be.

【0014】これら共通結合と外部結合は、見方を変え
ると、処理の内容としては分断しているが、同一のプロ
グラム内において存在する処理群が、同一の変数領域を
使用すること、つまり処理群をモジュールとしてみると
、モジュールおよび変数領域が包含されているプログラ
ムと見ることが出来る。また、モジュールAがモジュー
ルBを含んでいるとき、モジュールBにおいてモジュー
ルAの変数を使用するとき、これは包含関係における、
共通結合または、外部結合とみなすことが出来る。
If you look at these common connections and external connections differently, they are divided in terms of processing content, but processing groups that exist within the same program use the same variable area, that is, processing groups. When viewed as a module, it can be seen as a program that includes modules and variable areas. Also, when module A includes module B and module B uses a variable of module A, this is due to the inclusion relationship.
It can be considered a common join or an outer join.

【0015】図5は、制御結合(control co
upling)のプログラムを概念的に表す図である。 制御結合は、2つ以上の制御関係を持つモジュールにお
いて、制御を移す際、制御情報を引数として渡すことに
よって、モジュールの論理を制御する。図を例にすると
、制御されるモジュール(51)は、上位モジュール(
52)が発行した制御引数(53)をもとに、制御手続
き(54)により、モジュール内にある複数の手続き(
55)の選択が行われることにより、動作が制御される
FIG. 5 shows the control coupling (control co
FIG. Control coupling controls the logic of a module by passing control information as an argument when transferring control in a module that has two or more control relationships. Taking the figure as an example, the controlled module (51) is the upper module (
Based on the control argument (53) issued by (52), multiple procedures (54) in the module are executed by the control procedure (54).
The operation is controlled by selection 55).

【0016】図6は、スタンプ結合(stamp co
upling)のプログラムを概念的に表す図である。 (61)は上位モジュールを表し、(62)は構造を持
つ引数を表し、(63)は(61)により制御されるモ
ジュールを表す。スタンプ結合は、2つ以上の制御関係
を持つモジュールにおいて、モジュール間のデータの受
け渡しを、構造を持つ変数により行うことを特徴とする
FIG. 6 shows the stamp co
FIG. (61) represents an upper module, (62) represents an argument with structure, and (63) represents a module controlled by (61). Stamp binding is characterized in that data is exchanged between modules in two or more modules that have a control relationship using variables having a structure.

【0017】図7は、データ結合(data coup
ling)のプログラムを概念的に表す図である。(7
1)は上位モジュールを表し、(72)は構造を持たな
い引数を表し、(73)は(71)により制御されるモ
ジュールを表す。データ結合は、2つ以上の制御関係を
持つモジュールにおいて、モジュール間のデータの受け
渡しを、データ要素のパラメータ受け渡しだけで行うこ
とを特徴とする。
FIG. 7 shows data coupling
FIG. 2 is a diagram conceptually representing a program of . (7
1) represents an upper module, (72) represents an argument without structure, and (73) represents a module controlled by (71). Data coupling is characterized in that, in modules that have a control relationship between two or more, data is exchanged between modules only by passing parameters of data elements.

【0018】モジュールの独立性は、モジュール間結合
度が弱くなるほど高くなる。したがって、上述した結合
度の例では、共通結合が最もモジュールの独立性は低く
、外部結合,制御結合,スタンプ結合,データ結合の順
にモジュールの独立性は高くなり、逆の順にモジュール
間結合度は弱くなる。モジュールの独立性が高くなると
同時に、これらモジュールを含むソフトウェア全体の信
頼性,保守性,モジュール再利用性および変更の容易性
が向上する。
The independence of modules increases as the degree of coupling between modules becomes weaker. Therefore, in the example of coupling degree mentioned above, common coupling has the lowest module independence, outer coupling, control coupling, stamp coupling, and data coupling have higher module independence in this order, and in the reverse order, the degree of inter-module coupling is the lowest. become weak. As the independence of modules increases, the reliability, maintainability, module reusability, and ease of modification of the entire software including these modules improves.

【0019】次に、本発明によるソフトウェア変換再構
成方法の一実施例を説明する。図1は、本発明を実施す
る装置構成図を表す。「ソフトウェア変換プロセッサ」
(1)で動作する、プログラムメモリ内の「モジュール
解析プログラム」(2)では、「入力装置部」(4)よ
りソフトウェアの変換再構成の中心となるモジュールの
識別子を受け取り、対象となるプログラム「既存ソース
プログラム」(5)を解析し、モジュールについてその
外部変数、モジュール間の従属関係、モジュール間の結
合度などの情報を、テーブルA(7),テーブルB(8
),テーブルC(9)に格納し、同じく「ソフトウェア
変換プロセッサ」(1)で動作する、プログラムメモリ
内の「結合度変換プログラム」(3)へ処理を渡す。こ
こでは、テーブルA(7),テーブルB(8),テーブ
ルC(9)の情報をもとに、既存ソースプログラムの中
心となるモジュールを、「入力装置部」(4)により指
示されるモジュール間結合度に変換し、「新規ソースプ
ログラム」(6)に格納する。以上の操作により、ソフ
トウェアの変換再構成を行う。
Next, an embodiment of the software conversion and reconfiguration method according to the present invention will be described. FIG. 1 shows a configuration diagram of an apparatus implementing the present invention. "Software conversion processor"
The "module analysis program" (2) in the program memory that operates in (1) receives the identifier of the module that will be the center of software conversion and reconfiguration from the "input device section" (4), and Existing source program" (5) is analyzed and information about modules, such as external variables, inter-module dependencies, and degree of coupling between modules, is stored in Table A (7) and Table B (8).
), is stored in table C (9), and the processing is passed to the "coupling degree conversion program" (3) in the program memory, which also operates on the "software conversion processor" (1). Here, based on the information in table A (7), table B (8), and table C (9), the main module of the existing source program is determined by the module specified by the "input device section" (4). It is converted into an inter-coupling degree and stored in the "new source program" (6). The above operations convert and reconfigure the software.

【0020】以下に述べる実施例では、上記のモジュー
ル間結合度の相互変換が処理の対象となる。以下、『結
合度』と述べるときには、モジュール間結合度を、『変
換』と述べるときには、モジュール間結合度の変換を指
す。なお、ここではC言語を用いたソフトウェアを用い
、モジュールを関数として述べることとする。
In the embodiment described below, mutual conversion of the degree of coupling between modules is the object of processing. Hereinafter, the term "coupling degree" refers to the degree of coupling between modules, and the term "conversion" refers to the conversion of the degree of coupling between modules. Note that software using the C language will be used here, and modules will be described as functions.

【0021】1.モジュールについて解析するここでは
、図1(2)の「モジュール解析プログラム」について
説明する。
1. Analyzing the module Here, the "module analysis program" shown in FIG. 1(2) will be explained.

【0022】モジュール間結合度の判定は、前述の特徴
を基準に行う。ただし、複数の結合度が、あるモジュー
ル間において同時に判定されるときには、それは、結合
度の最も強いものとみなす。以下に、解析の手順を示す
The degree of coupling between modules is determined based on the above-mentioned characteristics. However, when multiple degrees of coupling are determined simultaneously between certain modules, it is assumed that the degree of coupling is the strongest. The analysis procedure is shown below.

【0023】図8は、図1(2)の「モジュール解析プ
ログラム」のモジュールについて解析するステップの動
作フローチャートである。先ず、図1(5)の「既存ソ
ースプログラム」を解析し、それに含まれる全てのモジ
ュールについて、そのモジュールの使用している外部定
義変数を字句解析等で抽出してテーブルAに格納し(8
01)、他モジュールの呼出し部についても同様に抽出
してテーブルBに格納する(802)。次に、「変換」
を指定されたモジュールが使用している外部変数がある
かを調べる(803)。無い場合には、スタンプ結合も
しくはデータ結合であるかの判定部へ処理を移す(82
1)。ある場合には、それが他のモジュールから使用さ
れているかを、テーブルBの情報をもとに調べる(80
4)。使用していなかった場合には、スタンプ結合もし
くはデータ結合であるかの判定部へ処理を移す(822
)。使用していた場合、先程の外部変数を共通変数とし
、それが構造を持っているかを調べる(805)。構造
を持っていない場合には先程の共通変数を使用している
モジュールと「変換」を指定されたモジュールは外部結
合であると判定しその情報をテーブルCに格納する(8
06)。構造を持っていた場合には先程の共通変数を使
用しているモジュールと「変換」を指定されたモジュー
ルは共通結合であると判定しその情報をテーブルCに格
納する(807)。テーブルBのモジュールの呼出し部
の情報より、「変換」を指定されたモジュールと関連す
るモジュールがあるかを調べる(808)。無い場合に
は、処理を終了する(823)。ある場合には、直接上
位モジュールとの関係を調べるため、「変換」を指定さ
れたモジュールの引数が構造を持っているかを調べる(
809)。構造を持っていない場合には、そのモジュー
ルは直接上位モジュールとデータ結合であると判定し、
その情報をテーブルCに格納する(810)。構造を持
っていた場合には、そのモジュールは直接上位モジュー
ルとスタンプ結合であると判定しその情報をテーブルC
に格納する(811)。次に、そのモジュールと従属モ
ジュールとの関係を調べるため、そのモジュールにおけ
る、モジュール呼び出しの引数が構造を持っているかを
、テーブルBのモジュールの呼出し部の情報より調べる
(812)。構造を持っていない場合、このモジュール
と、直接従属モジュールとはデータ結合であると判定し
、その情報をテーブルCに格納する(813)。構造を
持っている場合、このモジュールと、直接従属モジュー
ルとはスタンプ結合であると判定しその情報をテーブル
Cに格納する(814)。
FIG. 8 is an operational flowchart of the step of analyzing a module in the "module analysis program" shown in FIG. 1(2). First, the "existing source program" shown in Figure 1 (5) is analyzed, and externally defined variables used by all modules included in the program are extracted by lexical analysis and stored in table A (8
01), the call sections of other modules are similarly extracted and stored in table B (802). Next, "convert"
It is checked whether there are any external variables used by the specified module (803). If not, the process moves to the judgment unit for stamp combination or data combination (82
1). If so, check whether it is used by another module based on the information in Table B (80
4). If it is not used, the process is moved to the judgment unit for stamp combination or data combination (822
). If it has been used, the external variable is made a common variable and it is checked whether it has a structure (805). If the module does not have a structure, the module that uses the common variable and the module that is specified as "conversion" are determined to be externally connected, and that information is stored in table C (8
06). If the module has a structure, it is determined that the module using the common variable and the module for which "conversion" has been specified are commonly connected, and the information is stored in table C (807). Based on the information of the calling section of the module in Table B, it is checked whether there is a module related to the module designated for "conversion" (808). If there is none, the process ends (823). In some cases, in order to directly check the relationship with the upper module, you can check whether the argument of the module specified with "conversion" has a structure (
809). If the module does not have a structure, it is determined that the module is directly connected to the upper module, and
The information is stored in table C (810). If the module has a structure, it is determined that the module is stamp-bound directly with the upper module, and that information is stored in Table C.
(811). Next, in order to check the relationship between that module and dependent modules, it is checked from the information of the calling part of the module in table B whether the module call argument for that module has a structure (812). If the module does not have a structure, it is determined that this module and the directly dependent module are data-linked, and the information is stored in table C (813). If the module has a structure, it is determined that this module and the directly dependent module are stamp-connected, and the information is stored in table C (814).

【0024】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここでの例では、「変換」が
指定されたモジュールを「main」とする。
Here, a specific example of a program using the C language will be given. Note that in this example, the module to which "conversion" is specified is "main."

【0025】先ず図9のプログラム例を図1(5)の既
存ソースプログラムとして説明する。ソースプログラム
を解析し、モジュール間の共通エリアにおいて定義され
ている変数「a」(94)の情報をテーブルAに格納す
る。そのテーブルAの情報をもとに、全てのモジュール
それぞれについて、そのモジュールの使用している外部
定義変数と、他モジュールの呼出し部を抽出し、テーブ
ルBに格納する。テーブルBには、「main」(91
),「phone_check」(92),「addr
_put」(93)についての情報が格納される。次に
、「変換」を指定されたモジュール「main」が使用
している外部変数「a」を使用しているモジュールをテ
ーブルBよりさがす。さがしだされた「phone_c
heck」について、「a」が構造を持っているので、
共通結合であると判定される。テーブルBの情報より「
main」と関係している他のモジュールをさがす。さ
がしだされた「addr_put」は共通結合もしくは
外部結合でないので、スタンプ結合、もしくはデータ結
合であるとみなす。そこで、さらに対象モジュール「m
ain」との引数を調べる。ここで、引数「b」が構造
体であるので、モジュール「main」とモジュール「
addr_put」はスタンプ結合と判定される。判定
結果は、テーブルCに格納される。ここの処理で格納さ
れた、テーブルの内容を図10に示す。
First, the program example shown in FIG. 9 will be explained as the existing source program shown in FIG. 1(5). The source program is analyzed, and information about the variable "a" (94) defined in the common area between modules is stored in table A. Based on the information in Table A, for each module, externally defined variables used by that module and callers of other modules are extracted and stored in Table B. Table B contains "main" (91
), “phone_check” (92), “addr
_put" (93) is stored. Next, a search is made from Table B for a module that uses the external variable "a" used by the module "main" for which "conversion" is specified. The found “phone_c”
As for "heck", "a" has a structure, so
It is determined that there is a common bond. From the information in table B:
Search for other modules related to "main". Since the found "addr_put" is not a common join or an outer join, it is assumed to be a stamp join or a data join. Therefore, the target module “m”
ain”. Here, since the argument "b" is a structure, the module "main" and the module "
addr_put” is determined to be a stamp combination. The determination result is stored in table C. FIG. 10 shows the contents of the table stored in this process.

【0026】次に図11のプログラム例を図1(5)の
既存ソースプログラムとして説明する。ソースプログラ
ムを解析し、モジュール間の共通エリアにおいて定義さ
れている変数「name」(114),「addres
s」(115),「phone」(116)の情報をテ
ーブルAに格納する。そのテーブルAの情報をもとに、
全てのモジュールそれぞれについて、そのモジュールの
使用している外部定義変数と、他モジュールの呼出し部
を抽出し、テーブルBに格納する。テーブルBには、「
main」(111),「phone_check」(
112),「addr_put」(113)についての
情報が格納される。次に、「変換」を指定されたモジュ
ール「main」が使用している外部変数「name」
,「address」,「phone」を使用している
モジュールをテーブルBよりさがす。さがしだされた「
phone_check」について、その共通変数「p
hone」が構造を持っていないので、外部結合である
と判定される。テーブルBの情報より「main」と関
係している他のモジュールをさがす。さがしだされた「
addr_put」は共通結合もしくは外部結合でない
ので、スタンプ結合、もしくはデータ結合であるとみな
す。そこで、さらに対象モジュール「main」との引
数を調べる。ここで、引数「b」が構造体であるので、
モジュール「main」とモジュール「addr_pu
t」はスタンプ結合と判定される。判定結果は、テーブ
ルCに格納される。ここの処理で格納された、テーブル
の内容を図12に示す。
Next, the program example shown in FIG. 11 will be explained using the existing source program shown in FIG. 1(5). Analyze the source program and check the variables "name" (114) and "address" defined in the common area between modules.
s" (115) and "phone" (116) are stored in table A. Based on the information in table A,
For each module, externally defined variables used by that module and calling parts of other modules are extracted and stored in table B. Table B has "
main” (111), “phone_check” (
112), information about "addr_put" (113) is stored. Next, select the external variable "name" used by the module "main" specified for "conversion".
, "address", and "phone" are searched from table B. Searched for
phone_check”, its common variable “p
Since "hone" has no structure, it is determined that it is an outer join. Search for other modules related to "main" from the information in table B. Searched for
addr_put" is not a common join or an outer join, so it is considered to be a stamp join or a data join. Therefore, the argument to the target module "main" is further examined. Here, since the argument "b" is a structure,
Module “main” and module “addr_pu”
t'' is determined to be a stamp combination. The determination result is stored in table C. FIG. 12 shows the contents of the table stored in this process.

【0027】次に図13のプログラム例を図1(5)の
既存ソースプログラムとして説明する。ソースプログラ
ムを解析し、モジュール間の共通エリアにおいて定義さ
れている変数をさがす。テーブルAには、何も格納され
ないので、全てのモジュールそれぞれについて、そのモ
ジュールの他モジュールの呼出し部を抽出し、テーブル
Bに格納する。テーブルBには、「main」(131
),「phone_check」(132),「add
r_put」(133)についての情報が格納される。 次に、テーブルBの情報より「main」と関係してい
る他のモジュールをさがす。さがしだされた「phon
e_check」,「addr_put」は共通結合も
しくは外部結合でないので、スタンプ結合、もしくはデ
ータ結合であるとみなす。そこで、さらに対象モジュー
ル「main」との引数を調べる。ここで、「phon
e_check」との間では、引数「a」が構造体であ
るので、モジュール「main」とモジュール「pho
ne_check」はスタンプ結合と判定される。また
、「addr_put」との間では、引数「b」が構造
体であるので、モジュール「main」とモジュール「
addr_put」はスタンプ結合と判定される。判定
結果は、テーブルCに格納される。ここの処理で格納さ
れた、テーブルの内容を図14に示す。
Next, the program example shown in FIG. 13 will be explained using the existing source program shown in FIG. 1(5). Analyze the source program and search for variables defined in common areas between modules. Since nothing is stored in table A, the calling parts of other modules are extracted for each module and stored in table B. Table B contains "main" (131
), “phone_check” (132), “add
r_put” (133) is stored. Next, other modules related to "main" are searched from the information in table B. The ``phon'' that was found
Since "e_check" and "addr_put" are not common joins or outer joins, they are considered to be stamp joins or data joins. Therefore, the argument to the target module "main" is further examined. Here, "phon"
e_check”, the argument “a” is a structure, so the module “main” and the module “pho
ne_check” is determined to be a stamp combination. Also, between "addr_put", the argument "b" is a structure, so the module "main" and the module "
addr_put” is determined to be a stamp combination. The determination result is stored in table C. FIG. 14 shows the contents of the table stored in this process.

【0028】次に図15のプログラム例を図1(5)の
既存ソースプログラムとして説明する。ソースプログラ
ムを解析し、モジュール間の共通エリアにおいて定義さ
れている変数をさがす。テーブルAには、何も格納され
ないので、全てのモジュールそれぞれについて、そのモ
ジュールの他モジュールの呼出し部を抽出し、テーブル
Bに格納する。テーブルBには、「main」(151
),「phone_check」(152),「add
r_put」(153)についての情報が格納される。 次に、テーブルBの情報より「main」と関係してい
る他のモジュールをさがす。さがしだされた「phon
e_check」,「addr_put」は共通結合も
しくは外部結合でないので、スタンプ結合、もしくはデ
ータ結合であるとみなす。そこで、さらに対象モジュー
ル「main」との引数を調べる。ここで、「phon
e_check」との間では、引数「phone」は構
造をもたないので、モジュール「main」とモジュー
ル「phone_check」はデータ結合と判定され
る。また、「addr_put」との間では、引数「d
ata_name」,「data_phone」が構造
をもたないので、モジュール「main」とモジュール
「addr_put」はスタンプ結合と判定される。判
定結果は、テーブルCに格納される。ここの処理で格納
された、テーブルの内容を図16に示す。
Next, the program example shown in FIG. 15 will be explained using the existing source program shown in FIG. 1(5). Analyze the source program and search for variables defined in common areas between modules. Since nothing is stored in table A, the calling parts of other modules are extracted for each module and stored in table B. Table B contains "main" (151
), “phone_check” (152), “add
r_put" (153) is stored. Next, other modules related to "main" are searched from the information in table B. The ``phon'' that was found
Since "e_check" and "addr_put" are not common joins or outer joins, they are considered to be stamp joins or data joins. Therefore, the argument to the target module "main" is further examined. Here, "phon"
Since the argument "phone" has no structure between the module "main" and the module "phone_check", it is determined that the module "main" and the module "phone_check" are data coupled. Also, between “addr_put”, the argument “d
Since "data_name" and "data_phone" do not have a structure, the module "main" and the module "addr_put" are determined to be a stamp combination. The determination result is stored in table C. FIG. 16 shows the contents of the table stored in this process.

【0029】2.モジュール間結合度を変換するここで
は、図1(3)の「結合度変換プログラム」について説
明する。
2. Converting the coupling degree between modules Here, the "coupling degree conversion program" shown in FIG. 1(3) will be explained.

【0030】ここでの、変換対象となるモジュールの結
合度は、「1.モジュールについて解析する」の方法を
用い判定されていることとする。ここでも、C言語を使
用したプログラムによる具体例をあげる。同時に、ここ
での例でも「1.モジュールについて解析する」と同じ
く「変換」が指定されたモジュールを「main」とす
る。 なお、ここで『前述の判定処理』というのは、「1.モ
ジュールについて解析する」の方法を用いた判定を指す
[0030] Here, it is assumed that the degree of coupling of the module to be converted has been determined using the method described in "1. Analyzing the module". Here again, a specific example using a program using the C language will be given. At the same time, in this example as well, the module for which "conversion" is specified is set as "main", as in "1. Analyzing modules". Note that the "determination process described above" here refers to determination using the method of "1. Analyze the module."

【0031】2.1  共通結合を、外部結合に変換す
る。以下に、変換の手順を示す。
2.1 Convert common join to outer join. The conversion procedure is shown below.

【0032】図17は、図1(4)の「モジュール解析
プログラム」のうち、共通結合を外部結合に変換するス
テップを示す動作フローチャートである。前述の判定処
理で、テーブルAに格納されている変数のうち、変換対
象のモジュールが使用している構造を持つ変数を分解対
象とし、その構造を成すそれぞれの構成要素を要素変数
としてテーブルDに格納する(1701)。テーブルD
に格納されている変数が、前述の判定処理でテーブルB
に格納されている分解対象の構造を持つ変数を使用する
全てのモジュールにおいて同名の変数が存在しないこと
を調べる(1702)。この時、同名の変数が存在した
場合、その変数名を付け替えてテーブルDに格納し(1
703)、処理(1702)へ戻り、再度、同名の変数
が存在しないことを調べる。同名の変数についての確認
が終了したら(1710)、テーブルDに格納されてい
る各変数について、定義部を作成し(1704)、テー
ブルBに格納されている分解対象の構造を持つモジュー
ル間の共通変数の定義部分を消去し、その変数の参照部
分を、テーブルDに従い書き換える(1705)。
FIG. 17 is an operational flowchart showing the step of converting a common connection into an outer connection in the "module analysis program" shown in FIG. 1(4). In the above judgment process, among the variables stored in table A, variables that have the structure used by the module to be converted are targeted for decomposition, and each component that makes up that structure is stored in table D as element variables. Store (1701). table D
The variables stored in table B are
It is checked that variables with the same name do not exist in all modules that use variables having the structure to be decomposed stored in (1702). At this time, if a variable with the same name exists, that variable name is changed and stored in table D (1
703), returns to the process (1702), and checks again to see if a variable with the same name does not exist. After checking the variables with the same name (1710), create a definition part for each variable stored in table D (1704), and create a definition section for each variable stored in table D. The definition part of the variable is deleted, and the reference part of the variable is rewritten according to Table D (1705).

【0033】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここでは共通結合のプログラ
ム例、図9を、変換のもととなる図1(5)の既存ソー
スプログラムとする。
Here, a specific example of a program using C language will be given. Note that here, the common combination program example shown in FIG. 9 is assumed to be the existing source program shown in FIG. 1 (5) which is the source of conversion.

【0034】前述の判定処理で、テーブルCには「ma
in」と「phone_check」は共通結合で、そ
の共通変数として「a」があると記憶されている。ここ
で、構造を持つ変数「a」の構造を成すそれぞれの構成
要素を要素変数として、「name」,「addres
s」,「phone」をテーブルDに格納する。ここで
、テーブルDの内容を図18に示す。テーブルDに格納
されている変数は、モジュール「main」と「pho
ne_check」において同名の変数が存在しないの
で、テーブルDに格納されている各変数「name」,
「address」,「phone」について、定義部
を作成し、共通変数「a」の定義部分を消去し、参照部
分について、例えば「a.name」をテーブルDに従
い、「name」のように書き換える。ここで、変換さ
れてできたプログラムが図11である。
[0034] In the above-mentioned determination process, table C contains "ma
"in" and "phone_check" are a common combination, and "a" is stored as their common variable. Here, each component of the structure of the variable "a" is defined as an element variable, "name", "address"
s" and "phone" are stored in table D. Here, the contents of table D are shown in FIG. The variables stored in table D are the modules “main” and “pho”.
Since there is no variable with the same name in "ne_check", each variable "name" stored in table D,
Definition parts are created for "address" and "phone", the definition part of the common variable "a" is deleted, and for the reference part, for example, "a.name" is rewritten as "name" according to Table D. The converted program is shown in FIG. 11.

【0035】2.2  共通結合を、スタンプ結合に変
換する。以下に、変換の手順を示す。
2.2 Convert common joins to stamp joins. The conversion procedure is shown below.

【0036】図19は、図1(4)の「モジュール解析
プログラム」のうち、共通結合をスタンプ結合に変換す
るステップを示す動作フローチャートである。前述の判
定処理で、テーブルCに格納されている情報より、変換
対象のモジュールが使用している外部変数を共通変数と
して、その共通変数を使用しているモジュールの最も上
位にあたるモジュール内に、それを内部変数として定義
部を作成する(1901)。それ以外のモジュールにつ
いて、その共通変数を呼び出し引数として、インタフェ
ース部ならびに定義部を作成する(1902)。また、
モジュール間の共通変数については、その定義部を消去
する(1903)。
FIG. 19 is an operation flowchart showing the step of converting a common connection into a stamp connection in the "module analysis program" shown in FIG. 1(4). In the above judgment process, based on the information stored in Table C, the external variables used by the module to be converted are set as common variables, and the common variables are added to the topmost module of the module that uses them. A definition section is created using as an internal variable (1901). For other modules, interface sections and definition sections are created using the common variables as call arguments (1902). Also,
For common variables between modules, the definition part is deleted (1903).

【0037】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここでは共通結合のプログラ
ム例、図9を、変換のもととなる図1(5)の既存ソー
スプログラムとする。
Here, a specific example of a program using the C language will be given. Note that here, the common combination program example shown in FIG. 9 is assumed to be the existing source program shown in FIG. 1 (5) which is the source of conversion.

【0038】前述の判定処理で、テーブルCには「ma
in」と「phone_check」は共通結合で、そ
の共通変数として「a」があり、「main」は「ph
one_check」の直接上位モジュールであると記
憶されている。上位にあたるモジュール「main」内
に、共通変数「a」について定義部を作成する。そして
、その直接従属モジュールである「phone_che
ck」のモジュールの呼び出し引数を先程の共通変数と
して、インタフェース部ならびに定義部を作成する。ま
た、テーブルCに格納されているモジュール間の共通変
数「a」については、その定義部を消去する。ここで、
変換されてできたプログラムが図13である。
In the above-mentioned determination process, table C contains "ma
in” and “phone_check” are a common combination, their common variable is “a”, and “main” is “ph”.
one_check" is stored as a direct upper module. A definition section is created for the common variable "a" in the upper module "main". And its directly dependent module “phone_che”
Create an interface part and a definition part using the call argument of the "ck" module as the common variable. Furthermore, regarding the common variable "a" between modules stored in table C, its definition part is deleted. here,
The converted program is shown in FIG.

【0039】2.3  外部結合を、データ結合に変換
する。以下に、変換の手順を示す。
2.3 Convert outer join to data join. The conversion procedure is shown below.

【0040】図20は、図1(4)の「モジュール解析
プログラム」のうち、外部結合を、データ結合に変換す
るステップを示す動作フローチャートである。前述の判
定処理で、テーブルCに格納されている情報より、変換
対象のモジュールが使用している外部変数を共通変数と
し、その共通変数について、それを使用しているモジュ
ールの最も上位にあたるモジュール内に、それを内部変
数として定義部を作成する(2001)。定義部を作成
しなかったモジュールについて、その外部変数を呼び出
し引数として、インタフェース部ならびに定義部を作成
する(2002)。最後に、モジュール間の共通変数に
ついては、その定義部を消去する(2003)。ここで
、C言語を使用したプログラムによる具体例をあげる。 なお、ここでは外部結合のプログラム例、図11を、変
換のもととなる図1(5)の既存ソースプログラムとす
る。
FIG. 20 is an operational flowchart showing the step of converting an external link into a data link in the "module analysis program" shown in FIG. 1(4). In the above judgment process, from the information stored in table C, the external variables used by the module to be converted are set as common variables, and the common variables are stored in the module that is the highest level of the module that uses them. Then, a definition section is created using it as an internal variable (2001). For modules for which no definition section has been created, an interface section and a definition section are created using the external variable as a call argument (2002). Finally, for common variables between modules, the definition part is deleted (2003). Here, a specific example using a program using C language will be given. Note that here, the external link program example shown in FIG. 11 is assumed to be the existing source program shown in FIG. 1 (5) that is the source of the conversion.

【0041】前述の判定処理で、テーブルCには「ma
in」と「phone_check」は外部結合で、そ
の共通変数として「phone」があり、「main」
は「phone_check」の直接上位モジュールで
あると記憶されている。上位にあたるモジュール「ma
in」内に、共通変数「phone」について定義部を
作成する。そして、その直接従属モジュールである「p
hone_check」のモジュールの呼び出し引数を
先程の共通変数として、インタフェース部ならびに定義
部を作成する。また、テーブルCに格納されているモジ
ュール間の共通変数「phone」については、その定
義部を消去する。また、「name」,「addres
s」については、「main」内のみでしか使用されて
いないので「main」内にその定義部を作成する。最
後に、共通エリアに定義されている「name」,「a
ddress」,「phone」については、その定義
部を消去する。ここで、変換されてできたプログラムが
図36である。
[0041] In the above-mentioned determination process, table C contains "ma
in" and "phone_check" are outer joins, and their common variable is "phone", and "main"
is stored as a direct upper module of "phone_check". The upper module “ma”
A definition section is created for the common variable "phone" in "in". And its directly dependent module “p
Create an interface part and a definition part by using the call argument of the "hone_check" module as the common variable. Furthermore, regarding the common variable "phone" between modules stored in table C, its definition part is deleted. Also, "name", "address"
Since "s" is used only in "main", its definition section is created in "main". Finally, "name" and "a" defined in the common area
ddress" and "phone", their definition parts are deleted. Here, the converted program is shown in FIG.

【0042】2.4  スタンプ結合を、データ結合に
変換する。以下に、変換の手順を示す。図21は、図1
(4)の「モジュール解析プログラム」のうち、スタン
プ結合を、データ結合に変換するステップを示す動作フ
ローチャートである。前述の判定処理で、テーブルCに
格納されている情報より、引数として使用されている構
造を持つ変数の、構造を成すそれぞれの構成要素を要素
変数としてテーブルDに格納する(2101)。テーブ
ルDに格納されている変数のうち、未判定の要素変数を
抽出しそれを当該変数とする(2102)。ここで、要
素変数が抽出(2103)できなかった場合には(21
21)、もとの共通変数の定義部を消去して(2110
)処理を終了する。当該変数を使用している全てのモジ
ュールにおいて同名の変数が存在しないことを調べる(
2104)。この時、同名の変数が存在した場合、その
変数名を付け替えてテーブルDに格納し(2105)、
処理(2104)へ戻り、再度、同名の変数が存在しな
いことを調べる。同名の変数についての確認が終了した
ら(2122)、当該変数に関連するモジュールより、
制御関係で最上位にあるモジュールをテーブルBの情報
をもとにソースプログラムより探し(2106)、その
最上位モジュール内に当該変数を内部変数として定義部
を作成する(2107)。そして最上位以外の関連モジ
ュールに対し、当該変数を引数として定義する(210
8)。そして、関連モジュール内の当該変数の参照部分
を書き換え(2109)、処理(2102)へ戻る。
2.4 Convert stamp binding to data binding. The conversion procedure is shown below. Figure 21 is Figure 1
It is an operation flowchart showing the step of converting a stamp combination into a data combination in the "module analysis program" of (4). In the above-described determination process, each component of the structure of the variable having the structure used as an argument is stored in table D as an element variable based on the information stored in table C (2101). Among the variables stored in table D, undetermined element variables are extracted and used as the relevant variables (2102). Here, if the element variable could not be extracted (2103), (21
21), delete the definition part of the original common variable (2110
) Terminate processing. Check that variables with the same name do not exist in all modules that use the variable (
2104). At this time, if a variable with the same name exists, the variable name is changed and stored in table D (2105),
Returning to the process (2104), it is checked again to see if a variable with the same name does not exist. After checking the variables with the same name (2122), from the module related to the variable,
The module at the highest level in the control relationship is searched for in the source program based on the information in table B (2106), and a definition section is created in the highest level module with the variable as an internal variable (2107). Then, define the variable as an argument for related modules other than the top level (210
8). Then, the reference portion of the variable in the related module is rewritten (2109), and the process returns to step (2102).

【0043】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここではスタンプ結合のプロ
グラム例、図13を、変換のもととなる図1(5)の既
存ソースプログラムとする。
Here, a specific example of a program using the C language will be given. Note that here, the program example for combining stamps, shown in FIG. 13, is assumed to be the existing source program shown in FIG. 1(5), which is the source of conversion.

【0044】前述の判定処理で、テーブルCには「ma
in」と「phone_check」はスタンプ結合で
、その引数として「a」があり、「main」は「ph
one_check」の直接上位モジュールであると記
憶されている。さらに、「main」と「addr_p
ut」もスタンプ結合で、その共通変数として「b」が
あり、「main」は「addr_put」の直接上位
モジュールであると記憶されている。ここで、構造を持
つ変数「a」の構造を成すそれぞれの構成要素を要素変
数として、「name」,「address」,「ph
one」をテーブルDに格納する。ここで、テーブルD
の内容を図22に示す。テーブルDに格納されている変
数は、モジュール「main」と「phone_che
ck」において同名の変数が存在しないので、テーブル
Dに格納されている各変数「name」,「addre
ss」,「phone」について、定義部を作成し、共
通変数「a」の定義部分を消去し、参照部分について、
例えば「a.name」をテーブルDに従い、「nam
e」のように書き換える。構造を持つ変数「b」におい
ても同様の操作を行う。ここで、変換されてできたプロ
グラムが図15である。
[0044] In the above-mentioned determination process, table C contains "ma
in” and “phone_check” are stamp joins, have “a” as their argument, and “main” is “ph
one_check" is stored as a direct upper module. Furthermore, "main" and "addr_p"
ut" is also a stamp combination, and has "b" as its common variable, and "main" is stored as a direct upper module of "addr_put". Here, each component of the structure of the variable "a" is defined as an element variable, "name", "address", "ph".
one” is stored in table D. Here, table D
The contents are shown in FIG. The variables stored in table D are the modules "main" and "phone_che".
Since there is no variable with the same name in "ck", each variable "name" and "addre" stored in table D
Create definition parts for "ss" and "phone", delete the definition part of the common variable "a", and for the reference part,
For example, if "a.name" is specified according to table D, "nam
Rewrite it as "e". A similar operation is performed for the variable "b" which has a structure. The converted program is shown in FIG. 15.

【0045】2.5  制御結合をデータ結合に変換す
る。以下に、変換の手順を示す。ただし、ユーザが変換
を指定したモジュールが制御結合であるという前提のも
とで処理を行う。
2.5 Convert control binding to data binding. The conversion procedure is shown below. However, processing is performed on the premise that the module for which the user has specified conversion is a control connection.

【0046】図23は、図1(4)の「モジュール解析
プログラム」のうち、制御結合をデータ結合に変換する
ステップを示す動作フローチャートである。先ず、制御
される側のモジュールの引数のうち、一つを抽出し、そ
れを当該変数とする(2301)。ここで(2302)
、引数が抽出できなかった場合は(2311)処理を終
了する。次に、その当該変数が判定文のみで使用されて
いるかを調べ(2303)、そうでなければ(2312
)処理(2301)に戻り、そうであれば判定分岐後の
処理が背反であるかを調べる(2304)。ここで、背
反でない場合は処理(2301)に戻り、背反である場
合は当該変数を制御引数とみなし、各手続きごとに必要
な引数を探しだし、それぞれの手続きを関数化し(23
05)、入り口を設ける。そして、共通の処理を共通関
数化し(2306)、呼出し側も、制御変数の情報をも
とに、呼出し部を制御する処理ごとに分割し、関数呼出
し部を修正する(2307)。
FIG. 23 is an operational flowchart showing the step of converting control connections into data connections in the "module analysis program" shown in FIG. 1(4). First, one of the arguments of the controlled module is extracted and used as the variable (2301). Here (2302)
, if the argument could not be extracted (2311), the process ends. Next, check whether the variable is used only in judgment statements (2303), and if not (2312)
) Return to the process (2301), and if so, check whether the process after the decision branch is contradictory (2304). Here, if there is no conflict, return to the process (2301), and if there is a conflict, the variable is regarded as a control argument, necessary arguments are found for each procedure, and each procedure is converted into a function (23
05), provide an entrance. Then, the common process is converted into a common function (2306), and the calling side also divides the calling part into each controlled process based on the information of the control variables, and modifies the function calling part (2307).

【0047】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここでは制御結合のプログラ
ム例、図24を、変換のもととなる図1(5)の既存ソ
ースプログラムとする。
Here, a specific example of a program using the C language will be given. Note that here, the program example of control coupling, shown in FIG. 24, is assumed to be the existing source program shown in FIG. 1(5), which is the source of the conversion.

【0048】制御される側のモジュールの引数「sw」
を当該変数として抽出する。この引数「sw」は判定文
「switch」のみでの使用であり、「case」文
で分岐するそれぞれの制御が背反であるので、制御引数
とみなす。そして各手続きごとに必要な引数、つまり使
用している引数を抽出しそれを引数にして、それぞれの
分岐後の処理を関数化し、入り口を設ける。そして、各
手続きで使用されている変数を字句解析等で調べ、変数
の定義をそれぞれ移管する。そして、共通の処理を共通
関数化し、呼出し側も、制御変数の情報をもとに、呼出
し部を制御する処理ごとに分割し、関数呼出し部を修正
する。ここで、変換されてできたプログラムが図25で
ある。
Argument “sw” of the controlled module
is extracted as the relevant variable. This argument "sw" is used only in the judgment statement "switch", and since each branching control in the "case" statement is contradictory, it is regarded as a control argument. Then, for each procedure, extract the necessary arguments, that is, the arguments used, use them as arguments, convert the processing after each branch into a function, and provide an entry point. Then, the variables used in each procedure are examined using lexical analysis, etc., and the definitions of the variables are transferred. Then, the common processing is converted into a common function, and the calling side also divides the calling part into each controlled process based on the information of the control variables, and modifies the function calling part. Here, the converted program is shown in FIG. 25.

【0049】2.6  データ結合を、外部結合に変換
する。以下に、変換の手順を示す。
2.6 Convert data join to outer join. The conversion procedure is shown below.

【0050】図26は、図1(4)の「モジュール解析
プログラム」のうち、データ結合を外部結合に変換する
ステップを示す動作フローチャートである。前述の判定
処理で、テーブルCに格納されている情報より、変換対
象のモジュールと関連するモジュールとの間のインタフ
ェースに使用されている引数を、一つ抽出する(260
1)。 もし引数が無い場合(2602)には処理を終了する(
2610)。抽出引数を外部変数としたときに、テーブ
ルAにもとからある外部変数に同名のものがないことを
確認して(2611)、モジュール外に定義部を作成し
、元の定義部を削除する(2605)。テーブルAに同
名の変数がある場合には、ユニークな名前にして(26
04)再度確認する。そして、共通変数を持ったモジュ
ールについて、その変数を呼び出し引数として使用して
いたモジュールのインタフェース部ならびに参照部分の
修正を行う(2606)。終了したら、他の引数につい
て同様の動作を繰り返す。
FIG. 26 is an operation flowchart showing the step of converting a data connection into an external connection in the "module analysis program" shown in FIG. 1(4). In the above judgment process, one argument used in the interface between the module to be converted and the related module is extracted from the information stored in table C (260).
1). If there are no arguments (2602), the process ends (
2610). When the extraction argument is an external variable, check that there is no existing external variable in table A with the same name (2611), create a definition part outside the module, and delete the original definition part. (2605). If there is a variable with the same name in table A, use a unique name (26
04) Check again. Then, for modules that have a common variable, the interface section and reference section of the module that used the variable as a call argument are corrected (2606). When finished, repeat the same operation for other arguments.

【0051】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここではデータ結合のプログ
ラム例、図15を、変換のもととなる図1(5)の既存
ソースプログラムとする。
Here, a specific example of a program using the C language will be given. Here, the example program for data combination shown in FIG. 15 is assumed to be the existing source program shown in FIG. 1 (5) which is the source of the conversion.

【0052】前述の判定処理で、テーブルCには「ma
in」と「phone_check」はデータ結合で、
その引数として「phone」があり、「main」は
「phone_check」の直接上位モジュールであ
ると記憶されている。「main」と「phone_c
heck」との間のインタフェースに使用されている引
数「phone」を抽出し、関連するモジュールにおい
て使用されていないかテーブルBの情報をもとにさがす
。みつからないので、つぎに、「phone」を「ma
in」,「phone_check」の共通変数として
扱うためにテーブルAの情報より同名変数のチェックを
行う。同名変数が無いので、「phone」を外部変数
として定義する。共通変数「phone」を持ったモジ
ュールについて「phone」を呼び出し引数として使
用していたインタフェース部ならびに定義部を削除する
。最後に、その「main」,「phone_chec
k」の「phone」参照部を外部変数参照用に修正す
る。終了したら、他の引数についても同様の動作を繰り
返す。ここで、変換されてできたプログラムが図27で
ある。
[0052] In the above-mentioned judgment process, table C contains "ma
in” and “phone_check” are data joins,
It has "phone" as its argument, and "main" is stored as a direct upper module of "phone_check". "main" and "phone_c"
The argument "phone" used in the interface with "heck" is extracted, and it is searched based on the information in Table B to see if it is used in any related module. I can't find it, so next I change "phone" to "ma".
In order to treat this as a common variable for "in" and "phone_check", variables with the same name are checked based on the information in table A. Since there is no variable with the same name, "phone" is defined as an external variable. For a module that has a common variable "phone", delete the interface section and definition section that used "phone" as a call argument. Finally, the “main”, “phone_chec”
Modify the ``phone'' reference part of ``k'' to refer to an external variable. When finished, repeat the same operation for other arguments. Here, the converted program is shown in FIG. 27.

【0053】2.7  データ結合を、スタンプ結合に
変換する。以下に、変換の手順を示す。図28は、図1
(4)の「モジュール解析プログラム」のうち、データ
結合をスタンプ結合に変換するステップを示す動作フロ
ーチャートである。前述の判定処理で、テーブルCに格
納されている情報より、変換対象のモジュールと関連す
るモジュールとの間のインタフェースに、使用されてい
る引数が複数ある場合、その引数を抽出する(2801
)。該当するインタフェースが無い場合は、処理を終了
する(2810)。ある場合には(2810)、抽出さ
れた複数の引数を構造を持つ引数として合成する(28
03)。もし、ここで(2804)合成したことにより
できた引数と、関連するモジュールに同一名称の変数が
存在した場合、引数の名前をユニークに付け替える(2
805)。そうしてできた引数について、定義部を作成
し、もとの定義部を削除する(2806)。ここで操作
した引数の参照部を修正する(2807)。終了したら
、他のインタフェース部についても同様の操作を繰り返
す。
2.7 Convert data binding to stamp binding. The conversion procedure is shown below. Figure 28 shows Figure 1.
It is an operation flowchart showing the step of converting a data combination into a stamp combination in the "module analysis program" of (4). In the above judgment process, if there are multiple arguments used in the interface between the module to be converted and the related module from the information stored in table C, the arguments are extracted (2801
). If there is no corresponding interface, the process ends (2810). In some cases (2810), the extracted arguments are synthesized as arguments with structure (28
03). If the argument created by combining here (2804) and a variable with the same name exist in the related module, the name of the argument is changed to be unique (2
805). A definition section is created for the argument thus created, and the original definition section is deleted (2806). The reference part of the manipulated argument is corrected (2807). When finished, repeat the same operation for the other interface sections.

【0054】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここではデータ結合のプログ
ラム例、図15を、変換のもととなる図1(5)の既存
ソースプログラムとする。
Here, a specific example of a program using the C language will be given. Here, the example program for data combination shown in FIG. 15 is assumed to be the existing source program shown in FIG. 1 (5) which is the source of the conversion.

【0055】前述の判定処理で、テーブルCには「ma
in」と「addr_put」はデータ結合で、その引
数として「data_name」,「data_pho
ne」があり、「main」は「addr_put」の
直接上位モジュールであると記憶されている。 ここで、変数「data_name」,「data_p
hone」に、構造を持たせて、構造を持つ変数として
ユニークな名前を付けて「a」とする。関連するモジュ
ール、「main」と「addr_put」内には「a
」という名前は無いが、もしここで、「a」という変数
がある場合には「a」を別の名前に付け替える。最後に
、「main」と「addr_put」内の「data
_name」,「data_phone」の参照部分を
「data_name」を「a.data_name」
,「data_phone」を「a.data_pho
ne」のように修正する。終了したら、他のインタフェ
ース部についても同様の操作を繰り返す。ここで、変換
されてできたプログラムが図29である。
In the above-mentioned determination process, table C contains "ma
"in" and "addr_put" are data joins, and their arguments are "data_name" and "data_pho".
ne", and "main" is stored as being a directly upper module of "addr_put". Here, the variables “data_name” and “data_p
``hone'' has a structure and gives it a unique name as a variable with a structure, ``a''. Related modules, "main" and "addr_put" contain "a"
”, but if there is a variable called “a”, change “a” to another name. Finally, the “data” in “main” and “addr_put”
_name”, the reference part of “data_phone” is changed to “data_name” and “a.data_name”.
, “data_phone” to “a.data_pho”
Correct it as "ne". When finished, repeat the same operation for the other interface sections. The converted program is shown in FIG. 29.

【0056】2.8  外部結合を、共通結合に変換す
る。以下に、変換の手順を示す。
2.8 Convert outer joins to common joins. The conversion procedure is shown below.

【0057】図30は、図1(4)の「モジュール解析
プログラム」のうち、外部結合を、共通結合に変換する
ステップを示す動作フローチャートである。前述の判定
処理で、テーブルCに格納されている情報より、モジュ
ール間に共通変数として使用されている外部変数が複数
存在する場合に(3001)、それらの外部変数を要素
変数として構造を持つ変数に合成する(3002)。も
し、ここで関連するモジュールに同一名称の変数が存在
した場合(3003)、変数名をユニークに付け替える
(3004)。そうして、合成した変数の定義部を作成
し、もとの要素変数の定義部を削除する。そして、ここ
で操作した変数の参照部を修正する。
FIG. 30 is an operation flowchart showing the step of converting an external connection into a common connection in the "module analysis program" shown in FIG. 1(4). In the above judgment process, according to the information stored in table C, if there are multiple external variables that are used as common variables between modules (3001), variables that have a structure with those external variables as element variables. (3002). If a variable with the same name exists in the related module (3003), the variable name is changed to be unique (3004). Then, a definition part of the synthesized variable is created, and the definition part of the original element variable is deleted. Then, modify the reference part of the variable manipulated here.

【0058】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここでは外部結合のプログラ
ム例、図11を、変換のもととなる図1(5)の既存ソ
ースプログラムとする。
Here, a specific example of a program using the C language will be given. Note that here, the external link program example shown in FIG. 11 is assumed to be the existing source program shown in FIG. 1 (5) that is the source of the conversion.

【0059】前述の判定処理で、テーブルCには「ma
in」と「phone_check」は外部結合で、そ
の共通変数として「name」,「address」,
「phone」があり、「main」は「phone_
check」の直接上位モジュールであると記憶されて
いる。ここで、変数「name」,「address」
,「phone」に、構造を持たせて、構造を持つ変数
としてユニークな名前を付けて「a」とする。関連する
モジュール、「main」と「phone_check
」内には「a」という名前は無いが、もしここで、「a
」という変数がある場合には「a」を別の名前に付け替
える。最後に、「main」と「phone_chec
k」内の「name」,「phone」の参照部分を「
name」を「a.name」,「phone」を「a
.phone」のように修正する。ここで、変換されて
できたプログラムが図31である。
In the above-mentioned determination process, table C contains "ma
in” and “phone_check” are outer joins, and their common variables are “name”, “address”,
There is "phone" and "main" is "phone_
"check" is stored as a direct upper module of "check". Here, the variables "name" and "address"
, "phone" have a structure, and give a unique name as a variable with structure to "a". Related modules, "main" and "phone_check"
” does not have the name “a”, but if here, “a”
”, replace “a” with another name. Finally, "main" and "phone_chec"
The reference parts of “name” and “phone” in “k” are changed to “
name” to “a.name”, “phone” to “a”
.. ``phone''. The converted program is shown in FIG. 31.

【0060】2.9  スタンプ結合を、共通結合に変
換する。以下に、変換の手順を示す。
2.9 Convert stamp joins to common joins. The conversion procedure is shown below.

【0061】図32は、図1(4)の「モジュール解析
プログラム」のうち、スタンプ結合を、共通結合に変換
するステップを示す動作フローチャートである。前述の
判定処理で、テーブルCに格納されている情報より、変
換対象のモジュールと関連するモジュール間のインタフ
ェースにおいて使用されている構造を持つ引数を一つ抽
出する(3201)。もし無ければ(3202)、処理
を終了する。ある場合には、抽出引数を外部変数とした
ときに、テーブルAにもとからある外部変数に同名のも
のがないことを確認して(3203)、モジュール外に
定義部を作成し、元の定義部を削除する(3205)。 そして、共通変数を持ったモジュールについて、その変
数を呼び出し引数として使用していたモジュールのイン
タフェース部ならびに参照部分の修正を行う(3206
)。テーブルAに同名の変数がある場合には、ユニーク
な名前にして(3204)再度確認する。処理が終了し
たら、他の引数について同様の動作を繰り返す。
FIG. 32 is an operation flowchart showing the step of converting a stamp combination into a common combination in the "module analysis program" shown in FIG. 1(4). In the above-described determination process, one argument having a structure used in the interface between the module to be converted and the related module is extracted from the information stored in Table C (3201). If there is none (3202), the process ends. In some cases, when using an external variable as an extraction argument, check that there is no existing external variable in table A with the same name (3203), create a definition section outside the module, and replace the original The definition section is deleted (3205). Then, for modules that have a common variable, modify the interface section and reference section of the module that used that variable as a call argument (3206
). If there is a variable with the same name in table A, make it a unique name (3204) and check again. Once processing is complete, repeat the same operation for other arguments.

【0062】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここではスタンプ結合のプロ
グラム例、図13を、変換のもととなる図1(5)の既
存ソースプログラムとする。
Here, a specific example of a program using the C language will be given. Note that here, the program example for combining stamps, shown in FIG. 13, is assumed to be the existing source program shown in FIG. 1(5), which is the source of conversion.

【0063】前述の判定処理で、テーブルCには「ma
in」と「phone_check」はスタンプ結合で
、その引数として構造を持つ変数「a」があり、「ma
in」は「phone_check」の直接上位モジュ
ールであると記憶されている。また、「main」と「
addr_put」についても、両者はスタンプ結合で
、その引数として構造を持つ変数「b」があり、「ma
in」は「addr_put」の直接上位モジュールで
あると記憶されている。ここで先ず、関連するモジュー
ルにおいて「a」が使用されていないかテーブルBの情
報をもとにさがす。他にないので、つぎに「a」を「m
ain」,「phone_check」,「addr_
put」の共通変数として扱うためにテーブルAの情報
より同名変数のチェックを行う。同名変数がここでも無
いので、「a」を外部変数として定義する。共通変数「
a」を持ったモジュールについて「a」を呼び出し引数
として使用していたインタフェース部ならびに定義部を
削除する。最後に、その「main」,「phone_
check」の「phone」参照部を外部変数参照用
に修正する。「b」に対しても、同様の操作を行う。こ
こで、変換されてできたプログラムが図33である。
[0063] In the above-mentioned determination process, table C contains "ma
in” and “phone_check” are stamp joins, and have a variable “a” with structure as an argument, and “ma
``in'' is stored as being a directly upper module of ``phone_check''. Also, "main" and "
For ``addr_put'', both are stamp combinations, and there is a variable ``b'' with a structure as an argument, and ``ma
``in'' is stored as being a direct upper module of ``addr_put''. First, it is searched based on the information in table B to see if "a" is used in the related module. Since there is nothing else, next change "a" to "m"
ain”, “phone_check”, “addr_
In order to treat it as a common variable for "put", check for variables with the same name from the information in table A. Since there is no variable with the same name here, "a" is defined as an external variable. Common variable “
For a module with "a", delete the interface section and definition section that used "a" as a call argument. Finally, the “main”, “phone_
Modify the ``phone'' reference part of ``check'' to reference an external variable. The same operation is performed for "b" as well. Here, the converted program is shown in FIG. 33.

【0064】2.10  データ結合を制御結合に変換
する。以下に、変換の手順を示す。ただし、ユーザが変
換を指定したモジュールがデータ結合であるという前提
のもとで処理を行う。
2.10 Convert data binding to control binding. The conversion procedure is shown below. However, processing is performed on the premise that the module for which the user has specified conversion is data binding.

【0065】図34は、図1(4)の「モジュール解析
プログラム」のうち、データ結合を制御結合に変換する
ステップを示す動作フローチャートである。先ず、制御
される側の複数のモジュールを、分岐命令を付加し(3
401)、分岐後に背反になる処理として一つのモジュ
ール内に合成する(3402)。次に、そうして出来た
合成モジュールのもとの複数のモジュールがそれぞれ持
っていた呼出し時の引数の和をとり、合成モジュールの
引数として設定する(3403)。さらに、分岐によっ
て処理を選択するための制御引数を設定する(3404
)。そして、合成モジュールのもとの複数のモジュール
の共通呼出しモジュールを合成モジュール内に共通処理
部として合成する(3405)。こうして、合成された
それぞれのモジュールにおける変数の和をとり、合成モ
ジュールの変数として設定する(3406)。最後に、
呼出し側のモジュールの呼出し部を新しい合成モジュー
ルにあわせて設定する(3407)。
FIG. 34 is an operation flowchart showing the step of converting a data connection into a control connection in the "module analysis program" shown in FIG. 1(4). First, add branch instructions to multiple modules on the controlled side (3
401), and combine them into one module as a process that is contradictory after branching (3402). Next, the sum of the invocation arguments held by the plurality of modules that are the basis of the resulting composite module is calculated and set as the argument of the composite module (3403). Furthermore, a control argument for selecting processing by branching is set (3404
). Then, the common call modules of the plurality of modules that are the source of the synthesis module are synthesized into the synthesis module as a common processing section (3405). In this way, the sum of the variables in each of the synthesized modules is calculated and set as the variable of the synthesized module (3406). lastly,
The calling section of the calling module is set to match the new synthesis module (3407).

【0066】ここで、C言語を使用したプログラムによ
る具体例をあげる。なお、ここではデータ結合のプログ
ラム例、図25を、変換のもととなる図1(5)の既存
ソースプログラムとする。
Here, a specific example of a program using the C language will be given. Note that here, the data combination program example shown in FIG. 25 is assumed to be the existing source program shown in FIG. 1 (5) that is the source of the conversion.

【0067】先ず、制御される側のモジュール「man
ager_1」(2502),「manager_2」
(2503),「manager_3」(2504),
「manager_4」(2505),「manage
r_d」(2506)を、「switch」文を付加し
、「case」文以後にそれぞれのモジュールを背反に
なる処理として合成する。そして、それぞれのモジュー
ルがそれぞれ持っていた呼出し時の引数の和をとり、合
成モジュールの引数として「name」,「addre
ss」,「weight」,「tall」,「valu
e」を設定する。さらに、「switch」分岐によっ
て処理を選択するための制御引数「sw」を設定する。 そして、それぞれもとのモジュールの共通呼出しモジュ
ール「common_man」(2507)を合成モジ
ュール内に共通処理部としてとりこむ。こうして、合成
されたそれぞれのモジュールにおける変数の和をとり、
合成モジュールの変数として設定する。最後に、呼出し
側のモジュールの呼出し部を新しい合成モジュール名「
manager」と制御引数「sw」を組合せて設定す
る。ここで、変換されてできたプログラムが図35であ
る。
First, the module “man” on the controlled side
manager_1” (2502), “manager_2”
(2503), “manager_3” (2504),
“manager_4” (2505), “manage
r_d" (2506), a "switch" statement is added, and each module is synthesized as a contradictory process after the "case" statement. Then, the sum of the arguments each module had at the time of invocation is calculated, and the arguments of the composite module are ``name'' and ``addre''.
ss”, “weight”, “tall”, “value”
Set "e". Furthermore, a control argument "sw" for selecting a process by the "switch" branch is set. Then, the common call module "common_man" (2507) of each original module is incorporated into the synthesis module as a common processing section. In this way, take the sum of the variables in each synthesized module,
Set as a variable in the synthesis module. Finally, change the caller of the calling module to the new composition module name "
``manager'' and the control argument ``sw''. Here, the converted program is shown in FIG. 35.

【0068】これらのモジュール間結合度の変換のステ
ップは、図1(4)の「モジュール解析プログラム」か
ら続いて常に1つのステップが動作するものではなく、
複数のステップを組み合わせて動作することもある。
[0068] These steps of converting the degree of coupling between modules are not always performed one step after the "module analysis program" shown in FIG. 1 (4).
Sometimes it works by combining multiple steps.

【0069】なお、これはC言語に限らず、モジュール
の概念を持てる他のプログラミング言語もしくは仕様で
あれば、この方法は実施できる。
Note that this method is not limited to the C language, but can be implemented with any other programming language or specification that has the concept of a module.

【0070】[0070]

【発明の効果】本発明によれば、既に作成されたプログ
ラムに対し簡単な操作でモジュール間結合度を高めるこ
とができ、各モジュールの独立性を確保できるようにな
る。これより、プログラム自体の保守性及び信頼性が向
上する。
According to the present invention, the degree of coupling between modules can be increased with a simple operation for an already created program, and the independence of each module can be ensured. This improves the maintainability and reliability of the program itself.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】図1は本発明を実施する装置構成図である。FIG. 1 is a configuration diagram of an apparatus implementing the present invention.

【図2】図2はモジュール間の呼出し関係を表す図であ
る。
FIG. 2 is a diagram showing calling relationships between modules.

【図3】図3は共通結合のプログラムを概念的に表す図
である。
FIG. 3 is a diagram conceptually representing a common connection program.

【図4】図4は外部結合のプログラムを概念的に表す図
である。
FIG. 4 is a diagram conceptually representing an external join program.

【図5】図5は制御結合のプログラムを概念的に表す図
である。
FIG. 5 is a diagram conceptually representing a control connection program.

【図6】図6はスタンプ結合のプログラムを概念的に表
す図である。
FIG. 6 is a diagram conceptually representing a program for combining stamps.

【図7】図7はデータ結合のプログラムを概念的に表す
図である。
FIG. 7 is a diagram conceptually representing a data combination program.

【図8】図8は図1(2)のモジュール解析プログラム
の中の、モジュールについて解析するステップの動作フ
ローチャートである。
FIG. 8 is an operation flowchart of a step of analyzing a module in the module analysis program of FIG. 1(2).

【図9】図9はC言語による、共通結合のプログラム例
である。
FIG. 9 is an example of a common connection program in C language.

【図10】図10は図9のプログラムを、図8のモジュ
ールについて解析するステップによる解析の結果作成さ
れた、テーブルの構成図である。
FIG. 10 is a configuration diagram of a table created as a result of analysis of the program of FIG. 9 in the step of analyzing the module of FIG. 8;

【図11】図11はC言語による、外部結合のプログラ
ム例である。
FIG. 11 is an example of an outer join program in C language.

【図12】図12は図11のプログラムを、図8のモジ
ュールについて解析するステップによる解析の結果作成
された、テーブルの構成図である。
FIG. 12 is a configuration diagram of a table created as a result of analysis of the program in FIG. 11 in the step of analyzing the module in FIG. 8;

【図13】図13はC言語による、スタンプ結合のプロ
グラム例である。
FIG. 13 is an example of a program for combining stamps in C language.

【図14】図14は図13のプログラムを、図8のモジ
ュールについて解析するステップによる解析の結果作成
された、テーブルの構成図である。
FIG. 14 is a configuration diagram of a table created as a result of analysis of the program in FIG. 13 with respect to the module in FIG. 8;

【図15】図15はC言語による、データ結合のプログ
ラム例である。
FIG. 15 is an example of a data combination program in C language.

【図16】図16は図15のプログラムを、図8のモジ
ュールについて解析するステップによる解析の結果作成
された、テーブルの構成図である。
FIG. 16 is a configuration diagram of a table created as a result of analysis of the program in FIG. 15 in the step of analyzing the module in FIG. 8;

【図17】図17は図1(3)の結合度変換プログラム
の中の、共通結合を外部結合に変換するステップを示す
動作フローチャートである。
FIG. 17 is an operation flowchart showing a step of converting a common bond to an outer bond in the degree-of-coupling conversion program of FIG. 1(3).

【図18】図18は図9のプログラムの、モジュール間
結合度を変換するステップでできたテーブル構成図であ
る。
FIG. 18 is a table configuration diagram created in the step of converting the degree of coupling between modules in the program of FIG. 9;

【図19】図19は図1(3)の結合度変換プログラム
の中の、共通結合をスタンプ結合に変換するステップを
示す動作フローチャートである。
FIG. 19 is an operation flowchart showing a step of converting a common bond into a stamp bond in the bond degree conversion program of FIG. 1(3).

【図20】図20は図1(3)の結合度変換プログラム
の中の、外部結合をデータ結合に変換するステップを示
す動作フローチャートである。
FIG. 20 is an operation flowchart showing a step of converting an outer join to a data link in the degree of connectivity conversion program of FIG. 1(3).

【図21】図21は図1(3)の結合度変換プログラム
の中の、スタンプ結合をデータ結合に変換するステップ
を示す動作フローチャートである。
FIG. 21 is an operation flowchart showing a step of converting a stamp connection to a data connection in the connection degree conversion program of FIG. 1(3).

【図22】図22は図13のプログラムの、モジュール
間結合度を変換するステップでできたテーブル構成図で
ある。
22] FIG. 22 is a table configuration diagram created in the step of converting the degree of coupling between modules in the program of FIG. 13. [FIG.

【図23】図23は図1(3)の結合度変換プログラム
の中の、制御結合をデータ結合に変換するステップを示
す動作フローチャートである。
FIG. 23 is an operation flowchart showing a step of converting a control connection into a data connection in the degree of connection conversion program of FIG. 1(3).

【図24】図24はC言語による、制御結合のプログラ
ム例である。
FIG. 24 is an example of a control connection program in C language.

【図25】図25は図24のプログラムを、モジュール
間結合度を変換するステップで制御結合のプログラムを
、データ結合に変換したプログラムである。
FIG. 25 is a program obtained by converting the program of FIG. 24 from control coupling to data coupling in the step of converting the degree of coupling between modules.

【図26】図26は図1(3)の結合度変換プログラム
の中の、データ結合を外部結合に変換するステップを示
す動作フローチャートである。
FIG. 26 is an operation flowchart showing a step of converting a data connection to an outer connection in the degree of connection conversion program of FIG. 1(3).

【図27】図27は図15のプログラムを、モジュール
間結合度を変換するステップでデータ結合のプログラム
を、外部結合に変換したプログラムである。
27] FIG. 27 is a program obtained by converting the program of FIG. 15 from data binding to external binding in the step of converting the degree of coupling between modules.

【図28】図28は図1(3)の結合度変換プログラム
の中の、データ結合をスタンプ結合に変換するステップ
を示す動作フローチャートである。
FIG. 28 is an operation flowchart showing a step of converting a data bond to a stamp bond in the bond degree conversion program of FIG. 1(3).

【図29】図29は図15のプログラムを、モジュール
間結合度を変換するステップでデータ結合のプログラム
を、スタンプ結合に変換したプログラムである。
FIG. 29 is a program obtained by converting the program of FIG. 15 from data binding to stamp binding in the step of converting the degree of connectivity between modules.

【図30】図30は図1(3)の結合度変換プログラム
の中の、外部結合を共通結合に変換するステップを示す
動作フローチャートである。
FIG. 30 is an operation flowchart showing a step of converting an outer bond to a common bond in the degree-of-coupling conversion program of FIG. 1(3).

【図31】図31は図11のプログラムを、モジュール
間結合度を変換するステップで外部結合のプログラムを
、共通結合に変換したプログラムである。
31] FIG. 31 is a program obtained by converting the program of FIG. 11 from external coupling to common coupling in the step of converting the degree of coupling between modules.

【図32】図32は図1(3)の結合度変換プログラム
の中の、スタンプ結合を共通結合に変換するステップを
示す動作フローチャートである。
FIG. 32 is an operation flowchart showing a step of converting a stamp bond to a common bond in the bond degree conversion program of FIG. 1(3).

【図33】図33は図11のプログラムを、モジュール
間結合度を変換するステップでスタンプ結合のプログラ
ムを、共通結合に変換したプログラムである。
FIG. 33 is a program obtained by converting the program of FIG. 11 from stamp combination to common combination in the step of converting the degree of connection between modules.

【図34】図34は図1(3)の結合度変換プログラム
の中の、データ結合を制御結合に変換するステップを示
す動作フローチャートである。
FIG. 34 is an operation flowchart showing a step of converting a data connection into a control connection in the degree of connection conversion program of FIG. 1(3).

【図35】図35は図25のプログラムを、モジュール
間結合度を変換するステップでデータ結合のプログラム
を、制御結合に変換したプログラムである。
FIG. 35 is a program obtained by converting the program of FIG. 25 from data coupling to control coupling in the step of converting the degree of coupling between modules.

【図36】図36は図11のプログラムを、モジュール
間結合度を変換するステップで外部結合のプログラムを
、データ結合に変換したプログラムである。
36] FIG. 36 is a program obtained by converting the program of FIG. 11 from external coupling to data coupling in the step of converting the degree of coupling between modules.

Claims (26)

【特許請求の範囲】[Claims] 【請求項1】複数もしくは単一のモジュールより構成さ
れるソースプログラムを格納する記憶装置と、その記憶
装置を操作するためのデータ処理装置とを含む情報処理
システムにおいて、前記ソースプログラムを構成するモ
ジュールの構造について解析するステップと、そのモジ
ュールの構造と、そのモジュールとそのモジュールに関
連する他のモジュールとの間の構造を操作し、ソースプ
ログラムを変換・再構成するステップとからなることを
特徴とするソフトウェア変換・再構成方法。
1. An information processing system comprising a storage device for storing a source program made up of a plurality or a single module, and a data processing device for operating the storage device, wherein a module making up the source program is provided. and a step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module. Software conversion/reconfiguration method.
【請求項2】複数もしくは単一のモジュールより構成さ
れるソースプログラムを格納する記憶装置と、その記憶
装置を操作するためのデータ処理装置とを含む情報処理
システムにおいて、前記ソースプログラムを構成する全
てのモジュールの構造について解析するステップと、全
てのモジュールにおいて、モジュールの構造と、そのモ
ジュールに関連する他のモジュールとの間の構造を操作
し、ソースプログラム内にある全てのモジュールの関係
を軽減するように変換・再構成するステップとからなる
ことを特徴とするソフトウェア変換・再構成方法。
2. An information processing system that includes a storage device that stores a source program composed of a plurality of modules or a single module, and a data processing device that operates the storage device, wherein all of the components that make up the source program are provided. Analyzing the structure of the module, and manipulating the structure of the module and the structure of other modules related to the module in every module to reduce the relationships among all the modules in the source program. A software conversion/reconfiguration method characterized by comprising the steps of converting/reconfiguring as follows.
【請求項3】請求項1において、ソースプログラムの変
換・再構成するステップが、他のモジュールとの関連を
軽減することによりモジュールの部品化を行うことを特
徴とするソフトウェア変換・再構成方法。
3. The software conversion/reconfiguration method according to claim 1, wherein the step of converting/reconfiguring the source program converts the module into components by reducing relationships with other modules.
【請求項4】請求項1において、ソースプログラムの変
換・再構成するステップが、他のモジュールとの関連を
密にすることにより計算機ソフトウェアの処理速度の向
上を図ることを特徴とするソフトウェア変換・再構成方
法。
4. The software conversion method according to claim 1, wherein the step of converting and reconfiguring the source program improves the processing speed of the computer software by closely relating it to other modules. Reconstruction method.
【請求項5】請求項1において、解析ならびに変換・再
構成の対象を、ソースプログラムに代えて仕様情報とす
る、ソフトウェア変換・再構成方法。
5. A software conversion/reconfiguration method according to claim 1, wherein the target of analysis, conversion/reconfiguration is specification information instead of a source program.
【請求項6】請求項1におけるモジュールの構造につい
て解析するステップが、そのモジュールの外部定義変数
を抽出するステップと、モジュールの情報を抽出するス
テップと、その抽出情報をもとにモジュール間結合度を
判定するステップとからなることを特徴とするソフトウ
ェア変換・再構成方法。
[Claim 6] The step of analyzing the structure of a module in claim 1 includes a step of extracting externally defined variables of the module, a step of extracting information about the module, and a degree of coupling between the modules based on the extracted information. A software conversion/reconfiguration method comprising the steps of determining.
【請求項7】請求項1におけるそのモジュールの構造と
、そのモジュールとそのモジュールに関連する他のモジ
ュールとの間の構造を操作し、ソースプログラムを変換
・再構成するステップが、モジュールの外部定義変数の
構造を分解するステップと、その分解したことにより発
生するモジュール間の論理の矛盾を修正するステップと
からなることを特徴とするソフトウェア変換・再構成方
法。
7. The step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module in claim 1 is an external definition of the module. A software conversion/reconfiguration method comprising: a step of decomposing the structure of variables; and a step of correcting logical contradictions between modules caused by the decomposition.
【請求項8】請求項1におけるそのモジュールの構造と
、そのモジュールとそのモジュールに関連する他のモジ
ュールとの間の構造を操作し、ソースプログラムを変換
・再構成するステップが、モジュールの外部定義変数を
関連するモジュールの内部変数として取り込むステップ
と、その取り込んだことにより発生するモジュール間の
論理の矛盾を修正するステップとからなることを特徴と
するソフトウェア変換・再構成方法。
8. The step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module in claim 1 is an external definition of the module. A software conversion/reconfiguration method comprising: a step of importing a variable as an internal variable of a related module; and a step of correcting a logical contradiction between modules that occurs due to the import.
【請求項9】請求項8におけるモジュールの外部定義変
数が、構造を持つことを特徴とするソフトウェア変換・
再構成方法。
9. A software conversion system characterized in that the externally defined variable of the module according to claim 8 has a structure.
Reconstruction method.
【請求項10】請求項1におけるそのモジュールの構造
と、そのモジュールとそのモジュールに関連する他のモ
ジュールとの間の構造を操作し、ソースプログラムを変
換・再構成するステップが、モジュール間のインタフェ
ースに使用されている変数の構造を分解するステップと
、分解することにより不必要になる変数を取り除くステ
ップと、その一連の操作により発生するモジュール間の
論理の矛盾を修正するステップとからなることを特徴と
するソフトウェア変換・再構成方法。
[Claim 10] The step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module in claim 1 is an interface between the modules. The process consists of a step of decomposing the structure of variables used in the process, a step of removing variables that become unnecessary due to the decomposition, and a step of correcting logical inconsistencies between modules that occur due to this series of operations. Characteristic software conversion/reconfiguration method.
【請求項11】複数もしくは単一のモジュールより構成
されるソースプログラムを格納する記憶装置と、その記
憶装置を操作するためのデータ処理装置とを含む情報処
理システムにおいて、前記ソースプログラムのモジュー
ル内の処理論理において、分岐後に背反になる処理をモ
ジュール化するステップと、それらにおいて共通の処理
論理としていた処理を共通関数化するステップと、その
一連の操作により発生するモジュール間の論理の矛盾を
修正するステップとからなることを特徴とするソフトウ
ェア変換・再構成方法。
11. An information processing system including a storage device for storing a source program composed of a plurality of modules or a single module, and a data processing device for operating the storage device, wherein In processing logic, the step of modularizing processes that are contradictory after branching, the step of converting the processes that were common processing logic in them into common functions, and correcting the contradictions in logic between modules that occur due to this series of operations. A software conversion/reconfiguration method characterized by comprising steps.
【請求項12】請求項1におけるそのモジュールの構造
と、そのモジュールとそのモジュールに関連する他のモ
ジュールとの間の構造を操作し、ソースプログラムを変
換・再構成するステップが、モジュールの外部定義変数
の構造を合成するステップと、その合成したことにより
発生するモジュール間の論理の矛盾を修正するステップ
とからなることを特徴とするソフトウェア変換・再構成
方法。
12. The step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module in claim 1 is an external definition of the module. A software conversion/reconfiguration method characterized by comprising a step of synthesizing a structure of variables, and a step of correcting a logical contradiction between modules that occurs due to the synthesis.
【請求項13】請求項1におけるそのモジュールの構造
と、そのモジュールとそのモジュールに関連する他のモ
ジュールとの間の構造を操作し、ソースプログラムを変
換・再構成するステップが、モジュールの外部定義変数
以外で、複数のモジュール間で引数などで受渡しを行っ
ている共通の内部変数を、モジュール間の外部定義変数
としてモジュール外に取り出すステップと、その取り出
したことにより発生するモジュール間の論理の矛盾を修
正するステップとからなることを特徴とするソフトウェ
ア変換・再構成方法。
13. The step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module in claim 1 is an external definition of the module. The step of extracting a common internal variable other than a variable that is passed as an argument between multiple modules to the outside of the module as an externally defined variable between modules, and the logical contradiction between modules that occurs due to this extraction. A software conversion/reconfiguration method comprising the steps of:
【請求項14】請求項13におけるモジュールの内部変
数が、構造を持つことを特徴とするソフトウェア変換・
再構成方法。
14. The software conversion method according to claim 13, wherein the internal variables of the module have a structure.
Reconstruction method.
【請求項15】請求項1におけるそのモジュールの構造
と、そのモジュールとそのモジュールに関連する他のモ
ジュールとの間の構造を操作し、ソースプログラムを変
換・再構成するステップが、モジュール間のインタフェ
ースに使用されている変数を合成し構造を持たせるステ
ップと、合成することにより必要になる変数を付け足す
ステップと、その一連の操作により発生するモジュール
間の論理の矛盾を修正するステップとからなることを特
徴とするソフトウェア変換・再構成方法。
15. The step of converting and reconfiguring the source program by manipulating the structure of the module and the structure between the module and other modules related to the module in claim 1 is an interface between the modules. It consists of a step of composing the variables used in the module to give it a structure, a step of adding variables that become necessary through the compositing, and a step of correcting logical contradictions between modules that occur due to this series of operations. A software conversion/reconfiguration method characterized by:
【請求項16】複数もしくは単一のモジュールより構成
されるソースプログラムを格納する記憶装置と、その記
憶装置を操作するためのデータ処理装置とを含む情報処
理システムにおいて、前記ソースプログラムのモジュー
ル内の処理論理において、複数のモジュールを分岐後に
背反になる処理として合成するステップと、それらにお
ける共通モジュールを合成後のモジュールの共通処理部
として合成するステップと、その一連の操作により発生
するモジュール間の論理の矛盾を修正するステップとか
らなることを特徴とするソフトウェア変換・再構成方法
16. An information processing system including a storage device for storing a source program composed of a plurality of modules or a single module, and a data processing device for operating the storage device, wherein In processing logic, the step of composing multiple modules as contradictory processes after branching, the step of composing common modules among them as common processing parts of the module after compositing, and the logic between modules generated by this series of operations. A software conversion/reconfiguration method comprising the steps of correcting inconsistencies in the above.
【請求項17】請求項6の方法または請求項7の方法か
らなり、モジュール間結合度の共通結合を外部結合に変
換することを特徴とするソフトウェア変換・再構成方法
17. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 7, characterized in that a common connection in the degree of connectivity between modules is converted into an external connection.
【請求項18】請求項6の方法または請求項8の方法か
らなり、モジュール間結合度の共通結合をスタンプ結合
に変換することを特徴とするソフトウェア変換・再構成
方法。
18. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 8, characterized in that common connections of inter-module connectivity are converted into stamp connections.
【請求項19】請求項6の方法または請求項9の方法か
らなり、モジュール間結合度の外部結合をデータ結合に
変換することを特徴とするソフトウェア変換・再構成方
法。
19. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 9, characterized in that an external connection of inter-module connectivity is converted into a data connection.
【請求項20】請求項6の方法または請求項10の方法
からなり、モジュール間結合度のスタンプ結合をデータ
結合に変換することを特徴とするソフトウェア変換・再
構成方法。
20. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 10, characterized in that stamp connections of inter-module connectivity are converted into data connections.
【請求項21】請求項11の方法を用いることにより、
モジュール間結合度の制御結合をデータ結合に変換する
ことを特徴とするソフトウェア変換・再構成方法。
21. By using the method of claim 11,
A software conversion/reconfiguration method characterized by converting a control connection of the degree of coupling between modules into a data connection.
【請求項22】請求項6の方法または請求項12の方法
からなり、モジュール間結合度の外部結合を共通結合に
変換することを特徴とするソフトウェア変換・再構成方
法。
22. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 12, characterized in that an external connection of the degree of connectivity between modules is converted into a common connection.
【請求項23】請求項6の方法または請求項13の方法
からなり、モジュール間結合度のスタンプ結合を共通結
合に変換することを特徴とするソフトウェア変換・再構
成方法。
23. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 13, characterized in that stamp connections of inter-module connectivity are converted into common connections.
【請求項24】請求項6の方法または請求項14の方法
からなり、モジュール間結合度のデータ結合を外部結合
に変換することを特徴とするソフトウェア変換・再構成
方法。
24. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 14, characterized in that data connections of inter-module connectivity are converted to external connections.
【請求項25】請求項6の方法または請求項15の方法
からなり、モジュール間結合度のデータ結合をスタンプ
結合に変換することを特徴とするソフトウェア変換・再
構成方法。
25. A software conversion/reconfiguration method comprising the method according to claim 6 or the method according to claim 15, characterized in that data connections of inter-module connectivity are converted to stamp connections.
【請求項26】請求項16の方法を用いることにより、
モジュール間結合度のデータ結合を制御結合に変換する
ことを特徴とするソフトウェア変換・再構成方法。
26. By using the method of claim 16,
A software conversion/reconfiguration method characterized by converting data connections of inter-module connectivity into control connections.
JP4161091A 1991-03-07 1991-03-07 Software converting/reforming method Pending JPH04278632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4161091A JPH04278632A (en) 1991-03-07 1991-03-07 Software converting/reforming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4161091A JPH04278632A (en) 1991-03-07 1991-03-07 Software converting/reforming method

Publications (1)

Publication Number Publication Date
JPH04278632A true JPH04278632A (en) 1992-10-05

Family

ID=12613121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4161091A Pending JPH04278632A (en) 1991-03-07 1991-03-07 Software converting/reforming method

Country Status (1)

Country Link
JP (1) JPH04278632A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293866A (en) * 2006-04-26 2007-11-08 Sap Ag Use of relevant information for programming
JP2015230582A (en) * 2014-06-05 2015-12-21 株式会社日立製作所 Program visualization device, program visualization method, and program visualization program
US10445095B2 (en) 2017-06-15 2019-10-15 Fujitsu Limited Information processing device, compiler method, and recording medium recording compiler program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293866A (en) * 2006-04-26 2007-11-08 Sap Ag Use of relevant information for programming
JP2015230582A (en) * 2014-06-05 2015-12-21 株式会社日立製作所 Program visualization device, program visualization method, and program visualization program
US10445095B2 (en) 2017-06-15 2019-10-15 Fujitsu Limited Information processing device, compiler method, and recording medium recording compiler program

Similar Documents

Publication Publication Date Title
US5799266A (en) Automatic generation of test drivers
CN109324791A (en) Finance self-help terminal traffic process development approach, device and terminal device
US5210876A (en) Method for calling interpreter language procedure from compiler language procedure
CN104216912A (en) Method and device for achieving non-intrusive service form workflow
CN1233011A (en) System for changing software during computer operation
JP2002517817A5 (en)
Kang et al. Feature‐oriented engineering of PBX software for adaptability and reuseability
KR19990071993A (en) System platform for communication system
CN110750298B (en) AI model compiling method, equipment and storage medium
CN109597618A (en) Program developing method, device, computer equipment and storage medium
US6101326A (en) Method and apparatus for frame elimination for simple procedures with tail calls
US20040015816A1 (en) Coordination synthesis for software systems
WO2024164559A1 (en) System upgrading method and apparatus, and device and storage medium
JPH04278632A (en) Software converting/reforming method
EP0692115B1 (en) System for conversion of loop functions to continuation-passing style
Koyanagi et al. Hierarchically structured switching software
Lee et al. Feature-oriented engineering of PBX software
US20110022501A1 (en) Service change component generation system, method and recording medium
Paech et al. State based service description
JP3278584B2 (en) Computer program generation apparatus and method
JPH0793185A (en) Automatic software test system
CN116513215A (en) Control method and device for vehicle
Winter et al. Aspect traceability through invertible weaving
CN114115816A (en) Groovy dynamic script language based method for realizing dynamic layout of capability
Salah et al. Formal composition of distributed scenarios