JP6506108B2 - PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM - Google Patents

PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM Download PDF

Info

Publication number
JP6506108B2
JP6506108B2 JP2015118015A JP2015118015A JP6506108B2 JP 6506108 B2 JP6506108 B2 JP 6506108B2 JP 2015118015 A JP2015118015 A JP 2015118015A JP 2015118015 A JP2015118015 A JP 2015118015A JP 6506108 B2 JP6506108 B2 JP 6506108B2
Authority
JP
Japan
Prior art keywords
influence
dependency
code
program
node
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.)
Active
Application number
JP2015118015A
Other languages
Japanese (ja)
Other versions
JP2017004282A (en
Inventor
裕亮 木下
裕亮 木下
正己 斎藤
正己 斎藤
典彦 鎌田
典彦 鎌田
克貴 藤澤
克貴 藤澤
貴宏 長谷川
貴宏 長谷川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Communication Systems Ltd
Original Assignee
NEC Communication Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Communication Systems Ltd filed Critical NEC Communication Systems Ltd
Priority to JP2015118015A priority Critical patent/JP6506108B2/en
Publication of JP2017004282A publication Critical patent/JP2017004282A/en
Application granted granted Critical
Publication of JP6506108B2 publication Critical patent/JP6506108B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、プログラム表示装置、プログラム表示システム、プログラム表示方法、及びプログラム表示プログラムに関する。   The present invention relates to a program display device, a program display system, a program display method, and a program display program.

ソフトウェア開発において、プログラムのコードの変更は頻繁に行われる。コードの変更が行われる際には、コードの変更による影響が及ぶ範囲が、静的解析ツールにより出力されたコードの構造図等を用いて、人手により確認されることが多い。   In software development, program code changes occur frequently. When a code change is made, the range affected by the code change is often manually confirmed using a structure diagram of the code output by the static analysis tool.

近年、コードの特定の箇所を変更した際の、変更の他の箇所への影響の伝播の仕方を調べるプログラム分析技術が開発されてきた。   In recent years, program analysis techniques have been developed to find out how to propagate the impact of changes to other parts of the code as it is changed.

コード変更の影響伝播を分析するプログラム分析技術の一例が、特許文献1に開示されている。特許文献1のプログラム解析装置は、以下のように動作する。特許文献1のプログラム解析装置は、ソースプログラムに記述されている代入式の、代入先の変数及び代入元の変数を矩形で表示する。また、特許文献1のプログラム解析装置は、代入元の変数と代入先の変数との依存関係を、代入元を示す矩形から代入先を示す矩形に向かう矢印で表示する。上記の動作の結果、特許文献1のプログラム解析装置は、ソースプログラムにおける変数間の依存関係を、図形で表示する。   Patent Document 1 discloses an example of a program analysis technique for analyzing the effect propagation of code change. The program analysis device of Patent Document 1 operates as follows. The program analysis device of Patent Document 1 displays, as rectangles, a substitution destination variable and a substitution source variable of the substitution expression described in the source program. Further, the program analysis device of Patent Document 1 displays the dependency between the substitution source variable and the substitution destination variable from the rectangle indicating the substitution source to the arrow indicating the substitution destination. As a result of the above operation, the program analysis device of Patent Document 1 displays the dependency between variables in the source program as a graphic.

また、コード変更の影響伝播を分析するプログラム分析技術の別の一例が、特許文献2に開示されている。特許文献2の影響範囲設定装置は、以下のように動作する。まず、特許文献2の影響範囲設定装置は、プログラムのソースコードの構文解析により命令文を検索し、検索された命令文間の依存関係に従って命令文の繋がりを形成する。次に、特許文献2の影響範囲設定装置は、特定の命令文を影響の基点とする、命令文間の繋がりによる依存関係グラフを形成し、依存関係にある影響波及範囲を設定する。上記の動作の結果、特許文献2の影響範囲設定装置は、特定の命令文を影響の基点とする、ソースコードにおける影響波及範囲を、図形で表示する。   Further, another example of a program analysis technique for analyzing the influence propagation of code change is disclosed in Patent Document 2. The influence range setting device of Patent Document 2 operates as follows. First, the influence range setting device of Patent Document 2 searches for an instruction sentence by syntactic analysis of the source code of the program, and forms a connection of the instruction sentence according to the dependency between the retrieved instruction sentences. Next, the influence range setting device of Patent Document 2 forms a dependency relation graph based on a connection between instruction sentences, which uses a specific instruction sentence as a base point of influence, and sets an influence extension range that is in a dependency relation. As a result of the above operation, the influence range setting device of Patent Document 2 graphically displays the influence extension range in the source code, which uses a specific command sentence as a base point of influence.

特開平08−190475号公報Japanese Patent Application Publication No. 08-190475 WO2012/133606号公報WO 2012/133606

しかしながら、特許文献1や特許文献2のプログラム分析技術では、図形で表示された各箇所と、ソースコードの特定箇所との間の対応関係が表示されない。したがって、特許文献1や特許文献2のプログラム分析技術では、ユーザはソースコードの特定箇所と図形の各箇所との間の対応関係を別途確認しなければならないという問題点がある。
(発明の目的)
本発明の主たる目的は、プログラムのコードの特定の箇所を変更した際の、変更の他の箇所への影響の伝播の仕方を、コードにおける影響が及ぶ箇所に対応付けて表示することができるプログラム表示装置、プログラム表示システム、プログラム表示方法、及びプログラム表示プログラムを提供することにある。
However, in the program analysis techniques of Patent Document 1 and Patent Document 2, the correspondence between each portion displayed in a graphic form and the specified portion of the source code is not displayed. Therefore, in the program analysis techniques of Patent Document 1 and Patent Document 2, there is a problem that the user has to separately confirm the correspondence between the specific portion of the source code and each portion of the figure.
(Object of the Invention)
The main object of the present invention is to provide a program capable of displaying the manner of propagation of the effect of the change to another portion of the code of the program in association with the affected portion of the code. A display device, a program display system, a program display method, and a program display program.

本発明のプログラム表示装置は、プログラムのコードにおいて変更がなされた際に変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報に基づいて、影響箇所を示すノード、及び依存関係の依存先に対応するノードから依存関係の依存元に対応するノードへの有向辺である影響線を含む、グラフを、コードに重ね合わせた描画データを出力するグラフ生成手段を備えることを特徴とする。   The program display device of the present invention is a node indicating an influence point based on influence information including dependency information between influence points which are variables influenced by the change when a change is made in a code of the program, And a graph generation unit for outputting drawing data obtained by superimposing a graph on a code, including an influence line which is a directed side from a node corresponding to a dependency dependency destination to a node corresponding to a dependency dependency dependency source It is characterized by

本発明のプログラム表示システムは、プログラムのコードにおいて変更がなされた際に変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報を生成するプログラム分析装置と、影響情報に基づいて、影響箇所を示すノード、及び依存関係の依存先に対応するノードから依存関係の依存元に対応するノードへの有向辺である影響線を含む、グラフを、コードに重ね合わせた描画データ出力するグラフ生成手段を含むプログラム表示装置と、描画データを描画する描画装置と、を備えることを特徴とする。   The program display system according to the present invention is a program analysis apparatus that generates influence information including dependency information between influence points that are variables that are affected by a change when a change is made in a program code, and an influence information Based on the graph, including a node that indicates the point of influence and an influence line that is a directed edge from the node corresponding to the dependency dependency destination to the node corresponding to the dependency dependency source, superimposed on the code A program display apparatus including graph generation means for outputting drawing data and a drawing apparatus for drawing drawing data are provided.

本発明のプログラム表示方法は、プログラムのコードにおいて変更がなされた際に変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報に基づいて、影響箇所を示すノード、及び依存関係の依存先に対応するノードから依存関係の依存元に対応するノードへの有向辺である影響線を含む、グラフを、コードに重ね合わせた描画データを出力することを特徴とする。   The program display method of the present invention is a node indicating an influence point based on influence information including dependency information between influence points which are variables influenced by the change when a change is made in a code of the program, And a graph including an influence line which is a directed side from a node corresponding to the dependency dependency destination to a node corresponding to the dependency dependency source, and outputting drawing data superimposed on the code. .

本発明のプログラム表示プログラムは、プログラムのコードにおいて変更がなされた際に変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報に基づいて、影響箇所を示すノード、及び依存関係の依存先に対応するノードから依存関係の依存元に対応するノードへの有向辺である影響線を含む、グラフを、コードに重ね合わせた描画データを出力するグラフ生成処理をコンピュータに実行させることを特徴とする。   The program display program of the present invention is a node indicating an influence point based on influence information including dependency information between influence points which are variables influenced by the change when a change is made in a code of the program, And a graph generation process for outputting drawing data obtained by superimposing a graph on a code, including an influence line which is a directed edge from a node corresponding to a dependency dependency destination to a node corresponding to a dependency dependency dependency source It is characterized in that

本発明によれば、プログラムのコードの特定の箇所を変更した際の、変更の他の箇所への影響の伝播の仕方を、コードにおける影響が及ぶ箇所に対応付けて表示することができるという効果がある。   According to the present invention, the method of propagating the influence of the change to another part of the code when changing the specific part of the program code can be displayed in association with the part where the influence is exerted in the code. There is.

本発明の実施形態のプログラム表示装置の構成の一例を示すブロック図である。It is a block diagram showing an example of composition of a program display device of an embodiment of the present invention. 本発明の実施形態のプログラム表示装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の処理対象のプログラムのコードの具体例を説明するための図である。It is a figure for demonstrating the specific example of the code of the program of the process target of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の影響情報に含まれる影響箇所の座標の具体例を説明するための図である。It is a figure for demonstrating the specific example of the coordinate of the influence location contained in the influence information of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の影響情報に含まれる影響箇所の依存関係の具体例を説明するための図である。It is a figure for demonstrating the specific example of the dependence of the influence location contained in the influence information of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の影響の伝わり方を示す描画データの具体例を説明するための図である。It is a figure for demonstrating the specific example of the drawing data which show how to convey the influence of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の処理対象のプログラムのコードの別の具体例を説明するための図である。It is a figure for demonstrating another specific example of the code of the program of the process target of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の影響の伝わり方を示す描画データの別の具体例を説明するための図である。It is a figure for demonstrating another specific example of the drawing data which show how to convey the influence of the program display apparatus of embodiment of this invention. 本発明の実施形態のプログラム表示装置の、グラフが関数ノードを含む場合の影響の伝わり方を示す描画データの具体例を説明するための図である。It is a figure for demonstrating the specific example of the drawing data which show how how the influence in case the graph contains a function node of the program display apparatus of embodiment of this invention is shown. 本発明の実施形態のプログラム表示装置の、グラフが関数ノードを含む場合の動作を示すフローチャートである。It is a flowchart which shows operation | movement in case the graph in the program display apparatus of embodiment of this invention contains a function node.

以下、本発明の実施形態について、図面を参照して詳細に説明する。なお、すべての図面において、同等の構成要素には同じ符号を付し、適宜説明を省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In all the drawings, the same components are denoted by the same reference numerals, and the description thereof will be appropriately omitted.

まず、以下の説明で用いられる用語について説明する。   First, terms used in the following description will be described.

プログラムのコードの「変更」とは、変数や値を新たにコードに追加したり、コードに記述されていた変数や値を削除したり、またはコードに記述されていた変数や値を別の変数や値に変更することである。なお、変数には、関数名(関数の戻り値を示す)や、関数の引数が含まれてもよい。   "Changing" a program's code means adding variables or values to the code, deleting variables or values described in the code, or changing variables or values described in the code into another variable Or to change the value. The variable may include a function name (indicating the return value of the function) or an argument of the function.

変更の「影響」とは、コードの変更により、コード中の変数や関数の値や関数の動作が変化することである。   The "effect" of a change is that the code change changes the value of a variable or function in the code or the operation of the function.

「影響箇所」とは、コードにおける特定の変更による影響が及ぶ、コード中の変数や関数名の記述箇所のことである。   An "influenced area" is a description of a variable or function name in code that is affected by a specific change in the code.

「影響情報」とは、影響箇所の座標、影響箇所間の依存関係の情報を含む情報である。影響情報は、関数間の依存関係の情報や、コードを更に含んでもよい。   The “influence information” is information including coordinates of the affected point and information on the dependency between the affected points. The influence information may further include information on dependencies between functions and code.

影響箇所の「座標」とは、影響箇所のコード上の位置を特定することができる任意の情報である。影響箇所の座標は、例えば、影響箇所のコード上の開始行及び開始桁を含み、影響箇所のコード上の終了行及び終了桁を更に含んでもよい。   The "coordinates" of the influential part is any information that can specify the position of the influential part on the code. The coordinates of the influential point may include, for example, a start line and a start digit on the influential point code, and may further include an end line and an end digit on the influential point code.

影響箇所間の「依存関係」とは、コードの特定の変更の直接の影響が及ぶ影響箇所(以下、「影響の基点」という)から、特定の変更の影響が及ぶ末端の影響箇所までの一連の影響箇所に含まれる、直接の影響を及ぼす影響箇所の対の全体である。すなわち、依存関係は、影響の基点をルートとするデータフローグラフと等価である。なお、データフローグラフについては、広く知られているので、ここでは詳述しない。   The “dependency” between affected points is a series from the affected point where the direct influence of a specific change of code (hereinafter referred to as “base point of influence”) to the end affected point where the specific change affects. The whole of the direct influence influence point pairs included in the influence points of the That is, the dependency is equivalent to a data flow graph rooted at the origin of the influence. The data flow graph is widely known and will not be described in detail here.

「影響伝播グラフ」(以下、単に「グラフ」という)とは、プログラムのコードに重ね合わされて表示される、変更の影響の伝わり方を示す図形である。グラフは、「ノード」と「影響線」とを含む。   The “effect propagation graph” (hereinafter simply referred to as “graph”) is a graphic which is superimposed on the program code and displayed to show how the change is transmitted. The graph includes "nodes" and "impact lines".

「ノード」とは、各影響箇所を示す図形である。なお、「関数ノード」とは、1つの関数定義に含まれる影響箇所が縮約された(複数の要素が1つの要素にまとめられた)図形である。また、関数ノードを含むグラフを「縮約グラフ」という。   A "node" is a figure which shows each influence location. The “function node” is a figure in which an influence location included in one function definition is contracted (a plurality of elements are combined into one element). Also, a graph including function nodes is called a "reduction graph".

「影響線」とは、依存関係の依存先に対応するノードから依存関係の依存元に対応するノードへの有向辺である。なお、縮約グラフでは、依存先に対応するノードと依存関係の依存元に対応するノードとを共有する複数の影響線は、縮約されてもよい。   “Influence line” is a directed edge from a node corresponding to a dependency dependency destination to a node corresponding to a dependency dependency source. In the reduction graph, a plurality of influence lines sharing the node corresponding to the dependency destination and the node corresponding to the dependency source of the dependency may be contracted.

以上が、用語についての説明である。   The above is the explanation of the terms.

本実施形態における構成について説明する。   The configuration in the present embodiment will be described.

図1は、本発明の本実施形態のプログラム表示装置100の構成の一例を示すブロック図である。   FIG. 1 is a block diagram showing an example of the configuration of a program display apparatus 100 according to the present embodiment of the present invention.

まず、プログラム表示装置100を含むプログラム表示システム500の構成について説明する。プログラム表示システム500は、プログラム分析装置200と、プログラム表示装置100と、描画装置300とを含む。   First, the configuration of a program display system 500 including the program display device 100 will be described. Program display system 500 includes a program analysis device 200, a program display device 100, and a drawing device 300.

プログラム分析装置200は、プログラムのコードを分析して、コードにおいて特定の変更がなされた際の影響情報を出力する。   The program analysis device 200 analyzes the code of the program and outputs influence information when a specific change is made in the code.

プログラム表示装置100は、プログラム分析装置200により出力された影響情報に基づいて、特定の変更がなされた際の、コードにおける影響の伝わり方を示す描画データを生成し、生成した描画データとコードの描画データとを重ね合わせた描画データを出力する。   The program display apparatus 100 generates, based on the influence information output by the program analysis apparatus 200, drawing data indicating how the influence of the code is transmitted when a specific change is made, and the generated drawing data and the code It outputs drawing data superimposed on the drawing data.

描画装置300は、プログラム表示装置100により出力された描画データを画面、用紙等に描画する。描画装置300は、例えば、ディスプレイ、プリンタである。   The drawing device 300 draws the drawing data output by the program display device 100 on a screen, a sheet, or the like. The drawing device 300 is, for example, a display or a printer.

プログラム表示装置100は、グラフ生成手段110を含む。   The program display device 100 includes a graph generation unit 110.

グラフ生成手段110は、入力した影響情報に基づいて、グラフの描画データを生成して、グラフの描画データとコードの描画データとを重ね合わせた描画データを出力する。なお、グラフ生成手段110は、縮約グラフの描画データを生成してもよい。縮約グラフでは、関数ノードの部分は、コードに重ね合わされない。   The graph generation unit 110 generates drawing data of the graph based on the input influence information, and outputs drawing data in which the drawing data of the graph and the drawing data of the code are superimposed. The graph generation unit 110 may generate drawing data of a contraction graph. In a contraction graph, parts of the function nodes are not superimposed on the code.

次に、本実施形態における動作について説明する。   Next, the operation in the present embodiment will be described.

図2は、本発明の本実施形態のプログラム表示装置100の動作を示すフローチャートである。具体的には、図2には、グラフ生成手段110の動作が示される。なお、図2に示されるフローチャート及び以下の説明は一例であり、適宜求める処理に応じて、処理順等を入れ替えたり、処理を戻したり、又は処理を繰り返したりしてもよい。   FIG. 2 is a flow chart showing the operation of the program display apparatus 100 according to the present embodiment of the present invention. Specifically, FIG. 2 shows the operation of the graph generation unit 110. The flowchart illustrated in FIG. 2 and the following description are merely examples, and the processing order or the like may be interchanged, the processing may be returned, or the processing may be repeated depending on the processing to be obtained as appropriate.

まず、グラフ生成手段110は、プログラムのコードと、コードにおける特定の変更による影響情報とを入力する(ステップS101)。   First, the graph generation unit 110 inputs a code of a program and influence information due to a specific change in the code (step S101).

次に、グラフ生成手段110は、影響情報から影響箇所の座標を抽出する(ステップS102)。   Next, the graph generation unit 110 extracts the coordinates of the affected point from the influence information (step S102).

次に、グラフ生成手段110は、影響情報から影響箇所間の依存関係を抽出する(ステップS103)。   Next, the graph generation unit 110 extracts the dependency between affected points from the influence information (step S103).

次に、グラフ生成手段110は、抽出した影響箇所の座標と影響箇所間の依存関係から、影響線の描画データを生成する(ステップS104)。   Next, the graph generation unit 110 generates drawing data of an influence line from the extracted influence point coordinates and the dependence relationship between the influence points (step S104).

次に、グラフ生成手段110は、抽出した影響箇所の座標から、ノードの描画データを生成する(ステップS105)。   Next, the graph generation unit 110 generates drawing data of the node from the coordinates of the extracted affected point (step S105).

次に、グラフ生成手段110は、生成した影響線とノードの描画データとをコードの描画データに重ね合わせた描画データを生成する(ステップS106)。   Next, the graph generation unit 110 generates drawing data in which the generated influence line and the drawing data of the node are superimposed on the drawing data of the code (step S106).

次に、グラフ生成手段110は、重ね合わせられた描画データをディスプレイやプリンタ等へ出力する(ステップS107)。   Next, the graph generation unit 110 outputs the superimposed drawing data to a display, a printer or the like (step S107).

次に、本実施形態における処理の具体例について説明する。   Next, a specific example of the process in the present embodiment will be described.

図3は、本発明の本実施形態のプログラム表示装置100の処理対象のプログラムのコードの具体例を説明するための図である。具体的には、図3には、C言語による関数“main”の定義が示される。なお、図3には、左端にコード上の行番号が、上端にコード上の桁番号が示される。   FIG. 3 is a diagram for describing a specific example of a code of a program to be processed of the program display device 100 according to the embodiment of the present invention. Specifically, FIG. 3 shows the definition of the function "main" in C language. In FIG. 3, the line number on the code is shown at the left end, and the digit number on the code is shown at the top.

図3では、2行目において、変数“data1”が定義され、初期値として“5”が代入されている。4行目において、変数“data2”(11〜15桁目)が定義され、初期値として変数“data1”(19〜23桁目)の値(参照)が代入されている。6行目において、変数“data3”(11〜15桁目)が定義され、初期値として変数“data2”(19〜23桁目)の値(参照)の演算結果が代入されている。8行目において、変数“data3”(14〜18桁目)の値が参照されている。   In FIG. 3, in the second line, the variable “data1” is defined, and “5” is substituted as an initial value. On the fourth line, a variable "data 2" (positions 11 to 15) is defined, and the value (reference) of the variable "data 1" (positions 19 to 23) is substituted as an initial value. On line 6, a variable "data 3" (positions 11 to 15) is defined, and the operation result of the value (reference) of the variable "data 2" (positions 19 to 23) is substituted as an initial value. On the eighth line, the value of the variable "data 3" (positions 14 to 18) is referenced.

図4は、本発明の本実施形態のプログラム表示装置100の影響情報に含まれる影響箇所の座標の具体例を説明するための図である。具体的には、図4には、図3に示されたコードにおいて、変数“data1”の変更がなされた際の影響箇所の座標の具体例が示される。なお、図4には、“ID”列には影響箇所の識別番号が、“変数名”列には影響箇所に対応する変数名が示される。影響箇所の変数名は、説明の都合上記載されているが、以下の処理において必要な要素ではない。また、図4では、影響箇所の座標は、表形式で示されているが、表に記載の内容を記述可能な任意の形式(XML(Extensible Markup Language)形式、CSV(Comma-separated Values)形式等)で表現されてよい。   FIG. 4 is a diagram for describing a specific example of the coordinates of the affected point included in the influence information of the program display device 100 according to the present embodiment of the present invention. Specifically, FIG. 4 shows a specific example of the coordinates of the affected point when the variable “data 1” is changed in the code shown in FIG. In FIG. 4, the identification number of the influential part is shown in the “ID” column, and the variable name corresponding to the influential part is shown in the “variable name” column. Although the variable name of the affected part is described for the convenience of explanation, it is not a necessary element in the following processing. Also, in FIG. 4, the coordinates of the affected part are shown in a table format, but any format (XML (Extensible Markup Language) format, CSV (Comma-separated Values) format) that can describe the contents described in the table Etc.).

図4では、“開始行”列、“終了行”列、“開始桁”列、“終了桁”列にはそれぞれ、影響箇所の座標の、開始位置の行成分、終了位置の行成分、開始位置の桁成分、終了位置の桁成分が示される。1行目において、識別番号“1”、変数名“data1”、座標(“4”,“4”,“19”,“23”)である影響箇所が記述されている。同様に、2〜5行目のそれぞれに、各々1つの影響箇所が記述されている。   In FIG. 4, in the "start line" column, the "end line" column, the "start column" column, and the "end column" column, the row component of the start position, the row component of the end position, the start of the coordinates of the affected location The digit component of the position and the digit component of the end position are shown. In the first line, influence points having an identification number “1”, a variable name “data1”, and coordinates (“4”, “4”, “19”, “23”) are described. Similarly, one influence point is described in each of the second to fifth lines.

図5は、本発明の本実施形態のプログラム表示装置100の影響情報に含まれる影響箇所間の依存関係の具体例を説明するための図である。具体的には、図5には、図3に示されたコードにおいて、変数“data1”の変更がなされた際の影響箇所間の依存関係の具体例が示される。なお、図5において、四角形の枠は1つの影響箇所を、四角形の枠間の矢印は影響箇所間の依存関係を示す。矢印の向きは影響が伝播する向きである。また、四角形の枠内の上側には影響箇所の識別番号が、四角形の枠内の下側には影響箇所に対応する変数名が示される。影響箇所の変数名は、説明の都合上記載されているが、以下の処理において必要な要素ではない。また、図5では、影響箇所の依存関係は、グラフ形式で示されているが、グラフに記載の内容を記述可能な任意の形式(XML形式等)で表現されてよい。   FIG. 5 is a diagram for describing a specific example of the dependency relationship between the influential parts included in the influential information of the program display device 100 of the embodiment of the present invention. Specifically, FIG. 5 shows a specific example of the dependency between affected points when the variable “data 1” is changed in the code shown in FIG. In addition, in FIG. 5, the frame of a square shows one influence location, and the arrow between the frames of a square shows the dependency between influence locations. The direction of the arrow is the direction in which the influence propagates. Also, the identification number of the affected area is shown on the upper side in the rectangular frame, and the variable name corresponding to the affected area is shown on the lower side in the rectangular frame. Although the variable name of the affected part is described for the convenience of explanation, it is not a necessary element in the following processing. Further, in FIG. 5, the dependency of the influential part is shown in the form of a graph, but may be expressed in any form (such as an XML form) in which the contents described in the graph can be described.

図5では、識別番号“2”、変数名“data2”である影響箇所が、ID“1”、変数名“data1”である影響箇所に依存することが記述されている。同様に、更に3つの依存関係が記述されており、変更の影響は、ID“1”、変数“data1”である影響箇所から、ID“2”、変数“data2”である影響箇所、ID“3”、変数“data2”である影響箇所、ID“4”、変数“data3”である影響箇所、ID“5”、変数“data3”である影響箇所の順で直列に伝播することが記述されている。   In FIG. 5, it is described that the influential part having the identification number "2" and the variable name "data 2" depends on the influential part having the ID "1" and the variable name "data 1". Similarly, three more dependency relationships are described, and the influence of the change is ID “1”, variable “data 1” from the influence point, ID “2”, variable “data 2”, the influence point, ID “ It is described that the propagation is performed in series in the order of 3 ′ ′, the influence point that is the variable “data2”, the ID “4”, the influence point that is the variable “data3”, the influence point that is the ID “5” and the variable “data3” ing.

なお、依存関係は、例えば、コードにおける、代入式の代入元の影響箇所を依存先とし、代入式の代入先の影響箇所を依存元とする関係を含む。また、依存関係は、例えば、コードにおける、影響箇所の参照を依存元とし、影響箇所の定義における影響箇所、若しくは代入先が影響箇所である代入式の代入先のうち、影響箇所の参照の直前の1つを依存先とする関係を含む。   Note that the dependency relation includes, for example, a relationship in which the influence location of the assignment source of the assignment expression in the code is the dependency destination, and the influence location of the assignment destination of the assignment expression is the dependency source. Further, the dependency relation is, for example, the reference of the influence location in the code as the dependency source, and immediately before the reference of the influence location among the assignment destinations in the definition of the impact location or the assignment location where the assignment destination is the impact location. Contains a relationship that depends on one of.

図6は、本発明の本実施形態のプログラム表示装置100の影響の伝わり方を示す描画データの具体例を説明するための図である。具体的には、図6には、図3に示されたコードにおいて、4行目の変数“data1”の変更がなされた際の影響の伝わり方を示す描画データの具体例が示される。なお、図6において、四角形の枠はノードを示し、矢印は影響線を示している。   FIG. 6 is a diagram for describing a specific example of drawing data indicating how to receive the influence of the program display device 100 according to the embodiment of the present invention. Specifically, FIG. 6 shows a specific example of drawing data indicating how to transmit the influence when the variable “data1” in the fourth line is changed in the code shown in FIG. In FIG. 6, a rectangular frame indicates a node, and an arrow indicates an influence line.

図6では、ノードA3がノードA1に依存することが、ノードA1、ノードA3、及びノードA1からノードA3への影響線A2を含む、グラフにより示される。また、ノードA1が変数“data1”に対応し、ノードA3が変数“data2”に対応することが、グラフとコードとが重ね合わせられて表示されることにより示される。同様に、更に3つの依存関係が示されており、変更の影響は、ノードA1(変数“data1”)から、ノードA3(変数“data2”)、ノードA5(変数“data2”)、ノードA7(変数“data3”)、ノードA9(変数“data3”)の順で直列に伝播することが示されている。   In FIG. 6, it is shown graphically that node A3 depends on node A1, including node A1, node A3, and influence line A2 from node A1 to node A3. The node A1 corresponds to the variable “data1”, and the node A3 corresponds to the variable “data2”, as indicated by superimposing and displaying the graph and the code. Similarly, three more dependency relationships are shown, and the influence of the change is obtained from node A1 (variable “data1”), node A3 (variable “data2”), node A5 (variable “data2”), node A7 (variable It is shown that the variable “data 3”) and the node A 9 (variable “data 3”) are propagated in series in the order.

図2から図6を用いて、グラフ生成手段110の処理の具体例について説明する。   A specific example of the process of the graph generation unit 110 will be described with reference to FIGS. 2 to 6.

まず、グラフ生成手段110は、図3のコードの4行目の変数“data1”が変更された場合の影響情報を入力する(ステップS101)。影響情報には、図3のコード、図5の影響箇所間の依存関係、図4の影響箇所の座標が含まれる。   First, the graph generation unit 110 inputs influence information when the variable “data1” in the fourth line of the code in FIG. 3 is changed (step S101). The influence information includes the code in FIG. 3, the dependency between the influential parts in FIG. 5, and the coordinates of the influential parts in FIG.

次に、グラフ生成手段110は、影響情報から影響箇所の座標を抽出する(ステップS102)。本具体例では、座標は、図4に示された、各変数の開始行、終了行、開始桁、終了桁を含む。   Next, the graph generation unit 110 extracts the coordinates of the affected point from the influence information (step S102). In this specific example, the coordinates include the start line, the end line, the start column, and the end column of each variable shown in FIG.

次に、グラフ生成手段110は、影響情報から影響箇所間の依存関係を抽出する(ステップS103)。図5に示された影響箇所の依存関係から、変数“data1”(ID:1)は、変数“data2”(ID:2)に影響を及ぼすことが分かるため、グラフ生成手段110は、変数“data1”(ID:1)から変数“data2”(ID:2)への依存関係を抽出する。同様に、グラフ生成手段110は、変数“data2”(ID:2)から変数“data2”(ID:3)、変数“data2”(ID:3)から変数“data3”(ID:4)、変数“data3”(ID:4)から変数“data3”(ID:5)への依存関係を抽出する。   Next, the graph generation unit 110 extracts the dependency between affected points from the influence information (step S103). The dependency of the influence point shown in FIG. 5 shows that the variable “data 1” (ID: 1) affects the variable “data 2” (ID: 2). The dependency on the variable "data 2" (ID: 2) is extracted from data 1 "(ID: 1). Similarly, the graph generation unit 110 can set variables “data 2” (ID: 2) to variables “data 2” (ID: 3), variables “data 2” (ID: 3) to variables “data 3” (ID: 4), The dependency on the variable “data 3” (ID: 5) is extracted from “data 3” (ID: 4).

次に、グラフ生成手段110は、ステップS102で抽出した各変数の座標と、ステップS103で抽出した影響箇所間の依存関係から、影響線の描画データを生成する(ステップS104)。グラフ生成手段110は、例えば、変数“data1”(ID:1)と変数“data2”(ID:2)との間の依存関係から、ノードA1からノードA3への影響線A2の描画データを生成する。同様に、グラフ生成手段110は、変数“data2”(ID:2)と変数“data2”(ID:3)との間の依存関係から影響線A4を、変数“data2”(ID:3)と変数“data3”(ID:4)との間の依存関係から影響線A6を、変数“data3”(ID:4)と変数“data3”(ID:5)との間の依存関係から影響線A8の描画データを生成する。なお、グラフ生成手段110は、ステップS102で抽出した変数“data1”(ID:1)と変数“data2”(ID:2)の座標から、影響線の始点をコードの4行目の19〜23桁目に、影響線の終点を4行目の11〜15桁目に設定する。同様に、グラフ生成手段110は、影響線A4、影響線A6、影響線A8の始点及び終点を設定する。   Next, the graph generation unit 110 generates drawing data of an influence line from the coordinates of each variable extracted in step S102 and the dependency between the influential parts extracted in step S103 (step S104). The graph generation unit 110 generates, for example, drawing data of the influence line A2 from the node A1 to the node A3 from the dependency between the variable “data1” (ID: 1) and the variable “data 2” (ID: 2) Do. Similarly, the graph generation unit 110 determines the influence line A4 from the dependency between the variable “data2” (ID: 2) and the variable “data 2” (ID: 3) and the variable “data 2” (ID: 3). The influence line A6 is derived from the dependency between the variable "data3" (ID: 4), and the influence line A8 is derived from the dependency between the variable "data3" (ID: 4) and the variable "data3" (ID: 5). Generate drawing data for Note that the graph generation unit 110 sets the start point of the influence line to the 19th to the 23rd lines of the code from the coordinates of the variable "data1" (ID: 1) and the variable "data2" (ID: 2) extracted in step S102. The end point of the influence line is set to the 11th to 15th positions of the fourth line at the position. Similarly, the graph generation unit 110 sets the start point and the end point of the influence line A4, the influence line A6, and the influence line A8.

次に、グラフ生成手段110は、抽出した影響箇所の座標から、ノードの描画データを生成する(ステップS105)。例えば、変数“data1”(ID:1)について、グラフ生成手段110は、ノードA1の描画データを生成する。なお、グラフ生成手段110は、ノードA1の四角形の枠がコードの4行目の19〜23桁目を囲むような大きさに設定する。同様に、グラフ生成手段110は、影響箇所である変数“data2”(ID:2)についてノードA3の、影響箇所である変数“data2”(ID:3)についてノードA5の、影響箇所である変数“data3”(ID:4)についてノードA7の、影響箇所である変数“data3”(ID:5)についてノードA9の描画データを生成する。また、グラフ生成手段110は、ノードA1の描画位置に変数“data1”(ID:1)の座標を設定する。同様に、グラフ生成手段110は、ノードA3の描画位置に変数“data2”(ID:2)の座標を、ノードA5の描画位置に変数“data2”(ID:3)の座標を、ノードA7の描画位置に変数“data3”(ID:4)の座標を、ノードA9の描画位置に変数“data3”(ID:5)の座標を設定する。   Next, the graph generation unit 110 generates drawing data of the node from the coordinates of the extracted affected point (step S105). For example, the graph generation unit 110 generates drawing data of the node A1 for the variable “data1” (ID: 1). The graph generation unit 110 sets the rectangular frame of the node A1 to such a size as to surround positions 19 to 23 of the fourth line of the code. Similarly, the graph generation unit 110 applies the variable “data2” (ID: 2) that is the affected point to the variable “data2” (ID: 3) that is the affected point of the node A3. For “data 3” (ID: 4), drawing data of the node A 9 is generated for the variable “data 3” (ID: 5) that is the affected part of the node A 7. Further, the graph generation unit 110 sets the coordinates of the variable “data1” (ID: 1) at the drawing position of the node A1. Similarly, the graph generation unit 110 sets the coordinates of the variable "data2" (ID: 2) at the drawing position of the node A3, the coordinates of the variable "data2" (ID: 3) at the drawing position of the node A5, The coordinates of the variable "data 3" (ID: 4) are set as the drawing position, and the coordinates of the variable "data 3" (ID: 5) are set as the drawing position of the node A9.

次に、グラフ生成手段110は、ステップS104で生成した影響線の描画データと、ステップS105で生成したノードの描画データとを、ステップS101で入力した影響情報に含まれるコードの描画データと重ね合わせた描画データを生成する(ステップS106)。なお、コードが複数の部分に分割され、コードの各部分の描画位置が描画の基点に対するオフセットを有する場合には、グラフ生成手段110は、オフセットに合わせてノードの描画位置を移動し、移動したノードの描画位置に合わせて、影響線の起点及び終点を決定することにより、グラフとコードとを重ね合わせる。   Next, the graph generation unit 110 superimposes the drawing data of the influence line generated in step S104 and the drawing data of the node generated in step S105 on the drawing data of the code included in the influence information input in step S101. The generated drawing data is generated (step S106). When the code is divided into a plurality of parts, and the drawing position of each part of the code has an offset with respect to the drawing base point, the graph generation unit 110 moves and moves the drawing position of the node according to the offset. The graph and the code are superimposed by determining the start point and the end point of the influence line according to the drawing position of the node.

次に、グラフ生成手段110は、ステップS106で生成した、重ね合わせられた描画データをディスプレイやプリンタ等へ出力する(ステップS107)。なお、グラフ生成手段110により出力される描画データによる画像イメージは、図6に示される。   Next, the graph generation unit 110 outputs the superimposed drawing data generated in step S106 to a display, a printer, or the like (step S107). In addition, the image image by the drawing data output by the graph generation means 110 is shown by FIG.

次に、影響箇所が複数の関数間にまたがる場合の本実施形態における処理の具体例について説明する。   Next, a specific example of the processing in the present embodiment in the case where the affected part extends between a plurality of functions will be described.

図7は、本発明の本実施形態のプログラム表示装置100の処理対象のプログラムのコードの別の具体例を説明するための図である。具体的には、図7には、C言語による6つの関数の定義が、3つのファイルに分かれて示される。図7(a)は、関数“main”及び関数“functionA”が定義されたファイル“Sample1.c”を示す。図7(b)は、関数“functionB”及び関数“functionD”が定義されたファイル“Sample2.c”を示す。図7(c)は、関数“functionC”及び関数“functionE”が定義されたファイル“Sample3.c”を示す。なお、図7には、左端にコード上の行番号が示される。   FIG. 7 is a view for explaining another specific example of the code of the program to be processed of the program display device 100 according to the embodiment of the present invention. Specifically, FIG. 7 shows the definition of six functions in C language divided into three files. FIG. 7A shows a file “Sample1.c” in which the function “main” and the function “functionA” are defined. FIG. 7B shows the file "Sample2.c" in which the function "function B" and the function "function D" are defined. FIG. 7C shows a file "Sample 3. c" in which the function "function C" and the function "function E" are defined. In FIG. 7, the line number on the code is shown at the left end.

図8は、本発明の本実施形態のプログラム表示装置100の影響の伝わり方を示す描画データの具体例を説明するための図である。具体的には、図8には、図7に示されたコードにおいて、ファイル“Sample1.c”の6行目の変数“alpha”の変更がなされた際の影響の伝わり方を示す描画データの具体例が示される。   FIG. 8 is a diagram for describing a specific example of drawing data indicating how to convey the influence of the program display device 100 according to the present embodiment of the present invention. More specifically, FIG. 8 shows drawing data showing how the influence of the change of the variable “alpha” on the sixth line of the file “Sample1.c” is transmitted in the code shown in FIG. 7. An example is shown.

図8において、プログラム表示装置100は、コードを、1つの関数定義に含まれる部分と関数定義に含まれない部分とに分割した描画データを出力している。また、図8において、プログラム表示装置100は、分割したコードの各部分に、コードを含むファイル名を表示した描画データを出力している。なお、プログラム表示装置100は、コードがファイル毎に分割された描画データを出力してもよい。また、プログラム表示装置100は、分割したコードの各部分を、移動したり、拡大したり、縮小したり、他の部分の上に重ねて表示したり、他の部分の下に一部を隠して表示したりした描画データを出力してもよい。また、プログラム表示装置100は、影響箇所を含まないコードの部分の表示を省略してもよい。また、影響の伝播順序を分かり易くするために、プログラム表示装置100は、各影響線に、影響が伝播される順序を示す数字を重ね合わせて表示してもよい。また、プログラム表示装置100は、特定のコードの部分に含まれるコードの代わりに、関数名又は関数外である旨を表示し、特定のコードの部分に閉じた部分グラフの代わりに、1つのノード(関数ノード)を表示した描画データを出力してもよい。   In FIG. 8, the program display apparatus 100 outputs drawing data obtained by dividing the code into a part included in one function definition and a part not included in the function definition. Further, in FIG. 8, the program display apparatus 100 outputs drawing data in which a file name including a code is displayed for each portion of the divided code. The program display apparatus 100 may output drawing data in which the code is divided for each file. In addition, the program display device 100 moves, enlarges, reduces, or displays each portion of the divided code on another portion, or hides a portion under the other portion. It is also possible to output drawing data that has been displayed. Further, the program display apparatus 100 may omit the display of the part of the code not including the affected part. Further, in order to make the order of propagation of the effects easy to understand, the program display apparatus 100 may superimpose a number indicating the order in which the effects are propagated on each influence line. Also, the program display device 100 displays that the function name or the function is out of the function instead of the code contained in the specific code part, and instead of the subgraph closed in the specific code part, one node You may output the drawing data which displayed (function node).

なお、依存関係は、例えば、コードにおける、代入式の代入元の影響箇所を依存先とし、代入式の代入先の影響箇所を依存元とする関係を含む。また、依存関係は、例えば、コードにおける、影響箇所の参照を依存元とし、影響箇所の定義における影響箇所、若しくは代入先が影響箇所である代入式の代入先のうち、影響箇所の参照の直前の1つを依存先とする関係を含む。また、依存関係は、例えば、コードにおける、関数名の参照における引数である影響箇所を依存先とし、引数の定義における引数を依存元とする関係を含む。また、依存関係は、例えば、前記コードにおける、関数の戻り値の設定における影響箇所の参照を依存先とし、関数の定義における関数の関数名を依存元とする関係を含む。また、依存関係は、例えば、コードにおける、影響箇所である関数名の参照を依存先とし、関数名の参照における戻り値の設定先を依存元とする関係を含む。また、依存関係は、例えば、前記コードにおける、関数の定義における、影響箇所である関数名を依存先とし、関数名の参照を依存元とする関係を含む。ただし、関数名は変数に含まれるものとする。   Note that the dependency relation includes, for example, a relationship in which the influence location of the assignment source of the assignment expression in the code is the dependency destination, and the influence location of the assignment destination of the assignment expression is the dependency source. Further, the dependency relation is, for example, the reference of the influence location in the code as the dependency source, and immediately before the reference of the influence location among the assignment destinations in the definition of the impact location or the assignment location where the assignment destination is the impact location. Contains a relationship that depends on one of. Further, the dependency relation includes, for example, a relation in which the influence location which is an argument in the reference of the function name in the code is a dependency destination, and the argument in an argument definition is a dependency source. Further, the dependency relation includes, for example, a relation having a reference of an influence point in setting of a return value of the function in the code as a dependency destination and a dependency of a function name in the definition of the function as a dependency source. Further, the dependency relation includes, for example, a relation in which the reference of the function name which is the influence point in the code is a dependency destination, and the setting destination of the return value in the reference of the function name is a dependency source. Further, the dependency relation includes, for example, a relation in which the function name which is an influence point in the definition of the function in the code is a dependency destination and the reference of the function name is a dependency source. However, the function name is included in the variable.

図9は、本発明の本実施形態のプログラム表示装置100の、グラフが関数ノードを含む場合の影響の伝わり方を示す描画データの具体例を説明するための図である。具体的には、図9には、図8に示された影響の伝わり方を示す描画データにおいて、ノードがすべて関数ノードに縮約された場合の影響の伝わり方を示す描画データの具体例が示される。   FIG. 9 is a diagram for explaining a specific example of drawing data indicating how to transmit the influence when the graph includes a function node, in the program display device 100 according to the present embodiment of the present invention. Specifically, FIG. 9 shows a specific example of drawing data showing how to convey the influence when all nodes are contracted to function nodes in the drawing data showing how to transmit the influence shown in FIG. Indicated.

図9において、関数ノードB1には、ファイル名“Sample1.c”と関数名“main”が示される。関数ノードB2には、ファイル名“Sample1.c”と関数名“functionA”が示される。関数ノードB3には、ファイル名“Sample2.c”と関数名“functionB”が示される。関数ノードB4には、ファイル名“Sample3.c”と関数名“functionC”が示される。関数ノードB5には、ファイル名“Sample2.c”と関数名“functionD”が示される。   In FIG. 9, the file name "Sample 1. c" and the function name "main" are shown in the function node B1. In the function node B2, a file name "Sample 1. c" and a function name "function A" are shown. In the function node B3, a file name "Sample 2. c" and a function name "function B" are shown. In the function node B4, a file name "Sample 3.c" and a function name "function C" are shown. In the function node B5, a file name "Sample 2. c" and a function name "function D" are displayed.

また、図9において、影響線B6は、呼出し元である関数ノードB1から呼出し先である関数ノードB2へ影響が及ぶことを示す。影響線B7は、呼出し元である関数ノードB2から呼出し先である関数ノードB3へ影響が及ぶことを示す。影響線B8は、呼出し元である関数ノードB3から呼出し先である関数ノードB4へ影響が及ぶことを示す。影響線B9は、呼出し先である関数ノードB4から呼出し元である関数ノードB3へ影響が及ぶことを示す。影響線B10は、呼出し先である関数ノードB3から呼出し元である関数ノードB2へ影響が及ぶことを示す。影響線B11は、呼出し元である関数ノードB2から呼出し先である関数ノードB5へ影響が及ぶことを示す。   Further, in FIG. 9, an influence line B6 indicates that the function node B1 that is the caller is affected to the function node B2 that is the call destination. An influence line B7 indicates that the function node B2 that is the caller is affected to the function node B3 that is the call destination. An influence line B8 indicates that the function node B3 that is the caller is affected to the function node B4 that is the call destination. An influence line B9 indicates that the function node B4 which is the call destination is affected to the function node B3 which is the call source. An influence line B10 indicates that the function node B3 that is the call destination influences the function node B2 that is the call source. An influence line B11 indicates that the function node B2 that is the caller is affected to the function node B5 that is the call destination.

具体的には、プログラム表示装置100は、以下のように関数ノードを表示する描画データを出力してもよい。   Specifically, the program display apparatus 100 may output drawing data for displaying function nodes as follows.

図10は、本発明の本実施形態のプログラム表示装置100の、グラフが関数ノードを含む場合の動作を示すフローチャートである。具体的には、図10には、グラフ生成手段110の関数ノードのみを表示する描画データを出力する際の動作が示される。なお、図10に示されるフローチャート及び以下の説明は一例であり、適宜求める処理に応じて、処理順等を入れ替えたり、処理を戻したり、又は処理を繰り返したりしてもよい。   FIG. 10 is a flowchart showing the operation of the program display apparatus 100 according to the present embodiment of the present invention when the graph includes function nodes. Specifically, FIG. 10 shows an operation at the time of outputting drawing data for displaying only the function nodes of the graph generation means 110. The flowchart illustrated in FIG. 10 and the following description are merely examples, and the processing order or the like may be switched, the processing may be returned, or the processing may be repeated according to the processing to be obtained as appropriate.

まず、グラフ生成手段110は、プログラムのコードにおける特定の変更による影響情報を入力する(ステップS201)。   First, the graph generation unit 110 inputs influence information due to a specific change in the code of the program (step S201).

次に、グラフ生成手段110は、影響情報から影響箇所間の依存関係を抽出する(ステップS202)。   Next, the graph generation unit 110 extracts the dependency between the influential parts from the influential information (step S202).

次に、グラフ生成手段110は、依存関係に基づいて、特定の変更の影響が関数呼出しの引数へ及ぶ場合に、呼び出し元の関数ノード、呼び出し先の関数ノード、及び呼出元の関数ノードから呼び出し先の関数ノードへ向かう影響線の描画データを生成する(ステップS203)。   Next, based on the dependency, the graph generation unit 110 calls from the calling function node, the called function node, and the calling function node when the effect of the specific change affects the arguments of the function call. Drawing data of an influence line going to the previous function node is generated (step S203).

次に、グラフ生成手段110は、影響情報から影響先である関数における影響箇所間の依存関係を抽出する(ステップS204)。   Next, the graph generation unit 110 extracts, from the influence information, the dependency between the affected parts in the function that is the influence destination (step S204).

次に、グラフ生成手段110は、関数の戻り値に影響が及ぶならば、呼出し先の関数ノードから呼出し元の関数ノードへ向かう影響線の描画データを生成する(ステップS205)。   Next, if influence is exerted on the return value of the function, the graph generation means 110 generates drawing data of an influence line from the function node of the call destination to the function node of the call source (step S205).

次に、グラフ生成手段110は、関数ノードと影響線の描画データをディスプレイやプリンタ等へ出力する(ステップS206)。   Next, the graph generation unit 110 outputs the drawing data of the function node and the influence line to a display, a printer or the like (step S206).

次に、図7のコードを用いて、グラフが関数ノードを含む場合のグラフ生成手段110の処理の具体例について説明する。   Next, a specific example of processing of the graph generation unit 110 when the graph includes a function node will be described using the code of FIG. 7.

まず、グラフ生成手段110は、図7の“Sample1.c”の5行目の定数“100”が変更された際の影響情報を入力する(ステップS201)。   First, the graph generation unit 110 inputs influence information when the constant “100” in the fifth line of “Sample1.c” in FIG. 7 is changed (step S201).

次に、グラフ生成手段110は、影響情報から影響箇所間の依存関係を抽出する(ステップS202)。   Next, the graph generation unit 110 extracts the dependency between the influential parts from the influential information (step S202).

次に、グラフ生成手段110は、依存関係に基づいて、変更の影響が、ファイル“Sample1.c”の6行目の関数呼出し“functionA”の引数“alpha”へ及ぶため、呼び出し元の関数ノードB1、呼び出し先の関数ノードB2、及び関数ノードB1から関数ノードB2へ向かう影響線B6の描画データを生成する(ステップS203)。   Next, the graph generation means 110 determines that the influence of the change extends to the argument “alpha” of the function call “functionA” of the sixth line of the file “Sample1.c” based on the dependency, so that the function node of the calling source The rendering data of B1, the function node B2 of the call destination, and the influence line B6 directed from the function node B1 to the function node B2 are generated (step S203).

次に、グラフ生成手段110は、影響情報から影響先である関数“functionA”の定義における影響箇所間の依存関係を抽出する(ステップS204)。具体的には、影響先である関数“functionA”の定義における引数“a”からのデータフローが繋がっている他の影響箇所への依存関係が抽出される。   Next, the graph generation unit 110 extracts, from the influence information, the dependency between the influence points in the definition of the function “function A” that is the influence destination (step S204). Specifically, the dependency on the other affected part to which the data flow from the argument “a” in the definition of the function “functionA” to be influenced is connected is extracted.

次に、関数“functionA”の定義における引数“a”を起点とし、同様にして、影響が及ぶ先の座標と影響箇所の依存関係に基づいて、関数ノードB3、関数ノードB4、影響線B7、及び影響線B8を生成する(ステップS202〜S204)。   Next, starting from the argument “a” in the definition of the function “function A”, similarly, based on the dependency relationship between the affected coordinates and the affected point, function node B3, function node B4, influence line B7, And an influence line B8 is generated (steps S202 to S204).

更に、ファイル“Sample3.c”の2行目“return (g * 100)”において変数“g”へ影響が及ぶため、グラフ生成手段110は、呼出し先関数のノードB4から呼出し元関数のノードB3へ向かう影響線B9を生成する。同様に、グラフ生成手段110は、影響線B10を生成する(ステップS205)。   Furthermore, since the variable “g” is affected in the second line “return (g * 100)” of the file “Sample3.c”, the graph generation unit 110 causes the node B4 of the call destination function to transmit the node B3 of the call source function. An influence line B9 heading for is generated. Similarly, the graph generation unit 110 generates an influence line B10 (step S205).

更に、データフローをたどることにより、グラフ生成手段110は、関数ノードB5と影響線B11を生成する(ステップS202〜S204)。   Further, by tracing the data flow, the graph generation unit 110 generates the function node B5 and the influence line B11 (steps S202 to S204).

次に、グラフ生成手段110は、生成した関数ノードB1〜B5と影響線B6〜B11の描画データをディスプレイやプリンタ等へ通知出力する(ステップS206)。   Next, the graph generation unit 110 outputs the drawing data of the generated function nodes B1 to B5 and the influence lines B6 to B11 to a display, a printer, etc. (step S206).

上記の動作の結果、グラフ生成手段110は、図9に示される、グラフが関数ノードを含む描画データを出力する。   As a result of the above operation, the graph generation unit 110 outputs the drawing data shown in FIG. 9 in which the graph includes function nodes.

以上説明したように、本実施形態のプログラム表示装置100は、コードの特定の変更の影響の伝わり方を示すグラフを、コード上に重ね合わせて表示する描画データを出力する。従って、本実施形態のプログラム表示装置100では、プログラムのコードの特定の箇所を変更した際の、変更の他の箇所への影響の伝播の仕方を、コードにおける影響が及ぶ箇所に対応付けて表示することができるという効果がある。   As described above, the program display apparatus 100 according to the present embodiment outputs drawing data for displaying a graph indicating how to transmit the influence of a specific change of the code on the code. Therefore, in the program display apparatus 100 according to the present embodiment, when the specific part of the code of the program is changed, the method of propagating the influence to the other part of the change is displayed in association with the part having the influence in the code. It has the effect of being able to

すなわち、本実施形態のプログラム表示装置100によれば、コードにおける変更の影響の伝わり方が一つの画像で確認できるので、ユーザはコードの変更の影響を把握すること容易である。   That is, according to the program display device 100 of the present embodiment, since it is possible to confirm how to communicate the influence of the change in the code with one image, it is easy for the user to grasp the influence of the change in the code.

また、本実施形態のプログラム表示装置100によれば、コードと変更の影響の伝わり方を示す図形との対応関係を調べる手間不要であるため、ユーザはコードの変更の影響を把握する時間を短縮することができる。   Further, according to the program display device 100 of the present embodiment, it is not necessary to check the correspondence between the code and the graphic indicating the influence of the change, so the time for the user to grasp the influence of the code change is shortened. can do.

また、グラフが関数ノードを含む場合には、本実施形態のプログラム表示装置100は、特定の関数における、コードや、コードの変更の影響の詳細を隠ぺいした描画データを生成する。従って、本実施形態のプログラム表示装置100によれば、ユーザは、特定の関数に注目することにより、コードの変更の影響の詳細を容易に把握できる。   Further, when the graph includes a function node, the program display apparatus 100 of the present embodiment generates drawing data in which the details of the influence of the code or the code change in the specific function are hidden. Therefore, according to the program display apparatus 100 of the present embodiment, the user can easily grasp the details of the influence of the code change by focusing on the specific function.

なお、上述した本発明の各実施形態のプログラム表示装置は、専用の装置によって実現してもよいが、コンピュータ(情報処理装置)によっても実現可能である。この場合、係るコンピュータは、メモリ(不図示)に格納されたソフトウェア・プログラムをCPU(Central_Processing_Unit、不図示)に読み出し、読み出したソフトウェア・プログラムをCPUにおいて実行することにより、実行結果を、例えば、ユーザ・インタフェースに出力する。上述した各実施形態の場合、係るソフトウェア・プログラムには、上述したところの、図1に示したプログラム表示装置100の各手段の機能を実現可能な記述がなされていればよい。ただし、プログラム表示装置100の各手段には、適宜ハードウェアを含むことも想定される。そして、このような場合、係るソフトウェア・プログラム(コンピュータ・プログラム)は、本発明を構成すると捉えることができる。更に、係るソフトウェア・プログラムを格納した、コンピュータ読み取り可能な記憶媒体も、本発明を構成すると捉えることができる。   The program display device of each of the embodiments of the present invention described above may be realized by a dedicated device, but can also be realized by a computer (information processing device). In this case, the computer reads out the software program stored in the memory (not shown) to a CPU (Central_Processing_Unit, not shown), and executes the read software program on the CPU, thereby, for example, the user・ Output to interface. In the case of each of the embodiments described above, the software program may be described so as to realize the functions of the respective units of the program display device 100 shown in FIG. 1 described above. However, it is also assumed that each means of the program display apparatus 100 includes hardware as appropriate. And, in such a case, such software program (computer program) can be understood to constitute the present invention. Furthermore, a computer readable storage medium storing such a software program can be considered to constitute the present invention.

以上、本発明を、上述した各実施形態およびその変形例によって例示的に説明した。しかしながら、本発明の技術的範囲は、上述した各実施形態およびその変形例に記載した範囲には限定されない。当業者には、係る実施形態に対して多様な変更又は改良を加えることが可能であることは明らかである。そのような場合、係る変更又は改良を加えた新たな実施形態も、本発明の技術的範囲に含まれ得る。そしてこのことは、特許請求の範囲に記載した事項から明らかである。   The present invention has been described above exemplarily by the above-described embodiments and the modifications thereof. However, the technical scope of the present invention is not limited to the scope described in each of the above-described embodiments and the modifications thereof. It will be apparent to those skilled in the art that various changes or modifications can be made to such embodiments. In such a case, new embodiments added with such changes or improvements can also be included in the technical scope of the present invention. And this is clear from the matter described in the claim.

本発明は、ソフトウェア開発の用途において、利用できる。   The invention can be used in software development applications.

100 プログラム表示装置
110 グラフ生成手段
200 プログラム分析装置
300 描画装置
500 プログラム表示システム
A1、A3、A5、A7、A9 ノード
A2、A4、A6、A8 影響線
B1、B2、B3、B4、B5 ノード
B6、B7、B8、B9、B10、B11 影響線
100 program display device 110 graph generation means 200 program analysis device 300 drawing device 500 program display system A1, A3, A5, A7, A9 node A2, A4, A6, A8 influence line B1, B2, B3, B4, B5 node B6, B7, B8, B9, B10, B11 Influence line

Claims (9)

プログラムのコードにおいて変更がなされた際に前記変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報に基づいて、前記影響箇所を示すノード、及び前記依存関係の依存先に対応する前記ノードから前記依存関係の依存元に対応する前記ノードへの有向辺である影響線を含む、グラフを、前記コードに重ね合わせた描画データを出力するグラフ生成手段
を備えたことを特徴とするプログラム表示装置。
A node indicating the influence point, based on influence information including dependency information between influence points which are variables influenced by the change when a change is made in a program code, and a dependency of the dependence relation A graph generation unit for outputting drawing data in which a graph including an influence line which is a directed side from the node corresponding to the node to the node corresponding to the dependency source of the dependency relation is output. A program display device characterized by
前記影響情報は、前記コードにおける前記影響箇所の位置を示す座標を含む
ことを特徴とする請求項1に記載のプログラム表示装置。
The program display device according to claim 1, wherein the influence information includes coordinates indicating a position of the influence point in the code.
前記グラフ生成手段は、前記各ノードが、各前記ノードに対応する前記影響箇所が含まれる、ファイル名及び関数名に対応付けられた前記グラフを出力する
ことを特徴とする請求項1又は請求項2に記載のプログラム表示装置。
The graph generation means outputs the graph associated with a file name and a function name in which each of the nodes includes the affected part corresponding to each of the nodes. The program display device according to 2.
前記グラフ生成手段は、特定のファイル及び特定の関数に含まれる前記影響箇所に対応する前記ノードが、1つの前記ノードに縮約された前記グラフを出力する
ことを特徴とする請求項1乃至3のいずれか1項に記載のプログラム表示装置。
The graph generation means is characterized in that the node corresponding to the affected part included in a specific file and a specific function outputs the graph contracted to one of the nodes. The program display device according to any one of the above.
前記依存関係は、前記コードにおける、
代入式の代入元の前記影響箇所を前記依存先とし、当該代入式の代入先の前記影響箇所を前記依存元とする関係、又は
前記影響箇所の参照を前記依存元とし、当該影響箇所の定義における当該影響箇所、若しくは代入先が当該影響箇所である代入式の代入先のうち、当該影響箇所の参照の直前の1つを前記依存先とする関係を含む
ことを特徴とする請求項1乃至4のいずれか1項に記載のプログラム表示装置。
The dependency is in the code:
The relationship which makes the said influence location of substitution source of substitution expression the above to be the dependence destination, and makes the said influence location of the substitution destination of the substitution expression the above to be the dependence source, or makes the reference of the above influence location the above-mentioned dependence source Among the assignees of the assignment expression where the affected point in the case or the assignment destination is the affected point, the relationship including the one immediately before the reference of the affected point among the assignees of the assignment expression is the dependency destination. The program display device according to any one of 4.
関数名は変数に含まれ、前記依存関係は、前記コードにおける、
関数名の参照における引数である前記影響箇所を前記依存先とし、当該引数の定義における当該引数を前記依存元とする関係、
関数の戻り値の設定における前記影響箇所の参照を前記依存先とし、当該関数の定義における当該関数の関数名を前記依存元とする関係、
前記影響箇所である関数名の参照を前記依存先とし、当該関数名の参照における戻り値の設定先を前記依存元とする関係、又は
関数の定義における、前記影響箇所である関数名を前記依存先とし、当該関数名の参照を前記依存元とする関係を含む
ことを特徴とする請求項5に記載のプログラム表示装置。
The function name is included in the variable, and the dependency is in the code:
A relationship in which the influence location which is an argument in the reference of a function name is the dependency destination, and the argument in the definition of the argument is the dependency source;
The relationship where the reference of the influence point in setting the return value of the function is the dependency destination, and the function name of the function in the definition of the function is the dependency source
The relationship which makes the reference of the function name which is the influence location the above-mentioned dependency destination and makes the setting destination of the return value in the reference of the function name the above-mentioned dependency source, or the function name which is the above-mentioned impact location in the function definition 6. The program display apparatus according to claim 5, further comprising a relationship in which a reference to the function name is the dependency source.
プログラムのコードにおいて変更がなされた際に前記変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報を生成するプログラム分析装置と、
前記影響情報に基づいて、前記影響箇所を示すノード、及び前記依存関係の依存先に対応する前記ノードから前記依存関係の依存元に対応する前記ノードへの有向辺である影響線を含む、グラフを、前記コードに重ね合わせた描画データ出力するグラフ生成手段を含むプログラム表示装置と、
前記描画データを描画する描画装置と、
を備えたことを特徴とするプログラム表示システム。
A program analysis apparatus that generates influence information including dependency information between influence points that are variables affected by the change when a change is made in a program code;
Based on the influence information, it includes: a node indicating the influence point; and an influence line which is a directed edge from the node corresponding to the dependence destination of the dependence relation to the node corresponding to the dependence source of the dependence relation A program display device including graph generation means for outputting drawing data in which a graph is superimposed on the code;
A drawing device for drawing the drawing data;
The program display system characterized by having.
プログラムのコードにおいて変更がなされた際に前記変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報に基づいて、前記影響箇所を示すノード、及び前記依存関係の依存先に対応する前記ノードから前記依存関係の依存元に対応する前記ノードへの有向辺である影響線を含む、グラフを、前記コードに重ね合わせた描画データを出力する
ことを特徴とするプログラム表示方法。
A node indicating the influence point, based on influence information including dependency information between influence points which are variables influenced by the change when a change is made in a program code, and a dependency of the dependence relation A program comprising: outputting drawing data in which a graph is superimposed on the code, the graph including an influence line being a directed side from the node corresponding to the node to the node corresponding to the dependency source of the dependency relation. Display method.
プログラムのコードにおいて変更がなされた際に前記変更による影響を受ける変数である影響箇所の間の、依存関係の情報を含む影響情報に基づいて、前記影響箇所を示すノード、及び前記依存関係の依存先に対応する前記ノードから前記依存関係の依存元に対応する前記ノードへの有向辺である影響線を含む、グラフを、前記コードに重ね合わせた描画データを出力するグラフ生成処理
をコンピュータに実行させることを特徴とするプログラム表示プログラム。
A node indicating the influence point, based on influence information including dependency information between influence points which are variables influenced by the change when a change is made in a program code, and a dependency of the dependence relation A computer generates a graph generating process for outputting drawing data in which a graph including an influence line which is a directed side from the node corresponding to the node to the node corresponding to the dependency source of the dependency relation is output to a computer The program display program characterized by making it run.
JP2015118015A 2015-06-11 2015-06-11 PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM Active JP6506108B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015118015A JP6506108B2 (en) 2015-06-11 2015-06-11 PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015118015A JP6506108B2 (en) 2015-06-11 2015-06-11 PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM

Publications (2)

Publication Number Publication Date
JP2017004282A JP2017004282A (en) 2017-01-05
JP6506108B2 true JP6506108B2 (en) 2019-04-24

Family

ID=57754693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015118015A Active JP6506108B2 (en) 2015-06-11 2015-06-11 PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM

Country Status (1)

Country Link
JP (1) JP6506108B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10657025B2 (en) * 2018-10-18 2020-05-19 Denso International America, Inc. Systems and methods for dynamically identifying data arguments and instrumenting source code
JP7183877B2 (en) * 2019-03-13 2022-12-06 オムロン株式会社 Graph display device, graph display method, and graph display program
JP7295599B1 (en) * 2023-05-02 2023-06-21 敏夫 関 A program, system, and method for comprehensively visualizing aspects of data processing executed by a computer according to source code

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08292881A (en) * 1995-04-24 1996-11-05 Nec Corp Program influence range display device
JP2001325100A (en) * 2000-05-15 2001-11-22 Mitsubishi Electric Corp Program-analyzing device
JP3966518B2 (en) * 2004-03-12 2007-08-29 インターナショナル・ビジネス・マシーンズ・コーポレーション Program analysis apparatus, analysis method thereof, and program
JP2008282174A (en) * 2007-05-09 2008-11-20 Matsushita Electric Ind Co Ltd Information processor, information processing method, and information processing program
JP2009042951A (en) * 2007-08-08 2009-02-26 Hitachi Consulting Co Ltd Data extraction method and device from program
JP5775829B2 (en) * 2012-01-30 2015-09-09 日立オートモティブシステムズ株式会社 Software structure visualization program and system

Also Published As

Publication number Publication date
JP2017004282A (en) 2017-01-05

Similar Documents

Publication Publication Date Title
Izquierdo et al. JSONDiscoverer: Visualizing the schema lurking behind JSON documents
JP6149165B2 (en) Chart conversion system and method using metadata
US20170286068A1 (en) Development support system
He et al. A metamodel for the notation of graphical modeling languages
US9141596B2 (en) System and method for processing markup language templates from partial input data
US10572129B2 (en) Declarative user interface representation conversion via hierarchical templates
JP5665128B2 (en) Static analysis support device, static analysis support method, and program
JP6506108B2 (en) PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM
WO2009098739A1 (en) Program optimization device and program optimization method
US20150220236A1 (en) Post-designing method and apparatus based on variant configuration in development of graphic user interface
JP5176478B2 (en) Data flow analysis device, data flow analysis method, and data flow analysis program
CN111078217A (en) Brain graph generation method, apparatus and computer-readable storage medium
JP2020060919A (en) System migration support device, system migration support method and program
JP2019074966A (en) Sql sentence extraction device, sql sentence extraction method, and program
CN111949312A (en) Data module packaging method and device, computer equipment and storage medium
JP2009163662A (en) Information processor, control method of information processor, and control program of information processor
JP7260150B2 (en) WEBSITE DESIGN SUPPORT DEVICE, WEBSITE DESIGN SUPPORT METHOD, AND PROGRAM
Goto et al. Generation of UML package diagrams based on an attribute graph grammar
KR20150006612A (en) Web page making system and method for maintaining compatibility of web browser and font
JP6111150B2 (en) Source code analysis apparatus, source code analysis method, and program
CN109656556B (en) Method and device for generating self-adaptive page
KR101585048B1 (en) Algorithm simulation system based on diagram
US9792197B2 (en) Apparatus and program
CN113094044B (en) Method and terminal for writing PPT UI plug-in code
JP4553153B2 (en) Circuit graphic generation apparatus and generation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180515

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190123

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190328

R150 Certificate of patent or registration of utility model

Ref document number: 6506108

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150