JP2006277127A - Method for comparing correction program - Google Patents
Method for comparing correction program Download PDFInfo
- Publication number
- JP2006277127A JP2006277127A JP2005092888A JP2005092888A JP2006277127A JP 2006277127 A JP2006277127 A JP 2006277127A JP 2005092888 A JP2005092888 A JP 2005092888A JP 2005092888 A JP2005092888 A JP 2005092888A JP 2006277127 A JP2006277127 A JP 2006277127A
- Authority
- JP
- Japan
- Prior art keywords
- information
- file
- correction
- program
- comparison
- 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
- 238000000034 method Methods 0.000 title claims description 12
- 238000012937 correction Methods 0.000 claims abstract description 68
- 230000004048 modification Effects 0.000 claims description 47
- 238000012986 modification Methods 0.000 claims description 45
- 230000008859 change Effects 0.000 claims description 4
- 230000008676 import Effects 0.000 claims description 4
- 238000013461 design Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 42
- 239000010410 layer Substances 0.000 description 31
- 238000012217 deletion Methods 0.000 description 9
- 230000037430 deletion Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 5
- 230000007704 transition Effects 0.000 description 4
- 239000000284 extract Substances 0.000 description 2
- 238000012800 visualization Methods 0.000 description 2
- 241001475178 Dira Species 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000012508 change request Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000002346 layers by function Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- LXMSZDCAJNLERA-ZHYRCANASA-N spironolactone Chemical compound C([C@@H]1[C@]2(C)CC[C@@H]3[C@@]4(C)CCC(=O)C=C4C[C@H]([C@@H]13)SC(=O)C)C[C@@]21CCC(=O)O1 LXMSZDCAJNLERA-ZHYRCANASA-N 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
本発明は、プログラム開発の分野において、修正前後のプログラム間の比較を行うための手段と比較結果を可視化する手段、およびそのシステムに関する。 The present invention relates to a means for comparing programs before and after correction, a means for visualizing a comparison result, and a system thereof in the field of program development.
プログラム開発においてプログラム上の修正個所の把握、例えば機能変更に対するプログラム上の修正部分を知ることは、変更要求に伴うプログラム上の影響範囲の理解を容易にし、同様の修正が発生した場合に参考にできることによって、安全かつ効率的な作業が可能になるという点で有意義である。このため、従来ではプログラム上の修正前後での修正個所を知るためにいくつかの比較手段を利用してきた。 Knowing where to modify a program in program development, for example, knowing what part of a program is modified for a function change, makes it easier to understand the scope of the program's impact associated with a change request, and can be used as a reference when similar modifications occur. This is significant in that it enables safe and efficient work. For this reason, conventionally, several comparison means have been used in order to know the correction location before and after correction on the program.
例えば、ツールを用いて修正前後のプログラムのソースコードファイルの行単位での比較を行い、コード上の修正情報を得ることが可能である。UNIX(登録商標)系OSのコマンドである「diffコマンド」は、テキストファイル同士の行単位の比較を行い、行ごとの比較結果を報告する機能を有し、当該比較を行う際最もよく利用されるツールの1つである。しかし、例えばプログラム全体の修正状況の概観を開発者が望む場合において、ソースコードファイルの行単位の比較結果自体は開発者にとって価値が低く、有意義な論理的なまとまり、例えば機能要件レベルの情報に変換するには、開発者自身の、多くは手作業を中心とした労力が改めて必要となり、非常に非効率となっている。 For example, it is possible to obtain correction information on the code by comparing the source code files of the program before and after the correction using a tool in units of lines. The “diff command”, which is a command of the UNIX (registered trademark) OS, has a function of comparing line units of text files and reporting a comparison result for each line, and is most often used for the comparison. It is one of the tools. However, for example, when the developer wants an overview of the modification status of the entire program, the line-by-line comparison results of the source code file itself are of low value to the developer and are meaningfully logically organized, for example, information on the functional requirement level. To convert, many of the developers themselves, mainly manual labor, are required, which is very inefficient.
また、特開2001−256043号公報においてはソースコードファイルを関数単位に分割し、関数単位での比較を行うことで差分を抽出するシステムを提案している。該システムにより前記手作業による論理的なまとまりへの変換労力を軽減し、信頼性向上を図ることが可能である。しかし、開発者にとって有意義な、論理的なまとまりがつねに関数に対応しているわけではない。例えば、関数の数が数千個以上におよぶプログラムは数多く存在し、当該ケースにおいては、開発者は関数よりも大きなまとまり、例えば、ファイル群で構成する設計上のモジュールと呼ばれる論理的なまとまりで捉える必要性を感じるであろうことは容易に想像できる。該事例における規模のプログラムを有意義なまとまりに変換する作業は、前記行単位の比較結果における手作業と同様の非効率となる。 Japanese Patent Laid-Open No. 2001-256043 proposes a system that extracts a difference by dividing a source code file into units of functions and performing comparisons in units of functions. With this system, it is possible to reduce the labor for conversion into a logical unit by the manual work and to improve the reliability. However, logical groups that are meaningful to developers do not always correspond to functions. For example, there are many programs that have thousands of functions, and in this case, developers are larger than functions, for example, logical groups called design modules composed of files. You can easily imagine that you will feel the need to capture. The work of converting the program of the scale in the case into a meaningful group becomes inefficient as the manual work in the comparison result of the line unit.
また、多くのコンパイル系プログラミング言語においては、条件付コンパイルとよばれる機能が提供されており、該機能を用いることによってソースコード中の特定ブロックの有効ないし無効を調整することが可能である。当該プログラミング言語による開発下においては、開発者は、修正前後の比較結果を任意のまとまり、例えば関数やモジュールとして見るだけでなく、該比較情報を条件付コンパイルで指定された条件毎に絞り込む形で知る必要があるが、該要件を満たす従来のシステムはない。 Also, many compilation programming languages provide a function called conditional compilation, and it is possible to adjust the validity or invalidity of a specific block in the source code by using this function. Under the development by the programming language, the developer can not only view the comparison results before and after correction, for example, as a function or module, but also narrow down the comparison information for each condition specified by conditional compilation. There is no conventional system that needs to be known but meets this requirement.
また、修正前後でのプログラムの比較を行う場合、プログラムファイルのソースコードでの比較以外での比較処理が望まれる場合があるが、該要件を他の比較処理情報と統合し、関連付けて出力可能なシステムは従来の方法にはない。例えば、多くのプログラミング言語では当該ソースファイル中の関数や変数などの定義を外部ファイルに行い、当該ソースファイル中に該外部ファイル名を、例えば、C言語ではインクルード文と呼ばれる外部ファイル取り込み指定(以後インクルード行と呼ぶ)とともに記述することができる。インクルード行で指定された外部ファイルに修正があった場合、該外部ファイルを取り込む当該ソースファイルにおいて、プログラムの修正前後でソースコードレベルでの差がない場合であっても、比較結果として定義ファイルの修正による影響の可能性を示唆する情報は開発者にとって重要であるが、当該情報を提供するシステムは従来の方法にはない。 In addition, when comparing programs before and after modification, a comparison process other than the comparison in the source code of the program file may be desired. However, the requirements can be integrated with other comparison process information and output in association with each other. Such a system is not in the conventional method. For example, in many programming languages, functions and variables in the source file are defined in an external file, and the external file name is specified in the source file. For example, an external file import specification called an include statement in the C language (hereinafter referred to as an include statement) It can be described together with an include line). If the external file specified in the include line has been modified, the source file for importing the external file will have the definition file as a comparison result even if there is no difference at the source code level before and after the program modification. Information that suggests the potential impact of a modification is important to the developer, but systems that provide that information are not in the traditional way.
したがって、従来においては開発者にとって有意義な論理的なまとまりでの比較情報を得るために開発者は、何種類もの手間をかける必要があり、効率的な作業が望めなかった。 Therefore, in the past, in order to obtain comparison information in a logical unit that is meaningful to the developer, the developer has to spend many kinds of work, and an efficient operation cannot be expected.
本発明は、このような事情を鑑みてなされたもので、その目的はプログラムの修正個所の効率的な把握が可能な、修正前後のプログラム間の比較を行うための手段と比較結果の視覚的出力手段、およびそのシステムを提供することにある。 The present invention has been made in view of such circumstances, and its purpose is to enable efficient grasping of the correction location of the program, and means for comparing between the programs before and after the correction and a visual comparison result. It is to provide an output means and a system thereof.
本発明では比較対照となるプログラムを図1に示す設計上の論理的な階層構造による構成と定義し、該構造で比較情報を管理する。また、修正前後のプログラムの比較は、該階層の同位層同士の比較を基本とする。また、各階層の比較の際のパラメータを図2に示すプログラム上の物理的な要素により定義する。修正前後のプログラムファイルから該パラメータの情報を得ることを示す。 In the present invention, a program to be compared is defined as a configuration having a logical hierarchical structure in design shown in FIG. 1, and comparison information is managed by the structure. In addition, the comparison of the programs before and after the modification is based on the comparison between the same layers of the hierarchy. Also, parameters for comparison of each hierarchy are defined by physical elements on the program shown in FIG. The parameter information is obtained from the program file before and after the correction.
前記目的を達成するため、本発明は、修正前後のプログラムファイルを前記階層単位で比較するステップと、前記階層単位の比較で得られた差分情報を該プログラムの修正情報として、視覚的に出力するステップとを有することを特徴とする。 In order to achieve the above object, the present invention visually compares the program file before and after the modification in the unit of hierarchy and the difference information obtained by the comparison in the unit of hierarchy as the modification information of the program. And a step.
本発明によれば、人手によるプログラムファイルのソースコード解析を行うことなく、開発者が望む設計上の論理的なまとまりとしてプログラムの修正情報を得ることができる。 According to the present invention, it is possible to obtain program correction information as a logical unit of design desired by a developer without manually analyzing a source code of a program file.
さらに、本発明によれば、該修正情報を開発者の望むプログラムの論理構造のレベルに合わせて、多段の階層別に得ることができる。 Furthermore, according to the present invention, the correction information can be obtained for each level of the hierarchy according to the level of the logical structure of the program desired by the developer.
さらに、本発明によれば、プログラムファイルのソースコード上の比較のみならずインクルード行で指定されたファイルの修正を該ソースファイルの修正情報として得ることができる。 Furthermore, according to the present invention, not only the comparison of the program file on the source code but also the modification of the file specified in the include line can be obtained as the modification information of the source file.
さらに、本発明によれば前記修正情報を、階層別修正情報として視覚化し、また条件コンパイルごとに識別視覚化し、これにより開発者の望む論理レベルで考察が可能となり、プログラム上の修正個所の把握の効率化と深化を図ることができる。 Further, according to the present invention, the correction information is visualized as hierarchy-specific correction information, and is identified and visualized for each conditional compilation, so that it can be considered at a logic level desired by the developer, and the correction location on the program can be grasped. Can be made more efficient and deeper.
以下、本発明の実施の形態を説明する。図3に、本発明の一実施形態であるプログラムの修正情報出力システムの構成を示す。 Embodiments of the present invention will be described below. FIG. 3 shows the configuration of a program correction information output system according to an embodiment of the present invention.
ここで、3−1、3−2はそれぞれ修正前プログラムのソースファイル群、修正後プログラムのソースファイル群、3−3は修正前後のプログラムのソースファイルを比較し、比較結果を3−4の修正内容保持部に登録する比較処理部、3−5は修正内容保持部に登録された修正情報を整形し、比較結果を表示する修正内容表示部である。 Here, 3-1 and 3-2 are a source file group of a program before modification, a source file group of a program after modification, 3-3 is a comparison of source files of programs before and after modification, and the comparison result is 3-4. A comparison processing unit 3-5 registered in the correction content holding unit 3-5 is a correction content display unit that shapes the correction information registered in the correction content holding unit and displays the comparison result.
この実施形態のプログラムの修正情報出力システムは、コンピュータを構成する処理装置、記憶装置、入力装置、出力装置、記憶媒体読み込み装置などのハードウェアにより構成される。処理装置は、少なくとも中央演算処理装置(CPU)、中央演算処理装置の作業領域を提供するRAM、種々のプログラムやデータが格納されたROM、および周辺機器とのインターフェース部を有する。記憶装置は、読み書き可能な記憶装置、例えばフロッピー(登録商標)ディスクドライブ、ハードディスクドライブ、光磁気ディスクドライブ、メモリカード、スマートメディア(登録商標)等である。入力装置は、たとえばマウス、キーボード、音声入力装置、画像入力装置等である。出力装置は、たとえばCRT、LCD等の表示装置である。 The program correction information output system according to this embodiment includes hardware such as a processing device, a storage device, an input device, an output device, and a storage medium reading device that constitute a computer. The processing device includes at least a central processing unit (CPU), a RAM that provides a work area for the central processing unit, a ROM that stores various programs and data, and an interface unit with peripheral devices. The storage device is a readable / writable storage device such as a floppy (registered trademark) disk drive, hard disk drive, magneto-optical disk drive, memory card, smart media (registered trademark), or the like. The input device is, for example, a mouse, a keyboard, a voice input device, an image input device, or the like. The output device is a display device such as a CRT or LCD.
次に、該プログラム修正情報出力システムの動作を説明する。なお、修正前後のプログラムのソースファイルは、記憶装置においてそれぞれ同じファイルシステム上の別の親ディレクトリ以下にまとめて配置されているものとする。 Next, the operation of the program correction information output system will be described. It is assumed that the source files of the program before and after the correction are collectively arranged in the storage device under different parent directories on the same file system.
まず、図4の例で示す比較処理の設定条件を指定する。該設定条件は修正前後のプログラムのソースファイルが配置されているディレクトリパス4−1、モジュール構成4−2、コメントパターン4−3、関数名パターン4−4、インクルード行パターン4−5、条件コンパイル行パターン4−6を含む。モジュール構成は、ファイルパス名の文字列パターンとモジュール名との組合せを指定する。モジュール名は開発者が任意に指定することができる。コメントパターン、関数名パターン、インクルード行パターン、条件コンパイル行パターンはプログラム言語の仕様にあわせ、それぞれのソースコード上の文字列パターンを指定する。 First, the setting conditions for the comparison process shown in the example of FIG. 4 are specified. The setting conditions are the directory path 4-1 where the source files of the program before and after correction are arranged, the module configuration 4-2, the comment pattern 4-3, the function name pattern 4-4, the include line pattern 4-5, and conditional compilation. Includes row patterns 4-6. The module configuration specifies a combination of a file path name character string pattern and a module name. The module name can be arbitrarily specified by the developer. The comment pattern, function name pattern, include line pattern, and conditional compilation line pattern specify the character string pattern on each source code according to the specifications of the programming language.
図4の事例では、各設定条件のパターン指定をスクリプト言語Perlで提供される正規表現を利用して指定したものであり、また比較対照となるプログラムのソースファイルがC言語を使用していることを想定している。 In the example of FIG. 4, the pattern specification of each setting condition is specified using a regular expression provided by the script language Perl, and the source file of the program to be compared is in the C language. Is assumed.
次に比較処理部3−3を実行する。プログラムの比較処理は次のように行われる。修正前後プログラムそれぞれに対し、以下の情報を抽出するための走査を行う。まず、構成するファイルパスのリストを獲得する(図5)。各ファイルパスには予め与えられた設定条件のモジュール構成パターンとのマッチングを行い、所属するモジュール情報を付加する。いずれのモジュール構成パターンにもマッチしないファイルの所属モジュール情報は不明とする。該情報を修正内容保持部3−4に登録する。 Next, the comparison processing unit 3-3 is executed. The program comparison process is performed as follows. A scan for extracting the following information is performed for each program before and after correction. First, a list of file paths to be configured is acquired (FIG. 5). Each file path is matched with the module configuration pattern of the setting conditions given in advance, and the module information to which it belongs is added. The belonging module information of a file that does not match any module configuration pattern is unknown. The information is registered in the correction content holding unit 3-4.
図5の事例では、モジュール「moduleA」に所属するファイル「dirA\dir1\file2.c」が修正後プログラムには存在せず、修正作業の結果削除されたことを読み取ることができる。 In the example of FIG. 5, it can be read that the file “dirA \ dir1 \ file2.c” belonging to the module “moduleA” does not exist in the corrected program and has been deleted as a result of the correction work.
つぎに、各ファイルから条件コンパイルで指定されたコードブロック、関数を定義したコードブロックおよびインクルード行を抽出し、図6に示す情報テーブルとして獲得する。図6の関数情報テーブルでは、関数が定義されているファイル名、定義部分の開始および終了行、該関数が有効となる条件コンパイル情報を管理する。図6のインクルード情報テーブルでは、インクルード行が指定されているファイル名および行番号、該インクルード行が有効となる条件コンパイル情報を管理する。該情報を修正内容保持部3−4に登録する。 Next, a code block specified by conditional compilation, a code block defining a function, and an include line are extracted from each file and acquired as an information table shown in FIG. In the function information table of FIG. 6, the file name in which the function is defined, the start and end lines of the definition part, and the conditional compilation information for enabling the function are managed. In the include information table of FIG. 6, the file name and line number in which the include line is specified, and the conditional compilation information for enabling the include line are managed. The information is registered in the correction content holding unit 3-4.
つぎに前記走査により得られた修正前後のプログラム情報の比較を図2で定義した論理階層構造の各パラメータで行う。図5で得られた修正前後のファイルパス情報をもとにモジュール別ファイル構成情報としてモジュールごとのファイル構成を得る。さらに、該モジュール別ファイル構成情報を修正前後で比較し、また同名のファイルパスが修正前後で存在する場合にはファイルのソースコード上の比較による修正の有無を判定した上で、追加/修正/削除/修正なしの各ファイル数を得、モジュール層比較情報7−2(図7−2)として、修正内容保持部に登録する。該情報は図2におけるモジュール層の情報に相当する。 Next, the program information before and after correction obtained by the scanning is compared with each parameter of the logical hierarchical structure defined in FIG. Based on the file path information before and after correction obtained in FIG. 5, the file structure for each module is obtained as module-specific file structure information. Further, the module-specific file structure information is compared before and after the modification, and if the file path with the same name exists before and after the modification, the presence / absence of the modification by comparison on the source code of the file is determined, and then the addition / modification / The number of files without deletion / correction is obtained and registered in the correction content holding unit as module layer comparison information 7-2 (FIG. 7-2). This information corresponds to the module layer information in FIG.
また、前記モジュール層比較情報から、追加/修正/削除/修正なしのモジュール数を得る。モジュールの修正、修正なしの判断は前記モジュール層比較情報に基づき、該モジュールを構成するファイルの修正の有無に合わせて行う。該情報は、プログラム層比較情報7−1(図7−1)として修正内容保持部に記録する。該情報は図2におけるプログラム層の情報に相当する。 Further, the number of modules without addition / modification / deletion / modification is obtained from the module layer comparison information. Judgment whether or not a module is modified is made based on the module layer comparison information according to whether or not a file constituting the module is modified. The information is recorded in the correction content holding unit as program layer comparison information 7-1 (FIG. 7-1). This information corresponds to the information of the program layer in FIG.
また、前記ファイルパスリスト(図5)および関数情報テーブル(図6)から修正前後のファイルごとに追加/修正/削除/修正なしの関数の数を得る。 Further, the number of functions added / modified / deleted / unmodified is obtained for each file before and after modification from the file path list (FIG. 5) and the function information table (FIG. 6).
追加の判断は、修正前後の同名ファイル内において対象関数が修正前になく修正後に存在する場合に追加とする。但し、このとき修正前の別ファイルに該関数が存在するかを検索し、存在する場合、追加と区別し追加(移動)とする。 An additional decision is made when the target function exists after modification in the same name file before and after modification. However, at this time, it is searched whether the function exists in another file before correction, and if it exists, it is added (moved) in distinction from addition.
削除の判断は、修正前後の同名ファイル内において該関数が修正前に存在し修正後にない場合に削除としる。但し、このとき修正後の別ファイルに存在するかを検索し、存在する場合には削除と区別し削除(移動)とする。 Deletion is determined when the function exists in the same name file before and after the correction and exists before the correction and does not exist after the correction. However, at this time, it is searched whether it exists in another file after correction, and if it exists, it is determined to be deleted (moved) in distinction from deletion.
関数の修正、修正なしの判断は、修正前後の関数情報テーブルにおける開始、終了行から関数定義部のコードブロックを抽出し、前記設定条件におけるコメントパターンに基づくコメントブロックを削除した上で、コードの比較を行い、修正の有無を判断する。コードの比較は行レベルで行い、総行数および追加/修正/削除/修正なしのコード行数を得る。 To determine whether or not to modify a function, extract the code block of the function definition part from the start and end lines in the function information table before and after the modification, delete the comment block based on the comment pattern in the setting condition, A comparison is made to determine whether correction has been made. Code comparison is done at the line level to get the total number of lines and the number of code lines without addition / modification / deletion / no modification.
追加/修正/削除/修正なしの関数の数についてはファイル層比較情報7−3(図7−3)として修正内容保持部に登録する。関数内の総行数および追加/修正/削除/修正なしの各コード行数については関数層比較情報7−4(図7−4)として修正内容保持部に登録する。また、前記ファイルパスリスト(図5)およびインクルード行情報テーブル(図6)から修正前後のファイルごとに追加/修正/削除/修正なしの各インクルード行の数を得、ファイル層比較情報7−3として登録する。 The number of functions added / modified / deleted / unmodified is registered in the modified content holding unit as file layer comparison information 7-3 (FIG. 7-3). The total number of lines in the function and the number of code lines without addition / modification / deletion / no modification are registered in the modification content holding unit as function layer comparison information 7-4 (FIG. 7-4). Further, the number of each included line added / modified / deleted / without modification is obtained for each file before and after modification from the file path list (FIG. 5) and the include line information table (FIG. 6), and file layer comparison information 7-3 is obtained. Register as
追加の判断は、修正前後の同名ファイル内において同インクルード行が、修正前になく修正後に存在する場合に追加とする。 An additional decision is made when the same include line exists in the file with the same name before and after the modification but before the modification and after the modification.
削除の判断は、修正前後の同名ファイル内において同インクルード行が、修正前に存在し修正後にない場合に削除としる。同インクルード行が修正前後の同名ファイルにおいて存在する場合、該インクルード行に指定されたファイルが修正前後で変更があるかを前記モジュール層比較情報から検索し、変更がある場合インクルード行自体の修正なしと区別し、修正なし(参照先変更有)とする。 Deletion is determined when the same include line exists before and after modification in the same-named file before and after modification. If the same line exists in the same-named file before and after modification, the module layer comparison information is searched for whether the file specified in the included line is modified before and after modification. If there is a modification, the include line itself is not modified. It is distinguished from the above, and there is no correction (reference destination is changed).
比較処理終了後、次に該プログラム修正情報出力システムは、修正情報保持部に登録された情報を解析し、修正内容出力部3−6により修正情報を視覚化する。図8にこの解析結果の視覚化の例を示す。解析結果は複数の画面で構成され、トップ画面8−1、プログラム層画面8−2、モジュール層画面8−3、ファイル層画面8−4、関数層画面8−5、コード差分情報画面8−6を含む。 After completion of the comparison process, the program correction information output system analyzes the information registered in the correction information holding unit and visualizes the correction information by the correction content output unit 3-6. FIG. 8 shows an example of visualization of the analysis result. The analysis result is composed of a plurality of screens. Top screen 8-1, program layer screen 8-2, module layer screen 8-3, file layer screen 8-4, function layer screen 8-5, code difference information screen 8- 6 is included.
まず修正内容出力部にはトップ画面8−1が表示される。ここには、前記論理階層ごとの修正情報の結果が修正あり、または修正なしの情報とともに表示される。各階層の修正の有無は、前記比較処理部により登録された階層別比較情報7−1〜7−4において修正なしの情報以外の情報の値が1つでもある場合には修正ありとし、その他は修正なしとする。 First, the top screen 8-1 is displayed on the correction content output section. Here, the result of the correction information for each logical hierarchy is displayed together with information with or without correction. The presence / absence of correction of each level is determined to be corrected when there is at least one value of information other than the information without correction in the comparison information by level 7-1 to 7-4 registered by the comparison processing unit. Is not amended.
開発者はまずここでプログラムの差分状況を概観することができる。また、該画面には条件コンパイル指定フィールドが用意されており、ここに所望の条件コンパイル情報を入力することにより、比較情報の対象となる関数やインクルード行の絞込みを行うことができる。該事例では、条件コンパイル指定はOFF(指定しない)が選択されていることを示す。また、該条件コンパイル指定は残りの画面の情報すべてに有効となる。 Developers can first get an overview of the program differences. In addition, a conditional compilation designation field is prepared on the screen, and by inputting desired conditional compilation information here, it is possible to narrow down functions and include lines to be compared. In this case, OFF (not specified) is selected as the conditional compilation specification. The conditional compilation specification is valid for all the information on the remaining screens.
また、「<<」と「>>」とで文字列を囲む形で表示された部分は、他画面へ遷移するための指示を示す領域(以後リンク部とする)でもあり、マウス等のポインティングデバイス等による指示(以後クリック操作とする)で、他画面へ移行する。なお、「<<」及び「>>」の部分の意味と機能は全画面において共通とする。また、トップ画面を除き、各画面には図示しないが、遷移前の画面に戻るためのリンク部が用意され、各画面を開発者の要求に合わせて自由に遷移することが可能である。 In addition, the part displayed by enclosing the character string with “<<” and “>>” is also an area (hereinafter referred to as a link part) indicating an instruction for transition to another screen, and pointing with a mouse or the like Moves to another screen in response to an instruction from the device (hereinafter referred to as a click operation). The meanings and functions of “<<” and “>>” are common to all screens. Also, except for the top screen, although not shown in each screen, a link part for returning to the screen before the transition is prepared, and each screen can be freely transitioned according to the request of the developer.
次に、トップ画面の「<<修正あり>>」のクリック操作により、プログラム層画面8−2へ遷移する。該画面ではプログラム層の比較パラメータであるモジュールの追加/修正/削除の各数とそれぞれの該当モジュール名を表示する。各モジュール名はモジュール層画面8−3へ遷移するためのリンク部となっている。表示される情報は、8−2ではすべてを図示しないが、プログラム層比較情報7−1に従う。 Next, a transition to the program layer screen 8-2 is made by a click operation of “<< corrected >>” on the top screen. On this screen, the number of addition / modification / deletion of modules, which are comparison parameters of the program layer, and the corresponding module names are displayed. Each module name is a link part for transitioning to the module layer screen 8-3. Although all the displayed information is not shown in 8-2, it follows the program layer comparison information 7-1.
ここで、開発者の認識するモジュールの単位で修正状況を把握することができる。 Here, the modification status can be grasped in units of modules recognized by the developer.
次に、プログラム層画面のリンク部となっているモジュール名をクリックし、モジュール層画面8−3へ遷移する。該画面では、前画面であるプログラム層画面で指定されたモジュール配下のファイルについて、ファイル単位で修正情報を出力する。表示される情報はモジュール層比較情報7−2に従う。また、修正なしファイル情報については、該当ファイルのファイル層比較情報を検索し修正なし(参照先変更有り)インクルード行が1つでも存在する場合には、該情報が留意すべき事項として付加される。図8の例では情報テーブル中の太線枠網掛けセルが相当し、修正なしファイル2つの中に注意すべきインクルード行を含むファイルがあることを表す。 Next, the module name that is the link part of the program layer screen is clicked, and the screen transits to the module layer screen 8-3. In this screen, correction information is output in units of files for the files under the module specified on the program layer screen which is the previous screen. The displayed information follows the module layer comparison information 7-2. As for the file information without correction, when there is even one include line with no correction (with reference destination change) by searching the file layer comparison information of the corresponding file, the information is added as a matter to be noted. . In the example of FIG. 8, a thick-line frame shaded cell in the information table corresponds to the fact that there is a file including an include line to be noted in two unmodified files.
次に、モジュール層画面8−3のリンク部であるファイル名をクリックし、ファイル層画面8−4に遷移する。該画面では、前画面であるモジュール層画面で指定されたファイル配下の関数、およびインクルード行単位での修正情報を出力する。表示される情報はファイル層比較情報7−3に従う。 Next, the file name which is the link part of the module layer screen 8-3 is clicked, and it changes to the file layer screen 8-4. In this screen, the function under the file specified in the module layer screen which is the previous screen and the correction information in units of include lines are output. The displayed information follows the file layer comparison information 7-3.
次に、ファイル層画面8−4のリンク部である関数名をクリックし、関数層画面8−5へ遷移する。該画面では、前画面であるファイル層画面で指定された関数の比較情報を表示する。表示される情報は関数層比較情報7−4に従う。 Next, the function name which is the link part of the file layer screen 8-4 is clicked, and it changes to the function layer screen 8-5. In this screen, the comparison information of the function designated on the file layer screen which is the previous screen is displayed. The displayed information follows the function layer comparison information 7-4.
また、該画面下部にソースコードの差分の実体を表示するためのリンクが用意され、これをクリックすることで差分の実体画面8−6(図10)が表示され、内容を表示さる。該事例では前記「diffコマンド」による差分実体内容を表している。 In addition, a link for displaying the source code difference entity is prepared at the bottom of the screen, and when this is clicked, the difference entity screen 8-6 (FIG. 10) is displayed and the contents are displayed. In this case, the difference entity content by the “diff command” is shown.
該視覚化例では、トップ画面に続き、論理構造の上位層から下位層へ順番にアプローチすることでプログラム全体の修正情報の把握の理解を容易にしているが、トップ画面から途中階層へのアプローチを行う操作仕様を与えることも容易である。例えば、トップ画面8−1のファイル層の「<<修正あり>>」のクリック操作を行った場合、図9に示す例の画面に遷移することが可能である。図9の画面ではプログラム下の前ファイル下にある関数とインクルード行に関する比較情報を表示する。一般的にはかなり多くの数が表示されることが予想されるが、図9例のように画面上部に情報の絞込み機能を提供することが可能である。修正情報を確認したいファイル名パターンの指定、関数情報またはインクルード情報の選択を行うことで情報の絞込みを行い、明らかな不要情報を減らすことで、開発者の情報混乱を回避することが可能である。図示はしないが、モジュール層、関数層においても同様に可能である。 In this visualization example, following the top screen, the approach from the upper layer to the lower layer of the logical structure is approached in order to make it easier to understand the correction information of the entire program. It is also easy to give operation specifications to perform. For example, when a click operation of “<< Modified >>” in the file layer on the top screen 8-1 is performed, it is possible to transition to the screen illustrated in FIG. In the screen of FIG. 9, the comparison information regarding the function and the include line under the previous file under the program is displayed. In general, a considerably large number is expected to be displayed, but it is possible to provide an information narrowing function at the top of the screen as in the example of FIG. It is possible to narrow down the information by specifying the file name pattern for which you want to check the correction information, select the function information or include information, and avoid the information confusion of the developer by reducing obvious unnecessary information . Although not shown, the same can be applied to the module layer and the function layer.
以上説明したように、本実施形態のプログラムの修正情報出力システムによれば、図8や図9に示すような修正前後のプログラムの比較情報を提供できるので、プログラムの修正個所の把握が容易になる。すなわち、該修正内容表示部において、プログラム修正個所は、モジュール、ファイル、関数、インクルード行、ソースコードの単位で提供され、各単位ごとに追加/修正/削除を核とした形式で修正情報を知ることができる。 As described above, according to the program correction information output system of the present embodiment, comparison information of the programs before and after the correction as shown in FIG. 8 and FIG. 9 can be provided, so that the correction part of the program can be easily grasped. Become. That is, in the modification content display section, program modification locations are provided in units of modules, files, functions, include lines, and source codes, and the modification information is known in a format centered on addition / modification / deletion for each unit. be able to.
さらにインクルード行の修正情報では、ソースコード上の違いだけでなく、インクルード行に指定されたファイルの変更の有無を拾い上げることで、開発者に修正によるプログラム上の影響範囲をよりきめ細かく示唆することができる。 In addition, in the modification information of the include line, not only the differences in the source code but also the presence or absence of changes in the file specified in the include line can be picked up, and the range of influence on the program due to the modification can be suggested more precisely to the developer. it can.
さらに、条件コンパイルによる修正の影響範囲を確認することができ、前記インクルード行情報による影響範囲の示唆に加え、より深く修正状況を考察することが可能である。 Furthermore, it is possible to confirm the influence range of the correction by conditional compilation, and in addition to suggesting the influence range by the include line information, it is possible to consider the correction situation deeper.
3−1:修正前プログラムのソースファイル群
3−2:修正後プログラムのソースファイル群
3−3:比較処理部
3−4:修正内容保持部
3−5:修正内容表示部
3-1: Source file group of pre-correction program 3-2: Source file group of post-correction program 3-3: Comparison processing unit 3-4: Correction content holding unit 3-5: Correction content display unit
Claims (3)
修正前後のプログラムをモジュール、ファイル、関数、ソースコードの各階層単位で比較するステップと、
前記階層単位の比較で得られた差分情報を該プログラムの修正情報として、視覚的に出力するステップと、
を有することを特徴とする修正プログラムの比較方法。 In a method for comparing programs,
Comparing the program before and after modification in each layer of module, file, function, source code,
Visually outputting the difference information obtained by the comparison of the hierarchical units as the correction information of the program;
A method for comparing correction programs, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005092888A JP2006277127A (en) | 2005-03-28 | 2005-03-28 | Method for comparing correction program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005092888A JP2006277127A (en) | 2005-03-28 | 2005-03-28 | Method for comparing correction program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006277127A true JP2006277127A (en) | 2006-10-12 |
Family
ID=37211851
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005092888A Pending JP2006277127A (en) | 2005-03-28 | 2005-03-28 | Method for comparing correction program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006277127A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008123343A (en) * | 2006-11-14 | 2008-05-29 | Sharp Corp | Software differential measurement device, software differential measurement program, and recording medium recording it |
CN101533346B (en) * | 2008-03-13 | 2012-10-10 | 中兴通讯股份有限公司 | Source file comparing unit and method thereof |
CN103019666A (en) * | 2011-09-20 | 2013-04-03 | 日本电气株式会社 | Source code comparison device, source code comparison method and source code comparison program |
US8423984B2 (en) | 2009-07-28 | 2013-04-16 | Renesas Electronics Corporation | System and method generating object code |
JP2013546090A (en) * | 2010-12-15 | 2013-12-26 | マイクロソフト コーポレーション | Intelligent code difference processing using code clone detection |
-
2005
- 2005-03-28 JP JP2005092888A patent/JP2006277127A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008123343A (en) * | 2006-11-14 | 2008-05-29 | Sharp Corp | Software differential measurement device, software differential measurement program, and recording medium recording it |
CN101533346B (en) * | 2008-03-13 | 2012-10-10 | 中兴通讯股份有限公司 | Source file comparing unit and method thereof |
US8423984B2 (en) | 2009-07-28 | 2013-04-16 | Renesas Electronics Corporation | System and method generating object code |
JP2013546090A (en) * | 2010-12-15 | 2013-12-26 | マイクロソフト コーポレーション | Intelligent code difference processing using code clone detection |
KR101732764B1 (en) * | 2010-12-15 | 2017-05-04 | 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 | Intelligent code differencing using code clone detection |
CN103019666A (en) * | 2011-09-20 | 2013-04-03 | 日本电气株式会社 | Source code comparison device, source code comparison method and source code comparison program |
JP2013065267A (en) * | 2011-09-20 | 2013-04-11 | Nec Corp | Source code comparison device, source code comparison method, and source code comparison program |
US8752009B2 (en) | 2011-09-20 | 2014-06-10 | Nec Corporation | Source code comparison device, source code comparison method and source code comparison program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6289254B1 (en) | Parts selection apparatus and parts selection system with CAD function | |
CN101430758B (en) | Document recognizing apparatus and method | |
WO2006075667A1 (en) | Information processing device, file data merging method, file naming method, and file data output method | |
US9990340B2 (en) | Batch generation of links to documents based on document name and page content matching | |
JP3181994B2 (en) | How to automatically create job flow specifications | |
JP4872529B2 (en) | Reverse engineering support method | |
US10901699B2 (en) | Data analysis process assistance device and data analysis process assistance method | |
US20100057770A1 (en) | System and method of file management, and recording medium storing file management program | |
US10936172B2 (en) | Method of computerized presentation of a document set view for auditing information and managing sets of multiple documents and pages | |
JP5747698B2 (en) | Requirements management support device | |
JP7055064B2 (en) | Database migration support system and program | |
US7243314B2 (en) | Window operation interface for graphically revising electrical constraint set and method of using the same | |
JP2006277127A (en) | Method for comparing correction program | |
JP6251860B2 (en) | Information management apparatus and file management method | |
JP5504212B2 (en) | Test case automatic generation system, test case automatic generation method, and test case automatic generation program | |
Alfaro et al. | $\mu $ PrintGen: Supporting Workflow Logs Analysis Through Visual Microprint | |
JP2009163566A (en) | Job analysis support device | |
JP2002366354A (en) | Program specification creation device, program specification creation method, and program specification creation program | |
JP4480413B2 (en) | Document search device, document search method, and document search program | |
JP3988900B2 (en) | Document processing apparatus and program storage medium thereof | |
JP4683535B2 (en) | Job net management system | |
JP2002287964A (en) | Screen input / output specification design system, method and program | |
JP2006190332A (en) | Program specification creation device, program specification creation method, and program specification creation program | |
WO2022107228A1 (en) | Operation assistance device, operation assistance method, and operation assistance program | |
JP3577480B2 (en) | Reverse engineering equipment |