[go: up one dir, main page]

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 PDF

Info

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
Application number
JP2006307872A
Other languages
Japanese (ja)
Inventor
Masayuki Fujii
正行 藤井
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2006307872A priority Critical patent/JP2008123343A/en
Publication of JP2008123343A publication Critical patent/JP2008123343A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a software differential measurement device capable of accurately summing up the number of lines of a newly created program source code in pieces of software being developed simultaneously. <P>SOLUTION: The software differential measurement device is provided with an effective code extraction part, a measurement target configuration specific code extraction part, and a comparison part. In the effective code extraction part, software configurations as pairs of a program source code and compilation setting information are input, and among program source codes contained in the software configurations, codes (effective codes), from each of which a portion to be ignored in compilation work is deleted, are output. In the measurement target configuration specific code extraction part, effective codes as measurement targets and an effective code as a comparison target are input, and among the codes included in the effective codes as measurement targets, codes, from each of which a portion matching a portion of the effective code as a comparison target is deleted, are generated for extracting effective code portions specific to the measurement targets. In the comparison part, two codes are input to be compared mutually, and a difference between the two codes is output. <P>COPYRIGHT: (C)2008,JPO&INPIT

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.

なお、並行開発しているソフトウェアにおいて新規に作成されたプログラムソースコードの行数を測定する際には、複数の類似するソフトウェアに共通するプログラムソースコードの、既存のプログラムソースコードからの差分を取得してはならない。なぜなら、複数の類似するソフトウェアに共通するプログラムソースコードにおける差分を新規に作成されたプログラムソースコードの行数に含めると、複数の類似するソフトウェアにおいて新規に作成されたプログラムソースコードの行数の測定するときに重複が生じ、全体としての開発規模および生産性が実際のものよりも高く算出されるためである。
特開平5−158765号公報
When measuring the number of lines of newly created program source code in software that is being developed in parallel, obtain the difference from the existing program source code of the program source code common to multiple similar software should not be done. This is because if the difference in the program source code common to a plurality of similar software is included in the number of lines of the newly created program source code, the number of lines of the program source code newly created in the plurality of similar software is measured. This is because duplication occurs and the overall development scale and productivity are calculated higher than the actual ones.
JP-A-5-158765

しかしながら、特許文献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 difference measuring apparatus 100 according to the present embodiment. The hardware configuration of the software difference measuring apparatus 100 according to the present embodiment is the same as the hardware configuration of a general personal computer. Specifically, referring to FIG. 1, a software difference measurement apparatus 100 includes a calculation unit 101 including a CPU (Central Processing Unit) that controls the whole, a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. ) And HD (Hard Disk) storage device 102, CD-ROM (Compact Disk-Read Only Memory) and other recording media such as a reading device, and a keyboard, mouse, communication device, etc. , And an output device 104 that outputs a calculation result such as a communication device or a display device. These are connected by a bus 105. Alternatively, the software difference measuring device 100 may be configured by a plurality of independent devices and connected by a dedicated line or a wireless communication line.

さらに、記憶装置102には、所定の記憶領域として、入力装置から入力されるソフトウェア構成を記憶するソフトウェア構成記憶部1021と、CPUで実行されるソフトウェア差分測定プログラムを記憶するプログラム記憶部1022とが含まれる。ここでのソフトウェア構成は、プログラムソースコードとコンパイル設定情報と組合わせであるものとする。   Furthermore, the storage device 102 includes, as predetermined storage areas, a software configuration storage unit 1021 that stores a software configuration input from the input device, and a program storage unit 1022 that stores a software difference measurement program executed by the CPU. included. The software configuration here is assumed to be a combination of program source code and compile setting information.

図2は、ソフトウェア差分測定処理を行なうためのソフトウェア差分測定装置100の機能構成の具体例を示すブロック図である。図2に示される各部は、CPUがプログラム記憶部1022に記憶されるソフトウェア差分測定プログラムを実行することで主にCPUに形成される機能であるが、少なくとも一部が図示されないソフトウェア差分測定装置100の他のハードウェア構成に形成されてもよい。   FIG. 2 is a block diagram illustrating a specific example of a functional configuration of the software difference measurement apparatus 100 for performing the software difference measurement process. Each unit shown in FIG. 2 is a function mainly formed in the CPU by executing the software difference measurement program stored in the program storage unit 1022 by the CPU, but at least a part of the software difference measurement device 100 is not shown. Other hardware configurations may be formed.

図2を参照して、ソフトウェア差分測定装置100の演算部101には、実効コード抽出部1と、測定対象構成固有コード抽出部2と、比較部3とが含まれる。   With reference to FIG. 2, the calculation unit 101 of the software difference measurement device 100 includes an effective code extraction unit 1, a measurement target configuration specific code extraction unit 2, and a comparison unit 3.

実効コード抽出部1は、ソフトウェア構成記憶部1021に記憶されているソフトウェア構成であって、比較の対象とされるソフトウェア構成4,6および測定の対象とされるソフトウェア構成5,7を読出し、各ソフトウェア構成に含まれるプログラムソースコードから、コンパイル作業で無視される部分を削除したコード(このコードを、以降、実効コードと称する)を各々抽出して、測定対象構成固有コード抽出部2に出力する。   The effective code extraction unit 1 is a software configuration stored in the software configuration storage unit 1021 and reads the software configurations 4 and 6 to be compared and the software configurations 5 and 7 to be measured, From the program source code included in the software configuration, each code (this code is hereinafter referred to as an effective code) from which the portion ignored in the compilation operation is deleted is extracted and output to the measurement target configuration specific code extraction unit 2 .

ここで、「実効コード」とはその環境に対応したプログラムを生成するために実際に利用されるプログラムコードを指す。たとえば、プログラムコードが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 code extraction unit 2 deletes a portion that matches a part of the effective code to be compared from the code included in the effective code to be measured input from the effective code extraction unit 1 and performs measurement. An effective code included in the target software configuration and a unique effective code portion (hereinafter also referred to as a unique code) is extracted. The extracted unique code is input to the comparison unit 3.

比較部3では、測定対象構成固有コード抽出部2から入力された2つの固有コードを比較し、その差分を出力する。   The comparison unit 3 compares the two unique codes input from the measurement target configuration unique code extraction unit 2 and outputs the difference.

図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 code input unit 8 that reads source code included in a software configuration, a compile option input unit 9 that reads a compile option included in the software configuration, and a compile option input. Analysis of the compile option read by the section 9 and extraction of the macro definition contents, an option analysis section 10, a macro storage section 11 for storing the macro definition contents, and analysis of the source code read from the code input section 8 A code analysis unit 12 for determining whether the code is an effective code, a counter storage unit 13 for storing numerical information used for the determination of the code analysis unit 12, and preprocessing of the source code input by the code input unit 8 The preprocessing condition determination unit 14 for determining the condition and the code analysis unit 12 determine that the code is an effective code. Configured to include a code output section 15 for outputting the code.

本実施の形態においては、本実施の形態にかかるソフトウェア差分測定装置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 difference measuring apparatus 100 according to the present embodiment is used for developing similar software that operates in two different environments, the X100 environment and the X200 environment. Do. Further, in this assumption, it is assumed that each software has two versions, version 1.0 and the next version, version 2.0. Then, using the software difference measuring device 100, a difference specific to the X200 environment is obtained from the differences between the software version 1.0 and version 2.0 of the X200 environment. In this assumption, the X200 environment is a measurement target environment and is referred to as a “measurement target environment”. The X100 environment is a comparison target for obtaining a difference specific to the measurement target environment, and is referred to as a “comparison target environment”.

この場合において、比較の対象とされるソフトウェア構成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 configurations 4 and 6 to be compared and the software configurations 5 and 7 to be measured respectively represent the following software configurations:
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 program source code 16 and compile setting information 17. In the present embodiment, it is assumed that the program source code 16 is written in C language. The compile setting information 17 is a compiler option passed to the compiler. In this specific example, one software configuration includes one program source code and one compiler option that is compile setting information, but a plurality of these may be included. When a plurality of program source codes exist in one software configuration, the processing described later may be repeatedly executed for each program source code.

また、図5〜図7を参照して、ソフトウェア構成5〜7も、図4に示されたソフトウェア構成4と同様に、1つのソフトウェア構成に、プログラムソースコードと、コンパイル設定情報であるコンパイラオプションとを、各々1つずつ含んだ構成であるものとする。   Referring to FIGS. 5 to 7, software configurations 5 to 7 also include a program source code and a compiler option that is compile setting information in the same software configuration 4 as shown in FIG. 4. Are each included in the configuration.

図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 difference measurement apparatus 100 according to the present embodiment. The processing shown in the flowchart of FIG. 8 is realized by the CPU executing a software difference measurement program stored in the software configuration storage unit 1021 and controlling each unit shown in FIGS. In the following description of the processing, specifically, it is assumed that the software difference measurement processing is performed on the software configurations 4 to 7 shown in FIGS.

図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 configuration storage unit 1021 as an input, and extracts effective code from program source code 16 ( Step S100). When the software configuration 4 is the configuration shown in FIG. 4, the effective code shown in FIG. 9 is extracted and output to the measurement target configuration specific code extraction unit 2 in step S100.

同様に、実効コード抽出部1は、測定の対象とされるソフトウェア構成5をソフトウェア構成記憶部1021より取得して入力とし、ソフトウェア構成5のプログラムソースコードより実効コードを抽出する(ステップS110)。ソフトウェア構成5が図5に示された構成である場合、ステップS110においては、図10に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。   Similarly, the effective code extraction unit 1 acquires the software configuration 5 to be measured from the software configuration storage unit 1021 as an input, and extracts the effective code from the program source code of the software configuration 5 (step S110). If the software configuration 5 is the configuration shown in FIG. 5, the effective code shown in FIG. 10 is extracted and output to the measurement target configuration specific code extraction unit 2 in step S <b> 110.

また同様に、実効コード抽出部1は、比較の対象とされるソフトウェア構成6をソフトウェア構成記憶部1021より取得して入力とし、ソフトウェア構成6のプログラムソースコードより実効コードを抽出する(ステップS120)。ソフトウェア構成6が図6に示された構成である場合、ステップS120においては、図11に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。   Similarly, the effective code extraction unit 1 acquires the software configuration 6 to be compared from the software configuration storage unit 1021 as an input, and extracts the effective code from the program source code of the software configuration 6 (step S120). . When the software configuration 6 is the configuration shown in FIG. 6, the effective code shown in FIG. 11 is extracted and output to the measurement target configuration specific code extraction unit 2 in step S120.

また同様に、実効コード抽出部1は、測定の対象とされるソフトウェア構成7をソフトウェア構成記憶部1021より取得して入力とし、ソフトウェア構成7のプログラムソースコードより実効コードを抽出する(ステップS130)。ソフトウェア構成7が図7に示された構成である場合、ステップS130においては、図12に示される実効コードが抽出されて、測定対象構成固有コード抽出部2に出力される。   Similarly, the effective code extraction unit 1 acquires the software configuration 7 to be measured from the software configuration storage unit 1021 as an input, and extracts the effective code from the program source code of the software configuration 7 (step S130). . If the software configuration 7 has the configuration shown in FIG. 7, the effective code shown in FIG. 12 is extracted and output to the measurement target configuration specific code extraction unit 2 in step S130.

続いて、測定対象構成固有コード抽出部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 code extraction unit 2 extracts the effective code extracted from the software configuration 4 of the X100 environment in version 1.0 which is the comparison target by the effective code extraction unit 1 in step S100, and the effective code extraction in step S110. The code that is specific to the X200 environment in version 1.0 is extracted using the effective code extracted from the software configuration 5 of the X200 environment in version 1.0 to be measured by the unit 1 (step S140). When the effective code extracted in step S110 is the effective code shown in FIG. 9 and the effective code extracted in step S110 is the effective code shown in FIG. 10, in step S140, the measurement target shown in FIG. The effective code (hereinafter referred to as “measurement target unique code”) unique to each is extracted and output to the comparison unit 3.

同様に、測定対象構成固有コード抽出部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 code extraction unit 2 extracts the effective code extracted from the software configuration 6 of the X100 environment in version 2.0, which is the measurement target by the effective code extraction unit 1 in step S120, and the effective code extraction in step S130. The code that is specific to the X200 environment in version 2.0 is extracted using the effective code extracted from the software configuration 7 of the X200 environment in version 2.0, which is the measurement target, by the unit 1 (step S150). When the effective code extracted in step S120 is the effective code shown in FIG. 11 and the effective code extracted in step S130 is the effective code shown in FIG. 12, in step S150, the measurement shown in FIG. A target unique code is extracted and output to the comparison unit 3.

最後に、比較部3は、ステップS140において測定対象構成固有コード抽出部2が抽出したバージョン1.0における測定対象環境固有コードと、ステップS150において測定対象構成固有コード抽出部2が抽出したバージョン2.0における測定対象環境固有コードとを入力にして、これらを比較することにより、バージョン1.0とバージョン2.0との間でも比較対象環境X200における環境固有部分差分を出力する(ステップS160)。ステップS140で抽出された測定対象環境固有コードが図13に示される実効コードであり、ステップS150で抽出された測定対象環境固有コードが図14に示される実効コードである場合、ステップS160においては、図15に示される差分が出力される。   Finally, the comparison unit 3 uses the measurement target environment specific code in version 1.0 extracted by the measurement target configuration specific code extraction unit 2 in step S140 and the version 2 extracted by the measurement target configuration specific code extraction unit 2 in step S150. 0.0, the environment-specific partial difference in the comparison target environment X200 is output even between version 1.0 and version 2.0 by comparing the measurement target environment-specific code at the input and comparing them (step S160). . When the measurement target environment specific code extracted in step S140 is the effective code shown in FIG. 13 and the measurement target environment specific code extracted in step S150 is the effective code shown in FIG. 14, in step S160, The difference shown in FIG. 15 is output.

図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, option analysis unit 10 analyzes the compile option, and if the compile option includes a macro definition option. The macro is defined in the macro storage unit 11 (step S200). Various options are included in the options read from the compile option input unit 9, but in step S200, the option analysis unit 10 analyzes the compile option and affects whether or not a certain part of the source code is an effective code. The part to be detected is detected from the compile options, and the value is stored in the macro storage unit 11. For example, when the compile option is the compile option 17 shown in FIG. 4, a macro definition option such as “-DX100” corresponds to the part that affects the determination of whether a certain part of the source code is effective code. .

ステップ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 macro storage unit 11 defines the extracted macro by storing the macro name and the macro definition character string in pairs in a table format as shown in FIG. . For example, if the macro definition option is “-DMAX_SIZE = 10”, the option analysis unit 10 analyzes that the macro name is “MAX_SIZE” and the macro definition character string is “10”. Are stored in the macro storage unit 11. If the macro definition option is “-DX100” as described above, the option analysis unit 10 analyzes that the macro name is “X100” and the macro definition character string is unknown. In the column, “1” is set as a specific example of a character string representing that fact, and the macro name and macro definition pair is stored in the macro storage unit 11.

マクロ記憶部11にこのように記憶されることで、マクロ名を与えると記憶された各マクロのマクロ名で表を検索して、マクロ名が一致するものがあればその定義内容である文字列を得ることができる。   By storing in the macro storage unit 11 in this way, when a macro name is given, the table is searched with the macro name of each stored macro, and if there is a match with the macro name, the character string that is the definition content thereof Can be obtained.

続いて、コード解析部12がカウンタ記憶部13に記憶されているカウンタ値を0に設定する(ステップS205)。続いて、コード入力部8はソフトウェア構成に含まれるソースコードから1行分のデータを読込む(ステップS210)。ステップS210で、コード入力部8はソースコードの先頭から順にまだ読込まれていない行を読込んでいき、読込まれた1行分のソースコードはコード解析部12に渡される。   Subsequently, the code analysis unit 12 sets the counter value stored in the counter storage unit 13 to 0 (step S205). Subsequently, the code input unit 8 reads one line of data from the source code included in the software configuration (step S210). In step S <b> 210, the code input unit 8 reads lines that have not been read in order from the top of the source code, and the read source code for one line is passed to the code analysis unit 12.

続いて、コード解析部12はカウンタ記憶部13に格納されているカウンタ値を確認する(ステップS220)。カウンタ値が正の値である場合は(ステップS220でYES)、後述のステップS340以降の処理を行なう。そうでない場合は(ステップS220でNO)、ステップS230以降の処理を行なう。処理が開始されて第1行目のソースコードが解析されている際には、上記ステップS205でカウンタ値が0であるため、ステップS230以降の処理に移行する。   Subsequently, the code analysis unit 12 checks the counter value stored in the counter storage unit 13 (step S220). If the counter value is a positive value (YES in step S220), the processing after step S340 described later is performed. If not (NO in step S220), the processes after step S230 are performed. When the process is started and the source code on the first line is analyzed, the counter value is 0 in step S205, and the process proceeds to step S230 and subsequent steps.

ステップS230で、コード解析部12はコード入力部8によって読込まれた行のソースコードが#if文または#ifdef文であるかどうかを確認する。#ifdef文でも#if文でもない場合(ステップS230でNO)、後述のステップS270以降の処理を行なう。#ifdef文または#if文のいずれかであれば(ステップS230でYES)、ステップS240以降の処理を行なう。   In step S230, the code analysis unit 12 checks whether the source code of the line read by the code input unit 8 is a #if statement or a #ifdef statement. If it is neither an #ifdef statement nor a #if statement (NO in step S230), the processing after step S270 described later is performed. If it is either an #ifdef statement or a #if statement (YES in step S230), the processing after step S240 is performed.

ステップS240で、コード解析部12は、前処理条件判定部14を用いて#ifdef文または#if文に記述されている条件の判定を行なう。上記行のソースコードが#ifdef文であれば、ステップS240で前処理条件判定部14は「#ifdef」に続くマクロ名がマクロ記憶部11に記憶されているかどうかを検索し、検索されたマクロが存在すれば、条件が成立したものと判定する。   In step S240, the code analysis unit 12 uses the preprocessing condition determination unit 14 to determine the conditions described in the #ifdef statement or #if statement. If the source code in the above line is an #ifdef statement, in step S240, the preprocessing condition determination unit 14 searches whether or not the macro name following “#ifdef” is stored in the macro storage unit 11, and the searched macro Is present, it is determined that the condition is satisfied.

また、上記行のソースコードが#if文であれば、前処理条件判定部14は「#if」に続く条件式が満たされるかどうかを判定する。ステップS240で前処理条件判定部14は条件式をトークンに分割し、マクロ記憶部11にトークンと同じ文字列であるマクロ名が存在するかどうかを確認する。存在する場合はその一致するトークンの文字列を一致するマクロの定義内容の文字列に置換した上で、条件式の解釈を行ない、条件式が満たされるかどうかの確認を行なう。   If the source code in the above line is an #if statement, the preprocessing condition determination unit 14 determines whether the conditional expression following “#if” is satisfied. In step S240, the preprocessing condition determination unit 14 divides the conditional expression into tokens, and checks whether a macro name that is the same character string as the token exists in the macro storage unit 11. If it exists, replace the character string of the matching token with the character string of the matching macro definition, interpret the conditional expression, and check whether the conditional expression is satisfied.

そして、コード解析部12は前処理条件判定部14による条件成立の判定を確認する(ステップS250)。条件が成立していれば(ステップS250でYES)、コード解析部12はカウンタ記憶部13に記憶されているカウンタ値を1加算し(ステップS260)、コード出力部15から測定対象構成固有コード抽出部2に空行(何も記述されていない行)を出力させる(ステップS320)。条件が成立していない場合(ステップS250でNO)、コード解析部12は上記ステップS260の処理をスキップして、つまりカウンタ値を加算せずにコード出力部15から測定対象構成固有コード抽出部2に空行を出力させる(ステップS320)。   Then, the code analysis unit 12 confirms the determination of the condition establishment by the preprocessing condition determination unit 14 (step S250). If the condition is satisfied (YES in step S250), the code analysis unit 12 adds 1 to the counter value stored in the counter storage unit 13 (step S260), and extracts the measurement target configuration specific code from the code output unit 15 The unit 2 is caused to output a blank line (a line in which nothing is described) (step S320). If the condition is not satisfied (NO in step S250), the code analysis unit 12 skips the process of step S260, that is, does not add the counter value, and the measurement target configuration unique code extraction unit 2 from the code output unit 15 does not add. To output a blank line (step S320).

コード入力部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 code input unit 8 is neither an #ifdef statement nor a #if statement (NO in step S230), the code analysis unit 12 further processes the line read by the code input unit 8. It is confirmed whether the source code is an #else statement (step S270). If it is an #else statement (YES in step S270), the code analysis unit 12 adds 1 to the counter value stored in the counter storage unit 13 (step S280), and the measurement target configuration unique code extraction unit from the code output unit 15 2 is made to output a blank line (step S320).

コード入力部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 code input unit 8 is not any of the #ifdef statement, #if statement, and #else statement (NO in step S270), the code analysis unit 12 further includes the code input unit. It is checked whether the source code of the line read by 8 is a #define statement (step S300). If the source code of the line read by the code input unit 8 is a #define statement that is a macro-defined code (YES in step S300), the code analysis unit 12 analyzes the #define statement and obtains the result of the analysis. The contents of the macro definition are stored in the macro storage unit 11 (step S310), and a blank line is output from the code output unit 15 (step S320). If not, that is, if the source code of the line read by the code input unit 8 is not any of the #ifdef statement, #if statement, #else statement, and #define statement (NO in step S300), code analysis The unit 12 outputs the line input from the code input unit 8 to the measurement target configuration specific code extraction unit 2 using the code output unit 15 (step S330).

上記ステップ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 code analysis unit 12 uses the #ifdef or #if statement as the source code of the line read by the code input unit 8. It is confirmed whether or not there is (step S340). If it is either an #ifdef statement or a #if statement (YES in step S340), the code analysis unit 12 adds 1 to the counter value stored in the counter storage unit 13 (step S350), and the code output unit 15 The measurement target configuration unique code extraction unit 2 is caused to output a blank line (step S320).

コード入力部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 code input unit 8 is neither an #ifdef statement nor a #if statement (NO in step S340), the code analysis unit 12 further performs the source code of the line read by the code input unit 8 Is a #endif statement (step S360). If it is an #endif statement (YES in step S360), the code analysis unit 12 subtracts 1 from the counter value stored in the counter storage unit 13 (step S370), and the measurement target configuration unique code extraction unit from the code output unit 15 2 is made to output a blank line (step S320).

コード入力部8が読込んだ行のソースコードが#ifdef文、#if文、および#endif文のいずれでもなかった場合は(ステップS360でNO)、コード解析部12は、さらに、コード入力部8が読込んだ行のソースコードが#else文であり、かつカウンタ記憶部13に格納されているカウンタ値が1であるかどうかを確認する(ステップS380)。   When the source code of the line read by the code input unit 8 is not any of the #ifdef statement, #if statement, and #endif statement (NO in step S360), the code analysis unit 12 further includes the code input unit. It is checked whether the source code of the line read 8 is an #else statement and the counter value stored in the counter storage unit 13 is 1 (step S380).

コード入力部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 code input unit 8 is an #else statement and the counter value stored in the counter storage unit 13 is 1 (YES in step S380), the code analysis unit 12 stores the counter The counter value stored in the unit 13 is decremented by 1 (step S390), and a blank line is output from the code output unit 15 to the measurement target configuration specific code extraction unit 2 (step S320). When the source code of the line read by the code input unit 8 is not any of the #ifdef statement, #if statement, endif statement, and #else statement, or the counter value stored in the counter storage unit 13 is 1. If not (NO in step S380), the processing in step S390 is skipped, that is, the blank line is output from the code output unit 15 to the measurement target configuration specific code extraction unit 2 without subtracting the counter value ( Step S320).

以上のステップS210〜ステップS390の処理が実行されることで、コード解析部12はコード入力部8から読込まれた1行のソースコードを処理し、その行のうちのマクロを定義している部分、つまり実効コードである部分をコード出力部15より測定対象構成固有コード抽出部2に出力する(ステップS310)。また、実効コードが含まれていない場合には、その行についてはコード出力部15より測定対象構成固有コード抽出部2に空行が出力される(ステップS320)。   The code analysis unit 12 processes one line of source code read from the code input unit 8 and defines a macro in the line by executing the processes in steps S210 to S390 described above. That is, the portion that is the effective code is output from the code output unit 15 to the measurement target configuration specific code extraction unit 2 (step S310). If no effective code is included, a blank line is output from the code output unit 15 to the measurement target configuration specific code extraction unit 2 for that line (step S320).

ステップS210〜ステップS390の処理が終了すると、コード解析部12はコード入力部8がすべての行を読込んだかどうかを確認する(ステップS400)。すべての行を読込んでいれば(ステップS400でYES)、実効コード抽出の処理は完了する。この場合、これまでの処理でコード出力部15が測定対象構成固有コード抽出部2に出力したものが実効コードである。読込んでいない行が残っている場合(ステップS400でNO)、すべての行についての処理が完了するまでステップS210からの処理を繰返し実行する。   When the processing of steps S210 to S390 is completed, the code analysis unit 12 confirms whether the code input unit 8 has read all lines (step S400). If all lines have been read (YES in step S400), the effective code extraction process is completed. In this case, what is output by the code output unit 15 to the measurement target configuration specific code extraction unit 2 in the process so far is an effective code. If a line that has not been read remains (NO in step S400), the processes from step S210 are repeatedly executed until the processes for all the lines are completed.

具体的に、図4に示されたソフトウェア構成4のプログラムソースコード16から実効コードを抽出する場合、第1行「void GetImageExt (ImgType type)」から第6行「{」までについては、カウンタ値が0であるため上記ステップS220〜S330が実行されて、図9に示されるように、実効コードとしてこれらの行がそのまま出力される。また、ここまでの処理では、カウンタ値が0のままである。   Specifically, when the effective code is extracted from the program source code 16 of the software configuration 4 shown in FIG. 4, the counter values for the first line “void GetImageExt (ImgType type)” to the sixth line “{” are shown. Is 0, the above steps S220 to S330 are executed, and as shown in FIG. 9, these lines are output as they are as the effective code. In the processing so far, the counter value remains 0.

次に、第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 code analysis unit 12 in step S230, and further determined to be already defined in step S200 in step S240. Therefore, the condition is satisfied in step S250, and the counter value is kept at 0. Further, as shown in FIG. 9, the seventh line is output as a blank line as an effective code in step S320.

次に、第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 code analysis unit 12 in step S290, and therefore, in step S320 as shown in FIG. As the effective code, the eleventh line is output as a blank line. In the processing so far, the counter value remains 0.

次に、第12行「#ifdef X200」については、上記ステップS230でコード解析部12によって #ifdef文であると判定されるが、ステップS240で、上記ステップS200でマクロ定義されたものとことなることが判定されるため、ステップS250で条件不成立とされてステップS260でカウンタ値が1とされる。また、図9に示されるように、上記ステップS320で実効コードとして第12行は空行で出力される。   Next, although the line 12 “#ifdef X200” is determined to be an #ifdef statement by the code analysis unit 12 in step S230, the macro is defined in step S200 in step S240. Therefore, the condition is not satisfied in step S250, and the counter value is set to 1 in step S260. Also, as shown in FIG. 9, the twelfth line is output as a blank line as an effective code in step S320.

次に、第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 code analysis unit 12 determines that it is an #endif statement in step S360, so that the counter value returns to 0 in step S370. Also, as shown in FIG. 9, the 16th line is output as a blank line as an effective code in step S320.

最後に、第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. Lines 17 to 22 are output as they are.

以上の処理によって、図4のソフトウェア構成4のプログラムソースコード16から図9の実効コードが抽出される。また、他のソフトウェア構成5〜7についても同様にして図10〜12の実効コードが抽出される。   9 is extracted from the program source code 16 of the software configuration 4 of FIG. Similarly, the effective codes shown in FIGS. 10 to 12 are extracted for the other software configurations 5 to 7.

図18は、上記ステップS140,S150での、測定対象構成固有コード抽出部2による固有コードの抽出処理を示すフローチャートである。   FIG. 18 is a flowchart showing the unique code extraction process performed by the measurement target configuration unique code extraction unit 2 in steps S140 and S150.

図18を参照して、始めに、測定対象構成固有コード抽出部2は、測定対象環境の実効コードから1行読込む(ステップS500)。ステップS500で、測定対象構成固有コード抽出部2は、測定対象環境の実効コードの記述順にまだ読込まれていない1行を読込む。   Referring to FIG. 18, first, the measurement target configuration specific code extraction unit 2 reads one line from the effective code of the measurement target environment (step S500). In step S500, the measurement target configuration unique code extraction unit 2 reads one line that has not yet been read in the order of description of the effective code of the measurement target environment.

続いて、測定対象構成固有コード抽出部2は、ステップS500で読込まれた行が空行でないことを確認する(ステップS510)。ステップS500で読込まれた行が空行である場合(ステップS510でNO)、測定対象構成固有コード抽出部2は比較部3に空行を出力する(ステップS550)。   Subsequently, the measurement target configuration unique code extraction unit 2 confirms that the line read in Step S500 is not a blank line (Step S510). When the line read in step S500 is a blank line (NO in step S510), the measurement target configuration specific code extraction unit 2 outputs a blank line to the comparison unit 3 (step S550).

ステップ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 code extraction unit 2 reads one line from the effective code of the comparison target environment (step S520). In step S520, the measurement target configuration unique code extraction unit 2 reads one line that has not yet been read in the description order of the effective code of the comparison target environment.

次に、測定対象構成固有コード抽出部2は、ステップS520で読込まれた行が空行であることを確認する(ステップS530)。ステップS500で読込まれた測定対象環境の実効コードの行が空行でなく、かつステップS520で読込まれた比較対象環境の実効コードの行が空行である場合(ステップS530でYES)、測定対象構成固有コード抽出部2は、ステップS500で読込まれた測定対象環境の実効コードの行を比較部3に出力する(ステップS540)。   Next, the measurement target configuration unique code extraction unit 2 confirms that the line read in Step S520 is a blank line (Step S530). When the effective code line of the measurement target environment read in step S500 is not a blank line and the effective code line of the comparison target environment read in step S520 is a blank line (YES in step S530), the measurement target The configuration specific code extraction unit 2 outputs the line of the effective code of the measurement target environment read in step S500 to the comparison unit 3 (step S540).

ステップ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 code extraction unit 2 sends a blank line to the comparison unit 3. Is output (step S550).

続いて、測定対象構成固有コード抽出部2は、測定対象環境の実効コードをすべて読込んだかどうかを確認する(ステップS560)。すべての行を読込んでいれば(ステップS560でYES)、処理は完了する。読込んでいない行が残っている場合(ステップS560でNO)、すべての行についての処理が完了するまでステップS5000からの処理を繰返し実行する。   Subsequently, the measurement target configuration unique code extraction unit 2 confirms whether or not all effective codes of the measurement target environment have been read (step S560). If all lines have been read (YES in step S560), the process is completed. If there are still unread lines (NO in step S560), the processes from step S5000 are repeatedly executed until the processes for all the lines are completed.

以上の処理によって、測定対象構成固有コード抽出部2は、固有コードでない部分を空行として、固有コードとなる部分は入力されたソースコードそのままの内容として、比較部3に出力する。   Through the above processing, the measurement target configuration unique code extraction unit 2 outputs the portion that is not the unique code as a blank line and the portion that becomes the unique code to the comparison unit 3 as the content of the input source code as it is.

具体的に、図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 code extraction unit 2 in step S510. As shown in FIG. 13, the fourth, seventh to thirteenth lines, the seventeenth line, and the twenty-second line are output as blank lines as unique codes in step S550 as shown in FIG.

上記ステップ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 code extraction unit 2 determines that these lines are not blank lines and the corresponding lines of the effective code of the comparison environment code in FIG. 9 are not blank lines. As shown in FIG. 13, the first to third lines, the fifth to sixth lines, the 18th to 21st lines, and the 23rd to 24th lines are empty as unique codes in step S550. Output in line.

上記ステップ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 code extraction unit 2 in steps S510 and S530. It is determined that the corresponding line of the effective code of the comparison environment code in FIG. 9 is not a line, and the line read in step S500 as the unique code is output as it is in step S500.

以上の処理によって、図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 comparison unit 3 compares the unique code shown in FIG. 13 with the unique code shown in FIG. 14, and the difference is changed from the 13th line “case IMAGE_SVG:” of the unique code in FIG. 15 lines “break;” are extracted, and the difference shown in FIG. 15 is output.

図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 software configuration 5 of the version 200 of the X200 environment that is the measurement target environment (FIG. 10). This is an effective code unique to the effective code (FIG. 9), and is an effective code unique in the X200 environment. Further, the measurement target environment specific code in FIG. 14 is the software of version 2.0 of the X100 environment that is the comparison target of the effective code (FIG. 12) of the software configuration 7 of version 2.0 of the X200 environment that is the measurement target environment. This is an effective code unique to configuration 6 (FIG. 11), and is an effective code unique in the X200 environment. Therefore, the difference shown in FIG. 15 as these differences is a difference specific to the X200 environment between version 1.0 and version 2.0.

本実施の形態にかかるソフトウェア差分測定装置100においてこのように差分が得られることで、並行して開発しているソフトウェアの中の、新規に作成されたプログラムソースコードが抽出され、行数を正確に集計することができる。   By obtaining the difference in this way in the software difference measuring apparatus 100 according to the present embodiment, a newly created program source code is extracted from the software being developed in parallel, and the number of lines is accurately determined. Can be tabulated.

さらに、上述のソフトウェア差分測定処理をコンピュータに実行させるためのプログラムを提供することもできる。このようなプログラムは、コンピュータに付属するフレキシブルディスク、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.

ソフトウェア差分測定装置100のハードウェア構成の具体例を示すブロック図である。3 is a block diagram illustrating a specific example of a hardware configuration of a software difference measurement apparatus 100. FIG. ソフトウェア差分測定処理を行なうためのソフトウェア差分測定装置100の機能構成の具体例を示すブロック図である。It is a block diagram which shows the specific example of a function structure of the software difference measurement apparatus 100 for performing a software difference measurement process. 実効コード抽出部1の詳細な構成の具体例を示すブロック図である。3 is a block diagram illustrating a specific example of a detailed configuration of an effective code extraction unit 1. FIG. ソフトウェア構成4の具体例を図である。FIG. 10 is a diagram showing a specific example of software configuration 4. ソフトウェア構成5の具体例を図である。It is a figure which shows the specific example of the software structure. ソフトウェア構成6の具体例を図である。It is a figure which shows the specific example of the software structure. ソフトウェア構成7の具体例を図である。FIG. 10 is a diagram illustrating a specific example of software configuration 7; ソフトウェア差分測定処理の具体例を示すフローチャートである。It is a flowchart which shows the specific example of a software difference measurement process. ソフトウェア構成4から抽出される実効コードの具体例を図である。It is a figure which shows the specific example of the effective code extracted from the software structure. ソフトウェア構成5から抽出される実効コードの具体例を図である。It is a figure which shows the specific example of the effective code extracted from the software structure. ソフトウェア構成6から抽出される実効コードの具体例を図である。It is a figure which shows the specific example of the effective code extracted from the software structure. ソフトウェア構成7から抽出される実効コードの具体例を図である。It is a figure which shows the specific example of the effective code extracted from the software structure. ソフトウェア構成4から抽出される実効コードとソフトウェア構成5から抽出される実効コードとから得られる測定対象固有コードの具体例を図である。It is a figure which shows the specific example of the measuring object intrinsic | native code obtained from the effective code extracted from the software structure 4, and the effective code extracted from the software structure 5. ソフトウェア構成6から抽出される実効コードとソフトウェア構成7から抽出される実効コードとから得られる測定対象固有コードの具体例を図である。It is a figure which shows the specific example of the measurement object specific code obtained from the effective code extracted from the software configuration 6 and the effective code extracted from the software configuration. ソフトウェア構成4から抽出される実効コードとソフトウェア構成5から抽出される実効コードとから得られる測定対象固有コードと、ソフトウェア構成6から抽出される実効コードとソフトウェア構成7から抽出される実効コードとから得られる測定対象固有コードとの差分の具体例を示す図である。The measurement object specific code obtained from the effective code extracted from the software configuration 4 and the effective code extracted from the software configuration 5, the effective code extracted from the software configuration 6, and the effective code extracted from the software configuration 7 It is a figure which shows the specific example of the difference with the measurement object specific code | cord | chord obtained. ステップS100〜S130での実効コード抽出処理を示すフローチャートである。It is a flowchart which shows the effective code extraction process in step S100-S130. マクロ定義の具体例を示す図である。It is a figure which shows the specific example of a macro definition. ステップS140,S150での固有コードの抽出処理を示すフローチャートである。It is a flowchart which shows the extraction process of the specific code | cord | chord in step S140, S150. スクリーン上のデスクトップ領域幅を取得する関数の具体例を示す図である。It is a figure which shows the specific example of the function which acquires the desktop area | region width on a screen. プログラムソースコードの具体例を示す図である。It is a figure which shows the specific example of a program source code. プログラムソースコードの具体例を示す図である。It is a figure which shows the specific example of a program source code.

符号の説明Explanation of symbols

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の実効コードに含まれるコードのうち、前記第2の実効コードのある一部と一致する部分を削除したコード生成することにより、前記第1の固有コードを抽出する、請求項1に記載のソフトウェア差分測定装置。   The unique code extraction means generates the first unique code by generating a code by deleting a part of the code included in the first effective code that matches a certain part of the second effective code. The software difference measuring device according to claim 1, wherein the software difference measuring device is extracted. 前記ソフトウェア構成はプログラムソースコードとコンパイル設定情報とを対にして含み、
前記実効コード抽出手段は、
前記ソフトウェア構成より前記プログラムソースコードを取得するコード入力手段と、
前記ソフトウェア構成より前記コンパイル設定情報を取得するコンパイル設定情報入力手段と、
前記コンパイル設定情報を解析してマクロ定義を抽出するコンパイル設定情報解析手段と、
前記マクロを記憶するマクロ記憶手段と、
前記プログラムソースコードを解析して実効コードであるか否かを判定するコード解析手段と、
前記コード解析手段において抽出された前処理指令について、前処理条件を判定する前処理条件判定手段とを含む、請求項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.
前記前処理条件判定手段は、前記コード解析手段において抽出された前処理指令に前記マクロが含まれているときに、前記前処理条件が成立したものと判定する、請求項3に記載のソフトウェア差分測定装置。   4. The software difference according to claim 3, wherein the preprocessing condition determination unit determines that the preprocessing condition is satisfied when the macro is included in the preprocessing instruction extracted by the code analysis unit. 5. measuring device. 前記第1のソフトウェア構成は測定対象の環境における第1ソフトウェアの構成であり、
前記第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ソフトウェアのプログラムソースコードおよび第3ソフトウェアのプログラムソースコードの、前記測定対象の環境に固有の差分を測定する処理をコンピュータに実行させるプログラムであって、
前記第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.
請求項6に記載のソフトウェア差分測定プログラムを記録した、コンピュータ読取可能な記録媒体。   A computer-readable recording medium on which the software difference measurement program according to claim 6 is recorded.
JP2006307872A 2006-11-14 2006-11-14 Software differential measurement device, software differential measurement program, and recording medium recording it Pending JP2008123343A (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102379072A (en) * 2009-03-31 2012-03-14 日本特殊陶业株式会社 Method of manufacturing sparkplugs

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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