Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3544462B2 - Source program analysis device and computer-readable recording medium storing source program analysis program - Google Patents
[go: Go Back, main page]

JP3544462B2 - Source program analysis device and computer-readable recording medium storing source program analysis program - Google Patents

Source program analysis device and computer-readable recording medium storing source program analysis program Download PDF

Info

Publication number
JP3544462B2
JP3544462B2 JP29308097A JP29308097A JP3544462B2 JP 3544462 B2 JP3544462 B2 JP 3544462B2 JP 29308097 A JP29308097 A JP 29308097A JP 29308097 A JP29308097 A JP 29308097A JP 3544462 B2 JP3544462 B2 JP 3544462B2
Authority
JP
Japan
Prior art keywords
output
message
source program
suppressed
indication message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP29308097A
Other languages
Japanese (ja)
Other versions
JPH11134187A (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 JP29308097A priority Critical patent/JP3544462B2/en
Publication of JPH11134187A publication Critical patent/JPH11134187A/en
Application granted granted Critical
Publication of JP3544462B2 publication Critical patent/JP3544462B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は,ソースプログラムの解析により指摘メッセージを出力する機能を有するソースプログラム解析装置およびソースプログラム解析プログラムを記録したコンピュータ読み取り可能な記録媒体に関する。
【0002】
【従来の技術】
従来のソースプログラム解析においては,ソースプログラム中の問題箇所や注意すべき箇所を指摘する指摘メッセージは全て出力されていた。このため,ある指摘メッセージについては,意図的なものであって指摘メッセージの出力を望まないものであっても出力されたり,また,指摘メッセージの出力は機械的に処理されるため,適切でない指摘メッセージや不必要な指摘メッセージも出力されてしまうことがあった。
【0003】
一方,このような画一的な処理を改善するため,例えば,UNIXの標準的なツールとして知られている“lint”のように,ソースプログラムの記述に所定の抑止情報を付与し,その抑止情報がある部分についての指摘メッセージは出力しないようにするものがあった。
【0004】
このように,従来のソースプログラム解析の際の指摘メッセージの出力は,抑止することなく全ての指摘メッセージを出力するか,または抑止情報によって抑止した指摘メッセージの全てを出力しないかのいずれかであった。
【0005】
【発明が解決しようとする課題】
したがって,指摘メッセージを元にソースプログラムを修正した後に,再度ソースプログラムの解析を行なうような場合に,出力が不要な指摘メッセージを何度も出力することは,不必要な指摘メッセージの確認作業を繰り返し行うことになり,作業処理の軽減が図れず,また本当に必要な指摘メッセージを抽出することが困難になる等の問題を生じていた。
【0006】
また,一度抑止情報をソースプログラム中に設定すると,以後はその指摘メッセージが出力されないため,指摘メッセージを再確認したいときでも,指摘メッセージを再出力させることが簡単にはできないという問題があった。
【0007】
本発明は上記問題点の解決を図り,必要としない指摘メッセージは出力を抑止し,また抑止した指摘メッセージについても必要な場合には簡単に出力させることができるようにすることを目的とする。
【0008】
【課題を解決するための手段】
図1は,本発明のブロック構成例を示す。
ソースプログラム解析装置1はCPUおよびメモリ等により構成され,抑止情報適用有無設定部2,抑止メッセージ出力有無設定部3,指摘メッセージ出力処理部4,抑止情報自動挿入処理部5を持つ。
【0009】
抑止情報適用有無設定部2は,ユーザからの指示に応じて,ソースプログラム6内に抑止情報が存在しても指摘メッセージを出力するかどうかを設定する手段である。また,抑止メッセージ出力有無設定部3は,ユーザからの指示に応じて,抑止情報により抑止した指摘メッセージが存在する場合に,その指摘メッセージを出力するかどうかを設定する手段である。
【0010】
抑止情報適用有無設定部2が抑止情報を適用するか否かを設定するのに対し,抑止メッセージ出力有無設定部3は,抑止情報を適用した場合において抑止した指摘メッセージを出力するか否かを設定する点が異なる。
【0011】
指摘メッセージ出力処理部4は,抑止情報適用有無設定部2での設定に基づき,抑止情報が存在しても指摘メッセージを出力するように設定されている場合には抑止情報の有無にかかわらず指摘メッセージを出力し,抑止情報が存在する場合に指摘メッセージの出力を抑止するように設定されている場合には抑止情報に応じて指摘メッセージの出力を抑止する。また,抑止メッセージ出力有無設定部3での設定に基づき,抑止した指摘メッセージが存在する場合にその指摘メッセージを出力するように設定されている場合に,抑止した指摘メッセージを出力する。このとき,抑止マーク付与部41は,抑止した指摘メッセージに特定の記号等を付加して出力し,抑止した指摘メッセージの出力であるか他の指摘メッセージの出力であるかを一目で区別できるように出力する。
【0012】
抑止情報自動挿入処理部5は,指摘メッセージの出力リストにおいて出力を抑止したい指摘メッセージを選択させる手段と,ソースプログラム6内に,前記選択された指摘メッセージを抑止するための情報を自動的に挿入する手段とを持つ。
【0013】
ソースプログラム6は,解析の対象となるソースプログラムである。
以上の各処理手段を計算機によって実現するためのプログラムは,計算機が読み取り可能な可搬媒体メモリ,半導体メモリ,ハードディスクなどの適当な記憶媒体に格納することができる。
【0014】
本発明は,以下のように作用する。
抑止情報適用有無設定部2により,ソースプログラム6内に抑止情報が存在する場合に指摘メッセージを出力するかどうかを設定し,抑止情報が存在しても指摘メッセージを出力するように設定したときには,指摘メッセージ出力処理部4により,ソースプログラム6を解析した結果の指摘メッセージを,抑止情報があっても出力する。抑止情報が存在する場合に指摘メッセージを出力しないように設定したときには,ソースプログラム6を解析した結果の指摘箇所に抑止情報があれば,指摘メッセージを出力しないようにする。これによって,指摘メッセージを抑止情報に応じて出力するかしないかを任意に選択することができるようになる。
【0015】
また,抑止情報適用有無設定部2により,抑止情報が存在する場合に指摘メッセージの出力を抑止すると設定した場合であっても,抑止メッセージ出力有無設定部3により,抑止した指摘メッセージが存在する場合にその指摘メッセージを出力するように設定したときには,ソースプログラム6内の抑止情報を検出し,指摘メッセージ出力処理部4により,抑止した指摘メッセージを出力する。抑止した指摘メッセージが存在する場合にその指摘メッセージを出力しないように設定したときには,指摘メッセージ出力処理部4により,抑止した指摘メッセージを出力しないようにする。これによって,抑止した指摘メッセージについても,必要な場合には任意に出力させることができるようになる。
【0016】
指摘メッセージ出力処理部4が抑止した指摘メッセージを出力する場合に,抑止マーク付与部41は,例えば指摘メッセージに抑止マークを付与するなどして,出力された指摘メッセージが抑止したものであることが分かるような出力形式で出力する。これによって,抑止した指摘メッセージと抑止していない指摘メッセージとを一目で区別することができ,解析結果の検討作業を効率化することが可能になる。
【0017】
また,抑止情報自動挿入処理部5により,指摘メッセージの出力リストにおいて出力を抑止したい指摘メッセージを任意に選択し,ソースプログラム6内に,選択された指摘メッセージを抑止するための情報を自動的に挿入することができるので,GUI(Graphical User Interface)等による簡単な操作で,不要な指摘メッセージへの抑止情報の設定が可能になる。
【0018】
【発明の実施の形態】
以下に,本発明の実施の一形態を説明する。
図2は,本実施の形態の処理概要を示すフローチャートである。
【0019】
あらかじめ抑止情報適用有無設定部2により,ソースプログラム6内に抑止情報がある場合に指摘メッセージを出力するかどうかを設定し(S1),さらに抑止メッセージ出力有無設定部3により,ソースプログラム6内に指摘メッセージの出力を抑止した部分がある場合にも指摘メッセージを出力するかどうかを設定する(S2)。
【0020】
ソースプログラム6内に抑止情報があっても指摘メッセージを出力するよう設定されているかどうかを判断し(S3),抑止情報の有無にかかわらず指摘メッセージを出力するよう設定されているときにはステップS8の処理へ進む。ソースプログラム6内に抑止情報がある場合には指摘メッセージを出力しないよう設定されているときにはステップS4の処理へ進む。
【0021】
ステップS4の処理では,ソースプログラム6内に抑止情報があるかどうかを判断し,ソースプログラム6内に抑止情報がない場合にはステップS8の処理へ進み,ソースプログラム6内に抑止情報を検出した場合にはステップS5の処理へ進む。
【0022】
次に,ステップS5の処理では,抑止した指摘メッセージを出力するようになっているかどうかを判断し,抑止した指摘メッセージを出力するようになっている場合には,抑止した指摘メッセージに抑止マークを付加して,抑止した指摘メッセージと抑止していない指摘メッセージとを分かるように出力する(S6)。抑止した指摘メッセージを出力するようになっていない場合には,抑止した指摘メッセージ以外の指摘メッセージを出力する(S7)。GUIの場合には,S6とS7の出力をした後に,S2の処理を行うことができ,再度S5の処理を繰り返すことができる。その後,ステップS9の処理へ進む。
【0023】
ステップS8の処理では,抑止情報があっても全ての指摘メッセージを出力する。
続いて,ステップS9の処理では,抑止情報自動挿入処理部5により,指摘メッセージの出力リストにおいて,次のソースプログラム6の解析時に出力を抑止したい指摘メッセージが選択された場合に,ソースプログラム6中に抑止情報を自動挿入する(S9)。
【0024】
図3は,抑止情報適用の有無の設定の例を示す。
図3(A)は,抑止情報を適用するか否かの設定を,GUIを用いて行うときの抑止情報適用設定画面の例であり,図3(B)は,抑止情報を適用するか否かの設定を,ソースプログラム解析装置1を実現するソース解析プログラム(ソースチェッカ)を起動する際のコマンドのオプションにより行う例である。
【0025】
図3(A)に示す抑止情報適用設定画面を用いて抑止情報を適用することを設定する場合には,解析対象のソースプログラムの一覧またはディレクトリ等で,抑止情報を適用するソースプログラム6を選択した後,抑止情報適用設定画面上でマウスクリック等により「レ」点をマークする。このマークによって,ソースプログラム6中に抑止情報があると指摘メッセージを出力しない旨の設定がなされる。
【0026】
また,図3(B)に示すように,ソース解析プログラム(プログラム名=pgr)の起動コマンドのオプションとして「−d」を記述することにより,同様に抑止情報を適用する旨を設定することができる。図中,「%」はコマンドの入力を促すプロンプト,「a.c」「b.c」は解析するソースプログラム6のファイル名である。解析結果である指摘メッセージの出力は,この例では標準出力(画面)である。
【0027】
図4は,抑止した指摘メッセージの出力の有無の設定の例を示す。
図4(A)は,抑止した指摘メッセージを出力するか否かの設定を,GUIを用いて行うときの被抑止指摘メッセージ出力設定画面の例であり,図4(B)は,抑止した指摘メッセージを出力するか否かの設定を,ソース解析プログラム(ソースチェッカ)を起動する際のコマンドのオプションにより行う例である。
【0028】
図4(A)に示す被抑止指摘メッセージ出力設定画面を用いて,抑止した指摘メッセージを出力することを設定する場合には,解析対象のソースプログラムの一覧またはディレクトリ等で,抑止した指摘メッセージの出力が必要なソースプログラム6を選択した後,被抑止指摘メッセージ出力設定画面上でマウスクリック等により「レ」点をマークする。このマークによって,抑止情報を適用した場合でも,抑止した指摘メッセージを出力する旨の設定がなされる。
【0029】
また,図4(B)に示すように,ソース解析プログラム(プログラム名=pgr)の起動コマンドのオプションとして「−o」を記述することにより,同様に抑止した指摘メッセージを出力する旨を設定することができる。
【0030】
図5は,抑止情報の例を示す図である。
図5(A)は,標準インクルードによる指摘メッセージ抑止の例を示している。図5(A)に示すソースプログラムAの「#include」文で呼び出される「standard.h」のヘッダファイル内に,構文エラーではないが,通常は用いられないような意味のない条件式などの指摘箇所(この例では「if (x = 1)」)がある場合に,「#include」文でstandard.hを「<>」で括っているため,標準インクルードであると認識し,指摘箇所があっても指摘メッセージを出力しない。ソースプログラム解析装置1は,このような標準インクルードを抑止情報とみなす。
【0031】
図5(B)は,コメントによる指摘メッセージ抑止の例を示している。図5(B)に示すように,本来は指摘されるべき記述(この例では「if (x = 1)」)があるが,この箇所に,/* pgr0040 */ 」という特殊な文字列をコメントとして付けることにより,ソースプログラム解析装置1は,この箇所については原則として指摘メッセージを出力しない。この場合には,コメント/* pgr0040 */ 」が抑止情報となる。なお,/* pgr0040 */ 」中の「0040」は,数多くある指摘メッセージの中のメッセージ番号であり,0040番の指摘メッセージだけ出力を抑止することを指示している。同じ記述のコンポーネント中に他の種類の指摘箇所がある場合には,その指摘メッセージの出力は抑止されない。
【0032】
例えば,メッセージ番号が0040番と0041番の複数の指摘メッセージの出力を抑止する場合には,/* pgr0040,pgr0041 */ 」という抑止情報の記述
になる。
【0033】
図6は,抑止情報自動挿入の処理の例を示す図である。
図6(A)に示すように,指摘メッセージ出力処理部4は,抑止情報適用有無設定部2の設定に基づいて指摘メッセージリストを出力する。このリスト中から,出力を抑止したい指摘メッセージを選択する場合,その指摘メッセージにカーソルを合わせて,メニューまたは指摘メッセージのクリック等により抑止情報の挿入を指示する。これによって,図6(B)に示すような抑止情報自動挿入画面が表示されるので,この画面中の「実行」ボタンをクリックする。抑止情報自動挿入処理部5は,「実行」ボタンがクリックされると,ソースプログラム6中の選択された指摘メッセージに対応する部分に,例えば図6(C)に示すようなコメント/* pgr0040 */ 」を抑止情報として自動挿入する。
【0034】
図7は,抑止した指摘メッセージを含む指摘メッセージリストの例を示す図である。抑止した指摘メッセージを出力するように設定されている場合,抑止マーク付与部41によって,抑止した指摘メッセージに抑止マーク(*)を付けることにより,指摘メッセージのリスト中で,その指摘メッセージが抑止したものであることが分かるようにする。これによって,ユーザは,指摘メッセージを参照する際に,抑止した指摘メッセージだけに注目して再チェックすることも,これとは反対に,抑止した指摘メッセージは無視して,抑止しない指摘メッセージだけに注目してチェックすることも簡単に行うことができるようになる。
【0035】
【発明の効果】
以上説明したように,本発明によれば,ソースプログラム中に指摘メッセージの抑止情報がある場合に,これを出力/非出力とし,また,抑止情報が付与された指摘メッセージであることを明示して出力することができる。これにより,ソースプログラムを解析した結果の指摘メッセージに関する確認の作業効率を大きく向上させることが可能になる。また,抑止が必要な指摘メッセージに対して抑止情報の設定も簡単に行うことができるようになる。
【図面の簡単な説明】
【図1】本発明のブロック構成例を示す図である。
【図2】本実施の形態の処理概要を示すフローチャートである。
【図3】抑止情報適用の有無の設定の例を示す図である。
【図4】抑止した指摘メッセージの出力の有無の設定の例を示す図である。
【図5】抑止情報の例を示す図である。
【図6】抑止情報自動挿入の処理の例を示す図である。
【図7】被抑止指摘メッセージを含む指摘メッセージリストの例を示す図である。
【符号の説明】
1 ソースプログラム解析装置
2 抑止情報適用有無設定部
3 抑止メッセージ出力有無設定部
4 指摘メッセージ出力処理部
41 抑止マーク付与部
5 抑止情報自動挿入処理部
6 ソースプログラム
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a source program analysis device having a function of outputting an indication message by analyzing a source program, and a computer-readable recording medium recording the source program analysis program .
[0002]
[Prior art]
In the conventional source program analysis, all indication messages that point out a problem or a caution in the source program have been output. For this reason, a certain pointed message is output even if it is intentional and the output of the pointed message is not desired, and the output of the pointed message is processed mechanically. Messages and unnecessary indication messages were sometimes output.
[0003]
On the other hand, in order to improve such uniform processing, predetermined inhibition information is added to the description of the source program, for example, as “lint” which is known as a standard tool of UNIX, and the inhibition is performed. Some messages do not output a message indicating that there is information.
[0004]
As described above, in the conventional source program analysis, the output of the indicated messages is either to output all the indicated messages without suppression or not to output all the indicated messages suppressed by the suppression information. Was.
[0005]
[Problems to be solved by the invention]
Therefore, if the source program is corrected based on the pointed message and then the source program is analyzed again, outputting the pointed messages that do not need to be output many times is a task of checking unnecessary pointed messages. Since the repetition is performed, work processing cannot be reduced, and it is difficult to extract a really necessary indication message.
[0006]
Further, once the suppression information is set in the source program, the pointed message is not output thereafter, so that it is not easy to re-output the pointed message even when it is desired to reconfirm the pointed message.
[0007]
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-mentioned problems, and to suppress the output of an unnecessary indication message, and to easily output the suppressed indication message when necessary.
[0008]
[Means for Solving the Problems]
FIG. 1 shows a block configuration example of the present invention.
The source program analysis device 1 includes a CPU, a memory, and the like, and includes a suppression information application setting unit 2, a suppression message output setting unit 3, a pointed message output processing unit 4, and a suppression information automatic insertion processing unit 5.
[0009]
The suppression information application presence / absence setting unit 2 is a means for setting whether or not to output an indication message even if suppression information exists in the source program 6 in accordance with an instruction from the user. Further, the suppression message output presence / absence setting unit 3 is a means for setting whether or not to output a pointed message when there is a pointed message suppressed by the suppression information in response to an instruction from the user.
[0010]
While the suppression information application presence / absence setting unit 2 sets whether or not to apply the suppression information, the suppression message output presence / absence setting unit 3 determines whether to output the suppressed indication message when the suppression information is applied. The setting is different.
[0011]
Based on the setting in the suppression information application presence / absence setting unit 2, the indication message output processing unit 4 indicates the indication regardless of the presence or absence of the suppression information if the setting is made to output the indication message even if the suppression information exists. If a message is output, and the output of the indicated message is suppressed when the suppression information exists, the output of the indicated message is suppressed according to the suppression information. In addition, based on the setting of the inhibition message output presence / absence setting unit 3, if a suppressed indication message is set to be output, the suppressed indication message is output. At this time, the suppression mark adding unit 41 adds a specific symbol or the like to the suppressed indication message and outputs the message, so that it is possible to distinguish at a glance whether the output is a suppressed indication message or another indication message. Output to
[0012]
The suppression information automatic insertion processing unit 5 includes means for selecting an indication message whose output is to be inhibited from the indication list of the indication message, and automatically inserts information for suppressing the selected indication message into the source program 6. With means to do.
[0013]
The source program 6 is a source program to be analyzed.
A program for realizing each of the above processing means by a computer can be stored in a suitable storage medium such as a computer-readable portable medium memory, a semiconductor memory, and a hard disk.
[0014]
The present invention operates as follows.
When the suppression information application presence / absence setting unit 2 sets whether or not to output the indication message when the suppression information exists in the source program 6, if the setting is made to output the indication message even if the suppression information exists, The indication message output processing unit 4 outputs an indication message as a result of analyzing the source program 6 even if the inhibition information is present. When the setting is made such that the indication message is not output when the suppression information exists, if the suppression information is found at the point indicated by the analysis of the source program 6, the indication message is not output. As a result, it is possible to arbitrarily select whether or not to output the indicated message according to the suppression information.
[0015]
Also, even if the suppression information application presence / absence setting unit 2 sets the suppression of the output of the indication message when the suppression information is present, the suppression message output presence / absence setting unit 3 does not include the indicated message. When the setting is made to output the pointed message, the suppression information in the source program 6 is detected, and the pointed message output processing unit 4 outputs the suppressed pointed message. When it is set not to output the pointed message when there is the suppressed pointed message, the pointed message output processing unit 4 does not output the suppressed pointed message. As a result, the suppressed pointed message can be arbitrarily output if necessary.
[0016]
When the pointed message output processing unit 4 outputs the pointed message that has been suppressed, the suppression mark attaching unit 41 determines that the outputted pointed message is the one that has been suppressed, for example, by adding a suppression mark to the pointed message. Output in an understandable output format. This makes it possible to distinguish at a glance the pointed-out message that has been suppressed and the pointed-out message that has not been suppressed, and the efficiency of the work of examining the analysis results can be increased.
[0017]
In addition, the suppression information automatic insertion processing unit 5 arbitrarily selects an indication message whose output is to be suppressed from the indication message output list, and automatically includes information for suppressing the selected indication message in the source program 6. Since it can be inserted, it is possible to set the suppression information in the unnecessary indication message by a simple operation using a GUI (Graphical User Interface) or the like.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described.
FIG. 2 is a flowchart showing a processing outline of the present embodiment.
[0019]
The suppression information application presence / absence setting unit 2 sets in advance whether or not to output an indication message when the suppression information is present in the source program 6 (S1). It is set whether or not to output a pointed message even when there is a part where the output of the pointed message is suppressed (S2).
[0020]
It is determined whether or not a setting is made so as to output an indication message even if the suppression information is present in the source program 6 (S3). Proceed to processing. When the inhibition information is included in the source program 6, if it is set not to output the indication message, the process proceeds to step S4.
[0021]
In the process of step S4, it is determined whether or not there is inhibition information in the source program 6. If there is no inhibition information in the source program 6, the process proceeds to step S8, and the inhibition information is detected in the source program 6. In this case, the process proceeds to step S5.
[0022]
Next, in the process of step S5, it is determined whether or not the suppressed indication message is to be output. If the suppressed indication message is to be output, a suppression mark is added to the suppressed indication message. In addition, output is performed so that the suppressed message and the non-suppressed message can be identified (S6). If the suppressed indication message is not output, an indication message other than the suppressed indication message is output (S7). In the case of the GUI, the processing of S2 can be performed after outputting S6 and S7, and the processing of S5 can be repeated again. Thereafter, the process proceeds to step S9.
[0023]
In the process of step S8, all the indicated messages are output even if the inhibition information exists.
Subsequently, in the process of step S9, when the suppression information automatic insertion processing unit 5 selects a pointed message whose output is to be suppressed in the analysis of the next source program 6 in the output list of the pointed message, the source message 6 Is automatically inserted into the server (S9).
[0024]
FIG. 3 shows an example of setting whether or not suppression information is applied.
FIG. 3A is an example of a suppression information application setting screen when setting whether or not to apply the suppression information is performed using a GUI, and FIG. 3B is a diagram illustrating whether or not to apply the suppression information. This is an example in which the setting is performed by a command option when a source analysis program (source checker) for realizing the source program analysis device 1 is started.
[0025]
When setting the application of the suppression information using the suppression information application setting screen shown in FIG. 3A, select the source program 6 to which the suppression information is to be applied from a list of source programs to be analyzed or a directory. After that, the “D” point is marked by clicking the mouse on the suppression information application setting screen. With this mark, a setting is made so that the indication message is not output if the inhibition information is present in the source program 6.
[0026]
Also, as shown in FIG. 3B, by describing "-d" as an option of the start command of the source analysis program (program name = pgr), it is possible to similarly set that the suppression information is applied. it can. In the figure, "%" is a prompt for command input, and "ac" and "bc" are file names of the source program 6 to be analyzed. The output of the indication message as the analysis result is a standard output (screen) in this example.
[0027]
FIG. 4 shows an example of setting whether to output a suppressed indication message.
FIG. 4A is an example of a screen for setting the output of a suppressed indication message when the setting of whether to output the suppressed indication message is performed using the GUI, and FIG. In this example, whether or not to output a message is set by a command option when starting a source analysis program (source checker).
[0028]
When the setting to output a suppressed message is made by using the suppressed message output setting screen shown in FIG. 4A, the list of the source programs to be analyzed or the directory of the suppressed message is displayed. After selecting the source program 6 that needs to be output, the “レ” point is marked by clicking the mouse or the like on the output screen for setting the output of the message to be inhibited. With this mark, even if the suppression information is applied, a setting is made to output the message indicating the suppression.
[0029]
Also, as shown in FIG. 4 (B), by describing "-o" as an option of the start command of the source analysis program (program name = pgr), it is set to output the similarly pointed out message which is suppressed. be able to.
[0030]
FIG. 5 is a diagram illustrating an example of the suppression information.
FIG. 5A shows an example of the suppression of the indication message by the standard include. In the header file of “standard.h” called by the “#include” statement of the source program A shown in FIG. 5 (A), there is no syntax error but meaningless conditional expressions that are not normally used. When there is a pointed-out point (“if (x = 1)” in this example), the standard. Since h is enclosed in “<>”, it is recognized as a standard include, and no indication message is output even if there is an indication. The source program analyzer 1 regards such a standard include as suppression information.
[0031]
FIG. 5B shows an example of the suppression of a pointed message by a comment. As shown in FIG. 5 (B), there is a description that should be pointed out (“if (x = 1)” in this example), but a special character string / * pgr0040 * /” Is attached as a comment, the source program analysis device 1 does not output a message indicating this point in principle. In this case, the comment / * pgr0040 * /” is the suppression information. Note that 0040” in / * pgr0040 * /” is a message number in a number of indication messages, and indicates that only the indication message with the number 0040 is to be suppressed from being output. If there are other types of indications in the component with the same description, the output of the indication message is not suppressed.
[0032]
For example, when the output of a plurality of indication messages with message numbers 0040 and 0041 is suppressed, the description of the suppression information is " / * pgr0040, pgr0041 * /".
[0033]
FIG. 6 is a diagram illustrating an example of a process of automatically inserting suppression information.
As shown in FIG. 6A, the pointed message output processing unit 4 outputs a pointed message list based on the setting of the suppression information application presence / absence setting unit 2. When selecting a pointed message whose output is to be suppressed from this list, the user places the cursor on the pointed message and instructs insertion of the suppression information by clicking a menu or the pointed message. As a result, an inhibition information automatic insertion screen as shown in FIG. 6B is displayed, and the "execute" button on this screen is clicked. When the “execute” button is clicked, the suppression information automatic insertion processing unit 5 inserts a comment / * pgr0040 as shown in FIG. 6C, for example, in a portion corresponding to the selected indication message in the source program 6. * / "Is automatically inserted as suppression information.
[0034]
FIG. 7 is a diagram illustrating an example of the indicated message list including the suppressed indicated messages. If a suppressed indication message is set to be output, the suppression mark attaching unit 41 puts a suppression mark (*) on the suppressed indication message, so that the indication message is suppressed in the indication message list. Make sure they are things. This allows the user to re-check only the suppressed message when referring to the indicated message, or, conversely, ignore the suppressed message and leave only the non-suppressed message. Checking with attention can be done easily.
[0035]
【The invention's effect】
As described above, according to the present invention, when the suppression information of the pointed message is present in the source program, this is output / non-output, and it is clearly indicated that the pointed message is the pointed message to which the suppression information is added. Can be output. As a result, it is possible to greatly improve the work efficiency of confirming a message pointed out as a result of analyzing the source program. In addition, it is possible to easily set the suppression information for the indication message requiring the suppression.
[Brief description of the drawings]
FIG. 1 is a diagram showing an example of a block configuration according to the present invention.
FIG. 2 is a flowchart showing an outline of a process according to the embodiment.
FIG. 3 is a diagram illustrating an example of setting whether or not suppression information is applied;
FIG. 4 is a diagram illustrating an example of setting whether to output a suppressed indication message.
FIG. 5 is a diagram illustrating an example of inhibition information.
FIG. 6 is a diagram illustrating an example of processing for automatically inserting inhibition information.
FIG. 7 is a diagram illustrating an example of an indication message list including a suppressed indication message.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Source program analyzer 2 Suppression information application setting part 3 Suppression message output setting part 4 Pointing message output processing part 41 Suppression mark attaching part 5 Suppression information automatic insertion processing part 6 Source program

Claims (5)

ソースプログラムを解析し,解析した結果を指摘メッセージとして出力するソースプログラム解析装置において,
ソースプログラム内に指摘メッセージの出力を抑止することを指示する抑止情報が存在しても指摘メッセージを出力するかどうかを設定する手段と,
抑止情報が存在しても指摘メッセージを出力するように設定されている場合には抑止情報の有無にかかわらず指摘メッセージを出力し,抑止情報が存在する場合に指摘メッセージの出力を抑止するように設定されている場合には抑止情報に応じて指摘メッセージの出力を抑止する手段とを備える
ことを特徴とするソースプログラム解析装置。
In a source program analyzer that analyzes a source program and outputs the analysis result as an indication message,
Means for setting whether or not to output a pointed message even if suppression information indicating that the output of the pointed message is to be suppressed exists in the source program;
When the setting is made to output the indicated message even if the suppression information exists, the indication message is output regardless of the presence or absence of the suppression information, and the output of the indicated message is suppressed when the suppression information exists. Means for suppressing output of the indication message in accordance with the suppression information when the setting is set.
請求項1に記載するソースプログラム解析装置において,
前記抑止情報により抑止した指摘メッセージが存在する場合にその指摘メッセージを出力するかどうかを設定する手段と,
抑止した指摘メッセージが存在する場合にその指摘メッセージを出力するように設定されている場合に,抑止した指摘メッセージを出力する手段とを備える
ことを特徴とするソースプログラム解析装置。
The source program analysis device according to claim 1,
Means for setting whether to output the indicated message when the indicated message suppressed by the suppression information exists,
A source program analysis device, comprising: means for outputting a suppressed indication message when a setting is made to output the suppressed indication message when the suppressed indication message exists.
請求項2に記載するソースプログラム解析装置において,
前記抑止した指摘メッセージを出力する手段は,抑止した指摘メッセージを出力する場合に,抑止した指摘メッセージであることが分かるように出力する
ことを特徴とするソースプログラム解析装置。
3. The source program analysis device according to claim 2,
The source program analysis device, wherein the means for outputting the suppressed indication message outputs the suppressed indication message so as to be recognized as the suppressed indication message when outputting the suppressed indication message.
請求項1に記載するソースプログラム解析装置において,
指摘メッセージの出力リストにおいて出力を抑止したい指摘メッセージを選択させる手段と,
ソースプログラム内に,前記選択された指摘メッセージを抑止するための情報を自動的に挿入する手段とを備える
ことを特徴とするソースプログラム解析装置。
The source program analysis device according to claim 1,
Means for selecting an indication message whose output is to be suppressed in the output list of the indication messages,
Means for automatically inserting information for suppressing the selected indication message into the source program.
コンピュータにソースプログラムを解析し,解析した結果を指摘メッセージとして出力させるためのソースプログラム解析プログラムを記録したコンピュータ読み取り可能な記録媒体であって,
前記コンピュータを,
ソースプログラム内に指摘メッセージの出力を抑止することを指示する抑止情報が存在しても指摘メッセージを出力するかどうかを設定する手段と,
抑止情報が存在しても指摘メッセージを出力するように設定されている場合には抑止情報の有無にかかわらず指摘メッセージを出力し,抑止情報が存在する場合に指摘メッセージの出力を抑止するように設定されている場合には抑止情報に応じて指摘メッセージの出力を抑止する手段
として機能させるためのソースプログラム解析プログラムを記録したコンピュータ読み取り可能な記録媒体。
Analyzing the source program into a computer, a computer-readable recording medium storing a source program analysis program for outputting the result of the analysis as indicated message,
Said computer
Means for setting whether or not to output a pointed message even if suppression information indicating that the output of the pointed message is to be suppressed exists in the source program;
When the setting is made to output the indicated message even if the suppression information exists, the indication message is output regardless of the presence or absence of the suppression information, and the output of the indicated message is suppressed when the suppression information exists. If set, means to suppress the output of the indicated message according to the suppression information
A computer-readable recording medium that records a source program analysis program for causing the computer to function as a computer.
JP29308097A 1997-10-27 1997-10-27 Source program analysis device and computer-readable recording medium storing source program analysis program Expired - Fee Related JP3544462B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29308097A JP3544462B2 (en) 1997-10-27 1997-10-27 Source program analysis device and computer-readable recording medium storing source program analysis program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29308097A JP3544462B2 (en) 1997-10-27 1997-10-27 Source program analysis device and computer-readable recording medium storing source program analysis program

Publications (2)

Publication Number Publication Date
JPH11134187A JPH11134187A (en) 1999-05-21
JP3544462B2 true JP3544462B2 (en) 2004-07-21

Family

ID=17790196

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29308097A Expired - Fee Related JP3544462B2 (en) 1997-10-27 1997-10-27 Source program analysis device and computer-readable recording medium storing source program analysis program

Country Status (1)

Country Link
JP (1) JP3544462B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092475A (en) * 2004-09-27 2006-04-06 Hitachi Software Eng Co Ltd Source code inspection system
US8595703B2 (en) * 2006-01-30 2013-11-26 Microsoft Corporation Context based code analysis
JP4915362B2 (en) * 2008-02-14 2012-04-11 日本電気株式会社 Annotation automatic insertion method of static verification tool
JP2013045307A (en) * 2011-08-24 2013-03-04 Nec Corp Static analysis system, static analysis result display method and program

Also Published As

Publication number Publication date
JPH11134187A (en) 1999-05-21

Similar Documents

Publication Publication Date Title
US6463480B2 (en) Method and system of processing a plurality of data processing requests, and method and system of executing a program
US7689925B2 (en) Copy and paste extensibility
US7516398B2 (en) Apparatus and method of executing multi-clipboard
JP4270391B2 (en) Multimedia file tooltip
JP4056477B2 (en) A system for displaying display data copied to the clipboard
CN106547698A (en) The processing method of coverage data, device and server
JP4395761B2 (en) Program test support apparatus and method
US6657641B2 (en) Scenario display method and apparatus
JP3544462B2 (en) Source program analysis device and computer-readable recording medium storing source program analysis program
JP2553801B2 (en) Graphical user interface management method
US20050102327A1 (en) Data file processor, data file processing method and program
JP2011013887A (en) Software development support device
JP2007241426A (en) Specific work support system for application failure causes
US8843896B2 (en) Metamodeling contextual navigation of computer software applications
JP2008176364A (en) Program parts support equipment
JPH11306187A (en) Presentation processing method and apparatus for presenting search result of document with category
US20040169684A1 (en) Linking images for navigation
JP2021184166A (en) Cleansing rule generation support program, cleansing rule generation support method, and cleansing rule generation support system
JP5304657B2 (en) Information processing apparatus, process verification support method, and process verification support program
JPH10207923A (en) Document creation support device for design work
JP2896536B2 (en) Electronic message system
WO2023248307A1 (en) Operation support system, operation support method, and operation support program
JP2007094707A (en) Application operation tracking support device
JP2000020293A (en) How to search for a specific function in the program source
JP5949889B2 (en) Software development support device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20031224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040127

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040402

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100416

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140416

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees