JP2013218381A - Software evaluation support device and program - Google Patents

Software evaluation support device and program Download PDF

Info

Publication number
JP2013218381A
JP2013218381A JP2012085840A JP2012085840A JP2013218381A JP 2013218381 A JP2013218381 A JP 2013218381A JP 2012085840 A JP2012085840 A JP 2012085840A JP 2012085840 A JP2012085840 A JP 2012085840A JP 2013218381 A JP2013218381 A JP 2013218381A
Authority
JP
Japan
Prior art keywords
dependency
pattern
component
software
source code
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
JP2012085840A
Other languages
Japanese (ja)
Other versions
JP5826099B2 (en
Inventor
Kentaro Kanai
健太郎 金井
Yuki Hiwada
祐希 檜皮
Shigeru Ogawara
繁 大河原
Katsuhiko Nakamura
勝彦 中村
Yoshikazu Sato
美和 佐藤
Hayato Kanai
勇人 金井
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2012085840A priority Critical patent/JP5826099B2/en
Publication of JP2013218381A publication Critical patent/JP2013218381A/en
Application granted granted Critical
Publication of JP5826099B2 publication Critical patent/JP5826099B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform the automatic detection of an anti-pattern without spending time and effort.SOLUTION: A pattern information storage part 13 is configured to store a first pattern information list 131 in which the classifications of components to be evaluated are associated with the extraction conditions and a second pattern information list 132 in which the classifications of the components of a dependent source and a dependent destination constituting an anti-pattern are associated with the dependency conditions. A pattern extraction part 142 is configured to, on the basis of a component list 15 in which those lists are associated with information on the designations of the components included in a source code 121, the classifications and the number of the other components included in the components and a dependency list 16 in which the designations of the components of the dependent source and the dependent destination included in the source code 121 are associated with the frequency of dependence of each classification of dependence in the dependency, extract the information of the anti-pattern included in the source code 121.

Description

本発明は、ソフトウェアの品質評価を支援する技術に関する。   The present invention relates to a technology that supports software quality evaluation.

ソフトウェアの品質評価に関するツールとして、例えば、DSM(Dependency Structure Matrix)と呼ばれるアーキテクチャ分析手法を採用したLattix(米国Lattix社)が知られている。この“Lattix”では、ソースコードを解析して、当該ソフトウェアの構成要素(モジュール等)間の依存関係を抽出し、抽出した依存関係を直感的に判り易くするため表形式(マトリクス)で定量的に表して可視化する。これにより、当該ソフトウェアにおける構成要素の依存関係の把握が容易となり、結果として、開発効率及び品質の向上が図れる。   As a tool related to software quality evaluation, for example, Lattix (Lattix, USA) adopting an architecture analysis technique called DSM (Dependency Structure Matrix) is known. In this “Lattix”, the source code is analyzed to extract the dependencies between the components (modules, etc.) of the software, and in order to make the extracted dependencies intuitively understandable, it is quantitative in a table format (matrix). To visualize. As a result, it becomes easy to grasp the dependency relationship between the components in the software, and as a result, the development efficiency and quality can be improved.

ところで、ソフトウェアの品質評価として、いわゆる「アンチパターン」と呼ばれる、デザインパターンとは真逆となるパターン(保守性を悪化させる等、不適切なソフトウェア構造をパターン化したもの)を漏れなく検出することも重要な作業の一つである。   By the way, as a software quality evaluation, a so-called “anti-pattern”, which is a pattern that is the exact opposite of a design pattern (patterns of inappropriate software structure that deteriorates maintainability, etc.) is detected without omission. Is also an important task.

しかしながら、従来のアンチパターン検出作業においては、ソースコードから上記のように抽出した構成要素間の依存関係を人手でたどっていく必要があった。そのため、ソフトウェアの規模が大きい場合には多大な労力を要していた。   However, in the conventional anti-pattern detection work, it is necessary to manually follow the dependency relationship between the components extracted from the source code as described above. Therefore, a large amount of labor is required when the scale of the software is large.

上記の問題に関連して、例えば、特許文献1に記載の発明では、ソフトウェアのソースコードに付与された所定のアノテーションを解析して、ソフトウェアを構成する構成要素と構成要素同士の関連を示す関連要素を抽出する。そして、抽出した構成要素又は関連要素と、予め定義しておいた、ソフトウェアの構造として回避されるべき不適切な構造を表す不良パターン情報とを照合することで、不良パターンに該当する構成要素又は関連要素を検出する。   In relation to the above problem, for example, in the invention described in Patent Document 1, a component that configures software and a relationship between components are analyzed by analyzing a predetermined annotation given to the source code of the software Extract elements. Then, by comparing the extracted component element or related element with the previously defined defect pattern information representing an inappropriate structure that should be avoided as a software structure, Detect related elements.

特開2007−265089号公報JP 2007-265089 A

特許文献1に記載の発明では、ソースコードから上記の構成要素と関連要素とを抽出するために、予め当該ソースコードに所定のアノテーションを付加しておく必要があり、ソフトウェアの規模が大きくなると、その手間も当然のことながら大きくなってしまうという問題が生じる。   In the invention described in Patent Document 1, in order to extract the above constituent elements and related elements from the source code, it is necessary to add a predetermined annotation to the source code in advance, and when the software scale increases, There is a problem that the effort is naturally increased.

本発明は、上記課題を解決するためになされたものであり、アノテーション等が付加されていないソースコードであっても、アンチパターンを自動検出できるソフトウェア評価支援装置及びプログラムを提供することを目的とする。   The present invention has been made to solve the above-described problem, and an object of the present invention is to provide a software evaluation support apparatus and program capable of automatically detecting an anti-pattern even in a source code to which no annotation is added. To do.

上記目的を達成するため、本発明に係るソフトウェア評価支援装置は、
評価対象となるソフトウェア構成要素の種別と、その抽出条件と、が対応付けられて設定された第1パターン情報データと、アンチパターンを構成する依存元及び依存先のそれぞれのソフトウェア構成要素の種別と、その依存関係における条件と、が対応付けられて設定された第2パターン情報データと、を記憶するパターン情報記憶手段と、
評価対象となるソースコードに含まれるソフトウェア構成要素の名称と、その種別と、当該ソフトウェア構成要素に包含される他のソフトウェア構成要素の数についての情報と、が対応付けられて設定された構成要素データと、前記ソースコードに含まれる依存元及び依存先のそれぞれのソフトウェア構成要素の名称と、その依存関係における依存種別毎の依存頻度と、が対応付けられて設定された依存関係データと、を記憶するメモリと、
前記第1パターン情報データと、前記第2パターン情報データと、前記構成要素データと、前記依存関係データと、に基づいて、前記ソースコードに含まれているアンチパターンを構成する依存元及び依存先のそれぞれのソフトウェア構成要素の名称を抽出するパターン抽出手段と、を備えることを特徴とする。
In order to achieve the above object, a software evaluation support apparatus according to the present invention provides:
The first pattern information data set by associating the type of software component to be evaluated and its extraction condition, the type of each software component of the dependence source and the dependence destination constituting the anti-pattern, and Pattern information storage means for storing second pattern information data set in association with the conditions in the dependency relationship;
A component set in association with the name of the software component included in the source code to be evaluated, its type, and information on the number of other software components included in the software component Dependency data set in association with the data, the names of the respective software components of the dependency source and the dependency destination included in the source code, and the dependency frequency for each dependency type in the dependency relationship, Memory to memorize,
Based on the first pattern information data, the second pattern information data, the component element data, and the dependency relationship data, a dependency source and a dependency destination constituting an anti-pattern included in the source code Pattern extracting means for extracting the names of the respective software components.

本発明によれば、アノテーション等が付加されていないソースコードであっても、ソースコード中のアンチパターンを自動検出できるため、ソフトウェアの品質評価作業の効率向上が図れる。   According to the present invention, it is possible to automatically detect an anti-pattern in a source code even if it is a source code without an annotation or the like, so that the efficiency of software quality evaluation work can be improved.

本発明の実施形態に係るソフトウェア評価支援装置の構成を示すブロック図である。It is a block diagram which shows the structure of the software evaluation assistance apparatus which concerns on embodiment of this invention. 本実施形態のソフトウェア評価支援装置が備える制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the control part with which the software evaluation assistance apparatus of this embodiment is provided. 本実施形態において、評価対象となるソースコードの一例を示す図である。In this embodiment, it is a figure which shows an example of the source code used as evaluation object. 本実施形態の構成要素リストの一例を示す図である。It is a figure which shows an example of the component list of this embodiment. 本実施形態の依存関係リストの一例を示す図である。It is a figure which shows an example of the dependency relation list | wrist of this embodiment. 本実施形態の第1パターン情報リストの一例を示す図である。It is a figure which shows an example of the 1st pattern information list of this embodiment. 本実施形態の第1パターン情報リストの「抽出条件」について説明するための図である。It is a figure for demonstrating "extraction conditions" of the 1st pattern information list of this embodiment. 本実施形態の第2パターン情報リストの一例を示す図である。It is a figure which shows an example of the 2nd pattern information list of this embodiment. 本実施形態の第2パターン情報リストの「依存関係条件」について説明するための図である。It is a figure for demonstrating the "dependency condition" of the 2nd pattern information list of this embodiment. 本実施形態のソフトウェア評価支援処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the software evaluation assistance process of this embodiment. 本実施形態のパターン抽出処理の手順を示すフローチャート(その1)である。It is a flowchart (the 1) which shows the procedure of the pattern extraction process of this embodiment. 本実施形態のパターン抽出処理の手順を示すフローチャート(その2)である。It is a flowchart (the 2) which shows the procedure of the pattern extraction process of this embodiment. 本実施形態のパターン抽出処理の手順を示すフローチャート(その3)である。It is a flowchart (the 3) which shows the procedure of the pattern extraction process of this embodiment. 本実施形態のパターン一致リストの一例を示す図である。It is a figure which shows an example of the pattern matching list | wrist of this embodiment.

以下、本発明の実施形態について図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の実施形態に係るソフトウェア評価支援装置1の全体構成を示す図である。このソフトウェア評価支援装置1は、所定のプログラミング言語で作成されたソフトウェアにおいて、その品質の評価を支援する装置である。   FIG. 1 is a diagram showing an overall configuration of a software evaluation support apparatus 1 according to an embodiment of the present invention. The software evaluation support apparatus 1 is an apparatus that supports quality evaluation of software created in a predetermined programming language.

このソフトウェア評価支援装置1のハードウェア構成は、一般的なパーソナルコンピュータと同等である。即ち、ソフトウェア評価支援装置1は、何れも図示しないが、CPU(Central Processing Unit),ROM(Read Only Memory),RAM(Random Access Memory)等から構成される制御装置、読み書き可能な不揮発性の半導体メモリやハードディスクドライブ等から構成される外部記憶装置、キーボード,マウス,キーパッド,タッチパッドやタッチパネル等から構成される入力装置、CRTや液晶モニタ等から構成される表示装置等を備える。   The hardware configuration of the software evaluation support apparatus 1 is the same as that of a general personal computer. That is, although none of the software evaluation support device 1 is illustrated, a control device including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, a readable / writable nonvolatile semiconductor An external storage device composed of a memory, a hard disk drive, etc., an input device composed of a keyboard, a mouse, a keypad, a touch pad, a touch panel, etc., a display device composed of a CRT, a liquid crystal monitor, etc. are provided.

ソフトウェア評価支援装置1は、機能的には、図1に示すように、入力部10と、表示部11と、ソースコード記憶部12と、パターン情報記憶部13と、制御部14と、を備える。   Functionally, the software evaluation support apparatus 1 includes an input unit 10, a display unit 11, a source code storage unit 12, a pattern information storage unit 13, and a control unit 14, as shown in FIG. .

入力部10は、ユーザからの入力操作を受け付け、受け付けた入力操作に係る信号を制御部14に送出する。   The input unit 10 receives an input operation from the user and sends a signal related to the received input operation to the control unit 14.

表示部11は、制御部14の制御の下、ユーザ操作用の画面の表示を行う。   The display unit 11 displays a screen for user operation under the control of the control unit 14.

ソースコード記憶部12は、評価対象となるソフトウェアに対応したソースコードを記憶する。ソースコードは、所定のプログラミング言語に従って記述されたプログラムコードであり、本実施形態では、C++(シープラスプラス)言語の仕様に従って記述されている。   The source code storage unit 12 stores a source code corresponding to software to be evaluated. The source code is a program code described according to a predetermined programming language, and is described according to the specification of the C ++ (Sea Plus Plus) language in the present embodiment.

パターン情報記憶部13は、制御部14によって実行される後述のパターン抽出処理の際に、制御部14によって参照されるパターン情報リストを記憶する。   The pattern information storage unit 13 stores a pattern information list that is referred to by the control unit 14 in the later-described pattern extraction process executed by the control unit 14.

制御部14は、入力部10、表示部11、ソースコード記憶部12及びパターン情報記憶部13を制御し、それに付随して、これらとの間でデータの授受を行う。制御部14は、機能的には、図2に示すように、依存関係抽出部141と、パターン抽出部142と、を備える。これらの各機能部は、CPU等が、ROM又は外部記憶装置に記憶されている、所定のプログラムを実行することで実現する。このプログラム(ソフトウェア評価支援プログラム)は、ソフトウェア評価支援装置1にて、ユーザに対してソフトウェアの評価を支援するための一連の処理を行うためのアプリケーションソフトウェアである。   The control unit 14 controls the input unit 10, the display unit 11, the source code storage unit 12, and the pattern information storage unit 13, and accordingly, exchanges data with them. Functionally, the control unit 14 includes a dependency extraction unit 141 and a pattern extraction unit 142 as shown in FIG. Each of these functional units is realized by a CPU or the like executing a predetermined program stored in a ROM or an external storage device. This program (software evaluation support program) is application software for performing a series of processes for supporting software evaluation for the user in the software evaluation support apparatus 1.

依存関係抽出部141は、従来の手法により、ソースコード記憶部12に記憶されているソースコード121から、ソフトウェアの構成要素(以下、単に「構成要素」と称する。)と、構成要素間の依存関係を抽出し、抽出したそれぞれに基づいて、構成要素リスト15及び依存関係リスト16を生成する。ソースコード121の一例を図3に示す。ここで、従来の手法には、例えば、DSMを取り入れたソフトウェアの品質評価ツールである、米国Lattix社の“Lattix”により実現される技術等が該当する。   The dependency relationship extracting unit 141 uses software components (hereinafter simply referred to as “components”) and dependencies between components from the source code 121 stored in the source code storage unit 12 according to a conventional method. The relationship is extracted, and the component list 15 and the dependency relationship list 16 are generated based on each of the extracted relationships. An example of the source code 121 is shown in FIG. Here, the conventional method corresponds to, for example, a technique realized by “Lattix” of Lattix, Inc., which is a software quality evaluation tool incorporating DSM.

依存関係抽出部141は、生成した構成要素リスト15及び依存関係リスト16をRAM又は外部記憶装置に保存する。   The dependency relationship extraction unit 141 stores the generated component list 15 and dependency relationship list 16 in the RAM or the external storage device.

構成要素リスト15は、ソースコード121に含まれる構成要素についての情報がリストアップされたデータである。より詳細には、構成要素リスト15は、図4に示すように、「要素名」と、「要素種別」と、「包含要素数」と、から構成されるレコードが複数設定されたデータテーブルである。「要素名」には、C++、Java(登録商標)等のプログラミング言語で作成されたソフトウェアを構成する要素であって、当該ソースコード121において記述された名称(例えば、クラス名、変数名、関数名、マクロ名等)が設定される。   The component list 15 is data in which information about components included in the source code 121 is listed. More specifically, as shown in FIG. 4, the component list 15 is a data table in which a plurality of records including “element name”, “element type”, and “number of included elements” are set. is there. The “element name” is an element constituting software created in a programming language such as C ++, Java (registered trademark), and the name described in the source code 121 (for example, class name, variable name, function Name, macro name, etc.) are set.

「要素種別」には、当該構成要素の種別(例えば、クラス、変数、関数、マクロ等)を示す情報が設定される。「包含要素数」には、当該構成要素に包含される他の構成要素の数が、要素種別毎に設定される。図4の例では、先頭(番号1)のレコードにおいて、クラスである“Class1”には、構成要素として関数のみが含まれ、その数が1であることが示されており、番号2のレコードにおいて、クラスである“Class2”には、変数のみが含まれ、その数が2であることが示されており、番号3のレコードにおいて、クラスである“Class3”には、変数のみが含まれ、その数が1であることが示されている。   In the “element type”, information indicating the type (for example, class, variable, function, macro, etc.) of the constituent element is set. In the “number of included elements”, the number of other components included in the component is set for each element type. In the example of FIG. 4, in the first record (number 1), the class “Class1” includes only functions as components, and the number is 1, and the record of number 2 Indicates that the class “Class2” includes only variables and the number thereof is 2. In the record of number 3, the class “Class3” includes only variables. , The number is shown to be one.

依存関係リスト16は、ソースコード121に含まれる構成要素間の依存関係についての情報がリストアップされたデータである。より詳細には、依存関係リスト16は、図5に示すように、「依存元要素名」と、「依存先要素名」と、「依存度数」と、から構成されるレコードが複数設定されたデータテーブルである。ここで、依存関係とは、ある構成要素が他の構成要素を含む場合や他の構成要素を引用するといったように、ある構成要素が他のソフトウェア構成要素に依存する関係をいう。依存関係には、例えば、インクルード、クラス参照、クラス継承、関数の呼出し、関数のオーバーライド、宣言、変数参照、変数書き込み、マクロの使用などがある。   The dependency relationship list 16 is data in which information on dependency relationships between components included in the source code 121 is listed. More specifically, as shown in FIG. 5, the dependency list 16 includes a plurality of records including “dependency source element name”, “dependency destination element name”, and “dependency count”. It is a data table. Here, the dependency relationship refers to a relationship in which a certain component depends on another software component, such as when a certain component includes another component or cites another component. Dependencies include, for example, include, class reference, class inheritance, function call, function override, declaration, variable reference, variable write, and use of a macro.

「依存元要素名」には、依存元(即ち、依存する側)の構成要素のソースコード121上の名称が設定される。「依存先要素名」には、依存先(即ち、依存される側)の構成要素のソースコード121上の名称が設定される。「依存度数」には、当該依存元の構成要素と依存先の構成要素との間の依存関係において、依存の種別(依存種別)毎の依存の頻度(回数)が設定される。   In the “dependence source element name”, the name on the source code 121 of the component of the dependency source (that is, the dependent side) is set. In the “dependence destination element name”, the name on the source code 121 of the component of the dependence destination (that is, the dependent side) is set. In the “dependency count”, the dependency frequency (number of times) for each dependency type (dependency type) is set in the dependency relationship between the dependency source component and the dependency destination component.

図5の例では、先頭(番号1)のレコードにおいて、構成要素“Class1”から構成要素“Class2”への依存関係で、インクルード、クラス参照、クラス継承、関数の呼出し、関数のオーバーライド、宣言、変数書き込み及びマクロの使用のそれぞれの回数が0であり、変数参照の回数が1であることが示されており、同様に、番号2のレコードにおいても、構成要素“Class1”から構成要素“Class3”への依存関係で、インクルード、クラス参照、クラス継承、関数の呼出し、関数のオーバーライド、宣言、変数書き込み及びマクロの使用のそれぞれの回数が0であり、変数参照の回数が1であることが示されている。また、番号3のレコードにおいては、構成要素“Class2”から構成要素“Class3”への依存関係で、インクルード、クラス継承、関数の呼出し、関数のオーバーライド、宣言、変数参照、変数書き込み及びマクロの使用のそれぞれの回数が0であり、クラス参照の回数が1であることが示されている。   In the example of FIG. 5, in the first (number 1) record, the dependency from the component “Class1” to the component “Class2” includes, class reference, class inheritance, function call, function override, declaration, It is indicated that the number of variable writes and the use of the macro is 0, and the number of variable references is 1. Similarly, in the record of number 2, the component “Class1” to the component “Class3” are also shown. The number of include, class reference, class inheritance, function call, function override, declaration, variable write, and macro use is 0 and the variable reference count is 1. It is shown. In the record of number 3, the dependency from the component “Class2” to the component “Class3” includes, includes, class inheritance, function call, function override, declaration, variable reference, variable write, and macro use It is shown that the number of times of each is 0 and the number of class references is 1.

続いて、パターン情報記憶部13に記憶されているパターン情報リストについて説明する。パターン情報リストには、図2に示すように、第1パターン情報リスト131と、第2パターン情報リスト132とが含まれる。第1パターン情報リスト131は、予めユーザにより設定された、ユーザが評価対象として抽出を所望する構成要素についての情報がリストアップされたデータである。より詳細には、第1パターン情報リスト131は、図6に示すように、「仮要素名」と、「実要素名」と、「要素種別」と、「抽出条件」と、から構成されるレコードが複数設定されたデータテーブルである。   Next, the pattern information list stored in the pattern information storage unit 13 will be described. As shown in FIG. 2, the pattern information list includes a first pattern information list 131 and a second pattern information list 132. The first pattern information list 131 is data in which information about components that the user desires to be extracted as an evaluation target is set in advance by the user. More specifically, as shown in FIG. 6, the first pattern information list 131 includes “temporary element names”, “real element names”, “element types”, and “extraction conditions”. This is a data table with multiple records.

「仮要素名」には、抽出を所望する構成要素の仮称が設定される。仮称の決め方は任意であり、本実施形態では、A、B、C、…、といったようにアルファベットが順番に割り振られるものとする。「実要素名」は、当初、即ち、ユーザによる当該第1パターン情報リスト131の作成時点では未設定状態であり、後に、パターン抽出部142により、後述するパターン抽出処理にて、ソースコード121上の名称が格納される。   In the “provisional element name”, a temporary name of a constituent element desired to be extracted is set. The method of determining the provisional name is arbitrary, and in this embodiment, alphabets are assigned in order such as A, B, C,. The “actual element name” is not set at the beginning, that is, at the time of creation of the first pattern information list 131 by the user, and is later added to the source code 121 by the pattern extraction unit 142 in the pattern extraction process described later. Is stored.

「要素種別」には、ユーザが抽出を所望する構成要素の種別(例えば、クラス、変数、関数、マクロ等)を示す情報が設定される。「抽出条件」には、抽出するための条件を示す情報が設定される。例えば、「抽出条件」には、上記条件が記述されたファイル(リスト)名がテキスト形式で設定される。「抽出条件」に設定される条件の一例を図7に示す。図7(a)は、条件1に対応する内容を示し、図7(b)は、条件2に対応する内容を示している。   In “element type”, information indicating the type (for example, class, variable, function, macro, etc.) of the component that the user desires to extract is set. Information indicating conditions for extraction is set in the “extraction conditions”. For example, in the “extraction condition”, a file (list) name in which the above condition is described is set in a text format. An example of conditions set in the “extraction conditions” is shown in FIG. FIG. 7A shows the contents corresponding to condition 1, and FIG. 7B shows the contents corresponding to condition 2.

例えば、図6の先頭(番号1)のレコードでは、要素種別がクラスであり、包含する変数の数が0である構成要素に対して、仮要素名“A”が付されるということが示されている。また、番号2のレコードでは、要素種別がクラスであり、包含する関数の数が0である構成要素に対して、仮要素名“B”が付されるということが示されている。   For example, the first (number 1) record in FIG. 6 indicates that the temporary element name “A” is assigned to the component whose element type is class and whose number of included variables is 0. Has been. Further, the record with the number 2 indicates that the provisional element name “B” is given to the component whose element type is class and the number of functions to be included is 0.

第2パターン情報リスト132は、予めユーザにより設定された、検出すべきアンチパターンについての情報がリストアップされたデータである。より詳細には、第2パターン情報リスト132は、図8に示すように、「仮依存元要素名」と、「実依存元要素名」と、「仮依存先要素名」と、「実依存先要素名」と、「依存関係条件」と、「チェック欄」と、から構成されるレコードが複数設定されたデータテーブルである。   The second pattern information list 132 is data in which information about anti-patterns to be detected, which is set in advance by the user, is listed. More specifically, as shown in FIG. 8, the second pattern information list 132 includes “temporary dependency source element name”, “actual dependency source element name”, “temporary dependency destination element name”, and “actual dependency”. This is a data table in which a plurality of records including “destination element name”, “dependency relationship condition”, and “check field” are set.

「仮依存元要素名」には、アンチパターンを構成する依存元の構成要素の仮称が設定される。ここで、「仮依存元要素名」に設定される仮称と、第1パターン情報リスト131における「仮要素名」に設定される仮称とは、共通化されており、仮称が同一の場合は、同一の構成要素を示すこととなる。   In the “temporary dependency source element name”, a temporary name of the component of the dependency source constituting the anti-pattern is set. Here, the temporary name set in the “temporary dependency source element name” and the temporary name set in the “temporary element name” in the first pattern information list 131 are shared, and when the temporary names are the same, It shows the same component.

「実依存元要素名」は、ユーザによる当該第2パターン情報リスト132の作成時点では未設定状態であり、後に、パターン抽出部142により、後述するパターン抽出処理にて、対応する依存元の構成要素として、ソースコード121上の名称が格納される。「仮依存先要素名」には、アンチパターンを構成する依存先の構成要素の仮称が設定される。ここで、上記の「仮依存元要素名」の場合と同様、「仮依存先要素名」に設定される仮称と、第1パターン情報リスト131における「仮要素名」に設定される仮称とは、共通化されており、仮称が同一の場合は、同一の構成要素を示すこととなる。   The “actual dependence source element name” is not set at the time of creation of the second pattern information list 132 by the user, and the pattern extraction unit 142 later configures the corresponding dependence source in the pattern extraction processing described later. The name on the source code 121 is stored as an element. In the “temporary dependency destination element name”, a temporary name of the dependency destination component constituting the anti-pattern is set. Here, as in the case of the “temporary dependency source element name”, the temporary name set in the “temporary dependency destination element name” and the temporary name set in the “temporary element name” in the first pattern information list 131 are When the common names are the same, the same components are indicated.

「実依存先要素名」は、ユーザによる当該第2パターン情報リスト132の作成時点では未設定状態であり、後に、パターン抽出部142により、後述するパターン抽出処理にて、依存先の構成要素として、ソースコード121上の名称が格納される。   The “actual dependency destination element name” is not set at the time of creation of the second pattern information list 132 by the user, and is later used as a dependency destination component by the pattern extraction unit 142 in pattern extraction processing described later. The name on the source code 121 is stored.

「依存関係条件」には、当該アンチパターンを構成する依存元の構成要素と依存先の構成要素との間の依存関係における条件を示す情報が設定される。例えば、「依存関係条件」には、上記条件が記述されたファイル(リスト)名がテキスト形式で設定される。「依存関係条件」に設定される条件の内容の一例を図9に示す。図9(a)は、条件3に対応する内容を示し、図9(b)は、条件4に対応する内容を示している。   In the “dependency relationship condition”, information indicating a condition in the dependency relationship between the dependency source component and the dependency destination component configuring the anti-pattern is set. For example, in the “dependency condition”, a file (list) name in which the above condition is described is set in a text format. An example of the content of the condition set in the “dependency relationship condition” is shown in FIG. FIG. 9A shows the contents corresponding to the condition 3, and FIG. 9B shows the contents corresponding to the condition 4.

例えば、図8の先頭(番号1)のレコードでは、仮称“A”の依存元の構成要素と、仮称“B”の依存先の構成要素との間において、依存種別が変数参照であり、その依存度数が1以上であるという条件を満たす場合に、仮称“A”の構成要素が仮称“B”の構成要素に依存するソフトウェア構造が、アンチパターンであることが示されている。   For example, in the first record (number 1) in FIG. 8, the dependency type is a variable reference between the component of the dependency source of the temporary name “A” and the component of the dependency destination of the temporary name “B”. When the condition that the dependency degree is 1 or more is satisfied, the software structure in which the component of the temporary name “A” depends on the component of the temporary name “B” is an anti-pattern.

また、番号2のレコードでは、仮称“A”の依存元の構成要素と、仮称“C”の依存先の構成要素との間において、依存種別が変数参照であり、その依存度数が1以上であるという条件を満たす場合に、仮称“A”の構成要素が仮称“C”の構成要素に依存するソフトウェア構造が、アンチパターンであることが示されている。また、番号3のレコードでは、仮称“B”の依存元の構成要素と、仮称“C”の依存先の構成要素との間において、依存種別を問わず、依存度数が1以上である、換言すると、何れかの依存種別において、依存度数が1以上である、という条件を満たす場合に、仮称“B”の構成要素が仮称“C”の構成要素に依存するソフトウェア構造が、アンチパターンであることが示されている。   In the record of number 2, the dependency type is a variable reference between the component of the dependency source of the temporary name “A” and the component of the dependency destination of the temporary name “C”, and the dependency frequency is 1 or more. It is shown that the software structure in which the component of the temporary name “A” depends on the component of the temporary name “C” is an anti-pattern when a certain condition is satisfied. Also, in the record of number 3, the dependency number is 1 or more between the dependency source component of the temporary name “B” and the dependency destination component of the temporary name “C”, regardless of the dependency type. Then, in any dependency type, when the condition that the dependency frequency is 1 or more is satisfied, the software structure in which the component of the temporary name “B” depends on the component of the temporary name “C” is an anti-pattern. It has been shown.

「チェック欄」は、ユーザによる当該第2パターン情報リスト132の作成時点では、チェック無し(0が設定)状態となっており、後に、パターン抽出部142により、後述するパターン抽出処理にて、必要に応じて、チェックが入れられる(1が設定される。)。   The “check field” is not checked (set to 0) at the time of creation of the second pattern information list 132 by the user, and is necessary for pattern extraction processing described later by the pattern extraction unit 142 later. Is checked (1 is set).

パターン抽出部142は、依存関係抽出部141により生成された構成要素リスト15及び依存関係リスト16と、パターン情報記憶部13に予め記憶されている第1パターン情報リスト131及び第2パターン情報リスト132と、に基づいて、パターン一致リスト17を生成し、出力する。パターン一致リスト17は、第2パターン情報リスト132にリストアップされている、ユーザが予め設定したアンチパターンの中から、当該ソフトウェア(ソースコード121)に実際に含まれているアンチパターンをリストアップした結果を示すデータである。パターン一致リスト17の詳細については後述する。   The pattern extraction unit 142 includes the component list 15 and the dependency relationship list 16 generated by the dependency relationship extraction unit 141, and the first pattern information list 131 and the second pattern information list 132 stored in advance in the pattern information storage unit 13. And a pattern matching list 17 is generated and output. The pattern matching list 17 lists the anti-patterns actually included in the software (source code 121) from the anti-patterns preset by the user listed in the second pattern information list 132. It is data which shows a result. Details of the pattern matching list 17 will be described later.

続いて、上記のように構成されるソフトウェア評価支援装置1において実行されるソフトウェア評価支援処理について説明する。このソフトウェア評価支援処理は、ユーザにより、入力部10を介して、ROM又は外部記憶装置に記憶されている、上述のソフトウェア評価支援プログラムを起動させるための所定操作が行われることで開始される。   Next, a software evaluation support process executed in the software evaluation support apparatus 1 configured as described above will be described. This software evaluation support process is started when a predetermined operation for starting the above-described software evaluation support program stored in the ROM or the external storage device is performed by the user via the input unit 10.

図10は、ソフトウェア評価支援処理の手順を示すフローチャートである。先ず、依存関係抽出部141は、ソースコード記憶部12からソースコード121を読み出し(ステップS101)、読み出したソースコード121から、従来の手法により、ソフトウェアの構成要素と、構成要素間の依存関係を抽出し、抽出したそれぞれに基づいて、構成要素リスト15及び依存関係リスト16を生成する(ステップS102)。生成された構成要素リスト15及び依存関係リスト16はRAM等に保存される。   FIG. 10 is a flowchart illustrating a procedure of software evaluation support processing. First, the dependency relationship extraction unit 141 reads the source code 121 from the source code storage unit 12 (step S101), and from the read source code 121, the software component and the dependency relationship between the components are determined by a conventional method. Extraction is performed, and the component list 15 and the dependency relationship list 16 are generated based on each extracted (step S102). The generated component list 15 and dependency list 16 are stored in a RAM or the like.

パターン抽出部142は、依存関係抽出部141により生成された構成要素リスト15及び依存関係リスト16と、パターン情報記憶部13に予め記憶されている第1パターン情報リスト131及び第2パターン情報リスト132と、に基づいて、パターン抽出処理を実行する(ステップS103)。   The pattern extraction unit 142 includes the component list 15 and the dependency relationship list 16 generated by the dependency relationship extraction unit 141, and the first pattern information list 131 and the second pattern information list 132 stored in advance in the pattern information storage unit 13. Based on the above, a pattern extraction process is executed (step S103).

以下、図11〜図13のフローチャートを参照して、パターン抽出処理の詳細を説明する。先ず、パターン抽出部142は、カウンタiに0を設定し、変数Niに第1パターン情報リスト131のレコード数を設定する(図11のステップS201)。そして、パターン抽出部142は、カウンタiをインクリメントした後、カウンタiの値が変数Niの値以下であるか否かを判定する(ステップS202)。その結果、カウンタiの値が変数Niの値を超えている場合(ステップS202;NO)、パターン抽出部142は、図13のステップS223の処理を実行する。   Details of the pattern extraction process will be described below with reference to the flowcharts of FIGS. First, the pattern extraction unit 142 sets 0 to the counter i, and sets the number of records in the first pattern information list 131 to the variable Ni (step S201 in FIG. 11). Then, after incrementing the counter i, the pattern extraction unit 142 determines whether or not the value of the counter i is equal to or less than the value of the variable Ni (step S202). As a result, when the value of the counter i exceeds the value of the variable Ni (step S202; NO), the pattern extraction unit 142 executes the process of step S223 in FIG.

一方、カウンタiの値が変数Niの値以下である場合(ステップS202;YES)、パターン抽出部142は、パターン情報記憶部13に記憶されている第1パターン情報リスト131を読み出し、その先頭からカウンタiの値番目のレコードを選択する(ステップS203)。また、パターン抽出部142は、カウンタjに0を設定し、変数Njに構成要素リスト15のレコード数を設定する(ステップS204)。   On the other hand, when the value of the counter i is equal to or smaller than the value of the variable Ni (step S202; YES), the pattern extraction unit 142 reads the first pattern information list 131 stored in the pattern information storage unit 13, and starts from the top. The value-th record of counter i is selected (step S203). The pattern extraction unit 142 sets 0 to the counter j, and sets the number of records in the component list 15 to the variable Nj (step S204).

そして、パターン抽出部142は、カウンタjをインクリメントした後、カウンタjの値が変数Njの値以下であるか否かを判定する(ステップS205)。その結果、カウンタjの値が変数Njの値を超えている場合(ステップS205;NO)、パターン抽出部142は、ステップS202の処理を再度実行する。   Then, after incrementing the counter j, the pattern extraction unit 142 determines whether or not the value of the counter j is equal to or smaller than the value of the variable Nj (step S205). As a result, when the value of the counter j exceeds the value of the variable Nj (step S205; NO), the pattern extraction unit 142 executes the process of step S202 again.

一方、カウンタjの値が変数Njの値以下である場合(ステップS205;YES)、パターン抽出部142は、構成要素リスト15の先頭からカウンタjの値番目のレコードを選択する(ステップS206)。パターン抽出部142は、第1パターン情報リスト131の選択したレコードにおける要素種別と、構成要素リスト15の選択したレコードにおける要素種別とが一致し、且つ、第1パターン情報リスト131の選択したレコードにおける抽出条件が成立しているか否かを判定する(ステップS207)。   On the other hand, when the value of the counter j is less than or equal to the value of the variable Nj (step S205; YES), the pattern extraction unit 142 selects the value-th record of the counter j from the top of the component list 15 (step S206). The pattern extraction unit 142 matches the element type in the record selected in the first pattern information list 131 with the element type in the record selected in the component element list 15 and the record selected in the first pattern information list 131 It is determined whether or not the extraction condition is satisfied (step S207).

その結果、ステップS207の判定がNOの場合、パターン抽出部142は、ステップS205の処理を再度実行する。一方、ステップS207の判定がYESの場合、パターン抽出部142は、構成要素リスト15の選択したレコードにおける要素名を、第1パターン情報リスト131の選択したレコードにおける実要素名に格納する(ステップS208)。   As a result, when the determination in step S207 is NO, the pattern extraction unit 142 executes the process of step S205 again. On the other hand, if the determination in step S207 is YES, the pattern extraction unit 142 stores the element name in the record selected in the component list 15 in the actual element name in the record selected in the first pattern information list 131 (step S208). ).

次に、パターン抽出部142は、パターン情報記憶部13から第2パターン情報リスト132を読み出し、読み出した第2パターン情報リスト132において、第1パターン情報リスト131の選択したレコードにおける仮要素名と一致する仮依存元要素名を有するレコードがあるか否かを判定する(ステップS209)。その結果、ステップS209の判定がNOの場合、パターン抽出部142は、図12のステップS211の処理を実行する。   Next, the pattern extraction unit 142 reads the second pattern information list 132 from the pattern information storage unit 13, and matches the temporary element name in the selected record of the first pattern information list 131 in the read second pattern information list 132. It is determined whether or not there is a record having a temporary dependency source element name (step S209). As a result, when the determination in step S209 is NO, the pattern extraction unit 142 executes the process of step S211 in FIG.

一方、ステップS209の判定がYESの場合、パターン抽出部142は、第2パターン情報リスト132の該当する全てのレコードについて、実依存元要素名に、構成要素リスト15の選択したレコードにおける要素名を格納する(ステップS210)。   On the other hand, if the determination in step S209 is YES, the pattern extraction unit 142 sets the element name in the record selected in the component element list 15 as the actual dependency source element name for all the corresponding records in the second pattern information list 132. Store (step S210).

図12のステップS211では、パターン抽出部142は、第2パターン情報リスト132において、第1パターン情報リスト131の選択したレコードにおける仮要素名と一致する仮依存先要素名を有するレコードがあるか否かを判定する。その結果、ステップS211の判定がNOの場合、パターン抽出部142は、ステップS213の処理を実行する。   In step S211 of FIG. 12, the pattern extraction unit 142 determines whether there is a record having a temporary dependency destination element name that matches the temporary element name in the record selected in the first pattern information list 131 in the second pattern information list 132. Determine whether. As a result, when the determination in step S211 is NO, the pattern extraction unit 142 executes the process of step S213.

一方、ステップS211の判定がYESの場合、パターン抽出部142は、第2パターン情報リスト132の該当する全てのレコードについて、実依存先要素名に、構成要素リスト15の選択したレコードにおける要素名を格納する(ステップS212)。   On the other hand, if the determination in step S211 is YES, the pattern extraction unit 142 sets the element name in the record selected in the component element list 15 as the actual dependency destination element name for all corresponding records in the second pattern information list 132. Store (step S212).

続くステップS213では、パターン抽出部142は、カウンタkに0を設定し、変数Nkに依存関係リスト16のレコード数を設定する。そして、パターン抽出部142は、カウンタkをインクリメントした後、カウンタkの値が変数Nkの値以下であるか否かを判定する(ステップS214)。その結果、カウンタkの値が変数Nkの値を超えている場合(ステップS214;NO)、パターン抽出部142は、図11のステップS205の処理を再度実行する。   In subsequent step S213, the pattern extraction unit 142 sets the counter k to 0, and sets the number of records in the dependency relationship list 16 to the variable Nk. Then, after incrementing the counter k, the pattern extraction unit 142 determines whether or not the value of the counter k is equal to or less than the value of the variable Nk (step S214). As a result, when the value of the counter k exceeds the value of the variable Nk (step S214; NO), the pattern extraction unit 142 executes the process of step S205 in FIG. 11 again.

一方、カウンタkの値が変数Nkの値以下である場合(ステップS214;YES)、パターン抽出部142は、依存関係リスト16の先頭からカウンタkの値番目のレコードを選択する(ステップS215)。パターン抽出部142は、依存関係リスト16において、構成要素リスト15の選択したレコードにおける要素名と一致する依存元要素名又は依存先要素名を有するレコードがあるか否かを判定する(ステップS216)。その結果、ステップS216の判定がNOの場合、パターン抽出部142は、ステップS214の処理を再度実行する。   On the other hand, when the value of the counter k is equal to or smaller than the value of the variable Nk (step S214; YES), the pattern extraction unit 142 selects the value-th record of the counter k from the top of the dependency relationship list 16 (step S215). The pattern extraction unit 142 determines whether there is a record having a dependency source element name or a dependency destination element name that matches the element name in the record selected in the component list 15 in the dependency relationship list 16 (step S216). . As a result, when the determination in step S216 is NO, the pattern extraction unit 142 executes the process of step S214 again.

一方、ステップS216の判定がYESの場合、パターン抽出部142は、カウンタlに0を設定し、変数Nlに第2パターン情報リスト132のレコード数を設定する(ステップS217)。そして、パターン抽出部142は、カウンタlをインクリメントした後、カウンタlの値が変数Nlの値以下であるか否かを判定する(ステップS218)。その結果、カウンタlの値が変数Nlの値を超えている場合(ステップS218;NO)、パターン抽出部142は、ステップS214の処理を再度実行する。   On the other hand, if the determination in step S216 is YES, the pattern extraction unit 142 sets 0 to the counter l and sets the number of records in the second pattern information list 132 to the variable Nl (step S217). Then, after incrementing the counter l, the pattern extraction unit 142 determines whether or not the value of the counter l is equal to or less than the value of the variable Nl (step S218). As a result, when the value of the counter l exceeds the value of the variable Nl (step S218; NO), the pattern extraction unit 142 executes the process of step S214 again.

一方、カウンタlの値が変数Nlの値以下である場合(ステップS218;YES)、パターン抽出部142は、第2パターン情報リスト132の先頭からカウンタlの値番目のレコードを選択する(ステップS219)。   On the other hand, if the value of the counter l is equal to or less than the value of the variable Nl (step S218; YES), the pattern extraction unit 142 selects the value-th record of the counter l from the top of the second pattern information list 132 (step S219). ).

続く図13のステップS220では、パターン抽出部142は、第2パターン情報リスト132の選択したレコードにおける実依存元要素名及び実依存先要素名と、依存関係リスト16の選択したレコードにおける依存元要素名及び依存先要素名とがそれぞれ一致し、且つ、第2パターン情報リスト132の選択したレコードにおける依存関係条件が、依存関係リスト16の選択したレコードにおける依存度数の内容に適合しているか否かを判定する。その結果、ステップS220の判定がNOの場合、パターン抽出部142は、図12のステップS218の処理を再度実行する。   In subsequent step S220 of FIG. 13, the pattern extraction unit 142 determines the actual dependency source element name and the actual dependency destination element name in the record selected in the second pattern information list 132, and the dependency source element in the record selected in the dependency relationship list 16. Whether or not the name and the dependency destination element name match, and the dependency condition in the record selected in the second pattern information list 132 matches the content of the dependency frequency in the record selected in the dependency list 16 Determine. As a result, when the determination in step S220 is NO, the pattern extraction unit 142 executes the process of step S218 in FIG. 12 again.

一方、ステップS220の判定がYESの場合、パターン抽出部142は、第2パターン情報リスト132の選択したレコードにおけるチェック欄に1を格納する(ステップS221)。パターン抽出部142は、第2パターン情報リスト132の全レコードのチェック欄に1が格納されているか否かを判定する(ステップS222)。全レコードのチェック欄に1が格納されている場合(ステップS222;YES)、パターン抽出部142は、ステップS223の処理を実行する。一方、何れかのレコードのチェック欄に1が格納されていない場合(ステップS222;NO)、パターン抽出部142は、図12のステップS218の処理を再度実行する。   On the other hand, when the determination in step S220 is YES, the pattern extraction unit 142 stores 1 in the check column of the selected record in the second pattern information list 132 (step S221). The pattern extraction unit 142 determines whether 1 is stored in the check column of all records in the second pattern information list 132 (step S222). When 1 is stored in the check column of all records (step S222; YES), the pattern extraction unit 142 executes the process of step S223. On the other hand, when 1 is not stored in the check column of any record (step S222; NO), the pattern extraction unit 142 executes the process of step S218 in FIG. 12 again.

ステップS223では、パターン抽出部142は、第2パターン情報リスト132から、パターン一致リスト17を生成する(ステップS223)。具体的には、パターン抽出部142は、第2パターン情報リスト132から、チェック欄に1が設定されているレコードを全て抽出する。そして、パターン抽出部142は、抽出した各レコードから、「仮依存元要素名」、「仮依存先要素名」及び「チェック欄」の各項目を削除する。これにより、図14に示すようなパターン一致リスト17が生成される。生成されたパターン一致リスト17は、ROM又は外部記憶装置に保存され、ユーザによる入力部10を介した所定操作により、その内容が表示部11にて所定態様で表示される。   In step S223, the pattern extraction unit 142 generates the pattern matching list 17 from the second pattern information list 132 (step S223). Specifically, the pattern extraction unit 142 extracts all records in which 1 is set in the check column from the second pattern information list 132. Then, the pattern extraction unit 142 deletes each item of “temporary dependency source element name”, “temporary dependency destination element name”, and “check column” from each extracted record. Thereby, a pattern matching list 17 as shown in FIG. 14 is generated. The generated pattern matching list 17 is stored in a ROM or an external storage device, and the content is displayed on the display unit 11 in a predetermined manner by a predetermined operation via the input unit 10 by the user.

なお、第2パターン情報リスト132の何れのレコードにおいてもチェック欄に1が設定されていない場合、パターン抽出部142は、アンチパターンが検出されなかった旨を所定態様でユーザに報知する。この場合、例えば、パターン抽出部142は、“アンチパターンは検出されませんでした”等のメッセージを表示部11に表示させる。   If 1 is not set in the check column in any record of the second pattern information list 132, the pattern extraction unit 142 notifies the user that an anti-pattern has not been detected in a predetermined manner. In this case, for example, the pattern extraction unit 142 causes the display unit 11 to display a message such as “An anti-pattern was not detected”.

以上説明したように、本発明の本実施形態に係るソフトウェア評価支援装置1によれば、依存関係抽出部141は、ソースコード記憶部12に記憶されているソースコード121から、ソフトウェアの構成要素と、構成要素間の依存関係を抽出し、抽出したそれぞれに基づいて、構成要素リスト15及び依存関係リスト16を生成する。そして、パターン抽出部142は、構成要素リスト15及び依存関係リスト16と、ユーザが評価対象として抽出を所望する構成要素についての情報がリストアップされた第1パターン情報リスト131と、検出すべきアンチパターンについての情報がリストアップされた第2パターン情報リスト132と、に基づいて、ソースコード121に実際に含まれているアンチパターンを検出し、その結果として、パターン一致リスト17を生成する。このように、アノテーション等が付加されていないソースコードであっても、ソースコード121に内在するアンチパターンを自動検出できるため、ソフトウェアの品質評価作業の効率向上が図れる。   As described above, according to the software evaluation support apparatus 1 according to the present embodiment of the present invention, the dependency relationship extraction unit 141 is configured to extract software components from the source code 121 stored in the source code storage unit 12. Then, the dependency relationship between the component elements is extracted, and the component element list 15 and the dependency relationship list 16 are generated based on each extracted component. Then, the pattern extraction unit 142 includes the component list 15 and the dependency relationship list 16, the first pattern information list 131 in which information on the component that the user desires to extract as an evaluation target, and the anti-pattern to be detected. Based on the second pattern information list 132 in which information about patterns is listed, an anti-pattern actually included in the source code 121 is detected, and as a result, the pattern matching list 17 is generated. As described above, even if the source code does not have annotations added, since the anti-patterns included in the source code 121 can be automatically detected, the efficiency of software quality evaluation can be improved.

なお、本発明は、上記実施形態に限定されず、本発明の要旨を逸脱しない範囲での種々の変更は勿論可能である。   In addition, this invention is not limited to the said embodiment, Of course, the various change in the range which does not deviate from the summary of this invention is possible.

例えば、上記実施形態では、ソフトウェア評価支援装置1の制御部14は、依存関係抽出部141を備え、ソースコード記憶部12に記憶されているソースコード121から、構成要素リスト15及び依存関係リスト16を生成していたが、かかる構成に限定されることはない。本発明には、依存関係抽出部141を備えない構成のソフトウェア評価支援装置も含まれる。その場合のソフトウェア評価支援装置は、他の装置で生成された構成要素リスト15及び依存関係リスト16を用いてパターン一致リスト17を生成する。   For example, in the above embodiment, the control unit 14 of the software evaluation support apparatus 1 includes the dependency relationship extraction unit 141, and from the source code 121 stored in the source code storage unit 12, the component list 15 and the dependency relationship list 16. However, the present invention is not limited to such a configuration. The present invention also includes a software evaluation support apparatus that does not include the dependency relationship extraction unit 141. In this case, the software evaluation support apparatus generates the pattern matching list 17 using the component list 15 and the dependency relation list 16 generated by another apparatus.

また、上記実施形態のソフトウェア評価支援装置1が実行したプログラムを、既存のパーソナルコンピュータ(PC)等に適用することで、当該PCを本発明に係るソフトウェア評価支援装置として機能させることも可能である。   Further, by applying the program executed by the software evaluation support apparatus 1 of the above embodiment to an existing personal computer (PC) or the like, it is possible to cause the PC to function as the software evaluation support apparatus according to the present invention. .

このようなプログラムの配布方法は任意であり、例えば、CD−ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、MO(Magneto Optical Disk)、メモリカードなどのコンピュータ読み取り可能な記録媒体に格納して配布してもよいし、インターネットなどの通信ネットワークを介して配布してもよい。   Such a program distribution method is arbitrary, for example, a computer-readable recording medium such as a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), an MO (Magneto Optical Disk), or a memory card. It may be stored and distributed in a network, or distributed via a communication network such as the Internet.

本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。つまり、本発明の範囲は、実施の形態ではなく、特許請求の範囲によって示される。そして、特許請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、本発明の範囲内とみなされる。   Various embodiments and modifications can be made to the present invention without departing from the broad spirit and scope of the present invention. The above-described embodiments are for explaining the present invention and do not limit the scope of the present invention. In other words, the scope of the present invention is shown not by the embodiments but by the claims. Various modifications within the scope of the claims and within the scope of the equivalent invention are considered to be within the scope of the present invention.

1 ソフトウェア評価支援装置
10 入力部
11 表示部
12 ソースコード記憶部
13 パターン情報記憶部
14 制御部
15 構成要素リスト
16 依存関係リスト
17 パターン一致リスト
121 ソースコード
131 第1パターン情報リスト
132 第2パターン情報リスト
141 依存関係抽出部
142 パターン抽出部
DESCRIPTION OF SYMBOLS 1 Software evaluation assistance apparatus 10 Input part 11 Display part 12 Source code memory | storage part 13 Pattern information memory | storage part 14 Control part 15 Component list 16 Dependency list 17 Pattern matching list 121 Source code 131 1st pattern information list 132 2nd pattern information List 141 Dependency extraction unit 142 Pattern extraction unit

Claims (3)

評価対象となるソフトウェア構成要素の種別と、その抽出条件と、が対応付けられて設定された第1パターン情報データと、アンチパターンを構成する依存元及び依存先のそれぞれのソフトウェア構成要素の種別と、その依存関係における条件と、が対応付けられて設定された第2パターン情報データと、を記憶するパターン情報記憶手段と、
評価対象となるソースコードに含まれるソフトウェア構成要素の名称と、その種別と、当該ソフトウェア構成要素に包含される他のソフトウェア構成要素の数についての情報と、が対応付けられて設定された構成要素データと、前記ソースコードに含まれる依存元及び依存先のそれぞれのソフトウェア構成要素の名称と、その依存関係における依存種別毎の依存頻度と、が対応付けられて設定された依存関係データと、を記憶するメモリと、
前記第1パターン情報データと、前記第2パターン情報データと、前記構成要素データと、前記依存関係データと、に基づいて、前記ソースコードに含まれているアンチパターンを構成する依存元及び依存先のそれぞれのソフトウェア構成要素の名称を抽出するパターン抽出手段と、を備える、
ことを特徴とするソフトウェア評価支援装置。
The first pattern information data set by associating the type of software component to be evaluated and its extraction condition, the type of each software component of the dependence source and the dependence destination constituting the anti-pattern, and Pattern information storage means for storing second pattern information data set in association with the conditions in the dependency relationship;
A component set in association with the name of the software component included in the source code to be evaluated, its type, and information on the number of other software components included in the software component Dependency data set in association with the data, the names of the respective software components of the dependency source and the dependency destination included in the source code, and the dependency frequency for each dependency type in the dependency relationship, Memory to memorize,
Based on the first pattern information data, the second pattern information data, the component element data, and the dependency relationship data, a dependency source and a dependency destination constituting an anti-pattern included in the source code Pattern extraction means for extracting the name of each software component of
A software evaluation support apparatus characterized by that.
評価対象となるソフトウェアに対応したソースコードを記憶するソースコード記憶部と、
前記ソースコードから、前記構成要素データと、前記依存関係データと、を生成し、前記メモリに保存する依存関係抽出手段と、をさらに備える、
ことを特徴とする請求項1に記載のソフトウェア評価支援装置。
A source code storage unit for storing a source code corresponding to the software to be evaluated;
Dependency extraction means for generating the component element data and the dependency relationship data from the source code and storing the data in the memory.
The software evaluation support apparatus according to claim 1.
コンピュータを、
パターン情報記憶手段にそれぞれ記憶されている、評価対象となるソフトウェア構成要素の種別と、その抽出条件と、が対応付けられて設定された第1パターン情報データ及びアンチパターンを構成する依存元及び依存先のそれぞれのソフトウェア構成要素の種別と、その依存関係における条件と、が対応付けられて設定された第2パターン情報データと、所定のメモリにそれぞれ記憶されている、評価対象となるソースコードに含まれるソフトウェア構成要素の名称と、その種別と、当該ソフトウェア構成要素に包含される他のソフトウェア構成要素の数についての情報と、が対応付けられて設定された構成要素データ及び前記ソースコードに含まれる依存元及び依存先のそれぞれのソフトウェア構成要素の名称と、その依存関係における依存種別毎の依存頻度と、が対応付けられて設定された依存関係データと、に基づいて、前記ソースコードに含まれているアンチパターンを構成する依存元及び依存先のそれぞれのソフトウェア構成要素の名称を抽出するパターン抽出手段として機能させる、
ことを特徴とするプログラム。
Computer
Dependency source and dependency constituting the first pattern information data and the anti-pattern set in association with the type of the software component to be evaluated and the extraction condition stored in the pattern information storage means, respectively. In the source code to be evaluated, the second pattern information data set in association with the type of each of the previous software components and the conditions in the dependency relationship, and the predetermined memory are respectively stored. Included in the component data and the source code set in association with the name of the included software component, its type, and information about the number of other software components included in the software component The name of each dependent software component and its dependency Based on the dependency relationship data set in association with the dependency frequency for each existence type, each of the software components of the dependency source and the dependency destination constituting the anti-pattern included in the source code Function as a pattern extraction means for extracting names,
A program characterized by that.
JP2012085840A 2012-04-04 2012-04-04 Software evaluation support apparatus and program Active JP5826099B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012085840A JP5826099B2 (en) 2012-04-04 2012-04-04 Software evaluation support apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012085840A JP5826099B2 (en) 2012-04-04 2012-04-04 Software evaluation support apparatus and program

Publications (2)

Publication Number Publication Date
JP2013218381A true JP2013218381A (en) 2013-10-24
JP5826099B2 JP5826099B2 (en) 2015-12-02

Family

ID=49590438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012085840A Active JP5826099B2 (en) 2012-04-04 2012-04-04 Software evaluation support apparatus and program

Country Status (1)

Country Link
JP (1) JP5826099B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018147190A (en) * 2017-03-03 2018-09-20 三菱電機株式会社 Evaluation support device, evaluation support method, and evaluation support program
JP2019079312A (en) * 2017-10-25 2019-05-23 クラリオン株式会社 Source code analysis device, source code analysis method, and source code analysis program
JP2019114154A (en) * 2017-12-26 2019-07-11 三菱電機株式会社 Element similarity determination device, element similarity determination method, and element similarity determination program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007265089A (en) * 2006-03-29 2007-10-11 Fujitsu Ltd Software maintenance support program, processing method, and device
US20100042974A1 (en) * 2008-08-12 2010-02-18 International Business Machines Corporation Build optimization with applied static analysis

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007265089A (en) * 2006-03-29 2007-10-11 Fujitsu Ltd Software maintenance support program, processing method, and device
US20100042974A1 (en) * 2008-08-12 2010-02-18 International Business Machines Corporation Build optimization with applied static analysis

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018147190A (en) * 2017-03-03 2018-09-20 三菱電機株式会社 Evaluation support device, evaluation support method, and evaluation support program
JP2019079312A (en) * 2017-10-25 2019-05-23 クラリオン株式会社 Source code analysis device, source code analysis method, and source code analysis program
JP6996936B2 (en) 2017-10-25 2022-01-17 株式会社日立製作所 Source code analyzer, source code analysis method, source code analysis program
JP2019114154A (en) * 2017-12-26 2019-07-11 三菱電機株式会社 Element similarity determination device, element similarity determination method, and element similarity determination program

Also Published As

Publication number Publication date
JP5826099B2 (en) 2015-12-02

Similar Documents

Publication Publication Date Title
Booth et al. Formulating questions to explore complex interventions within qualitative evidence synthesis
Steggles et al. Qualitatively modelling and analysing genetic regulatory networks: a Petri net approach
US9396098B2 (en) Apparatuses, methods, and computer program products for conducting automated tests
Zhou et al. Quality assessment of systematic reviews in software engineering: A tertiary study
JP6542612B2 (en) Test scenario generation support apparatus and test scenario generation support method
Hernandez-Ferrer et al. Comprehensive study of the exposome and omic data using rexposome Bioconductor Packages
Smoly et al. MotifNet: a web-server for network motif analysis
JP2018147280A (en) Data analysis device and data analysis method
Beneš et al. AEON. py: Python library for attractor analysis in asynchronous Boolean networks
CN114610286A (en) Development document generation method and device, computer equipment and storage medium
JP5826099B2 (en) Software evaluation support apparatus and program
Yasnoff et al. Decision support and expert systems in public health
US20130326466A1 (en) Human Readable Software Program Test Step
JP2019219848A (en) Source code analysis method and source code analysis device
Martín et al. Patterns as objects to manage knowledge in software development organizations
US20170308379A1 (en) Evaluating documentation coverage
Sass et al. RAMONA: a Web application for gene set analysis on multilevel omics data
JP2018181020A (en) Calculation device and influence output system
US20150170067A1 (en) Determining analysis recommendations based on data analysis context
JP2019125042A (en) Test execution order generation device, test execution order generation method and storage medium
JP7246301B2 (en) Program development support system and program development support method
Kouzari et al. Process mining for process conformance checking in an oss project: An empirical research
JP6676792B2 (en) Reviewer management system and method
JP6797038B2 (en) Software material selection support device and software material selection support program
Arcega et al. On the influence of models at run-time traces in dynamic feature location

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140924

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150821

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151013

R150 Certificate of patent or registration of utility model

Ref document number: 5826099

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250