JP5775829B2 - Software structure visualization program and system - Google Patents

Software structure visualization program and system Download PDF

Info

Publication number
JP5775829B2
JP5775829B2 JP2012016046A JP2012016046A JP5775829B2 JP 5775829 B2 JP5775829 B2 JP 5775829B2 JP 2012016046 A JP2012016046 A JP 2012016046A JP 2012016046 A JP2012016046 A JP 2012016046A JP 5775829 B2 JP5775829 B2 JP 5775829B2
Authority
JP
Japan
Prior art keywords
variable
dependency
unit
source code
dependency relationship
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.)
Expired - Fee Related
Application number
JP2012016046A
Other languages
Japanese (ja)
Other versions
JP2013156786A (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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive 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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2012016046A priority Critical patent/JP5775829B2/en
Publication of JP2013156786A publication Critical patent/JP2013156786A/en
Application granted granted Critical
Publication of JP5775829B2 publication Critical patent/JP5775829B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Description

本発明はソフトウェアの構造を解析するソフトウェアツールに係り、特に解析結果を可視化する手法およびその手法に沿った処理を実行可能なソフトウェアツールに関する。   The present invention relates to a software tool for analyzing the structure of software, and more particularly to a method for visualizing analysis results and a software tool capable of executing processing according to the method.

ソフトウェアの規模が巨大化し、構造や処理の複雑さが増しており、設計者や検証者がソフトウェアの全容を把握することが困難になっている。またソフトウェアの開発が過去資産への継ぎ足しで行われることもあり、簡潔でないコード記述を生むことや、ソフトウェアへの追加・修正による影響の把握が困難なことの原因となっている。   The scale of software has grown and the complexity of structure and processing has increased, making it difficult for designers and verifiers to understand the entire software. In addition, software development is sometimes performed by adding to past assets, which causes unwritten code descriptions and makes it difficult to understand the effects of additions and modifications to software.

特に制御装置では、装置の電動化に伴う制御用ソフトウェアの規模増大により、ソフトウェアを含む電子制御装置に不具合が潜在し、システムの安全性を損う恐れが増していることを背景として、IEC61508やISO26262などの機能安全規格が制定されている。   Especially in the control device, the increase in the scale of the control software accompanying the electrification of the device has the potential to cause problems in the electronic control device including the software and increase the risk of impairing the safety of the system. Functional safety standards such as ISO 26262 have been established.

システムの安全性を確保する上でも、設計者や検証者がソフトウェア、特に過去資産や他の設計者が記述したソースコードの構造や処理を理解することが好ましい。設計者や検証者による理解を容易にすることを目的として、プログラムに対し静的解析や動的解析を行い、その結果を関数コールグラフなどの図形として視覚化する手法とツールがある。視覚化対象のうち、ソフトウェアの構成上で重要な情報の1つとして、変数間の依存関係がある。ここで依存関係は、実行順序により実行結果が変化する可能性のある関係である。ソフトウェアの動作は、入力を始めとするデータを用いて演算し、出力に至る別のデータを変化させる処理の連続であるから、変数依存関係はソフトウェアの構成や処理概要を把握する上で重要である。   In order to ensure the safety of the system, it is preferable that the designer and the verifier understand the structure and processing of the software, particularly the past assets and the source code described by other designers. For the purpose of facilitating understanding by designers and verifiers, there are methods and tools for performing static analysis and dynamic analysis on programs and visualizing the results as figures such as function call graphs. Among the visualization objects, as one of important information on the software configuration, there is a dependency relationship between variables. Here, the dependency relationship is a relationship in which the execution result may change depending on the execution order. The software operation is a series of processes that calculate using data such as input and change other data that leads to output, so variable dependencies are important in understanding the software configuration and process overview. is there.

ソースコードから変数依存関係を解析しグラフとして表示することに近い先行技術として、特許文献1や特許文献2では、ソースコードからデータフローグラフを生成している。ここでデータフローグラフは、ある1ステートメントにおけるデータの流れ(変数依存関係)を示すものであり、複数ステートメント間に渡るデータの流れではない。   As prior arts that are close to analyzing variable dependency relationships from source code and displaying them as graphs, Patent Literature 1 and Patent Literature 2 generate a data flow graph from source code. Here, the data flow graph shows a data flow (variable dependency) in a certain statement, not a data flow between a plurality of statements.

非特許文献1では、PDG(Program Dependence Graph)を紹介している。PDGでは、ソースコードからステートメント間に存在するデータ依存関係(変数を定義、つまり値決めしている命令から、参照している命令へ到達する依存関係)や制御依存関係(分岐またはループの条件式にて変数を参照している命令から、その分岐・ループに含まれる命令にて変数を定義している命令に到達する依存関係)を有向グラフで示しており、グラフのノードはステートメントである。   Non-Patent Document 1 introduces PDG (Program Dependence Graph). In PDG, data dependency existing between source code and statements (dependency that arrives at the instruction being referenced from the instruction that defines the variable, that is, determines the value) and control dependency (conditional expression of branch or loop) The dependency relationship between the instruction referring to the variable and the instruction defining the variable by the instruction included in the branch / loop is indicated by a directed graph, and the nodes of the graph are statements.

非特許文献2,3では、変数依存関係の解析や表示を行っている。しかし依存関係の解析・表示において、変数を記述位置で区別していない。同じ名称、実体(記憶領域)の変数でも、記載位置(ファイル、関数、行、列)が異なれば、依存関係上では区別して扱う必要がある。   Non-patent documents 2 and 3 analyze and display variable dependency relationships. However, variables are not distinguished by description positions in dependency analysis / display. Even for variables with the same name and substance (storage area), if the description position (file, function, row, column) is different, it is necessary to treat them separately in terms of dependency.

特開平7−93144号公報Japanese Unexamined Patent Publication No. 7-93144 特開2003−50722号公報JP 2003-50722 A

『プログラムスライシング技術と応用』 共立出版(1995)"Program Slicing Technology and Applications" Kyoritsu Publishing (1995) 大崎,山本,阿草:『プログラム理解のための依存関係表示ツール』(FOSE’96)Osaki, Yamamoto, Aso: “Dependency Display Tool for Program Understanding” (FOSE'96) **井上研究室**** Inoue Laboratory **

上記従来技術では、実行時の処理順序を考慮してユーザに変数依存関係の解析結果を提供することについて考慮されていない。   In the above prior art, consideration is not given to providing the user with the analysis result of the variable dependency in consideration of the processing order at the time of execution.

本発明は、複数ステートメント間や関数間など、ソースコードの広域に渡る変数間の依存関係を解析し、ソフトウェア実行時の処理順序により決定される変数同士の与える影響・依存関係を視覚的に理解できるようにすること、また、変数を単位(ノード)としてグラフに表示することにより、ソフトウェアの構成や処理概要に関する情報をユーザに提供することを目的とする。   The present invention analyzes dependencies between variables over a wide range of source code, such as between multiple statements and functions, and visually understands the influences and dependencies between variables determined by the processing order during software execution It is also intended to provide a user with information on the software configuration and processing overview by enabling a user to display a variable as a unit (node) on a graph.

上記課題を解決するため本発明は、コンピュータに、ソフトウェアのソースコードを入力させ、前記ソースコードを解析させ、解析結果を出力させるためのソフトウェアの構造可視化プログラムにおいて、前記プログラムは、前記コンピュータに前記ソースコードの構文解析を実行させるための構文解析部と、前記コンピュータに前記構文解析部による構文解析結果から、前記ソースコード中の記述位置毎に区別された複数の変数について、変数間の依存関係を導出させるための変数依存関係解析部と、前記変数依存関係解析部により導出した変数依存関係を、前記複数の変数の前記ソースコード中の記述位置情報と共に、前記コンピュータに表示装置への表示、または前記コンピュータ外部への出力を実行させるための変数依存関係出力部と、を有するよう構成する。   In order to solve the above problems, the present invention provides a software structure visualization program for causing a computer to input a software source code, analyzing the source code, and outputting an analysis result. Dependency relationship between variables for a plurality of variables distinguished for each description position in the source code from a syntax analysis unit for causing the source code to analyze the syntax and a result of the syntax analysis by the computer A variable dependency analysis unit for deriving and a variable dependency relationship derived by the variable dependency relationship analysis unit together with description position information in the source code of the plurality of variables displayed on the display device on the computer, Or a variable dependency output unit for executing output to the outside of the computer It is configured to have a.

本発明によれば設計者や検証者がソフトウェアの構造や処理概要を、変数依存関係の観点から理解することを容易にできる。   According to the present invention, it is possible for a designer or a verifier to easily understand the software structure and processing outline from the viewpoint of variable dependency.

本発明の基本機能構成図。The basic function block diagram of this invention. 変数依存関係解析部の機能構成図。The functional block diagram of a variable dependence analysis part. 変数依存関係解析の処理フロー。Processing flow of variable dependency analysis. 実施例1で解析対象とするソースコード。Source code to be analyzed in the first embodiment. 実施例1のソースコードの構文木。The source code syntax tree of the first embodiment. 実施例1のソースコードの制御フローに関するデータベース。The database regarding the control flow of the source code of Example 1. FIG. 実施例1のソースコードの制御フローグラフ。2 is a control flow graph of source code of the first embodiment. 実施例1のソースコードの代入依存関係に関するデータベース。The database regarding the substitution dependency of the source code of Example 1. FIG. 実施例1のソースコードのデータ依存関係に関するデータベース。The database regarding the data dependency of the source code of Example 1. FIG. 実施例1のソースコードの制御依存関係に関するデータベース。The database regarding the control dependence relationship of the source code of Example 1. FIG. 実施例1のソースコードの変数依存関係(ネットワーク)を示すグラフ。3 is a graph showing a variable dependency relationship (network) of source code according to the first embodiment. 変数依存関係(ネットワーク)から変数依存関係(ツリー)を抽出する拡張機能構成図。The extended function block diagram which extracts a variable dependency (tree) from a variable dependency (network). 変数依存関係(ツリー)を抽出する処理フロー。Process flow to extract variable dependency (tree). 実施例1のソースコードの変数依存関係(ツリー)を表すグラフ。3 is a graph showing a variable dependency (tree) of source code according to the first embodiment. 変数依存関係(ツリー)とソースコードとの連携表示例。Linked display example of variable dependency (tree) and source code. 実施例1のソースコードの実行パス数カウント結果表示例。5 is a display example of the execution path count result of the source code of the first embodiment. 異なる実行パスにて間接的に影響する変数依存関係(ツリー)を抽出する処理フロー。A processing flow that extracts variable dependencies (trees) that indirectly affect different execution paths. 実施例2で解析対象とするソースコード。Source code to be analyzed in the second embodiment. 実施例2のソースコードから異なる実行パスにて間接的に影響する変数依存関係(ツリー)を抽出した例。The example which extracted the variable dependence relationship (tree) indirectly influenced in the different execution path from the source code of Example 2. FIG. 2つの変数依存関係を比較する拡張機能構成図。The expansion functional block diagram which compares two variable dependencies. 2つの変数依存関係を比較する処理フロー。A processing flow for comparing two variable dependencies. 変数依存関係の比較例、差分がある場合。Comparison example of variable dependency, when there is a difference. 変数依存関係の比較例、差分がない場合。Comparison example of variable dependency, when there is no difference. 関数コールグラフと変数依存関係(ツリー)との複合表示例。Compound display example of function call graph and variable dependency (tree). 本発明のシステム構成。The system configuration of the present invention. 変数依存関係に基づくスライシング処理結果の表示例。Display example of slicing processing result based on variable dependency.

本発明における構文解析部は、ソースコードを解析して構文情報を出力する。変数依存関係解析部は、制御フロー導出部、代入依存関係導出部、データ依存関係導出部、制御依存関係導出部、変数依存関係導出部からなる。制御フロー導出部は、前記構文情報から制御フローを出力する。代入依存関係導出部は、前記制御フローから2変数間の代入依存関係を出力する。データ依存関係導出部は、前記制御フローから2変数間のデータ依存関係を出力する。制御依存関係導出部は、前記制御フローから2変数間の制御依存関係を出力する。変数依存関係導出部は、前記代入依存関係と前記データ依存関係と前記制御依存関係とから複数ステートメント間に渡る変数依存関係を出力する。変数依存関係出力部は、前記変数依存関係をグラフとして表示する。前記の各部における変数は、変数名や変数の実体(記憶領域)だけでなく、ソースコードにおける記述位置によっても区別して扱う。   The syntax analysis unit in the present invention analyzes the source code and outputs syntax information. The variable dependency relationship analyzing unit includes a control flow deriving unit, an assignment dependency deriving unit, a data dependency deriving unit, a control dependency deriving unit, and a variable dependency deriving unit. The control flow deriving unit outputs a control flow from the syntax information. The substitution dependency relationship deriving unit outputs a substitution dependency relationship between two variables from the control flow. The data dependency relationship deriving unit outputs a data dependency relationship between two variables from the control flow. The control dependency relationship deriving unit outputs a control dependency relationship between two variables from the control flow. The variable dependency relationship deriving unit outputs a variable dependency relationship between a plurality of statements from the substitution dependency relationship, the data dependency relationship, and the control dependency relationship. The variable dependency relationship output unit displays the variable dependency relationship as a graph. The variables in each of the above sections are distinguished from each other not only by variable names and variable entities (storage areas) but also by description positions in the source code.

[実施例1]
以下、図面を用いて本発明の実施形態について説明を行う。
図1は、本発明を実現する基本的な機能構成図であり、本明細書における全ての実施例で共通である。本発明はソフトウェアツールとして実現されている。各機能はソフトウェアとして実装されており、表示画面、主演算装置、主記憶装置(メインメモリ)、ハードディスク等の記憶媒体、キーボードやポインティングデバイス等の入力装置を備えるコンピュータ上で実行される。
[Example 1]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a basic functional configuration diagram for realizing the present invention, and is common to all embodiments in the present specification. The present invention is implemented as a software tool. Each function is implemented as software, and is executed on a computer including a display screen, a main arithmetic device, a main storage device (main memory), a storage medium such as a hard disk, and an input device such as a keyboard and a pointing device.

ファイル入力部11は、解析対象となるソースコードファイルをユーザが1ないし複数選択できる機能を有しており、ユーザによるファイル指定に従い、ソースコードファイルをコンピュータの記憶媒体から読み込む。構文解析部12は、ユーザが解析実行を指示すると、ファイル入力部11が読み込んだソースコードファイルの構文を解析し、構文木(Abstract Syntax Tree)データを生成する。なお、本明細書の実施例では、C言語で記述されているソースコードを扱う。構文木において、記述位置で区別される各変数には、記述位置のほか、実体(記憶媒体における領域)がIDの形で割り当てられている。実体は、変数の名称や型、スコープ(グローバル、ローカルなど)から解析する。   The file input unit 11 has a function that allows the user to select one or more source code files to be analyzed, and reads the source code file from a computer storage medium in accordance with the file designation by the user. When the user instructs execution of analysis, the syntax analysis unit 12 analyzes the syntax of the source code file read by the file input unit 11, and generates syntax syntax tree data. In the embodiment of the present specification, source code written in C language is handled. In the syntax tree, in addition to the description position, an entity (area in the storage medium) is assigned to each variable distinguished by the description position in the form of an ID. The entity is analyzed from the name, type, and scope (global, local, etc.) of the variable.

関数抽出部13は、構文解析部12が生成した構文木から、ソースコード中に記述されている各関数について、名称や記述位置などの属性を抽出し、関数属性データとして出力する。実行開始点選択部14は、関数抽出部13が出力した関数属性データから関数名を表示する。ユーザは実行開始点選択部14の表示から、実行開始点とする関数を1ないし複数選択することができ、実行開始点選択部14は選択された関数を実行開始点データとして出力する。変数依存関係解析部15は、構文解析部12が生成した構文木と、実行開始点選択部14が出力した実行開始点データとから、変数依存関係を解析しデータとして出力する。変数依存関係出力部16は、変数依存関係解析部15が出力する変数依存関係データをグラフとして表示する。ソースコード出力部17は、ファイル入力部11が読み込んだソースコードファイルの内容を表示する。また、変数依存関係出力部16の変数依存関係との連携表示が可能である。連携表示の際には、構文解析部12が生成した構文木データも利用する。   The function extraction unit 13 extracts attributes such as a name and a description position for each function described in the source code from the syntax tree generated by the syntax analysis unit 12, and outputs the function attribute data. The execution start point selection unit 14 displays the function name from the function attribute data output by the function extraction unit 13. The user can select one or more functions as the execution start point from the display of the execution start point selection unit 14, and the execution start point selection unit 14 outputs the selected function as execution start point data. The variable dependency relationship analysis unit 15 analyzes the variable dependency relationship from the syntax tree generated by the syntax analysis unit 12 and the execution start point data output from the execution start point selection unit 14 and outputs the data as data. The variable dependency relationship output unit 16 displays the variable dependency relationship data output from the variable dependency relationship analysis unit 15 as a graph. The source code output unit 17 displays the contents of the source code file read by the file input unit 11. In addition, it is possible to display a linkage with the variable dependency relationship of the variable dependency relationship output unit 16. At the time of the cooperative display, the syntax tree data generated by the syntax analysis unit 12 is also used.

図25は、本発明をシステムとして実現した場合のシステム構成である。
図1で説明したソフトウェアは、ソフトウェア構造可視化プログラム25131として、例えばコンピュータ251上のROM2513に格納されており、CPU2512によって読み出されて実行される。コンピュータ251はソフトウェア構造可視化プログラム25131によって規定された処理、すなわち図1で説明した各部の処理を実行する。解析対象となるソースコードファイルは、コンピュータ251上のハードディスク2514に格納されている。解析実行指示などのユーザ操作は、キーボードなどの入力装置252から行うことができる。
FIG. 25 shows a system configuration when the present invention is realized as a system.
The software described in FIG. 1 is stored as, for example, a ROM 2513 on the computer 251 as the software structure visualization program 25131, and is read and executed by the CPU 2512. The computer 251 executes processing defined by the software structure visualization program 25131, that is, processing of each unit described in FIG. The source code file to be analyzed is stored in the hard disk 2514 on the computer 251. User operations such as analysis execution instructions can be performed from an input device 252 such as a keyboard.

なお、ソースコード出力部17による出力は、例えばディスプレイなどの表示装置253に成されるが、図示しない外部コンピュータへのネットワークを介した出力、CD−ROMなどの外部記憶媒体へのデータファイル形式での書き込みによる出力であってもよい。   The output from the source code output unit 17 is output to a display device 253 such as a display, for example, but is output via a network to an external computer (not shown) or in a data file format to an external storage medium such as a CD-ROM. May be output by writing.

図2は、変数依存関係解析部15の詳細を示している。制御フロー導出部21は、実行開始点選択部14の出力する実行開始点データから、構文解析部12の出力する構文木を辿り、制御フローを解析し、データとして出力する。代入依存関係導出部22、データ依存関係導出部23、制御依存関係導出部24は、制御フロー導出部21の出力する制御フローデータから、それぞれ代入依存関係、データ依存関係、制御依存関係を導出し、データとして出力する。   FIG. 2 shows details of the variable dependency relationship analysis unit 15. The control flow derivation unit 21 follows the syntax tree output from the syntax analysis unit 12 from the execution start point data output from the execution start point selection unit 14, analyzes the control flow, and outputs the data as data. The substitution dependency derivation unit 22, the data dependency derivation unit 23, and the control dependency derivation unit 24 derive the substitution dependency, the data dependency, and the control dependency from the control flow data output from the control flow derivation unit 21, respectively. And output as data.

なお、本発明における代入依存関係、データ依存関係、制御依存関係は変数を単位(ノード)としているが、各変数は変数名や実体だけでなく、ソースコードにおける記述位置で区別される。例えばグローバル変数a,b,cが宣言されており、ソースコードファイルsrc.cに記述された関数func内において、(src.cの)3行目にb=aという式、5行目にc=aという式がある場合、3行目のaと5行目のaとは異なるノードとして扱う。本明細書では、3行目のaを「a(L3@func)」のように表記する。変数の記述位置属性は、行だけでなく列も有するが、本明細書では一部の表記において列情報を省略する。また、記述位置属性には関数名の代わりにファイル名やファイルパスを用いても良い。「変数」には周辺回路との入出力を行うマイコンのレジスタにアクセスする変数を含む。変数依存関係には、変数と定数との依存関係も含む。   Note that the substitution dependency, data dependency, and control dependency in the present invention have variables as units (nodes), but each variable is distinguished not only by the variable name and entity but also by the description position in the source code. For example, global variables a, b, and c are declared, and the source code file src. In the function func described in c, if there is an expression b = a on the third line (of src.c) and an expression c = a on the fifth line, a in the third line and a in the fifth line Is treated as a different node. In this specification, “a” in the third line is expressed as “a (L3 @ func)”. The description position attribute of a variable includes not only a row but also a column. In this specification, column information is omitted in some notations. In addition, a file name or a file path may be used for the description position attribute instead of the function name. “Variable” includes a variable for accessing a register of a microcomputer that performs input / output with a peripheral circuit. The variable dependency includes a dependency between a variable and a constant.

本明細書にて「代入依存関係」は、2変数間の代入処理による依存関係を意味する。例として、変数a,bに対しa=bというステートメントがあれば、a←b(aはbに依存する。bはaに影響を与える)という依存関係がある。代入依存関係は、構文木から代入文を検索すれば抽出できる。なおソフトウェアの解析では、定義(値決め)される変数はdef、参照される変数はuseと呼ばれる。上記例では、変数aがdef、変数bがuseである。   In this specification, “assignment dependency” means dependency by assignment processing between two variables. As an example, if there is a statement a = b for variables a and b, there is a dependency relationship a ← b (a depends on b. B affects a). An assignment dependency can be extracted by searching an assignment statement from a syntax tree. In software analysis, a variable to be defined (value determination) is called def, and a variable to be referenced is called use. In the above example, the variable a is def and the variable b is use.

データ依存関係は、あるdefから、そのdefが含まれるステートメントから遷移可能な各実行パスにおいて処理順序的に最も近い同実体のuseへ到達する依存関係である。このため、構文木の各defについて、そのdefから構文木を制御フローに従って各実行パスを辿り、同実体のdefより前に出現する同実体useを探索することで、データ依存関係を導出することができる。具体的な処理方法の例としては、構文木においてdefの含まれる各ステートメントから、構文木を辿っていく。if文などの分岐文は、各分岐を辿る。上記defと同実体useを発見したら、そのuseまでのデータ依存関係を記憶し、現在辿っている分岐については探索を終了する。   The data dependency relationship is a dependency relationship that reaches from a certain def to the same entity use that is closest in the processing order in each execution path that can be transitioned from a statement including the def. For this reason, for each def of the syntax tree, the data dependency is derived by tracing the execution path through the syntax tree from the def according to the control flow and searching for the entity use appearing before the def of the entity. Can do. As an example of a specific processing method, the syntax tree is traced from each statement including def in the syntax tree. A branch statement such as an if statement follows each branch. When the same entity use as the def is found, the data dependency relationship to that use is stored, and the search is terminated for the branch currently being followed.

制御依存関係は、if文などの分岐文や、while文などのループ文の条件式にて記述されるuseから、当該分岐文やループ文の内部に記述されるdefへ到達する依存関係である。このため、構文木における分岐文・ループ文の条件式に記述される各useについて、そのuseから構文木を制御フローに従って各実行パスを辿り、当該分岐文・ループ文の内部に記述されるdefを探索することで、制御依存関係を導出することができる。例えばif文には条件式が真のときの節と、偽のときの節とがあるが、それぞれの節に含まれるdefを探索する。このとき、useとdefとは実体が異なっても制御依存関係を生じる。   The control dependency relationship is a dependency relationship that reaches a def described in the branch statement or loop statement from a use statement described in a conditional statement of a branch statement such as an if statement or a loop statement such as a while statement. . Therefore, for each use described in the conditional expression of the branch statement / loop statement in the syntax tree, each execution path is traced from the use according to the control flow through the syntax tree, and def described in the branch statement / loop statement. By searching for, control dependence can be derived. For example, the if statement includes a clause when the conditional expression is true and a clause when the conditional expression is false. The def included in each clause is searched. At this time, even if use and def are different, a control dependency relationship is generated.

変数依存関係導出部25は、代入依存関係導出部22、データ依存関係導出部23、制御依存関係24が出力する依存関係をつなぎ合わせ、解析対象としたソースコードの広域に渡る変数依存関係を導出し、データとして出力する。より正確には、実行開始点選択部14にてユーザが選択した実行開始点の関数から始まる実行パス全体に渡る変数依存関係である。出力された変数依存関係データは、変数依存関係出力部16に渡される。   The variable dependency relationship deriving unit 25 connects the dependency relationships output by the substitution dependency relationship deriving unit 22, the data dependency relationship deriving unit 23, and the control dependency relationship 24, and derives a variable dependency over a wide area of the source code to be analyzed. And output as data. More precisely, it is a variable dependency over the entire execution path starting from the function of the execution start point selected by the user in the execution start point selection unit 14. The output variable dependency relationship data is passed to the variable dependency relationship output unit 16.

図3は、図1、図2に示した機能による変数依存関係を導出する処理のフローを示している。ステップ31にて、構文解析部12が構文木データを出力する。構文木データは、RAM2511のような記憶媒体に一時的に記憶されてもよいし、ハードディスク2514上にデータファイルとして作成されてもよい。ステップ32にて、ステップ31にて生成された構文木データから関数抽出部13が関数名を抽出し、実行開始点選択部14が関数名を表示してユーザによる実行開始点選択を受け付ける。ステップ33にて、制御フロー導出部21は構文木データとステップ32にて入力された実行開始点データとから、制御フローデータを出力する。制御フローデータに関しても同様に、RAM2511やハードディスク2514など、出力先はいずれであってもよい。ステップ34にて、代入依存関係導出部22はステップ33にて出力された制御フローデータから、代入依存関係を導出し出力する。ステップ35にて、データ依存関係導出部23はステップ33にて出力された制御フローデータから、データ依存関係を導出し出力する。ステップ36にて、制御依存関係導出部24はステップ33にて出力された制御フローデータから、制御依存関係を導出し出力する。ステップ37にて、変数依存関係導出部は、ステップ34にて出力された代入依存関係と、ステップ35にて出力されたデータ依存関係と、ステップ36にて出力された制御依存関係とを連結し、ソースコードの広域に渡る変数依存関係を導出し出力する。データ依存関係、制御依存関係、変数依存関係それぞれに関しても同様に、RAM2511やハードディスク2514など、出力先はいずれであってもよい。   FIG. 3 shows a flow of processing for deriving a variable dependency relationship by the functions shown in FIGS. In step 31, the syntax analysis unit 12 outputs syntax tree data. The syntax tree data may be temporarily stored in a storage medium such as the RAM 2511 or may be created as a data file on the hard disk 2514. In step 32, the function extraction unit 13 extracts the function name from the syntax tree data generated in step 31, and the execution start point selection unit 14 displays the function name and accepts the execution start point selection by the user. In step 33, the control flow deriving unit 21 outputs control flow data from the syntax tree data and the execution start point data input in step 32. Similarly, regarding the control flow data, any output destination such as the RAM 2511 and the hard disk 2514 may be used. In step 34, the substitution dependency relationship deriving unit 22 derives and outputs the substitution dependency relationship from the control flow data output in step 33. In step 35, the data dependency derivation unit 23 derives and outputs the data dependency from the control flow data output in step 33. In step 36, the control dependency relationship deriving unit 24 derives and outputs the control dependency relationship from the control flow data output in step 33. In step 37, the variable dependency relationship deriving unit connects the substitution dependency output in step 34, the data dependency output in step 35, and the control dependency output in step 36. Derives and outputs variable dependencies over a wide area of the source code. Similarly, for each of the data dependency relationship, the control dependency relationship, and the variable dependency relationship, any output destination such as the RAM 2511 or the hard disk 2514 may be used.

以下では、サンプルソースコードに対する変数依存関係の解析と表示の例を説明する。図4は、解析対象とするソースコードファイルである。ファイル左端の数値は、行番号を示している。図5は、図4のサンプルソースコードを入力として構文解析部12が出力する構文木データをグラフとして示している(ただし変数と関数の宣言は省略している。また、代入文もツリーに分解できるが省略している)。構文木データ51〜54はそれぞれ関数f1,f2,f3,f4に対応しており、構文木の各ノードは1構文要素を意味する。各構文ノードは解析対象とされたソースコード全体で一意のID(構文ID)が割り振られている。図4の各構文ノードの右にカッコ内で記された数値が、構文IDである。構文木の構成を一部説明すると、関数f1(構文ID100)の下位にはif文(101)が配され、当該if文の下位には条件式「x>0」(103)、条件式が真のときの節(104)、条件式が偽のときの節(106)が配されている。なお図5には描画していないが、構文木の各ノードは属性として、記述されているファイル名、記述開始位置(行・列)と記述終了位置(行・列)とを有する。例えばif文(構文ID=101)のノードには、ファイル名「src01.c」、記述開始位置「5行2列目」、記述終了位置「9行2列目」が記録されている。   In the following, an example of analysis and display of variable dependency on sample source code will be described. FIG. 4 shows a source code file to be analyzed. The numerical value at the left end of the file indicates the line number. FIG. 5 is a graph showing the syntax tree data output by the parsing unit 12 with the sample source code of FIG. 4 as an input (however, declarations of variables and functions are omitted. The assignment statement is also decomposed into a tree). Yes, but omitted) The syntax tree data 51 to 54 correspond to the functions f1, f2, f3, and f4, respectively, and each node of the syntax tree means one syntax element. Each syntax node is assigned a unique ID (syntax ID) in the entire source code to be analyzed. A numerical value written in parentheses to the right of each syntax node in FIG. 4 is a syntax ID. To explain a part of the structure of the syntax tree, an if statement (101) is placed below the function f1 (syntax ID 100), and a conditional expression “x> 0” (103) is placed below the if statement. A clause (104) when true and a clause (106) when the conditional expression is false are arranged. Although not drawn in FIG. 5, each node of the syntax tree has a described file name, description start position (row / column), and description end position (row / column) as attributes. For example, the file name “src01.c”, the description start position “5th row and 2nd column”, and the description end position “9th row and 2nd column” are recorded in the node of the “if” statement (syntax ID = 101).

図6は、制御フロー導出部21が出力する制御フローデータの例を示している。これはユーザが実行開始点選択部14にて、関数f1とf4を選択した場合のデータである。制御フローデータ61にて、1つのデータセット(1行)は1構文要素を意味し、構文ID、ソースコードのファイルパス(図では記載省略)、関数名(または関数ID)と開始行・列で表される記述位置、ステートメント、ステートメントに含まれる変数の実体ID、「通過点」の各項目からなる。変数実体IDは構文解析部12により解析木データにて、変数の宣言を抽出した順番で一意に割り振られている。「通過点」は、当該構文に到達するまでに通過した、関数呼び出し文、関数入り口、分岐文などの構文IDが通過順に並ぶデータである。いくつかの構文要素について通過点データを説明すると、関数f1(構文ID100)と関数f4(400)は実行開始点であるため、通過点は空である。条件式x>0(103)、真文a=1(105)、偽文a=0(107)は関数f1(100)、if文(101)が通過点となっている。またそれぞれ条件文(102)、TRUE節(104)、FALSE節(106)が通過点となっている。条件式y>0(403)、代入文z+=y(405)、y−−(406)は関数f4(400)、while文(401)が通過点となっている。またそれぞれ条件文(402)、ループ内(404)が通過点となっている。このように通過点データは構文木における各ノードの親子関係から導出することができる。   FIG. 6 shows an example of control flow data output from the control flow deriving unit 21. This is data when the user selects the functions f1 and f4 in the execution start point selection unit 14. In the control flow data 61, one data set (one line) means one syntax element, syntax ID, source code file path (not shown in the figure), function name (or function ID), and start row / column. The description position, the statement, the entity ID of the variable included in the statement, and the “passing point” items. The variable entity IDs are uniquely assigned by the parsing unit 12 in the order in which the variable declarations are extracted in the parse tree data. The “passing point” is data in which syntax IDs such as a function call statement, a function entry, and a branch statement that have passed through until reaching the syntax are arranged in the passing order. Explaining the passing point data for several syntax elements, the function f1 (syntax ID 100) and the function f4 (400) are the execution start points, so the passing point is empty. Conditional expression x> 0 (103), true sentence a = 1 (105), and fake sentence a = 0 (107) have a function f1 (100) and an if sentence (101) as passing points. The conditional statement (102), the TRUE clause (104), and the FALSE clause (106) are passing points, respectively. Conditional expression y> 0 (403), assignment statement z + = y (405), y-(406) has function f4 (400) and while statement (401) as passing points. In addition, the conditional statement (402) and the inside of the loop (404) are passing points. Thus, the passing point data can be derived from the parent-child relationship of each node in the syntax tree.

また制御フローデータ61にて、各構文のデータは実行順序に基づく半順序で並べられている。つまり、基本的には実行順序通りであるが、例えばif文の真文と偽文とには順序関係がなく、データ上はどちらかが先に並べられている。2つの構文間における順序関係の有無は、通過点データとステートメント種類から判定することができる。例えば、真文(構文ID105)と偽文(107)は通過点データがif文(101)まで同一だが、その後のTRUE節(104)とFALSE節(106)とで異なるので、if文(101)から並列であることがわかる。代入文(108)と関数呼び出し文(109)は、通過点データが同一であるため、順序関係があるとわかる。   In the control flow data 61, the data of each syntax is arranged in a semi-order based on the execution order. That is, the execution order is basically the same, but, for example, there is no order relation between the true sentence and the false sentence of the if statement, and one of them is arranged first on the data. Whether there is an order relationship between the two syntaxes can be determined from the passing point data and the statement type. For example, the true sentence (syntax ID 105) and the fake sentence (107) have the same passing point data up to the if sentence (101), but are different in the subsequent TRUE clause (104) and the FALSE clause (106). ) Shows that they are parallel. The assignment statement (108) and the function call statement (109) have the same passing point data, and thus are understood to have an order relationship.

図7は、制御フローデータ61を有向グラフにしたものである。ノードの数値は構文IDである。変数依存関係導出部25は制御フローデータ61から、制御フローグラフ71,72に示された制御フローと同等の情報を得ることができる。例えば、制御フローデータ72にて、代入文(406)から条件文(403)に戻るフローの付与は、通過点データの「ループ内(404)」が付与されているのが代入文(406)までであることから判断することができる。   FIG. 7 shows the control flow data 61 in a directed graph. The numerical value of the node is a syntax ID. The variable dependency relationship deriving unit 25 can obtain information equivalent to the control flow shown in the control flow graphs 71 and 72 from the control flow data 61. For example, in the control flow data 72, the flow that returns from the assignment statement (406) to the conditional statement (403) is assigned the passage statement data “in-loop (404)”. It can be judged from that.

図8は、代入依存関係導出部22が出力する代入依存関係データを示している。代入依存関係データ81にて、1つのデータセット(1行)は1つの依存関係を意味し、依存先変数(def)と依存元変数(use)のデータとから構成され、各変数のデータは変数名または即値、変数(または即値)の実体ID、関数名と開始行・列とで表される記述位置の各項目からなる。なお、関数f4の5行目に記述されたステートメントz+=yの変数zは、defとuseの2つに分解されている。代入依存関係81は、制御フローデータ61(または構文木データ51〜54)から代入文を抽出して導出できる。   FIG. 8 shows the assignment dependency relationship data output by the assignment dependency relationship deriving unit 22. In the substitution dependency relationship data 81, one data set (one line) means one dependency relationship, and is composed of dependency destination variable (def) and dependency source variable (use) data. It consists of items of variable name or immediate value, entity ID of variable (or immediate value), description position represented by function name and start row / column. Note that the variable z of the statement z + = y described in the fifth line of the function f4 is broken down into two, def and use. The assignment dependency 81 can be derived by extracting an assignment statement from the control flow data 61 (or syntax tree data 51 to 54).

図9は、データ依存関係導出部23が出力するデータ依存関係データを示している。データ依存関係91にて、1つのデータセット(1行)は1つの依存関係を意味し、依存先変数(use)と依存元変数(def)のデータとからなり、各変数のデータ項目は代入依存関係データ81と同じである。   FIG. 9 shows data dependency relationship data output from the data dependency relationship deriving unit 23. In the data dependency 91, one data set (one line) means one dependency, and is composed of the dependency destination variable (use) and the dependency source variable (def), and the data item of each variable is assigned. This is the same as the dependency relationship data 81.

データ依存関係データ91の導出例として、「z(L8@f4)←z(L5@f4)」と「z(L5@f4)←z(L5@f4)」とを説明する。制御フローデータ61にて、構文ID405のdefであるz(L5@f4)を始点として、z(L5@f4)と実体(ID12)が同じuseを探索する。z(L5@f4)はwhile文(構文ID401)のループ内(404)にあるが、このループは構文ID406までとなっている。構文ID406までに該当するuseが発見されないので、2つの実行パス、構文ID403〜406と構文ID407〜とをそれぞれ探索する。それぞれの実行パスで最初に発見される該当useは、構文ID405のz(L5@f4)と構文ID407のz(L8@f4)であるため、z(L5@f4)defを依存元とするデータ依存関係があると判定する。   As a derivation example of the data dependency relationship data 91, “z (L8 @ f4) ← z (L5 @ f4)” and “z (L5 @ f4) ← z (L5 @ f4)” will be described. The control flow data 61 searches for a use having the same entity (ID12) as z (L5 @ f4), starting with z (L5 @ f4), which is def of the syntax ID 405. z (L5 @ f4) is in the loop (404) of the while statement (syntax ID 401), but this loop is up to syntax ID 406. Since no corresponding use is found up to syntax ID 406, two execution paths, syntax IDs 403 to 406 and syntax ID 407, are searched. Since the corresponding use first found in each execution path is z (L5 @ f4) of syntax ID 405 and z (L8 @ f4) of syntax ID 407, data having z (L5 @ f4) def as a dependency source Judge that there is a dependency.

図10は、制御依存関係導出部24が出力する制御依存関係データを示している。制御依存関係データ101にて、1つのデータセット(1行)は1つの依存関係を意味し、依存先変数(use)と依存元変数(def)のデータとからなり、各変数のデータ項目は代入依存関係データ81と同じである。   FIG. 10 shows control dependency relationship data output from the control dependency relationship deriving unit 24. In the control dependency relationship data 101, one data set (one line) means one dependency relationship, and consists of dependency destination variable (use) and dependency source variable (def) data. This is the same as the substitution dependency relationship data 81.

制御依存関係データ101の導出例として、「a(L6@f1)←x(L5@f1)」と「a(L8@f1)←x(L5@f1)」とを説明する。制御フローデータ61にて、条件式x>0(構文ID103)で用いられるuseであるx(L5@f1)から、条件式(103)が属するif文(101)内で記述されるdefを探索すると、通過点データにif文(101)が含まれる構文(105,107)のa(L6@f1)とa(L8@f1)が該当するdefとして発見されるので、制御依存関係があると判定する。   As a derivation example of the control dependency relationship data 101, “a (L6 @ f1) ← x (L5 @ f1)” and “a (L8 @ f1) ← x (L5 @ f1)” will be described. In the control flow data 61, the def described in the if statement (101) to which the conditional expression (103) belongs is searched from x (L5 @ f1) which is a use used in the conditional expression x> 0 (syntax ID 103). Then, since a (L6 @ f1) and a (L8 @ f1) in the syntax (105, 107) in which the passage point data includes the if statement (101) are found as corresponding defs, there is a control dependency relationship. judge.

図11は、代入依存関係データ81、データ依存関係データ91、制御依存関係データ101を統合したデータを、変数依存関係を有向グラフとして表したものである。データ統合の方法は、def/useは各変数の属性情報とした上で、def/useの区別に依らず依存元と依存先とで1つのテーブルに纏める。変数依存関係出力部16は図11と同等の表示を行う。図4のソースコードに対し、関数f1とf4とを実行開始点に指定した場合、2つの変数依存関係111と112が導出される。変数依存関係111のルートノードはf(L14@f1)、変数依存関係112のルートノードはe(L8@f4)である。変数依存関係112にてz(L5@f4)defとz(L5@f4)useとの間に見られるように、依存関係にはループが存在し得る。このため、変数依存関係を図11のようにグラフ化した場合、ネットワーク形式となる。   FIG. 11 shows data obtained by integrating substitution dependency relationship data 81, data dependency relationship data 91, and control dependency relationship data 101, with variable dependency relationships represented as a directed graph. In the data integration method, def / use is attribute information of each variable, and the dependence source and the dependence destination are combined into one table regardless of the distinction of def / use. The variable dependency relationship output unit 16 performs display equivalent to that in FIG. When the functions f1 and f4 are designated as the execution start points for the source code in FIG. 4, two variable dependency relationships 111 and 112 are derived. The root node of the variable dependency relationship 111 is f (L14 @ f1), and the root node of the variable dependency relationship 112 is e (L8 @ f4). As can be seen between z (L5 @ f4) def and z (L5 @ f4) use in variable dependency 112, there may be a loop in the dependency. For this reason, when the variable dependency is graphed as shown in FIG.

図12は、ネットワーク形式の変数依存関係から、あるノード(位置で区別する変数)をルートとしてツリー形式のデータを抽出しグラフ表示するための機能構成図のうち、図1からの差分を示している。   FIG. 12 shows a difference from FIG. 1 in a functional configuration diagram for extracting and displaying a graph of data in a tree format with a certain node (variable distinguished by position) as a root from a variable dependency in the network format. Yes.

変数抽出部121は、構文解析部12の出力する構文木データのうち、変数宣言部を探索し、宣言されている変数の属性情報を抽出し、変数属性データとして出力する。変数属性データでは変数を実体で区別し記述位置では区別しない。変数選択部122は、変数抽出部121が出力した変数属性データを表示する。ユーザは変数選択部122の表示から、変数依存関係のルートにする変数を1ないし複数選択可能であり、変数選択部122は選択された変数に関する属性データを出力する。変数依存関係抽出部123は、変数依存関係解析部15の出力するネットワーク形式の変数依存関係データと、変数選択部122が出力する変数属性データとから、変数属性データに含まれる変数をルートとするツリー形式の変数依存関係を抽出し、データとして出力する。変数依存関係出力部16は、変数依存関係抽出部123の出力するツリー形式の変数依存関係データを表示する。   The variable extraction unit 121 searches the variable declaration unit from the syntax tree data output by the syntax analysis unit 12, extracts attribute information of the declared variable, and outputs it as variable attribute data. In variable attribute data, variables are distinguished by substance and not by description position. The variable selection unit 122 displays the variable attribute data output from the variable extraction unit 121. From the display of the variable selection unit 122, the user can select one or a plurality of variables to be the root of the variable dependency relationship, and the variable selection unit 122 outputs attribute data regarding the selected variable. The variable dependency relationship extraction unit 123 uses a variable included in the variable attribute data as a route from the network format variable dependency data output from the variable dependency relationship analysis unit 15 and the variable attribute data output from the variable selection unit 122. Extract variable dependency in tree format and output as data. The variable dependency relationship output unit 16 displays tree format variable dependency relationship data output from the variable dependency relationship extraction unit 123.

図13は、変数依存関係抽出部123によるツリー形式の変数依存関係を抽出する処理のフローを示している。処理フローは処理1から開始する。ステップ131にて、変数依存関係抽出部123は変数依存関係解析部15が出力するネットワーク形式の変数依存関係のルートノードを起点として、変数選択部122が出力する変数属性データに含まれる(記述位置で区別しない)変数と実体が同じ(記述位置で区別する)変数のノードを探索する。また、探索されたノードのコピーを、変数依存関係抽出部123が出力するツリー形式の変数依存関係のルートノードとする。ステップ132にて、変数依存関係抽出部123はステップ131にて設定したツリーのルートノードと、ネットワーク形式の依存関係から探索したノードを引数として、処理2を呼び出す。ここで処理2の仮引数となるノードを「追加点ノード」と「探索点ノード」とする。ステップ133〜135は、探索点ノードの全ての子ノード(探索点ノードが依存しているノード)についてそれぞれ実施し、子ノードが存在しなければ実施しない。ステップ133にて、変数依存関係抽出部123は当該子ノードのコピーを追加点ノードに依存先として接続する。ステップ134にて、当該子ノードのさらに子ノード、つまり対象ノードの孫ノードがツリーに追加済であるか否かを確認する。確認方法は、ツリーをルートノードから辿り、当該孫ノードと(実体だけでなく記述位置を含めて)一致するノードの有無を判定する。一致するノードが存在すれば追加済である。追加済であればステップ135をスキップし、追加済でなければステップ135に進む。ステップ135にて、変数依存関係抽出部123はステップ133にて追加したノードと当該子ノードを引数として、処理2を呼び出す。処理2は再帰構造となっており、全ての処理2が終了すると、処理2から処理1に戻り、処理1を終了する。   FIG. 13 shows a flow of processing for extracting the variable dependency relationship in the tree format by the variable dependency relationship extracting unit 123. The process flow starts from process 1. In step 131, the variable dependency relationship extracting unit 123 is included in the variable attribute data output from the variable selecting unit 122, starting from the root node of the network type variable dependency relationship output from the variable dependency relationship analyzing unit 15 (description position). The node of the variable that has the same entity as the variable (not distinguished by the description position) is identified. Further, a copy of the searched node is set as a root node of a tree-type variable dependency output from the variable dependency extraction unit 123. In step 132, the variable dependency relationship extraction unit 123 calls process 2 using the tree root node set in step 131 and the node searched from the network format dependency relationship as arguments. Here, the nodes that are the dummy arguments of the process 2 are “addition point node” and “search point node”. Steps 133 to 135 are performed for all the child nodes of the search point node (nodes on which the search point node depends), and are not performed if there are no child nodes. In step 133, the variable dependency relationship extraction unit 123 connects the copy of the child node as a dependency destination to the additional point node. In step 134, it is confirmed whether or not a child node of the child node, that is, a grandchild node of the target node has been added to the tree. In the confirmation method, the tree is traced from the root node, and the presence / absence of a node that matches the grandchild node (including not only the entity but also the description position) is determined. If a matching node exists, it has been added. If it has been added, step 135 is skipped, and if it has not been added, the process proceeds to step 135. In step 135, the variable dependency relationship extraction unit 123 calls process 2 using the node added in step 133 and the child node as arguments. The process 2 has a recursive structure, and when all the processes 2 are completed, the process 2 returns to the process 1 and the process 1 is terminated.

図14は、変数依存関係抽出部123が図13の処理フローにより抽出したツリー形式の変数依存関係データを、有向グラフとして表示した例であり、変数依存関係出力部16は図14と同等の表示を行う。ツリー形式の変数依存関係141,142は、図11に記載されたネットワーク形式の変数依存関係111,112から、変数eをルートノードとして抽出したデータであり、依存関係のループが消失している。   FIG. 14 is an example in which variable dependency relationship data in the tree format extracted by the variable dependency extraction unit 123 according to the processing flow of FIG. 13 is displayed as a directed graph, and the variable dependency output unit 16 displays the same display as in FIG. Do. The tree-type variable dependency relationships 141 and 142 are data obtained by extracting the variable e as a root node from the network-type variable dependency relationships 111 and 112 described in FIG. 11, and the dependency relationship loop is lost.

なお、ステップ134にてある孫ノードがツリーに追加済である場合に、ツリーにて当該孫ノードと同一のノードを、ステップ133にて追加したノードに依存先として接続すれば、ネットワーク形式での依存関係の抽出を行うことができる。   If a grandchild node in step 134 has been added to the tree, the same node as the grandchild node in the tree can be connected as a dependency destination to the node added in step 133. Dependency can be extracted.

また、図13の処理フローでは依存関係の子ノードを辿り追加しているが、これは「選択した変数に影響を与える変数の依存関係」である。図13の処理フローとは逆に親ノードを辿ってツリーを抽出し、図14や図15と同様の表示を行うと、「選択した変数が影響を与える依存関係」を抽出し表示を行うことができる。   In addition, in the processing flow of FIG. 13, dependency child nodes are traced and added, which is “variable dependency that affects the selected variable”. Contrary to the processing flow of FIG. 13, the tree is extracted by tracing the parent node, and when the same display as in FIG. 14 or FIG. 15 is performed, “the dependency that the selected variable affects” is extracted and displayed. Can do.

図14のようにツリー形式で変数依存関係を表示することにより、ユーザはルートノードとなる変数から依存関係を一方向に辿ることができるため、依存関係にループがあるときよりも表示が簡素になり、ユーザは依存関係を追い易く、ソフトウェアの構造を理解しやすくなる。   By displaying the variable dependency relationship in a tree format as shown in FIG. 14, the user can trace the dependency relationship in one direction from the variable serving as the root node, so the display is simpler than when there is a loop in the dependency relationship. Thus, the user can easily follow the dependency relationship and understand the structure of the software.

図24は、図11の変数依存関係111を異なる形式で描画したグラフであり、変数依存関係と関数コールの複合グラフである。変数依存関係出力部16は図24と同等の表示を行う。   FIG. 24 is a graph in which the variable dependency relationship 111 of FIG. 11 is drawn in different formats, and is a composite graph of the variable dependency relationship and the function call. The variable dependency relationship output unit 16 performs display equivalent to that in FIG.

関数ノード241〜243とその呼出順序を示す接続(矢印)は、関数コールグラフを示している。関数コールグラフのデータは、変数依存関係導出部25が、制御フロー導出部21による制御フローデータ61から、関数呼び出しの構文を抽出して連結することで作成する。具体的には、f1→f2(構文ID109)、f2→f3(201)を抽出し、連結している。   Connections (arrows) indicating the function nodes 241 to 243 and the calling order thereof indicate a function call graph. The function call graph data is created by the variable dependency derivation unit 25 by extracting and linking the function call syntax from the control flow data 61 by the control flow derivation unit 21. Specifically, f1 → f2 (syntax ID 109) and f2 → f3 (201) are extracted and connected.

変数依存関係240の各変数ノードは、関数ノード241〜243のうち、変数ノードが記述されている関数に対応する関数ノード内に配置される。変数依存関係240における各ノードの表記は、変数依存関係111と異なり、記述位置情報から関数名が省略されている。   Each variable node of the variable dependency relationship 240 is arranged in a function node corresponding to the function in which the variable node is described among the function nodes 241 to 243. The notation of each node in the variable dependency relationship 240 is different from the variable dependency relationship 111, and the function name is omitted from the description position information.

図24のようなグラフを表示することにより、ユーザは関数呼出順序と変数依存関係、および両者の関係を同時に見ることができるので、ソフトウェアの構造を、変数依存関係のみとはまた異なる視点から理解することができる。   By displaying the graph as shown in FIG. 24, the user can see the function call order, the variable dependency relationship, and the relationship between both at the same time, so that the software structure can be understood from a different point of view than the variable dependency relationship alone. can do.

図15は、変数依存関係とソースコードとを連携して表示した例である。変数依存関係表示領域151は、変数依存関係出力部16の一部であり、図14のツリー形式の変数依存関係141を表示している。c(L6@f2)から先は集約され、表示されていない。ユーザがカーソル152を用いて変数依存関係表示領域151のあるノード(記述位置で区別した変数)を選択すると、ソースコード出力部17の一部であるソースコード表示領域153に、選択された変数の記載を含むソースコードが表示される。図15では、選択されたd(L13@f1)が記載されたsrc01.cが表示され、さらに13行目に下線が引かれ、変数dは強調表示されており、選択された変数の記載された箇所がユーザに判別しやすくなっている。   FIG. 15 shows an example in which variable dependency and source code are displayed in cooperation with each other. The variable dependency relationship display area 151 is a part of the variable dependency relationship output unit 16 and displays the variable dependency relationship 141 in the tree format of FIG. The points from c (L6 @ f2) are aggregated and not displayed. When the user uses the cursor 152 to select a node having a variable dependency relationship display area 151 (variable identified by description position), the selected variable is displayed in the source code display area 153 that is a part of the source code output unit 17. The source code including the description is displayed. In FIG. 15, the selected d (L13 @ f1) is described as src01. c is displayed, the line 13 is further underlined, and the variable d is highlighted, which makes it easy for the user to identify the location where the selected variable is written.

図15の表示を実現する処理を以下に説明する。変数依存関係出力部16は、変数依存関係表示領域151でカーソル152によりある変数が選択されたことを検出すると、選択された変数の属性情報をソースコード出力部17に通知する。ソースコード出力部17は、通知された変数の属性情報に含まれるファイルパスから、ソースコード表示領域153に当該ファイルを表示する。また、通知された変数の属性情報に含まれる変数の記述位置から、下線表示や強調表示を行う。   Processing for realizing the display of FIG. 15 will be described below. When the variable dependency relationship output unit 16 detects that a variable is selected by the cursor 152 in the variable dependency relationship display area 151, the variable dependency relationship output unit 16 notifies the source code output unit 17 of attribute information of the selected variable. The source code output unit 17 displays the file in the source code display area 153 from the file path included in the notified variable attribute information. Also, underline display and highlight display are performed from the description position of the variable included in the notified variable attribute information.

また、ソースコード表示領域153にてカーソル152により選択された変数を、変数依存関係表示領域151の依存関係から検索し、表示することも可能である。ソースコード出力部17は、ソースコード表示領域153にてカーソル152によりある記述位置が選択された場合、構文解析部12の出力する構文木データから、選択された記述位置と同じ位置にある変数を探索する。該当する変数が存在する場合、当該変数の属性情報を変数依存関係出力部16に通知する。変数依存関係出力部16は、変数依存関係から通知された属性情報(実体ID、記載位置)をキーとして一致する変数のノードを探索する。当該ノードが存在する場合、当該ノードを変数依存関係表示領域151に強調表示する。   In addition, the variable selected by the cursor 152 in the source code display area 153 can be searched from the dependency relation in the variable dependency display area 151 and displayed. When a certain description position is selected by the cursor 152 in the source code display area 153, the source code output unit 17 selects a variable at the same position as the selected description position from the syntax tree data output by the syntax analysis unit 12. Explore. If the corresponding variable exists, the variable dependency output unit 16 is notified of the attribute information of the variable. The variable dependency relationship output unit 16 searches for matching variable nodes using attribute information (entity ID, description position) notified from the variable dependency as a key. If the node exists, the node is highlighted in the variable dependency display area 151.

図15では、変数依存関係と関数コールグラフの連携表示も行っている。関数コールグラフ表示領域154では、変数依存関係表示領域151にて選択されたd(L13@f1)が記載されている関数f1のノードが下線表示されている。関数コールグラフ表示領域154は、変数依存関係出力部16から選択された変数の属性情報の通知を受け、属性情報に含まれる関数名(または関数ID)と一致する関数ノードを関数コールグラフから検索し、下線表示を行う。   In FIG. 15, the variable dependency relationship and the function call graph are also displayed in a linked manner. In the function call graph display area 154, the node of the function f1 in which d (L13 @ f1) selected in the variable dependency relation display area 151 is described is underlined. The function call graph display area 154 receives notification of the attribute information of the variable selected from the variable dependency relationship output unit 16, and searches the function call graph for a function node that matches the function name (or function ID) included in the attribute information. And underlined.

以上のように、複数ステートメント間や関数間など、ソースコードの広域に渡る変数間の依存関係を導出し、変数を単位(ノード)としてソースコード中の記述位置で区別してグラフに表示することにより、ソフトウェアの構成や処理概要に関する情報を変数依存関係の観点からユーザに提供することができる。これにより、設計者や検証者がソフトウェアの構造や処理概要を理解することを容易にすることができる。   As described above, by deriving dependencies between variables over a wide area of the source code, such as between multiple statements and functions, and displaying the variable as a unit (node) at the description position in the source code and displaying it in a graph It is possible to provide the user with information on the software configuration and processing overview from the viewpoint of variable dependency. This makes it easy for the designer and verifier to understand the software structure and processing outline.

図16は、変数選択部122による変数属性情報の表示例である。変数表示領域161において、変数選択領域162に対しユーザがカーソル152により(記述位置で区別しない)変数を選択すれば、選択された変数をルートノードとするツリー形式の変数依存関係が変数依存関係抽出部123により抽出される。   FIG. 16 is a display example of variable attribute information by the variable selection unit 122. In the variable display area 161, if the user selects a variable (not distinguished by the description position) with the cursor 152 in the variable selection area 162, the tree-type variable dependency with the selected variable as the root node is extracted as the variable dependency relation. Extracted by the unit 123.

変数表示領域161には、実行パス数表示欄163を設けることができる。実行パス数表示欄163には、変数a〜e、x〜zそれぞれの実行パス数が表示されている。実行パス数は、変数依存関係解析部15が出力するネットワーク形式の変数依存関係から求めることができる。各依存関係のルートノードから辿り、変数の実体ごとに出現有無を調べ、出現する場合は1、出現しない場合は0として、全依存関係にて合計した値がその変数の実行パス数である。ただし依存関係のループにより探索が終了しないことを防ぐため、1回辿ったノードを一時記憶し、当該ノードから先は辿らない。実体が同じ変数は、1つの変数依存関係ツリーに複数回出現しても、実行パス数は1となる。   In the variable display area 161, an execution path number display field 163 can be provided. The execution path number display field 163 displays the number of execution paths for each of the variables a to e and x to z. The number of execution paths can be obtained from the network-type variable dependency output from the variable dependency relationship analysis unit 15. Tracing from the root node of each dependency relationship, the presence / absence of each variable entity is checked, and when it appears, 1 is set when it appears, and 0 is set when it does not appear. However, in order to prevent the search from being terminated due to a dependency loop, the node traced once is temporarily stored, and the node is not traced beyond that node. Even if variables with the same entity appear multiple times in one variable dependency tree, the number of execution paths is one.

変数依存関係111,112をルートノードから辿っていくと、変数eは両方の変数依存関係で出現するので実行パス数は2、変数a〜d,fは変数依存関係111のみで、変数x〜zは変数依存関係112のみで出現するので実行パス数はそれぞれ1となる。   When the variable dependencies 111 and 112 are traced from the root node, the variable e appears in both variable dependencies, so the number of execution paths is 2, the variables a to d and f are only the variable dependency 111, and the variables x to Since z appears only in the variable dependency relationship 112, the number of execution paths is 1, respectively.

図16のような表示により、ユーザは各変数の実行パス数を見て、ツリー形式の変数依存関係のルートノードとする変数を選択することができる。複数の実行パスからアクセスされる変数は、各実行パスの処理タイミングにより、データアクセスの競合、排他制御の失敗など、設計時に想定していない処理間の干渉による不具合をもたらす恐れがある。本実施例では、周期タスクにおいて関数f1( )を実行し、構文ID111にて変数eの値を参照する直前に、割込み処理により関数f4( )が実行され、変数eの値が書き換えられる現象が想定しうる。ユーザは、ソフトウェアの不具合原因となりうる変数を抽出し、不具合事象を発生させ得る処理の実行パスに対応する変数依存関係を表示させ、また変数依存関係から当該実行パスに関係するソースコードを表示させることにより、不具合発生箇所の候補を目視し、実際に不具合がしうるかを確認することができる。   With the display as shown in FIG. 16, the user can select the variable to be the root node of the tree-type variable dependency by looking at the number of execution paths of each variable. A variable accessed from a plurality of execution paths may cause problems due to interference between processes that are not assumed at the time of design, such as data access contention and exclusive control failure, depending on the processing timing of each execution path. In this embodiment, the function f1 () is executed in the periodic task, and the function f4 () is executed by interrupt processing immediately before referring to the value of the variable e by the syntax ID 111, and the value of the variable e is rewritten. Can be assumed. The user extracts variables that can cause software defects, displays variable dependency relationships corresponding to the execution paths of processes that can cause failure events, and displays source code related to the execution paths from variable dependency relationships. Thus, it is possible to visually check a candidate for a defect occurrence location and confirm whether a defect can actually occur.

[実施例2]
図17は、変数依存関係抽出部123が図13の処理に加えてその後に実施しうる処理のフローを示している。この処理フローにより、変数選択部122で選択された変数に対し「間接的に」影響を与え得る変数依存関係のツリーが抽出される。ここで「間接的に」とは、選択された変数とは実体が異なり、かつ異なる実行パスに存在する変数が、処理タイミングによっては選択された変数と依存関係が生じる、という意味である。
[Example 2]
FIG. 17 shows a flow of processing that the variable dependency relationship extracting unit 123 can implement after the processing of FIG. Through this processing flow, a tree of variable dependency relationships that can affect the variables selected by the variable selection unit 122 “indirectly” is extracted. Here, “indirectly” means that a variable is different from the selected variable, and a variable existing in a different execution path has a dependency relationship with the selected variable depending on processing timing.

フローは処理1から開始する。ステップ171は、図13の処理で抽出されたツリー形式の変数依存関係の各ルートノードについて実施する。ステップ171にて、変数依存関係抽出部123はツリー形式の変数依存関係の1つのルートノードを引数として、処理2を呼び出す。ここで処理2の仮引数となるノードを「探索点ノード」とする。ステップ172〜175は、対象ノードの全ての子ノードについてそれぞれ実施し、子ノードが存在しなければ実施しない。ステップ172にて、変数依存関係抽出部123は当該子ノードがuseか否かを判定し、useであればステップ173に、useでなければステップ175に進む。ステップ173にて、変数依存関係抽出部123は当該子ノードと実体が同じでdefの(記述位置で区別する)変数ノードを、変数依存関係解析部15が出力したネットワーク形式の変数依存関係から探索する。ただし、ステップ171で対象としたルートノードと同一のノードが含まれる変数依存関係は探索対象から外す。当該defが存在すればステップ174に、存在しなければステップ175に進む。ステップ174にて、変数依存関係抽出部123はステップ173で探索したdefをルートとするツリー形式の変数依存関係を抽出する。抽出方法は図13の処理フローと同様である。また、抽出したツリー形式の変数依存関係と、既に抽出しているツリー形式の変数依存関係との重複の有無を判定し、重複しているツリーは破棄する。2つのツリー間での重複の判定方法は、1つのツリーのルートノードが、他のツリーのルートノードと同じか下位に含まれていれば前者のツリーが冗長で破棄してよいとする。この判定を、新たに抽出したツリーと、既に抽出した全てのツリー間で行う。ステップ175にて、変数依存関係抽出部123は当該子ノードを引数として処理2を呼び出す。処理2は再帰構造となっており、全ての処理2が終了すると、処理2から処理1に戻り、処理1を終了する。   The flow starts from process 1. Step 171 is performed for each root node of the tree-type variable dependency extracted by the processing of FIG. In step 171, the variable dependency relationship extracting unit 123 calls process 2 using one root node of the variable dependency relationship in the tree format as an argument. Here, a node that is a dummy argument of the process 2 is a “search point node”. Steps 172 to 175 are performed for all child nodes of the target node, and are not performed if there are no child nodes. In step 172, the variable dependency relationship extraction unit 123 determines whether the child node is a use, and if it is a use, the process proceeds to step 173, and if not, the process proceeds to step 175. In step 173, the variable dependency relationship extracting unit 123 searches the variable dependency relationship in the network format output by the variable dependency relationship analyzing unit 15 for a variable node having the same entity as the child node and having a def (identified by a description position). To do. However, the variable dependency including the same node as the target root node in step 171 is excluded from the search target. If the def exists, the process proceeds to step 174. If not, the process proceeds to step 175. In step 174, the variable dependency extraction unit 123 extracts a tree-type variable dependency having the def searched in step 173 as a root. The extraction method is the same as the processing flow of FIG. In addition, it is determined whether or not the extracted tree-type variable dependency and the already-extracted tree-type variable dependency are duplicated, and the overlapping tree is discarded. The method for determining the overlap between two trees is that the former tree is redundant and can be discarded if the root node of one tree is included in the same or lower level as the root node of the other tree. This determination is performed between the newly extracted tree and all the already extracted trees. In step 175, the variable dependency relationship extraction unit 123 calls process 2 with the child node as an argument. The process 2 has a recursive structure, and when all the processes 2 are completed, the process 2 returns to the process 1 and the process 1 is terminated.

以下では、サンプルソースコードに対し図17の処理により変数依存関係を抽出し表示する例を説明する。図18は、解析対象とするソースコードファイルである。図19のうち、変数依存関係191と192は、実行開始点を関数f5とf6とした場合に変数依存関係抽出部123が抽出するネットワーク形式の変数依存関係である。これらの変数依存関係に対し、ユーザにより変数選択部122にて変数dがルートノードとして選択されると、変数依存関係抽出部123は図13の処理フローにより、変数依存関係191からツリー形式の変数依存関係193を抽出する。さらに変数依存関係抽出部123は図17の処理フローにより、変数依存関係193に含まれるuseであるc(L6@f5)と実体が同じdefであるc(L4@f6)を変数依存関係192から探索し、c(L4@f6)をルートノードとしてツリー形式の変数依存関係194を抽出する。   In the following, an example will be described in which variable dependency is extracted and displayed for the sample source code by the process of FIG. FIG. 18 shows a source code file to be analyzed. 19, variable dependency relationships 191 and 192 are network type variable dependency relationships extracted by the variable dependency relationship extracting unit 123 when the execution start points are the functions f5 and f6. If the variable d is selected as a root node by the variable selection unit 122 by the user with respect to these variable dependency relationships, the variable dependency relationship extraction unit 123 uses the processing flow in FIG. The dependency relationship 193 is extracted. Further, the variable dependency relationship extracting unit 123 extracts c (L6 @ f5), which is a use included in the variable dependency relationship 193, c (L4 @ f6) from the variable dependency relationship 192 according to the processing flow of FIG. The search is performed, and a variable dependency 194 in a tree format is extracted with c (L4 @ f6) as a root node.

関数f5とf6が、割込みやOS(Operating System)のタスクとして並行に実行される場合、各処理の実行タイミングによっては、c(L6@f5)useの値はc(L5@f5)defではなくc(L4@f6)defの値となる。つまりc(L4@f6)はc(L5@f5)に間接的に影響し、さらにd(L6@f5)に影響しうる。   When the functions f5 and f6 are executed in parallel as interrupts or OS (Operating System) tasks, the value of c (L6 @ f5) use is not c (L5 @ f5) def depending on the execution timing of each process. It becomes the value of c (L4 @ f6) def. That is, c (L4 @ f6) indirectly affects c (L5 @ f5) and can further affect d (L6 @ f5).

以上のように間接的に影響のある変数依存関係を抽出し表示することにより、ユーザは処理の実行タイミングにより排他制御の失敗やデータ競合により不具合を起こし得る箇所をソースコードから容易に発見できる。また、図15のように変数依存関係とソースコードとを連携表示させることで、実際の不具合の可能性を確認することができる。   As described above, by indirectly extracting and displaying the variable dependency that has an influence, the user can easily find from the source code a location that may cause a failure due to the failure of exclusive control or data competition depending on the execution timing of the processing. Moreover, the possibility of an actual malfunction can be confirmed by displaying the variable dependency relationship and the source code in cooperation with each other as shown in FIG.

[実施例3]
図20は、2つのソースコードの変数依存関係を比較して差分を判定し表示するための機能構成図のうち、図1からの差分を示している。変数依存関係解析部15は、2つのソースコードについて変数依存関係を解析する。変数依存関係比較部201は、変数依存関係解析部15による2つのソースコードの変数依存関係を比較する。変数依存関係データの各ノードには差異有無の項目があり、値として差異あり/差異なし/未確定(初期値)のいずれかを取るとする。変数依存関係比較部201は比較結果から差異有無の項目に値を設定する。変数依存関係出力部16は、変数依存関係比較部201により比較された2つのソースコードの変数依存関係を差分部分に違いを付けて、つまり差異有無の項目が「差異あり」のノードに着色するなどして表示する。
[Example 3]
FIG. 20 shows the difference from FIG. 1 in the functional configuration diagram for comparing and comparing the variable dependency of two source codes to display the difference. The variable dependency relationship analysis unit 15 analyzes the variable dependency relationship between the two source codes. The variable dependency comparison unit 201 compares the variable dependency of two source codes by the variable dependency analysis unit 15. Each node of the variable dependency relationship data has a difference presence / absence item, and it is assumed that the value is “difference / no difference / undefined (initial value)”. The variable dependency comparison unit 201 sets a value in the presence / absence of the difference from the comparison result. The variable dependency relationship output unit 16 adds a difference in the variable dependency of the two source codes compared by the variable dependency relationship comparison unit 201, that is, colors the difference presence / absence item to a node having “difference”. Etc. to display.

変数依存関係比較部201が比較する変数依存関係のデータには、変数の記述位置が含まれる。しかし2つのソースコードの変数依存関係を比較する際には、変数の記述位置を無視する。一方で、変数依存関係を表示する際には、変数の記述位置を含めて表示する。   The variable dependency relationship data compared by the variable dependency comparison unit 201 includes the description position of the variable. However, when comparing the variable dependency relationship between two source codes, the description position of the variable is ignored. On the other hand, when displaying the variable dependency, the variable description position is displayed.

図21は、変数依存関係比較部201が実行する、2つのソースコードの変数依存関係について比較する処理フローを示している。ここでは簡単のため、各ソースコードにおける変数依存関係のルートノードは1つとする。フローは処理1から開始する。ステップ211にて、変数依存関係比較部201は2つのソースコードの変数依存関係それぞれのルートノードを抽出する。1つのルートノードを「ノード1」、もう1つのルートノードを「ノード2」とする。ステップ212にて、変数依存関係比較部201はノード1とノード2の実体を比較する。実体が同じであればステップ213に、異なればステップ215に進む。ステップ213では、ノード1とノード2を引数として処理2を呼び出す。ステップ214では、ノード2の下位ノードについて、差分有無の項目が「未確定」のノードを、「差分あり」とし、処理1を終了する。ステップ215では、2つの変数依存関係の全ノードに差異があると判定し、処理1を終了する。   FIG. 21 shows a processing flow executed by the variable dependency comparison unit 201 for comparing the variable dependency of two source codes. Here, for simplicity, it is assumed that there is one root node for variable dependency in each source code. The flow starts from process 1. In step 211, the variable dependency comparison unit 201 extracts root nodes of the variable dependency relationships of the two source codes. One root node is “node 1”, and the other root node is “node 2”. In step 212, the variable dependency comparison unit 201 compares the entities of the node 1 and the node 2. If the entities are the same, the process proceeds to step 213, and if they are different, the process proceeds to step 215. In step 213, process 2 is called with node 1 and node 2 as arguments. In step 214, regarding the subordinate node of node 2, the node for which the difference presence / absence item is “indeterminate” is set to “difference”, and the process 1 ends. In step 215, it is determined that there is a difference between all the nodes of the two variable dependencies, and the process 1 is terminated.

次に処理2を説明する。処理2の仮引数もノード1、ノード2とする。ステップ216〜220は、ノード1の全ての子ノードについてそれぞれ実施し、子ノードが存在しなければ実施しない。ステップ216にて、変数依存関係比較部201はノード2の下位ノードから、ノード1の当該子ノードと、実体およびdef/useの種類が同じで、かつ差分有無の項目が「未確定」の変数ノードを探索する。ステップ217では、ステップ216で該当するノードが存在すればステップ218に、存在しなければステップ219に進む。ステップ218にて、変数依存関係比較部201は変数依存関係の差分を判定する。ノード1′に現在処理対象としているノード1の子ノードを、ノード2′にステップ215で探索したノードを指定し、ノード1′とノード2′については差異なしと判定する。ノード2とノード2′の間にノードがある場合には、それらのノードには差異があると判定する。判定後はステップ220に進む。ステップ219にて、変数依存関係比較部201は現在処理対象としているノード1の子ノードに差異があると判定する。また、ノード1′に当該子ノードを、ノード2′にノード2を指定し、ステップ220に進む。ステップ220では、ノード1′とノード2′を引数として処理2を呼び出す。処理2は再帰構造となっており、全ての処理2が終了すると、処理2から処理1に戻り、処理1を終了する。   Next, process 2 will be described. The formal argument of process 2 is also assumed to be node 1 and node 2. Steps 216 to 220 are performed for all the child nodes of node 1, and are not performed if there are no child nodes. In step 216, the variable dependency comparison unit 201 starts from the lower node of node 2, the child node of node 1 has the same entity and def / use type, and the variable presence / absence item is “unconfirmed”. Search for a node. In step 217, if the corresponding node exists in step 216, the process proceeds to step 218, and if not, the process proceeds to step 219. In step 218, the variable dependency comparison unit 201 determines a difference in variable dependency. The child node of the node 1 currently being processed is designated as the node 1 ′, the node searched at the step 215 is designated as the node 2 ′, and it is determined that there is no difference between the node 1 ′ and the node 2 ′. When there is a node between the node 2 and the node 2 ′, it is determined that there is a difference between the nodes. After the determination, the process proceeds to step 220. In step 219, the variable dependency comparison unit 201 determines that there is a difference between the child nodes of the node 1 that is currently being processed. Further, the child node is designated as the node 1 ′ and the node 2 is designated as the node 2 ′. In step 220, process 2 is called with node 1 'and node 2' as arguments. The process 2 has a recursive structure, and when all the processes 2 are completed, the process 2 returns to the process 1 and the process 1 is terminated.

図22は、2つのサンプルソースコードに対し、変数依存関係比較部201が図21の処理フローに沿って2つの変数依存関係の差分を解析し、変数依存関係出力部16が表示した例である。ソースコード221とソースコード222は関数f7を記述しており、それぞれ第1版、第2版である。変数依存関係223はソースコード221について、変数依存関係224はソースコード222について、実行開始点をf7として導出したデータの有向グラフである。ソースコード221からソースコード222へは、5行目がc=bからc+=bに変更されている。変数依存関係比較部201は、変数依存関係224のc(L5@f7)useについて差異ありと判定し、それ以外の変数依存関係224のノードと、変数依存関係223の全ノードについては、差異なしと判定する。変数依存関係出力部16は、変数依存関係224のc(L5@f7)useには他ノードとは異なる色を付けて表示し、ユーザに対し変数依存関係の差分を視覚的に区別しやすく表示する。   FIG. 22 shows an example in which the variable dependency comparison unit 201 analyzes the difference between two variable dependencies along the processing flow of FIG. 21 and displays the variable dependency output unit 16 for two sample source codes. . The source code 221 and the source code 222 describe a function f7, which is a first version and a second version, respectively. The variable dependency relationship 223 is a directed graph of data derived from the source code 221 and the variable dependency relationship 224 is derived from the source code 222 as the execution start point f7. From the source code 221 to the source code 222, the fifth line is changed from c = b to c + = b. The variable dependency comparison unit 201 determines that there is a difference in c (L5 @ f7) use of the variable dependency relationship 224, and there is no difference between the other nodes of the variable dependency relationship 224 and all the nodes of the variable dependency relationship 223. Is determined. The variable dependency relationship output unit 16 displays c (L5 @ f7) use of the variable dependency relationship 224 with a color different from that of other nodes, and displays the difference of the variable dependency to the user so that it can be easily distinguished visually. To do.

図23は、図22とは異なる2つのサンプルソースコードに対し、図22と同様に解析と表示を行った例である。ソースコード231とソースコード232は関数f8を記述しており、それぞれ第1版、第2版である。変数依存関係233はソースコード231について、変数依存関係234はソースコード232について、実行開始点をf8として導出したデータの有向グラフである。ソースコード232はソースコード231に対し、6行目に空行が挿入されている。この変更により、変数依存関係233のc(L6@f8)、d(L6@f8)が、変数依存関係234ではc(L7@f8)、d(L7@f8)と記載位置情報が変化している。しかし、変数依存関係比較部201は2つの変数依存関係233、234の全ノードについて差異なしと判定する。実際、ソースコード231とソースコード232では処理内容に差異が無く、このことは変数依存関係233、234にて変数の位置情報以外に差異がないことから、ユーザにとって視覚的に理解しやすくなっている。   FIG. 23 shows an example in which two sample source codes different from FIG. 22 are analyzed and displayed in the same manner as FIG. The source code 231 and the source code 232 describe the function f8, which is the first version and the second version, respectively. The variable dependency relationship 233 is a directed graph of data derived from the source code 231 and the variable dependency relationship 234 is derived from the source code 232 with the execution start point as f8. In the source code 232, a blank line is inserted in the sixth line with respect to the source code 231. With this change, c (L6 @ f8) and d (L6 @ f8) of the variable dependency relationship 233 are changed to c (L7 @ f8) and d (L7 @ f8) in the variable dependency relationship 234. Yes. However, the variable dependency comparison unit 201 determines that there is no difference for all the nodes of the two variable dependency relationships 233 and 234. Actually, there is no difference in processing contents between the source code 231 and the source code 232. This is because there is no difference other than the variable position information in the variable dependency relations 233 and 234, so that the user can easily understand visually. Yes.

以上のように、2つのソースコードから変数依存関係を抽出し、変数の位置情報を無視した上で差分を比較し表示することにより、ソフトウェアの構成や処理概要の差異を変数依存関係の観点からユーザに提供することができる。これにより、設計者や検証者がソフトウェアの構造や処理概要を理解することを容易にすることができる。   As described above, by extracting the variable dependency from the two source code, ignoring the position information of the variable and comparing and displaying the difference, the difference in the software configuration and processing outline can be seen from the viewpoint of the variable dependency. Can be provided to the user. This makes it easy for the designer and verifier to understand the software structure and processing outline.

[実施例4]
本実施例では、本発明の変数依存関係解析結果を用いて、ソースコードのスライシングおよびモデル検査を行う。変数依存関係の解析方法については、実施例1から3と共通するため説明を省略する。スライシングとは、ある変数に影響を与えるソースコードの記載のみを抽出し、当該変数に影響を与えないソースコードの記載を削除する処理を意味する。モデル検査とは、検証の対象となるソフトウェアが実際に動作する際(ソフトウェアが機器を制御する制御ソフトウェアの場合は、ソフトウェアが動作するハードウェアや制御対象機器との複合動作を想定)の取り得る状態を網羅的に探索し、不具合を発見することを意味する。
[Example 4]
In this embodiment, source code slicing and model checking are performed using the variable dependency analysis result of the present invention. Since the variable dependency analysis method is the same as in the first to third embodiments, the description thereof is omitted. Slicing means a process of extracting only the description of the source code that affects a certain variable and deleting the description of the source code that does not affect the variable. Model checking can be taken when the software to be verified actually operates (in the case of control software that controls the device, the hardware that operates the software or the combined operation with the device to be controlled is assumed) It means that the state is exhaustively searched and a defect is found.

スライシングでは、抽出の始点となるステートメントと、終点となるステートメントおよびそのステートメント内の変数を、「スライシング基準」として指定する必要がある。   In slicing, it is necessary to specify a statement that is a starting point of extraction, a statement that is an end point, and variables in the statement as “slicing criteria”.

本実施例ではスライシング基準として、変数選択部122にてユーザにより選択された変数とその変数が含まれるステートメントを終点、変数依存関係出力部16によって表示された変数依存関係のうち、末端またはユーザによって選択された変数の含まれるステートメントを始点に設定し、スライシングを行う。これにより、ユーザが検証したい変数(以下では「検証点」と呼ぶ)を変数選択部122にて指定することで、モデル検査の対象となるソースコードを検証点に関連する部分にのみ絞ることができ、モデル検査の際の状態爆発を回避できる。またユーザは、終点のステートメントに依存関係のあるステートメントを始点に選択することができるため、確実に検証点に関連するコードを抽出することができる。そのほか、変数依存関係出力部16の表示にて始点に選択した変数が、モデル検査の際、ソフトウェアと外部環境(ハードウェアや制御対象機器など)との境界になるため、ユーザは外部環境モデルとのインタフェースが用意に判別でき、外部環境についてモデルの作成や既存モデルからの選択が容易になる。   In this embodiment, as a slicing criterion, the variable selected by the variable selection unit 122 by the user and the statement including the variable are the end points, among the variable dependency relationships displayed by the variable dependency output unit 16, by the end or the user. Set the statement containing the selected variable as the starting point and perform slicing. As a result, the variable that the user wants to verify (hereinafter referred to as “verification point”) is specified by the variable selection unit 122, so that the source code to be model-checked can be narrowed down only to the portion related to the verification point. It can avoid the explosion of the state during model checking. In addition, since the user can select a statement having a dependency relationship with the statement at the end point as the start point, it is possible to reliably extract the code related to the verification point. In addition, since the variable selected as the starting point on the display of the variable dependency output unit 16 becomes a boundary between software and the external environment (hardware, control target device, etc.) at the time of model checking, This makes it easy to create a model for the external environment and select from existing models.

図26は、サンプルコードに対して本発明のスライシングを行った例である。ソースコード出力部17はソースコード261を表示しているが、この段階では変数選択部122にて変数は選択されておらず、スライシングも行われていない。   FIG. 26 shows an example in which slicing according to the present invention is performed on a sample code. The source code output unit 17 displays the source code 261. At this stage, no variable is selected by the variable selection unit 122, and slicing is not performed.

次に変数選択部122にてユーザにより変数cが選択されると、変数依存関係出力部16に変数依存関係264が表示され、ソースコード出力部17にはソースコード262が表示される。ソースコード262では、5行目のy=x、7行目のz=yにハッチングが掛けられている。これは変数x,y,zが変数依存関係264に含まれないため、スライシングにて除外されるコードであることを示している。この段階でユーザがソースコード出力部17にファイル出力を指示すると、5行目と7行目が削除されたソースコードがファイル出力される。   Next, when the variable c is selected by the user in the variable selection unit 122, the variable dependency relationship output unit 16 displays the variable dependency relationship 264, and the source code output unit 17 displays the source code 262. In the source code 262, y = x in the fifth line and z = y in the seventh line are hatched. This indicates that the variables x, y, and z are not included in the variable dependency 264, and thus are codes excluded by slicing. At this stage, when the user instructs the source code output unit 17 to output a file, the source code from which the fifth and seventh lines are deleted is output as a file.

ソースコード262の表示や、スライシングされたソースコードのファイル出力においては、構文解析部12による構文木データが利用される。ソースコード出力部17は、構文木データの各構文ノードについて、その構文に含まれる変数が、変数依存関係264に含まれれば当該構文はスライシングで残り、含まれなければ除外されると判定する。   In the display of the source code 262 and the file output of the sliced source code, the syntax tree data by the syntax analysis unit 12 is used. For each syntax node of the syntax tree data, the source code output unit 17 determines that the syntax remains by slicing if the variable included in the syntax is included in the variable dependency 264, and is excluded if the variable is not included.

次に変数依存関係出力部16にて、ユーザがb(L4@f9)に対し、スライシングにて除外する指定を行う。すると変数依存関係出力部16の表示にて、変数依存関係265のように、b(L4@f9)とその下位のa(L4@f9)は除外された表示となる。また、ソースコード出力部17において、ソースコード263が表示される。ソースコード263では、さらに4行目のb=aが削除された表示となっている。これは、ユーザによるb(L4@f9)の除外指定の影響を示すものである。この場合、b(L9@f9)がスライシングの始点の変数として選択されたことになる。この段階でユーザがソースコード出力部17にファイル出力を指示すると、4,5,7行目が削除されたソースコードがファイル出力される。   Next, in the variable dependency relationship output unit 16, the user designates b (L4 @ f9) to be excluded by slicing. Then, in the display of the variable dependency relationship output unit 16, b (L4 @ f9) and its lower a (L4 @ f9) are excluded as in the variable dependency relationship 265. In the source code output unit 17, the source code 263 is displayed. In the source code 263, b = a in the fourth line is further deleted. This shows the influence of the exclusion designation of b (L4 @ f9) by the user. In this case, b (L9 @ f9) is selected as a starting point variable for slicing. When the user instructs the source code output unit 17 to output a file at this stage, the source code from which the fourth, fifth, and seventh lines are deleted is output as a file.

以上のようにして抽出されたソースコードに対し、ソースコード出力部17は、必要であれば構文木データと規定の変換ルールを用いてモデル検査用の言語に変換して、モデル検査器に入力することで、検証点に関係するソースコードが動作するときに取り得る状態が網羅的に探索される。モデル検査器に対し、ユーザは検査対象のソースコードが取ってはいけない状態をプロパティやアサーションとして指定し、必要であれば外部環境モデルを付与することで、不具合を発見することができる。   For the source code extracted as described above, the source code output unit 17 converts it into a language for model checking using syntax tree data and a specified conversion rule if necessary, and inputs it to the model checker. By doing so, the possible states when the source code related to the verification point operates are exhaustively searched. For the model checker, the user can specify a state that should not be taken by the source code to be checked as a property or assertion, and if necessary, can find a problem by assigning an external environment model.

11 ファイル入力部
12 構文解析部
13 関数抽出部
14 実行開始点選択部
15 変数依存関係解析部
16 変数依存関係出力部
17 ソースコード出力部
123 変数依存関係抽出部
201 変数依存関係比較部
11 File input unit 12 Syntax analysis unit 13 Function extraction unit 14 Execution start point selection unit 15 Variable dependency analysis unit 16 Variable dependency output unit 17 Source code output unit 123 Variable dependency extraction unit 201 Variable dependency comparison unit

Claims (12)

コンピュータに、ソフトウェアのソースコードを入力させ、前記ソースコードを解析させ、解析結果を出力させるためのソフトウェアの構造可視化プログラムにおいて、
前記プログラムは、前記コンピュータに前記ソースコードの構文解析を実行させるための構文解析部と、
前記コンピュータに前記構文解析部による構文解析結果から、前記ソースコード中の記述位置毎に区別された複数の変数について、変数間の依存関係を導出させるための変数依存関係解析部と、
前記変数依存関係解析部により導出した変数依存関係を、前記複数の変数の前記ソースコード中の記述位置情報と共に、前記コンピュータに表示装置への表示、または前記コンピュータ外部への出力を実行させるための変数依存関係出力部と、を有することを特徴とするソフトウェアの構造可視化プログラム。
In a software structure visualization program for causing a computer to input software source code, analyzing the source code, and outputting an analysis result,
The program includes a syntax analysis unit for causing the computer to execute syntax analysis of the source code;
A variable dependency analysis unit for deriving a dependency relationship between variables for a plurality of variables distinguished for each description position in the source code from a result of the syntax analysis by the syntax analysis unit;
A variable dependency relationship derived by the variable dependency relationship analyzing unit, together with description position information in the source code of the plurality of variables, for causing the computer to display on a display device or to output to the outside of the computer A software structure visualization program comprising: a variable dependency output unit.
前記コンピュータに入力された前記ソースコードを表示装置に表示させるためのソースコード出力部を有し、
前記ソースコード出力部は、前記コンピュータに、前記変数依存関係出力部によって表示または出力された変数依存関係中のユーザが指定した変数に対応する、前記ソースコード中の記述を強調表示させることを特徴とする、請求項1記載のソフトウェアの構造可視化プログラム。
A source code output unit for displaying the source code input to the computer on a display device;
The source code output unit causes the computer to highlight a description in the source code corresponding to a variable specified by a user in the variable dependency displayed or output by the variable dependency output unit. The software structure visualization program according to claim 1.
前記構文解析部による構文解析結果に基づいて、前記コンピュータに前記ソースコードに含まれる変数を抽出させる変数抽出部と、
前記コンピュータに前記変数抽出部によって抽出された変数についての属性を表示させ、ユーザの変数選択を受け付けさせる変数表示部と、
前記コンピュータに前記変数表示部にてユーザにより選択された変数をルートとする変数依存関係を、前記変数依存関係解析部によって導出された変数依存関係から抽出させる変数依存関係抽出部と、を有し、
前記変数依存関係出力部は、前記変数依存関係抽出部によって抽出された変数依存関係を前記コンピュータに表示または出力させることを特徴とする、請求項1記載のソフトウェアの構造可視化プログラム。
A variable extraction unit that causes the computer to extract a variable included in the source code based on a result of the syntax analysis by the syntax analysis unit;
Displaying a variable attribute extracted by the variable extraction unit on the computer and accepting a user variable selection;
A variable dependency extraction unit that causes the computer to extract a variable dependency having a variable selected by the user in the variable display unit as a root from the variable dependency derived by the variable dependency analysis unit; ,
The software structure visualization program according to claim 1, wherein the variable dependency relationship output unit causes the computer to display or output the variable dependency relationship extracted by the variable dependency relationship extraction unit.
前記変数依存関係抽出部は、前記変数表示部にてユーザにより選択された変数をルートとして抽出した変数依存関係に含まれ参照される変数と実体が同じで定義される変数をルートとする変数依存関係を、前記変数依存関係解析部によって導出された変数依存関係から前記コンピュータに抽出させることを特徴とする、
請求項3記載のソフトウェアの構造可視化プログラム。
The variable dependency extraction unit is a variable dependency whose root is a variable that is defined and has the same entity as the variable that is referenced and included in the variable dependency extracted by the variable selected by the user in the variable display unit. A relationship is extracted by the computer from the variable dependency derived by the variable dependency analysis unit;
The software structure visualization program according to claim 3.
請求項3において、
前記変数表示部は、前記コンピュータに各変数の実行パス数を表示または出力させることを特徴とする、請求項3記載のソフトウェアの構造可視化プログラム。
In claim 3,
4. The software structure visualization program according to claim 3, wherein the variable display unit causes the computer to display or output the number of execution paths of each variable.
前記変数依存関係解析部は、ユーザにより入力された実行開始点から前記構文解析部による構文木を辿るように前記コンピュータに解析させることを特徴とする、請求項1記載のソフトウェアの構造可視化プログラム。   The software structure visualization program according to claim 1, wherein the variable dependency relationship analysis unit causes the computer to analyze a syntax tree by the syntax analysis unit from an execution start point input by a user. 変数依存関係出力部は、変数依存関係をツリー形式で前記コンピュータに表示または出力させることを特徴とする、請求項3記載のソフトウェアの構造可視化プログラム。   4. The software structure visualization program according to claim 3, wherein the variable dependency relationship output unit displays or outputs the variable dependency relationship in a tree format on the computer. 前記変数依存関係抽出部は、ユーザに選択された変数と実体が異なり、かつ異なる実行パスに存在する変数が、特定の処理タイミングにおいてのみ前記ユーザに選択された変数へ影響を与える変数依存関係を前記コンピュータに抽出させることを特徴とする、請求項3記載の構造可視化プログラム。   The variable dependency relationship extraction unit has a variable dependency that is different in substance from the variable selected by the user and exists in a different execution path and affects the variable selected by the user only at a specific processing timing. The structure visualization program according to claim 3, wherein the structure is extracted by the computer. 前記変数依存関係解析部による複数のソースコードそれぞれの変数依存関係を解析させた結果を前記コンピュータに比較させ、差分を判定させる変数依存関係比較部を有することを特徴とする請求項1記載の構造可視化プログラム。   2. The structure according to claim 1, further comprising: a variable dependency comparison unit that causes the computer to compare the result of analyzing the variable dependency of each of the plurality of source codes by the variable dependency relationship analysis unit and determine a difference. Visualization program. 前記変数依存関係解析部による解析結果に基づき、前記ソースコード中の前記実行開始点に影響を与えない箇所を前記コンピュータにスライシングさせることを特徴とする請求項6記載の構造可視化プログラム。   The structure visualization program according to claim 6, wherein the computer is caused to perform slicing on a portion of the source code that does not affect the execution start point based on an analysis result by the variable dependency analysis unit. スライシングされた前記ソースコードのモデル検証を行うことを特徴とする請求項10記載の構造可視化プログラム。   11. The structure visualization program according to claim 10, wherein model verification of the sliced source code is performed. 請求項1から11いずれか一項に記載の構造可視化プログラムを格納する記憶媒体を備え、前記構造可視化プログラムを実行するコンピュータと、ユーザからの入力を受け付ける入力装置と、前記コンピュータからの出力を表示する表示装置と、を備えた構造可視化システム。   A storage medium storing the structure visualization program according to any one of claims 1 to 11, comprising a computer that executes the structure visualization program, an input device that receives input from a user, and an output from the computer And a structure visualizing system.
JP2012016046A 2012-01-30 2012-01-30 Software structure visualization program and system Expired - Fee Related JP5775829B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012016046A JP5775829B2 (en) 2012-01-30 2012-01-30 Software structure visualization program and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012016046A JP5775829B2 (en) 2012-01-30 2012-01-30 Software structure visualization program and system

Publications (2)

Publication Number Publication Date
JP2013156786A JP2013156786A (en) 2013-08-15
JP5775829B2 true JP5775829B2 (en) 2015-09-09

Family

ID=49051914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012016046A Expired - Fee Related JP5775829B2 (en) 2012-01-30 2012-01-30 Software structure visualization program and system

Country Status (1)

Country Link
JP (1) JP5775829B2 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101602658B1 (en) * 2014-04-15 2016-03-21 주식회사 셈웨어 Diagram automatic alignment module for algorithm simulation system
JP2016076080A (en) * 2014-10-06 2016-05-12 三菱電機株式会社 Source code analyzing apparatus, source code analyzing method, and program
JP6416588B2 (en) * 2014-10-31 2018-10-31 日立オートモティブシステムズ株式会社 Source code verification system
JP6409639B2 (en) * 2015-03-20 2018-10-24 富士通株式会社 Compiler program, system, method, and apparatus
JP6506108B2 (en) * 2015-06-11 2019-04-24 日本電気通信システム株式会社 PROGRAM DISPLAY DEVICE, PROGRAM DISPLAY SYSTEM, PROGRAM DISPLAY METHOD, AND PROGRAM DISPLAY PROGRAM
WO2017052318A1 (en) * 2015-09-25 2017-03-30 (주)씽크포비엘 Method and apparatus for analyzing software
KR101706098B1 (en) * 2015-09-25 2017-02-23 (주)씽크포비엘 Method and Apparatus For Software Analysis
JP6440895B2 (en) 2016-02-17 2018-12-19 三菱電機株式会社 Software analysis apparatus and software analysis method
KR101963016B1 (en) * 2017-01-31 2019-03-27 계명대학교 산학협력단 Learning apparatus for intelligent computer programing language and learning method using the same
JP6790921B2 (en) * 2017-03-02 2020-11-25 富士通株式会社 Program analyzer, program analysis method and program analysis program
US10379825B2 (en) * 2017-05-22 2019-08-13 Ab Initio Technology Llc Automated dependency analyzer for heterogeneously programmed data processing system
KR101974804B1 (en) * 2017-07-03 2019-05-03 주식회사 우리은행 Flow diagram generation method and apparatus performing the same
JP6953962B2 (en) * 2017-09-27 2021-10-27 富士通株式会社 Analysis method, analysis device and analysis program
WO2020070817A1 (en) 2018-10-03 2020-04-09 三菱電機株式会社 Software analysis device, software analysis method, and software analysis program
JP7031627B2 (en) * 2019-03-13 2022-03-08 オムロン株式会社 Analytical equipment, analysis method, and analysis program
KR102037796B1 (en) * 2019-03-28 2019-11-26 (주)위세아이텍 Device and method for visualizing result data correspondence relationship by feature engineering
KR102262849B1 (en) * 2019-07-26 2021-06-08 서울시립대학교 산학협력단 Coding education method and robot
CN112965838B (en) * 2021-03-16 2024-04-19 支付宝(杭州)信息技术有限公司 Concurrent program data competition checking method and device
CN113448553B (en) * 2021-06-23 2023-11-03 南京大学 Method and system for managing and visualizing C language project dependent information

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2957025B2 (en) * 1991-07-10 1999-10-04 松下電器産業株式会社 Functional level simulation device
JP3305949B2 (en) * 1996-02-08 2002-07-24 富士通株式会社 Program analyzer
JPH10214180A (en) * 1997-01-31 1998-08-11 Meidensha Corp Method for supporting development of software
JP4782315B2 (en) * 2000-06-27 2011-09-28 新日鉄ソリューションズ株式会社 Impact analysis apparatus and method, recording medium, and program
JP4001286B2 (en) * 2003-06-23 2007-10-31 インターナショナル・ビジネス・マシーンズ・コーポレーション Program maintenance support apparatus, program maintenance support method, and program

Also Published As

Publication number Publication date
JP2013156786A (en) 2013-08-15

Similar Documents

Publication Publication Date Title
JP5775829B2 (en) Software structure visualization program and system
CN107704265B (en) Configurable rule generation method for service flow
JP4148527B2 (en) Functional test script generator
CN107608677B (en) Compiling processing method and device and electronic equipment
US9208057B2 (en) Efficient model checking technique for finding software defects
JP5297802B2 (en) Metadata management for graph-type calculations
US9418230B2 (en) Automated tools for building secure software programs
US10423518B2 (en) Systems and methods for analyzing violations of coding rules
CN104899147B (en) A kind of code Static Analysis Method towards safety inspection
JP2018501538A (en) Impact analysis
US8898649B2 (en) Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program
Angerer et al. Configuration-aware change impact analysis (t)
Angerer et al. Change impact analysis for maintenance and evolution of variable software systems
CN111831272A (en) Method, medium, equipment and device for development by adopting graphics
CN103049504A (en) Semi-automatic instrumentation method based on source code inquiring
JP6002507B2 (en) Software verification program and software verification system
Kaur et al. Clone detection in software source code using operational similarity of statements
Luckow et al. Symbolic pathfinder v7
Anderson et al. Supporting analysis of SQL queries in PHP AiR
JP2016057715A (en) Graphic type program analyzer
JP2006277282A (en) Model evaluation analysis system and model evaluation analysis program
Grigorev et al. String-embedded language support in integrated development environment
JP2015133031A (en) Program analyzer and program analysis method
Hakim et al. Identifying and localizing the inter-consistency errors among UML use cases and activity diagrams: An approach based on functional and structural size measurements
US11782682B2 (en) Providing metric data for patterns usable in a modeling environment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140820

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140820

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150521

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150706

R150 Certificate of patent or registration of utility model

Ref document number: 5775829

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees