JP2000181700A - Program analyzing device and recording medium - Google Patents

Program analyzing device and recording medium

Info

Publication number
JP2000181700A
JP2000181700A JP10361017A JP36101798A JP2000181700A JP 2000181700 A JP2000181700 A JP 2000181700A JP 10361017 A JP10361017 A JP 10361017A JP 36101798 A JP36101798 A JP 36101798A JP 2000181700 A JP2000181700 A JP 2000181700A
Authority
JP
Japan
Prior art keywords
program
variable
constant
search
specified
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
JP10361017A
Other languages
Japanese (ja)
Other versions
JP3533098B2 (en
Inventor
Shoichi Hirata
正一 平田
Keiko Kawabe
敬子 川辺
Akihiko Matsuo
昭彦 松尾
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

Abstract

PROBLEM TO BE SOLVED: To improve the efficiency of debugging, etc., by retrieving a relative variable or constant from a program according to specified exception conditions and outputting the result. SOLUTION: A direction specifying means 4 specifies a direction wherein a variable or constant in a program 6 affects other variables or constants and conditions of the exception of the variable or constant as a retrieval object and according to the specified conditions, a relative information retrieving means 11 retrieves the corresponding variable and constant from information after the exclusion from a two-term relation table 8 by an excluding means 9 and outputs a relative information list. At this time, the variable or constant as the start point of retrieval in the program 6 is specified. Further, the retrieval is performed from the specified variable or constant at the start point. Further, a constant to be excluded from the program 6 is specified. Further, whether a variable or constant to be operated is handled equally is specified by the program 6.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

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

【0002】[0002]

【従来の技術】従来、プログラムをデバッグなどする場
合、プログラム例えば図7の(A)のプログラム中から
代入命令などで関係する変数や定数をグループ化して関
連する変数や定数をリスト表示し、該当するものを修正
などするようにしていた。以下図7のプログラムにおけ
る従来の変数や定数のグループ化およびグループをもと
に関連する変数や定数の検索について簡単に説明する。
2. Description of the Related Art Conventionally, when debugging a program or the like, variables and constants related to each other by an assignment instruction or the like are grouped from a program such as the program shown in FIG. I was trying to fix what I did. Hereinafter, 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.

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

【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 FIG. 7A, the variable group (G
1) (variable MONEY has a relationship with variables MONEY1 and MONEY2 (a relationship of MONEY = MONEY1 + MONEY2), so 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) variable
TODAY, AGE, BIRTH are variables with different meanings (TODAY is today's date, AGE is user's age, BIRTH is birthday date,
AGE (age) is a variable whose meaning is different from other (date)
However, the variable MONEY is assigned to the variable group G3 (the same applies to FIG. 7B and thereafter) due to the presence of, for example, the assignment statement in FIG.
Is added to the variable group G1 and becomes the variable group G4, and the variable MONEY having a different meaning is detected from the variable TODAY.

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

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

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

【0009】[0009]

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

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

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

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

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

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

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

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

【0017】また、検索時に元と先が一致すると判定す
る検索パターンを指定し、指定された検索パターンを用
いて検索するようにしている。従って、プログラム6の
変数や定数が影響を与える方向や関連情報とするか否か
の条件、更に始点を設定し、これらに合致した変数や定
数の関連情報リストを検索して表示などすることによ
り、従来の検索結果の確認、修正に係る手間を無くし、
所望の関連を有する変数や定数のみを選択的に迅速かつ
自動的に検索して関連情報リストとして表示し、デバッ
グなどを効率的に行うことが可能となる。
Further, a search pattern for determining that the source and the destination match each other at the time of search 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 the condition and whether or not to use the related information, and further setting the starting point, searching for and displaying the related information list of the variables and constants that match these, etc. , Eliminating the hassle of reviewing and modifying traditional search results,
Only variables and constants having a desired relationship can be selectively and quickly and automatically searched and displayed as a related information list, so that debugging and the like can be efficiently performed.

【0018】[0018]

【実施例】次に、図1から図6を用いて本発明の実施の
形態および動作を順次詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments and operations of the present invention will be 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, a user input means 1 is for a user to input various data and operation instructions from a screen.

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

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

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

【0023】検索精度指定パターン5は、除外条件を適
用した後の情報をもとに検索するときのパターンであ
る。全体/選択決定手段10は、検索精度指定パターン
中から選択されたパターン(後述する図5参照)に従い
検索して表示するという選択表示、あるいは、もれなく
全体を検索して表示という全体表示するかを決定するも
のである。
The search accuracy designation pattern 5 is a pattern for performing a search based on the information after applying the exclusion condition. The whole / selection determination means 10 determines whether to perform a selection display of searching and displaying according to a pattern (see FIG. 5 described later) selected from the search accuracy designation patterns, or a whole display of searching and displaying the entirety without fail. 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 extracting and registering variables and constants that may have the same value from the program 6 and directions in which the values are transmitted (see FIGS. 3 and 4). (B)).

【0026】除外手段9は、除外条件指定手段3によっ
て指定された除外条件をもとに、2項関係テーブル8か
ら該当するものを除外するものである。関連情報検索手
段11は、除外手段9によって除外された後の2項関係
テーブル8について、始点指定手段2によって指定され
た始点の変数を始点とし、方向指定手段4によって指定
された方向に関連する変数および定数を検索し、関連情
報リスト12を生成するものである(図2を用いて後述
する)。
The exclusion unit 9 excludes a corresponding item from the binary relation table 8 based on the exclusion condition specified by the exclusion condition specification unit 3. The related information search means 11 uses the variable of the start point specified by the start point specifying means 2 as a start point in the binary relation table 8 after being excluded by the exclusion means 9, and relates to the direction specified by the direction specifying means 4. A variable and a constant are searched to generate a related information list 12 (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 variable of the specified starting point (see FIG. 4H). The display unit 13 displays a related information list on a 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 is a flowchart illustrating the operation of the present invention.

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

【0030】S2は、プログラムを読み込む。S3は、
解析する。S4は、変数と関連する変数および定数を2
項関係テーブルに設定する。これらS2、S3.S4
は、図4の(A)のプログラムを外部記憶装置から読み
込み、解析(形態素解析、構文解析など)を行い、変数
と関連する変数および定数を取り出して図4の(B)に
示すように2項関係を生成してこれを図3に示すように
2項関係テーブル8に設定する。
In step S2, a program is read. S3 is
To analyze. In step S4, variables and constants related to the variables are set to 2
Set in the term relation table. These S2, S3. S4
Reads the program of FIG. 4A from an external storage device, performs analysis (eg, morphological analysis, syntax analysis, etc.), extracts variables and constants related to the variables, and extracts the variables and constants 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, 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 X'80 'is not applicable. 3. Excluding subtraction MOVE is valid only in the forward direction. The retrieval accuracy is specified as a variable classification pattern (see FIG. 4C).

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

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

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

【0035】S10は、検索された変数を始点に指定さ
れた方向に変数を検索し、検索された変数を次の検索の
始点リストに入れる。S11は、次の検索の始点リスト
がなくなったか判別する。YESの場合には、S12で
見つかった順に変数および定数をリスト表示する。NO
の場合には、S10を繰り返す。
In step S10, the variable is searched in the specified direction with the searched variable as a starting point, and the searched variable is entered in a starting point list of the next search. In S11, it is determined whether or not there is no starting point list for the next search. In the case of YES, 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.の除外条
件)をもとに不要な行や変数を対象外にした後、指定さ
れた始点の変数から指定された方向に検索して関連する
変数および定数を見つけて関連情報リストを生成し、表
示することにより、条件で指定した有用な情報(変数と
定数)のリストを自動的に検索して表示することが可能
となる。
As described above, the program automatically
After the term relation table 8 is created, unnecessary rows and variables are excluded from the target based on the specified conditions (exclusion conditions of 1. to 5. of S5) based on the term relation table 8. List of useful information (variables and constants) specified by conditions by searching in the specified direction from the variable of the specified starting point, 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 a binary relation table according to the present invention. This binary relation table 8 is shown in FIG.
Is analyzed (morphological analysis, syntax analysis, etc.) to extract and set variables and constants, and is set by associating the following information shown in the figure.

【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.
(A) is set by analyzing the sentence on the fourth line in (A). C-BLK is a variable name. The order is the direction of assigning 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は、本発明の動作説明図(検索)を示
す。
Similarly, the binary relation table 8 shown in FIG. 3 can be automatically generated from the program shown in FIG. 4A. 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 an example of a program. FIG. 4B shows a state where a binary relation is generated. This shows a state in which the program of FIG. 4A is analyzed to generate a binary relation. Here, alphabetic characters represent variables, and X'X
X ′ (XX is an arbitrary numerical value) represents a constant, and an arrow represents a direction.

【0041】図4の(C)は、利用者指定項目を示す。
この利用者指定項目は、既述した図2のS5で指定した
ものと同じである。図4の(D)は、図4の(B)の2
項関係に対して、図4の(C)の利用者指定項目をもと
に除外した後の状態を示す。ここで、網掛け部分の変数
および定数は除外、および薄い点線にした文は除外した
ものである。
FIG. 4C shows user-specified items.
The user specification items are the same as those specified in S5 of FIG. 2 described above. (D) of FIG. 4 corresponds to 2 of (B) of FIG.
The state after the item relation is excluded based on the user designation item in FIG. 4C is shown. Here, variables and constants in shaded portions are excluded, and sentences indicated by light dotted lines are 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 start 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 association from the variable at the start point surrounded by the thick line in FIG.

【0043】図4の(G)は、図4の(F)について2
回目の検索を行った後の状態を示す。ここでは、2回の
検索で終了したので、検索結果を図4の(H)に関連情
報リストとして出力する。
FIG. 4 (G) is the same as FIG.
This shows the state after the second search. Here, since the search has been 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 result of FIG. 4G. This related information list is shown in FIG.
(G) of the search result is displayed in a list in an easy-to-view manner. As described above, the program is analyzed to generate a binary relation ((B) in FIG. 4), and it is not necessary to associate the relation based on the exclusion condition (the user-specified item in (C) in FIG. 4). After excluding variables and the like ((D) in FIG. 4), by searching for variables and constants related to the specified direction from the variable at the specified starting point and displaying them in a related information list in an easy-to-read manner, the related variables and It is possible to display a list of only constants, and to display a list of only related variables and constants searched only in the relevant direction.

【0045】図5は、本発明の動作説明図(検索パター
ン指定)を示す。これは、波及元(左から2欄目の上段
のデータサイズ)と波及先(左から2欄目の下段のデー
タサイズ)とを図示のイメージに示すように、 ・第1番目のように、波及元と波及先が完全に一致した
パターン ・第2番目のように、波及元と波及先の左側の一部とが
一致したパターン ・第3番目のように、波及元と波及先の中央の一部とが
一致したパターン ・第4番目のように、波及元と波及先の右側の一部とが
一致したパターン ・第5番目のように、波及元と複数の波及先とが一致し
たパターン ・第6番目のように、波及元と複数の波及先の一部とが
一致(波及元の末尾が波及先の右側の一部と一致)した
パターン ・第7番目のように、波及元と複数の波及先の一部とが
一致(波及元の先頭が波及先の左側の一部と一致)した
パターン ・第8番目のように、波及元と複数の波及先の一部とが
一致(波及元の先頭および末尾が波及先の左側および右
側の一部と一致)したパターン ・第9番目のように、波及元の一部分から波及先の一部
分に一致したパターンとそれぞれ分類する。そして、こ
れら分類パターン(波及パターン)について、図中の関
連種別(転記、比較、計算、再定義、ファイル、パラメ
タ、外部領域、子項目から親項目)毎にする/しないの
選択を指定することで、の選択表示を指定して検索さ
せてその結果をリスト表示することで、する/しないに
対応した関連する変数および定数のみを指定した方向に
検索した結果のリストを取得することが可能となる。ま
た、の全体表示を指定することで、もれのない検索を
行い、もれのない結果(変数および定数の関連情報)を
表示することが可能となる。
FIG. 5 is a diagram for explaining the operation of the present invention (search pattern designation). As shown in the image, 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) are as follows. A pattern in which the spillover destination and the spillover destination completely match ・ A pattern in which the spillover source matches the part on the left side of the spillover destination as in the second case ・ A third part in the center of the spillover source and the spillover destination・ A pattern in which the transmission source and a part of the right side of the transmission destination match as in the fourth pattern ・ A pattern in which the transmission source and multiple transmission destinations match as in the fifth pattern ・ No. A pattern in which the source and some of the destinations match as in the sixth (the end of the source matches the right part of the destination). ・ As in the seventh, the source and the multiple A pattern in which the part of the transmission destination matches (the beginning of the transmission source matches the part on the left side of the transmission destination) As shown in the eighth example, the pattern in which the transmission source coincides with a part of the multiple transmission destinations (the beginning and end of the transmission source coincide with the left and right parts of the transmission destination). It is classified as a pattern that matches the part of the destination from the original part. Then, for these classification patterns (spreading patterns), specify whether or not to use each related type (transfer, comparison, calculation, redefinition, file, parameter, external area, child item to parent item) in the figure. By specifying the selection display and causing the search to be performed and displaying the results in a list, it is possible to obtain a list of the results obtained by searching only the relevant variables and constants corresponding to whether or not to perform the search in the specified direction. Become. In addition, by specifying the entire display of, it is possible to perform a search without omission and display a result without omission (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 a certain 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 a CALL statement.
(B) of the program SUB1.

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

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

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

【0051】[0051]

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

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

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

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

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

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

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

【図6】本発明の他の動作説明図である。FIG. 6 is another operation explanatory diagram 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: Start point designation means 3: Exclusion condition designation means 4: Direction designation means 5: Search precision designation pattern 6: Program 7: Registration means 8: Binary relation table 9: Exclusion means 10: All / selection means 11: Related information search means 12: Related information list 13: Display means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 松尾 昭彦 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 Fターム(参考) 5B076 EC02  ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Akihiko Matsuo 4-1-1, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa F-term in Fujitsu Limited (Reference) 5B076 EC02

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】検索対象として変数あるいは定数を除外す
る条件を指定する条件指定手段と、 上記指定された除外条件をもとにプログラム中から関連
する変数または定数を検索する検索手段と上記検索され
た結果を出力する手段とを備えたことを特徴とするプロ
グラム解析装置。
1. A condition specifying means for specifying a condition for excluding a variable or a constant as a search target, a search means for searching for a related variable or constant from a program based on the specified exclusion condition, and And a means for outputting a result of the program analysis.
【請求項2】上記プログラム中から検索開始する始点と
なる変数あるいは定数を指定する指定手段を設け、 上記検索手段が上記指定された始点の変数あるいは定数
から検索することを特徴とする請求項1記載のプログラ
ム解析装置。
2. A method according to claim 1, further comprising: designating means for designating a variable or a constant as a starting point from which the search is started from the program, wherein the searching means searches from the variable or the constant at the designated starting point. A program analyzer as described.
【請求項3】上記プログラム中から除外する変数あるい
は定数を指定する指定手段を備えたことを特徴とする請
求項1あるいは請求項2記載のプログラム解析装置。
3. The program analyzing apparatus according to claim 1, further comprising a designating means for designating a variable or a constant to be excluded from the program.
【請求項4】上記プログラム中から演算対象の変数ある
いは定数を同じに扱うか否かを指定する指定手段を備え
たことを特徴とする請求項1から請求項3のいずれかに
記載のプログラム解析装置。
4. A program analysis device according to claim 1, further comprising a designation means for designating whether a variable or a constant to be operated is treated in the program as the same. apparatus.
【請求項5】上記プログラム中から命令とその方向を指
定する指定手段を備えたことを特徴とする請求項1から
請求項4のいずれかに記載のプログラム解析装置。
5. The program analyzing apparatus according to claim 1, further comprising a designating means for designating an instruction and its direction from the program.
【請求項6】上記プログラム中の変数と定数および方向
を解析して2項関係テーブルに登録する登録手段を設
け、 当該2項関係テーブルをもとに上記検索手段が検索する
ことを特徴とする請求項1から請求項5のいずれかに記
載のプログラム解析装置。
6. A registering means for analyzing variables, constants, and directions in the program and registering them in a binary relation table, wherein the retrieval means performs a search based on the binary relation table. The program analysis device according to claim 1.
【請求項7】上記検索時に元と先が一致すると判定する
検索パターンを指定する手段を設け、 上記指定された検索パターンを用いて検索することを特
徴とする請求項1から請求項6のいずれかに記載のプロ
グラム解析装置。
7. The apparatus according to claim 1, further comprising means for designating a search pattern for determining that the source and the destination match each other at the time of the search, wherein the search is performed using the specified search pattern. A program analyzer according to any one of the above.
【請求項8】プログラム中から変数あるいは定数が他の
変数あるいは定数に影響を与える方向を指定する方向指
定手段と、 検索対象として変数あるいは定数を除外する条件を指定
する条件指定手段と、 上記指定された上記方向および上記条件をもとにプログ
ラム中から該当する変数および定数を検索する検索手段
と上記検索された結果を出力する手段として機能させる
プログラムを記録したコンピュータ読取可能な記録媒
体。
8. A direction specifying means for specifying a direction in which a variable or a constant affects another variable or a constant from a program; a condition specifying means for specifying a condition for excluding a variable or a constant as a search target; A computer-readable recording medium recording a program for functioning as search means for searching for a corresponding variable and constant from a program based on the obtained direction and the conditions, and means for outputting the searched result.
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 true JP2000181700A (en) 2000-06-30
JP3533098B2 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006309666A (en) * 2005-05-02 2006-11-09 Ricoh Co Ltd Program development support device, program operation comparison method and semiconductor integrated circuit production method
US7739664B2 (en) 2002-10-17 2010-06-15 International Business Machines Corporation Collection and detection of differences of values of expressions/variables when debugging a computer process
WO2015008575A1 (en) * 2013-07-19 2015-01-22 日産自動車株式会社 Software inspection device, software inspection method, and software inspection program
JP2015088191A (en) * 2013-10-31 2015-05-07 タタ コンサルタンシー サービシズ リミテッドTATA Consultancy Services Limited System and method to facilitate user interface enabled review of static analysis warnings
US9069892B2 (en) 2013-05-10 2015-06-30 International Business Machines Corporation Reducing false-positive errors in a software change-impact analysis

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7739664B2 (en) 2002-10-17 2010-06-15 International Business Machines Corporation Collection and detection of differences of values of expressions/variables when debugging a computer process
JP2006309666A (en) * 2005-05-02 2006-11-09 Ricoh Co Ltd Program development support device, program operation comparison method and semiconductor integrated circuit production method
US8239834B2 (en) 2005-05-02 2012-08-07 Ricoh Company, Ltd. Method and system of program development supporting
US9069892B2 (en) 2013-05-10 2015-06-30 International Business Machines Corporation Reducing false-positive errors in a software change-impact analysis
US9250890B2 (en) 2013-05-10 2016-02-02 Globalfoundries Inc. Optimizing performance of a computer system in response to a software change
WO2015008575A1 (en) * 2013-07-19 2015-01-22 日産自動車株式会社 Software inspection device, software inspection method, and software inspection program
CN105556484A (en) * 2013-07-19 2016-05-04 日产自动车株式会社 Software inspection device, software inspection method, and software inspection program
JP6004110B2 (en) * 2013-07-19 2016-10-05 日産自動車株式会社 Software inspection device, software inspection method, software inspection program
JP2015088191A (en) * 2013-10-31 2015-05-07 タタ コンサルタンシー サービシズ リミテッドTATA Consultancy Services Limited System and method to facilitate user interface enabled review of static analysis warnings

Also Published As

Publication number Publication date
JP3533098B2 (en) 2004-05-31

Similar Documents

Publication Publication Date Title
JPH09138804A (en) Picture retrieving device
US5132901A (en) System and method for input of target language equivalents and determination of attribute data associated therewith
JPH05151253A (en) Document retrieving device
JP2000181700A (en) Program analyzing device and recording medium
JP2005173999A (en) Device, system and method for searching electronic file, program, and recording media
JPH07146880A (en) Document retrieval device and method therefor
JPH07306862A (en) Information retrieving method
JP3857842B2 (en) Program analysis apparatus and recording medium
JPH0635987A (en) Device and mehtod for preparing circuit diagram
JPH09101880A (en) Program analyzer
JPH05257979A (en) Data base system with keyword candidate extracting function
JP3271452B2 (en) CAD layer automatic setting method
JP2007122258A (en) Data search device, data search program or data search method
JPH05324438A (en) Data base managing device
JPH06223113A (en) Electronic filing device
JPH0644308A (en) Automatic keyword selecting method
JPH0553782A (en) System for obtaining dynamic characteristic analysis information of specified part
JP3202997B2 (en) Interactive programming system
JPH07146872A (en) Document retrieval device
JP2001282799A (en) Method and device for evaluating performance of data base, and recording medium
JP2000020293A (en) Method for retrieving specified function in program source
JPH07129622A (en) Document retrieving device
JPH05120342A (en) Keyword applying/retrieving system
JPH086779A (en) Automatic program generator
JPH0736916A (en) Image retrieval device

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