JP3533098B2 - Program analysis device and recording medium - Google Patents

Program analysis device and recording medium

Info

Publication number
JP3533098B2
JP3533098B2 JP36101798A JP36101798A JP3533098B2 JP 3533098 B2 JP3533098 B2 JP 3533098B2 JP 36101798 A JP36101798 A JP 36101798A JP 36101798 A JP36101798 A JP 36101798A JP 3533098 B2 JP3533098 B2 JP 3533098B2
Authority
JP
Japan
Prior art keywords
program
variable
constant
search
variables
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 - Lifetime
Application number
JP36101798A
Other languages
Japanese (ja)
Other versions
JP2000181700A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP36101798A priority Critical patent/JP3533098B2/en
Publication of JP2000181700A publication Critical patent/JP2000181700A/en
Application granted granted Critical
Publication of JP3533098B2 publication Critical patent/JP3533098B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プログラム中の変
数および定数を解析するプログラム解析装置および記録
媒体に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program analysis device and a recording medium for analyzing variables and constants in a program.

【0002】[0002]

【従来の技術】従来、プログラムをデバッグなどする場
合、プログラム例えば図7の(A)のプログラム中から
代入命令などで関係する変数や定数をグループ化して関
連する変数や定数をリスト表示し、該当するものを修正
などするようにしていた。以下図7のプログラムにおけ
る従来の変数や定数のグループ化およびグループをもと
に関連する変数や定数の検索について簡単に説明する。
2. Description of the Related Art Conventionally, when debugging a program, related variables and constants are grouped by a substitution instruction or the like in the program, for example, the program shown in FIG. I was trying to fix what I was doing. The conventional grouping of variables and constants in the program of FIG. 7 and retrieval of related variables and constants based on the group will be briefly described below.

【0003】図7は、従来技術の説明図を示す。図7の
(A)は、プログラム例を示す。図7の(B)は、図7
の(A)のプログラムをグループ化した例を示す。
FIG. 7 shows an explanatory view of the prior art. FIG. 7A shows a program example. FIG. 7B is a diagram of FIG.
An example of grouping the programs of (A) is shown.

【0004】(1) 図7の(A)のプログラム中の
(a)の代入文から図7の(B)の変数グループ(G
1)を作る(変数MONEYは変数MONEY1と変数MONEY2と関
連(MONEY=MONEY1+MONEY2という関連)を持っているか
らグループG1を作る)。利用者が変数MONEYと同じ意
味の変数を問い合わせると、変数グループG1を検索し
て変数MONEY1と変数MONEY2を返す。
(1) From the assignment statement of (a) in the program of (A) of FIG. 7 to the variable group (G of FIG. 7B)
1) is created (the variable MONEY has a relationship with the variables MONEY1 and MONEY2 (the relationship MONEY = MONEY1 + MONEY2), so the group G1 is created). When the user inquires a variable having the same meaning as the variable MONEY, the variable group G1 is searched and the variables MONEY1 and MONEY2 are returned.

【0005】[0005]

【発明が解決しようとする課題】しかし、(2) 変数
TODAY,AGE,BIRTHは異なる意味の変数(TODAYは今日の日
付、AGEは利用者の年令、BIRTHは誕生日の日付であり、
AGE(年令)が他のもの(日付)と異なる意味の変数)
であるが、変数に対して制御コードを設定するような例
えば図7の(A)の(c)の代入文の存在によって、変
数グループG3(図7の(B)以下同様)に変数MONEY
を含む変数グループG1を追加して変数グループG4と
なり、変数TODAYから異なる意味の変数MONEYが検出され
てしまうという問題あった。
However, (2) Variables
TODAY, AGE, BIRTH are variables with different meanings (TODAY is today's date, AGE is the age of the user, BIRTH is the date of birth,
A variable whose AGE (age) is different from other things (date)
However, due to the existence of the assignment statement of (c) of (A) of FIG. 7 which sets the control code to the variable, the variable MONEY is added to the variable group G3 (the same applies to (B) of FIG. 7).
There is a problem that a variable group G1 including "" is added to form a variable group G4, and a variable MONEY having a different meaning is detected from the variable TODAY.

【0006】(3) また、変数EDT-Zは数字項目のゼ
ロを空白に編集するための変数であり、(d)、(e)
のような文により、異なる意味の変数が代入され、変数
グループG7のように異なる意味を持つ変数が同一グル
ープとして扱かわれてしまうという問題があった。
(3) Further, the variable EDT-Z is a variable for editing the zero of the numerical item into a blank, and is (d), (e).
With such a sentence, variables having different meanings are assigned, and variables having different meanings such as the variable group G7 are treated as the same group.

【0007】上述したように、従来の図7の(B)のよ
うにプログラム中の代入文などによる変数や定数の関連
でグループ化すると、意味の異なる変数や定数と関連付
けられてしまい、検索時に意味の異なる変数や定数が検
索されてしまい、デバッグ時などに不要な意味を持たな
いものまで混在してしまったり、代入文などに含まれる
変数が影響を与える他の変数あるいは影響を受ける変数
がいずれであるかを区別できないという問題もあった。
As described above, if the groups are grouped in relation to variables and constants such as assignment statements in the program as shown in FIG. 7B, the variables and constants having different meanings are associated with each other, and at the time of retrieval. Variables and constants with different meanings will be searched, and even those that do not have unnecessary meaning will be mixed when debugging, and variables that are included in assignment statements etc. will affect other variables or variables that are affected. There was also a problem that it was not possible to distinguish which was which.

【0008】本発明は、これらの問題を解決するため、
プログラム中の変数や定数が影響を与える方向や関連情
報とするか否かの条件、更に始点を設定し、これらに合
致した変数や定数の関連情報リストを検索して表示など
し、従来の検索結果の確認、修正に係る手間を無くし、
所望の関連を有する変数や定数のみを選択的に迅速かつ
自動的に検索して関連情報リストとして表示し、デバッ
グなどを効率的に行うことを目的としている。
The present invention solves these problems by
The direction in which the variables and constants in the program affect, the condition of whether to use related information, and the start point are set, and the related information list of variables and constants that match these is searched for and displayed. Eliminates the trouble of checking and correcting results,
The purpose is to selectively and quickly and automatically retrieve only variables and constants having a desired relation and display them as a relation information list for efficient debugging.

【0009】[0009]

【課題を解決するための手段】図1を参照して課題を解
決するための手段を説明する。図1において、始点指定
手段2は、検索開始するプログラム6中の始点を指定す
るものである。
[Means for Solving the Problems] Means for solving the problems will be described with reference to FIG. In FIG. 1, the starting point designating means 2 designates the starting point in the program 6 for starting the search.

【0010】除外条件指定手段3は、プログラム6中か
ら除外する対象の変数や定数などを指定するものであ
る。方向指定手段4は、プログラム6中で変数や定数の
検索する方向を指定するものである。
The exclusion condition specifying means 3 is for specifying variables and constants to be excluded from the program 6. The direction designating means 4 is for designating a direction in which a variable or constant is searched for in the program 6.

【0011】プログラム6は、検索対象のプログラムで
ある。2項関係テーブル8は、プログラム6から変数と
定数およびその方向などを取り出して登録したものであ
る。
The program 6 is a program to be searched. The binary relation table 8 is obtained by extracting and registering variables and constants and their directions from the program 6.

【0012】関連情報検索手段11は、2項関係テーブ
ル8から除外条件に該当するものを除いた情報中から変
数および定数などを検索して関連情報リストを生成する
ものである。
The related information retrieving means 11 retrieves variables and constants from information excluding those corresponding to the exclusion condition from the binary relation table 8 to generate a related information list.

【0013】次に、動作を説明する。方向指定手段4が
プログラム6中から変数あるいは定数について他の変数
あるいは定数に影響を与える方向を指定、および検索対
象として変数あるいは定数を除外する条件を指定し、関
連情報検索手段11が指定された条件をもとに、除外手
段9によって2項関係テーブル8から除外された後の情
報から該当する変数および定数を検索し、関連情報リス
トを出力するようにしている。
Next, the operation will be described. The direction designating means 4 designates the direction influencing another variable or constant with respect to the variable or constant from the program 6 and the condition for excluding the variable or constant from the search target, and the related information searching means 11 is designated. Based on the conditions, the excluding means 9 searches the relevant variables and constants from the information after being excluded from the binary relation table 8 and outputs the related information list.

【0014】この際、プログラム6中から検索開始する
始点となる変数あるいは定数を指定するようにしてい
る。また、指定された始点の変数あるいは定数から検索
するようにしている。
At this time, a variable or a constant serving as a starting point for starting the search from the program 6 is designated. Also, the search is performed from the specified starting point variable or constant.

【0015】また、プログラム6中から除外する変数あ
るいは定数を指定するようにしている。また、プログラ
ム6中から演算対象の変数あるいは定数を同じに扱うか
否かを指定するようにしている。
Further, variables or constants to be excluded from the program 6 are designated. Further, whether or not the variables or constants to be calculated are treated in the same manner is specified from the program 6.

【0016】また、プログラム6中から命令とその方向
を指定するようにしている。また、プログラム6中の変
数と定数および方向を解析して2項関係テーブル8に登
録し、当該2項関係テーブル8をもとに除外条件に合致
するものを除外し、除外後の情報をもとに検索して関連
情報リストを出力するようにしている。
Further, an instruction and its direction are specified from the program 6. In addition, variables, constants, and directions in the program 6 are analyzed and registered in the binary relation table 8, those that meet the exclusion conditions are excluded based on the binary relation table 8, and information after exclusion is also included. It is designed to search for and output the related information list.

【0017】また、検索時に元と先が一致すると判定す
る検索パターンを指定し、指定された検索パターンを用
いて検索するようにしている。従って、プログラム6の
変数や定数が影響を与える方向や関連情報とするか否か
の条件、更に始点を設定し、これらに合致した変数や定
数の関連情報リストを検索して表示などすることによ
り、従来の検索結果の確認、修正に係る手間を無くし、
所望の関連を有する変数や定数のみを選択的に迅速かつ
自動的に検索して関連情報リストとして表示し、デバッ
グなどを効率的に行うことが可能となる。
Further, at the time of search, a search pattern for determining that the source and the destination match is specified, and the search is performed using the specified search pattern. Therefore, by setting the direction in which the variables and constants of the program 6 affect and the related information, and the starting point, and searching and displaying the related information list of variables and constants that match these , Eliminates the trouble of checking and correcting the conventional search results,
Only variables and constants having a desired relationship can be selectively and quickly searched automatically and displayed as a related information list, and debugging and the like can be efficiently performed.

【0018】[0018]

【実施例】次に、図1から図6を用いて本発明の実施の
形態および動作を順次詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an embodiment and an operation of the present invention will be sequentially described in detail with reference to FIGS.

【0019】図1は、本発明のシステム構成図を示す。
図1において、ユーザ入力手段1は、利用者が画面上か
ら各種データや操作指示を入力するものである。
FIG. 1 shows a system configuration diagram of the present invention.
In FIG. 1, the user input means 1 is for a user to input various data and operation instructions from the screen.

【0020】始点指定手段2は、検索開始するプログラ
ム6中の始点を指定するものであって、例えば後述する
図4の(A)のプログラム中の開始する変数「MONEY」,「N
UMBER」を指定するものである。
The starting point designating means 2 is for designating the starting point in the program 6 for starting the search, and for example, the variables "MONEY", "N" to be started in the program of FIG.
UMBER "is specified.

【0021】除外条件指定手段3は、プログラム6中か
ら除外する対象の変数や定数などを指定するものであっ
て、例えば後述する図4の(A)のプログラム中の定数
X'80'を指定するものである。
The exclusion condition designating means 3 is for designating variables and constants to be excluded from the program 6, and is, for example, a constant in the program of FIG.
It specifies X'80 '.

【0022】方向指定手段4は、プログラム6中から検
索する方向を指定するものであって、順方向あるいは逆
方向などを指定するものである。ここで、順方向の指定
は、指定された変数が影響を与える変数あるいは定数を
検索し出力するという指定である。逆方向の指定は、指
定された変数が影響を受ける変数あるいは定数を検索し
て出力するという指定である。
The direction designating means 4 is for designating a direction to be searched from the program 6, and is for designating a forward direction or a reverse direction. Here, the designation in the forward direction is a designation to search for and output a variable or constant affected by the designated variable. The designation in the reverse direction is a designation to search for and output a variable or constant affected by the designated variable.

【0023】検索精度指定パターン5は、除外条件を適
用した後の情報をもとに検索するときのパターンであ
る。全体/選択決定手段10は、検索精度指定パターン
中から選択されたパターン(後述する図5参照)に従い
検索して表示するという選択表示、あるいは、もれなく
全体を検索して表示という全体表示するかを決定するも
のである。
The search accuracy designation pattern 5 is a pattern used when a search is performed based on the information after applying the exclusion condition. The whole / selection determining means 10 determines whether to perform a selection display of searching and displaying according to a pattern (see FIG. 5 to be described later) selected from the search accuracy designating patterns, or a whole display of searching and displaying the whole without exception. To decide.

【0024】プログラム6は、検索対象のプログラムで
ある。登録手段7は、プログラム6中から変数、定数お
よびその方向を抽出して2項関係テーブル8に登録する
ものである(図3、および図4の(A)と(B)参
照)。
The program 6 is a program to be searched. The registration means 7 extracts variables, constants and their directions from the program 6 and registers them in the binary relation table 8 (see FIGS. 3 and 4A and 4B).

【0025】2項関係テーブル8は、プログラム6から
同一の値を持つ可能性がある変数や定数、およびその値
が伝達される方向などを取り出して登録したものである
(図3、図4の(B)参照)。
The binary relation table 8 is obtained by registering variables and constants that may have the same value from the program 6 and the direction in which the value is transmitted (see FIGS. 3 and 4). (See (B)).

【0026】除外手段9は、除外条件指定手段3によっ
て指定された除外条件をもとに、2項関係テーブル8か
ら該当するものを除外するものである。関連情報検索手
段11は、除外手段9によって除外された後の2項関係
テーブル8について、始点指定手段2によって指定され
た始点の変数を始点とし、方向指定手段4によって指定
された方向に関連する変数および定数を検索し、関連情
報リスト12を生成するものである(図2を用いて後述
する)。
The excluding means 9 excludes the corresponding ones from the binary relation table 8 based on the excluding conditions specified by the excluding condition specifying means 3. The related information search means 11 uses the variable of the starting point designated by the starting point designating means 2 as a starting point in the binary relation table 8 after being excluded by the excluding means 9, and relates to the direction designated by the direction designating means 4. A variable and a constant are searched for and the related information list 12 is generated (described later with reference to FIG. 2).

【0027】関連情報リスト12は、指定された始点の
変数をもとに、指定された方向に検索した関連情報のリ
ストである(図4の(H)参照)。表示手段13は、関
連情報リストを画面上に表示するものである。
The related information list 12 is a list of related information searched in the specified direction based on the specified start point variable (see (H) in FIG. 4). The display means 13 displays the related information list on the screen.

【0028】次に、図2のフローチャートの順番に従い
図1の構成の動作を詳細に説明する。図2は、本発明の
動作説明フローチャートを示す。
Next, the operation of the configuration of FIG. 1 will be described in detail according to the order of the flowchart of FIG. FIG. 2 shows a flowchart for explaining the operation of the present invention.

【0029】図2において、S1は、除外定数のファイ
ルを作成する。例えば右側に記載したように、 ・除外定数:X’80’、X’8F’ を除外定数のファイルとして作成する。
In FIG. 2, S1 creates a file of exclusion constants. For example, as described on the right side: -Exclusion constants: X'80 'and X'8F' are created as a file of exclusion constants.

【0030】S2は、プログラムを読み込む。S3は、
解析する。S4は、変数と関連する変数および定数を2
項関係テーブルに設定する。これらS2、S3.S4
は、図4の(A)のプログラムを外部記憶装置から読み
込み、解析(形態素解析、構文解析など)を行い、変数
と関連する変数および定数を取り出して図4の(B)に
示すように2項関係を生成してこれを図3に示すように
2項関係テーブル8に設定する。
In step S2, the program is read. S3 is
To analyze. In S4, the variables and constants related to the variables are set to 2
Set in the term relation table. These S2, S3. S4
4 reads the program of FIG. 4A from an external storage device, analyzes it (morphological analysis, syntactic analysis, etc.), extracts variables and constants related to the variables, and outputs them as shown in FIG. A term relation is generated and set in the binary relation table 8 as shown in FIG.

【0031】S5は、画面上から条件をファイルを使っ
て指定する。例えば右側に記載したように、利用者指定
項目としてここでは、 1.MONEYから全方向、NUMBERから順方向 2.X'80'は対象外 3.減算を除く 4.MOVEは順方向のみ有効 5.検索精度は変数分類パターン とそれぞれ指定する(図4の(C)参照)。
In step S5, the conditions are specified on the screen using a file. For example, as described on the right side, here, as user specified items, 1. All directions from MONEY, forward from NUMBER 2. X'80 'is not applicable 3. Excluding subtraction 4. MOVE is valid only in the forward direction 5. The retrieval accuracy is designated as the variable classification pattern (see FIG. 4C).

【0032】S6は、指定された定数に対応する変数を
対象外に設定する。例えばS5の2.で定数X'80'を対
象外と指定したので、これに対応して、図4の(D)の
1行目の文を網掛けしたように対象外に設定する。
In step S6, the variable corresponding to the designated constant is set outside the target. For example, in S5, 2. Since the constant X'80 'was designated as not subject in, correspondingly, it is set as not subject to the sentence in the first line of FIG. 4D as shaded.

【0033】S7は、指定された演算子を含む行を削除
する。これは、S5で指定された演算子、例えば「3.
減算を除く」で指定された演算子である減算を含む行を
除く。S8は、指定された命令の指定された方向を無効
化する。これは、S5で指定された命令、例えば「4.M
OVEは順方向のみ有効」として指定された以外の命令MOVE
の逆方向を無効にする(図4の(E)の第5行目から第
10行目の命令MOVEの逆方向を無効にする)。
In step S7, the line including the designated operator is deleted. This is the operator specified in S5, for example, "3.
Excludes lines that include the subtraction operator specified in Exclude Subtraction. S8 invalidates the designated direction of the designated command. This is the command specified in S5, for example "4.M.
Commands other than those specified as "OVE is valid only in the forward direction"
(The reverse direction of the instruction MOVE on the 5th to 10th lines in FIG. 4E is invalidated).

【0034】S9は、始点から指定された方向へ関係す
る除外されていない変数および定数を検索する。これ
は、S5の「1.MONEYから全方向、NUMBERから順方向」
で指定されたように、 ・始点の変数MONEYから全方向(順方向と逆方向の両方
向)に検索 ・始点の変数NUMBERから順方向に検索を行う。
S9 retrieves non-excluded variables and constants related to the specified direction from the starting point. This is S5 "1. All directions from MONEY, forward from NUMBER"
As specified in, -Search from the starting point variable MONEY in all directions (both forward and backward) -Search from the starting point variable NUMBER in the forward direction.

【0035】S10は、検索された変数を始点に指定さ
れた方向に変数を検索し、検索された変数を次の検索の
始点リストに入れる。S11は、次の検索の始点リスト
がなくなったか判別する。YESの場合には、S12で
見つかった順に変数および定数をリスト表示する。NO
の場合には、S10を繰り返す。
In step S10, the searched variable is searched for in the direction specified by the starting point, and the searched variable is placed in the starting point list for the next search. In S11, it is determined whether or not there is no list of starting points for the next search. If YES, the variables and constants are displayed in a list in the order found in S12. NO
In the case of, S10 is repeated.

【0036】以上によって、プログラムから自動的に2
項関係テーブル8を作成し、この2項関係テーブル8を
もとに、指定された条件(S5の1.から5.の除外条
件)をもとに不要な行や変数を対象外にした後、指定さ
れた始点の変数から指定された方向に検索して関連する
変数および定数を見つけて関連情報リストを生成し、表
示することにより、条件で指定した有用な情報(変数と
定数)のリストを自動的に検索して表示することが可能
となる。
By the above, the program automatically sets 2
After creating the term relation table 8 and excluding unnecessary rows and variables based on the specified conditions (exclusion conditions from 1 to 5 of S5) based on the binomial relation table 8 , A list of useful information (variables and constants) specified by conditions by searching in the specified direction from the specified starting point variable, finding related variables and constants, and generating and displaying a related information list. Can be automatically searched and displayed.

【0037】図3は、本発明の2項関係テーブル例を示
す。この2項関係テーブル8は、後述する図4の(A)
のプログラムを解析(形態素解析、構文解析など)して
変数と定数を抽出して設定したものであり、図示の下記
の情報を対応付けて設定したものである。
FIG. 3 shows an example of the binary relation table of the present invention. This binary relation table 8 is shown in FIG.
The program is analyzed (morphological analysis, syntactic analysis, etc.) to extract and set variables and constants, and the following information shown in the figure is set in association with each other.

【0038】 この2項関係テーブル8は、図4の(A)のプログラム
から自動生成したものであって、例えば1行目は、図4
の(A)の4行目の文を解析して設定したものであり、 ・C−BLKは変数名であり ・順は定数X’80’を変数C−BLKに代入する方向
(順方向)であり ・変数2/定数の変数名X’80’は定数の値であり ・VALUEは文種であり ・500は行番号である。
[0038] This binary relation table 8 is automatically generated from the program of FIG. 4A, and the first line is, for example, as shown in FIG.
It is set by analyzing the sentence in the fourth line of (A) of (1), C-BLK is a variable name, and the order is to assign the constant X'80 'to the variable C-BLK (forward direction). -Variable 2 / constant variable name X'80 'is a constant value-VALUE is a sentence type-500 is a line number.

【0039】以下同様にして図4の(A)のプログラム
から図3の2項関係テーブル8を自動生成することが可
能となる。図4は、本発明の動作説明図(検索)を示
す。
In the same manner, the binary relation table 8 of FIG. 3 can be automatically generated from the program of FIG. 4 (A). FIG. 4 shows an operation explanatory diagram (search) of the present invention.

【0040】図4の(A)は、プログラム例を示す。図
4の(B)は、2項関係を生成した様子を示す。これ
は、図4の(A)のプログラムを解析して2項関係を生
成した状態を示す。ここで、英字は変数を表し、X’X
X’(XXは任意の数値)は定数を表し、矢印は方向を
表す。
FIG. 4A shows a program example. FIG. 4B shows how a binary relation is generated. This shows a state in which the program in FIG. 4A is analyzed and a binary relation is generated. Here, the letters represent variables, X'X
X '(XX is an arbitrary numerical value) represents a constant, and the arrow represents a direction.

【0041】図4の(C)は、利用者指定項目を示す。
この利用者指定項目は、既述した図2のS5で指定した
ものと同じである。図4の(D)は、図4の(B)の2
項関係に対して、図4の(C)の利用者指定項目をもと
に除外した後の状態を示す。ここで、網掛け部分の変数
および定数は除外、および薄い点線にした文は除外した
ものである。
FIG. 4C shows user-specified items.
The user designation items are the same as those designated in S5 of FIG. 2 described above. 4D is the same as 2B in FIG.
4C shows a state after exclusion based on the user designation item of FIG. Here, the shaded variables and constants are excluded, and the sentence with a thin dotted line is excluded.

【0042】図4の(E)は、図4の(C)の利用者指
定項目で指定された始点の変数(MONEY,NUMBER)を見つ
けて太線で囲んだ状態を示す。図4の(F)は、図4の
(E)の太線で囲んだ始点の変数から初回の関連を検索
した結果を太線で示す。
FIG. 4E shows a state in which the variable (MONEY, NUMBER) at the starting point designated by the user designation item in FIG. 4C is found and surrounded by a thick line. FIG. 4F shows the result of searching for the first-time association from the variable at the starting point surrounded by the bold line in FIG. 4E by the bold line.

【0043】図4の(G)は、図4の(F)について2
回目の検索を行った後の状態を示す。ここでは、2回の
検索で終了したので、検索結果を図4の(H)に関連情
報リストとして出力する。
FIG. 4G shows the same as FIG.
The state after the second search is shown. Here, since the search is completed twice, the search result is output as the related information list in (H) of FIG.

【0044】図4の(H)は、図4の(G)の検索結果
の関連情報リストを示す。この関連情報リストは、図4
の(G)の検索結果を見やすくリスト表示したものであ
る。以上のように、プログラムを解析して2項関係を生
成し(図4の(B)),除外条件(図4の(C)の利用
者指定項目)をもとに関連を持たせなくない変数などを
除外した後(図4の(D))、指定された始点の変数か
ら指定された方向に関連する変数および定数を検索して
関連情報リストとして見やすく表示することで、関連す
る変数および定数のみのリストを表示したり、更に関連
する方向に対してのみ検索した関連する変数および定数
のみのリストを表示したりすることが可能となる。
FIG. 4H shows a related information list of the search results of FIG. This related information list is shown in Figure 4.
(G) is a list display in an easy-to-see manner. As described above, the program is analyzed to generate the binary relation ((B) in FIG. 4), and the relation is not established based on the exclusion condition (user specified item in (C) in FIG. 4). After excluding variables and the like ((D) of FIG. 4), by searching for variables and constants related to the specified direction from the variables of the specified start point and displaying them in a readable manner as a related information list, It is possible to display a list of only constants, or a list of only relevant variables and constants searched for only in the relevant direction.

【0045】図5は、本発明の動作説明図(検索パター
ン指定)を示す。これは、波及元(左から2欄目の上段
のデータサイズ)と波及先(左から2欄目の下段のデー
タサイズ)とを図示のイメージに示すように、 ・第1番目のように、波及元と波及先が完全に一致した
パターン ・第2番目のように、波及元と波及先の左側の一部とが
一致したパターン ・第3番目のように、波及元と波及先の中央の一部とが
一致したパターン ・第4番目のように、波及元と波及先の右側の一部とが
一致したパターン ・第5番目のように、波及元と複数の波及先とが一致し
たパターン ・第6番目のように、波及元と複数の波及先の一部とが
一致(波及元の末尾が波及先の右側の一部と一致)した
パターン ・第7番目のように、波及元と複数の波及先の一部とが
一致(波及元の先頭が波及先の左側の一部と一致)した
パターン ・第8番目のように、波及元と複数の波及先の一部とが
一致(波及元の先頭および末尾が波及先の左側および右
側の一部と一致)したパターン ・第9番目のように、波及元の一部分から波及先の一部
分に一致したパターンとそれぞれ分類する。そして、こ
れら分類パターン(波及パターン)について、図中の関
連種別(転記、比較、計算、再定義、ファイル、パラメ
タ、外部領域、子項目から親項目)毎にする/しないの
選択を指定することで、の選択表示を指定して検索さ
せてその結果をリスト表示することで、する/しないに
対応した関連する変数および定数のみを指定した方向に
検索した結果のリストを取得することが可能となる。ま
た、の全体表示を指定することで、もれのない検索を
行い、もれのない結果(変数および定数の関連情報)を
表示することが可能となる。
FIG. 5 shows an operation explanatory diagram (search pattern designation) of the present invention. This is as shown in the image of the transmission source (upper data size in the second column from the left) and the transmission destination (lower data size in the second column from the left). The pattern in which the transmission and the destination completely match ・ As in the second, the pattern in which the source and the part on the left side of the destination match ・ As in the third, the part in the center of the source and the destination Patterns that match with ・ The fourth pattern that the source and the right part of the destination match, ・ The fifth pattern that the source and multiple destinations match ・ The fifth pattern A pattern in which the ripple source and a part of multiple ripple destinations match (the end of the ripple source matches a part of the right side of the ripple destination) like the sixth. Pattern No. 8 that matches a part of the ripple destination (the beginning of the ripple source matches a part of the left side of the ripple destination) Like the eye, a pattern in which the ripple source and some of the ripple destinations match (the beginning and end of the ripple source match parts of the left and right sides of the ripple destination) ・ As in the ninth pattern, the ripple source We classify each pattern as a pattern that matches a part of the spread destination. Then, for these classification patterns (spread patterns), specify whether to select each related type (transfer, comparison, calculation, redefinition, file, parameter, external area, child item to parent item) in the figure. It is possible to obtain a list of the search results in the specified direction only for the related variables and constants that correspond to whether or not to search by specifying the selective display of and search. Become. Also, by designating the whole display of, it becomes possible to perform a search without fail and display the results without fail (related information of variables and constants).

【0046】図6は、本発明の他の動作説明図を示す。
これは、あるプログラムから他のプログラムを呼び出し
たときの変数および定数の関連情報リストを求めて表示
するときの例である。
FIG. 6 shows another operation explanatory diagram of the present invention.
This is an example of obtaining and displaying a related information list of variables and constants when one program calls another program.

【0047】図6の(A)は、呼び出し元のプログラム
(親プログラム)の例を示す。ここでは、図示のプログ
ラムPROGRAM1は、CALL文で子プログラムである図6
の(B)のプログラムSUB1を呼び出すものである。
FIG. 6A shows an example of a calling program (parent program). Here, the illustrated program PROGRAM1 is a child program in the CALL statement.
(B) program SUB1 is called.

【0048】図6の(B)は、呼び出されるプログラム
(子プログラム)の例を示す。図6の(C)は、図6の
(A),(B)を解析して生成した2項関係テーブル8
を示す。
FIG. 6B shows an example of a called program (child program). 6C is a binary relation table 8 generated by analyzing FIGS. 6A and 6B.
Indicates.

【0049】図6の(D)は、検索した関連項目リスト
を示す。これは、図6の(C)の2項関係テーブル8に
ついて、始点の変数Aから検索して関連する変数および
定数を見つけてリスト表示したものである。
FIG. 6D shows the retrieved related item list. In the binary relation table 8 of FIG. 6C, the variable A at the starting point is searched to find related variables and constants and displayed as a list.

【0050】以上のように、複数のプログラム間で関係
がある場合にも、図1から図5を用いて説明したと同様
に、複数のプログラムの2項関係テーブル8を生成し、
この2項関係テーブル8をもとに指定された条件に従い
変数/定数を除外した後、指定された条件に従い検索し
て関連する変数および定数を見つけて関連情報リストと
して表示することが可能となる。
As described above, even when there is a relationship between a plurality of programs, the binary relation table 8 of a plurality of programs is generated in the same manner as described with reference to FIGS. 1 to 5.
After excluding the variable / constant according to the specified condition based on the binary relation table 8, it becomes possible to find the related variable and constant by searching according to the specified condition and display them as the related information list. .

【0051】[0051]

【発明の効果】以上説明したように、本発明によれば、
プログラムの変数や定数が影響を与える方向や関連情報
とするか否かの条件、更に始点を設定し、これらに合致
した変数や定数の関連情報リストを検索して表示などす
る構成を採用しているため、検索方向、条件を指定して
関連する変数や定数のみを検索して表示などすること
で、従来の検索結果の確認、修正に係る手間を無くし、
所望の関連を有する変数や定数のみを選択的に迅速かつ
自動的に検索して関連情報リストとして表示し、デバッ
グなどを効率的に行うことができる。
As described above, according to the present invention,
It adopts a configuration in which the direction in which the variables and constants of the program affect and the condition of whether to use related information and the start point are set, and the related information list of variables and constants that match these is searched and displayed. Therefore, by specifying the search direction and conditions and searching and displaying only related variables and constants, you can eliminate the trouble of checking and correcting the conventional search results.
Only variables and constants having a desired relationship can be selectively and quickly searched automatically and displayed as a related information list for efficient debugging and the like.

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

【図1】本発明のシステム構成図である。FIG. 1 is a system configuration diagram of the present invention.

【図2】本発明の動作説明フローチャートである。FIG. 2 is a flowchart explaining the operation of the present invention.

【図3】本発明の2項関係テーブル例である。FIG. 3 is an example of a binary relation table of the present invention.

【図4】本発明の動作説明図(検索)である。FIG. 4 is an operation explanatory diagram (search) of the present invention.

【図5】本発明の動作説明図(検索パターン指定)であ
る。
FIG. 5 is an operation explanatory view (search pattern designation) of the present invention.

【図6】本発明の他の動作説明図である。FIG. 6 is another operation explanatory view of the present invention.

【図7】従来技術の説明図である。FIG. 7 is an explanatory diagram of a conventional technique.

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

1:ユーザ入力手段 2:始点指定手段 3:除外条件指定手段 4:方向指定手段 5:検索精度指定パターン 6:プログラム 7:登録手段 8:2項関係テーブル 9:除外手段 10:全体/選択手段 11:関連情報検索手段 12:関連情報リスト 13:表示手段 1: User input means 2: Starting point designating means 3: Exclusion condition specifying means 4: Direction designating means 5: Search accuracy specification pattern 6: Program 7: Registration means 8: 2 relation table 9: Exclusion means 10: Whole / selection means 11: Related information search means 12: Related information list 13: Display means

フロントページの続き (56)参考文献 特開 平6−222913(JP,A) Bibliotheca,日本,株式 会社日立製作所,1995年 3月31日,第 4版,p4 ボーランド ラッセル,Micros oft Word97 オフィシャルマニ ュアル,日本,株式会社アスキー,1997 年 5月11日,初版,p97−99 (58)調査した分野(Int.Cl.7,DB名) G06F 9/06 G06F 11/28 Continuation of the front page (56) Reference JP-A-6-222913 (JP, A) Biotheca, Japan, Hitachi, Ltd., March 31, 1995, 4th edition, p4 Borland Russell, Micros of Word97 Official Manual , Japan, ASCII Corporation, May 11, 1997, first edition, p97-99 (58) Fields investigated (Int.Cl. 7 , DB name) G06F 9/06 G06F 11/28

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】プログラム中から検索対象として変数ある
いは定数を除外する条件を指定する条件指定手段と、上記プログラム中から命令と定数および方向を解析して
2項関係テーブルに登録する手段と、 上記2項関係テーブルをもとに上記プログラム中から関
連する変数あるいは定数を検索する検索手段と、 上記検索された結果を出力する手段とを備えたことを特
徴とするプログラム解析装置。
1. A condition specifying means for specifying a condition for excluding a variable or a constant from a program as a search target, and an instruction, a constant and a direction are analyzed from the program.
A means for registering in the binary relation table , a searching means for searching the related variable or constant in the program based on the binary relation table , and a means for outputting the searched result. Characteristic program analysis device.
【請求項2】上記プログラム中から検索開始する始点と
なる変数あるいは定数を指定する指定手段を設け、 上記検索手段が上記指定された始点の変数あるいは定数
から検索することを特徴とする請求項1記載のプログラ
ム解析装置。
2. A specifying means for specifying a variable or a constant as a starting point for starting a search from the program, and the searching means searches from the variable or the constant at the specified starting point. The program analysis device described.
【請求項3】上記プログラム中から除外する変数あるい
は定数を指定する指定手段を備えたことを特徴とする請
求項1あるいは請求項2記載のプログラム解析装置。
3. The program analyzing apparatus according to claim 1, further comprising a specifying unit for specifying a variable or a constant to be excluded from the program.
【請求項4】上記プログラム中から命令とその方向を指
定する指定手段を備えたことを特徴とする請求項1から
請求項3のいずれかに記載のプログラム解析装置。
4. The program analyzing apparatus according to claim 1, further comprising a specifying unit that specifies an instruction and its direction from the program.
【請求項5】上記検索時に波及元と波及先が一致すると
判定する検索パターンを指定する手段を設け、 上記指定された検索パターンを用いて検索する ことを特
徴とする請求項1から請求項4のいずれかに記載のプロ
グラム解析装置。
5. When the ripple source and the ripple destination match at the time of the above search
Means that specifies the determined search pattern provided, the program analyzing device according to any one of claims 1 to 4, characterized in that the search using the search pattern is the specified.
【請求項6】プログラム中から検索対象として変数ある
いは定数を除外する条件を指定する条件指定手段と、上記プログラム中から命令と定数および方向を解析して
2項関係テーブルに登録する手段と、 上記2項関係テーブルをもとにプログラム中から該当す
る変数あるいは定数を検索する検索手段と、 上記検索された結果を出力する手段として機能させるプ
ログラムを記録したコンピュータ読取可能な記録媒体。
6. A condition designating means for designating a condition for excluding a variable or a constant as a search target from a program, and analyzing an instruction, a constant and a direction from the program.
The means for registering in the binary relation table , the searching means for searching the corresponding variable or constant in the program based on the binary relation table , and the program for functioning as the means for outputting the searched result are recorded. Computer-readable recording medium.
JP36101798A 1998-12-18 1998-12-18 Program analysis device and recording medium Expired - Lifetime JP3533098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP36101798A JP3533098B2 (en) 1998-12-18 1998-12-18 Program analysis device and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP36101798A JP3533098B2 (en) 1998-12-18 1998-12-18 Program analysis device and recording medium

Publications (2)

Publication Number Publication Date
JP2000181700A JP2000181700A (en) 2000-06-30
JP3533098B2 true JP3533098B2 (en) 2004-05-31

Family

ID=18471845

Family Applications (1)

Application Number Title Priority Date Filing Date
JP36101798A Expired - Lifetime JP3533098B2 (en) 1998-12-18 1998-12-18 Program analysis device and recording medium

Country Status (1)

Country Link
JP (1) JP3533098B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2408457A1 (en) 2002-10-17 2004-04-17 Ibm Canada Limited-Ibm Canada Limitee Collection and detection of differences of values of expressions/variables when debugging a computer process
JP4774237B2 (en) 2005-05-02 2011-09-14 株式会社リコー Program development support apparatus, program operation comparison method, and semiconductor integrated circuit manufacturing method
US9069892B2 (en) 2013-05-10 2015-06-30 International Business Machines Corporation Reducing false-positive errors in a software change-impact analysis
WO2015008575A1 (en) * 2013-07-19 2015-01-22 日産自動車株式会社 Software inspection device, software inspection method, and software inspection program
IN2013MU03461A (en) * 2013-10-31 2015-07-17 Tata Consultancy Services Ltd

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Bibliotheca,日本,株式会社日立製作所,1995年 3月31日,第4版,p4
ボーランド ラッセル,Microsoft Word97 オフィシャルマニュアル,日本,株式会社アスキー,1997年 5月11日,初版,p97−99

Also Published As

Publication number Publication date
JP2000181700A (en) 2000-06-30

Similar Documents

Publication Publication Date Title
JP2001051761A (en) Automatic color contrast adjuster
US6993711B1 (en) Style-sheet output apparatus and method, and style-sheet output system
JP3533098B2 (en) Program analysis device and recording medium
JPH1145163A (en) Information processor and information processing method
US5302967A (en) Figure processing apparatus and method aided by display with ruled lines
US20050022170A1 (en) Visual debugging interface
JPH0667838A (en) Display processor
JPH07271810A (en) Method for retrieving information of graphic parts
JP3493869B2 (en) Image editing device
JP2845897B2 (en) Document search / display method and apparatus
JP3271452B2 (en) CAD layer automatic setting method
JPH05257979A (en) Data base system with keyword candidate extracting function
JP2842511B2 (en) Form creation device
JP2633698B2 (en) Information analysis system processing result display method
JPH0728792A (en) Method and device for documentation
JPS6033625A (en) Conversational information retrieving device
JPH08202859A (en) Electronic filing device and its method
JP2753015B2 (en) Attribute input method
JPH06242818A (en) Method and device for retrieving nc data using display screen
JP2613226B2 (en) How to edit formula input
JPH086779A (en) Automatic program generator
JPH05151195A (en) Kanji input device
JPH04358267A (en) Cad drawing display device
JPH05108741A (en) Circuit diagram editing device
JPH0785078A (en) System for displaying image data

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20031202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040130

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040305

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080312

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090312

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100312

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100312

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110312

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110312

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120312

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140312

Year of fee payment: 10

EXPY Cancellation because of completion of term