JP2018181020A - Calculation device and influence output system - Google Patents
Calculation device and influence output system Download PDFInfo
- Publication number
- JP2018181020A JP2018181020A JP2017080951A JP2017080951A JP2018181020A JP 2018181020 A JP2018181020 A JP 2018181020A JP 2017080951 A JP2017080951 A JP 2017080951A JP 2017080951 A JP2017080951 A JP 2017080951A JP 2018181020 A JP2018181020 A JP 2018181020A
- Authority
- JP
- Japan
- Prior art keywords
- correction
- simultaneous
- influence
- unit
- source code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
本発明は、計算装置、および影響出力システムに関する。 The present invention relates to a computing device and an influence output system.
ソフトウエアのある部分を修正した際に関連する他の箇所の修正を失念する修正漏れが問題となる。特許文献1には、修正されたプログラム内のソースコードを解析し、このソースコードの修正の影響範囲を特定することによりデグレートの発生を防止するデグレート防止支援プログラムにおいて、ユーザの操作により指定された前記プログラムの修正前後のソースコードを比較して修正内容を含む修正対象を検出する修正検出手段と、ユーザの操作により指定された前記修正後のソースコードの影響範囲を調査する基点となる基点フォルダに基づいて、前記修正対象から線形的に前記修正対象の影響を受ける影響内容を含む影響対象を検出する影響検出手段と、前記修正対象および影響対象に基づいて、影響対象に対するデグレートの発生を防止するための見直し情報を生成する見直し生成手段とを備える装置が開示されている。
The problem is a omission of correction, which misses the correction of other related parts when correcting one part of the software. According to
特許文献1に記載されている発明では、呼び出し関係にないが同時に修正すべき可能性が高い関数を検出することができない。
The invention described in
本発明の第1の態様による計算装置は、ソースコードにそれぞれ記載される関数または変数である複数の要素について、前記ソースコードの修正履歴において同時に修正された前記要素の組み合わせが記録される同時修正関係情報が格納される記憶部と、前記複数の要素のうち修正の対象となる修正要素を特定する修正要素特定部と、前記複数の要素のうち前記修正要素を修正することにより影響を受ける被影響要素を前記同時修正関係情報を用いて判定し出力する影響箇所解析判定部とを備える。
本発明の第2の態様によるプログラムは、ソースコードにそれぞれ記載される関数または変数である複数の要素について、前記ソースコードの修正履歴において同時に修正された前記要素の対応が記録される同時修正関係情報が格納される記憶部を備えるコンピュータに、前記複数の要素のうち修正の対象となる修正要素を特定させることと、前記複数の要素のうち前記修正要素を修正することにより影響を受ける被影響要素を前記同時修正関係情報を用いて判定させることと、を実現させる。
A computing apparatus according to a first aspect of the present invention is a simultaneous correction in which a combination of the elements simultaneously corrected in the correction history of the source code is recorded for a plurality of elements which are functions or variables respectively described in the source code. A storage unit in which relation information is stored, a correction element specifying unit for specifying a correction element to be corrected among the plurality of elements, and a subject to be affected by correcting the correction element among the plurality of elements An influence point analysis determination unit that determines and outputs an influence factor using the simultaneous correction relation information.
The program according to the second aspect of the present invention is a simultaneous correction relationship in which the correspondence of the elements simultaneously corrected in the correction history of the source code is recorded for a plurality of elements which are functions or variables respectively described in the source code. Affected by causing a computer including a storage unit in which information is stored to specify a correction element to be corrected among the plurality of elements, and correcting the correction element among the plurality of elements Determining an element using the simultaneous modification relation information.
本発明によれば、呼び出し関係にないが同時に修正すべき可能性が高い関数を検出することができる。 According to the present invention, it is possible to detect functions that are not in a calling relationship but are likely to be corrected simultaneously.
―第1の実施の形態―
以下、図1〜図13を参照して、影響出力システムの第1の実施の形態を説明する。
-First embodiment-
Hereinafter, a first embodiment of the influence output system will be described with reference to FIGS. 1 to 13.
(用語の定義)
本実施の形態では、後述する端末装置を操作する者を「ユーザ」と呼ぶ。また以下ではコンピュータに実行させる処理を記載した文書であってコンピュータのコンパイラやインタプリタにより解読され処理される文章を「ソースコード」と呼ぶ。ソースコードに記載される関数および変数を「要素」と呼ぶ。ソースコードに記載された要素に関する記載を変更すること、およびソースコードに要素に関する記載を追加することをソースコードの「修正」と呼ぶ。
(Definition of terms)
In the present embodiment, a person who operates a terminal device described later is referred to as a "user". Also, in the following, a document that describes a process to be executed by a computer, and a sentence that is decoded and processed by a compiler or interpreter of the computer is referred to as “source code”. The functions and variables described in the source code are called "elements". Changing the description of the elements described in the source code and adding the description of the elements to the source code is called "modification" of the source code.
(構成)
図1は、影響出力システム1のシステム構成を示す図である。影響出力システム1は、ユーザが操作する端末装置100と、ネットワークを介して端末装置100に接続されるサーバ200とを備える。すなわち端末装置100はサーバ200との関係ではクライアントとみなすことができる。
(Constitution)
FIG. 1 is a diagram showing a system configuration of the
端末装置100は、端末処理部110と、端末記憶部120と、表示部130と、入力部140と、端末通信部150とを備える。端末処理部110はたとえばCPUであり、不図示のROMに格納されるプログラムを不図示のRAMに展開して実行することにより以下に説明する機能を発揮する。端末処理部110はその機能として、呼び出し関係検出部111、同時修正関係検出部112、影響箇所解析判定部113、入出力処理部114、および修正差分検出部115を備える。呼び出し関係検出部111はソースコードに含まれる関数および変数間の参照関係を既知の静的解析技術に基づいて検出し、後述する呼び出し関係データベース(以下、呼び出し関係DB)121を作成する。
The
同時修正関係検出部112は、サーバ200から取得する複数のソースコード、すなわちソースコードの修正履歴に基づき、後述する同時修正関係データベース(以下、同時修正関係DB)122を作成する。影響箇所解析判定部113は、ある要素の変更が影響を与える他の要素を判定する。入出力処理部114は、不図示の入出力インタフェースを介して表示部130および入力部140と接続される。入出力処理部114は、表示部130への映像情報の出力および入力部140からの入力情報の受付を行う。修正差分検出部115は、ソースコードの差分を要素単位で検出する。すなわち追加された関数および変数や、修正された関数を検出する。
The simultaneous correction
端末記憶部120は、ハードディスクドライブやフラッシュメモリなどの不揮発性のデータ記憶装置である。端末記憶部120には、呼び出し関係DB121、同時修正関係DB122、登録ソースコード123、および修正ソースコード124が格納される。前述のとおり、呼び出し関係DB121は呼び出し関係検出部111により生成され、同時修正関係DB122は同時修正関係検出部112により生成される。呼び出し関係DB121には、ソースコードを解析して得られる要素間の呼び出し関係、すなわち呼び出しの関係および被呼び出しの関係を示す情報が格納される。前述のとおり、呼び出し関係DB121は呼び出し関係検出部111により生成される。同時修正関係DB122には、同時に修正される要素を示す情報が格納される。
The
登録ソースコード123は、サーバ200に登録されている最新の一式のソースコードであり、端末通信部150を介してサーバ200から取得される。修正ソースコード124はユーザにより登録ソースコード123が修正されたソースコードである。すなわち端末処理部110は、まずサーバ200から最新のソースコード一式を取得して登録ソースコード123として保存し、表示部130を介してこれをユーザに提供する。ユーザが入力部140を用いてソースコードに修正を加えると、端末処理部110は修正が加えられたソースコードを修正ソースコード124として端末記憶部120に保存する。
The
表示部130はたとえば液晶ディスプレイであり、端末処理部110の動作指令に基づき視覚情報をユーザに提供する。入力部140はたとえばキーボードやマウスであり、ユーザの入力を受け付けて端末処理部110に伝達する。端末通信部150は有線または無線による通信によりサーバ200と通信する。
The
サーバ200は、サーバ処理部210とサーバ記憶部220とを備える。サーバ処理部210はたとえばCPUである。サーバ記憶部220は、ハードディスクドライブやフラッシュメモリなどの不揮発性のデータ記憶装置である。サーバ記憶部220には、構成管理データベース(以下、構成管理データベースDB)221が格納される。構成管理DB221は、ソースコードの修正履歴である複数のリビジョンのソースコード、および履歴情報から構成される。構成管理DB221の詳細は後述する。
The
(構成管理DB)
図2はサーバ200に備えられる構成管理DB221の構成を示す図である。構成管理DB221には複数のリビジョンのソースコード群223、および履歴情報225が格納される。各リビジョンのソースコード群は1以上のソースコードを含む。リビジョン番号は大きいほど作成日が新しいことを示しており、リビジョン84が構成管理DB221に登録されている最新のソースコードである。
(Configuration Management DB)
FIG. 2 is a diagram showing the configuration of the
図3は、履歴情報225の一例を示す図である。履歴情報225は複数のレコードから構成され、各レコードはバージョン226、リビジョン227、日時228、修正ファイル229、担当者230、およびメッセージ231のフィールドから構成される。バージョン226のフィールドにはバージョン番号が格納される。ただしバージョン番号は所定の条件により付与され、バージョン番号が付与されないレコードもある。リビジョン227のフィールドには、ソースコードが構成管理DB221に登録されるたびに更新される番号が格納される。日時228のフィールドにはそのリビジョンが構成管理DB221に登録された日時が格納される。修正ファイル229のフィールドには、そのリビジョンにおいて直前のリビジョンから修正されたファイルの名称が格納される。担当者230のフィールドには、そのリビジョンを登録した担当者の氏名が格納される。メッセージ231のフィールドには、そのリビジョンに関するメッセージが格納される。ただしメッセージ231のフィールドは何も格納されなくてもよい。
FIG. 3 is a diagram showing an example of the
履歴情報225は、サーバ処理部210により作成される。サーバ処理部210は、端末装置100からソースコードを受信すると、新しいリビジョン番号を付与して構成管理DB221に保存するとともに履歴情報225の新しいレコードを生成する。このレコードには、付与した新しいリビジョン番号、ソースコードを受信した時刻、受信したソースコードの名称、ソースコードを送信した端末装置100にあらかじめ紐づけられた担当者の氏名、受信したメッセージが格納される。ただしメッセージを受信しない場合はメッセージ231のフィールドには何も入力されない。
The
(要素の例)
図4は、要素である関数および変数の相互関係の一例を示す図である。図4では関数を「Func」とアルファベット1文字の組み合わせで表し、変数は「Value」とアルファベット1文字の組み合わせで表している。また図4における一方向矢印は呼び出し/被呼び出し関係にあることを示しており、双方向矢印は同時修正関係にあることを示している。すなわち図4には、FuncGはFuncAを呼び出し、FuncAはValueAおよびFuncDを呼び出し、FuncDはFuncHを呼び出すことが示されている。また図4には、FuncBはFuncCを呼び出し、FuncCはFuncEおよびFuncIを呼び出すことが示されている。さらに図4には、FuncAとFuncCは同時修正関係にあり、FuncDとFuncFは同時修正関係にあることが示されている。
(Example of element)
FIG. 4 is a diagram showing an example of the interrelationship between functions and variables that are elements. In FIG. 4, the function is represented by a combination of "Func" and one alphabet, and the variable is represented by a combination of "Value" and one alphabet. The one-way arrows in FIG. 4 indicate that they are in a calling / called relationship, and the two-way arrows indicate that they are in a simultaneous correction relationship. That is, FIG. 4 shows that FuncG calls FuncA, FuncA calls ValueA and FuncD, and FuncD calls FuncH. FIG. 4 also shows that FuncB calls FuncC and FuncC calls FuncE and FuncI. Further, FIG. 4 shows that FuncA and FuncC have a simultaneous correction relationship, and FuncD and FuncF have a simultaneous correction relationship.
さらに本実施の形態では、要素間の関係の遠近を「段」を用いて表現する。要素間の1つの呼び出し、被呼び出し、同時修正関係をそれぞれ1段とし、関係が遠くなるごとに段数を加算する。たとえば図4に示す例において、FuncAを基準としたFuncFは、FuncAがFuncDを呼び出し、FuncDの同時修正関係にあるのがFuncFなので、要素間の関係を順に辿ると「呼び出し、同時修正」なので、「呼び出し1段、同時修正1段」となる。同じく図4に示す例において、FuncBを基準としたFuncHは、要素間の関係を順に辿ると「呼び出し、同時修正、呼び出し、呼び出し」なので、「呼び出し3段、同時修正1段」となる。
Furthermore, in the present embodiment, the perspective of the relationship between elements is expressed using “stages”. One call between elements, one to be called, and one simultaneous correction relation are one stage each, and the number of stages is added each time the relation goes away. For example, in the example shown in FIG. 4, since FuncA calls FuncD and FuncD has FuncD's simultaneous correction relationship, FuncF based on FuncA is "call, simultaneous correction" when tracing the relationship between elements in order. "One call stage, simultaneous correction one stage". Similarly, in the example illustrated in FIG. 4, FuncH based on FuncB is “call, simultaneous correction, call, call” when it follows the relationship between elements, and thus “call 3 stage,
図5は、ソースコードに記載されるFuncAおよびFuncHの定義の一例を示す図である。図3に示すようにFuncAの内部でFuncDが呼び出され、ValueAが引数として渡されている。このような関係にある場合に、FuncAはValueAおよびFuncDを呼び出す関係にあり、ValueAおよびFuncDはFuncAに呼び出される、すなわち被呼び出しの関係にある。またFuncHは2つの引数をとり、この2つの引数を用いて演算を行い、演算結果を返す関数である。FuncHは関数および変数を参照しないため、FuncHはいずれの要素も呼び出さない。そのため図4ではFuncHを起点とする一方向矢印が延びていない。 FIG. 5 is a diagram showing an example of the definitions of FuncA and FuncH described in source code. As shown in FIG. 3, FuncD is called inside FuncA, and ValueA is passed as an argument. In such a relation, FuncA is in a relation of calling ValueA and FuncD, and ValueA and FuncD are in a relation of being called by FuncA, that is, in a relation of being called. FuncH is a function that takes two arguments, performs an operation using these two arguments, and returns an operation result. FuncH does not call any elements because FuncH does not refer to functions and variables. Therefore, in FIG. 4, the one-way arrow starting from FuncH does not extend.
(呼び出し関係DB)
図6は、呼び出し関係DB121の一例を示す図である。なお図6に示す例は図4に示した相互関係に対応している。呼び出し関係DB121は、要素テーブル410と呼出関係テーブル420とから構成される。要素テーブル410は複数のレコードから構成され、各レコードは要素ID411、ファイル412、関数・変数413、のフィールドを備える。要素ID411のフィールドには、要素を特定するIDが格納される。このIDはたとえば数字であり、他の要素と異なるものであれば桁数や数値の大小は問わない。ファイル412のフィールドには、要素が定義されているファイル名が格納される。関数/変数413のフィールドには、要素の名称が格納される。
(Call relationship DB)
FIG. 6 is a diagram showing an example of the
呼出関係テーブル420は複数のレコードから構成され、各レコードは、修正元要素ID421、修正影響要素ID422、関係性423のフィールドを備える。修正元要素ID421のフィールドには、修正される要素の要素IDが格納される。修正影響要素ID422のフィールドには、呼び出し関係や被呼び出し関係にあることから修正の影響を受ける要素の要素IDが格納される。関係性423のフィールドには、呼び出しと被呼び出しのいずれの関係であるかが格納される。
The call relation table 420 is composed of a plurality of records, and each record includes fields of a correction
(同時修正関係DB)
図7は、同時修正関係DB122の一例を示す図である。なお図7に示す例は図4に示した相互関係に対応している。同時修正関係DB122は、サーバ200の構成管理DB221に登録されたリビジョンごとに修正された要素を示すデータベースであり、たとえば図7に示すように関数および変数である要素を行に配し、リビジョン番号を列に配した表形式で表される。図7において丸が記載されている欄の要素が修正されたことを示している。たとえば図7にはリビジョン01ではFuncAとFuncCが修正されたことが示されており、換言するとリビジョン00とリビジョン01との差分がFuncAおよびFuncCにあることを示している。
(Simultaneous correction relation DB)
FIG. 7 is a diagram showing an example of the simultaneous
この同時修正関係DB122を用いることで、ソフトウェア上で処理が分かれており呼び出し関係に無いが、機能や動作に関係があって修正に影響がある要素を検出することができる。たとえば音声の早送りの機能の修正において、音声処理と表示部130に表示されるユーザインタフェースとが密接に関連するが、両者がソースコード上は呼び出し関係にない場合が考えられる。このような場合であっても、同時修正関係DB122を参照することで音声処理に関する要素を修正した際に、ユーザインタフェースに関する要素も影響を受けることがわかる。
By using the simultaneous
(画面表示)
図8は、表示部130に表示される修正影響チェック画面901の一例を示す図である。修正影響チェック画面901は、修正前入力欄902と、修正後入力欄903と、解析開始ボタン904と、リスト出力欄905とを備える。ユーザはソースコードを修正した後に修正影響チェック画面901を呼び出し、修正した箇所が影響する範囲をチェックする。詳述すると、ユーザはまず入力部140への入力により修正影響チェック画面901を呼び出し、修正前のソースコードのディレクトリを修正前入力欄902に入力し、修正後のソースコードのディレクトリを修正後入力欄903に入力する。そしてユーザが解析開始ボタン904を押下すると、修正した要素が影響する要素のリストである影響出力リスト900がリスト出力欄905に表示される。換言すると、影響出力リスト900には修正した要素と、呼び出し関係、被呼び出し関係、および同時修正関係にある全ての要素が表示される。
(Screen display)
FIG. 8 is a diagram showing an example of the correction
図9は、リスト出力欄905に表示される影響出力リスト900の一例を示す図である。影響出力リスト900は修正された要素である修正要素を示す修正要素の欄1101と、修正が影響する要素である影響要素および修正された要素との関係を示す修正影響の欄1102と、修正が影響する要素に対して直前に影響する要素を示す直前関係の欄1103とを備える。この3つの欄のうち、ユーザは特に修正影響の欄1102に注目して修正漏れがないかを確認する。修正影響の欄1102において、修正が影響する要素と修正された要素との関係は、修正影響タイプ1104として格納される。修正影響タイプ1104には、修正された要素から影響を与える要素までのそれぞれの要素間の関係が順番に表される。たとえば図4に示す例では、FuncAを修正した場合にFuncDを介してFuncFに影響する。詳述すると、FuncAが呼び出すFuncDと同時修正関係にあるのがFuncFなので、FuncFの修正影響タイプ1104は、その関係を順番に記載した「呼び出し、同時修正」となる。また図4の例においてFuncBが修正された場合は、その影響を受けるFuncHの修正影響タイプ1104は「呼び出し、同時修正関係、呼び出し、呼び出し」となる。
FIG. 9 is a diagram showing an example of the
直前関係の欄1103に記載される要素は、修正した要素が1以上の要素を介して他の要素に影響する場合に有用な情報となる。たとえば前述の例のように、FuncAを修正した場合にFuncDを介して影響を受けるFuncFは、FuncFに直接に影響する要素であるFuncDが直前関係の欄1103に記載される。なお図4の例においてFuncAが直接影響するFuncG、ValueA、FuncD、およびFuncCについては、直前関係の欄1103に修正した要素そのものであるFuncAが格納される。
The elements described in the
以上説明した影響出力リスト900は、修正影響タイプ1104を有するので、修正した要素と影響する要素との関係をユーザに提示することができる。特に、呼び出し関係先の同時修正関係にある要素や同時修正関係先の呼び出し関係にある要素などの関係は見落としやすいため、これらを一度に提示できる影響出力リスト900は有用である。
Since the
―フローチャート―
以上説明した機能を実現する端末装置100の動作をフローチャートを用いて説明する。
-flowchart-
The operation of the
(サーバへの登録処理)
図10は、端末装置100によるサーバ200の構成管理DB221へのソースコードの登録処理を示すフローチャートである。端末装置100の不図示のCPUは、ユーザによる入力部140への入力操作に基づき図10に動作が示されるプログラムを実行する。ただしCPUはあらかじめ定められた条件、たとえば一定時間の経過などによりそのプログラムを実行してもよい。以下に説明する各ステップの実行主体は端末装置100の不図示のCPUである。
(Process of registration to server)
FIG. 10 is a flowchart showing registration processing of a source code to the
ステップS301では、CPUは修正差分検出部115を用いて登録ソースコード123と修正ソースコード124とを比較する。続くステップS302では、CPUは登録ソースコード123の要素と修正ソースコード124の要素とに差分があるか否かを判断する。いずれかの要素に差分がある、すなわち何らかの修正がされたと判断する場合はステップS303に進み、差分が存在しないと判断する場合は図10に示すフローチャートを終了する。ステップS303では、端末通信部150を介して修正のあったソースコードをサーバ200に送信し図10に示すフローチャートを終了する。その際にユーザは、任意でメッセージを付加することができる。ここで付加したメッセージは、履歴情報225のメッセージ231として記録される。
In step S301, the CPU uses the correction
(呼び出し関係DBの作成処理)
図11は、呼び出し関係検出部111による呼び出し関係DB121の作成処理を示すフローチャートである。呼び出し関係検出部111は、前述の修正影響チェック画面901が呼び出された際、修正ソースコード124が更新された際、または一定時間の経過により以下のフローチャートにより動作があらわされるプログラムを実行する。以下に説明する各ステップの実行主体は端末装置100の不図示のCPUである。
(Process for creating call relation DB)
FIG. 11 is a flowchart showing the process of creating the
ステップS501では、CPUは処理対象とするソースコードを決定する。たとえばソースコード一式がA〜Dの4ファイルから構成される場合に、登録ソースコード123にはサーバ200から取得した4ファイルがすべて格納され、修正ソースコード124にはそのうちユーザが修正したファイル、たとえばAのみが格納される。この場合にCPUは、修正ソースコード124に格納されるAと登録ソースコード123に格納されるB〜Dを処理対象に決定する。
In step S501, the CPU determines a source code to be processed. For example, when a complete source code consists of four files A to D, registered
続くステップS502では、処理対象のソースコードからすべての要素、すなわちすべての関数および変数を抽出して列挙する。続くステップS503ではステップS502において抽出したそれぞれの要素を処理対象として以下のステップS504〜S505の処理を実行する。ステップS504ではCPUは、処理対象の要素に関する呼び出し関係、および被呼び出し関係を計測する。続くステップS505では、ステップS504において得られた計測結果を呼び出し関係DB121に記録する。続くステップS506ではステップS502において列挙したすべての要素についてS504〜S505の処理が完了したか否かを判断する。CPUは、完了していないと判断する場合は次の要素を選択してステップS504の処理を実行し、完了したと判断する場合は図11に示すフローチャートを終了する。
In the following step S502, all elements, that is, all functions and variables are extracted and listed from the source code to be processed. In the following step S503, the processing of the following steps S504 to S505 is executed on the respective elements extracted in step S502 as processing targets. In step S504, the CPU measures the calling relationship and the called relationship regarding the element to be processed. In the following step S505, the measurement result obtained in step S504 is recorded in the
(同時修正関係DBの作成処理)
図12は、同時修正関係検出部112による同時修正関係DB122の作成処理を示すフローチャートである。同時修正関係検出部112は、前述の修正影響チェック画面901が呼び出された際、修正ソースコード124が更新された際、または一定時間の経過により以下のフローチャートにより動作があらわされるプログラムを実行する。以下に説明する各ステップの実行主体は端末装置100の不図示のCPUである。
(Process of creating simultaneous correction relationship DB)
FIG. 12 is a flowchart showing creation processing of the simultaneous
ステップS701では、CPUはサーバ200の構成管理DB221からリビジョン間の比較に必要な全てのソースコードを取得する。換言すると、ステップS701ではソースコードの修正履歴が取得される。サーバ200の履歴情報225に含まれる修正ファイル229のフィールドには、直前のリビジョンから修正があったファイルの名称が記載されているので、CPUはこれを参照することにより取得すべきファイルを特定する。
In step S701, the CPU acquires, from the
続くステップS702では、最新リビジョンと1つ前のリビジョンを処理対象に選択する。たとえば図3に示す例ではリビジョン84が最新なので、ここではリビジョン84とリビジョン83を処理対象に選択する。続くステップS703では、CPUは修正差分検出部115を用いて処理対象の2つのリビジョンにおいて修正された要素を抽出する。続くステップS704では、ステップS703において抽出した要素を同時修正関係DB122に登録する。続くステップS705では、CPUは全てのリビジョンを処理対象としたか否かを判断する。全てのリビジョンを処理対象としたと判断する場合は図12に示すフローチャートを終了し、処理対象としていないリビジョンが存在すると判断する場合はステップS706に進む。ステップS706では、CPUは選択された2つのリビジョンのうち古い方のリビジョンと、さらに1つ前のリビジョンを処理対象に選択してステップS703に戻る。たとえばステップS706を実行する直前に選択されていたリビジョンがリビジョン84とリビジョン83であった場合に、ステップS706を実行することによりリビジョン83とリビジョン82が次の処理対象に選択される。
以上の処理により、全てのリビジョン間で修正された要素が抽出され、同時修正関係DB122に登録される。
In the following step S702, the current revision and the previous revision are selected as the processing target. For example, in the example shown in FIG. 3, since the
By the above processing, the elements corrected among all the revisions are extracted and registered in the simultaneous
(影響出力リストの表示処理)
図13は、図8に示した解析開始ボタン904が押された際に実行される処理を示すフローチャートである。以下に説明する各ステップの実行主体は端末装置100の不図示のCPUである。
(Display process of impact output list)
FIG. 13 is a flow chart showing processing executed when the
CPUはまずステップS801およびステップS802を実行する。ステップS801においてCPUは、修正ソースコード124および登録ソースコード123を読み込む。続くステップS803において、CPUは修正差分検出部115を用いて修正された要素である修正要素を抽出するとともに、修正ソースコード124および登録ソースコード123に記載される要素を全て抽出する。たとえば登録ソースコード123がA1,B1,C1の3つのソースコードから構成され、そのうちA1のみが修正されてA2となった場合は修正ソースコード124はA2のみから構成される。この場合にステップS803において、修正要素の抽出はA1とA2の比較により行われ、全ての要素の抽出はB1,C1,A2を用いて行われる。
The CPU first executes steps S801 and S802. In step S801, the CPU reads the modified
なお本ステップにおいて抽出した修正要素および全要素の一覧は後に使用するので、CPUはこれらを不図示のRAMに保存する。続くステップS804では、CPUはステップS803において抽出した修正要素から未解析の要素を解析対象要素として選択する。なおステップS804の初回の実行ではいずれの要素も解析されていないので、任意の要素を選択する。なおここで選択された要素がステップS806およびステップS807において解析対象となり、以下では解析対象要素と呼ぶ。ステップS801と同時に実行されるステップS802では、CPUは同時修正関係DB122を読み込む。
Since the list of correction elements and all elements extracted in this step is used later, the CPU stores them in a RAM (not shown). In the following step S804, the CPU selects an unanalyzed element from among the correction elements extracted in step S803 as an analysis target element. In the first execution of step S804, no element is analyzed, so an arbitrary element is selected. The element selected here is an analysis target in steps S806 and S807, and is hereinafter referred to as an analysis target element. In step S802, which is executed simultaneously with step S801, the CPU reads the simultaneous
ステップS804の次に実行されるステップS806では、CPUは修正ソースコード124および登録ソースコード123を解析し、解析対象要素と呼び出し関係、および被呼び出し関係にある要素をリストアップする。ステップS804およびステップS802の実行が完了すると実行されるステップS807では、解析対象要素と同時修正関係にある要素をリストアップする。本ステップS807の詳細な動作は次の図14を用いて説明する。ステップS806およびステップS807の実行が完了すると実行されるステップS808では、ステップS806およびステップS807において少なくとも1つの要素がリストアップされたか否かを判断する。CPUは、少なくとも1つの要素がリストアップされたと判断するとステップS809に進み、要素が1つもリストアップされていないと判断するとステップS810に進む。
In step S806, which is executed after step S804, the CPU analyzes the modified
ステップS809ではCPUは、リストアップされた要素に未解析の要素が含まれるか否かを判断する。CPUは未解析の要素が含まれると判断する場合はステップS811に進み、未解析の要素が含まれないと判断する場合はステップS810に進む。ステップS810では、CPUはステップS803において抽出された修正要素を解析したか否かを判断する。全ての修正要素を解析したと判断する場合はステップS812に進み、解析していない修正要素が残っていると判断する場合はステップS804に戻る。ステップS811では、CPUはステップS806およびステップS807においてリストアップされた要素のうち、未解析のいずれかの要素を選択してステップS804の直後に戻る。ステップS810において肯定判定されると実行されるステップS812では、CPUは入出力処理部114を用いて、ステップS806およびステップS807においてリストアップされた全ての要素を、解析対象要素、および呼び出しや同時修正の関係とともに影響出力リスト900として表示部130に出力する。たとえば図9に示した例は、FuncAが解析対象要素とされた際にリストアップされた要素が示されており、修正影響タイプ1104のフィールドにその関数との関係が示されている。以上の処理により、修正影響チェック画面901において影響出力リスト900がリスト出力欄905に表示される。
In step S809, the CPU determines whether or not the listed elements include an unparsed element. If the CPU determines that an unanalyzed element is included, the process proceeds to step S811. If the CPU determines that an unanalyzed element is not included, the process proceeds to step S810. In step S810, the CPU determines whether the correction element extracted in step S803 has been analyzed. If it is determined that all the correction elements have been analyzed, the process proceeds to step S812. If it is determined that the correction elements not analyzed remain, the process returns to step S804. In step S811, the CPU selects any unanalyzed element among the elements listed up in step S806 and step S807, and returns immediately after step S804. In step S812, which is executed when an affirmative determination is made in step S810, the CPU uses input /
(詳細フローチャート)
図14は図13のステップS807の詳細を示すフローチャートである。なお図13において説明したように、図14に示すフローチャートの処理が開始される時点で解析対象要素が選択されている。
(Detailed flowchart)
FIG. 14 is a flowchart showing details of step S 807 of FIG. As described with reference to FIG. 13, the analysis target element is selected when the process of the flowchart illustrated in FIG. 14 is started.
ステップS1201では、CPUは図13のステップS803において抽出された全要素からいずれかの要素を比較対象として選択する。続くステップS1202では、CPUは同時修正関係DB122を参照し、解析対象要素と比較対象の要素の同時修正回数をカウントする。具体的には、同時修正関係DB122には図7において丸で示したようにリビジョンごとに修正された要素が示されているので、全リビジョンを対象として、解析対象要素および比較対象の要素の両方に丸が付されるリビジョンの数をカウントする。続くステップS1203では、ステップS1202におけるカウント回数が3回以上であるか否かを判断する。3回以上と判断する場合はステップS1204に進んでリストアップした後にステップS1205に進み、3回未満と判断する場合はそのままステップS1205に進む。
In step S1201, the CPU selects one of all elements extracted in step S803 in FIG. 13 as a comparison target. In the following step S1202, the CPU refers to the simultaneous
ステップS1205ではCPUはステップS803において抽出された全要素が比較対象として選択されたか否かを判断し、全要素を選択したと判断する場合は図14のフローチャートを終了し、選択していない要素があると判断する場合はステップS1206に進む。ステップS1206では、図13のステップS803において抽出された全要素から、これまでにステップS1201および本ステップにおいて選択されていない要素を選択し、ステップS1202に戻る。以上の処理により解析対象要素と同時修正関係にある要素がリストアップされる。図4に例示した要素間の関係において双方向矢印で示した同時修正関係は、図14の処理によってリストアップされたものを表している。なおステップS1203では閾値を「3」としたが他の値でもよい。 In step S1205, the CPU determines whether all the elements extracted in step S803 have been selected as comparison targets. If it is determined that all the elements have been selected, the flowchart in FIG. If it is determined that there is, the process proceeds to step S1206. In step S1206, elements which have not been selected in step S1201 and this step are selected from all the elements extracted in step S803 in FIG. 13, and the process returns to step S1202. By the above processing, the elements having the simultaneous correction relation with the analysis target element are listed up. The simultaneous correction relationships indicated by the double-headed arrows in the relationships between the elements illustrated in FIG. 4 represent those listed up by the process of FIG. Although the threshold is set to "3" in step S1203, another value may be used.
(動作例)
図4に例示する要素間の関係を有し、図13のステップS803において差分として検出された要素がFuncAである場合に、図13のステップS804以下において影響出力リスト900がどのように出力されるか説明する。なお上述したフローチャートではステップS812において影響出力リスト900が出力されるとしたが、本動作例では動作との対応を明確にするために影響出力リスト900は適宜出力されることとする。
(Operation example)
If there is a relationship between the elements illustrated in FIG. 4 and the element detected as the difference in step S 803 in FIG. 13 is FuncA, the
まずステップS804においてFuncAが選択されてステップS806およびステップS807が実行される。ステップS806では、呼び出し関係や被呼び出し関係にある「ValueA」や「FuncG」、「FuncD」がリストアップされ、これに基づき図9に示す影響出力リスト900の1行目から3行目まで作成される。すなわちこれらの修正影響タイプ1104がそれぞれ「呼び出し」、「被呼び出し」、「呼び出し」として出力される。これが呼び出し関係の1段目の影響範囲である。またステップS807ではFuncAと同時修正関係にある「FuncC」がリストアップされ、図9の4行目に修正影響タイプ1104が「同時修正」として出力される。これが、同時修正関係の1段目の影響範囲である。
First, in step S804, FuncA is selected, and steps S806 and S807 are executed. In step S806, "Value A", "Func G", and "F unc D" which are in a calling relationship and a called relationship are listed up, and based on this, the first to third lines of the
ステップS806およびステップS807においてそれぞれリストアップがされているので、ステップS808は肯定判定され、リストアップされたいずれの要素も解析されていないのでステップS809も肯定判定される。そしてステップS811においてリストアップしたいずれかの要素、たとえばFuncDが解析対象要素に選択される。そして、呼び出し関係にあるFuncHがリストアップされ(S806)、および同時修正関係にあるFuncFがリストアップされる(S807)。このFuncHは、修正要素であるFuncAから直前関係の欄1103に記載されるFuncDを経由して、2段目の呼び出し関係となる。そのため図9に示す影響出力リスト900において、修正影響タイプ1104には「呼び出し、呼び出し」と格納される。このように表示することで、ユーザは修正要素との関係を正確に把握することができる。
Since each list is listed in step S806 and step S807, step S808 is affirmed, and none of the listed elements is analyzed, so step S809 is also affirmed. Then, one of the elements listed up in step S811, for example, FuncD, is selected as the analysis target element. Then, FuncHs in a calling relationship are listed up (S806), and FuncFs in a simultaneous correction relationship are listed up (S807). This FuncH becomes a second stage call relation from the correction element FuncA via the FuncD described in the
同様に図9に示す影響出力リスト900の6行目のFuncFは、修正要素であるFuncAから直前関係の欄1103に記載されるFuncDを経由して呼び出し関係1段、同時修正関係1段の関係となる。そのため図9に示す影響出力リスト900において、修正影響タイプ1104には「呼び出し、同時修正」と表示される。ステップS808〜S809では先ほどと同様に肯定判定されるので、未解析の要素がなくなるまで解析処理を繰り返す。
Similarly, on the sixth line of the
上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)ソースコードにそれぞれ記載される関数または変数である複数の要素について、ソースコードの修正履歴、すなわちリビジョンごとの差分において同時に修正された要素の組み合わせが記録される同時修正関係DB122が格納される端末記憶部120と、複数の要素のうち修正の対象となる修正要素を特定する修正要素特定部(図13のステップS803)と、複数の要素のうち修正要素を修正することにより影響を受ける被影響要素を同時修正関係DB122を用いて判定し出力する影響箇所解析判定部113とを備える。
そのため過去に同時に修正されていたことに基づいて、その一方が修正された場合に他方を出力するので、ソースコード上で呼び出し関係になくても、同時に修正すべき可能性が高い要素を検出することができる。たとえば表示に関する処理と機能に関する処理がソースコード上で呼び出し関係になくても、過去の同時修正関係を示す同時修正関係DB122を参照することで、機能や動作的に関係のある要素を検出して出力し、ユーザに注意を促すことができる。
According to the first embodiment described above, the following effects can be obtained.
(1) For a plurality of elements which are functions or variables described respectively in the source code, a correction history of the source code, that is, a simultaneous
Therefore, based on having been corrected at the same time in the past, when one of them is corrected, the other is output, so that it is possible to detect an element that is likely to be corrected at the same time be able to. For example, even if the processing related to display and the processing related to the function are not in the calling relation on the source code, by referring to the simultaneous
(2)端末記憶部120には、ソースコードにおける要素の呼び出し関係が記録される呼び出し関係DB121が格納される。影響箇所解析判定部113は、同時修正関係DB122および呼び出し関係DB121を用いて被影響要素を判定する。そのため影響箇所解析判定部113は、同時修正関係にある要素だけでなく呼び出し関係にある要素、および同時修正関係と呼び出し関係の複合的な関係にある要素も影響出力リスト900に出力することができる。すなわち、呼び出し関係と同時修正関係の片方だけずつに注目していては見落としてしまうような、修正の影響を受ける要素も出力することができる。
(2) The
(3)影響箇所解析判定部113は、同時修正関係DB122を用いて、同時に修正された回数が予め定められた回数、たとえば3回以上である要素の組み合わせに基づき被影響要素を判定する。そのため影響箇所解析判定部113は、同時修正関係にあるか否かを簡易に判定することができる。
(3) The influential part analysis /
(4)影響箇所解析判定部113は、被影響要素について、修正要素との関連性を修正影響タイプ1104として出力する。そのため、修正要素と影響を受ける要素の関係の理解を促すことができる。
(4) The influence point analysis /
(5)端末装置100は、修正要素を特定する情報が入力される入力部140を備える。修正要素特定部(図13のステップS803)は修正前後のソースコードの差分に基づき修正要素を特定する。そのためユーザが調査対象の要素を逐一入力する必要がなく、調査対象の要素を漏れなく検出することができる。
(5) The
(6)端末装置100は、ソースコードの修正履歴に基づき同時修正関係DB122を作成し、端末記憶部120に格納する同時修正関係検出部112を備える。
(6) The
(7)影響出力システム1は、端末装置100およびサーバ200を備える。端末装置100は、サーバ200からソースコードの修正履歴を受信する端末通信部150と、影響箇所解析判定部113が出力する影響出力リスト900を表示部130に表示させる入出力処理部114を備える。サーバ200は、ソースコードの修正履歴を格納するサーバ記憶部220と、端末装置100にソースコードの修正履歴を送信するサーバ通信部250とを備える。
(7) The
(8)端末装置100の不図示のROMには以下のプログラムが格納される。すなわちそのプログラムは、ソースコードに記載される関数または変数である要素について、プログラムのソースコードの修正履歴に基づき同時に修正された要素の対応が記録される同時修正関係DB122が格納される端末記憶部120を備える端末装置100に、修正することによる影響範囲の調査対象となる要素である修正要素を特定させること(図13のステップS803)と、修正要素を修正することにより影響を受ける要素を同時修正関係情報を用いて判定させ(図13のステップS807)、その判定の結果を出力させること(図13のステップS812)を実現させる。
(8) The following program is stored in a ROM (not shown) of the
プログラムの動作を変形例1〜変形例3のように変更してもよい。
(変形例1)
図15は、変形例1における図13のステップS807の詳細を示す図である。換言すると、変形例1においてCPUは図14により動作が表されるプログラムに代えて、図15により動作が表されるプログラムを実行する。図15と図14との違いは、図14のステップS1203が図15ではステップS1203Aに置換されている。
The operation of the program may be changed as in the first to third modifications.
(Modification 1)
FIG. 15 is a diagram showing details of step S807 in FIG. 13 in the first modification. In other words, in the first modification, the CPU executes a program whose operation is represented by FIG. 15 instead of the program whose operation is represented by FIG. 14. The difference between FIG. 15 and FIG. 14 is that step S1203 in FIG. 14 is replaced with step S1203A in FIG.
ステップS1203Aでは、CPUは解析対象要素の修正回数とステップS1202においてカウントした同時修正回数との比率が75%以上であるか否かを判断する。75%以上であると判断する場合はステップS1204に進み、75%未満であると判断する場合はステップS1205に進む。 In step S1203A, the CPU determines whether the ratio between the number of corrections of the analysis target element and the number of simultaneous corrections counted in step S1202 is 75% or more. If it is determined that it is 75% or more, the process proceeds to step S1204. If it is determined that it is less than 75%, the process proceeds to step S1205.
この変形例1によれば、次の作用効果が得られる。
(9)影響箇所解析判定部113は、同時修正関係DB122を用いて、同時に修正された回数の総修正回数に対する比率が予め定められた比率以上である要素の組み合わせに基づき影響を受ける要素を判定する。そのため修正の総回数が増えても閾値をその都度変更する必要がない。
According to the first modification, the following effects can be obtained.
(9) Using the simultaneous
(変形例2)
図16は、変形例2における図13のステップS807の詳細を示す図である。換言すると、変形例2においてCPUは図14により動作が表されるプログラムに代えて、図16により動作が表されるプログラムを実行する。図16と図14との違いは、ステップS1203において否定判定された場合の処理である。
(Modification 2)
FIG. 16 is a diagram showing details of step S 807 in FIG. 13 in the second modification. In other words, in the second modification, the CPU executes a program whose operation is represented by FIG. 16 instead of the program whose operation is represented by FIG. The difference between FIG. 16 and FIG. 14 is the processing when the negative determination is made in step S1203.
ステップS1203において否定判定されると実行されるステップS1211では、CPUはステップS1202におけるカウント回数が2であるか否かを判断する。カウント回数が2であると判断するとステップS1212に進み、カウント回数が2以外、すなわち1またはゼロと判断するとステップS1205に進む。ステップS1212では、CPUは同時修正が直近の2リビジョン以内であったか否かを判断し、2リビジョン以内であると判断する場合はステップS1204に進み、2リビジョン以内ではないと判断する場合はステップS1205に進む。 In step S1211, which is executed when a negative determination is made in step S1203, the CPU determines whether the number of counts in step S1202 is two. If it is determined that the number of counts is 2, the process proceeds to step S1212, and if it is determined that the number of counts is other than 2, that is, 1 or zero, the process proceeds to step S1205. In step S1212, the CPU determines whether or not the simultaneous correction is within the last two revisions. If it is determined that it is within two revisions, the process proceeds to step S1204. If it is determined that it is not within two revisions, the process proceeds to step S1205. move on.
この変形例2によれば、次の作用効果が得られる。
(10)影響箇所解析判定部113は、同時修正関係DB122を用いて、同時に修正された回数と予め定められた回数の閾値との関係、および修正された時期と予め定められた時期の閾値との関係の組み合わせに基づき影響を受ける要素を判定する。直近に修正があった箇所については、潜在的な不具合を含む可能性が高いことを考慮し、修正された時期を考慮した影響出力リスト900を作成することができる。
According to the second modification, the following effects can be obtained.
(10) The influence point
(変形例3)
図17は、変形例3において第1の実施の形態における図13のフローチャートの動作を一部変更するものである。ステップS809まで、およびステップS810以降の処理は第1の実施の形態と同様なので、図17への記載およびそれらの動作の説明を省略する。ステップS809において肯定判定されると実行されるステップS851では、解析対象要素と比較対象要素の呼び出し関係の段数と同時修正関係の段数を取得する。続くステップS852では、呼び出し関係が3段以内か否かを判断する。肯定判断する場合はステップS853に進み、否定判断をする場合はステップS810に進む。ステップS853では、同時修正関係が2段以内か否かを判断する。肯定判断する場合はステップS811に進み、否定判断をする場合はステップS810に進む。すなわち、呼び出し関係または同時修正関係が所定の段数以上の場合は、それ以上の解析を行わない。
(Modification 3)
FIG. 17 partially changes the operation of the flowchart of FIG. 13 in the first embodiment in the third modification. The processes up to step S809 and the processes after step S810 are the same as those of the first embodiment, and thus the description in FIG. 17 and the description of the operation thereof will be omitted. In step S851, which is executed when an affirmative determination is made in step S809, the number of stages of the call relationship between the analysis target element and the comparison target element and the number of stages of the simultaneous correction relationship are acquired. In the following step S852, it is determined whether or not the calling relationship is within three stages. If a positive determination is made, the process proceeds to step S853, and if a negative determination is made, the process proceeds to step S810. In step S853, it is determined whether the simultaneous correction relationship is within two stages. If the determination is affirmative, the process proceeds to step S811. If the determination is negative, the process proceeds to step S810. That is, when the calling relationship or the simultaneous correction relationship is equal to or more than the predetermined number of stages, no further analysis is performed.
この変形例3によれば、次の作用効果が得られる。
(11)影響箇所解析判定部113は、修正要素に対する呼び出し段数および同時修正段数に基づき被影響要素を判定する。換言すると影響箇所解析判定部113は、呼び出し段数および同時修正段数が所定の段数以上になる場合は被影響要素の探索を中断する。そのため、解析対象が際限なく広がることを防止して処理時間を短縮することができる。また段数が多いほど修正対象要素との関連が薄いことが想定されるため、修正対象要素との関連が希薄な要素が影響出力リスト900に記載されることを防止できる。
According to the third modification, the following effects can be obtained.
(11) The influence point
(変形例4)
上述した実施の形態では、ユーザがソースコードを修正した後にその修正の影響を出力した。しかしユーザによるソースコードの修正の有無にかかわらず、ある要素を修正した場合に影響を受ける要素を出力してもよい。この場合は、修正差分検出部115が修正ソースコード124と登録ソースコード123の差分を検出することにより解析対象の要素を特定する代わりに、ユーザから指定される要素を解析対象の要素としてもよい。すなわち第1の実施の形態では修正された要素を「修正要素」と呼んだが、本変形例では変更されることによる影響を調査する対象を「修正要素」と呼ぶ。
(Modification 4)
In the embodiment described above, the effect of the correction is output after the user corrects the source code. However, regardless of whether or not the source code has been modified by the user, elements that are affected when certain elements are modified may be output. In this case, instead of specifying the analysis target element by detecting the difference between the
図18は、修正前影響チェック画面951の一例を示す図である。修正前影響チェック画面951は、修正前入力欄952と、調査対象要素入力欄953と、解析開始ボタン954と、リスト出力欄955とを備える。ユーザは修正前影響チェック画面951を呼び出し、修正前のソースコードのディレクトリを修正前入力欄952に入力し、調査対象とする要素、たとえばこれから修正する予定の要素を調査対象要素入力欄953に入力する。この入力により修正要素が決定される。そしてユーザが解析開始ボタン954を押下すると、修正要素を修正した場合に影響する要素のリストがリスト出力欄905に表示される。この変形例4によれば、ユーザがソースコードを修正する前にその影響を調査することができる。
FIG. 18 is a diagram showing an example of the pre-modification
(変形例5)
同時修正関係検出部112は、同時修正関係DB122を利用しやすいように加工して保存してもよい。図19は同時修正関係DB122を加工して得られた同時修正関係DB122Aの一例を示す図である。同時修正関係DB122Aは複数のレコードから構成され、各レコードは関数・変数603、修正回数604、同時修正回数605のフィールドを備える。関数・変数603のフィールドには、ソースコードに含まれる要素が格納される。関数・変数603のフィールドは図7に示す同時修正関係DB122の左端の列を転記することができる。修正回数604のフィールドには、関数・変数603のフィールドに格納される要素がこれまでに修正された回数が格納される。修正回数604のフィールドの値は、同時修正関係DB122において丸が記載された数をカウントすることにより得られる。同時修正回数605のフィールドには、それぞれの要素について、関数・変数603のフィールドに格納される要素と同時に修正された回数が格納される。同時修正回数605のフィールドの値は、図14のステップS1202と同様に同時修正関係DB122を参照することで得られる。この変形例によれば、同時修正関係DB122Aを用いることで同時修正関係にある要素のリストアップを容易に行うことができる。
(Modification 5)
The simultaneous correction
(変形例6)
端末装置100は表示部130および入力部140を備えなくてもよい。この場合は、端末装置100に接続された表示装置に入出力処理部114が映像信号を出力し、端末装置100に接続された入力装置から入出力処理部114に入力信号が入力される。
(Modification 6)
The
(変形例7)
同時修正関係DB122に保存される情報の形式は図8に示す形式に限定されない。すなわち図8に示されている情報が含まれていれば、どのような形態で格納されてもよい。
(Modification 7)
The format of the information stored in the simultaneous
(変形例8)
同時修正関係検出部112は、構成管理DB221に格納されている全てのリビジョンのソースコードを処理対象としたが、特定の条件に該当するソースコードのみを処理対象としてもよい。たとえば、直近の1年間に生成されたリビジョンのみを処理対象としてもよいし、特定のバージョン以降のリビジョンのみを処理対象としてもよい。さらに、リビジョン間の比較ではなくバージョン番号が付されているリビジョンのみを処理対象としてもよい。また最新のソースコードを基準として影響を調査するだけではなく、過去の特定のリビジョンを基準として影響を調査して出力してもよい。たとえばリビジョン50において修正された要素の影響を調査して出力するためには、呼び出し関係検出部111はリビジョン50のソースコードを用いて呼び出し関係DB121を構築し、同時修正関係検出部112はリビジョン49までのソースコードを用いて同時修正関係DB122を構築し、修正差分検出部115はリビジョン50とリビジョン49のソースコードの差分から修正要素を検出する。
(Modification 8)
The simultaneous modification
(変形例9)
影響出力リスト900の修正影響タイプ1104には、より具体的な関連性を格納してもよい。すなわち、修正要素と影響要素の間に介在する全ての要素も関係性とともに記載してもよい。たとえば、FuncAを修正することによりFuncBは影響を受けるが、FuncAと同時修正関係にあるのがFuncCであり、FuncCと被呼び出し関係にあるのがFuncBなので、修正影響タイプ1104を「同時修正―FuncC−被呼び出し」と記載してもよい。
(Modification 9)
The
(変形例10)
端末装置100は呼び出し関係検出部111および呼び出し関係DB121を備えず、呼び出し関係を評価しなくてもよい。この場合は、影響出力リスト900には同時修正関係の影響のみが記載される。
(Modification 10)
The
―第2の実施の形態―
図20を参照して、影響出力システムの第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、サーバに同時修正関係検出部が備えられる点で、第1の実施の形態と異なる。
-Second embodiment-
A second embodiment of the influence output system will be described with reference to FIG. In the following description, the same components as in the first embodiment will be assigned the same reference numerals and differences will be mainly described. The points that are not particularly described are the same as in the first embodiment. The present embodiment differs from the first embodiment mainly in that the server is provided with a simultaneous correction relationship detection unit.
(構成)
図20は、第2の実施の形態における影響出力システム1Aのシステム構成を示す図である。影響出力システム1Aは、ユーザが操作する端末装置100Aと、ネットワークを介して端末装置100Aに接続されるサーバ200Aとを備える。端末装置100Aは、第1の実施の形態における端末装置100の構成から同時修正関係検出部112を除いた構成を有する。端末装置100Aは、サーバ200Aから受信する同時修正関係DB222を同時修正関係DB122として端末記憶部120に記録する。サーバ200Aは、第1の実施の形態におけるサーバ200Aの構成に加えて、同時修正関係検出部212をさらに備え、サーバ記憶部220には同時修正関係検出部212が生成する同時修正関係DB222がさらに格納される。同時修正関係検出部212は、構成管理DB221を用いて同時修正関係DB222を生成する。
(Constitution)
FIG. 20 is a diagram showing a system configuration of the influence output system 1A in the second embodiment. The influence output system 1A includes a
(動作)
端末装置100Aは、定期的に、または同時修正関係DB122を参照する前にサーバ200Aに同時修正関係DB222の送付を要求する。サーバ200Aの同時修正関係検出部212は、定期的に、または端末装置100Aからの要求を受けてから同時修正関係DB222を生成する。構成管理DB221の生成方法は第1の実施の形態における同時修正関係DB122と同様なので説明を省略する。サーバ通信部250は、端末装置100Aからの要求に基づき同時修正関係DB222を端末装置100Aに送信する。
(Operation)
The
上述した第2の実施の形態によれば、次の作用効果が得られる。
(1)端末装置100Aは、サーバ200Aから同時修正関係DB222を受信する端末通信部150と、影響箇所解析判定部113の出力を表示部130に表示させる入出力処理部114とを備える。サーバ200Aは、ソースコードの修正履歴に基づき同時修正関係DB222を作成する同時修正関係検出部212と、同時修正関係検出部212が作成した同時修正関係DB222を端末装置100Aに送信するサーバ通信部250とを備える。そのため、端末装置100Aの処理負荷を軽減できる。
According to the second embodiment described above, the following effects can be obtained.
(1) The
―第3の実施の形態―
図21を参照して、影響出力システムの第3の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、端末装置だけで動作が完結する点で、第1の実施の形態と異なる。
-Third embodiment-
A third embodiment of the influence output system will be described with reference to FIG. In the following description, the same components as in the first embodiment will be assigned the same reference numerals and differences will be mainly described. The points that are not particularly described are the same as in the first embodiment. The present embodiment differs from the first embodiment mainly in that the operation is completed only by the terminal device.
(構成)
図21は、第3の実施の形態における影響出力システム1Bのシステム構成を示す図である。影響出力システム1Bは、ユーザが操作する端末装置100Bを備える。端末装置100Bは、第1の実施の形態における端末装置100の構成に加えて、端末記憶部120に構成管理DB125を備える。
(Constitution)
FIG. 21 is a diagram showing a system configuration of the
(動作)
端末装置100Bは、第1の実施の形態ではソースコードの登録処理をサーバに対して行っていたが、本実施の形態では端末記憶部120の構成管理DB125に対して行う。また構成管理DB125へ書き込む際に、端末処理部110は第1の実施の形態におけるサーバ処理部210と同様に履歴情報225を生成する。
(Operation)
In the first embodiment, the
上述した第3の実施の形態によれば、端末装置100Bだけで処理を完結させることができる。
According to the third embodiment described above, the process can be completed only by the
―第4の実施の形態―
図22を参照して、影響出力システムの第4の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、ほとんどの処理をサーバが実行する点で、第1の実施の形態と異なる。
-Fourth Embodiment-
A fourth embodiment of the influence output system will be described with reference to FIG. In the following description, the same components as in the first embodiment will be assigned the same reference numerals and differences will be mainly described. The points that are not particularly described are the same as in the first embodiment. The present embodiment differs from the first embodiment mainly in that the server executes most of the processing.
(構成)
図22は、第4の実施の形態における影響出力システム1Cのシステム構成を示す図である。影響出力システム1Cは、ユーザが操作する端末装置100Cと、ネットワークを介して端末装置100Cに接続されるサーバ200Cとを備える。端末装置100Cは、入出力処理部114と、表示部130と、入力部140と、端末通信部150とを備える。サーバ200Cは、第1の実施の形態におけるサーバ200の構成に加えて、呼び出し関係検出部211、同時修正関係検出部212、影響箇所解析判定部213、入出力処理部214および修正差分検出部215を備える。これらの動作は、第1の実施の形態において端末装置100に備えられた同一名称の構成と同様である。またサーバ記憶部220には、呼び出し関係DB221、同時修正関係DB222、登録ソースコード223、および修正ソースコード224が格納される。
(Constitution)
FIG. 22 is a diagram showing a system configuration of the influence output system 1C in the fourth embodiment. The influence output system 1C includes a
(動作)
本実施の形態では、ユーザの入力部140からの入力は逐一サーバ200Cに送信され、サーバ200Cにおいて処理された結果が映像信号として端末装置100Cに送信されて表示部130に表示される。すなわち、図8に示した修正影響チェック画面901への入力など、影響箇所解析判定部113が解析対象とする要素を決定するために必要な情報も、端末通信部150を介してサーバ200Cに送信される。そしてサーバ200Cにおいて生成された影響出力リスト900を端末通信部150がサーバ200Cから受信し、入出力処理部114が表示部130に表示する。
(Operation)
In the present embodiment, the input from the user's
上述した第3の実施の形態によれば、次の作用効果が得られる。
(1)サーバ200Cは、影響箇所解析判定部213の出力を端末装置100Cに送信するサーバ通信部250を備える。端末装置100Cは、サーバ200Cから影響箇所解析判定部213の出力を受信する端末通信部150と、影響箇所解析判定部213の出力を表示部130に表示させる入出力処理部114とを備える。端末通信部150は、サーバ200Cの修正要素特定部(図13のステップS803)が修正要素を特定するために必要な情報を送信する。そのため端末装置の処理を大幅に削減することができる。
According to the third embodiment described above, the following effects can be obtained.
(1) The
プログラムは不図示のROMに格納されるとしたが、プログラムは端末記憶部120に格納されていてもよい。また、端末装置100が不図示の入出力インタフェースを備え、必要なときに入出力インタフェースと端末装置100が利用可能な媒体を介して、他の装置からプログラムが読み込まれてもよい。ここで媒体とは、例えば入出力インタフェースに着脱可能な記憶媒体、または通信媒体、すなわち有線、無線、光などのネットワーク、または当該ネットワークを伝搬する搬送波やディジタル信号、を指す。また、プログラムにより実現される機能の一部または全部がハードウエア回路やFPGAにより実現されてもよい。
上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。
上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
Although the program is stored in the ROM (not shown), the program may be stored in the
Each embodiment and modification mentioned above may be combined respectively.
Although various embodiments and modifications have been described above, the present invention is not limited to these contents. Other embodiments considered within the scope of the technical idea of the present invention are also included within the scope of the present invention.
1、1A、1B、1C…影響出力システム
100、100A、100B、100C…端末装置
110…端末処理部
111、211…関係検出部
112、212…同時修正関係検出部
113、213…影響箇所解析判定部
114、214…入出力処理部
115、215…修正差分検出部
120…端末記憶部
121…呼び出し関係データベース
122…同時修正関係データベース
130…表示部
150…端末通信部
200、200A、200C…サーバ
210…サーバ処理部
220…サーバ記憶部
221…構成管理データベース
250…サーバ通信部
900…影響出力リスト
951…修正前影響チェック画面
1104…修正影響タイプ
1, 1A, 1B, 1C: influence
Claims (13)
前記複数の要素のうち修正の対象となる修正要素を特定する修正要素特定部と、
前記複数の要素のうち前記修正要素を修正することにより影響を受ける被影響要素を前記同時修正関係情報を用いて判定し出力する影響箇所解析判定部とを備える計算装置。 A storage unit storing simultaneous modification relation information in which a combination of the elements simultaneously modified in the modification history of the source code is recorded for a plurality of elements which are functions or variables respectively described in the source code;
A correction element identification unit that specifies a correction element to be corrected among the plurality of elements;
An influence location analysis determination unit that determines and outputs an affected element affected by correcting the correction element among the plurality of elements using the simultaneous correction relationship information.
前記記憶部には、前記ソースコードにおける前記要素の呼び出し関係が記録される呼び出し関係情報がさらに格納され、
前記影響箇所解析判定部は、前記同時修正関係情報および前記呼び出し関係情報を用いて前記被影響要素を判定する計算装置。 In the computing device according to claim 1,
The storage unit further stores call relation information in which a call relation of the element in the source code is recorded;
The said influence location analysis determination part is a calculation apparatus which determines the said influence factor using the said simultaneous correction relationship information and the said calling relationship information.
前記影響箇所解析判定部は、前記同時修正関係情報を用いて、同時に修正された回数が予め定められた回数以上である前記要素の組み合わせに基づき前記被影響要素を判定する計算装置。 In the computing device according to claim 1,
The said influence location analysis determination part is a calculation apparatus which determines the said influence factor based on the combination of the said factor whose frequency | count simultaneously corrected is more than predetermined frequency using the said simultaneous correction relationship information.
前記影響箇所解析判定部は、前記同時修正関係情報を用いて、同時に修正された回数の総修正回数に対する比率が予め定められた比率以上である前記要素の組み合わせに基づき前記被影響要素を判定する計算装置。 In the computing device according to claim 1,
The affected part analysis / determination part determines the influenced element based on the combination of the elements having a ratio of the number of simultaneous corrections to the total number of corrections equal to or more than a predetermined ratio using the simultaneous correction relation information. Computing device.
前記影響箇所解析判定部は、前記同時修正関係情報を用いて、同時に修正された回数と予め定められた回数の閾値との関係、および修正された時期と予め定められた時期の閾値との関係の組み合わせに基づき前記被影響要素を判定する計算装置。 In the computing device according to claim 1,
The affected part analysis / determination unit uses the simultaneous correction relationship information to determine the relationship between the number of simultaneous corrections and a predetermined number of threshold values, and the relationship between the corrected time and a predetermined threshold value. A computing device that determines the affected element based on a combination of
前記影響箇所解析判定部は、前記修正要素に対する呼び出し段数および同時修正段数に基づき前記被影響要素を判定する計算装置。 In the computing device according to claim 2,
The said influence location analysis determination part is a calculation apparatus which determines the said influence factor based on the number of calling stages with respect to the said correction element, and the number of simultaneous correction stages.
前記影響箇所解析判定部は、前記被影響要素について、前記修正要素との関連性を出力する計算装置。 In the computing device according to claim 2,
The said influence location analysis determination part is a calculation apparatus which outputs the relationship with the said correction element about the said influence element.
前記修正要素を特定する情報が入力される入力部をさらに備え、
前記修正要素特定部は前記ソースコードの修正前後の差分または前記入力部への入力に基づき前記修正要素を特定する計算装置。 In the computing device according to claim 1,
The information processing apparatus further comprises an input unit to which information specifying the correction element is input,
The correction element specifying unit specifies the correction element based on a difference before and after correction of the source code or an input to the input unit.
前記ソースコードの修正履歴に基づき前記同時修正関係情報を作成し、前記記憶部に格納する同時修正関係検出部をさらに備える計算装置。 In the computing device according to claim 1,
The computing device further comprising: a simultaneous correction relationship detection unit that creates the simultaneous correction relationship information based on the correction history of the source code and stores the same in the storage unit.
前記計算装置は、
前記サーバから前記ソースコードの修正履歴を受信する計算装置通信部と、
前記影響箇所解析判定部の出力を表示部に表示させる表示制御部とをさらに備え、
前記サーバは、
前記ソースコードの修正履歴を格納するサーバ記憶部と、
前記計算装置に前記ソースコードの修正履歴を送信するサーバ通信部とを備える影響出力システム。 An influence output system comprising the computing device according to claim 9 and a server,
The computing device
A computing device communication unit that receives the source code modification history from the server;
And a display control unit that causes the display unit to display the output of the affected area analysis determination unit,
The server is
A server storage unit for storing a correction history of the source code;
And a server communication unit that transmits the correction history of the source code to the computing device.
前記計算装置は、
前記サーバから前記同時修正関係情報を受信する計算装置通信部と、
前記影響箇所解析判定部の出力を表示部に表示させる表示制御部とをさらに備え、
前記サーバは、
前記ソースコードの修正履歴に基づき前記同時修正関係情報を作成する同時修正関係検出部と、
前記同時修正関係検出部が作成した前記同時修正関係情報を前記計算装置に送信するサーバ通信部とを備える影響出力システム。 An influence output system comprising the computing device according to claim 1 and a server,
The computing device
A computing device communication unit that receives the simultaneous correction relationship information from the server;
And a display control unit that causes the display unit to display the output of the affected area analysis determination unit,
The server is
A simultaneous correction relation detection unit that creates the simultaneous correction relation information based on the correction history of the source code;
And a server communication unit that transmits the simultaneous correction relationship information created by the simultaneous correction relationship detection unit to the computing device.
前記計算装置は、前記影響箇所解析判定部の出力を前記クライアントに送信する計算装置通信部をさらに備え、
前記クライアントは、
前記計算装置から前記影響箇所解析判定部の出力を受信するクライアント通信部と、
前記影響箇所解析判定部の出力を表示部に表示させる表示制御部とを備え、
前記クライアント通信部は、前記計算装置の前記修正要素特定部が前記修正要素を特定するために必要な情報を送信する影響出力システム。 An influence output system comprising the computing device according to claim 1 and a client,
The computing device further includes a computing device communication unit that transmits the output of the influence point analysis determination unit to the client,
The client is
A client communication unit that receives an output of the influence point analysis determination unit from the computing device;
And a display control unit that causes the display unit to display the output of the affected point analysis determination unit.
The influence output system wherein the client communication unit transmits information necessary for the correction element specification unit of the computing device to specify the correction element.
前記複数の要素のうち修正の対象となる修正要素を特定させることと、
前記複数の要素のうち前記修正要素を修正することにより影響を受ける被影響要素を前記同時修正関係情報を用いて判定させることと、を実現させるためのプログラム。 A computer comprising a storage unit in which simultaneous modification relation information is stored in which the correspondence of the elements simultaneously corrected in the correction history of the source code is recorded for a plurality of elements which are functions or variables respectively described in the source code ,
Specifying a correction element to be corrected among the plurality of elements;
A program for making it possible to determine an affected element affected by correcting the correction element among the plurality of elements using the simultaneous correction relation information.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017080951A JP6921598B2 (en) | 2017-04-14 | 2017-04-14 | Arithmetic logic unit, impact output system |
CN201810309230.4A CN108733558B (en) | 2017-04-14 | 2018-04-08 | Calculation device, influence output system, and influence determination method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017080951A JP6921598B2 (en) | 2017-04-14 | 2017-04-14 | Arithmetic logic unit, impact output system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018181020A true JP2018181020A (en) | 2018-11-15 |
JP6921598B2 JP6921598B2 (en) | 2021-08-18 |
Family
ID=63940634
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017080951A Active JP6921598B2 (en) | 2017-04-14 | 2017-04-14 | Arithmetic logic unit, impact output system |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6921598B2 (en) |
CN (1) | CN108733558B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019049294A1 (en) * | 2017-09-07 | 2019-03-14 | ヤマハ株式会社 | Code information extraction device, code information extraction method, and code information extraction program |
JP2021140433A (en) * | 2020-03-04 | 2021-09-16 | 株式会社日立製作所 | Development support method, development support device, and program |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113568662B (en) * | 2021-07-23 | 2024-04-30 | 中信银行股份有限公司 | Code change influence range analysis method and system based on calling relation |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014002565A (en) * | 2012-06-19 | 2014-01-09 | Hitachi Ltd | Effect range extraction method and effect range extraction program of application program |
CN103729579B (en) * | 2014-01-02 | 2016-11-16 | 北京深思数盾科技股份有限公司 | The method for protecting software of function level |
-
2017
- 2017-04-14 JP JP2017080951A patent/JP6921598B2/en active Active
-
2018
- 2018-04-08 CN CN201810309230.4A patent/CN108733558B/en active Active
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019049294A1 (en) * | 2017-09-07 | 2019-03-14 | ヤマハ株式会社 | Code information extraction device, code information extraction method, and code information extraction program |
JP2021140433A (en) * | 2020-03-04 | 2021-09-16 | 株式会社日立製作所 | Development support method, development support device, and program |
JP7296904B2 (en) | 2020-03-04 | 2023-06-23 | 株式会社日立製作所 | Development support method, development support device and program |
Also Published As
Publication number | Publication date |
---|---|
CN108733558B (en) | 2021-11-09 |
CN108733558A (en) | 2018-11-02 |
JP6921598B2 (en) | 2021-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11755387B1 (en) | Updating code of an app feature based on a value of a query feature | |
US8756593B2 (en) | Map generator for representing interrelationships between app features forged by dynamic pointers | |
US8589876B1 (en) | Detection of central-registry events influencing dynamic pointers and app feature dependencies | |
US10656924B2 (en) | System for displaying interrelationships between application features | |
US20150186195A1 (en) | Method of analysis application object which computer-executable, server performing the same and storage media storing the same | |
US11119886B2 (en) | Software analysis apparatus, software analysis method, and computer readable medium | |
JP6921598B2 (en) | Arithmetic logic unit, impact output system | |
JP2019219848A (en) | Source code analysis method and source code analysis device | |
US11960390B2 (en) | Test apparatus, test method and program | |
JP6562276B2 (en) | Information extraction apparatus, information extraction method, and information extraction program | |
CN114895997A (en) | Task association method and device and electronic equipment | |
US10007493B1 (en) | Event based validation | |
JP2013218381A (en) | Software evaluation support device and program | |
US20160224918A1 (en) | Business influenced part extraction method and business influenced part extraction device based on business variation | |
US10963244B2 (en) | Commit reversion detection | |
CN109101473B (en) | Method and apparatus for processing two-dimensional data table | |
US10515330B2 (en) | Real time visibility of process lifecycle | |
JP2020101898A (en) | Design drawing creation support method, design drawing creation support device, and design drawing creation support program | |
JP2010191580A (en) | File management method, system, and program | |
JP2018092466A (en) | Modification-originated influence examination supporting apparatus, modification-originated influence examination supporting method and modification-originated influence examination supporting program | |
JP2008077569A (en) | Measure management program, measure management device, and measure management method | |
JP2023030849A (en) | Information processing apparatus, information processing method, and program | |
JP2010205162A (en) | Module information creation device, module information creation method of the same, and program | |
CN115509543A (en) | Method and device for determining document validity, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200116 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20201225 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210202 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210322 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210706 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210728 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6921598 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |