JP2008123343A - Software differential measurement device, software differential measurement program, and recording medium recording it - Google Patents
Software differential measurement device, software differential measurement program, and recording medium recording it Download PDFInfo
- Publication number
- JP2008123343A JP2008123343A JP2006307872A JP2006307872A JP2008123343A JP 2008123343 A JP2008123343 A JP 2008123343A JP 2006307872 A JP2006307872 A JP 2006307872A JP 2006307872 A JP2006307872 A JP 2006307872A JP 2008123343 A JP2008123343 A JP 2008123343A
- Authority
- JP
- Japan
- Prior art keywords
- code
- software
- effective
- configuration
- unique
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
この発明はソフトウェア差分測定装置、ソフトウェア差分測定プログラム、およびソフトウェア差分測定プログラムを記録した記録媒体に関し、特に、ソフトウェアの開発規模を測定するソフトウェア差分測定装置、ソフトウェア差分測定プログラム、およびソフトウェア差分測定プログラムを記録した記録媒体に関する。 The present invention relates to a software difference measuring device, a software difference measuring program, and a recording medium on which the software difference measuring program is recorded, and in particular, a software difference measuring device, a software difference measuring program, and a software difference measuring program for measuring the development scale of software. The present invention relates to a recorded recording medium.
ソフトウェア開発において、ソフトウェアの生産性を算出する方法として、新規開発したプログラムソースードの規模を開発に要した時間で割る方法が一般的に用いられる。また、開発規模の指標としてプログラムソースコード行数を用いる場合も数多い。 In software development, a method of dividing the scale of a newly developed program source by the time required for development is generally used as a method of calculating software productivity. In many cases, the number of program source code lines is used as an indicator of development scale.
ところが、近年のソフトウェア開発においては、その規模の増大により、そのすべてのプログラムソースコードを新規作成することは困難な状況となっている。そのため、既存のプログラムソースコードを基に追加・変更を行なうという開発方法を選択することが多くなっている。したがって、あるソフトウェアの開発規模の指標としてそのプログラムソースコード全体の行数を用いると、正しく開発規模が示されない場合が多い。 However, in recent software development, due to the increase in scale, it is difficult to newly create all the program source codes. For this reason, a development method of adding / changing based on existing program source code is often selected. Therefore, if the number of lines of the entire program source code is used as an indicator of the development scale of a certain software, the development scale is often not correctly indicated.
このような開発方法を用いた場合、新規作成したプログラムソースコードの行数を測定するためには、基になった既存のプログラムソースコードと、追加・変更後のプログラムソースコードとの差分を取得し、その差分の行数を集計する方法が用いられている。 Using such a development method, in order to measure the number of lines in the newly created program source code, obtain the difference between the existing program source code that was the basis and the program source code after addition / change. However, a method of counting the number of lines of the difference is used.
たとえば、2つのプログラムソースコードの差分を取得する方法として、特開平5−158765号公報(以下、特許文献1)には、C言語プログラム差分情報取得方式が提案されている。 For example, as a method for acquiring a difference between two program source codes, Japanese Patent Laid-Open No. 5-158765 (hereinafter, Patent Document 1) proposes a C language program difference information acquisition method.
このC言語プログラム差分情報取得方式は、註釈、インデントなど、プログラムの処理内容に直接影響しない部分の差分を含まない差分情報を取得することが可能であり、生産性算出を目的とした新規作成プログラムソースコード行数の測定に適している。 This C language program difference information acquisition method can acquire difference information that does not include differences in parts that do not directly affect the processing contents of the program, such as annotations and indentation, and is a newly created program for the purpose of productivity calculation Suitable for measuring the number of source code lines.
ところで、近年ではソフトウェアの商品化サイクルの短縮に伴い、複数の類似したソフトウェアを同時期に変更・開発することが多くなってきている。 In recent years, with the shortening of the software commercialization cycle, a plurality of similar software has been changed and developed at the same time.
この場合、既存のプログラムソースコードを基に追加・変更を行なう上述の開発方法に加え、複数の類似ソフトウェアを個別に開発するのではなく、先行開発しているソフトウェアのプログラムソースコードに対し、並行開発している類似ソフトウェア固有の部分を追加し、コンパイル時に先行開発しているソフトウェアに必要なプログラムソースコードだけを抽出したり、並行開発しているソフトウェアに必要なプログラムソースコードだけを抽出したりすることにより、複数のソフトウェアを同時期に開発する方法が取られる。 In this case, in addition to the above-mentioned development method for adding / changing based on the existing program source code, it is not necessary to develop a plurality of similar software separately, but to develop the program source code of the previously developed software in parallel. Add parts specific to similar software being developed and extract only the program source code required for the software that was previously developed during compilation, or extract only the program source code required for the software being developed in parallel By doing so, a method of developing a plurality of software at the same time is taken.
プログラムソースコードがC言語で書かれている場合においては、図19に示すように前処理指令を用いる条件コンパイルと呼ばれる方法が取られることがある。図19はスクリーン上のデスクトップ領域幅を取得する関数の具体例を示す図である。図19に示される例においてはスクリーンの右端または左端にメニュー領域があり、スクリーンの幅からメニュー領域の幅を減算することによりデスクトップ領域幅を取得している。この例において、「#ifdef X100」、「#else」、「#endif」と書かれた行がそれぞれ前処理指令である。 In the case where the program source code is written in C language, a method called conditional compilation using a preprocessing instruction may be used as shown in FIG. FIG. 19 is a diagram showing a specific example of a function for acquiring the desktop area width on the screen. In the example shown in FIG. 19, there is a menu area at the right or left edge of the screen, and the desktop area width is acquired by subtracting the width of the menu area from the width of the screen. In this example, lines written as “#ifdef X100”, “#else”, and “#endif” are pre-processing instructions.
ソフトウェアが搭載される機器によって画面のサイズは異なる場合があり、その場合、それぞれのソフトウェアでそれぞれのスクリーンのサイズに応じたプログラムを個別に作成しなければならない。図19に示す関数では、「X100」という名前のマクロが定義されていれば図20に示すプログラムソースコードが抽出される。定義されていなければ図21に示すプログラムソースコードが抽出される。このように、図19に示す関数では、「X100」というマクロを定義する、しないによって別々の画面幅を取得するプログラムソースコードが抽出される。 The size of the screen may differ depending on the device on which the software is installed. In this case, a program corresponding to the size of each screen must be created individually for each software. In the function shown in FIG. 19, if a macro named “X100” is defined, the program source code shown in FIG. 20 is extracted. If not defined, the program source code shown in FIG. 21 is extracted. As described above, in the function shown in FIG. 19, the program source code for obtaining different screen widths is extracted without defining the macro “X100”.
「X100」を先行して開発しているソフトウェア、「X200」を「X100」と平行して開発しているソフトウェアとして、2つのソフトウェア「X100」および「X200」を同時期に開発を進めているとする。また、先行して開発しているソフトウェアにおいては「X100」マクロを定義して「X200」マクロを定義しないものとし、並行して開発しているソフトウェアにおいては「X200」マクロを定義して「X100」マクロを定義しないものとすると、図20に示すプログラムソースコードは先行開発しているソフトウェアに必要なプログラムソースコードであり、図21に示すプログラムソースコードは並行開発しているソフトウェアに必要なプログラムソースコードである。 Two software "X100" and "X200" are being developed at the same time, with "X100" being developed in advance and "X200" being developed in parallel with "X100" And In the software developed in advance, the “X100” macro is defined and the “X200” macro is not defined. In the software developed in parallel, the “X200” macro is defined and “X100” is defined. If the macro is not defined, the program source code shown in FIG. 20 is a program source code required for the software developed in advance, and the program source code shown in FIG. 21 is a program required for the software developed in parallel. Source code.
このような開発方法を採用することで、複数の類似するソフトウェアに同一の機能拡張が必要になった場合、または複数の類似するソフトウェアで共通する部分に誤りが発見され、修正が必要になった場合において、一度の追加・修正で済ませることができる。また、一部のソフトウェアでの追加・修正漏れの発生を防ぐことができる。 By adopting such a development method, the same function extension was required for multiple similar software, or an error was found in a common part of multiple similar software, and correction was required. In some cases, it can be done with a single addition / modification. In addition, it is possible to prevent the addition / correction omission in some software.
たとえば、図19に示す例において、デスクトップ領域幅の計算式が変更になったとしても、類似ソフトウェアの数に関係なく、図19内のreturn文における計算式を正しい値に変更するという一度の修正でよい。 For example, in the example shown in FIG. 19, even if the calculation formula for the desktop area width is changed, the calculation formula in the return statement in FIG. 19 is changed to a correct value regardless of the number of similar software. It's okay.
このような開発方法の場合、生産性算出を目的として、先行開発しているソフトウェアにおいて新規に作成されたプログラムソースコードの行数を測定するには、先行開発しているソフトウェアに固有であるプログラムソースコードと、複数の類似するソフトウェアに共通するプログラムソースコードとの両方において、既存のプログラムソースコードからの差分を取得し、その差分のプログラムソースコードの行数を集計する必要がある。 In the case of such a development method, in order to measure the number of lines of the program source code newly created in the software developed in advance for the purpose of calculating productivity, a program unique to the software developed in advance In both the source code and the program source code common to a plurality of similar softwares, it is necessary to obtain a difference from the existing program source code and total the number of lines of the program source code of the difference.
また、同じく生産性算出を目的として、並行開発しているソフトウェアにおいて新規に作成されたプログラムソースコードの行数を測定するには、並行開発しているソフトウェアに固有であるプログラムソースコードについてのみ既存のプログラムソースコードからの差分を取得し、その差分のプロゴラムソースコードの行数を集計する必要がある。 Similarly, for the purpose of calculating productivity, to measure the number of lines of newly created program source code in software that is being developed in parallel, only the program source code that is unique to the software being developed in parallel is already present. It is necessary to acquire the difference from the program source code and to count the number of lines of the program source code of the difference.
なお、並行開発しているソフトウェアにおいて新規に作成されたプログラムソースコードの行数を測定する際には、複数の類似するソフトウェアに共通するプログラムソースコードの、既存のプログラムソースコードからの差分を取得してはならない。なぜなら、複数の類似するソフトウェアに共通するプログラムソースコードにおける差分を新規に作成されたプログラムソースコードの行数に含めると、複数の類似するソフトウェアにおいて新規に作成されたプログラムソースコードの行数の測定するときに重複が生じ、全体としての開発規模および生産性が実際のものよりも高く算出されるためである。
しかしながら、特許文献1に開示されているC言語プログラム差分情報取得方式を採用して、並行して開発しているソフトウェアで新規に作成されたプログラムソースコードの行数を測定すると、入力されたプログラムソースコードが複数の類似するソフトウェアに共通するプログラムソースコードであるかどうかが識別されない。そのため、並行開発しているソフトウェアに固有であるプログラムソースコードと、複数の類似するソフトウェアに共通するプログラムソースコードとの両方について新規に作成されたプログラムソースコードの行数の合計が得られ、並行開発しているソフトウェアに固有であるプログラムソースコードのみで新規に作成されたプログラムソースコードの行数を得ることができないという問題があった。 However, when the number of lines of a program source code newly created by software developed in parallel using the C language program difference information acquisition method disclosed in Patent Document 1 is measured, the input program Whether the source code is program source code common to a plurality of similar software is not identified. Therefore, the total number of lines of newly created program source code for both the program source code unique to the software being developed in parallel and the program source code common to multiple similar software is obtained. There has been a problem that the number of lines of the newly created program source code cannot be obtained only by the program source code unique to the software being developed.
本発明は、このような問題に鑑みてなされたものであり、並行して開発しているソフトウェアの中の、新規に作成されたプログラムソースコードの行数を正確に集計できるソフトウェア差分測定装置、ソフトウェア差分測定プログラム、およびソフトウェア差分測定プログラムを記録した記録媒体を提供することを目的としている。 The present invention has been made in view of such problems, and a software difference measuring device capable of accurately totaling the number of lines of a newly created program source code in software developed in parallel, It is an object of the present invention to provide a software difference measurement program and a recording medium on which the software difference measurement program is recorded.
上記目的を達成するために、本発明のある局面に従うと、ソフトウェア差分測定装置は、ソフトウェア構成より実効コードを抽出する実効コード抽出手段と、第1のソフトウェア構成より抽出された第1の実効コードと、第2のソフトウェア構成より抽出された第2の実効コードとから、前記第1のソフトウェア構成に固有の実効コードを抽出する固有コード抽出手段とを備え、固有コード抽出手段において、第1のソフトウェア構成より抽出された第1の実効コードおよび第2のソフトウェア構成より抽出された第2の実効コードから第1のソフトウェア構成に固有の実効コードである第1の固有コードと、第3のソフトウェア構成より抽出された第3の実効コードおよび第4のソフトウェア構成より抽出された第4の実効コードから第2の固有コードとを抽出し、第1の固有コードと第2の固有コードとの差分を出力する比較手段をさらに備える。 In order to achieve the above object, according to one aspect of the present invention, a software difference measurement device includes an effective code extraction unit that extracts an effective code from a software configuration, and a first effective code extracted from the first software configuration. And a unique code extracting means for extracting an effective code unique to the first software configuration from the second effective code extracted from the second software configuration. A first unique code that is an effective code unique to the first software configuration from the first effective code extracted from the software configuration and the second effective code extracted from the second software configuration; and a third software From the third effective code extracted from the configuration and the fourth effective code extracted from the fourth software configuration, the second Extracts the unique code, further comprising a comparing means for outputting a difference between the first unique code and the second unique code.
好ましくは、固有コード抽出手段は、第1の実効コードに含まれるコードのうち、第2の実効コードのある一部と一致する部分を削除したコード生成することにより、第1の固有コードを抽出する。 Preferably, the unique code extracting unit extracts the first unique code by generating a code in which a portion of the code included in the first effective code is deleted from a portion that matches a certain part of the second effective code. To do.
好ましくは、ソフトウェア構成はプログラムソースコードとコンパイル設定情報とを対にして含み、実効コード抽出手段は、ソフトウェア構成よりプログラムソースコードを取得するコード入力手段と、ソフトウェア構成よりコンパイル設定情報を取得するコンパイル設定情報入力手段と、コンパイル設定情報を解析してマクロ定義を抽出するコンパイル設定情報解析手段と、上記マクロを記憶するマクロ記憶手段と、プログラムソースコードを解析して実効コードであるか否かを判定するコード解析手段と、コード解析手段において抽出された前処理指令について、前処理条件を判定する前処理条件判定手段とを含む。 Preferably, the software configuration includes a pair of program source code and compile setting information, and the effective code extracting means includes code input means for acquiring the program source code from the software configuration, and compile for acquiring the compile setting information from the software configuration. A setting information input means, a compile setting information analyzing means for analyzing the compile setting information to extract a macro definition, a macro storage means for storing the macro, and whether the program source code is analyzed to determine whether it is an effective code. Code analysis means for determining, and preprocessing condition determination means for determining a preprocessing condition for the preprocessing command extracted by the code analysis means.
より好ましくは、前処理条件判定手段は、コード解析手段において抽出された前処理指令に上記マクロが含まれているときに、前処理条件が成立したものと判定する。 More preferably, the preprocessing condition determining unit determines that the preprocessing condition is satisfied when the macro is included in the preprocessing command extracted by the code analyzing unit.
好ましくは、第1のソフトウェア構成は測定対象の環境における第1ソフトウェアの構成であり、第2のソフトウェア構成は比較対象の環境における第2ソフトウェアの構成であり、第3のソフトウェア構成は上記測定対象の環境における第3ソフトウェアの構成であり、第4のソフトウェア構成は上記比較対象の環境における第4ソフトウェアの構成であり、ソフトウェア構成はプログラムソースコードを含み、比較手段で出力する差分は、第1ソフトウェアのプログラムソースコードと、第3ソフトウェアのプログラムソースコードとの、上記測定対象の環境に固有の差分である。 Preferably, the first software configuration is a configuration of the first software in the measurement target environment, the second software configuration is a configuration of the second software in the comparison target environment, and the third software configuration is the measurement target. The fourth software configuration is the configuration of the fourth software in the comparison target environment, the software configuration includes the program source code, and the difference output by the comparing means is the first software configuration. This is a difference specific to the measurement target environment between the software program source code and the third software program source code.
本発明の他の局面に従うと、ソフトウェア差分測定プログラムは、測定対象の環境における第1ソフトウェアのプログラムソースコードおよび第3ソフトウェアのプログラムソースコードの、上記測定対象の環境に固有の差分を測定する処理をコンピュータに実行させるプログラムであって、第1ソフトウェアの構成である第1ソフトウェア構成より第1実効コード、第3ソフトウェアの構成である第3ソフトウェア構成より第3実効コード、比較対象の環境における第2ソフトウェアの構成である第2ソフトウェア構成より第1実効コード、および上記比較対象の環境における第4ソフトウェアの構成である第4ソフトウェア構成より第1実効コードを抽出する実効コード抽出ステップと、第1実効コードと第2実効コードとから第1ソフトウェア構成に固有の実効コードである第1固有コードを抽出し、第3実効コードと第4実効コードから第3ソフトウェア構成に固有の実効コードである第2固有コードを抽出する固有コード抽出ステップ手段と、第1固有コードと第2固有コードとの差分を出力する比較ステップとを実行させる。 According to another aspect of the present invention, the software difference measurement program is a process for measuring a difference specific to the measurement target environment of the first software program source code and the third software program source code in the measurement target environment. The first effective code from the first software configuration that is the first software configuration, the third effective code from the third software configuration that is the third software configuration, and the third effective code in the environment to be compared An effective code extraction step of extracting a first effective code from a second software configuration that is a configuration of two software and a first effective code from a fourth software configuration that is a configuration of the fourth software in the environment to be compared; First soft from effective code and second effective code Unique code extraction step means for extracting a first unique code which is an effective code unique to the hardware configuration and extracting a second unique code which is an effective code unique to the third software configuration from the third effective code and the fourth effective code And a comparison step for outputting a difference between the first unique code and the second unique code.
本発明のさらに他の局面に従うと、記録媒体はコンピュータ読取可能な記録媒体であって、上述のソフトウェア差分測定プログラムを記録する。 According to still another aspect of the present invention, the recording medium is a computer-readable recording medium and records the above-described software difference measurement program.
この発明により、複数の類似するソフトウェアを同時期に変更・開発する場合において、測定対象となるソフトウェアの開発規模を求める際に、複数の類似するソフトウェアで共通する部分において新規に開発したソースコードプログラムの開発規模を含めることなく、測定対象となるソフトウェアの開発規模をより正確に得ることができる。それにより、ソフトウェアの生産性をより正確に算出することが可能となり、開発期間の見積もりやリソース配分などの精度の向上につながる。 According to the present invention, when a plurality of similar software is changed / developed at the same time, a source code program newly developed in a portion common to a plurality of similar softwares when obtaining the development scale of the software to be measured The development scale of the software to be measured can be obtained more accurately without including the development scale. As a result, software productivity can be calculated more accurately, leading to improvements in accuracy such as estimation of development period and resource allocation.
以下に、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。 Embodiments of the present invention will be described below with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are also the same.
図1は、本実施の形態にかかるソフトウェア差分測定装置100のハードウェア構成の具体例を示すブロック図である。本実施の形態にかかるソフトウェア差分測定装置100のハードウェア構成は、一般的なパーソナルコンピュータのハードウェア構成と同様である。具体的には、図1を参照して、ソフトウェア差分測定装置100は、全体を制御するCPU(Central Processing Unit)などで構成される演算部101、ROM(Read Only Memory)やRAM(Random Access Memory)やHD(Hard Disk)などの記憶装置102、CD−ROM(Compact Disk-Read Only Memory)などの記録媒体から情報を読取る読取装置やキーボードやマウスや通信装置などの情報を入力する入力装置103、および通信装置や表示装置などの演算結果を出力する出力装置104を含む。これらはバス105で接続される。または、ソフトウェア差分測定装置100は独立した複数の装置から構成されて、専用回線や無線通信回線などで接続されてもよい。
FIG. 1 is a block diagram showing a specific example of the hardware configuration of the software
さらに、記憶装置102には、所定の記憶領域として、入力装置から入力されるソフトウェア構成を記憶するソフトウェア構成記憶部1021と、CPUで実行されるソフトウェア差分測定プログラムを記憶するプログラム記憶部1022とが含まれる。ここでのソフトウェア構成は、プログラムソースコードとコンパイル設定情報と組合わせであるものとする。
Furthermore, the
図2は、ソフトウェア差分測定処理を行なうためのソフトウェア差分測定装置100の機能構成の具体例を示すブロック図である。図2に示される各部は、CPUがプログラム記憶部1022に記憶されるソフトウェア差分測定プログラムを実行することで主にCPUに形成される機能であるが、少なくとも一部が図示されないソフトウェア差分測定装置100の他のハードウェア構成に形成されてもよい。
FIG. 2 is a block diagram illustrating a specific example of a functional configuration of the software
図2を参照して、ソフトウェア差分測定装置100の演算部101には、実効コード抽出部1と、測定対象構成固有コード抽出部2と、比較部3とが含まれる。
With reference to FIG. 2, the
実効コード抽出部1は、ソフトウェア構成記憶部1021に記憶されているソフトウェア構成であって、比較の対象とされるソフトウェア構成4,6および測定の対象とされるソフトウェア構成5,7を読出し、各ソフトウェア構成に含まれるプログラムソースコードから、コンパイル作業で無視される部分を削除したコード(このコードを、以降、実効コードと称する)を各々抽出して、測定対象構成固有コード抽出部2に出力する。
The effective code extraction unit 1 is a software configuration stored in the software
ここで、「実効コード」とはその環境に対応したプログラムを生成するために実際に利用されるプログラムコードを指す。たとえば、プログラムコードがC言語で記述されている場合であれば、プリプロセッサによる前処理によって削除される、または空白に置換えられることなくコンパイラに渡される文字列を含む部分を指す。 Here, “effective code” refers to program code that is actually used to generate a program corresponding to the environment. For example, if the program code is written in C language, it indicates a part including a character string that is deleted by preprocessing by a preprocessor or passed to a compiler without being replaced with a blank.
測定対象構成固有コード抽出部2は、実効コード抽出部1から入力された測定対象となる実効コードに含まれるコードから、比較対象となる実効コードの一部と一致する部分を削除して、測定対象のソフトウェア構成に含まれる実効コードであって、固有な実効コード部分(以下、固有コードとも称する)を抽出する。抽出された固有コードは比較部3に入力される。
The measurement target configuration unique
比較部3では、測定対象構成固有コード抽出部2から入力された2つの固有コードを比較し、その差分を出力する。
The
図3は、上記実効コード抽出部1の詳細な構成の具体例を示すブロック図である。
図3を参照して、実効コード抽出部1は、ソフトウェア構成に含まれるソースコードを読込むコード入力部8と、ソフトウェア構成に含まれるコンパイルオプションを読込むコンパイルオプション入力部9と、コンパイルオプション入力部9によって読込まれたコンパイルオプションを解析し、マクロ定義の内容を抽出するオプション解析部10と、マクロ定義の内容を記憶するマクロ記憶部11と、コード入力部8から読込まれたソースコードの解析し、実効コードかどうかの判断を行なうコード解析部12と、コード解析部12の判断に利用される数値情報を記憶するカウンタ記憶部13と、コード入力部8によって入力されたソースコードの前処理条件の判定を行なう前処理条件判定部14と、コード解析部12が実効コードと判定したコードを出力するコード出力部15とを含んで構成される。
FIG. 3 is a block diagram illustrating a specific example of a detailed configuration of the effective code extraction unit 1.
Referring to FIG. 3, effective code extraction unit 1 includes a
本実施の形態においては、本実施の形態にかかるソフトウェア差分測定装置100を、X100環境,X200環境という、各々異なった2つの環境で動作する、類似したソフトウェアの開発に用いるものとして以下の説明を行なう。さらに、この仮定において、各ソフトウェアに、バージョン1.0と、次バージョンであるバージョン2.0との2つのバージョンが存在するものとする。そして、ソフトウェア差分測定装置100を用いて、X200環境のソフトウェアのバージョン1.0とバージョン2.0との間の差分のうち、X200環境固有の差分を求めるものとする。この仮定において、X200環境は測定対象の環境であり、「測定対象環境」と呼ぶこととする。また、X100環境は測定対象環境固有の差分を求めるための比較対象であり、「比較対象環境」と呼ぶこととする。
In the present embodiment, the following description will be given assuming that the software
この場合において、比較の対象とされるソフトウェア構成4,6および測定の対象とされるソフトウェア構成5,7は、それぞれ下記のソフトウェア構成を表わしている:
ソフトウェア構成4:バージョン1.0におけるX100環境のソフトウェア構成、
ソフトウェア構成5:バージョン1.0におけるX200環境のソフトウェア構成、
ソフトウェア構成6:バージョン2.0におけるX100環境のソフトウェア構成、
ソフトウェア構成7:バージョン2.0におけるX200環境のソフトウェア構成。
In this case, the
Software configuration 4: X100 environment software configuration in version 1.0,
Software configuration 5: Software configuration of X200 environment in version 1.0,
Software configuration 6: Software configuration of X100 environment in version 2.0,
Software configuration 7: Software configuration of the X200 environment in version 2.0.
より具体的に、ソフトウェア構成4〜7の具体例を図4〜図7に示す。
図4を参照して、ソフトウェア構成4は、プログラムソースコード16とコンパイル設定情報17との対で構成されるものとする。本実施の形態において、プログラムソースコード16はC言語で記述されているものとする。また、コンパイル設定情報17はコンパイラに渡されるコンパイラオプションである。この具体例においては、1つのソフトウェア構成にプログラムソースコードとコンパイル設定情報であるコンパイラオプションとは各々1つずつ含まれるものとしているが、複数含まれてもよい。1つのソフトウェア構成にプログラムソースコードが複数存在する場合は、後述する処理をそれぞれのプログラムソースコードに対して繰返して実行すればよい。
More specifically, specific examples of software configurations 4 to 7 are shown in FIGS.
Referring to FIG. 4, software configuration 4 is configured by a pair of
また、図5〜図7を参照して、ソフトウェア構成5〜7も、図4に示されたソフトウェア構成4と同様に、1つのソフトウェア構成に、プログラムソースコードと、コンパイル設定情報であるコンパイラオプションとを、各々1つずつ含んだ構成であるものとする。
Referring to FIGS. 5 to 7,
図8は、本実施の形態にかかるソフトウェア差分測定装置100におけるソフトウェア差分測定処理の具体例を示すフローチャートである。図8のフローチャートに示される処理はCPUがソフトウェア構成記憶部1021に記憶されるソフトウェア差分測定プログラムを実行し、図2および図3に示された各部を制御することによって実現される。なお、以降の処理の説明においては、具体的に、図4〜図7に示されたソフトウェア構成4〜7に対してソフトウェア差分測定処理が行なわれるものとして説明を行なう。
FIG. 8 is a flowchart showing a specific example of the software difference measurement process in the software
図8を参照して、始めに、実効コード抽出部1は、比較の対象とされるソフトウェア構成4をソフトウェア構成記憶部1021より取得して入力とし、プログラムソースコード16より実効コードを抽出する(ステップS100)。ソフトウェア構成4が図4に示された構成である場合、ステップS100においては、図9に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。
Referring to FIG. 8, first, effective code extraction unit 1 acquires software configuration 4 to be compared from software
同様に、実効コード抽出部1は、測定の対象とされるソフトウェア構成5をソフトウェア構成記憶部1021より取得して入力とし、ソフトウェア構成5のプログラムソースコードより実効コードを抽出する(ステップS110)。ソフトウェア構成5が図5に示された構成である場合、ステップS110においては、図10に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。
Similarly, the effective code extraction unit 1 acquires the
また同様に、実効コード抽出部1は、比較の対象とされるソフトウェア構成6をソフトウェア構成記憶部1021より取得して入力とし、ソフトウェア構成6のプログラムソースコードより実効コードを抽出する(ステップS120)。ソフトウェア構成6が図6に示された構成である場合、ステップS120においては、図11に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。
Similarly, the effective code extraction unit 1 acquires the
また同様に、実効コード抽出部1は、測定の対象とされるソフトウェア構成7をソフトウェア構成記憶部1021より取得して入力とし、ソフトウェア構成7のプログラムソースコードより実効コードを抽出する(ステップS130)。ソフトウェア構成7が図7に示された構成である場合、ステップS130においては、図12に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。
Similarly, the effective code extraction unit 1 acquires the
続いて、測定対象構成固有コード抽出部2は、ステップS100で実効コード抽出部1が比較対象であるバージョン1.0におけるX100環境のソフトウェア構成4より抽出した実効コードと、ステップS110で実効コード抽出部1が測定対象であるバージョン1.0におけるX200環境のソフトウェア構成5より抽出した実効コードとをそれぞれ入力とし、バージョン1.0におけるX200環境に固有のコードを抽出する(ステップS140)。ステップS110で抽出された実効コードが図9に示される実効コードであり、ステップS110で抽出された実効コードが図10に示される実効コードである場合、ステップS140においては図13に示される測定対象に固有の実効コード(以下、測定対象固有コード)が抽出されて、比較部3に出力される。
Subsequently, the measurement target configuration unique
同様に、測定対象構成固有コード抽出部2は、ステップS120で実効コード抽出部1が測定対象であるバージョン2.0におけるX100環境のソフトウェア構成6より抽出した実効コードと、ステップS130で実効コード抽出部1が測定対象であるバージョン2.0におけるX200環境のソフトウェア構成7より抽出した実効コードとをそれぞれ入力とし、バージョン2.0におけるX200環境に固有のコードを抽出する(ステップS150)。ステップS120で抽出された実効コードが図11に示される実効コードであり、ステップS130で抽出された実効コードが図12に示される実効コードである場合、ステップS150においては、図14に示される測定対象固有コードが抽出されて、比較部3に出力される。
Similarly, the measurement target configuration unique
最後に、比較部3は、ステップS140において測定対象構成固有コード抽出部2が抽出したバージョン1.0における測定対象環境固有コードと、ステップS150において測定対象構成固有コード抽出部2が抽出したバージョン2.0における測定対象環境固有コードとを入力にして、これらを比較することにより、バージョン1.0とバージョン2.0との間でも比較対象環境X200における環境固有部分差分を出力する(ステップS160)。ステップS140で抽出された測定対象環境固有コードが図13に示される実効コードであり、ステップS150で抽出された測定対象環境固有コードが図14に示される実効コードである場合、ステップS160においては、図15に示される差分が出力される。
Finally, the
図16は、上記ステップS100〜S130での、実効コード抽出部1による実効コード抽出処理を示すフローチャートである。 FIG. 16 is a flowchart showing an effective code extraction process by the effective code extraction unit 1 in steps S100 to S130.
図16を参照して、始めに、コンパイルオプション入力部9がソフトウェア構成に含まれるコンパイルオプションを読込み、オプション解析部10がそのコンパイルオプションを解析し、コンパイルオプションにマクロ定義オプションが含まれていればマクロ記憶部11にそのマクロを定義する(ステップS200)。コンパイルオプション入力部9から読込まれるオプションについては様々な種類のものが含まれるが、ステップS200においてオプション解析部10はコンパイルオプションを解析し、ソースコードのある部分が実効コードかどうかの判定に影響する部分をコンパイルオプションの中から検出して、その値をマクロ記憶部11に格納する。ソースコードのある部分が実効コードかどうかの判定に影響する部分としては、たとえばコンパイルオプションが図4に示されるコンパイルオプション17である場合には、「-DX100」のようなマクロ定義オプションが該当する。
Referring to FIG. 16, first, compile option input unit 9 reads a compile option included in the software configuration,
ステップS200で、マクロ記憶部11は、1つの具体例として、図17に示されるような表形式でマクロ名とマクロ定義文字列とを対にして記憶することで、抽出されたマクロを定義する。たとえば、「-DMAX_SIZE=10」というマクロ定義オプションであれば、オプション解析部10は、マクロ名が「MAX_SIZE」、マクロ定義文字列が「10」であると解析し、このマクロ名とマクロ定義との対をマクロ記憶部11に記憶させる。また、先に示した「-DX100」というマクロ定義オプションであれば、オプション解析部10において、マクロ名が「X100」であり、マクロ定義文字列が不明であると解析されるため、マクロ定義文字列にはその旨を表わす文字列の具体例として「1」が設定されて、このマクロ名とマクロ定義との対がマクロ記憶部11に記憶される。
In step S200, as one specific example, the
マクロ記憶部11にこのように記憶されることで、マクロ名を与えると記憶された各マクロのマクロ名で表を検索して、マクロ名が一致するものがあればその定義内容である文字列を得ることができる。
By storing in the
続いて、コード解析部12がカウンタ記憶部13に記憶されているカウンタ値を0に設定する(ステップS205)。続いて、コード入力部8はソフトウェア構成に含まれるソースコードから1行分のデータを読込む(ステップS210)。ステップS210で、コード入力部8はソースコードの先頭から順にまだ読込まれていない行を読込んでいき、読込まれた1行分のソースコードはコード解析部12に渡される。
Subsequently, the
続いて、コード解析部12はカウンタ記憶部13に格納されているカウンタ値を確認する(ステップS220)。カウンタ値が正の値である場合は(ステップS220でYES)、後述のステップS340以降の処理を行なう。そうでない場合は(ステップS220でNO)、ステップS230以降の処理を行なう。処理が開始されて第1行目のソースコードが解析されている際には、上記ステップS205でカウンタ値が0であるため、ステップS230以降の処理に移行する。
Subsequently, the
ステップS230で、コード解析部12はコード入力部8によって読込まれた行のソースコードが#if文または#ifdef文であるかどうかを確認する。#ifdef文でも#if文でもない場合(ステップS230でNO)、後述のステップS270以降の処理を行なう。#ifdef文または#if文のいずれかであれば(ステップS230でYES)、ステップS240以降の処理を行なう。
In step S230, the
ステップS240で、コード解析部12は、前処理条件判定部14を用いて#ifdef文または#if文に記述されている条件の判定を行なう。上記行のソースコードが#ifdef文であれば、ステップS240で前処理条件判定部14は「#ifdef」に続くマクロ名がマクロ記憶部11に記憶されているかどうかを検索し、検索されたマクロが存在すれば、条件が成立したものと判定する。
In step S240, the
また、上記行のソースコードが#if文であれば、前処理条件判定部14は「#if」に続く条件式が満たされるかどうかを判定する。ステップS240で前処理条件判定部14は条件式をトークンに分割し、マクロ記憶部11にトークンと同じ文字列であるマクロ名が存在するかどうかを確認する。存在する場合はその一致するトークンの文字列を一致するマクロの定義内容の文字列に置換した上で、条件式の解釈を行ない、条件式が満たされるかどうかの確認を行なう。
If the source code in the above line is an #if statement, the preprocessing
そして、コード解析部12は前処理条件判定部14による条件成立の判定を確認する(ステップS250)。条件が成立していれば(ステップS250でYES)、コード解析部12はカウンタ記憶部13に記憶されているカウンタ値を1加算し(ステップS260)、コード出力部15から測定対象構成固有コード抽出部2に空行(何も記述されていない行)を出力させる(ステップS320)。条件が成立していない場合(ステップS250でNO)、コード解析部12は上記ステップS260の処理をスキップして、つまりカウンタ値を加算せずにコード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。
Then, the
コード入力部8が読込んだ行のソースコードが#ifdef文でも#if文でもなかった場合は(ステップS230でNO)、コード解析部12は、さらに、コード入力部8が読込んだ行のソースコードが#else文であるかどうかを確認する(ステップS270)。#else文である場合(ステップS270でYES)、コード解析部12はカウンタ記憶部13に記憶されているカウンタ値を1加算し(ステップS280)、コード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。
If the source code of the line read by the
コード入力部8が読込んだ行のソースコードが#ifdef文、#if文、および#else文のいずれでもなかった場合は(ステップS270でNO)、コード解析部12は、さらに、コード入力部8が読込んだ行のソースコードが#define文であるかどうかを確認する(ステップS300)。コード入力部8が読込んだ行のソースコードがマクロ定義するコードである#define文であれば(ステップS300でYES)、コード解析部12は#define文を解析し、解析の結果得られたマクロ定義の内容をマクロ記憶部11に格納し(ステップS310)、コード出力部15から空行を出力させる(ステップS320)。そうでない場合、つまりコード入力部8が読込んだ行のソースコードが#ifdef文、#if文、#else文、および#define文のいずれでもなかった場合は(ステップS300でNO)、コード解析部12はコード入力部8から入力された行をコード出力部15を用いて測定対象構成固有コード抽出部2に出力する(ステップS330)。
If the source code of the line read by the
上記ステップS220において、カウンタ値が正値でないことが確認された場合(ステップS220でNO)、コード解析部12はコード入力部8が読込んだ行のソースコードが#ifdef文または#if文であるかどうかを確認する(ステップS340)。#ifdef文または#if文のいずれかであれば(ステップS340でYES)、コード解析部12はカウンタ記憶部13に記憶されているカウンタ値を1加算し(ステップS350)、コード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。
If it is confirmed in step S220 that the counter value is not a positive value (NO in step S220), the
コード入力部8によって読込まれた行のソースコードが#ifdef文でも#if文でもない場合(ステップS340でNO)、コード解析部12は、さらに、コード入力部8が読込んだ行のソースコードが#endif文であるかどうかを確認する(ステップS360)。#endif文である場合(ステップS360でYES)、コード解析部12はカウンタ記憶部13に記憶されているカウンタ値を1減算し(ステップS370)、コード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。
If the source code of the line read by the
コード入力部8が読込んだ行のソースコードが#ifdef文、#if文、および#endif文のいずれでもなかった場合は(ステップS360でNO)、コード解析部12は、さらに、コード入力部8が読込んだ行のソースコードが#else文であり、かつカウンタ記憶部13に格納されているカウンタ値が1であるかどうかを確認する(ステップS380)。
When the source code of the line read by the
コード入力部8で読込んだ行のソースコードが#else文であり、かつカウンタ記憶部13に格納されているカウンタ値が1であれば(ステップS380でYES)、コード解析部12はカウンタ記憶部13に記憶されているカウンタ値を1減算し(ステップS390)、コード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。コード入力部8で読込んだ行のソースコードが#ifdef文、#if文、endif文、および#else文のいずれでもなかった場合は、またはカウンタ記憶部13に格納されているカウンタ値が1でなかった場合は(ステップS380でNO)、上記ステップS390の処理をスキップして、つまりカウンタ値を減算せずにコード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。
If the source code of the line read by the
以上のステップS210〜ステップS390の処理が実行されることで、コード解析部12はコード入力部8から読込まれた1行のソースコードを処理し、その行のうちのマクロを定義している部分、つまり実効コードである部分をコード出力部15より測定対象構成固有コード抽出部2に出力する(ステップS310)。また、実効コードが含まれていない場合には、その行についてはコード出力部15より測定対象構成固有コード抽出部2に空行が出力される(ステップS320)。
The
ステップS210〜ステップS390の処理が終了すると、コード解析部12はコード入力部8がすべての行を読込んだかどうかを確認する(ステップS400)。すべての行を読込んでいれば(ステップS400でYES)、実効コード抽出の処理は完了する。この場合、これまでの処理でコード出力部15が測定対象構成固有コード抽出部2に出力したものが実効コードである。読込んでいない行が残っている場合(ステップS400でNO)、すべての行についての処理が完了するまでステップS210からの処理を繰返し実行する。
When the processing of steps S210 to S390 is completed, the
具体的に、図4に示されたソフトウェア構成4のプログラムソースコード16から実効コードを抽出する場合、第1行「void GetImageExt (ImgType type)」から第6行「{」までについては、カウンタ値が0であるため上記ステップS220〜S330が実行されて、図9に示されるように、実効コードとしてこれらの行がそのまま出力される。また、ここまでの処理では、カウンタ値が0のままである。
Specifically, when the effective code is extracted from the
次に、第7行「#ifdef X100」については、上記ステップS230でコード解析部12によって#ifdef文であると判定され、さらにステップS240で、すでに上記ステップS200でマクロ定義されていると判定されるため、ステップS250で条件成立とされてカウンタ値が0のままとされる。また、図9に示されるように、上記ステップS320で実効コードとして第7行は空行で出力される。
Next, the seventh line “#ifdef X100” is determined to be an #ifdef statement by the
次に、第8行「case IMAGE_JPEG:」から第10行「break;」までについては、カウンタ値が0であるため上記ステップS220〜S330が実行されて、図9に示されるように、実効コードとして第8行から第10行はこれらの行がそのまま出力される。また、ここまでの処理では、カウンタ値が0のままである。 Next, for the eighth line “case IMAGE_JPEG:” to the tenth line “break;”, since the counter value is 0, the above steps S220 to S330 are executed, and as shown in FIG. As for the 8th line to the 10th line, these lines are output as they are. In the processing so far, the counter value remains 0.
次に、第11行「#endif /* X100 */」については、上記ステップS290でコード解析部12によって#endif文であると判定されるため、図9に示されるように、上記ステップS320で実効コードとして第11行は空行で出力される。また、ここまでの処理では、カウンタ値が0のままである。
Next, the eleventh line “# endif / * X100 * /” is determined to be an #endif statement by the
次に、第12行「#ifdef X200」については、上記ステップS230でコード解析部12によって #ifdef文であると判定されるが、ステップS240で、上記ステップS200でマクロ定義されたものとことなることが判定されるため、ステップS250で条件不成立とされてステップS260でカウンタ値が1とされる。また、図9に示されるように、上記ステップS320で実効コードとして第12行は空行で出力される。
Next, although the
次に、第13行「case IMAGE_SVG:」から第15行「break;」までについては、カウンタ値が1であるために上記ステップS340〜S380が実行されて、図9に示されるように、上記ステップS320で実効コードとして第13行から第15行は空行で出力される。また、ここまでの処理で、カウンタ値が1のままである。 Next, for the 13th line “case IMAGE_SVG:” to the 15th line “break;”, since the counter value is 1, the above steps S340 to S380 are executed, and as shown in FIG. In step S320, the 13th to 15th lines are output as blank lines as effective codes. In addition, the counter value remains 1 in the processing so far.
次に、第16行「#endif /* X200 */」については、上記ステップS360でコード解析部12によって#endif文であると判定されるため、ステップS370でカウンタ値が0に戻る。また、図9に示されるように、上記ステップS320で実効コードとして第16行は空行で出力される。
Next, with respect to the 16th line “# endif / * X200 * /”, the
最後に、第17行「case IMAGE_PNG:」から第22行「}」までについては、カウンタ値が0であるため上記ステップS220〜S330が実行されて、図9に示されるように、実効コードとして第17行から第22行はこれらの行がそのまま出力される。
Finally, for the 17th line “case IMAGE_PNG:” to the 22nd line “}”, since the counter value is 0, the above steps S220 to S330 are executed, and as shown in FIG.
以上の処理によって、図4のソフトウェア構成4のプログラムソースコード16から図9の実効コードが抽出される。また、他のソフトウェア構成5〜7についても同様にして図10〜12の実効コードが抽出される。
9 is extracted from the
図18は、上記ステップS140,S150での、測定対象構成固有コード抽出部2による固有コードの抽出処理を示すフローチャートである。
FIG. 18 is a flowchart showing the unique code extraction process performed by the measurement target configuration unique
図18を参照して、始めに、測定対象構成固有コード抽出部2は、測定対象環境の実効コードから1行読込む(ステップS500)。ステップS500で、測定対象構成固有コード抽出部2は、測定対象環境の実効コードの記述順にまだ読込まれていない1行を読込む。
Referring to FIG. 18, first, the measurement target configuration specific
続いて、測定対象構成固有コード抽出部2は、ステップS500で読込まれた行が空行でないことを確認する(ステップS510)。ステップS500で読込まれた行が空行である場合(ステップS510でNO)、測定対象構成固有コード抽出部2は比較部3に空行を出力する(ステップS550)。
Subsequently, the measurement target configuration unique
ステップS500で読込まれた行が空行でなければ(ステップS510でYES)、測定対象構成固有コード抽出部2は、比較対象環境の実効コードから1行読込む(ステップS520)。ステップS520で、測定対象構成固有コード抽出部2は、比較対象環境の実効コードの記述順にまだ読込まれていない1行を読込む。
If the line read in step S500 is not a blank line (YES in step S510), the measurement target configuration specific
次に、測定対象構成固有コード抽出部2は、ステップS520で読込まれた行が空行であることを確認する(ステップS530)。ステップS500で読込まれた測定対象環境の実効コードの行が空行でなく、かつステップS520で読込まれた比較対象環境の実効コードの行が空行である場合(ステップS530でYES)、測定対象構成固有コード抽出部2は、ステップS500で読込まれた測定対象環境の実効コードの行を比較部3に出力する(ステップS540)。
Next, the measurement target configuration unique
ステップS500で読込まれた測定対象環境の実効コードの行も、ステップS520で読込まれた行も空行でない場合(ステップS530でNO)、測定対象構成固有コード抽出部2は比較部3に空行を出力する(ステップS550)。
When neither the effective code line of the measurement target environment read in step S500 nor the line read in step S520 is a blank line (NO in step S530), the measurement target configuration specific
続いて、測定対象構成固有コード抽出部2は、測定対象環境の実効コードをすべて読込んだかどうかを確認する(ステップS560)。すべての行を読込んでいれば(ステップS560でYES)、処理は完了する。読込んでいない行が残っている場合(ステップS560でNO)、すべての行についての処理が完了するまでステップS5000からの処理を繰返し実行する。
Subsequently, the measurement target configuration unique
以上の処理によって、測定対象構成固有コード抽出部2は、固有コードでない部分を空行として、固有コードとなる部分は入力されたソースコードそのままの内容として、比較部3に出力する。
Through the above processing, the measurement target configuration unique
具体的に、図9に示された比較対象環境の実効コードを用いて、図10に示された測定対象環境の実効コードから固有コードを抽出する場合、上記ステップS500で図10の測定対象環境の実効コードの第4行、第7行〜第13行、第17行、および第22行が読込まれた場合には、上記ステップS510で測定対象構成固有コード抽出部2においてこれらの行が空行であると判定され、図13に示されるように、上記ステップS550で固有コードとして第4行、第7行〜第13行、第17行、および第22行は空行で出力される。
Specifically, when the unique code is extracted from the effective code of the measurement target environment shown in FIG. 10 using the effective code of the comparison target environment shown in FIG. 9, the measurement target environment of FIG. When the fourth line, the seventh line to the thirteenth line, the seventeenth line, and the twenty-second line of the effective code are read, these lines are empty in the measurement target configuration specific
上記ステップS500で図10の測定対象環境の実効コードの第1行〜第3行、第5行〜第6行、第18行〜第21行、および第23行〜第24行が読込まれた場合には、上記ステップS510およびステップS530で測定対象構成固有コード抽出部2においてこれらの行が空行でなく、図9の比較対照環境コードの実効コードの対応する行も空行でないと判定され、図13に示されるように、上記ステップS550で固有コードとして第1行〜第3行、第5行〜第6行、第18行〜第21行、および第23行〜第24行は空行で出力される。
In step S500, the first to third lines, the fifth to sixth lines, the 18th to 21st lines, and the 23rd to 24th lines of the effective code of the measurement target environment in FIG. 10 are read. In this case, in the above-described step S510 and step S530, the measurement target configuration unique
上記ステップS500で図10の測定対象環境の実効コードの第14行〜第16行が読込まれた場合には、上記ステップS510およびステップS530で測定対象構成固有コード抽出部2においてこれらの行が空行でなく、図9の比較対照環境コードの実効コードの対応する行が空行であると判定され、上記ステップS500で固有コードとして上記ステップS500で読込まれた行がそのまま出力される。
When the 14th to 16th lines of the effective code of the measurement target environment in FIG. 10 are read in step S500, these lines are empty in the measurement target configuration specific
以上の処理によって、図10の測定対象環境の実効コードから図9の比較対象環境の実効コードを用いて図13の測定対象環境固有コードが抽出される。また、図12の測定対象環境の実効コードについても同様にして図11の比較対象環境の実効コードを用いて図14の測定対象環境固有コードが抽出される。 Through the above processing, the measurement target environment specific code of FIG. 13 is extracted from the effective code of the measurement target environment of FIG. 10 using the effective code of the comparison target environment of FIG. Similarly, for the effective code of the measurement target environment of FIG. 12, the measurement target environment specific code of FIG. 14 is extracted using the effective code of the comparison target environment of FIG.
上記ステップS260では比較部3によって図13に示された固有コードと図14に示された固有コードとが比較されて、その差分として図14の固有コードの第13行「case IMAGE_SVG:」から第15行「break;」が抽出されて、図15に示される差分が出力される。
In step S260, the
図13の測定対象環境固有コードは、測定対象環境であるX200環境のバージョン1.0のソフトウェア構成5の実効コード(図10)の、比較対象であるX100環境のバージョン1.0のソフトウェア構成4の実効コード(図9)に対して固有な実効コードであり、X200環境で固有な実効コードである。また、図14の測定対象環境固有コードは、測定対象環境であるX200環境のバージョン2.0のソフトウェア構成7の実効コード(図12)の、比較対象であるX100環境のバージョン2.0のソフトウェア構成6(図11)に対して固有な実効コードであり、X200環境で固有な実効コードである。そのため、これらの差分である図15に示される差分は、バージョン1.0とバージョン2.0との間での、X200環境固有の差分となる。
The measurement target environment specific code of FIG. 13 is the version 1.0 software configuration 4 of the comparison target X100 environment of the effective code of the
本実施の形態にかかるソフトウェア差分測定装置100においてこのように差分が得られることで、並行して開発しているソフトウェアの中の、新規に作成されたプログラムソースコードが抽出され、行数を正確に集計することができる。
By obtaining the difference in this way in the software
さらに、上述のソフトウェア差分測定処理をコンピュータに実行させるためのプログラムを提供することもできる。このようなプログラムは、コンピュータに付属するフレキシブルディスク、CD−ROM、ROM、RAMおよびメモリカードなどのコンピュータ読取り可能な記録媒体にて記録させて、プログラム製品として提供することもできる。あるいは、コンピュータに内蔵するハードディスクなどの記録媒体にて記録させて、プログラムを提供することもできる。また、ネットワークを介したダウンロードによって、プログラムを提供することもできる。 Furthermore, a program for causing a computer to execute the above-described software difference measurement process can be provided. Such a program can be recorded on a computer-readable recording medium such as a flexible disk attached to the computer, a CD-ROM, a ROM, a RAM, and a memory card, and provided as a program product. Alternatively, the program can be provided by being recorded on a recording medium such as a hard disk built in the computer. A program can also be provided by downloading via a network.
なお、本発明にかかるプログラムは、コンピュータのオペレーションシステム(OS)の一部として提供されるプログラムモジュールのうち、必要なモジュールを所定の配列で所定のタイミングで呼出して処理を実行させるものであってもよい。その場合、プログラム自体には上記モジュールが含まれずOSと協働して処理が実行される。このようなモジュールを含まないプログラムも、本発明にかかるプログラムに含まれ得る。 The program according to the present invention is a program module that is provided as a part of a computer operating system (OS) and calls necessary modules in a predetermined arrangement at a predetermined timing to execute processing. Also good. In that case, the program itself does not include the module, and the process is executed in cooperation with the OS. A program that does not include such a module can also be included in the program according to the present invention.
また、本発明にかかるプログラムは他のプログラムの一部に組込まれて提供されるものであってもよい。その場合にも、プログラム自体には上記他のプログラムに含まれるモジュールが含まれず、他のプログラムと協働して処理が実行される。このような他のプログラムに組込まれたプログラムも、本発明にかかるプログラムに含まれ得る。 The program according to the present invention may be provided by being incorporated in a part of another program. Even in this case, the program itself does not include the module included in the other program, and the process is executed in cooperation with the other program. Such a program incorporated in another program can also be included in the program according to the present invention.
提供されるプログラム製品は、ハードディスクなどのプログラム格納部にインストールされて実行される。なお、プログラム製品は、プログラム自体と、プログラムが記録された記録媒体とを含む。 The provided program product is installed in a program storage unit such as a hard disk and executed. The program product includes the program itself and a recording medium on which the program is recorded.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
1 実効コード抽出部、2 測定対象構成固有コード抽出部、3 比較部、4〜7 ソフトウェア構成、8 コード入力部、9 コンパイルオプション入力部、10 オプション解析部、11 マクロ記憶部、12 コード解析部、13 カウンタ記憶部、14 前処理条件判定部、15 コード出力部、16 プログラムソースコード、17 コンパイル設定情報、100 ソフトウェア差分測定装置、101 演算部、102 記憶装置、103 入力装置、104 出力装置、105 バス、1021 ソフトウェア構成記憶部、1022 プログラム記憶部。 DESCRIPTION OF SYMBOLS 1 Effective code extraction part, 2 Measurement object structure specific code extraction part, 3 Comparison part, 4-7 Software structure, 8 Code input part, 9 Compile option input part, 10 Option analysis part, 11 Macro storage part, 12 Code analysis part , 13 Counter storage unit, 14 Preprocessing condition determination unit, 15 Code output unit, 16 Program source code, 17 Compile setting information, 100 Software difference measuring device, 101 Arithmetic unit, 102 Storage device, 103 Input device, 104 Output device, 105 bus, 1021 software configuration storage unit, 1022 program storage unit.
Claims (7)
第1のソフトウェア構成より抽出された第1の実効コードと、第2のソフトウェア構成より抽出された第2の実効コードとから、前記第1のソフトウェア構成に固有の実効コードを抽出する固有コード抽出手段とを備え、
前記固有コード抽出手段において、前記第1のソフトウェア構成より抽出された前記第1の実効コードおよび前記第2のソフトウェア構成より抽出された前記第2の実効コードから前記第1のソフトウェア構成に固有の実効コードである第1の固有コードと、第3のソフトウェア構成より抽出された第3の実効コードおよび第4のソフトウェア構成より抽出された第4の実効コードから第2の固有コードとを抽出し、
前記第1の固有コードと前記第2の固有コードとの差分を出力する比較手段をさらに備える、ソフトウェア差分測定装置。 An effective code extraction means for extracting an effective code from the software configuration;
Unique code extraction for extracting an effective code unique to the first software configuration from the first effective code extracted from the first software configuration and the second effective code extracted from the second software configuration Means and
In the unique code extracting means, the unique code is unique to the first software configuration from the first effective code extracted from the first software configuration and the second effective code extracted from the second software configuration. The first unique code that is the effective code, the third effective code extracted from the third software configuration, and the second unique code from the fourth effective code extracted from the fourth software configuration are extracted. ,
A software difference measurement device further comprising a comparison unit that outputs a difference between the first unique code and the second unique code.
前記実効コード抽出手段は、
前記ソフトウェア構成より前記プログラムソースコードを取得するコード入力手段と、
前記ソフトウェア構成より前記コンパイル設定情報を取得するコンパイル設定情報入力手段と、
前記コンパイル設定情報を解析してマクロ定義を抽出するコンパイル設定情報解析手段と、
前記マクロを記憶するマクロ記憶手段と、
前記プログラムソースコードを解析して実効コードであるか否かを判定するコード解析手段と、
前記コード解析手段において抽出された前処理指令について、前処理条件を判定する前処理条件判定手段とを含む、請求項1に記載のソフトウェア差分測定装置。 The software configuration includes a pair of program source code and compile setting information,
The effective code extraction means includes
Code input means for obtaining the program source code from the software configuration;
Compile setting information input means for acquiring the compile setting information from the software configuration;
Compile setting information analyzing means for analyzing the compile setting information and extracting a macro definition;
Macro storage means for storing the macro;
Code analysis means for analyzing the program source code to determine whether it is an effective code;
The software difference measuring device according to claim 1, further comprising: a preprocessing condition determining unit that determines a preprocessing condition for the preprocessing command extracted by the code analyzing unit.
前記第2のソフトウェア構成は比較対象の環境における第2ソフトウェアの構成であり、
前記第3のソフトウェア構成は前記測定対象の環境における第3ソフトウェアの構成であり、
前記第4のソフトウェア構成は前記比較対象の環境における第4ソフトウェアの構成であり、
前記ソフトウェア構成はプログラムソースコードを含み、
前記比較手段で出力する前記差分は、前記第1ソフトウェアのプログラムソースコードと、前記第3ソフトウェアのプログラムソースコードとの、前記測定対象の環境に固有の差分である、請求項1に記載のソフトウェア差分測定装置。 The first software configuration is a configuration of the first software in the measurement target environment;
The second software configuration is a configuration of the second software in the comparison target environment,
The third software configuration is a configuration of third software in the measurement target environment,
The fourth software configuration is a configuration of the fourth software in the comparison target environment,
The software configuration includes program source code,
2. The software according to claim 1, wherein the difference output by the comparison unit is a difference unique to the measurement target environment between the program source code of the first software and the program source code of the third software. Differential measurement device.
前記第1ソフトウェアの構成である第1ソフトウェア構成より第1実効コード、前記第3ソフトウェアの構成である第3ソフトウェア構成より第3実効コード、比較対象の環境における第2ソフトウェアの構成である第2ソフトウェア構成より第1実効コード、および前記比較対象の環境における第4ソフトウェアの構成である第4ソフトウェア構成より第1実効コードを抽出する実効コード抽出ステップと、
前記第1実効コードと前記第2実効コードとから前記第1ソフトウェア構成に固有の実効コードである第1固有コードを抽出し、前記第3実効コードと前記第4実効コードから前記第3ソフトウェア構成に固有の実効コードである第2固有コードを抽出する固有コード抽出ステップ手段と、
前記第1固有コードと前記第2固有コードとの差分を出力する比較ステップとを実行させる、ソフトウェア差分測定プログラム。 A program for causing a computer to execute a process for measuring a difference between the program source code of the first software and the program source code of the third software in the measurement target environment unique to the measurement target environment,
A first effective code from the first software configuration that is the configuration of the first software, a third effective code from the third software configuration that is the configuration of the third software, and a second software configuration that is the second software in the comparison target environment An effective code extracting step of extracting the first effective code from the software configuration and the first effective code from the fourth software configuration which is the configuration of the fourth software in the environment to be compared;
A first unique code which is an effective code unique to the first software configuration is extracted from the first effective code and the second effective code, and the third software configuration is extracted from the third effective code and the fourth effective code. A unique code extracting step means for extracting a second unique code that is an effective code unique to
A software difference measurement program for executing a comparison step of outputting a difference between the first unique code and the second unique code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006307872A JP2008123343A (en) | 2006-11-14 | 2006-11-14 | Software differential measurement device, software differential measurement program, and recording medium recording it |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006307872A JP2008123343A (en) | 2006-11-14 | 2006-11-14 | Software differential measurement device, software differential measurement program, and recording medium recording it |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008123343A true JP2008123343A (en) | 2008-05-29 |
Family
ID=39508022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006307872A Pending JP2008123343A (en) | 2006-11-14 | 2006-11-14 | Software differential measurement device, software differential measurement program, and recording medium recording it |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008123343A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102379072A (en) * | 2009-03-31 | 2012-03-14 | 日本特殊陶业株式会社 | Method of manufacturing sparkplugs |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1185486A (en) * | 1997-09-12 | 1999-03-30 | Fujitsu Ltd | Program editing device, program editing method, and computer-readable medium |
JP2002108652A (en) * | 2000-09-29 | 2002-04-12 | Denso Corp | Detector of program correlation |
JP2004220411A (en) * | 2003-01-16 | 2004-08-05 | Nec Infrontia Corp | Development scale meter |
JP2006277127A (en) * | 2005-03-28 | 2006-10-12 | Canon Inc | Method for comparing correction program |
-
2006
- 2006-11-14 JP JP2006307872A patent/JP2008123343A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1185486A (en) * | 1997-09-12 | 1999-03-30 | Fujitsu Ltd | Program editing device, program editing method, and computer-readable medium |
JP2002108652A (en) * | 2000-09-29 | 2002-04-12 | Denso Corp | Detector of program correlation |
JP2004220411A (en) * | 2003-01-16 | 2004-08-05 | Nec Infrontia Corp | Development scale meter |
JP2006277127A (en) * | 2005-03-28 | 2006-10-12 | Canon Inc | Method for comparing correction program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102379072A (en) * | 2009-03-31 | 2012-03-14 | 日本特殊陶业株式会社 | Method of manufacturing sparkplugs |
CN102379072B (en) * | 2009-03-31 | 2014-04-30 | 日本特殊陶业株式会社 | Method of manufacturing sparkplugs |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4148527B2 (en) | Functional test script generator | |
CN106776334B (en) | Comment-based test case generation method and device | |
JP6440895B2 (en) | Software analysis apparatus and software analysis method | |
CN113760266B (en) | Method and device for creating function module file and electronic equipment | |
CN111124479A (en) | Configuration file analysis method and system and electronic equipment | |
CN116880847A (en) | Source tracing method and device based on open source project, electronic equipment and storage medium | |
CN110618926A (en) | Source code analysis method and source code analysis device | |
US20210096830A1 (en) | Incremental code generation method | |
JP2008123343A (en) | Software differential measurement device, software differential measurement program, and recording medium recording it | |
JP6766611B2 (en) | Correction support program, correction support method, and correction support device | |
JP7260150B2 (en) | WEBSITE DESIGN SUPPORT DEVICE, WEBSITE DESIGN SUPPORT METHOD, AND PROGRAM | |
JP6547345B2 (en) | Test case generation program, test case generation method and test case generation apparatus | |
JP5755861B2 (en) | Test case generation apparatus, test case generation method, and test case generation program | |
JP2012048660A (en) | Static analysis processing system, method, and program | |
JP7050587B2 (en) | Violation dependency detector and violation dependency detector | |
JP5076700B2 (en) | Database verification method and apparatus | |
JP6579022B2 (en) | Generating program, generating method, and generating apparatus | |
JP2007323299A (en) | Apparatus and program for determining review execution order, recording medium with the program stored, and method for determining review execution order | |
JP5169322B2 (en) | Variable optimization apparatus, variable optimization program, compiler, variable optimization method, and compilation method | |
JP5343840B2 (en) | Program analysis apparatus and analysis method | |
CN114115763B (en) | Configuration device and configuration method for printer platform product | |
CN113033137B (en) | Method and device for establishing digital component model and server | |
JP7631667B2 (en) | Information processing device, inspection method, inspection program, and server | |
JP4371000B2 (en) | IDL compiling device, IDL compiling method, and IDL compiler | |
JP2009015734A (en) | Program profiling device, program profiling method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090218 |
|
A977 | Report on retrieval |
Effective date: 20110907 Free format text: JAPANESE INTERMEDIATE CODE: A971007 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110920 |
|
A02 | Decision of refusal |
Effective date: 20120221 Free format text: JAPANESE INTERMEDIATE CODE: A02 |