JP2003036170A - Device, method and program for cross reference construction - Google Patents

Device, method and program for cross reference construction

Info

Publication number
JP2003036170A
JP2003036170A JP2001224416A JP2001224416A JP2003036170A JP 2003036170 A JP2003036170 A JP 2003036170A JP 2001224416 A JP2001224416 A JP 2001224416A JP 2001224416 A JP2001224416 A JP 2001224416A JP 2003036170 A JP2003036170 A JP 2003036170A
Authority
JP
Japan
Prior art keywords
alias
symbol
symbols
directed graph
registered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2001224416A
Other languages
Japanese (ja)
Other versions
JP3887550B2 (en
Inventor
Shoji Honma
昭次 本間
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2001224416A priority Critical patent/JP3887550B2/en
Publication of JP2003036170A publication Critical patent/JP2003036170A/en
Application granted granted Critical
Publication of JP3887550B2 publication Critical patent/JP3887550B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a cross reference construction device capable of constructing precise cross reference. SOLUTION: The cross reference construction device is provided with a watched function designating means for designating a watched symbol to be a retrieving object, an inter-symbol relation analytic means for obtaining a symbol having a specific relation with this watched symbol, a alias analytic means for obtaining a symbol having a alias from that of the watched symbol and a connection means for connecting the retrieving results of the inter-symbol relation analytic means and the alias analytic means. Thus, the device is capable of not only showing a relation between symbols but also reflecting the result of the alias analysis when constructing the cross reference.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、プログラムを構成
する変数や関数といったシンボルについて、シンボル間
の関係を解析し、クロスリファレンスを構築する技術に
関するもので、特に、シンボルの別名を解析することに
より解析精度を向上させたクロスリファレンス構築装置
及びクロスリファレンス構築方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for analyzing a relation between symbols and constructing a cross reference for symbols such as variables and functions constituting a program, and in particular, by analyzing aliases of the symbols. The present invention relates to a cross reference construction device and a cross reference construction method with improved analysis accuracy.

【0002】[0002]

【従来の技術】近年のIT化社会の中で、ITによって
提供されるサービスは巨大化、複雑化を増し、それに伴
い、IT化社会を実現するプログラムも巨大化、複雑化
している。一方、多くの人や会社がグローバルにIT産
業に参入するにつれて、プログラムの開発競争が激化し
ている。
2. Description of the Related Art In an IT-based society in recent years, services provided by IT have become huge and complicated, and accompanying this, programs for realizing the IT-based society have also become huge and complicated. On the other hand, as many people and companies enter the IT industry globally, competition for program development is intensifying.

【0003】このような状況においては、プログラムの
開発を短期間で効率的に行う必要がある。そのためのひ
とつの方法としては、過去に作成したプログラムや他者
(他社)が作成したプログラムを再利用して、新たなプ
ログラムを開発する方法がある。このように既存のプロ
グラムを再利用する場合、既存のプログラムに変更を加
えずにそのまま利用する方法と、なんらかの変更を加え
て利用する方法とがある。何も変更を加えずに既存のプ
ログラムを利用することができれば簡単であるが、通常
は、新しい機能を追加したり、既存の機能を変更(カス
タマイズ)するといった処理が必要となる。
In such a situation, it is necessary to efficiently develop the program in a short period of time. One method for that purpose is to reuse a program created in the past or a program created by another person (other company) to develop a new program. When reusing an existing program in this way, there are a method of using the existing program as it is without any change, and a method of using the existing program with some change. It is easy if you can use an existing program without making any changes, but usually it is necessary to add a new function or change (customize) an existing function.

【0004】このように既存のプログラムを変更するに
は、変更前にそのプログラムを理解する必要がある。そ
のためにはそのプログラムの仕様書や設計書を参照して
プログラムを理解する必要がある。しかし、仕様書や設
計書は、ときにそれらが書かれた後にプログラムが変更
され、その記載内容がプログラムと一致していなかった
り、仕様書や設計書がそれほど詳細には書かれていなか
ったりすることもあるため、プログラムを正確に理解す
るにはプログラムを読む必要がある。
In order to change the existing program as described above, it is necessary to understand the program before the change. For that purpose, it is necessary to understand the program by referring to the specifications and design documents of the program. However, specifications and design documents are sometimes changed after the programs are written, and the description contents do not match the program, or the specifications and design documents are not written in so much detail. Sometimes, you need to read the program to understand it correctly.

【0005】ところが、上述したように、プログラムは
巨大化、複雑化しており、プログラムすべてに目を通す
ことは困難である。そこで、プログラムの変更に必要な
個所に絞って検討すれば良いのであれば非常に効率的で
ある。プログラムの変更に必要な個所を知るには、ま
ず、全体的な構成の概要が必要であり、その中で変更し
たい個所がどこであるのかを見つけ出す必要がある。次
に、変更したい個所を変更したときに、どこに影響が及
ぶのかを確認する必要がある。そのためには、プログラ
ム中に記述されたシンボルにはどのようなものがあるの
か、また、各シンボル間にはどのような関係があるのか
をあらかじめ解析し、シンボル間の関係をそのプログラ
ムを再利用しようとするユーザに提示することができる
環境が必要である。
However, as described above, the programs are becoming huge and complicated, and it is difficult to read all the programs. Therefore, it is very efficient if it is possible to focus on the points necessary for changing the program. In order to know the necessary parts to change the program, first of all, an outline of the whole structure is necessary, and it is necessary to find out where the part to be changed is. Next, it is necessary to confirm where the change will affect the change. To do so, analyze in advance what kind of symbols are described in the program, and the relationship between each symbol, and reuse the relationship between the symbols in the program. There is a need for an environment that can be presented to the trying user.

【0006】[0006]

【発明が解決しようとする課題】このようにシンボル間
の関係を解析し、クロスリファレンスを構築するための
技術としては、従来、プログラムを解析して、プログラ
ムの構成要素であるシンボルを抽出し、抽出したシンボ
ル間の関連を解析するものがあった。このようなクロス
リファレンスとしては、例えば、関数呼び出しによる関
連を示すコールグラフ/コールドグラフ、関数とグロー
バル変数の書込みと参照による関連を示す関数とグロー
バル変数の関連図、あるシンボルからあるシンボルへの
データの受け渡しによる関連を示すデータフロー図等が
あった。
As a technique for analyzing the relationship between symbols and constructing a cross reference as described above, conventionally, a program is analyzed to extract symbols which are constituent elements of the program, Some have analyzed the relationships between the extracted symbols. Examples of such cross-references are a call graph / cold graph showing a relation by function call, a relation diagram of a function and a global variable showing a relation by writing and referencing a function and a global variable, data from a certain symbol to a certain symbol. There were data flow charts, etc. showing the relationship due to delivery.

【0007】しかしながら、上記のような従来のクロス
リファレンスでは、シンボル間の関係において、同じ実
体に対して別の名前が付けられている、いわゆる「別
名」についてはなんら考慮されていなかった。そのた
め、クロスリファレンスの構築にあたって、ポインタ関
数やポインタ変数や参照渡しをされた変数等を介して間
接的な関連があるシンボル間の関係が欠落してしまう場
合があった。
However, in the conventional cross reference as described above, no consideration has been given to a so-called "alias" in which the same entity is given a different name in the relationship between the symbols. Therefore, in constructing the cross reference, there is a case where the relation between the symbols having an indirect relation via the pointer function, the pointer variable, the variable passed by reference, or the like is lost.

【0008】本発明は、上述したような従来技術の問題
点を解消するために提案されたものであり、その目的
は、シンボル間の関係を提示する際に、別名解析の結果
を反映させることにより、より精度の高いクロスリファ
レンスを構築することができるクロスリファレンス構築
装置及びクロスリファレンス構築方法を提供することに
ある。
The present invention has been proposed in order to solve the above-mentioned problems of the prior art, and its purpose is to reflect the result of alias analysis when presenting the relationship between symbols. Accordingly, it is an object of the present invention to provide a cross reference construction device and a cross reference construction method capable of constructing a more accurate cross reference.

【0009】[0009]

【課題を解決するための手段】上記の目的を達成するた
め、請求項1に記載のクロスリファレンス構築装置は、
検索対象となる注目するシンボルを指定する注目関数指
定手段と、前記注目するシンボルに対して特定の関係に
あるシンボルを取得するシンボル間の関係解析手段と、
前記注目するシンボルの別名のシンボルを取得する別名
解析手段と、前記シンボル間の関係解析手段と別名解析
手段の検索結果を結びつける連結手段とを備えたことを
特徴とするものである。
In order to achieve the above object, the cross reference construction apparatus according to claim 1 is
Attention function designating means for designating a target symbol to be searched, and relationship analysis means between symbols for acquiring a symbol having a specific relationship with the target symbol,
The present invention is characterized by comprising an alias analysis means for obtaining a symbol of an alias of the symbol of interest and a connection means for connecting the relation analysis means between the symbols and the search result of the alias analysis means.

【0010】また、請求項3に記載のクロスリファレン
ス構築方法は、請求項1に記載の発明を方法の観点から
捉えたものであって、検索対象となる注目するシンボル
を指定する注目関数指定処理と、前記注目するシンボル
に対して特定の関係にあるシンボルを取得するシンボル
間の関係解析処理と、前記注目するシンボルの別名のシ
ンボルを取得する別名解析処理と、前記シンボル間の関
係解析処理と別名解析処理を実行することにより得られ
た検索結果を結びつける連結処理とを含むことを特徴と
するものである。
A cross reference construction method according to a third aspect of the present invention is obtained by considering the invention according to the first aspect from the viewpoint of the method, and an attention function designation process for designating a notable symbol to be searched. And a relationship analysis process between the symbols that acquires a symbol having a specific relationship with the symbol of interest, an alias analysis process that acquires a symbol of an alias of the symbol of interest, and a relationship analysis process between the symbols. The present invention is characterized by including a concatenation process for connecting the search results obtained by executing the alias analysis process.

【0011】また、請求項5に記載のクロスリファレン
ス構築用プログラムは、請求項3に記載の発明をソフト
ウェアの観点から捉えたものであって、検索対象となる
注目するシンボルを指定する注目関数指定ステップと、
前記注目するシンボルに対して特定の関係にあるシンボ
ルを取得するシンボル間の関係解析ステップと、前記注
目するシンボルの別名のシンボルを取得する別名解析ス
テップと、前記シンボル間の関係解析ステップと別名解
析ステップを実行することにより得られた検索結果を結
びつける連結ステップとを有することを特徴とするもの
である。
A cross reference construction program according to a fifth aspect of the present invention captures the invention according to the third aspect from a software point of view, and specifies a target function for designating a target symbol to be searched. Steps,
Relationship analysis step between symbols for obtaining a symbol having a specific relationship with the symbol of interest, alias analysis step for acquiring a symbol of an alias of the symbol of interest, relationship analysis step between the symbols and alias analysis And a connecting step for connecting the search results obtained by executing the steps.

【0012】上記のような構成を有する請求項1、請求
項3及び請求項5に記載の発明によれば、検索対象とな
る注目するシンボルと他のシンボルとの間の関連だけで
なく、注目するシンボルの別名であるシンボルをも考慮
して、直接的に関連があるシンボルだけでなく、間接的
に関連があるシンボル間の関係をも網羅することができ
るので、より精度の高いクロスリファレンスを構築する
ことができる。
According to the inventions of claim 1, claim 3 and claim 5 having the above-mentioned structure, not only the relation between the symbol of interest to be searched and other symbols but also the symbol of interest In addition to directly related symbols, it is possible to cover not only directly related symbols but also indirectly related symbols. Can be built.

【0013】請求項2に記載の発明は、請求項1に記載
のクロスリファレンス構築装置において、前記別名解析
手段が、あるシンボルがどのシンボルと同じ実体を指す
可能性があるかを表す別名有向グラフを作成する別名有
向グラフ作成部と、前記別名有向グラフを参照して、前
記注目するシンボルを始点に別名有向グラフを正の向き
にたどったときに、たどることのできるシンボルをすべ
て別名として登録すると共に、別名として登録されたそ
れぞれのシンボルを始点に、別名有向グラフを負の向き
にたどったときに、たどることのできるシンボルをすべ
て別名として登録し、登録されたシンボルを前記注目す
るシンボルの「別名」とする別名検索部とを備えたこと
を特徴とするものである。
According to a second aspect of the present invention, in the cross-reference construction apparatus according to the first aspect, the alias analysis means generates an alias directed graph indicating which symbol a symbol may indicate the same entity. With reference to the alias directed graph creating unit to create and the alias directed graph, when the alias directed graph is traced in the positive direction starting from the symbol of interest, all the traceable symbols are registered as aliases, and as aliases Aliases with each registered symbol as a starting point, when the directed graph is traced in the negative direction, all traceable symbols are registered as aliases, and the registered symbols are "aliases" of the noted symbol. It is characterized by including a search unit.

【0014】また、請求項4に記載の発明は、請求項3
に記載のクロスリファレンス構築方法において、前記別
名解析処理が、あるシンボルがどのシンボルと同じ実体
を指す可能性があるかを表す別名有向グラフを作成する
別名有向グラフ作成ステップと、前記別名有向グラフを
参照して、前記注目するシンボルを始点に別名有向グラ
フを正の向きにたどったときに、たどることのできるシ
ンボルをすべて別名として登録すると共に、別名として
登録されたそれぞれのシンボルを始点に、別名有向グラ
フを負の向きにたどったときに、たどることのできるシ
ンボルをすべて別名として登録し、登録されたシンボル
を前記注目するシンボルの「別名」とする別名検索ステ
ップとを含むことを特徴とするものである。
The invention according to claim 4 is the same as claim 3
In the cross-reference construction method according to claim 1, the alias analysis processing refers to the alias directed graph creation step of creating an alias directed graph that represents a certain symbol and which symbol may refer to the same entity, and the alias directed graph. , When the alias directed graph is traced in the positive direction with the noted symbol as a starting point, all the traceable symbols are registered as aliases, and each of the symbols registered as aliases is used as a starting point and the alias directed graph is negative. All of the traceable symbols are registered as aliases when tracing the direction, and an alias search step is performed in which the registered symbols are “alias” of the noted symbol.

【0015】請求項6に記載の発明は、請求項5に記載
のクロスリファレンス構築用プログラムにおいて、前記
別名解析ステップが、あるシンボルがどのシンボルと同
じ実体を指す可能性があるかを表す別名有向グラフを作
成する別名有向グラフ作成ステップと、前記別名有向グ
ラフを参照して、前記注目するシンボルを始点に別名有
向グラフを正の向きにたどったときに、たどることので
きるシンボルをすべて別名として登録すると共に、別名
として登録されたそれぞれのシンボルを始点に、別名有
向グラフを負の向きにたどったときに、たどることので
きるシンボルをすべて別名として登録し、登録されたシ
ンボルを前記注目するシンボルの「別名」とする別名検
索ステップとを有することを特徴とするものである。
According to a sixth aspect of the present invention, in the cross-reference construction program according to the fifth aspect, the alias analysis step represents an alias directed graph indicating which symbol a symbol may indicate the same entity. Create an alias directed graph creating step, and referring to the alias directed graph, register all the symbols that can be traced as an alias when the alias directed graph is traced in the positive direction from the target symbol as a starting point. Starting from each of the symbols registered as, the alias can be traced in the negative direction when the directed graph is traced in the negative direction, and all registered symbols are registered as aliases, and the registered symbols are defined as "aliases" of the noted symbol. It is characterized by having an alias search step.

【0016】上記のような構成を有する請求項2、請求
項4及び請求項6に記載の発明によれば、注目するシン
ボルについて、別名の関係にあるシンボルを効率良く、
高精度に求めることができるので、さらに精度の高いク
ロスリファレンスを構築することができる。
According to the inventions of claim 2, claim 4 and claim 6 having the above-mentioned configuration, the symbols having the aliases can be efficiently used for the symbol of interest.
Since it can be obtained with high accuracy, a cross reference with higher accuracy can be constructed.

【0017】[0017]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して具体的に説明する。なお、以下に示す実施形
態は、クロスリファレンス構築の例としてコールグラフ
を構築する場合を例としたものである。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be specifically described below with reference to the drawings. The embodiment described below is an example of constructing a call graph as an example of constructing a cross reference.

【0018】なお、以下の実施形態はコンピュータ上に
実現され、実施形態の各機能は、所定の手順(プログラ
ム)がこのコンピュータを制御することで実現される。
また、本明細書における各手段は、実施形態の各機能に
対応する概念的なもので、必ずしも特定のハードウェア
やソフトウェア・ルーチンに1対1には対応しない。同
一のハードウェア要素が、場合によって異なった手段を
構成する。例えば、コンピュータは、ある命令を実行す
るときにある手段となり、別の命令を実行するときは別
の手段となりうる。また、一つの手段が、わずか1命令
によって実現さる場合もあれば、多数の命令によって実
現される場合もある。したがって、本明細書では、以
下、実施形態の各機能を有する仮想的回路ブロック(手
段)を想定して実施形態を説明する。また、本実施形態
における各手順の各ステップは、その性質に反しない限
り、実行順序を変更し、複数同時に実行し、また、実行
ごとに異なった順序で実行してもよい。このような順序
の変更は、例えば、ユーザが実行可能な処理を選択する
などメニュー形式のインターフェース手法によって実現
することができる。
The following embodiments are realized on a computer, and each function of the embodiments is realized by a predetermined procedure (program) controlling this computer.
Further, each means in this specification is a conceptual one corresponding to each function of the embodiment, and does not necessarily correspond to a specific hardware or software routine on a one-to-one basis. The same hardware element may in some cases constitute different means. For example, a computer may be one means for executing one instruction and another for executing another instruction. Further, one means may be realized by only one instruction or may be realized by a large number of instructions. Therefore, in the present specification, the embodiments will be described below assuming a virtual circuit block (means) having each function of the embodiments. In addition, the execution order of each step of each procedure in the present embodiment may be changed, a plurality of steps may be executed at the same time, or may be executed in a different order for each execution, as long as the property is not violated. Such an order change can be realized by a menu-type interface method, such as a user selecting an executable process.

【0019】(1)構成 本実施形態のクロスリファレンス構築装置1には、図1
の機能ブロック図に示したように、シンボル間の関係取
得部12が設けられている。このシンボル間の関係取得
部12では、ソースファイル群11からソースファイル
を順次読み込み、既存技術である字句解析、構文解析、
意味解析を行うことにより、ソースコードの中から関数
や変数といったシンボルを抽出すると共に、関数の宣言
と、関数呼び出しを見つけ出し、「どの関数がどの関数
を呼んでいるか」という関数の呼び出し関係を取得し、
シンボル間の関係図13として表す。
(1) Configuration The cross reference construction apparatus 1 of the present embodiment has a configuration shown in FIG.
As shown in the functional block diagram of 1., the relationship acquisition unit 12 between symbols is provided. The relationship acquisition unit 12 between symbols sequentially reads the source files from the source file group 11 and performs lexical analysis, syntactic analysis,
By performing semantic analysis, symbols such as functions and variables are extracted from the source code, function declarations and function calls are found, and function call relationships such as "which function calls which function" are acquired. Then
The relationship between symbols is shown as FIG.

【0020】また、本実施形態のクロスリファレンス構
築装置1には、別名有向グラフ作成部14が設けられて
いる。この別名有向グラフ作成部14では、ソースファ
イル群11からソースファイルを順次読み込み、既存技
術である字句解析、構文解析、意味解析を行うことによ
って、関数や変数といったシンボルについて、あるシン
ボルが他のどのシンボルと同じメモリ領域を指す可能性
があるかを解析し、別名有向グラフ15として表す。例
えば、図2に示したサンプルプログラムを別名有向グラ
フに表すと図3に示したようになり、図7に示したサン
プルプログラムでは、図9に示すような「別名有向グラ
フ」が得られる。ただし、いずれの例でも、アークがな
いノードは省略している。
Further, the cross-reference construction apparatus 1 of this embodiment is provided with an alias directed graph creation unit 14. The alias directed graph creation unit 14 sequentially reads the source files from the source file group 11 and performs lexical analysis, syntactic analysis, and semantic analysis that are existing techniques to determine which symbol such as a function or a variable is a certain symbol. It is analyzed whether there is a possibility that it points to the same memory area as, and is represented as an alias directed graph 15. For example, when the sample program shown in FIG. 2 is represented by an alias directed graph, it becomes as shown in FIG. 3. With the sample program shown in FIG. 7, an “alias directed graph” as shown in FIG. 9 is obtained. However, in all examples, nodes without arcs are omitted.

【0021】このように、別名有向グラフ15では、関
数や変数といった各シンボルを一つのノードで表現し、
あるシンボルが他のあるシンボルを指す可能性があるこ
とを、ノードとノードを結ぶアークで表現する。このア
ークには向きがあり、指す可能性のあるシンボルから指
される可能性のあるシンボルへ向かう場合を「順方向」
あるいは「正の方向」といい、その逆を「逆方向」ある
いは「負の方向」ということとする。なお、あるシンボ
ルが他のあるシンボルを指す可能性のある例としては、
図4に示したように、ポインタの代入、参照渡しによる
代入や仮想関数等があり、同じ実体に対して別の名前が
付けられるような、いわゆる「別名」の関係にあること
を意味する。
As described above, in the alias directed graph 15, each symbol such as a function or a variable is represented by one node,
The possibility that one symbol may point to another symbol is expressed by an arc connecting nodes. This arc has a direction, and is "forward" when going from a potential symbol to a potential symbol.
Alternatively, it is called "positive direction" and the opposite is called "reverse direction" or "negative direction". In addition, as an example in which one symbol may point to another symbol,
As shown in FIG. 4, it means that there is a so-called “alias” relationship in which there are pointer assignments, assignments by reference, virtual functions, etc., and different names are given to the same entity.

【0022】また、本実施形態のクロスリファレンス構
築装置1には、表示させたいコールグラフの先頭の関数
を指定する注目関数指定部16と、指定された関数につ
いて、上記シンボル間の関係図13を参照して、「どの
関数がどの関数を呼んでいるか」というシンボル間の関
係を検索する関係検索部17と、この関係検索部17に
よる検索の結果、関数の呼び出し関係があると判断され
たシンボルを関係情報データ18として登録する関係登
録部19とが設けられている。
In the cross-reference construction apparatus 1 of this embodiment, an attention function designating section 16 for designating the function at the head of the call graph to be displayed and the relationship diagram 13 between the symbols for the designated function are shown in FIG. Referring to a relation search unit 17 that searches for a relation between symbols, “which function calls which function”, and a symbol determined to have a function calling relation as a result of the search by the relation search unit 17. And a relationship registration unit 19 for registering as the relationship information data 18.

【0023】また、本実施形態のクロスリファレンス構
築装置1には、注目関数指定部16により指定された関
数について、上記別名有向グラフ15を参照して、「検
索対象として指定されたシンボルが、どのシンボルと同
じメモリ領域を指す可能性があるか」という別名検索を
行う別名検索部20と、この別名検索部20による検索
の結果、別名であると判断されたシンボルを別名情報デ
ータ21として登録する別名登録部22とが設けられて
いる。
Further, in the cross-reference construction apparatus 1 of the present embodiment, for the function designated by the attention function designation unit 16, the alias directed graph 15 is referred to, and "the symbol designated as the search target is the symbol And the symbol determined to be an alias as a result of the search by this alias search unit 20 is registered as the alias information data 21. A registration unit 22 is provided.

【0024】さらに、本実施形態のクロスリファレンス
構築装置1には、連結部23と検索の結果を出力する出
力部24とが設けられている。そして、連結部23で
は、上記関係検索部17により得られた「注目する関数
が呼び出している関数」を、その注目する関数と関連づ
けて結びつけると共に、上記別名検索部20により得ら
れた「注目する関数の別名」を、その注目する関数と関
連付けて結びつける。
Further, the cross-reference construction apparatus 1 of the present embodiment is provided with a connecting section 23 and an output section 24 for outputting the search result. Then, in the linking unit 23, the “function called by the function of interest” obtained by the relationship searching unit 17 is associated with the function of interest and linked, and the “attention is obtained” by the alias searching unit 20. The "alias of the function" is associated with and linked to the function of interest.

【0025】なお、本実施形態のクロスリファレンス構
築装置1では、ある関数についての一連の検索処理が終
了した後、注目するシンボルを、順次、関連するシンボ
ルに替え、後述する処理を繰り返すことにより、コール
グラフが構築されるようになっている。
In the cross-reference construction apparatus 1 of this embodiment, after a series of search processing for a certain function is completed, the symbol of interest is sequentially replaced with the related symbol, and the processing described later is repeated, A call graph is built.

【0026】また、上記シンボル間の関係取得部12、
シンボル間の関係図13、関係検索部17、関係情報デ
ータ18及び関係登録部19によって、請求項に示す
「シンボル間の関係解析手段」が構成され、別名有向グ
ラフ作成部14、別名有向グラフ15、別名検索部2
0、別名情報データ21及び別名登録部22によって、
請求項に示す「別名解析手段」が構成されている。な
お、本実施形態においては、上記別名検索部20は、別
名有向グラフ15を正の向き(順方向)に検索した後、
負の向き(逆方向)に検索するように設定されているも
のとする。
Further, the relationship acquisition unit 12 between the symbols,
The relationship diagram between symbols 13, the relationship retrieval unit 17, the relationship information data 18, and the relationship registration unit 19 constitute the “relationship analysis unit between symbols” described in the claims. The alias directed graph creation unit 14, the alias directed graph 15, and the alias Search unit 2
0, by the alias information data 21 and the alias registration unit 22,
The "aliasing analysis means" shown in the claims is configured. In the present embodiment, the alias search unit 20 searches the alias directed graph 15 in the positive direction (forward direction) and then
It is assumed that the search is set in the negative direction (reverse direction).

【0027】(2)作用 続いて、上記のような構成を有する本実施形態のクロス
リファレンス構築装置におけるコールグラフ作成処理の
流れを、図5及び図6に示したフローチャートにより説
明する。
(2) Operation Next, the flow of call graph creation processing in the cross reference construction apparatus of the present embodiment having the above-mentioned configuration will be described with reference to the flow charts shown in FIGS.

【0028】(2−1)コールグラフ作成処理 まず、コールグラフの作成の手順を、図5に示したコー
ルグラフ構築のフローチャートを参照して、図7の関数
ポインタを用いたサンプルプログラムのコールグラフを
構築する例を用いて説明する。まず、ユーザが注目関数
指定部16を介して指定した注目するシンボルを取得し
(ステップ501)、このシンボルをコールグラフに追
加する(ステップ502)。ここでは、“main”を注目
するシンボルに指定したと仮定し、“main”をコールグ
ラフに追加する。最初はコールグラフに何も登録されて
いないので、この場合、“main”がコールグラフの先頭
に登録される(図8の左上)。そして、ステップ503
において、注目していないシンボルがあるか否かが判断
され、注目するシンボルを1つ選択する(ステップ50
4)。ここでは、最初なので、注目するシンボルとして
“main”が選択される。
(2-1) Call graph creation processing First, referring to the call graph construction flow chart shown in FIG. 5, the call graph creation procedure will be described with reference to the call graph of the sample program using the function pointer shown in FIG. Will be explained using an example of constructing. First, the user obtains the symbol of interest designated by the user via the attention function designation unit 16 (step 501) and adds this symbol to the call graph (step 502). Here, assuming that "main" is specified as the symbol of interest, "main" is added to the call graph. At first, nothing is registered in the call graph, so in this case, "main" is registered at the beginning of the call graph (upper left in FIG. 8). Then, step 503
In, it is determined whether or not there is a symbol that is not focused, and one symbol that is focused is selected (step 50).
4). Here, since it is the first time, "main" is selected as the symbol of interest.

【0029】次に、シンボル間の関係図13を参照し
て、この注目するシンボル“main”が呼び出しているシ
ンボルがあるか否かを検索し、“main”が呼び出してい
る関数として“*fpLocalFunc”が取得される(ステップ
505)。そこで、この“*fpLocalFunc”を注目するシ
ンボルの下位に、「呼び出しているシンボル」として連
結する(ステップ506)。その結果、コールグラフと
して“*fpLocalFunc”を“main”の下位に登録したもの
が得られる(図8の右上)。
Next, referring to FIG. 13 which shows the relationship between symbols, it is searched whether or not there is a symbol called by the noted symbol "main", and "* fpLocalFunc" is determined as the function called by "main". Is acquired (step 505). Therefore, this "* fpLocalFunc" is connected as a "calling symbol" below the symbol of interest (step 506). As a result, a call graph obtained by registering "* fpLocalFunc" under "main" is obtained (upper right of FIG. 8).

【0030】次に、ステップ507で、注目するシンボ
ルに別名があるか否かが判断され、別名がある場合に
は、後述する別名検索処理(図6のフローチャート)が
なされる。一方、注目するシンボルに別名がない場合に
はステップ503に戻る。ここでは、“main”に対する
別名はないので、次の処理に進む。
Next, in step 507, it is judged whether or not the symbol of interest has an alias, and if there is an alias, an alias search process (flowchart in FIG. 6) described later is performed. On the other hand, if the symbol of interest has no alias, the process returns to step 503. Here, since there is no alias for "main", the process proceeds to the next process.

【0031】すなわち、ステップ503で、コールグラ
フを参照し、登録されているシンボルのうち、まだ注目
していないシンボルがあるか否かが判断され、注目して
いないシンボルがある場合には、その中から注目するシ
ンボルを1つ選択し、これを新たに注目するシンボルと
する(ステップ504)。ここでは、“main”の下位に
登録されている“*fpLocalFunc”を次の注目するシンボ
ルとする。
That is, in step 503, it is determined by referring to the call graph whether or not there is a symbol that has not been paid attention to among the registered symbols. One symbol of interest is selected from among the symbols to be a new symbol of interest (step 504). Here, "* fpLocalFunc" registered under the "main" is the next symbol of interest.

【0032】この新たに注目するシンボルとなった“*f
pLocalFunc”について、呼び出しているシンボルがある
か否かが判断されるが(ステップ505)、この“*fpL
ocalFunc”には呼び出しているシンボルはないので、そ
のままステップ507に進み、別名があるか否かが判断
される。具体的には、この“*fpLocalFunc”が別名有向
グラフ15に登録されているか否かが判断される。ここ
では、“*fpLocalFunc”は、別名有向グラフ15に図9
のように示されているので、図6に示す別名検索処理
(ステップ508)に移行する。
[* F] which became the symbol of this new attention
For "pLocalFunc", it is judged whether or not there is a calling symbol (step 505).
Since there is no calling symbol in ocalFunc ”, the process directly proceeds to step 507 and it is determined whether or not there is an alias. Specifically, it is determined whether or not this“ * fpLocalFunc ”is registered in the alias directed graph 15. Here, "* fpLocalFunc" is shown in the alias directed graph 15 in FIG.
, The alias search processing (step 508) shown in FIG. 6 is performed.

【0033】(2−2)別名検索処理 図5のステップ507で、今注目しているシンボルに別
名があると判断された場合には、図6のフローチャート
に示す別名検索処理がなされる。すなわち、まず、別名
情報データ21を空とする(ステップ601)。そし
て、今注目しているシンボルを検索対象シンボルとして
取得し(ステップ602)、そのシンボル自体を別名情
報データ21として登録する(ステップ603)。ここ
では、“*fpLocalFunc”を別名情報データ21として登
録する。
(2-2) Alias Search Process If it is determined in step 507 of FIG. 5 that the symbol of interest has an alias, the alias search process shown in the flowchart of FIG. 6 is performed. That is, first, the alias information data 21 is made empty (step 601). Then, the symbol of interest is acquired as a search target symbol (step 602), and the symbol itself is registered as the alias information data 21 (step 603). Here, “* fpLocalFunc” is registered as the alias information data 21.

【0034】次に、別名情報データ21の中から登録さ
れている別名を1つ選択する(ステップ604)。ここ
では、すでに別名として登録されているシンボルとして
“*fpLocalFunc”が見つかる。その“*fpLocalFunc”に
ついて別名有向グラフ(図9)を参照すると、“*fpLoc
alFunc”から正の向きのアークとして“*func_table”
があるので、“*func_table”を別名情報データ21と
して追加する(ステップ605、ステップ606)。
Next, one registered alias is selected from the alias information data 21 (step 604). Here, "* fpLocalFunc" is found as a symbol already registered as an alias. For the "* fpLocalFunc", see the alias directed graph (Fig. 9).
"* func_table" as a positive arc from "alFunc"
Therefore, "* func_table" is added as the alias information data 21 (steps 605 and 606).

【0035】一方、ステップ605において、正の向き
のアークがないと判断された場合には、そのままステッ
プ607に進む。ステップ607において、別名情報デ
ータ21として登録されているすべての別名について順
方向の検索が終了したか否かが判断され、終了していな
い場合には、ステップ604に戻り、別名情報データ2
1の中から未処理の別名を1つ選択し、ステップ605
〜ステップ607を繰り返す。ここでは、すでに別名と
して“*func_table”が追加されているので、この“*fu
nc_table”を選択し(ステップ604)、順方向のアー
クがあるか否かが判断される(ステップ605)。
On the other hand, if it is determined in step 605 that there is no arc in the positive direction, the process directly proceeds to step 607. In step 607, it is determined whether or not the forward search has been completed for all aliases registered as the alias information data 21, and if not completed, the process returns to step 604 and the alias information data 2
Select one of the unprocessed aliases from step 1, and then select step 605.
~ Repeat step 607. Here, since "* func_table" has already been added as an alias, this "* fuc_table"
nc_table "is selected (step 604), and it is determined whether or not there is an arc in the forward direction (step 605).

【0036】すなわち、別名有向グラフ(図9)を参照
すると、“*func_table”からさらに正の向きのアーク
として“funcA”と“funcB”があるので、これらを別
名に追加する(ステップ605、ステップ606)。こ
れ以上、正の向きのアークはないので、そこで正の向き
への検索は終了する(ステップ607)。この時点で、
別名情報データ21として登録されたシンボルは、“*f
pLocalFunc”、“*func_table”、“funcA”、“func
B”となる。
That is, referring to the alias directed graph (FIG. 9), since there are "funcA" and "funcB" as arcs in the more positive direction from "* func_table", these are added to the alias (steps 605 and 606). ). Since there is no more arc in the positive direction, the search in the positive direction ends there (step 607). at this point,
The symbol registered as the alias information data 21 is "* f
pLocalFunc ”,“ * func_table ”,“ funcA ”,“ func
B ".

【0037】このように、ステップ607において、別
名情報データ21として登録されているすべての別名に
ついて順方向の検索が終了したと判断された場合には、
ステップ608に進み、逆方向の検索を行う。すなわ
ち、別名情報データ21の中から登録されている別名を
1つ選択する。この別名について、別名有向グラフ(図
9)を参照して、その別名のシンボルから負の向き(逆
方向)のアークがあるか否かを判断し(ステップ60
9)、負の向きのアークがあれば、アークの先(アーク
の基端部)にあるノードのシンボルをすべて別名として
別名情報データ21に追加し(ステップ610)、ステ
ップ611に進む。一方、ステップ609において、負
の向きのアークがないと判断された場合には、そのまま
ステップ611に進む。ここでは、別名有向グラフ(図
9)に示すように負の向きのアークはないので、そのま
まステップ611に進む。
In this way, when it is determined in step 607 that the forward search has been completed for all aliases registered as the alias information data 21,
Proceeding to step 608, a search in the reverse direction is performed. That is, one registered alias is selected from the alias information data 21. For this alias, it is judged whether or not there is an arc in the negative direction (reverse direction) from the symbol of the alias by referring to the alias directed graph (FIG. 9) (step 60).
9) If there is an arc in the negative direction, all the symbols of nodes at the tip of the arc (base end of the arc) are added as aliases to the alias information data 21 (step 610), and the process proceeds to step 611. On the other hand, when it is determined in step 609 that there is no negative arc, the process proceeds to step 611. Here, as shown in the alias directed graph (FIG. 9), there is no arc in the negative direction, so the process proceeds to step 611.

【0038】ステップ611において、別名情報データ
21として登録されているすべての別名について逆方向
の検索が終了したか否かが判断され、終了していない場
合には、ステップ608に戻り、別名情報データ21の
中から未処理の別名を1つ選択し、ステップ609〜ス
テップ611を繰り返す。一方、ステップ611におい
て、別名情報データ21として登録されているすべての
別名について逆方向の検索が終了したと判断された場合
には、その検索対象シンボルについての別名検索処理を
終了し、図5のステップ509に戻る。
In step 611, it is judged whether or not the backward search has been completed for all aliases registered as the alias information data 21, and if not completed, the flow returns to step 608 to return the alias information data. One unprocessed alias is selected from 21 and steps 609 to 611 are repeated. On the other hand, when it is determined in step 611 that the backward search is completed for all the aliases registered as the alias information data 21, the alias search processing for the search target symbol is finished, and the alias search processing of FIG. Return to step 509.

【0039】そして、ステップ509において、コール
グラフの注目するシンボルの下位に、別名のシンボルを
連結する。ここでは、注目するシンボルである“*fpLoc
alFunc”には、別名として“*func_table”、“func
A”、“funcB”が得られるので、これらのシンボルを
“*fpLocalFunc”の下位に連結する(図8の左下)。
Then, in step 509, the alias symbol is connected to the lower level of the symbol of interest in the call graph. Here, the symbol of interest is “* fpLoc
"alFunc" has aliases "* func_table" and "func
Since A "and" funcB "are obtained, these symbols are connected to the lower order of" * fpLocalFunc "(lower left of FIG. 8).

【0040】続いて、ステップ503に戻り、注目して
いないシンボルがあるか否か、言い換えれば検索がすべ
て終了したか否かが判断され、注目していないシンボル
がなくなるまで、ステップ504〜ステップ509の処
理が繰り返される。そして、以上のようなコールグラフ
作成処理及び別名検索処理がすべて終了すると、図8の
右下に示したような、別名情報を加味したコールグラフ
が完成する。なお、図8では、「別名」を「関数呼び出
し」と区別するために、別名により登録したシンボルに
ついては、シンボル名の前に“≒”を付加している。
Next, returning to step 503, it is judged whether or not there are any symbols that are not of interest, in other words, whether or not all searches have been completed, and steps 504 to 509 are performed until there are no symbols of interest. The process of is repeated. When the call graph creation process and the alias search process as described above are all completed, the call graph with the alias information as shown in the lower right part of FIG. 8 is completed. In FIG. 8, in order to distinguish the “alias” from the “function call”, “≈” is added before the symbol name for the symbol registered by the alias.

【0041】(2−3)別名検索の具体例 上記の実施形態では、別名検索処理において負の向きの
検索がなされていないので、図3に示した別名有向グラ
フを例にして、図6に示した別名検索処理の流れをより
詳細に説明する。
(2-3) Specific Example of Alias Search In the above embodiment, since the negative search is not performed in the alias search processing, the alias directed graph shown in FIG. 3 is shown as an example in FIG. The flow of the alias search process will be described in more detail.

【0042】仮に、注目関数指定部16により“p”が
指定されたとする(ステップ602)。まず、“p”自
身を別名に登録する(ステップ603)。次に、正の向
きに検索を行うので、ステップ604に進み、別名情報
データ21の中から、すでに別名として登録されている
シンボルとして“p”が見つかる(ステップ604)。
その“p”について別名有向グラフ(図3)を参照する
と、“p”から正の向きのアークとして“a”があるの
で、“a”を別名に追加する(ステップ605、ステッ
プ606)。
It is assumed that "p" is designated by the attention function designation section 16 (step 602). First, "p" itself is registered as an alias (step 603). Next, since the search is performed in the positive direction, the process proceeds to step 604, where "p" is found as a symbol already registered as an alias in the alias information data 21 (step 604).
Referring to the alias directed graph (FIG. 3) for the "p", since "a" is an arc having a positive direction from "p", "a" is added to the alias (steps 605 and 606).

【0043】次に、別名有向グラフ(図3)を参照する
と、“a”から正の向きのアークはないので、そこで正
の向きへの検索は終了する。この時点で別名情報データ
21として登録されたシンボルは、“p”と“a”とな
る。次に、負の向きに検索を行う。別名情報データ21
を参照し、すでに別名として登録されているシンボル
“p”、“a”からまず“p”を取り出す。別名有向グ
ラフ(図3)を参照して、“p”に向かうアークを負の
向きに進むと“r”を得るので、“r”を別名に追加す
る。“r”から負の向きに進むアークはないので、終了
する。
Next, referring to the alias directed graph (FIG. 3), since there is no arc in the positive direction from "a", the search in the positive direction ends there. At this time, the symbols registered as the alias information data 21 are “p” and “a”. Next, the search is performed in the negative direction. Alias information data 21
, The symbol “p” is first extracted from the symbols “p” and “a” that have already been registered as aliases. Referring to the alias directed graph (FIG. 3), if the arc toward “p” proceeds in the negative direction, “r” is obtained, so “r” is added to the alias. Since there is no arc proceeding from “r” in the negative direction, the process ends.

【0044】同様に、別名情報データ21を参照し、す
でに別名として登録されているシンボルとして“a”を
取り出す。“a”からアークを負の向きに進むと“p”
と“q”があるが、“p”はすでに登録されているの
で、“q”だけを登録する。“q”へ向かうアークはな
いので、別名検索は終了する。その結果、“p”の別名
として、“p、r、a、q”が得られる。ここで、
“p、r、a、q”はポインタが“p”と同じ実体を指
す可能性がある集合であるが、“p”は取得されたシン
ボル自身であるので、別名から除いてもよい。
Similarly, by referring to the alias information data 21, "a" is taken out as a symbol already registered as an alias. "P" when going from "a" to the arc in the negative direction
And "q", but since "p" has already been registered, only "q" is registered. Since there is no arc toward “q”, the alias search ends. As a result, "p, r, a, q" are obtained as aliases for "p". here,
“P, r, a, q” is a set in which the pointer may point to the same entity as “p”, but “p” is the acquired symbol itself, so it may be excluded from the aliases.

【0045】(3)効果 上述したように、本実施形態のクロスリファレンス構築
装置によれば、関数間の関連だけでなく、別名をも考慮
して間接的な関連があるシンボル間の関係を網羅するこ
とができるので、より精度の高いクロスリファレンスを
構築することができる。
(3) Effects As described above, according to the cross-reference construction apparatus of this embodiment, not only the relation between the functions but also the relation between the symbols having an indirect relation by considering the aliases is covered. Therefore, a more accurate cross reference can be constructed.

【0046】(4)他の実施形態 本発明は、上述した実施形態に限定されるものではな
く、コールグラフを表示する場合に、階層数を限定する
ことも可能である。また、図8の右下に示した完成した
コールグラフにおいて、別名である“funcA”の下にぶ
ら下がっている“printf ( )”を改めて先頭シンボルに
指定することにより、注目するシンボルを取得して、再
度分析を行うことができることは言うまでもない。
(4) Other Embodiments The present invention is not limited to the above-described embodiments, but the number of layers can be limited when displaying a call graph. Further, in the completed call graph shown in the lower right of FIG. 8, by re-designating the “printf ()” hanging under the alias “funcA” as the leading symbol, the target symbol is acquired. Needless to say, the analysis can be performed again.

【0047】なお、表示する階層数を限定した場合に
は、その下にも関連する階層があること、例えばprintf
( )の下に更に関連するシンボルがあること、あるい
は、表示したシンボルに別名があること、例えばprintf
( )に別名があることを、マークや色、その他の表示方
法を用いて表現することもできる。その場合、表示され
たシンボルをクリック(指示)することにより、表示を
切り替えて、下の階層や別名を表示させることも可能で
ある。
When the number of displayed layers is limited, there is a related layer below that, for example, printf
There are more related symbols under (), or the displayed symbol has an alias, for example printf
The fact that there is an alias in () can also be expressed using marks, colors, or other display methods. In that case, by clicking (instructing) the displayed symbol, it is possible to switch the display and display the lower hierarchy or the alias.

【0048】[0048]

【発明の効果】以上のように、本発明によれば、シンボ
ル間の関係を提示する際に、別名解析の結果を反映させ
ることにより、より精度の高いクロスリファレンスを構
築することができるクロスリファレンス構築装置及びク
ロスリファレンス構築方法を提供することができる。
As described above, according to the present invention, a cross-reference can be constructed with higher accuracy by reflecting the result of the alias analysis when presenting the relationship between symbols. A construction device and a cross-reference construction method can be provided.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のクロスリファレンス構築装置の一つの
実施形態の構成を示す機能ブロック図
FIG. 1 is a functional block diagram showing a configuration of an embodiment of a cross reference construction device of the present invention.

【図2】別名解析の実施形態を説明するためのサンプル
プログラム
FIG. 2 is a sample program for explaining an embodiment of alias analysis.

【図3】図2のサンプルプログラムについて作成された
別名有向グラフ
FIG. 3 is an alias directed graph created for the sample program of FIG.

【図4】「別名」の関係にあるシンボルの例を示す図FIG. 4 is a diagram showing an example of symbols having a relationship of “alias”.

【図5】本発明のクロスリファレンス構築装置における
コールグラフ作成処理の流れを示すフローチャート
FIG. 5 is a flowchart showing the flow of call graph creation processing in the cross-reference building device of the present invention.

【図6】本発明のクロスリファレンス構築装置における
別名検索処理の流れを示すフローチャート
FIG. 6 is a flowchart showing the flow of an alias search process in the cross reference construction device of the present invention.

【図7】実施形態を説明するためのサンプルプログラムFIG. 7 is a sample program for explaining the embodiment.

【図8】図7のサンプルプログラムに基づいて得られた
コールグラフ
FIG. 8 is a call graph obtained based on the sample program of FIG.

【図9】図7のサンプルプログラムについて作成された
別名有向グラフ
9 is an alias directed graph created for the sample program of FIG.

【符号の説明】[Explanation of symbols]

1…クロスリファレンス構築装置 11…ソースファイル群 12…シンボル間の関係取得部 13…シンボル間の関係図 14…別名有向グラフ作成部 15…別名有向グラフ 16…注目関数指定部 17…関係検索部 18…関係情報データ 19…関係登録部 20…別名検索部 21…別名情報データ 22…別名登録部 23…連結部 24…出力部 1 ... Cross-reference construction device 11 ... Source files 12 ... Relationship acquisition unit between symbols 13 ... Relationship between symbols 14 ... Aliased directed graph creation section 15 ... Aliased directed graph 16 ... Attention function specification section 17 ... Relational search section 18 ... Related information data 19 ... Relationship registration department 20 ... alias search section 21 ... Alias information data 22 ... alias registration section 23 ... Connection part 24 ... Output unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 検索対象となる注目するシンボルを指定
する注目関数指定手段と、 前記注目するシンボルに対して特定の関係にあるシンボ
ルを取得するシンボル間の関係解析手段と、 前記注目するシンボルの別名のシンボルを取得する別名
解析手段と、 前記シンボル間の関係解析手段と別名解析手段の検索結
果を結びつける連結手段とを備えたことを特徴とするク
ロスリファレンス構築装置。
1. An attention function designating unit for designating a target symbol to be searched, a relation analysis unit between symbols for acquiring a symbol having a specific relation to the target symbol, and a target symbol for the target symbol. A cross-reference construction apparatus comprising: an alias analysis means for obtaining a symbol of an alias; and a connection means for connecting the relation analysis means between the symbols and the search result of the alias analysis means.
【請求項2】 前記別名解析手段が、 あるシンボルがどのシンボルと同じ実体を指す可能性が
あるかを表す別名有向グラフを作成する別名有向グラフ
作成部と、 前記別名有向グラフを参照して、前記注目するシンボル
を始点に別名有向グラフを正の向きにたどったときに、
たどることのできるシンボルをすべて別名として登録す
ると共に、別名として登録されたそれぞれのシンボルを
始点に、別名有向グラフを負の向きにたどったときに、
たどることのできるシンボルをすべて別名として登録
し、登録されたシンボルを前記注目するシンボルの「別
名」とする別名検索部と、を備えたことを特徴とする請
求項1に記載のクロスリファレンス構築装置。
2. An alias directed graph creating unit that creates an alias directed graph showing that a certain symbol may point to the same entity as that of the symbol, and the alias analyzing unit refers to the alias directed graph to notice the attention. When tracing the aliased directed graph in the positive direction starting from the symbol,
All the traceable symbols are registered as aliases, and when each of the symbols registered as aliases is used as the starting point and the alias directed graph is traced in the negative direction,
The cross-reference construction apparatus according to claim 1, further comprising: an alias search unit that registers all traceable symbols as aliases and uses the registered symbols as "aliases" of the symbol of interest. .
【請求項3】 検索対象となる注目するシンボルを指定
する注目関数指定処理と、 前記注目するシンボルに対して特定の関係にあるシンボ
ルを取得するシンボル間の関係解析処理と、 前記注目するシンボルの別名のシンボルを取得する別名
解析処理と、 前記シンボル間の関係解析処理と別名解析処理を実行す
ることにより得られた検索結果を結びつける連結処理と
を含むことを特徴とするクロスリファレンス構築方法。
3. A target function specifying process for specifying a target symbol to be searched, a relationship analysis process between symbols for acquiring a symbol having a specific relationship with the target symbol, and a target symbol for the target symbol. A cross-reference construction method comprising: an alias analysis processing for obtaining a symbol of an alias; and a connection processing for connecting a search result obtained by executing the relationship analysis processing between the symbols and the alias analysis processing.
【請求項4】 前記別名解析処理が、 あるシンボルがどのシンボルと同じ実体を指す可能性が
あるかを表す別名有向グラフを作成する別名有向グラフ
作成ステップと、 前記別名有向グラフを参照して、前記注目するシンボル
を始点に別名有向グラフを正の向きにたどったときに、
たどることのできるシンボルをすべて別名として登録す
ると共に、別名として登録されたそれぞれのシンボルを
始点に、別名有向グラフを負の向きにたどったときに、
たどることのできるシンボルをすべて別名として登録
し、登録されたシンボルを前記注目するシンボルの「別
名」とする別名検索ステップと、を含むことを特徴とす
る請求項3に記載のクロスリファレンス構築方法。
4. An alias directed graph creating step of creating an alias directed graph showing that a certain symbol may point to the same entity as the symbol, and the alias directed processing is performed with reference to the alias directed graph. When tracing the aliased directed graph in the positive direction starting from the symbol,
All the traceable symbols are registered as aliases, and when each of the symbols registered as aliases is used as the starting point and the alias directed graph is traced in the negative direction,
4. The cross reference construction method according to claim 3, further comprising: an alias search step of registering all traceable symbols as an alias and using the registered symbol as an “alias” of the symbol of interest.
【請求項5】 検索対象となる注目するシンボルを指定
する注目関数指定ステップと、 前記注目するシンボルに対して特定の関係にあるシンボ
ルを取得するシンボル間の関係解析ステップと、 前記注目するシンボルの別名のシンボルを取得する別名
解析ステップと、 前記シンボル間の関係解析ステップと別名解析ステップ
を実行することにより得られた検索結果を結びつける連
結ステップとを有することを特徴とするクロスリファレ
ンス構築用プログラム。
5. An attention function designating step of designating a symbol of interest to be searched, a step of analyzing a relation between symbols for obtaining a symbol having a specific relation to the symbol of interest, and a step of analyzing the symbol of interest. A cross reference construction program, comprising: an alias analysis step of obtaining a symbol of an alias, and a connection step of connecting a search result obtained by executing the relation analysis step between the symbols and the alias analysis step.
【請求項6】 前記別名解析ステップが、 あるシンボルがどのシンボルと同じ実体を指す可能性が
あるかを表す別名有向グラフを作成する別名有向グラフ
作成ステップと、 前記別名有向グラフを参照して、前記注目するシンボル
を始点に別名有向グラフを正の向きにたどったときに、
たどることのできるシンボルをすべて別名として登録す
ると共に、別名として登録されたそれぞれのシンボルを
始点に、別名有向グラフを負の向きにたどったときに、
たどることのできるシンボルをすべて別名として登録
し、登録されたシンボルを前記注目するシンボルの「別
名」とする別名検索ステップと、を有することを特徴と
する請求項5に記載のクロスリファレンス構築用プログ
ラム。
6. The alias directed graph creating step of creating an alias directed graph showing which symbol may point to the same entity as the symbol in the alias analyzing step, and the alias directed graph is referred to for the attention. When tracing the aliased directed graph in the positive direction starting from the symbol,
All the traceable symbols are registered as aliases, and when each of the symbols registered as aliases is used as the starting point and the alias directed graph is traced in the negative direction,
6. The cross reference construction program according to claim 5, further comprising: an alias search step in which all traceable symbols are registered as aliases, and the registered symbols are “alias” of the symbol of interest. .
JP2001224416A 2001-07-25 2001-07-25 Cross-reference construction device, cross-reference construction method, and cross-reference construction program Expired - Fee Related JP3887550B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001224416A JP3887550B2 (en) 2001-07-25 2001-07-25 Cross-reference construction device, cross-reference construction method, and cross-reference construction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001224416A JP3887550B2 (en) 2001-07-25 2001-07-25 Cross-reference construction device, cross-reference construction method, and cross-reference construction program

Publications (2)

Publication Number Publication Date
JP2003036170A true JP2003036170A (en) 2003-02-07
JP3887550B2 JP3887550B2 (en) 2007-02-28

Family

ID=19057572

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001224416A Expired - Fee Related JP3887550B2 (en) 2001-07-25 2001-07-25 Cross-reference construction device, cross-reference construction method, and cross-reference construction program

Country Status (1)

Country Link
JP (1) JP3887550B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010191598A (en) * 2009-02-17 2010-09-02 Mitsubishi Electric Corp Information processor, information processing method, and program
JP2013097494A (en) * 2011-10-31 2013-05-20 Mitsubishi Electric Corp Software development support device and program
WO2013105158A1 (en) * 2012-01-13 2013-07-18 パナソニック株式会社 Data-dependent analysis assistance device, data-dependent analysis assistance program and data-dependent analysis assistance method
US9087151B2 (en) 2009-02-18 2015-07-21 Mitsubishi Electric Corporation Program analysis support device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010191598A (en) * 2009-02-17 2010-09-02 Mitsubishi Electric Corp Information processor, information processing method, and program
US9087151B2 (en) 2009-02-18 2015-07-21 Mitsubishi Electric Corporation Program analysis support device
JP2013097494A (en) * 2011-10-31 2013-05-20 Mitsubishi Electric Corp Software development support device and program
WO2013105158A1 (en) * 2012-01-13 2013-07-18 パナソニック株式会社 Data-dependent analysis assistance device, data-dependent analysis assistance program and data-dependent analysis assistance method

Also Published As

Publication number Publication date
JP3887550B2 (en) 2007-02-28

Similar Documents

Publication Publication Date Title
US5946488A (en) Method for selectively and incrementally displaying the results of preprocessing
JPH09212352A (en) Program development support system
JP2788850B2 (en) Optimal menu inquiry method and editing method of structural data by hierarchical menu inquiry
KR100860963B1 (en) Apparatus and method for developing software based on component
CN111124379B (en) Page generation method and device, electronic equipment and storage medium
Bohnet et al. Visual exploration of function call graphs for feature location in complex software systems
JPH0683598A (en) Job flow specification automatic generating method
US8701086B2 (en) Simplifying analysis of software code used in software systems
JP5626333B2 (en) Program creation support apparatus, program, and information system
Mészáros et al. Delivering comprehension features into source code editors through LSP
JP3887550B2 (en) Cross-reference construction device, cross-reference construction method, and cross-reference construction program
Paakki et al. Automated hypertext support for software maintenance
JP3999949B2 (en) Alias name search apparatus, alias name search method, and alias name search program
CN114116745A (en) Interface change identification and display method, device, equipment and medium
Hofmann et al. HEX: an instruction-driven approach to feature extraction
KR100349657B1 (en) Sequence Diagram Generating Tool and Method for Analyzing Team-Developing Program
JPH11338686A (en) Program development support device, its method and medium for recording program development support program
US6564200B1 (en) Apparatus for cross referencing routines and method therefor
JP2001236243A (en) Debug method and recording medium with program for debug recorded
JPH11327889A (en) Program development supporting device and its method and recording medium recording program development supporting software
CN117573060A (en) Audio resource processing method and device, electronic equipment and storage medium
CN117453713A (en) SQL sentence generation method, device and storage medium for multi-type database
Johanna Generating Coding Exercises for Language Concepts by Searching, Simplifying, and Annotating Existing Code
JP2003177923A (en) Reserved word converting method for porting support system
JPH11237984A (en) Device and method for supporting object-oriented program design and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040319

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060523

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060724

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060829

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061019

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061127

LAPS Cancellation because of no payment of annual fees