JP2019049870A - Similar program specifying device, similar program specifying method, and control program - Google Patents

Similar program specifying device, similar program specifying method, and control program Download PDF

Info

Publication number
JP2019049870A
JP2019049870A JP2017173814A JP2017173814A JP2019049870A JP 2019049870 A JP2019049870 A JP 2019049870A JP 2017173814 A JP2017173814 A JP 2017173814A JP 2017173814 A JP2017173814 A JP 2017173814A JP 2019049870 A JP2019049870 A JP 2019049870A
Authority
JP
Japan
Prior art keywords
program
access
programs
pair
similarity
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
JP2017173814A
Other languages
Japanese (ja)
Other versions
JP6958148B2 (en
Inventor
悠 大島
Yu Oshima
悠 大島
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 JP2017173814A priority Critical patent/JP6958148B2/en
Publication of JP2019049870A publication Critical patent/JP2019049870A/en
Application granted granted Critical
Publication of JP6958148B2 publication Critical patent/JP6958148B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

To provide a similar program specifying device, a similar program specifying method, and a control program capable of improving accuracy of specifying a similar program.SOLUTION: A similar program specifying device 10 comprises: a first calculator 11A for calculating the timing type unit similarity between two access patterns respectively corresponding to two constituent programs of the program pair for each access timing type with respect to each program pair among multiple programs, by using access correspondence relationship that associates the multiple programs with the access patterns for each access timing type of each program; and a second calculator 11B for calculating the program similarity for each program pair on the basis of the plurality of calculated timing type unit similarities and a weighting coefficient set corresponding to a combination of access target characteristic groups to which two configuration programs of each program pair respectively belong.SELECTED DRAWING: Figure 1

Description

本発明は、類似プログラム特定装置、類似プログラム特定方法、及び制御プログラムに関する。   The present invention relates to a similar program specifying device, a similar program specifying method, and a control program.

企業が長期にわたってITシステムを運用及び維持する中で、企業活動の目的に合わせてシステムの拡張や改造を積み重ねることがある。この結果、新旧さまざまなソフトウェア、ハードウェア、及び開発技術が混在して複雑に絡み合った状態となることがある。このような状態では、ソフトウェア資産全体の把握が困難となり、システムの拡張や改造が非常に難しいことがある。   As a company operates and maintains an IT system for a long time, there are times when the system is expanded or remodeled according to the purpose of the corporate activity. As a result, a variety of new and old software, hardware, and development techniques may be mixed and intricately intertwined. In such a situation, it may be difficult to grasp the entire software asset, and it may be very difficult to expand or modify the system.

例えば、開発現場では、ベースとなるプログラムをコピーし、その一部を書き換えて新たなプログラムを作成することがよく行われる。このように作成された新しいプログラムは、ベースとしたプログラムの機能とは別機能を有していることもあるし、ベースとしたプログラムと機能を同じにしたまま作り直した(リファクタリングした)ものであることもある。このように、長年保守を続けているシステムでは、作りの似た新旧の資産が混在している状態となっていることがある。その結果、改修時又は再構築時におけるテスト対象資産又は移行対象資産の棚卸しが効率的に実施できず、見積もり精度が低下し、移行工数又はテスト工数が増大してしまう可能性がある。   For example, in a development site, it is common to copy a base program and rewrite a part of the program to create a new program. The new program created in this way may have functions other than those of the program based on it, or it may be refactored (refactored) with the same function as the program based on it. Sometimes. Thus, in a system that has been maintained for many years, there may be a state in which new and old assets similar to each other are mixed. As a result, inventory of the test target asset or the transfer target asset can not be efficiently implemented at the time of repair or rebuilding, the estimation accuracy may be reduced, and the number of migration man-hours or test man-hours may be increased.

これに対して、従来、ソフトウェア資産管理装置が提案されている(例えば、特許文献1)。特許文献1のソフトウェア資産管理装置は、抽象度や詳細度によって区分分けされたブロックに対し、ソフトウェア資産を構成する個々の情報単位である情報ノードを配置し、各情報ノード間の関係性を示す有向リンクである関係リンクで設定した資産管理マトリクスを保持している。   On the other hand, conventionally, a software asset management apparatus has been proposed (for example, Patent Document 1). The software asset management apparatus of Patent Document 1 arranges information nodes, which are individual information units constituting a software asset, for blocks divided according to the degree of abstraction and the degree of detail, and indicates the relationship between each information node. It holds the asset management matrix set by the relationship link, which is a directed link.

特開2014−157598号公報JP, 2014-157598, A

本発明者は、上記従来技術では、複数のプログラムを含むソフトウェア資産の中から類似するプログラムを精度良く特定できない可能性がある問題を見出した。   The present inventor has found that the above-mentioned prior art may not be able to accurately identify a similar program among software assets including a plurality of programs.

すなわち、プログラムは、複数のアクセスタイミング種別のそれぞれにおいて、プログラムのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンを有している。そして、本発明者は、プログラムを特徴付けるアクセスパターンのアクセスタイミング種別は、プログラムによって異なることを見出した。このため、アクセスタイミング種別を考慮していない上記従来技術では、複数のプログラムを含むソフトウェア資産の中から類似するプログラムを精度良く特定できない可能性があることを見出した。   That is, the program has an access pattern including an access destination of the program and an access purpose to the access destination in each of the plurality of access timing types. Then, the inventor found that the access timing type of the access pattern characterizing the program differs depending on the program. For this reason, it has been found that, in the above-described prior art in which the access timing type is not taken into consideration, a similar program can not be identified with high accuracy among software assets including a plurality of programs.

本発明の目的は、類似プログラムの特定精度を向上させることができる、類似プログラム特定装置、類似プログラム特定方法、及び制御プログラムを提供することにある。   An object of the present invention is to provide a similar program specifying device, a similar program specifying method, and a control program that can improve the specification accuracy of a similar program.

本発明の第1の態様にかかる類似プログラム特定装置は、複数のプログラムと、複数のアクセスタイミング種別のそれぞれについての各プログラムのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、前記複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出する、第1算出部と、前記第1算出部によって各プログラムペアについて算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出する第2算出部と、前記第2算出部によって算出されたプログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する第1特定部と、を具備する。   The similar program identification device according to the first aspect of the present invention associates a plurality of programs with an access pattern including an access destination of each program and an access purpose to the access destination for each of a plurality of access timing types. Calculate the timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair for each program type of the plurality of programs using the above access correspondence relationship A first calculation unit, a plurality of timing type unit similarities calculated for each program pair by the first calculation unit, and a group combination of access destination characteristic groups to which two constituent programs of each program pair belong. With the corresponding set of weighting factors And a second calculation unit that calculates a program similarity for each program pair, and a program pair in which two configuration programs are similar based on the program similarity calculated by the second calculation unit. And a specific unit.

本発明の第2の態様にかかる類似プログラム特定方法は、複数のプログラムと、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、前記複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出し、各プログラムペアについて前記算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出し、前記プログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する。   A similar program identification method according to a second aspect of the present invention associates a plurality of programs with an access pattern including an access destination for each of a plurality of access timing types of each program and an access purpose to the access destination. Calculate the timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair for each program type of the plurality of programs using the above access correspondence relationship On the basis of the plurality of timing type unit similarities calculated for each program pair, and a weighting factor set corresponding to a combination of access target characteristic groups to which the two constituent programs of each program pair belong. About program pairs Calculating a program similarity, based on the program similarity, two configuration program identifies the program pair similar.

本発明の第3の態様にかかる制御プログラムは、複数のプログラムと、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、前記複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出し、各プログラムペアについて前記算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出し、前記プログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する、処理を、類似プログラム特定装置に実行させる。   A control program according to a third aspect of the present invention is an access in which a plurality of programs are associated with an access destination for each of a plurality of access timing types of each program and an access pattern including an access purpose to the access destination. Using the correspondence relationship, for each program pair of the plurality of programs, timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair is calculated for each access timing type, Each program pair is calculated based on the calculated plurality of timing type unit similarities for each program pair, and a weighting coefficient set corresponding to a combination of access target characteristic groups to which the two constituent programs of each program pair belong. About the program Calculating a beam similarity, based on the program similarity, two configuration program identifies the program pair similar, the process, to be executed by the similar program identifying device.

本発明により、類似プログラムの特定精度を向上させることができる、類似プログラム特定装置、類似プログラム特定方法、及び制御プログラムを提供することができる。   According to the present invention, it is possible to provide a similar program specifying device, a similar program specifying method, and a control program that can improve the specifying accuracy of similar programs.

第1実施形態の類似プログラム特定装置の一例を示すブロック図である。It is a block diagram showing an example of the similar program specific device of a 1st embodiment. 第2実施形態の類似プログラム特定装置の一例を示すブロック図である。It is a block diagram showing an example of the similar program specific device of a 2nd embodiment. 第2実施形態のシステム構成情報テーブルの一例を示す図である。It is a figure which shows an example of the system configuration information table of 2nd Embodiment. 第2実施形態の関係リンクテーブルの一例を示す図である。It is a figure which shows an example of the related link table of 2nd Embodiment. 図3のシステム構成情報テーブル及び図4の関係リンクテーブルによって表されるソフトウェア資産の構成例を示す図である。It is a figure which shows the structural example of the software asset represented by the system configuration | structure information table of FIG. 3, and the related link table of FIG. 第2実施形態の重み係数テーブルの一例を示す図である。It is a figure which shows an example of the weighting coefficient table of 2nd Embodiment. 第2実施形態の類似プログラム特定装置の処理動作の一例を示すフローチャートである。It is a flow chart which shows an example of processing operation of a similar program specific device of a 2nd embodiment. プログラム類似度の算出結果を示す図である。It is a figure which shows the calculation result of program similarity. プログラムペアの番号に対してプログラム類似度の値をプロットしたグラフである。It is the graph which plotted the value of the program similarity with respect to the number of a program pair. プログラムペアの番号に対して分類なし類似度の値をプロットしたグラフである。It is the graph which plotted the value of the similarity degree without classification to the number of a program pair. プログラムペアの番号に対してコンパイル時類似度の値をプロットしたグラフである。It is the graph which plotted the value of compile time similarity to the number of a program pair. プログラムペアの番号に対して実行時類似度の値をプロットしたグラフである。It is the graph which plotted the value of the runtime similarity to the number of a program pair. 類似プログラム特定装置のハードウェア構成例を示す図である。It is a figure showing the example of hardware constitutions of a similar program specific device.

以下、図面を参照しつつ、実施形態について説明する。なお、実施形態において、同一又は同等の要素には、同一の符号を付し、重複する説明は省略される。   Hereinafter, embodiments will be described with reference to the drawings. In the embodiments, the same or equivalent elements will be denoted by the same reference signs, and overlapping descriptions will be omitted.

<第1実施形態>
<類似プログラム特定装置の構成例>
図1は、第1実施形態の類似プログラム特定装置の一例を示すブロック図である。図1において、類似プログラム特定装置10は、制御部11と、記憶部12とを有している。制御部11は、タイミング種別単位類似度算出部(以下、「第1算出部」と呼ぶことがある)11Aと、プログラム類似度算出部(以下、「第2算出部」と呼ぶことがある)11Bと、類似プログラム特定部(以下、「第1特定部」と呼ぶことがある)11Cとを有している。
First Embodiment
<Configuration Example of Similar Program Identification Device>
FIG. 1 is a block diagram showing an example of the similar program identification device of the first embodiment. In FIG. 1, the similar program identification device 10 includes a control unit 11 and a storage unit 12. The control unit 11 includes a timing type unit similarity calculation unit (hereinafter may be referred to as a "first calculation unit") 11A and a program similarity calculation unit (hereinafter referred to as a "second calculation unit"). 11B and a similar program identification unit (hereinafter, may be referred to as a "first identification unit") 11C.

第1算出部(タイミング種別単位類似度算出部)11Aは、「アクセス対応関係」を用いて、「類似プログラム探索範囲」に含まれる複数のプログラムのうちの各プログラムペアについて、「アクセスタイミング種別」毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つの「アクセスパターン」間の「タイミング種別単位類似度」を算出する。「アクセス対応関係」は、記憶部12に記憶(保持)されている。ここで、「アクセス対応関係」は、複数のプログラム(つまり、複数のプログラム識別子)と、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセスパターンとを対応付けた対応関係である。また、「複数のアクセスタイミング種別」には、例えば、「コンパイル時」、及び、「プログラム実行時」が含まれる。また、「アクセスパターン」を規定する規定要素には、例えば、プログラムの「アクセス先」、及び、該アクセス先への「アクセス目的」が含まれている。また、「アクセス先」には、例えば、ファイル、テーブル、マクロ等が含まれる。また、「アクセス目的」には、例えば、「引用」、「リード(読み込み)」、「ライト(書き込み)」等が含まれる。   The first calculating unit (timing type unit similarity calculating unit) 11A uses the “access correspondence relationship” to “access timing type” for each program pair among a plurality of programs included in the “similar program search range”. Each time, “timing type unit similarity” between two “access patterns” respectively corresponding to two configuration programs of the program pair is calculated. The “access correspondence relationship” is stored (held) in the storage unit 12. Here, the “access correspondence relationship” is a correspondence relationship in which a plurality of programs (that is, a plurality of program identifiers) are associated with access patterns for each of a plurality of access timing types of each program. Also, “a plurality of access timing types” include, for example, “at compile time” and “at program execution time”. Further, the definition element defining the “access pattern” includes, for example, “access destination” of the program and “access purpose” to the access destination. Further, the “access destination” includes, for example, a file, a table, a macro and the like. Also, the “access purpose” includes, for example, “quote”, “read”, “write”, and the like.

すなわち、第1算出部11Aは、例えば、注目するプログラムペアが第1構成プログラム及び第2構成プログラムによって構成されている場合、第1構成プログラムの「コンパイル時」のアクセスパターンと第2構成プログラムの「コンパイル時」のアクセスパターンとの類似度を、「コンパイル時」のタイミング種別単位類似度として算出する。同様に、第1算出部11Aは、第1構成プログラムの「プログラム実行時」のアクセスパターンと第2構成プログラムの「プログラム実行時」のアクセスパターンとの類似度を、「プログラム実行時」のタイミング種別単位類似度として算出する。そして、第1算出部11Aは、「類似プログラム探索範囲」に含まれる複数のプログラムの中で注目プログラムペアを順次変更して、各注目プログラムペアについてタイミング種別単位類似度を算出する。   That is, for example, when the program pair to be focused on is configured by the first configuration program and the second configuration program, the first calculation unit 11A determines the “compile time” access pattern of the first configuration program and the second configuration program. The similarity with the "compile time" access pattern is calculated as the "compile time" timing type unit similarity. Similarly, the first calculation unit 11A sets the similarity between the access pattern at the time of program execution of the first configuration program and the access pattern at the time of program execution of the second configuration program to the timing of "program execution". Calculated as type-unit similarity. Then, the first calculation unit 11A sequentially changes the target program pair among the plurality of programs included in the “similar program search range”, and calculates the timing type unit similarity for each target program pair.

第2算出部(プログラム類似度算出部)11Bは、第1算出部11Aによって各プログラムペアについて算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属する「アクセス先特性別グループ」のグループ組み合わせに対応する「重み係数セット」とに基づいて、各プログラムペアについてのプログラム類似度を算出する。すなわち、例えば、第2算出部11Bは、或るプログラムペアのグループ組み合わせが第1のグループ組み合わせである場合、そのプログラムペアの「コンパイル時」のタイミング種別単位類似度に対して、第1のグループ組み合わせに対応する重み係数セットに含まれる「コンパイル時」の重み係数を掛け合わせる。また、第2算出部11Bは、プログラムペアの「プログラム実行時」のタイミング種別単位類似度に対して、第1のグループ組み合わせに対応する重み係数セットに含まれる「プログラム実行時」の重み係数を掛け合わせる。そして、第2算出部11Bは、それぞれ重み付けされた後の、「コンパイル時」のタイミング種別単位類似度と「プログラム実行時」のタイミング種別単位類似度とを足し合わせることにより、プログラム類似度を算出する。ここで、「アクセス先特性別グループ」は、アクセスタイミング種別毎のアクセス先特性に応じたグループであり、例えば、サブシステム毎のグループ、又は、ソフトウェアパッケージ毎のグループである。   The second calculating unit (program similarity calculating unit) 11B is configured by the plurality of timing type unit similarities calculated for each program pair by the first calculating unit 11A, and the “access destination to which two constituent programs of each program pair belong. The program similarity for each program pair is calculated based on the "weighting coefficient set" corresponding to the group combination by characteristic group ". That is, for example, when the group combination of a certain program pair is the first group combination, the second calculating unit 11B compares the first group with respect to the “at compile time” timing type unit similarity of the program pair. Multiply the “compile time” weighting factors included in the weighting factor set corresponding to the combination. In addition, the second calculation unit 11B compares the weight coefficient set “at program execution time” included in the weight coefficient set corresponding to the first group combination with respect to the timing type unit similarity value “at program execution time” of the program pair. Cross over. Then, the second calculation unit 11B calculates the program similarity by adding the timing type unit similarity of “at compile time” and the timing type unit similarity of “at program execution” after being weighted respectively. Do. Here, the “access destination characteristic classified group” is a group corresponding to the access destination characteristic for each access timing type, and is, for example, a group for each subsystem or a group for each software package.

第1特定部(類似プログラム特定部)11Cは、第2算出部11Bによって算出されたプログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペア(以下、「類似プログラムペア」と呼ぶことがある)を特定する。例えば、第1特定部11Cは、プログラム類似度と「類似判定閾値」との大小に基づいて、類似プログラムペアを特定する。具体的には、第1特定部11Cは、「類似判定閾値」以上のプログラム類似度を有するプログラムペアを、類似プログラムペアとして特定する。   The first specifying unit (similar program specifying unit) 11C may call a program pair (hereinafter, “similar program pair”) in which two configuration programs are similar based on the program similarity calculated by the second calculating unit 11B. Identify). For example, the first specifying unit 11C specifies the similar program pair based on the magnitude of the program similarity and the “similarity determination threshold”. Specifically, the first specifying unit 11C specifies a program pair having a program similarity equal to or higher than the “similarity determination threshold” as a similar program pair.

以上のように第1実施形態によれば、類似プログラム特定装置10において、第1算出部11Aは、複数のプログラムと、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出する。そして、第2算出部11Bは、第1算出部11Aによって各プログラムペアについて算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出する。   As described above, according to the first embodiment, in the similar program identifying device 10, the first calculating unit 11A accesses the access destination and the access destination for each of the plurality of programs and the plurality of access timing types of each program. For each program pair among a plurality of programs, two accesses respectively corresponding to two configuration programs of the program pair for each access timing type, using an access correspondence relation associated with an access pattern including an access purpose of Calculate the timing type unit similarity between patterns. Then, the second calculating unit 11B determines a plurality of timing type unit similarities calculated for each program pair by the first calculating unit 11A, and group combinations of access destination characteristic groups to which two constituent programs of each program pair belong. Program similarity for each program pair is calculated based on the weight coefficient set corresponding to.

この類似プログラム特定装置10の構成により、プログラムペアについて算出したタイミング種別単位類似度に対して、プログラムペアの2つの構成プログラムについてのアクセスタイミング種別毎のアクセス先特性を考慮した重み付けを行うことにより、プログラム類似度を算出するので、より精度の高いプログラム類似度を算出することができる。   With the configuration of the similar program identification device 10, the timing type unit similarity calculated for the program pair is weighted by considering the access destination characteristic for each access timing type for the two constituent programs of the program pair. Since the program similarity is calculated, the more accurate program similarity can be calculated.

また、類似プログラム特定装置10において、第1特定部11Cは、第2算出部11Bによって算出されたプログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する。   Further, in the similar program specifying device 10, the first specifying unit 11C specifies a program pair in which two configuration programs are similar based on the program similarity calculated by the second calculating unit 11B.

この類似プログラム特定装置10により、より精度の高いプログラム類似度に基づいて類似プログラムペアを特定するので、類似プログラムの特定精度を向上させることができる。   The similar program specifying device 10 specifies the similar program pair based on the more accurate program similarity, so that the specifying accuracy of the similar program can be improved.

<第2実施形態>
第2実施形態は、より具体的な実施形態に関する。
Second Embodiment
The second embodiment relates to a more specific embodiment.

<類似プログラム特定装置の構成例>
図2は、第2実施形態の類似プログラム特定装置の一例を示すブロック図である。図2において、類似プログラム特定装置20は、制御部21と、記憶部12とを有している。制御部21は、タイミング種別単位類似度算出部11A、プログラム類似度算出部11B、及び類似プログラム特定部11Cに加えて、情報収集部21Aと、テーブル管理部21Bと、グループ組み合わせ特定部21Cと、重み係数特定部21Dとを有している。以下では、グループ組み合わせ特定部21Cを「第2特定部」と呼び、重み係数特定部21Dを「第3特定部」と呼ぶことがある。
<Configuration Example of Similar Program Identification Device>
FIG. 2 is a block diagram showing an example of the similar program identification device of the second embodiment. In FIG. 2, the similar program identification device 20 includes a control unit 21 and a storage unit 12. The control unit 21 includes an information collection unit 21A, a table management unit 21B, and a group combination specification unit 21C, in addition to the timing type unit similarity calculation unit 11A, the program similarity calculation unit 11B, and the similar program specification unit 11C. And a weighting factor identification unit 21D. Hereinafter, the group combination identification unit 21C may be referred to as a "second identification unit", and the weight coefficient identification unit 21D may be referred to as a "third identification unit".

情報収集部21Aは、ソフトウェア資産を解析し、ソフトウェア資産に含まれる要素に関する情報を収集する。情報収集部21Aによるソフトウェア資産の解析は、一般的なプログラム解析技術で行うことができる。   The information collection unit 21A analyzes the software asset and collects information on elements included in the software asset. The analysis of software assets by the information collection unit 21A can be performed by a general program analysis technique.

テーブル管理部21Bは、情報収集部21Aによって収集された情報を用いて、記憶部12に記憶されている、「システム構成情報テーブル」及び「関係リンクテーブル」を更新する。図3は、第2実施形態のシステム構成情報テーブルの一例を示す図である。図4は、第2実施形態の関係リンクテーブルの一例を示す図である。図5は、図3のシステム構成情報テーブル及び図4の関係リンクテーブルによって表されるソフトウェア資産の構成例を示す図である。   The table management unit 21B updates the "system configuration information table" and the "relation link table" stored in the storage unit 12 using the information collected by the information collection unit 21A. FIG. 3 is a diagram showing an example of a system configuration information table of the second embodiment. FIG. 4 is a view showing an example of a relation link table of the second embodiment. FIG. 5 is a view showing a configuration example of software assets represented by the system configuration information table of FIG. 3 and the relation link table of FIG.

図3に示すように、システム構成情報テーブルには、項目として、「要素管理番号」、「要素種別」、「要素名称」、「アクセス先特性別グループ」、「出リンク」、及び「入リンク」が含まれている。例えば、要素番号E1のエントリによって、プログラム1がサブシステムAに含まれ、プログラム1からリンク管理番号L1,L2,L3,L4のリンクが出ていることが表されている。   As shown in FIG. 3, in the system configuration information table, the items "element management number", "element type", "element name", "group by access destination characteristics", "out link", and "in link" as items. "It is included. For example, the entry of the element number E1 indicates that the program 1 is included in the subsystem A and that the link of the link management numbers L1, L2, L3, and L4 is output from the program 1.

すなわち、「要素管理番号」項目は、エントリの番号を示している。また、「要素種別」は、要素の種類を示しており、例えば、プログラム、マクロ、テーブル、及びファイル等である。また、「要素名称」は、要素の名称であり、要素の識別子として用いられることができる。   That is, the "element management number" item indicates the number of the entry. Also, “element type” indicates the type of element, and is, for example, a program, a macro, a table, a file, and the like. Also, "element name" is the name of an element and can be used as an identifier of the element.

また、「アクセス先特性別グループ」は、アクセスタイミング種別毎のアクセス先特性に応じた、プログラムのグループであり、例えば、サブシステム毎又はソフトウェアパッケージ毎のグループである。ここで、プログラムは、例えば、命名規則に基づいて、アクセス先特性別グループにグルーピングされてもよい。また、プログラムとアクセス先特性別グループとの対応関係は、この対応関係を記述した設定ファイルから情報収集部21Aによって収集されてもよい。図3に示されるシステム構成情報テーブルでは、一例として、プログラムは、一般的な業務処理プログラムが含まれるサブシステムAと、各業務処理で共通的に利用される共通部品であるサブシステムBとに、グルーピングされている。   The “access destination characteristic classified group” is a program group corresponding to the access destination characteristic for each access timing type, and is, for example, a group for each subsystem or software package. Here, the programs may be grouped into access target characteristic groups, for example, based on naming rules. Further, the correspondence between the program and the access target characteristic group may be collected by the information collection unit 21A from the setting file in which the correspondence is described. In the system configuration information table shown in FIG. 3, as an example, the program is divided into a subsystem A including a general task processing program and a subsystem B which is a common component commonly used in each task processing. , Are grouped.

また、「出リンク」は、そのエントリの要素を始点とするリンクである。また、「入リンク」は、そのエントリの要素を終点とするリンクである。   In addition, “output link” is a link starting from the element of the entry. Also, “incoming link” is a link whose end point is the element of the entry.

また、図4に示すように、関係リンクテーブルには、項目として、「リンク管理番号」、「アクセス目的種別」、「アクセスタイミング種別」、「始点情報」、及び「終点情報」が含まれている。例えば、リンク管理番号L1のエントリによって、コンパイル時に要素管理番号E1の要素が要素番号E8の要素を引用するリンクが表されている。   In addition, as shown in FIG. 4, the relation link table includes, as items, “link management number”, “access purpose type”, “access timing type”, “start point information”, and “end point information”. There is. For example, the link management number L1 entry represents a link in which the element of the element management number E1 refers to the element of the element number E8 at compile time.

すなわち、「リンク管理番号」項目は、リンクの番号を示している。また、「アクセス目的種別」は、「始点情報」で表される要素が「終点情報」で表される要素にアクセスする目的である。また、「アクセスタイミング種別」は、「始点情報」で表される要素が「終点情報」で表される要素にアクセスするタイミングの種類を表し、例えば、「コンパイル時」及び「プログラム実行時」を含んでいる。また、「始点情報」は、リンクの始点となる要素を示している。また、「終点情報」は、リンクの終点となる要素を示している。   That is, the "link management number" item indicates the number of the link. The “access purpose type” is an object for accessing the element represented by the “end point information” as the element represented by the “start point information”. "Access timing type" represents the type of timing when the element represented by "start point information" accesses the element represented by "end point information". For example, "compile time" and "program execution time" It contains. Also, "start point information" indicates an element that is the start point of the link. Also, "end point information" indicates an element that is the end point of the link.

以上で説明した図3のシステム構成情報テーブル及び図4の関係リンクテーブルによって、「アクセス対応関係」、及び、「グループ対応関係」が表されている。   The “access correspondence relationship” and the “group correspondence relationship” are represented by the system configuration information table of FIG. 3 and the relationship link table of FIG. 4 described above.

ここで、「アクセス対応関係」は、上記の通り、複数のプログラム(つまり、複数のプログラム識別子)と、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセスパターンとを対応付けた対応関係である。図3及び図4を参照すると、例えば、要素管理番号E1のプログラム1は、コンパイル時に要素管理番号E8のマクロaに対して引用を目的としてアクセスする、アクセスパターンを有している。また、要素管理番号E1のプログラム1は、プログラム実行時に要素管理番号E12のテーブルAに対して読み込む目的でアクセスし、要素管理番号E14のテーブルCに対して読み込む目的でアクセスし、要素管理番号E15のテーブルDに対して書き込む目的でアクセスする、アクセスパターンを有している。   Here, as described above, the “access correspondence relationship” is a correspondence relationship in which a plurality of programs (that is, a plurality of program identifiers) are associated with access patterns for each of a plurality of access timing types of each program. . Referring to FIGS. 3 and 4, for example, program 1 of element management number E1 has an access pattern for accessing macro a of element management number E8 at the time of compilation for the purpose of citation. The program 1 of the element management number E1 accesses for reading the table A of the element management number E12 at the time of program execution, and accesses for reading the table C of the element management number E14, and the element management number E15 There is an access pattern to be accessed for the purpose of writing to the table D of FIG.

また、「グループ対応関係」は、複数のプログラムと、各プログラムが属する、アクセスタイミング種別毎のアクセス先特性に応じたアクセス先特性別グループとを対応付けた、対応関係である。図3及び図4を参照すると、例えば、プログラム1,2,2’,3は、サブシステムAに対応づけられ、プログラム4,5,5’は、サブシステムBに対応づけられている。上記の通り、サブシステムAは、一般的な業務処理プログラムのグループであり、サブシステムBは、各業務処理で共通的に利用される共通部品のグループである。業務処理の特徴は、アクセスするテーブルやファイルに現れやすいため、プログラム実行時のアクセスパターン(つまり、アクセス先特性)に現れる。また、共通部品の特徴は、業務的なテーブルやファイルへのアクセスが少ないので、コンパイル時のアクセスパターン(つまり、アクセス先特性)に現れる。このようなアクセスタイミング種別毎のアクセス先特性に応じて、プログラム1,2,2’,3,4,5,5’は、サブシステムA及びサブシステムBにグルーピングされている。   The “group correspondence relationship” is a correspondence relationship in which a plurality of programs are associated with an access destination characteristic group corresponding to an access destination characteristic for each access timing type to which each program belongs. Referring to FIGS. 3 and 4, for example, programs 1, 2, 2 and 3 are associated with subsystem A, and programs 4, 5 and 5 'are associated with subsystem B. As described above, the subsystem A is a group of general task processing programs, and the subsystem B is a group of common parts commonly used in each task processing. The characteristic of business processing appears in an access pattern (that is, access destination characteristic) at the time of program execution because it tends to appear in a table or file to be accessed. Also, the feature of the common part appears in the access pattern at compile time (that is, the access destination characteristic) because there is less access to business tables and files. The programs 1, 2, 2 ', 3, 4, 5 and 5' are grouped into subsystem A and subsystem B according to the access destination characteristic for each access timing type.

図2の説明に戻り、第2特定部(グループ組み合わせ特定部)21Cは、上記「グループ対応関係」を用いて、「類似プログラム探索範囲」に含まれる複数のプログラムのうちの各プログラムペアの2つの構成プログラムのグループ組み合わせを特定する。例えば、プログラム1及びプログラム2のプログラムペアであれば、特定されるグループ組み合わせは、組み合わせA−Aである。また、プログラム4及びプログラム5のプログラムペアであれば、特定されるグループ組み合わせは、組み合わせB−Bである。また、プログラム3及びプログラム4のプログラムペアであれば、特定されるグループ組み合わせは、組み合わせA−Bである。   Returning to the explanation of FIG. 2, the second identification unit (group combination identification unit) 21C uses the above-mentioned “group correspondence relationship” to select 2 of each program pair of the plurality of programs included in the “similar program search range”. Identify a group combination of two configuration programs. For example, in the case of a program pair of program 1 and program 2, the specified group combination is combination AA. Further, in the case of the program pair of program 4 and program 5, the specified group combination is combination B-B. Further, in the case of the program pair of program 3 and program 4, the specified group combination is combination AB.

第3特定部(重み係数特定部)21Dは、「重み対応関係」に基づいて、第2特定部によって特定された各プログラムペアのグループ組み合わせに対応する重み係数セットを特定する。「重み対応関係」は、複数のグループ組み合わせと、各グループ組み合わせに応じた、アクセスタイミング種別間の重み係数セットとを対応付けた、対応関係である。「重み対応関係」は、例えば、図6に示す重み係数テーブルとして、記憶部12に保持される。   The third specifying unit (weighting coefficient specifying unit) 21D specifies a weight coefficient set corresponding to a group combination of each program pair specified by the second specifying unit based on the “weight correspondence relationship”. The “weight correspondence relationship” is a correspondence relationship in which a plurality of group combinations are associated with a weight coefficient set between access timing types according to each group combination. The “weight correspondence relationship” is held in, for example, the storage unit 12 as a weight coefficient table illustrated in FIG.

例えば、グループ組み合わせA−Aの場合、「コンパイル時」のタイミング種別単位類似度に対して掛け合わされる重み係数が「0.2」であり、「プログラム実行時」のタイミング種別単位類似度に対して掛け合わされる重み係数が「0.8」である、重み係数セットが特定されることになる。ここで、上記の通り、サブシステムAの特徴は、プログラム実行時のアクセスパターン(つまり、アクセス先特性)に現れる傾向にあるので、グループ組み合わせA−Aに対応する重み係数セットでは、「プログラム実行時」に対応する重み係数に大きな値が設定されている。一方、サブシステムBの特徴は、コンパイル時のアクセスパターン(つまり、アクセス先特性)に現れる傾向にあるので、グループ組み合わせB−Bに対応する重み係数セットでは、「コンパイル時」に対応する重み係数に大きな値が設定されている。これに対して、グループ組み合わせA−Bに対応する重み係数セットでは、「コンパイル時」に対応する重み係数と「プログラム実行時」に対応する重み係数とを等しくしている。すなわち、グループ組み合わせA−Bに対応する重み係数セットは、グループ組み合わせA−Aに対応する重み係数セット及びグループ組み合わせB−Bに対応する重み係数セットを平均したものと同等になっている。   For example, in the case of group combination A-A, the weight coefficient to be multiplied with the timing type unit similarity of "at compile time" is "0.2", and for the timing type unit similarity of "at program execution". Thus, a weight coefficient set is identified, which has a weight coefficient to be multiplied by “0.8”. Here, as described above, since the characteristics of subsystem A tend to appear in the access pattern (that is, access destination characteristics) at the time of program execution, in the weighting coefficient set corresponding to group combination A-A, A large value is set to the weight coefficient corresponding to “time”. On the other hand, since the characteristics of subsystem B tend to appear in the access pattern at compile time (that is, access destination characteristics), the weight coefficient set corresponding to group combination B-B is the weight coefficient corresponding to "compile time" Is set to a large value. On the other hand, in the weight coefficient set corresponding to the group combination AB, the weight coefficient corresponding to "compile time" is equal to the weight coefficient corresponding to "program execution time". That is, the weight coefficient set corresponding to the group combination AB is equivalent to the average of the weight coefficient set corresponding to the group combination A-A and the weight coefficient set corresponding to the group combination B-B.

そして、第2算出部(プログラム類似度算出部)11Bは、第1算出部11Aによって各プログラムペアについて算出された複数のタイミング種別単位類似度と、第3特定部21Dによって特定された「重み係数セット」とに基づいて、第1実施形態で説明したように、各プログラムペアについてのプログラム類似度を算出する。   Then, the second calculating unit (program similarity calculating unit) 11B determines the plurality of timing type unit similarities calculated for each program pair by the first calculating unit 11A and the “weighting coefficient specified by the third specifying unit 21D. Based on the “set”, as described in the first embodiment, the program similarity for each program pair is calculated.

<類似プログラム特定装置の動作例>
以上の構成を有する類似プログラム特定装置の処理動作の一例について説明する。ここでは、特に、プログラム類似度を算出するまでの処理について説明する。図7は、第2実施形態の類似プログラム特定装置の処理動作の一例を示すフローチャートである。
<Operation Example of Similar Program Identification Device>
An example of the processing operation of the similar program identification device having the above configuration will be described. Here, in particular, processing until calculation of the program similarity is described. FIG. 7 is a flowchart showing an example of the processing operation of the similar program identification device of the second embodiment.

類似プログラム特定装置20において、第1算出部(タイミング種別単位類似度算出部)11Aは、「類似プログラム探索範囲」に含まれる複数のプログラムのうちの1つのプログラムペアを、注目プログラムペアとして選択する(ステップS101)。ここでは、プログラム1及びプログラム2のプログラムペアが注目プログラムペアとして選択されたものとする。   In the similar program specification device 20, the first calculation unit (timing type unit similarity calculation unit) 11A selects one program pair among a plurality of programs included in the “similar program search range” as a program pair of interest. (Step S101). Here, it is assumed that the program pair of program 1 and program 2 is selected as the program pair of interest.

〈タイミング種別単位類似度の算出処理〉
次いで、第1算出部11Aは、注目プログラムペアのタイミング種別単位類似度を算出する(ステップS102)。
<Calculation processing of timing type unit similarity>
Next, the first calculator 11A calculates the timing type unit similarity of the target program pair (step S102).

例えば、第1算出部11Aは、まず、アクセスタイミング種別毎に、注目プログラムペアに関係するリンクの種類をカウントする。プログラム1及びプログラム2のプログラムペアの場合、アクセスタイミング種別が「コンパイル時」であるリンクの総数は、リンク管理番号L1の出リンク及びリンク管理番号L4の出リンクの2つであるが、これらの出リンクは互いに終点の要素及びアクセス目的種別が同じであるため、1つとしてカウントされる。また、アクセスタイミング種別が「プログラム実行時」であるリンクの総数は、リンク管理番号L2,L3,L4,L6,L7,L8の出リンクの6つであるが、リンク管理番号L3,L7の出リンクは、互いに終点の要素及びアクセス目的種別が同じであるため、1つとしてカウントされる。従って、プログラム1及びプログラム2のプログラムペアの場合、アクセスタイミング種別が「プログラム実行時」であるリンクの種類は、5つである。なお、複数の入リンクは、互いに始点の要素及びアクセス目的種別が同じ場合に、1つとしてカウントされる。   For example, the first calculation unit 11A first counts, for each access timing type, the type of link related to the target program pair. In the case of the program pair of program 1 and program 2, the total number of links whose access timing type is "compile time" is two, the outgoing link of link management number L1 and the outgoing link of link management number L4. The outgoing link is counted as one since the elements of the end point and the access purpose type are the same. The total number of links whose access timing type is "program execution" is six of the outgoing links of link management numbers L2, L3, L4, L6, L7, L8, but the output of link management numbers L3, L7 The links are counted as one because the end elements and the access purpose types are the same. Therefore, in the case of the program pair of program 1 and program 2, there are five types of links whose access timing type is "program execution time". A plurality of incoming links are counted as one when the start point element and the access purpose type are the same.

次に、第1算出部11Aは、注目プログラムペアの2つの構成プログラムの間で共通のリンクの種類をカウントする。プログラム1及びプログラム2のプログラムペアの場合、アクセスタイミング種別が「コンパイル時」あり且つ両構成プログラムに共通するリンクは、リンク管理番号L1の出リンク及びリンク管理番号L4の出リンクである。この場合も上記と同様に、リンク管理番号L1の出リンク及びリンク管理番号L4の出リンクは互いに終点の要素及びアクセス目的種別が同じであるため、1つとしてカウントされる。また、プログラム1及びプログラム2のプログラムペアの場合、アクセスタイミング種別が「プログラム実行時」あり且つ両構成プログラムに共通するリンクは、リンク管理番号L3の出リンク及びリンク管理番号L7の出リンクである。この場合も上記と同様に、リンク管理番号L3の出リンク及びリンク管理番号L7の出リンクは互いに終点の要素及びアクセス目的種別が同じであるため、1つとしてカウントされる。   Next, the first calculator 11A counts the type of link common to the two configuration programs of the program pair of interest. In the case of the program pair of program 1 and program 2, the link having the access timing type “at compile time” and common to both configuration programs is the outgoing link of link management number L1 and the outgoing link of link management number L4. Also in this case, as in the above case, the outgoing link of the link management number L1 and the outgoing link of the link management number L4 are counted as one since the elements of the end point and the access purpose type are the same. Further, in the case of the program pair of program 1 and program 2, the link having the access timing type “at the time of program execution” and common to both configuration programs is the outgoing link of link management number L3 and the outgoing link of link management number L7. . Also in this case, as in the above, the outgoing link of the link management number L3 and the outgoing link of the link management number L7 are counted as one since the elements of the end point and the access purpose type are the same.

そして、第1算出部11Aは、以下のような計算を行って、注目プログラムペアについての、「コンパイル時」のタイミング種別単位類似度、及び、「プログラム実行時」のタイミング種別単位類似度をそれぞれ算出する。
「コンパイル時」のタイミング種別単位類似度=1/1=1
「プログラム実行時」のタイミング種別単位類似度=1/5=0.2
Then, the first calculation unit 11A performs the following calculation to calculate the “at compile time” timing type unit similarity and “at the time of program execution” timing type unit similarity for the program pair of interest. calculate.
"Compile time" timing type unit similarity = 1/1 = 1
At program execution timing type unit similarity = 1/5 = 0.2

〈グループ組み合わせの特定処理〉
次いで、第2特定部(グループ組み合わせ特定部)21Cは、「グループ対応関係」を用いて、注目プログラムペアの2つの構成プログラムのグループ組み合わせを特定する(ステップS103)。プログラム1及びプログラム2のプログラムペアの場合、いずれの構成プリグラムもサブシステムAに属しているので、グループ組み合わせA−Aが特定されることになる。
<Specific processing of group combination>
Next, the second specification unit (group combination specification unit) 21C specifies a group combination of the two configuration programs of the program pair of interest using the “group correspondence relationship” (step S103). In the case of the program pair of program 1 and program 2, since any of the configuration programs belongs to subsystem A, group combination A-A is specified.

〈重み係数セットの特定処理〉
次いで、第3特定部(重み係数特定部)21Dは、「重み対応関係」に基づいて、ステップS103で特定された注目プログラムペアのグループ組み合わせに対応する重み係数セットを特定する(ステップS104)。プログラム1及びプログラム2のプログラムペアの場合、図6に示す重み係数テーブルにおいてグループ組み合わせA−Aに対応する重み係数セット(0.2,0.8)が特定されることになる。
<Specific process of weighting coefficient set>
Next, the third specifying unit (weighting coefficient specifying unit) 21D specifies a weight coefficient set corresponding to the group combination of the program pair of interest specified in step S103 based on the “weight correspondence relationship” (step S104). In the case of the program pair of program 1 and program 2, the weighting coefficient set (0.2, 0.8) corresponding to the group combination A-A is specified in the weighting coefficient table shown in FIG.

〈プログラム類似度の算出処理〉
次いで、第2算出部(プログラム類似度算出部)11Bは、ステップS102で注目プログラムペアについて算出された複数のタイミング種別単位類似度と、ステップS104で特定された「重み係数セット」とに基づいて、注目プログラムペアについてのプログラム類似度を算出する(ステップS105)。プログラム1及びプログラム2のプログラムペアの場合、具体的には、次のようにプログラム類似度が算出される。
プログラム類似度=「コンパイル時」のタイミング種別単位類似度×「コンパイル時」の重み係数+「プログラム実行時」のタイミング種別単位類似度×「プログラム実行時」の重み係数=1×0.2+0.2×0.8=0.36
<Calculation processing of program similarity>
Next, the second calculating unit (program similarity calculating unit) 11B determines the plurality of timing type unit similarities calculated for the target program pair in step S102 and the “weighting coefficient set” specified in step S104. Program similarity for the target program pair is calculated (step S105). Specifically, in the case of the program pair of program 1 and program 2, the program similarity is calculated as follows.
Program similarity = timing type unit similarity of “at compile time” × weight coefficient of “at compile time” + timing type unit similarity of “at program execution” × weight coefficient of “at program execution” = 1 × 0.2 + 0. 2 × 0.8 = 0.36

次いで、第1算出部11Aは、「類似プログラム探索範囲」のうちのすべてのプログラムペアを注目プログラムペアとして選択済みか否かを判定する(ステップS106)。すべてのプログラムペアを注目プログラムペアとして選択済みである場合(ステップS106YES)、図7のフローは終了する。   Next, the first calculator 11A determines whether all program pairs in the “similar program search range” have been selected as the target program pair (step S106). If all the program pairs have been selected as the target program pair (YES in step S106), the flow of FIG. 7 ends.

すべてのプログラムペアを注目プログラムペアとして選択済みでない場合(ステップS106NO)、第1算出部11Aは、未だ注目プログラムペアとして選択していない他のプログラムペアを注目プログラムペアとして選択する(ステップS107)。そして、フローは、ステップS102に戻る。そして、新たに選択された注目プログラムペアについて、上述のステップS102からステップS105の処理が行われることになる。   If all the program pairs have not been selected as the target program pair (NO in step S106), the first calculation unit 11A selects another program pair not selected as the target program pair as the target program pair (step S107). Then, the flow returns to step S102. Then, for the newly selected focused program pair, the processing from step S102 to step S105 described above is performed.

<プログラム類似度の算出結果>
以上の処理手順に従って算出された、プログラム類似度の算出結果について説明する。図8は、プログラム類似度の算出結果を示す図である。図8において「組み合わせ」は、上記のプログラムペアに対応し、「重み付き類似度」は、上記のプログラム類似度に対応する。また、図8においては、比較のために、「分類なし類似度」、「コンパイル時類似度」、及び「実行時類似度」を記載している。「コンパイル時類似度」は、上記の「コンパイル時」のタイミング種別単位類似度に対応し、「実行時類似度」は、上記の「プログラム実行時」のタイミング種別単位類似度に対応する。また、「分類なし類似度」は、アクセスタイミング種別を考慮せずに、プログラムペアについて、共通のリンクの種類の数をリンクの種類の総数で除算することにより求められる値である。すなわち、プログラム1及びプログラム2のプログラムペアの場合、「分類なし類似度」は、次の計算式によって算出される。
分類なし類似度=(1+1)/(1+5)=0.33
<Calculation result of program similarity>
The calculation result of the program similarity degree calculated according to the above processing procedure will be described. FIG. 8 is a diagram showing calculation results of program similarity. In FIG. 8, “combination” corresponds to the above program pair, and “weighted similarity” corresponds to the above program similarity. In addition, in FIG. 8, “classification similarities”, “compile time similarity”, and “run time similarity” are described for comparison. The "compilation time similarity" corresponds to the above-mentioned "compilation time" timing type unit similarity, and the "execution time similarity" corresponds to the above "program execution time" timing type unit similarity. Also, “classification similarity” is a value obtained by dividing the number of common link types for the program pair by the total number of link types without considering the access timing type. That is, in the case of the program pair of program 1 and program 2, "classification similarities" are calculated by the following formula.
No classification Similarity = (1 + 1) / (1 + 5) = 0.33

ここで、図5に示したソフトウェア資産の構成は、次の特徴を有している。
(1)サブシステムAに含まれるプログラムは、一般的な業務処理プログラムであり、それぞれの業務に関連するテーブル又はファイルにアクセスする。
(2)サブシステムBに含まれるプログラムは、各業務処理で共通的に利用される共通部品であり、業務に関連するテーブルやファイルにアクセスしない。
(3)テーブルCはメッセージが格納されたテーブルで、システム内の全メッセージが格納されている。そのため、全てのプログラムからアクセスされる。
(4)プログラム2’は、プログラム2をリファクタリングしたもの、つまり、他機能でも利用可能なコードをマクロ(マクロb、c)として切り出したものである。業務的には同一処理のため、アクセスするテーブルに変更はない。この2つのプログラムは、類似プログラムとして検出されるべきものである。
(5)プログラム5’も、プログラム5をリファクタリングしたものである。この2つのプログラムも、類似プログラムとして検出されるべきものである。
Here, the configuration of the software asset shown in FIG. 5 has the following features.
(1) The program included in the subsystem A is a general task processing program, and accesses a table or file associated with each task.
(2) The program included in the subsystem B is a common component commonly used in each business process, and does not access tables and files related to business.
(3) Table C is a table storing messages, in which all the messages in the system are stored. Therefore, it is accessed from all programs.
(4) The program 2 'is obtained by refactoring the program 2, that is, the code which can be used by other functions is cut out as a macro (macros b and c). There is no change in the accessed table because the process is the same in business. These two programs are to be detected as similar programs.
(5) The program 5 'is also a refactoring of the program 5. These two programs are also to be detected as similar programs.

図9は、プログラムペアの番号に対してプログラム類似度の値をプロットしたグラフである。図9に示すように、類似プログラムとして特定されるべき、組み合わせ番号3のプログラムペア(プログラム2,2’)及び組み合わせ番号8のプログラムペア(プログラム5,5’)のプログラム類似度が、他のプログラムペアのプログラム類似度に比べて、大きな値となっている。このため、上記の「類似判定閾値」の値を例えば0.8に設定することにより、構成プログラムが類似しているプログラムペアを精度良く特定することができる。   FIG. 9 is a graph in which program similarity values are plotted against program pair numbers. As shown in FIG. 9, the program similarity of the program pair of combination No. 3 (program 2, 2 ') and the program pair of combination No. 8 (programs 5, 5') to be identified as similar programs This value is larger than the program similarity of the program pair. Therefore, by setting the value of the above-mentioned "similarity determination threshold" to, for example, 0.8, it is possible to accurately specify a program pair whose configuration programs are similar.

これに対して、図10から図12に示すように、「分類なし類似度」、「コンパイル時類似度」、及び「実行時類似度」のいずれを用いても、構成プログラムが類似しているプログラムペアを特定することができない。図10は、プログラムペアの番号に対して分類なし類似度の値をプロットしたグラフである。図11は、プログラムペアの番号に対してコンパイル時類似度の値をプロットしたグラフである。図12は、プログラムペアの番号に対して実行時類似度の値をプロットしたグラフである。   On the other hand, as shown in FIG. 10 to FIG. 12, the configuration programs are similar regardless of which of “classification similarities”, “compile time similarity” and “run time similarity” are used. Unable to identify program pair. FIG. 10 is a graph in which the value of similarity without classification is plotted against the number of program pairs. FIG. 11 is a graph in which compile-time similarity values are plotted against program pair numbers. FIG. 12 is a graph in which the values of runtime similarity are plotted against the numbers of program pairs.

以上のように第2実施形態によれば、類似プログラム特定装置20において、第1算出部11Aは、上記の「アクセス対応関係」を用いて、「類似プログラム探索範囲」に含まれる複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出する。そして、第2特定部21Cは、上記「グループ対応関係」を用いて、複数のプログラムのうちの各プログラムペアの2つの構成プログラムのグループ組み合わせを特定する。そして、第3特定部21Dは、上記の「重み対応関係」に基づいて、第2特定部によって特定された各プログラムペアのグループ組み合わせに対応する重み係数セットを特定する。そして、第2算出部11Bは、第1算出部11Aによって各プログラムペアについて算出された複数のタイミング種別単位類似度と、第3特定部21Dによって特定された「重み係数セット」とに基づいて、各プログラムペアについてのプログラム類似度を算出する。   As described above, according to the second embodiment, in the similar program specifying device 20, the first calculation unit 11A uses the above-mentioned "access correspondence relationship" to set a plurality of programs included in the "similar program search range". For each program pair among them, timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair is calculated for each access timing type. Then, the second specifying unit 21C specifies a group combination of two configuration programs of each program pair of the plurality of programs using the “group correspondence relationship”. Then, the third specifying unit 21D specifies the weighting coefficient set corresponding to the group combination of each program pair specified by the second specifying unit based on the above-mentioned “weight correspondence relationship”. Then, based on the plurality of timing type unit similarities calculated for each program pair by the first calculation unit 11A and the “weighting coefficient set” specified by the third specifying unit 21D, the second calculation unit 11B Program similarity for each program pair is calculated.

この類似プログラム特定装置20の構成により、プログラムペアについて算出したタイミング種別単位類似度に対して、プログラムペアの2つの構成プログラムについてのアクセスタイミング種別毎のアクセス先特性を考慮した重み付けを行うことにより、プログラム類似度を算出するので、より精度の高いプログラム類似度を算出することができる。   With the configuration of the similar program specification device 20, weighting is performed in consideration of the access destination characteristic for each access timing type for two configuration programs of the program pair, on the timing type unit similarity calculated for the program pair. Since the program similarity is calculated, the more accurate program similarity can be calculated.

<変形例>
以上で説明した類似プログラム特定装置20に対して、次のような変形を施すこともできる。
<Modification>
The following modification can be applied to the similar program identification device 20 described above.

<1>記憶部12において、類似判定に用いないリンクに関する情報を定義する除外リンクテーブルを追加的に保持してもよい。そして、上記の〈タイミング種別単位類似度の算出処理〉において、リンクの種類のカウント対象及び共通のリンクの種類カウント対象の両方から、除外リンクテーブルに保持されているリンクを除外してもよい。これにより、メッセージテーブルのようにほとんどのプログラムから関係リンクが張られるために、プログラムの特徴を表すことに寄与しない、リンクを除外することができる。この結果として、プログラム類似度の算出精度をより向上させることができる。   <1> The storage unit 12 may additionally hold an excluded link table that defines information on links not used for similarity determination. Then, in the <timing type unit similarity calculation process> described above, the link held in the excluded link table may be excluded from both the link type count target and the common link type count target. In this way, links can be excluded that do not contribute to representing program features because related links are provided from most programs as in the message table. As a result, it is possible to further improve the calculation accuracy of the program similarity.

<2>以上の説明では、グループ組み合わせA−Bの重み係数セットを重み係数テーブルに予め設定しておいたが、これに限定されるものではなく、重み係数テーブルにおけるグループ組み合わせA−Aの重み係数セットとグループ組み合わせB−Bの重み係数セットとから、第3特定部(重み係数特定部)21Dが導き出してもよい。   <2> In the above description, the weighting coefficient set of group combination AB is previously set in the weighting coefficient table, but it is not limited to this, and the weight of group combination A-A in the weighting coefficient table A third identification unit (weighting coefficient identification unit) 21D may derive from the coefficient set and the weighting coefficient set of the group combination B-B.

<他の実施形態>
<1>第1実施形態及び第2実施形態においては、制御部(11,21)と記憶部(12)とが1つの類似プログラム特定装置(10,20)に含まれるものとして説明を行ったが、これに限定されるものではない。例えば、制御部(11,21)と記憶部(12)とは、それぞれ別々の装置に含まれていてもよい。
Other Embodiments
<1> In the first and second embodiments, the control unit (11, 21) and the storage unit (12) are described as being included in one similar program identification device (10, 20). However, it is not limited to this. For example, the control unit (11, 21) and the storage unit (12) may be included in separate devices.

<2>図13は、類似プログラム特定装置のハードウェア構成例を示す図である。図13において、類似プログラム特定装置100は、プロセッサ101と、メモリ102とを有している。第1実施形態及び第2実施形態で説明した類似プログラム特定装置10,20の制御部11,21は、プロセッサ101がメモリ102に記憶されたプログラムを読み込んで実行することにより実現される。また、記憶部12は、メモリ102によって実現されてもよい。   <2> FIG. 13 is a diagram showing an example of the hardware configuration of the similar program identification device. In FIG. 13, the similar program identification device 100 includes a processor 101 and a memory 102. The control units 11 and 21 of the similar program identification devices 10 and 20 described in the first embodiment and the second embodiment are realized by the processor 101 reading and executing a program stored in the memory 102. In addition, the storage unit 12 may be realized by the memory 102.

なお、本発明は上記の実施形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。   In addition, this invention is not limited to said embodiment, It is possible to change suitably in the range which does not deviate from the meaning.

10,20 類似プログラム特定装置
11,21 制御部
11A タイミング種別単位類似度算出部(第1算出部)
11B プログラム類似度算出部(第2算出部)
11C 類似プログラム特定部(第1特定部)
12 記憶部
21A 情報収集部
21B テーブル管理部
21C グループ組み合わせ特定部(第2特定部)
21D 重み係数特定部(第3特定部)
10, 20 Similar program identification device 11, 21 Control unit 11A Timing type unit similarity calculation unit (first calculation unit)
11B Program similarity calculation unit (second calculation unit)
11C Similar Program Identification Unit (First Identification Unit)
12 storage unit 21A information collection unit 21B table management unit 21C group combination identification unit (second identification unit)
21D weight coefficient identification unit (third identification unit)

Claims (4)

複数のプログラムと、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、前記複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出する、第1算出部と、
前記第1算出部によって各プログラムペアについて算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出する第2算出部と、
前記第2算出部によって算出されたプログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する第1特定部と、
を具備する類似プログラム特定装置。
Of the plurality of programs, using an access correspondence relationship in which a plurality of programs are associated with an access destination for each of a plurality of access timing types of each program and an access pattern including an access purpose to the access destination. A first calculation unit configured to calculate, for each program pair, a timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair for each access timing type;
Based on the plurality of timing type unit similarities calculated for each program pair by the first calculation unit, and the weighting coefficient set corresponding to the group combination of the access destination characteristic group to which the two constituent programs of each program pair belong. A second calculation unit that calculates the program similarity for each program pair;
A first specification unit that specifies a program pair in which two configuration programs are similar based on the program similarity calculated by the second calculation unit;
Similar program identification device equipped with.
前記複数のプログラムと、各プログラムが属する、アクセスタイミング種別毎のアクセス先特性に応じた前記アクセス先特性別グループとを対応付けたグループ対応関係に基づいて、各プログラムペアの2つの構成プログラムのグループ組み合わせを特定する第2特定部と、
複数のグループ組み合わせと、各グループ組み合わせに応じた、アクセスタイミング種別間の重み係数セットとを対応付けた重み対応関係に基づいて、前記第2特定部によって特定された各プログラムペアのグループ組み合わせに対応する重み係数セットを特定する第3特定部と、
をさらに具備し、
前記第2算出部は、前記第1算出部によって各プログラムペアについて算出された複数のタイミング種別単位類似度と、前記第3特定部によって特定された各プログラムペアのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出する、
請求項1記載の類似プログラム特定装置。
A group of two constituent programs of each program pair based on a group correspondence relationship in which the plurality of programs are associated with the access destination characteristic group corresponding to the access destination characteristic for each access timing type to which each program belongs. A second identification unit that identifies the combination;
Corresponds to a group combination of each program pair identified by the second identification unit based on a weight correspondence relationship in which a plurality of group combinations are associated with a weight coefficient set between access timing types according to each group combination A third identification unit that identifies a set of weighting coefficients to be
Further equipped,
The second calculation unit sets a plurality of timing type unit similarity degrees calculated for each program pair by the first calculation unit, and a weighting coefficient set corresponding to a group combination of each program pair specified by the third specification unit. Calculate the program similarity for each program pair based on
The similar program identification device according to claim 1.
複数のプログラムと、各プログラムの複数のアクセスタイミング種別のそれぞれについてのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、前記複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出し、
各プログラムペアについて前記算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出し、
前記プログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する、
類似プログラム特定方法。
Of the plurality of programs, using an access correspondence relationship in which a plurality of programs are associated with an access destination for each of a plurality of access timing types of each program and an access pattern including an access purpose to the access destination. For each program pair, for each access timing type, calculate timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair,
Each program pair is calculated based on the calculated plurality of timing type unit similarities for each program pair, and a weighting coefficient set corresponding to a combination of access target characteristic groups to which the two constituent programs of each program pair belong. Calculate the program similarity for
The two component programs identify similar program pairs based on the program similarity.
Similar program identification method.
複数のプログラムと、複数のアクセスタイミング種別のそれぞれについての各プログラムのアクセス先及び該アクセス先へのアクセス目的を含むアクセスパターンとを対応付けたアクセス対応関係を用いて、前記複数のプログラムのうちの各プログラムペアについて、アクセスタイミング種別毎に、プログラムペアの2つの構成プログラムにそれぞれ対応する2つのアクセスパターン間のタイミング種別単位類似度を算出し、
各プログラムペアについて前記算出された複数のタイミング種別単位類似度と、各プログラムペアの2つの構成プログラムがそれぞれ属するアクセス先特性別グループのグループ組み合わせに対応する重み係数セットとに基づいて、各プログラムペアについてのプログラム類似度を算出し、
前記プログラム類似度に基づいて、2つの構成プログラムが類似するプログラムペアを特定する、
処理を、類似プログラム特定装置に実行させる、制御プログラム。
Of the plurality of programs, using an access correspondence relationship in which a plurality of programs are associated with an access pattern of each program for each of a plurality of access timing types and an access pattern including an access purpose to the access destination. For each program pair, for each access timing type, calculate timing type unit similarity between two access patterns respectively corresponding to two configuration programs of the program pair,
Each program pair is calculated based on the calculated plurality of timing type unit similarities for each program pair, and a weighting coefficient set corresponding to a combination of access target characteristic groups to which the two constituent programs of each program pair belong. Calculate the program similarity for
The two component programs identify similar program pairs based on the program similarity.
A control program that causes a similar program specification device to execute processing.
JP2017173814A 2017-09-11 2017-09-11 Similar program identification device, similar program identification method, and control program Active JP6958148B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017173814A JP6958148B2 (en) 2017-09-11 2017-09-11 Similar program identification device, similar program identification method, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017173814A JP6958148B2 (en) 2017-09-11 2017-09-11 Similar program identification device, similar program identification method, and control program

Publications (2)

Publication Number Publication Date
JP2019049870A true JP2019049870A (en) 2019-03-28
JP6958148B2 JP6958148B2 (en) 2021-11-02

Family

ID=65905601

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017173814A Active JP6958148B2 (en) 2017-09-11 2017-09-11 Similar program identification device, similar program identification method, and control program

Country Status (1)

Country Link
JP (1) JP6958148B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013003664A (en) * 2011-06-13 2013-01-07 Sony Corp Information processing apparatus and method
JP2014157578A (en) * 2013-02-18 2014-08-28 Nec Casio Mobile Communications Ltd Touch panel device, control method of touch panel device, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013003664A (en) * 2011-06-13 2013-01-07 Sony Corp Information processing apparatus and method
JP2014157578A (en) * 2013-02-18 2014-08-28 Nec Casio Mobile Communications Ltd Touch panel device, control method of touch panel device, and program

Also Published As

Publication number Publication date
JP6958148B2 (en) 2021-11-02

Similar Documents

Publication Publication Date Title
US20210374563A1 (en) Solution Automation
US8935575B2 (en) Test data generation
Goloboff Calculating SPR distances between trees
CN111400724B (en) Operating system vulnerability detection method, system and medium based on code similarity analysis
US9569207B2 (en) Source code flow analysis using information retrieval
US20190220387A1 (en) Unexplored branch search in hybrid fuzz testing of software binaries
US8302085B2 (en) Method for developing software code and estimating processor execution time
CN111738628A (en) Risk group identification method and device
US10671607B2 (en) Pipeline dependent tree query optimizer and scheduler
CN106469049B (en) File scanning method and device
Alshoaibi et al. Price: Detection of performance regression introducing code changes using static and dynamic metrics
CN108710662B (en) Language conversion method and device, storage medium, data query system and method
CN111124872A (en) Branch detection method and device based on difference code analysis and storage medium
CN110362569A (en) The method of calibration and device of tables of data, electronic equipment, storage medium
CN108897678B (en) Static code detection method, static code detection system and storage device
CN106294530A (en) The method and system of rule match
Schiller et al. Compile-and run-time approaches for the selection of efficient data structures for dynamic graph analysis
JP2019049870A (en) Similar program specifying device, similar program specifying method, and control program
CN106528179B (en) A kind of static recognition methods of java class dependence
CN115293243A (en) Method, device and equipment for realizing intelligent matching of data assets
Behle On threshold BDDs and the optimal variable ordering problem
CN114118770A (en) Index calculation method and device
CN105579966B (en) Data processing equipment and computer-readable distribution medium
CN113342647A (en) Test data generation method and device
Bernard et al. An approximation-based approach for the random exploration of large models

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210706

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210707

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210812

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210920

R150 Certificate of patent or registration of utility model

Ref document number: 6958148

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150