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
JP6476994B2 - Indication sorting apparatus, indication sorting method and program - Google Patents
[go: Go Back, main page]

JP6476994B2 - Indication sorting apparatus, indication sorting method and program - Google Patents

Indication sorting apparatus, indication sorting method and program Download PDF

Info

Publication number
JP6476994B2
JP6476994B2 JP2015034293A JP2015034293A JP6476994B2 JP 6476994 B2 JP6476994 B2 JP 6476994B2 JP 2015034293 A JP2015034293 A JP 2015034293A JP 2015034293 A JP2015034293 A JP 2015034293A JP 6476994 B2 JP6476994 B2 JP 6476994B2
Authority
JP
Japan
Prior art keywords
sorting
indication
tool
rule
information
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.)
Active
Application number
JP2015034293A
Other languages
Japanese (ja)
Other versions
JP2016157255A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2015034293A priority Critical patent/JP6476994B2/en
Publication of JP2016157255A publication Critical patent/JP2016157255A/en
Application granted granted Critical
Publication of JP6476994B2 publication Critical patent/JP6476994B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

本発明は、指摘選別装置、指摘選別方法及びプログラムに関する。   The present invention relates to an indication sorting device, an indication sorting method, and a program.

ソフトウェアのバグやセキュリティ脆弱性等に関する問題を検出するために、静的検証ツール(静的検証装置)が用いられている。静的検証ツールは、検証対象となるソフトウェアのソースコードに関する何らかのモデルを内部に構築して検証することで、当該ソフトウェアの実行ファイルを実行することなく、当該ソフトウェアの問題を指摘する。   Static verification tools (static verification devices) are used to detect problems related to software bugs and security vulnerabilities. The static verification tool points out the problem of the software without executing the executable file of the software by internally constructing and verifying any model regarding the source code of the software to be verified.

静的検証ツールの例として、例えば、TechMatrix社の「C++test」(商標)や「Jtest」(商標)等が知られている。   As examples of static verification tools, for example, "C ++ test" (trademark) and "Jtest" (trademark) of TechMatrix are known.

静的検証ツールは、一般にソースコードのみを用いて検証を行うことで、ソフトウェアの問題を指摘する。そのため、静的検証ツールからの指摘には、誤検知が含まれる場合がある。誤検知は、検証対象であるソフトウェアを実行した場合には発生することがなく、実際には確認や修正の必要がない指摘である。誤検知は、例えば静的検証ツールが検証を行う場合に仮定した情報等(システムの設定情報や設定ファイルの情報等)に起因して生じる。そのため、静的検証ツールからの指摘に関して、実際に確認すべき指摘数を抑制する手法が検討されている。   Static verification tools generally point out software problems by performing verification using only source code. Therefore, indications from the static verification tool may include false positives. False detection does not occur when the software to be verified is executed, and is an indication that does not actually need confirmation or correction. The false detection occurs due to, for example, information assumed when the static verification tool performs verification (system setting information, information of the setting file, etc.). Therefore, with regard to indications from static verification tools, methods for suppressing the number of indications that should actually be confirmed are being considered.

特許文献1には、判定作業支援システム等が記載されている。特許文献1に記載の判定作業支援システムは、ユーザが指摘を精査した時に、事前に統一した類似指摘が同じ精査結果となるように処理することで、類似指摘の重複作業の削減による精査作業の削減等を支援する。   Patent Document 1 describes a determination work support system and the like. The determination work support system described in Patent Document 1 processes the similar indications that are unified in advance to be the same examination result when the user scrutinizes the indications, thereby reducing the duplication work of the similar indications. Support reduction etc.

特許文献2には、ソースコード解析装置等が記載されている。特許文献2に記載のソースコード解析装置は、第1ソースコード及び第1ソースコードを修正した第2ソースコードを夫々静的に解析した結果の警告の検出回数である第1警告数及び第2警告数に基づき、警告情報の優先順位を決定する。   Patent Document 2 describes a source code analysis device and the like. The source code analysis device described in Patent Document 2 includes a first number of warnings and a second number of warnings, which are the number of warnings detected as a result of statically analyzing the first source code and the second source code obtained by modifying the first source code. Prioritize warning information based on the number of warnings.

特許文献3には、ソースプログラム解析装置等が記載されている。特許文献3に記載のソースプログラム解析装置は、自社のルール違反箇所を解析し、解析結果により、ソースコードを自動的に修正する。   Patent Document 3 describes a source program analysis device and the like. The source program analysis device described in Patent Document 3 analyzes its own rule violation part and automatically corrects the source code according to the analysis result.

特開2012−256220号公報JP 2012-256220 A 特開2008−052424号公報Japanese Patent Application Publication No. 2008-052424 特開2006−236042号公報JP, 2006-236042, A

静的検証ツールからの指摘の数を抑制する場合には、検証の対象となるソフトウェアの種類や検証の回数に関わらず、当該指摘の数が適切に抑制されることが好ましい。しかしながら、特許文献1等に記載された技術では、例えばソフトウェアに対して初めて静的検証ツールが適用される場合等において、静的検証ツールからの指摘の数を十分に抑制できない可能性がある。   In the case of suppressing the number of indications from the static verification tool, it is preferable that the number of the indications is appropriately suppressed regardless of the type of software to be verified and the number of verifications. However, with the technology described in Patent Document 1 etc., for example, when the static verification tool is applied to software for the first time, the number of indications from the static verification tool may not be sufficiently suppressed.

本発明は、上記課題を解決するためになされたものであって、静的検証装置の指摘を効率的に確認することを可能にする指摘選別装置等を提供することを主たる目的とする。   The present invention has been made to solve the above-mentioned problems, and its main object is to provide an indication / sorting device and the like that make it possible to efficiently identify the indication of a static verification device.

本発明の一態様における指摘選別装置は、静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別する条件を示す選別ルールを取得する選別ルール取得手段と、前記ツール指摘と、前記ソースコードに関する情報とを関連付け、前記ツール指摘に含まれる前記ソースコードにおける処理の種類を示す処理タイプに関する情報を解析情報として導出する解析手段と、前記解析情報及び前記選別ルールに基づいて、前記選別ルールに関係する前記ツール指摘を選別する選別手段とを備える。 The indication / sorting device according to one aspect of the present invention includes sorting rule acquisition means for acquiring a sorting rule indicating a condition for sorting a tool indication that is a result of verification of a source code by a static verification device; And analysis means for associating information on the source code and deriving information on a processing type indicating the type of processing in the source code included in the tool indication as analysis information, and based on the analysis information and the sorting rule And sorting means for sorting the tool indications related to the sorting rule.

本発明の一態様における指摘選別方法は、静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別する条件を示す選別ルールを取得し、前記ツール指摘と、前記ソースコードに関する情報とを関連付け、前記ツール指摘に含まれる前記ソースコードにおける処理の種類を示す処理タイプに関する情報を解析情報として導出し、前記解析情報及び前記選別ルールに基づいて、前記選別ルールに関係する前記ツール指摘を選別する。 According to one aspect of the present invention, a method of selecting an indication obtains a selection rule indicating a condition for selecting a tool indication which is a result of verification of a source code by a static verification apparatus, the tool indication, and the source code Information associated with the information related to the processing rule, the information related to the processing type indicating the type of processing in the source code included in the tool indication is derived as analysis information, and the information relates to the sorting rule based on the analysis information and the sorting rule Select tool indications.

本発明の一態様におけるプログラムは、静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別する条件を示す選別ルールを取得する処理と、 前記ツール指摘と、前記ソースコードに関する情報とを関連付け、前記ツール指摘に含まれる前記ソースコードにおける処理の種類を示す処理タイプに関する情報を解析情報として導出する処理と、前記解析情報及び前記選別ルールに基づいて、前記選別ルールに関係する前記ツール指摘を選別する処理とを実行させる。
A program according to an aspect of the present invention includes: a process of acquiring a sorting rule indicating a condition for screening a tool indication which is a result of verification of a source code by a static verification device; the tool indication; and the source code Related to the information related to information, and a process of deriving information related to a process type indicating the type of process in the source code included in the tool indication as analysis information, and related to the sorting rule based on the analysis information and the sorting rule And the process of selecting the tool indication.

本発明によると、静的検証装置の指摘を効率的に確認することを可能にする指摘選別装置等を提供することができる。   According to the present invention, it is possible to provide an indication sorting device or the like that makes it possible to efficiently identify the indication of the static verification device.

本発明の第1の実施形態における指摘選別装置の構成を示す図である。It is a figure showing composition of an indication sorting device in a 1st embodiment of the present invention. 本発明の第1の実施形態における指摘選別装置にて用いられる選別ルールの一例を示す図である。It is a figure which shows an example of the classification | selection rule used with the indication classification | selection apparatus in the 1st Embodiment of this invention. 本発明の第1の実施形態における指摘選別装置の解析部にて用いられるツール指摘に関する情報の例を示す図である。It is a figure which shows the example of the information regarding the tool indication used by the analysis part of the indication classification | selection apparatus in the 1st Embodiment of this invention. 本発明の第1の実施形態における指摘選別装置の解析部における解析結果である解析情報の例を示す図である。It is a figure which shows the example of the analysis information which is an analysis result in the analysis part of the indication classification | selection apparatus in the 1st Embodiment of this invention. 本発明の第1の実施形態における指摘選別装置の選別部における選別の手順の例を示す図である。It is a figure which shows the example of the procedure of the classification in the classification | category part of the indication classification | selection apparatus in the 1st Embodiment of this invention. 本発明の第1の実施形態における指摘選別装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the indication classification | selection apparatus in the 1st Embodiment of this invention. 本発明の第1の実施形態における指摘選別装置の動作の別の一例を示すフローチャートである。It is a flowchart which shows another example of operation | movement of the indication classification | selection apparatus in the 1st Embodiment of this invention. 本発明の実施形態における指摘選別装置を有する静的検証システムの構成例を示す図である。It is a figure showing an example of composition of a static verification system which has an indication sorting device in an embodiment of the present invention. 本発明の実施形態等における指摘選別装置等を実現する情報処理装置の一例を示す図である。It is a figure showing an example of an information processor which realizes an indication classification device etc. in an embodiment etc. of the present invention.

本発明の実施形態について、添付の図面を参照して説明する。なお、本発明の実施形態において、各装置の各構成要素は、機能単位のブロックを示している。各装置の各構成要素は、例えば図9に示すような情報処理装置500とソフトウェアとの任意の組み合わせにより実現することができる。情報処理装置500は、一例として、以下のような構成を含む。   Embodiments of the present invention will be described with reference to the accompanying drawings. In the embodiment of the present invention, each component of each device indicates a block of a function unit. Each component of each device can be realized, for example, by an arbitrary combination of an information processing device 500 as shown in FIG. 9 and software. The information processing apparatus 500 includes the following configuration, as an example.

・CPU(Central Processing Unit)501
・ROM(Read Only Memory)502
・RAM(Ramdom Access Memory)503
・RAM503にロードされるプログラム504
・プログラム504を格納する記憶装置505
・記録媒体506の読み書きを行うドライブ装置507
・ネットワーク509と接続する通信インターフェース508
・データの入出力を行う入出力インターフェース510
・各構成要素を接続するバス511
各装置の実現方法には様々な変形例がある。例えば、各装置は、専用の装置として実現することができる。また、各装置は、複数の装置の組み合わせにより実現することができる。
・ CPU (Central Processing Unit) 501
ROM (Read Only Memory) 502
RAM (Ramdom Access Memory) 503
The program 504 loaded to the RAM 503
A storage device 505 for storing the program 504
· Drive device 507 for reading and writing the recording medium 506
A communication interface 508 connected to the network 509
・ Input / output interface 510 for data input / output
.Buses 511 connecting each component
There are various modifications in the implementation method of each device. For example, each device can be realized as a dedicated device. Each device can be realized by a combination of a plurality of devices.

(第1の実施形態)
まず、本発明の第1の実施形態について説明する。図1は、本発明の第1の実施形態における指摘選別装置を示す図である。図2は、本発明の第1の実施形態における指摘選別装置にて用いられる選別ルールの一例を示す図である。図3は、本発明の第1の実施形態における指摘選別装置の解析部にて用いられるツール指摘に関する情報の例を示す図である。図4は、本発明の第1の実施形態における指摘選別装置の解析部における解析結果である解析情報の例を示す図である。図5は、本発明の第1の実施形態における指摘選別装置の選別部における選別の手順の例を示す図である。図6は、本発明の第1の実施形態における指摘選別装置の動作の一例を示すフローチャートである。図7は、本発明の第1の実施形態における指摘選別装置の動作の別の一例を示すフローチャートである。
First Embodiment
First, a first embodiment of the present invention will be described. FIG. 1 is a view showing a pointing and sorting apparatus according to a first embodiment of the present invention. FIG. 2 is a diagram showing an example of the sorting rule used in the indication sorting device according to the first embodiment of the present invention. FIG. 3 is a diagram showing an example of information on tool indication used in the analysis unit of the indication / sorting device according to the first embodiment of the present invention. FIG. 4 is a diagram showing an example of analysis information which is an analysis result in the analysis unit of the indication / selection device according to the first embodiment of the present invention. FIG. 5: is a figure which shows the example of the procedure of the classification | category in the classification | category part of the indication classification | selection apparatus in the 1st Embodiment of this invention. FIG. 6 is a flowchart showing an example of the operation of the indication / sorting device in the first embodiment of the present invention. FIG. 7 is a flow chart showing another example of the operation of the indication / sorting device in the first embodiment of the present invention.

図1に示すとおり、本発明の第1の実施形態における指摘選別装置100は、選別ルール取得部110と、解析部120と、選別部130とを備える。選別ルール取得部110は、静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別する条件を示す選別ルールを取得する。解析部120は、ツール指摘と、ソースコードに関する情報とを関連付ける解析情報を導出する。選別部130は、解析情報及び選別ルールに基づいて、選別ルールに関係するツール指摘を選別する。   As shown in FIG. 1, the indication / sorting device 100 according to the first embodiment of the present invention includes a sorting rule acquisition unit 110, an analysis unit 120, and a sorting unit 130. The sorting rule obtaining unit 110 obtains a sorting rule indicating a condition for sorting a tool indication which is a result of the source code being verified by the static verification device. The analysis unit 120 derives analysis information that associates the tool indication with the information on the source code. The sorting unit 130 sorts tool indications related to the sorting rule based on the analysis information and the sorting rule.

続いて、本発明の実施形態における指摘選別装置100の各構成要素について説明する。   Then, each component of the indication classification | selection apparatus 100 in embodiment of this invention is demonstrated.

選別ルール取得部110は、上述のように、選別ルールを取得する。選別ルールは、静的検証装置から示されるツール指摘を選別する条件を表す。ツール指摘は、静的検証装置にてプログラムのソースコードに対する検証が行われた結果として、静的検証装置からソースコードの問題として示される指摘である。   The sorting rule acquisition unit 110 acquires the sorting rule as described above. The sorting rules represent conditions for sorting tool indications indicated from the static verification device. The tool point is a point indicated as a problem of source code from the static verification device as a result of verifying the program source code in the static verification device.

図2は、選別ルールの一例を示す。図2に示す例では、3つの選別ルールが与えられている。選別ルールは、一例として、選別ルール番号と、問題ルール名と、処理位置と、処理タイプと、ソースコードに関する情報である左辺及び右辺の情報を含む。   FIG. 2 shows an example of the sorting rule. In the example shown in FIG. 2, three sorting rules are given. The sorting rule includes, as an example, a sorting rule number, a problem rule name, a processing position, a processing type, and information on the left side and the right side which are information related to the source code.

選別ルール番号は、選別ルールにおいて、ツール指摘を選別する条件ごとに一意に与えられる番号を表す。図2に示す例では、3つの選別ルールに対してそれぞれ通しの番号が付されている。   The sorting rule number represents a number uniquely assigned to each condition for sorting tool indications in the sorting rule. In the example shown in FIG. 2, serial numbers are assigned to the three sorting rules.

問題ルール名は、例えば静的検証装置にて予め用意されており、静的検証装置にてツール指摘として検出される問題に関するルール(以下、必要に応じて「問題ルール」と称する)の名称を表す情報である。すなわち、問題ルール名として、本実施形態における指摘選別装置100にて選別される静的検証装置のルールが指定される。本実施形態にて用いられる選別ルールの例では、1つの選別ルールに対して1つの問題ルール名が指定される。   The problem rule name is prepared in advance by, for example, a static verification device, and the name of a rule (hereinafter referred to as a "problem rule" as necessary) regarding a problem detected as a tool indication by the static verification device It is information to represent. That is, as the problem rule name, the rule of the static verification device to be sorted by the indication sorting device 100 in the present embodiment is designated. In the example of the sorting rule used in the present embodiment, one problem rule name is designated for one sorting rule.

図2に示す例では、選別ルール番号が1の選別ルールにおいて、メモリリークの可能性を示す“MemoryLeak”とのルールが問題ルール名として指定されている。同様に、選別ルール番号が2の選別ルールにおいて、条件式の評価に関する問題の可能性を示す“nonEval”とのルールが問題ルール名として指定されている。また、選別ルール番号が3の選別ルールにおいて、ヌルポインタを参照する可能性を示す“NullPointer”とのルールが問題ルール名として指定されている。   In the example shown in FIG. 2, in the sorting rule of which the sorting rule number is 1, a rule of “MemoryLeak” indicating the possibility of a memory leak is designated as a problem rule name. Similarly, in the sorting rule with the sorting rule number 2, a rule "nonEval" indicating the possibility of a problem regarding the evaluation of the conditional expression is designated as a problem rule name. Further, in the sorting rule with the sorting rule number 3, a rule “NullPointer” indicating the possibility of referring to a null pointer is designated as the problem rule name.

処理位置は、本選別ルールを用いて選別されるツール指摘に関連するソースコード上の処理の順序関係を示す情報である。本実施形態においては、処理位置の項目は、図2に示すように「問題作りこみ行」、「中間」及び「問題発生行」の3つから選択される。   The processing position is information indicating the order relation of processing on the source code related to the tool indication sorted using the sorting rule. In the present embodiment, as shown in FIG. 2, the item of the processing position is selected from three of “problem creation line”, “middle” and “problem occurrence line”.

「問題作りこみ行」は、ソースコードにおいて、静的検証装置からツール指摘として指摘される問題の原因となりうる処理が行われる箇所である。「中間」は、ソースコードにおいて、静的検証装置からツール指摘として指摘される問題の原因となる処理から当該問題が実際に発生し得るまでの途中の処理に関係する箇所である。「問題発生行」は、ソースコードにおいて、静的検証装置からツール指摘として指摘される問題が実際に発生し得る箇所である。   "Problem making lines" are places in the source code where processing that may cause problems pointed out as static tools by the static verification device is performed. The "intermediate" is a part related to the processing in the source code from the processing that causes the problem pointed out as a tool pointing from the static verification device to the processing in the middle from the problem may actually occur. The "problem occurrence line" is a place in the source code where a problem pointed out by the static verification device as a tool indication may actually occur.

なお、処理位置は、選別しようとするツール指摘の種類や、本実施形態における指摘選別装置の使用者の意図等に応じて、選別ルールごとに必要に応じて1つ以上の処理位置が指定される。また、選別ルール毎に、処理位置として、複数の同じ種類の処理位置が指定されてもよい。   In addition, according to the type of tool indication to be sorted, the intention of the user of the pointed sorter in this embodiment, etc., one or more processing positions are designated as needed for each sorting rule. Ru. In addition, a plurality of processing positions of the same type may be designated as processing positions for each sorting rule.

本実施形態においては、図2に示すように、選別ルール番号が1の選別ルールにおいて、「問題発生行」となる処理位置が指定されている。選別ルール番号が2の選別ルールにおいても、選別ルール番号が1の選別ルールと同様に「問題発生行」となる処理位置が指定されている。また、選別ルール番号が3の選別ルールにおいては、「問題作りこみ行」、「中間」及び「問題発生行」となる処理位置が指定されている。   In the present embodiment, as shown in FIG. 2, in the sorting rule whose sorting rule number is 1, the processing position where the “problem occurrence row” is specified is designated. Also in the sorting rule whose sorting rule number is 2, as in the sorting rule whose sorting rule number is 1, the processing position where the “problem occurrence line” is specified is specified. Further, in the sorting rule of which the sorting rule number is 3, processing positions to be “problem making row”, “middle” and “problem occurrence row” are designated.

処理タイプは、上述した処理位置に関連するソースコードにて行われる処理の種類を示す。本実施形態においては、処理タイプの項目は、図2に示すように「Insert」「Eval」「reference」の3つから選択される。処理タイプは、上述した処理位置の各々に対して指定される。   The process type indicates the type of process performed in the source code associated with the process position described above. In the present embodiment, the item of the processing type is selected from three of “Insert”, “Eval” and “reference” as shown in FIG. A process type is designated for each of the process positions described above.

「Insert」は、ソースコードにおける関連する箇所において、代入等の処理が行われることを示す。「Eval」は、ソースコードにおける関連する箇所において、条件式や値の評価等の処理が行われることを示す。
また、「reference」は、ソースコードにおける関連する箇所において、値等の参照が行われることを示す。
"Insert" indicates that processing such as substitution is performed at the relevant place in the source code. “Eval” indicates that processing such as evaluation of conditional expressions and values is performed at relevant places in the source code.
Also, "reference" indicates that a reference such as a value is made at a relevant place in the source code.

本実施形態においては、図2に示すように、選別ルール番号が1の選別ルールにおいて、「問題発生行」である処理位置に対して「Insert」の処理タイプが指定されている。また、選別ルール番号が1の選別ルールにおいて、「問題発生行」である処理位置に対して「Eval」の処理タイプが指定されている。
選別ルール番号が3の選別ルールにおいては、「問題作りこみ行」の処理位置に対して「Insert」、「中間」の処理位置に対して「Eval」、「問題発生行」の処理位置に対して「Eval」の処理タイプが各々指定されている。
In the present embodiment, as shown in FIG. 2, in the sorting rule whose sorting rule number is 1, the processing type of “Insert” is designated for the processing position which is the “problem occurrence row”. Further, in the sorting rule whose sorting rule number is 1, the processing type of "Eval" is designated for the processing position which is the "problem occurrence row".
In the sorting rule with sorting rule No. 3, for the processing position of “Problem creating line”, for “Insert”, for “Processing position” of “Intermediate”, for “Eval” for processing position of “problem occurrence line” Each of the processing types of "Eval" is designated.

ソースコードに関する情報である左辺及び右辺は、上述した処理位置及び処理タイプに関連するソースコードにて実行される処理の内容を示す。この左辺及び右辺に関する情報は、まとめて処理情報とも呼ばれる。本実施形態においては、正規表現記述、及び“%”記号にて区切られる特定変数の情報を用いて、当該ソースコードにおける処理の内容が記載される。なお、特定変数の情報として、本実施形態においては、静的検証装置においてツール指摘として指摘される問題に関連する変数(以下、「問題変数」と称する)が%ERROR_VAL%との形式にて表される。   The left side and the right side, which are information related to the source code, indicate the contents of the process executed by the source code related to the processing position and the processing type described above. The information on the left side and the right side is collectively referred to as processing information. In the present embodiment, the contents of processing in the source code are described using a regular expression description and information of a specific variable separated by a “%” symbol. In the present embodiment, as information on a specific variable, a variable related to a problem pointed out as a tool in the static verification device (hereinafter referred to as “problem variable”) is displayed in the form of% ERROR_VAL%. Be done.

左辺及び右辺にて示される情報の形式は、先に説明した処理タイプに応じて定められる。処理タイプが「Insert」である場合には、左辺及び右辺は、処理位置及び処理タイプの各々に関連するソースコードにおける左辺及び右辺にて行われることが想定される処理を示す。   The format of the information shown in the left side and the right side is determined according to the processing type described above. When the processing type is “Insert”, the left side and the right side indicate processing assumed to be performed on the left side and the right side in the source code associated with each of the processing position and the processing type.

処理タイプが「Eval」又は「reference」である場合には、左辺は、ソースコードにおける処理位置及び処理タイプの各々に対応する箇所を示す。そして、この場合には、右辺は、“−”との形式にてソースコードに対応する処理等がないことを示す。   When the processing type is “Eval” or “reference”, the left side indicates a position corresponding to each of the processing position and processing type in the source code. Then, in this case, the right side indicates that there is no processing or the like corresponding to the source code in the form of "-".

本実施形態においては、図2に示すように、選別ルール番号が1の選別ルールにおいて、左辺は“*”であり。また、右辺は“realloc.*(%ERROR_VAL%”である。なお、左辺に与えられている“*”は、正規表現にて一般に用いられる“*”(アスタリスク)を示し、任意の文字列を表す。このように、正規表現を用いた表現を可能とすることで、処理情報として、特段の条件がない場合を含む任意の条件が容易に指定される。   In the present embodiment, as shown in FIG. 2, in the sorting rule with the sorting rule number 1, the left side is “*”. The right side is “realloc. * (% ERROR_VAL%). Note that“ * ”given to the left side indicates“ * ”(asterisk) generally used in regular expressions and an arbitrary character string As described above, by making it possible to express using a regular expression, any condition can be easily specified as the processing information, including the case where there is no particular condition.

上述の例では、左辺及び右辺は、上述した問題変数を引数としてメモリブロックを再割り当てする処理を行うrealloc関数等の戻り値を、任意の変数に代入する処理に関連することを示す。したがって、この選別ルールは、メモリブロックを再割り当てする処理を行うrealloc関数の実行に起因して生じるメモリリークに関連するツール指摘を選別することを示している。   In the above example, the left side and the right side indicate that it relates to the process of substituting the return value of the realloc function or the like that performs the process of reallocating the memory block with the problem variable described above as an argument. Therefore, this sorting rule indicates that the tool issues associated with the memory leak resulting from the execution of the realloc function that performs the process of reassigning the memory block are sorted out.

本実施形態においては、選別ルール番号が2の選別ルールにおいて、左辺は“^[]=%ERROR_VAL%”である。また、右辺は“−”である。したがって、この選別ルールは、条件式等の評価において、問題変数の値を別の対象に代入することに起因して生じるツール指摘を選別することを示している。   In the present embodiment, in the sorting rule whose sorting rule number is 2, the left side is “^ [] =% ERROR_VAL%”. Also, the right side is "-". Therefore, this sorting rule indicates that in the evaluation of a conditional expression etc., the tool indication that arises due to substituting the value of the problem variable into another object is sorted out.

また、選別ルール番号が3の選別ルールにおいて、「問題作りこみ行」の処理位置に関して、左辺に “*”であり、右辺は“malloc”である。また、「中間」の処理に関して、左辺は、“if(%ERROR_VAL%.* != NULL)”であり、右辺は“−”である。そして、「問題発生行」の処理位置に関して、左辺には“*”が、右辺には、“¥*.*%ERROR_VAL%”が与えられている。この選別ルールは、メモリブロックを割り当てるmalloc関数の実行後、問題変数がNULLを示したまま当該変数が参照されることに起因して生じるNULLポインタ参照に関するツール指摘を選別することを示している。   In addition, in the sorting rule of sorting rule number 3, regarding the processing position of “Problem making lines”, “*” is on the left side and “malloc” on the right side. In addition, regarding the processing of “middle”, the left side is “if (% ERROR_VAL%. *! = NULL)” and the right side is “−”. Then, regarding the processing position of the “problem occurrence line”, “*” is given to the left side, and “¥ *. *% ERROR_VAL%” is given to the right side. This sorting rule indicates that, after the execution of the malloc function that allocates a memory block, it is possible to sort out a tool indication about a NULL pointer reference that occurs due to the reference of the variable while the problem variable indicates NULL.

選別ルール取得部110は、上述した選別ルールを任意の方法にて取得する。例えば、選別ルール取得部110は、上述した選別ルールに含まれる各項目を編集する構成を備えてもよい。この場合には、選別ルール取得部110において、選別ルールの追加や削除、また、選別ルールに含まれる各項目の追加、更新、削除等が実行される。すなわち、選別ルール取得部110は、上述のようにして編集された選別ルールを取得する。   The sorting rule acquisition unit 110 acquires the above-described sorting rule by any method. For example, the sorting rule acquisition unit 110 may be configured to edit each item included in the above-described sorting rule. In this case, the sorting rule acquisition unit 110 executes addition, deletion, and addition, update, and deletion of each item included in the sorting rule. That is, the sorting rule acquisition unit 110 acquires the sorting rule edited as described above.

また、選別ルール取得部110は、他のツールやシステムにて作成された選別ルールを取得する構成であってもよい。この場合には、選別ルール取得部110は、通信ネットワークや、ファイルやメモリ等の任意の記憶手段を介して選別ルールを取得する。   In addition, the sorting rule acquisition unit 110 may be configured to acquire a sorting rule created by another tool or system. In this case, the sorting rule acquisition unit 110 acquires the sorting rule via a communication network or an arbitrary storage unit such as a file or a memory.

なお、図2の例では、問題ルール名として3つのルールが指定されている例が示されている。しかしながら、問題ルール名として、静的検証装置にて検証が行われる任意のルールが指定可能である。また、図2に問題ルール名として示されているルールに対して、選別ルール取得部110は、図2と異なる内容の選別ルールを取得して用いてもよい。   In the example of FIG. 2, an example in which three rules are specified as the problem rule name is shown. However, any rule whose verification is performed by the static verification device can be specified as the problem rule name. Further, with respect to the rules shown as the problem rule names in FIG. 2, the sorting rule acquisition unit 110 may acquire and use sorting rules having contents different from those in FIG. 2.

解析部120は、解析情報を導出する。解析情報は、上述のように、ツール指摘とソースコードに関する情報とを関連付ける情報である。解析部120は、静的検証装置において検証の対象とされるソースコードと、当該ソースコードに関して静的検証装置から示されるツール指摘に関する情報とを取得して、解析情報を導出する。   The analysis unit 120 derives analysis information. The analysis information is information that associates the tool indication with the information on the source code, as described above. The analysis unit 120 derives analysis information by acquiring source code to be verified in the static verification apparatus and information on a tool indication indicated from the static verification apparatus with respect to the source code.

図3は、解析部120にて用いられるツール指摘の一覧に関する情報の一例である。図3に示すツール指摘の一覧に関する情報は、静的検証装置から示されるツール指摘について、「問題ルール名」、「問題変数名」及びソース情報である「ファイル名」と「行番号」に関する情報をツール指摘ごとにまとめた情報の一覧である。   FIG. 3 is an example of information on a list of tool indications used in the analysis unit 120. The information on the list of tool issues shown in FIG. 3 is information on “problem rule name”, “problem variable name”, and “file name” and “line number” which are source information, for the tool issue shown from the static verification device. It is a list of the information which put together for each tool issue.

図3において、指摘番号が1であるツール指摘は、問題変数名として指摘される変数bufferに対して、問題ルールMemoryLeak(すなわち、メモリリーク)に該当する可能性があるとの指摘がなされていることを示す。また、このツール指摘に関する問題は、少なくともファイルa.c及びd.cにおける各々の行番号に示された処理において生じていることが示されている。
同様に、指摘番号2又は3が付されたツール指摘は、それぞれソース情報として示されるファイルにおける行番号の位置にて、問題変数として示される変数に対して、問題ルールにて示される問題に該当する可能性があることを示している。
In FIG. 3, it is pointed out that the tool pointed out that the pointed number is 1 may fall under the problem rule MemoryLeak (that is, memory leak) for the variable buffer pointed out as the problem variable name. Indicates that. Also, the problem with this tool pointed out at least the files a. c and d. It is shown that it occurs in the process shown in each line number in c.
Similarly, the tool indicated by the indicated number 2 or 3 corresponds to the problem indicated by the problem rule for the variable indicated as the problem variable at the position of the line number in the file indicated as the source information. It indicates that there is a possibility.

なお、問題ルール名及び問題変数名は、選別ルールの説明にて上述した問題ルール名及び問題変数名と同じ内容を示す。また、ファイル名及び行番号に関する情報は、検証対象であるソースコードにおいて上述した問題ルールに関連する処理が行われたファイル名と、該ファイル名における行番号とを示す。   The problem rule name and the problem variable name indicate the same contents as the problem rule name and the problem variable name described above in the description of the sorting rule. Further, the information on the file name and the line number indicates the file name on which the process related to the problem rule described above is performed in the source code to be verified, and the line number in the file name.

解析部120は、静的検証装置から示されるツール指摘を例えば指摘ごとに取得して、図3に示す形式の情報を適宜生成してもよい。また、解析部120は、予め静的検証装置において図3等の形式にまとめられたツール指摘の一覧に関する情報を取得してもよい。   The analysis unit 120 may acquire a tool indication indicated from the static verification device, for example, for each indication, and appropriately generate information in the form shown in FIG. In addition, the analysis unit 120 may obtain information on a list of tool indications that has been compiled in advance in the format of FIG. 3 or the like in the static verification device.

図4は、解析部120にて導出される解析情報の一例を示す図である。図4に示す例では、解析情報は、図3に示すツール指摘の一覧に関する情報に対して、ソース情報に含まれる処理タイプに関する情報、並びに左辺及び右辺に関する情報(すなわち、上述した処理情報)が付された情報である。なお処理タイプは、選別ルールの説明にて上述した処理タイプと同様の内容を示す。   FIG. 4 is a diagram showing an example of analysis information derived by the analysis unit 120. As shown in FIG. In the example shown in FIG. 4, the analysis information includes the information on the processing type included in the source information and the information on the left side and the right side (that is, the processing information described above) with respect to the information on the list of tool indications shown in It is the attached information. The process type indicates the same content as the process type described above in the description of the sorting rule.

解析部120は、図3に示すツール指摘の一覧に関する情報に関して、例えば当該ツール指摘に含まれるソース情報にて示されたソースコードの該当する行等を参照して、解析情報を導出する。   The analysis unit 120 derives analysis information with reference to the corresponding line of the source code indicated by the source information included in the tool indication, for example, regarding the information on the list of the tool indication shown in FIG. 3.

より具体的には、解析部120は、図3に示されるツール指摘の一覧に関する情報にて示されるソース情報に基づいて、ソースコードの該当する行等を参照する。そして、解析部120には、当該ソースコードの該当する行等の記載に基づいて、処理タイプ並びに左辺及び右辺に関する情報を判別して決定する。   More specifically, the analysis unit 120 refers to the corresponding line or the like of the source code based on the source information indicated by the information on the list of tool indications shown in FIG. 3. Then, the analysis unit 120 determines and determines the processing type and the information on the left side and the right side based on the description of the corresponding line etc. of the source code.

すなわち、解析部120は、ソースコードの該当する行等に、if、switch、for、while等の条件分岐に関する処理を示す記述がある場合には、処理タイプを「Eval」と決定する。解析部120は、処理タイプが「Eval」とされていない場合において、ソースコードの該当する行等に“=”等の代入に関する記述がある場合には、処理タイプを「Insert」と決定する。そして、解析部120は、処理タイプが「Eval」又は「Insert」のいずれにもされていない場合には、処理タイプを「reference」と決定する。   That is, when there is a description indicating processing related to conditional branching such as if, switch, for, while, etc., in the corresponding line of the source code, the analysis unit 120 determines the processing type as “Eval”. If the processing type is not "Eval", the analysis unit 120 determines that the processing type is "Insert" when there is a description related to substitution such as "=" in the corresponding line of the source code. Then, when the processing type is neither “Eval” nor “Insert”, the analysis unit 120 determines the processing type as “reference”.

また、解析部120は、処理タイプが「Insert」である場合には、ソースコードの該当する行における“=”等の代入に関する記述の左辺及び右辺を、それぞれ解析情報における左辺及び右辺とする。そして、解析部120は、処理タイプが「Eval」又は「reference」である場合には、ソースコードの該当する行の記載を解析情報における左辺とする。この場合には、解析部は、解析情報における右辺を上述した“−”とする。   Further, when the processing type is “Insert”, the analysis unit 120 sets the left side and the right side of the description related to substitution such as “=” in the corresponding line of the source code as the left side and the right side in the analysis information. Then, when the processing type is “Eval” or “reference”, the analysis unit 120 sets the description of the corresponding line of the source code as the left side in the analysis information. In this case, the analysis unit sets the right side in the analysis information to “−” described above.

図4に示す例では、例えば指摘番号が1であるツール指摘に関して、解析部120は、少なくともソースコードとして少なくともa.c及びd.cを参照する。この例においては、ファイルa.c及びd.cはC++言語にて記述されており、行番号10(すなわち、ファイルa.cの10行目)には、“pointer=malloc(10);”との記述があることを想定する。なお、poinerは変数であり、mallocメモリブロックを割り当てる関数であり、“=”は代入を表す。この場合に、解析部120は、当該行番号に関する解析結果として、当該行番号における処理にて代入が行われることから、処理タイプを「Insert」と決定する。そして、解析部120は、決定した処理タイプに応じて、左辺を“pointer”、右辺を“malloc(10)”と決定する。   In the example illustrated in FIG. 4, for example, with respect to the tool indication having an indication number of 1, the analysis unit 120 at least performs at least a. c and d. See c. In this example, files a. c and d. c is described in the C ++ language, and it is assumed that the line number 10 (ie, the 10th line of the file a.c) has a description of "pointer = malloc (10);". Note that poiner is a variable, which is a function that allocates malloc memory blocks, and “=” indicates assignment. In this case, the analysis unit 120 determines that the process type is “Insert” because substitution is performed in the process of the line number as an analysis result of the line number. Then, the analysis unit 120 determines the left side as “pointer” and the right side as “malloc (10)” according to the determined processing type.

また、ファイルa.cの行番号12には、“printf(“%s”,test)”との記述がある場合を想定する。この場合に、解析部120は、当該行番号に関する解析結果として、当該行番号における処理が代入等や条件分岐等に関する処理ではないことから、処理タイプを「reference」と決定する。そして、解析部120は、決定した処理タイプに応じて、左辺を“printf(“%s”,test)”とし、右辺は対応する処理がないことを示すように“−”であると決定する。   Also, file a. It is assumed that the description “printf (“% s ”, test)” is present in the line number 12 of c. In this case, the analysis unit 120 determines that the process type is “reference”, as the process at the line number is not a process relating to substitution or the like or conditional branching as an analysis result on the line number. Then, the analysis unit 120 determines that the left side is “printf (“% s ”, test)” and the right side is “−” to indicate that there is no corresponding process according to the determined process type. .

同様に、ファイルd.cの行番号15には、“if(buffer!=NULL)” との記述がある場合を想定する。この場合に、解析部120は、当該行番号に関する解析結果として、当該行番号における処理が条件分岐に関する記述であることから、処理タイプを「Eval」と決定する。そして、解析部は、決定した処理タイプに応じて、左辺を“if(buffer!=NULL)”とし、右辺は“−”と決定する。   Similarly, file d. It is assumed that the description of “if (buffer! = NULL)” is present at line 15 of c. In this case, the analysis unit 120 determines that the processing type is “Eval” because the processing at the line number is a description related to a conditional branch as an analysis result on the line number. Then, the analysis unit sets the left side as “if (buffer! = NULL)” and the right side as “−” according to the determined processing type.

各々のツール指摘におけるソース情報に含まれる他の行に関しても、解析部120は、それぞれ同様の手順で解析を行い、解析結果を導出する。   The analysis unit 120 analyzes the other lines included in the source information in each tool indication according to the same procedure, and derives the analysis result.

選別部130は、上述のように、解析情報及び選別ルールに基づいて、選別ルールに関係するツール指摘を選別する。すなわち、選別部130は、選別ルールにて指定されている条件に基づいて、ツール指摘のうち、必要とされる指摘を抽出する。選別ルールとして、選別ルール取得部110において図2に示すようなルールが取得されている場合、選別部130は、例えば図5に示す例のように、選別ルールに関係するツール指摘を選別する。   The sorting unit 130 sorts the tool indications related to the sorting rule based on the analysis information and the sorting rule as described above. That is, the sorting unit 130 extracts, from among the tool indications, the required indications based on the conditions specified in the sorting rule. When a rule as shown in FIG. 2 is acquired in the classification rule acquisition unit 110 as a classification rule, the classification unit 130, for example, as shown in FIG. 5, selects tool indications related to the classification rule.

最初に、図5の(1)に示すように、選別部130は、選別ルールの一つにて指定されている問題ルール名と、解析情報に含まれるツール指摘にて指摘されている問題ルール名とを確認する。   First, as shown in (1) of FIG. 5, the sorting unit 130 determines the problem rule name specified in one of the sorting rules and the problem rule pointed out by the tool indicated in the analysis information. Confirm the name and.

選別ルールの一つにて指定されている問題ルール名と同じ問題ルール名に関する指摘が解析情報に含まれるツール指摘に存在しない場合には、選別部130は、当該問題ルール名に関して選別すべき指摘はないとする。当該問題ルール名に関する指摘がツール指摘に存在する場合には、選別部130は、当該問題ルール名に関する指摘がツール指摘を、選別ルールに関係するツール指摘の候補として決定する。   If an issue about the same problem rule name as a problem rule name designated in one of the sorting rules does not exist in the tool issue included in the analysis information, the sorting unit 130 issues an issue that should be sorted regarding the relevant problem rule name I do not have. If an indication about the problem rule name is present in the tool indication, the selecting unit 130 determines the tool indication that the indication about the problem rule name is a tool indication candidate related to the selection rule.

図5の例では、選別部130は、例えば、ルール番号1の選別ルールに関して、問題ルール名が“MemoryLeak”であるツール指摘が解析情報に含まれているかを確認する。図5の例では、同じ問題ルール名に関するツール指摘として、指摘番号1のツール指摘が存在する。したがって、選別部130は、指摘番号1のツール指摘を、当該選別ルールに関係するツール指摘の候補として決定し、処理を継続する。   In the example of FIG. 5, for example, with respect to the selection rule of rule number 1, the selection unit 130 confirms whether or not a tool indication whose problem rule name is “MemoryLeak” is included in the analysis information. In the example of FIG. 5, the tool indication of the indication number 1 exists as a tool indication on the same problem rule name. Therefore, the sorting unit 130 determines the tool indication of the indication number 1 as a candidate for a tool indication related to the selection rule, and continues the processing.

当該問題ルール名に関する指摘がツール指摘に存在する場合には、選別部130は、図5の(2)に示すように、選別ルールに含まれる処理位置の指定に基づいて、ツール指摘において確認の対象とする処理を特定する。すなわち、選別部130は、上述した選別ルールの一つにて指定されている処理位置の指定に応じて、上述したツール指摘において確認の対象とする処理を特定する。   When an indication about the problem rule name is present in the tool indication, as shown in (2) of FIG. 5, the selecting unit 130 confirms in the tool indication based on the designation of the processing position included in the selection rule. Identify the target process. That is, according to the designation of the processing position designated by one of the above-described sorting rules, the sorting unit 130 identifies the processing to be confirmed in the tool indication described above.

具体的には、選別部130は、処理位置が「問題作りこみ行」である場合には、である場合には、選別部130は、先に指定されたツール指摘において最初の行における処理を確認の対象として決定する。また、選別部130は、処理位置が「中間」である場合には、先に指定されたツール指摘において最初及び最後の行における処理を除く処理を確認の対象として決定する。処理位置が「問題発生行」である場合には、選別部130は、先に指定されたツール指摘において最後の行における処理を確認の対象として決定する。   Specifically, in the case where the processing position is “problem creation row”, the sorting unit 130 performs the processing in the first row in the tool indication specified earlier. Decide as the target of confirmation. In addition, when the processing position is “middle”, the sorting unit 130 determines the processing except the processing in the first and last lines in the tool indication specified earlier as the target of confirmation. When the processing position is the “problem occurrence row”, the sorting unit 130 determines the processing in the last row as the target of confirmation in the tool indication designated earlier.

図5の例では、ルール番号1の選別ルールにおいては、処理位置として「問題発生行」が指定されている。そのため、選別部130は、先に決定された指摘番号1のツール指摘に含まれるソース情報のうち、最後の行における処理(すなわちファイルd.cの行番号20における処理)を確認の対象として決定する。   In the example of FIG. 5, in the sorting rule of rule number 1, “problem occurrence line” is designated as the processing position. Therefore, the sorting unit 130 determines the processing in the last line (that is, the processing in the line number 20 of the file d.c) among the source information included in the tool indication of the indication number 1 determined previously as the target of confirmation. Do.

なお、選別ルールにおいて複数の処理位置が指定されている場合には、選別部130は、当該処理位置の各々について、ツール指摘において確認の対象とする処理が行われる行を特定する。   When a plurality of processing positions are designated in the sorting rule, the sorting unit 130 specifies, for each of the processing positions, a line on which a process to be confirmed in tool indication is performed.

ツール指摘において確認の対象とする処理が決定されると、選別部130は、図5の(3)に示すように、処理タイプの確認を行う。すなわち、選別部130は、上述した選別ルールの一つにて指定されている処理タイプと、先の処理にて決定された選別ルールにおける確認の対象とする処理における処理タイプが一致するかを確認する。   When the process to be confirmed is determined in the tool indication, the selecting unit 130 confirms the process type as shown in (3) of FIG. That is, the sorting unit 130 checks whether the process type specified in one of the above-described sorting rules matches the process type in the process to be confirmed in the sorting rule determined in the previous process. Do.

これらの2つの処理タイプが一致する場合には、選別部130は、決定されているツール指摘が選別ルールに関係するルールの候補であるとして処理を継続する。これらの2つの処理タイプが一致しない場合には、選別部130は、決定されているツール指摘は、選別すべき指摘はないと判断する。   If these two processing types match, the sorting unit 130 continues the processing, assuming that the tool indication being determined is a candidate for a rule related to the sorting rule. If these two processing types do not match, the sorting unit 130 determines that the tool indication being determined has no indication to be sorted.

図5に示す例では、ルール番号1の選別ルールにおいては、処理位置として指定されている処理は一つである。そして、当該処理位置に関する処理タイプは、「Insert」である。また、ツール指摘において先に特定された行における処理タイプは、同様に「Insert」である。したがって、選別部130は、当該ツール指摘はルール番号1の選別ルールに関係するルールの候補であるとして処理を継続する。   In the example shown in FIG. 5, in the selection rule of rule number 1, there is one process designated as the process position. And the processing type regarding the processing position concerned is "Insert". In addition, the processing type in the line specified above in the tool indication is "Insert" as well. Therefore, the sorting unit 130 continues the process as the tool indication is a candidate of a rule related to the sorting rule of rule number 1.

なお、選別ルールの処理位置として「中間」が指定されている場合には、ツール指摘には、処理タイプの確認が必要となる処理に関する行が複数存在する場合がある。この場合には、選別部130は、選別ルールにて「中間」との処理位置が指定された処理の全てに関して、ツール指摘に含まれる処理の処理タイプを確認する。選別部130は、選別ルールの処理位置にて「中間」が指定された処理に関する行の全てについて、ツール指摘に含まれる処理のいずれかと処理タイプが一致する場合に、当該ツール指摘を選別ルールに関係するルールの候補であるとする。   When “middle” is designated as the processing position of the sorting rule, there may be a plurality of lines relating to processing for which confirmation of the processing type is required in the tool indication. In this case, the sorting unit 130 checks the process type of the process included in the tool indication for all the processes for which the process position of “middle” is specified in the sorting rule. When the processing type matches any one of the processes included in the tool indication for all the lines related to the process for which “middle” is designated at the process position of the selection rule, the selection unit 130 sets the tool indication to the selection rule Assume that it is a candidate for related rules.

ツール指摘において処理タイプに関する確認が行われると、選別部130は、図5(4)に示すように、左辺及び右辺の確認を行う。すなわち、選別部130は、選別ルールにおける各々の処理位置に関する処理情報である左辺及び右辺と、解析情報におけるツール指摘において先に特定された行に関する左辺及び右辺とを比較する。そして、選別部130は、例えば上述する二つの左辺及び右辺がそれぞれ一致すると判断できるかを判断する。   When confirmation regarding the processing type is performed in the tool indication, the selection unit 130 confirms the left side and the right side as shown in FIG. 5 (4). That is, the sorting unit 130 compares the left side and the right side, which are processing information regarding each processing position in the sorting rule, with the left side and the right side regarding the row specified in the tool indication in the analysis information. Then, the sorting unit 130 determines, for example, whether it can be determined that the two left sides and the right sides described above match.

なお、選別ルールにおいては、左辺及び右辺が正規表現等を用いて記載されている。この左辺及び右辺として記載された正規表現に、ツール指摘における先に特定された行に関する左辺及び右辺が該当する場合に、選別部130は、これらがそれぞれ一致すると判断する。
また、選別ルールにおいては、先に説明したように、左辺又は右辺に、問題変数が%ERROR_VAL%との形式にて表されている場合がある。選別部130は、この変数に関する情報を、ツール指摘における“問題変数名”の項目を参照して取得してもよい。
In the sorting rule, the left side and the right side are described using a regular expression or the like. When the left side and the right side of the previously specified line in the tool indication correspond to the regular expressions described as the left side and the right side, the selecting unit 130 determines that these correspond to each other.
Further, in the sorting rule, as described above, the problem variable may be represented in the form of% ERROR_VAL% on the left side or the right side. The sorting unit 130 may obtain information on the variable with reference to the item of “problem variable name” in the tool indication.

そして、選別部130は、上述する二つの左辺及び右辺がそれぞれ一致すると判断できる場合に、該当するツール指摘が選別ルールに関係するとして選別する。上述する二つの左辺及び右辺がそれぞれ一致すると判断できない場合に、選別部130は、確認の対象としたツール指摘は、選別すべき指摘はないと判断する。   Then, when it is determined that the two left sides and the right sides described above match, the sorting unit 130 sorts the corresponding tool indication as related to the sorting rule. If it can not be determined that the two left sides and the right sides described above match, the sorting unit 130 determines that the tool indication that is the target of the confirmation does not indicate the indication to be sorted.

図5に示す例では、ルール番号1の選別ルールにおいては、左辺は“*”、右辺は“realloc.*(%ERROR_VAL%”である。また、ツール指摘において先に特定された行における左辺は“buffer”であり、右辺は“realloc(buffer,20)”である。   In the example shown in Fig. 5, in the sorting rule of rule No. 1, the left side is "*" and the right side is "realloc. * (% ERROR_VAL%). Also, in the tool indication, the left side in the previously identified line is The right side is "realloc (buffer, 20)".

この場合に、選別ルールにおける左辺は“*”であることから、任意の文字列がこの左辺に該当する。したがって、選別部130は、選別ルールの左辺と、ツール指摘の左辺とは一致していると判断する。   In this case, since the left side in the sorting rule is "*", an arbitrary character string corresponds to this left side. Therefore, the sorting unit 130 determines that the left side of the sorting rule matches the left side of the tool indication.

また、選別ルールにおける右辺に関して、“realloc”に関しては、対応する記載がツール指摘において特定された行にも記載されている。そして、ツール指摘において、問題変数は“buffer”と指摘されていることから、選別ルールにおける右辺にある“%ERROR_VAL%”は“buffer”とみなすことができる。すなわち、選別ルールにおける右辺にある“%ERROR_VAL%”に相当する記載が、ツール指摘に記載されている。したがって、図5に示す例において、選別部130は、選別ルールの右辺と、ツール指摘の右辺とは一致していると判断できる。   Also, with regard to the right side in the sorting rule, regarding "realloc", the corresponding description is also described in the line specified in the tool indication. Then, since the problem variable is pointed out as "buffer" in the tool indication, "% ERROR_VAL%" on the right side in the sorting rule can be regarded as "buffer". That is, the description corresponding to “% ERROR_VAL%” on the right side of the sorting rule is described in the tool indication. Therefore, in the example illustrated in FIG. 5, the sorting unit 130 can determine that the right side of the sorting rule matches the right side of the tool indication.

図5に示す例では、以上の処理によって、選別部130は、選別ルール番号が1の選別ルールに基づいて、指摘番号が1のツール指摘は選別すべき指摘であるとして選別する。   In the example shown in FIG. 5, according to the above process, the sorting unit 130 sorts the tool indication having the indication number of 1 as the indication to be sorted based on the selection rule having the selection rule number of 1.

なお、選別部130は、選別ルール及びツール指摘において複数の処理が存在する場合には、処理タイプや処理位置等に応じて、必要となる全ての左辺及び右辺に関する確認を行う。   In addition, when there are a plurality of processes in the sorting rule and the tool indication, the sorting unit 130 checks all necessary left sides and right sides according to the processing type, the processing position, and the like.

また、選別部130にて選別されたツール指摘は、適宜任意の出力手段を介して出力される。   Further, the tool indications selected by the selection unit 130 are output through an arbitrary output unit as appropriate.

続いて、図6を用いて、本発明の第1の実施形態における指摘選別装置100の動作の一例について説明する。   Then, an example of operation | movement of the indication sorting apparatus 100 in the 1st Embodiment of this invention is demonstrated using FIG.

最初に、選別ルール取得部110は、静的検証装置からの出力であるツール指摘を選別する条件である選別ルールを取得する(ステップS101)。   First, the sorting rule acquisition unit 110 acquires a sorting rule which is a condition for sorting tool indications which is an output from the static verification device (step S101).

次に、解析部120は、解析情報を導出するため、ツール指摘及び静的検証装置にて検証の対象となったソースコードを取得する(ステップS102)。取得したツール指摘及びソースコードに基づいて、解析部120は、解析情報を導出する(ステップS103)。解析部120は、複数のツール指摘が静的検証装置から出力されている場合には、その全てに関して解析情報を導出してもよいし、予め定められた条件等に基づいて、一部のツール指摘に関して解析情報を導出してもよい。複数のツール指摘が静的検証装置から出力されている場合、解析部120は、必要とされるツール指摘に関して解析情報が導出されるまで、繰り返して各々のツール指摘に対して解析情報を導出するように動作する(ステップS104)。   Next, in order to derive analysis information, the analysis unit 120 acquires a source code that has been a target of verification by the tool indication and static verification apparatus (step S102). Based on the acquired tool indication and source code, the analysis unit 120 derives analysis information (step S103). When a plurality of tool indications are output from the static verification device, the analysis unit 120 may derive analysis information regarding all of them, or, based on a predetermined condition, a part of the tools may be derived. Analysis information may be derived for the indication. When a plurality of tool indications are output from the static verification device, the analysis unit 120 repeatedly derives analysis information for each tool indication until analysis information is derived regarding the required tool indications. It operates as (step S104).

次に、選別部130は、選別ルールとツール指摘とに基づいて、選別ルールに関係するツール指摘を選別する(ステップS105)。複数の選別ルールが指定されている場合には、選別部130は、全ての選別ルールに関してツール指摘を選別してもよい。また、選別部130は、例えば問題ルール名ごと等、予め定めた条件等に基づいて、一部の選別ルールに関して解析情報を導出してもよい。複数の選別ルールが指定されている場合には、選別部130は、必要な選別ルールに対してツール指摘が選別されるまで、ツール指摘の選別を繰り返すように動作してもよい(ステップS106)。   Next, the sorting unit 130 sorts tool indications related to the sorting rule based on the sorting rule and the tool indications (step S105). If a plurality of sorting rules are specified, the sorting unit 130 may sort tool indications for all sorting rules. In addition, the sorting unit 130 may derive analysis information regarding some sorting rules based on predetermined conditions and the like, such as for each problem rule name. When a plurality of sorting rules are specified, the sorting unit 130 may operate so as to repeat the sorting of the tool issues until the tool issues are sorted for the required sorting rule (step S106). .

なお、選別部130にて選別されたツール指摘は、適宜図示しない出力手段から出力される。この出力手段には、表示手段、ファイルやメモリなどの記憶手段、通信ネットワーク等が含まれる。また、選別部130にて選別されたツール指摘は、静的検証ツールからの出力を分析する他のツールに対して出力されてもよい。   The tool indications selected by the selection unit 130 are output from output means (not shown) as appropriate. The output means includes display means, storage means such as files and memories, communication networks and the like. Also, the tool indications sorted by the sorting unit 130 may be output to another tool that analyzes the output from the static verification tool.

また、本発明の第1の実施形態における指摘選別装置100は、図7に示すフローチャートのように動作してもよい。   Further, the indication / sorting device 100 in the first embodiment of the present invention may operate as shown in the flowchart of FIG. 7.

図7に示すフローチャートにおいて、ステップS102からステップS106に関する処理は、図6に示すフローチャートにおいて同じ番号が付された処理と同じように行われる。   In the flowchart shown in FIG. 7, the processes related to steps S102 to S106 are performed in the same manner as the processes to which the same numbers are attached in the flowchart shown in FIG.

図7に示すフローチャートにおける動作では、指摘選別装置100は、ステップS102にてツール指摘及びソースコードを取得し、ステップS103及びS104において解析情報を導出する。指摘選別装置100は、その後、例えば静的検証装置の利用者等にて編集された選別ルールを取得する(ステップS111)。   In the operation in the flowchart shown in FIG. 7, the indication / selection device 100 acquires a tool indication and a source code in step S102, and derives analysis information in steps S103 and S104. Thereafter, the indication / selection device 100 acquires, for example, the selection rule edited by the user of the static verification device or the like (step S111).

ステップS111にて選別ルールを取得すると、指摘選別装置100は、ステップS105及びS106においてツール指摘の選別を行う。このようにすることで、静的検証装置の利用者は、本実施形態における指摘選別装置100を用いて静的検証ツールの指摘を選別する場合に、予め静的検証装置による指摘を参照することが可能となる。そのため、静的検証装置の利用者は、静的検証装置による指摘を参照しつつ、効率的に選別ルールを決定することが可能となる。   When the sorting rule is acquired in step S111, the indication / sorting device 100 sorts the tool indication in steps S105 and S106. By doing this, the user of the static verification device refers in advance to the indication by the static verification device when selecting the indication of the static verification tool using the indication sorting device 100 in the present embodiment. Is possible. Therefore, the user of the static verification device can efficiently determine the sorting rule while referring to the indication by the static verification device.

以上のとおり、本発明の第1の実施形態における指摘選別装置100は、選別すべきツール指摘に関する選別ルールを取得し、当該ツール指摘及びソースコードに関する情報を解析して、選別すべきツール指摘を選択する。本実施形態における指摘選別装置100は、静的検証装置の種類に依存せずに、選別ルールに基づいてツール指摘を自動的に選別することができる。   As described above, the indication / sorting device 100 according to the first embodiment of the present invention acquires the sorting rule on the tool indication to be sorted, analyzes the information on the tool indication and the source code, and selects the tool indication to be sorted. select. The indication / selection device 100 in the present embodiment can automatically select tool indications based on the selection rule without depending on the type of static verification device.

また、本実施形態における指摘選別装置100にて選別されるツール指摘は、当該指摘に含まれるソースコードの処理位置、処理タイプ、ソースコードの記述等に基づいて設定される。すなわち、本実施形態における指摘選別装置100の利用者は、選別すべきツール指摘の条件を詳細に設定することが可能となる。
そして、選別されるツール指摘のソースコードに関する指摘は、正規表現等が用いられる。すなわち、本実施形態における指摘選別装置100の利用者は、選別ルールを容易に設定することが可能となる。
In addition, the tool indication selected by the indication sorting device 100 in the present embodiment is set based on the processing position of the source code, the processing type, the description of the source code, and the like included in the indication. That is, the user of the indication / sorting device 100 in the present embodiment can set in detail the condition of the tool indication to be sorted.
Then, for the indication on the source code of the tool indication to be selected, a regular expression or the like is used. That is, the user of the pointed selection device 100 in the present embodiment can easily set the selection rule.

したがって、本実施形態における指摘選別装置100は、静的検証装置の指摘を効率的に確認することを可能にする。   Therefore, the indication sorting device 100 in the present embodiment makes it possible to efficiently confirm the indication of the static verification device.

(本発明の実施形態における指摘選別装置の適用例)
本実施形態における指摘選別装置100は、種々の形態にて実現される。一例として、本実施形態における指摘選別装置100は、制定検証装置とは独立して単体で用いられてもよい。この場合には、指摘選別装置100は、例えば静的検証装置の利用者が静的検証装置からのツール指摘を参照する場合に、必要に応じて適宜用いられる。
また、この場合には、指摘選別装置100は、選別ルールやツール指摘の取得や結果の出力を可能とするよう、例えばコマンドラインインターフェース(Command Line Interface, CLI)を備えていてもよい。なお、指摘選別装置100は、グラフィカルユーザーインターフェース(Graphical User Interface,GUI)等の他のインターフェースを備えていてもよい。
(Application example of the indication sorting device in the embodiment of the present invention)
The indication sorting device 100 in the present embodiment is realized in various forms. As an example, the indication sorting device 100 in the present embodiment may be used alone as a single entity independent of the enactment verification device. In this case, for example, when the user of the static verification device refers to the tool indication from the static verification device, the designation / sorting device 100 is appropriately used as needed.
Further, in this case, the indication and sorting device 100 may be provided with, for example, a command line interface (CLI) so as to enable acquisition of sorting rules and tool indications and output of results. Note that the indication / filtering device 100 may have another interface such as a graphical user interface (GUI).

また、指摘選別装置100は、図8に示すように、静的検証装置を有する静的検証システムに組み込まれてもよい。図8は、本発明の実施形態における指摘選別装置を有する静的検証システムの構成例を示す図である。図8においては、静的検証システム10は、静的検証装置11と、上述の指摘選別装置100を有する。そして、指摘選別装置100は、静的検証装置11にて検証が行われた際に出力されるツール指摘に関する選別を行う。   In addition, as shown in FIG. 8, the indication sorting device 100 may be incorporated into a static verification system having a static verification device. FIG. 8 is a diagram showing an example of the configuration of a static verification system having the indication / sorting device in the embodiment of the present invention. In FIG. 8, the static verification system 10 includes a static verification device 11 and the above-described indication / sorting device 100. Then, the indication sorting device 100 performs sorting on a tool indication that is output when the static verification device 11 verifies.

その他に、静的検証装置100は、例えば上述した静的検証システム等の形態にて、ソフトウェアの統合開発環境に組み込まれて用いられてもよい。   In addition, the static verification device 100 may be incorporated and used in an integrated development environment of software, for example, in the form of the static verification system described above.

以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。また、実施形態における構成は、本発明のスコープを逸脱しない限りにおいて、互いに組み合わせることが可能である。   As mentioned above, although this invention was demonstrated with reference to embodiment, this invention is not limited to the said embodiment. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. Further, the configurations in the embodiments can be combined with each other without departing from the scope of the present invention.

10 静的検証システム
11 静的検証装置
100 指摘選別装置
110 選別ルール取得部
120 解析部
130 選別部
500 情報処理装置
501 CPU
502 ROM
503 RAM
504 プログラム
505 記憶装置
506 記録媒体
507 ドライブ装置
508 通信インターフェース
509 ネットワーク
510 入出力インターフェース
511 バス
10 static verification system 11 static verification device 100 indication sorting device 110 sorting rule acquisition unit 120 analysis unit 130 sorting unit 500 information processing device 501 CPU
502 ROM
503 RAM
504 program 505 storage device 506 recording medium 507 drive device 508 communication interface 509 network 510 input / output interface 511 bus

Claims (9)

静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別する条件を示す選別ルールを取得する選別ルール取得手段と、
前記ツール指摘と、前記ソースコードに関する情報とを関連付け、前記ツール指摘に含まれる前記ソースコードにおける処理の種類を示す処理タイプに関する情報を解析情報として導出する解析手段と、
前記解析情報及び前記選別ルールに基づいて、前記選別ルールに関係する前記ツール指
摘を選別する選別手段とを備える指摘選別装置。
A sorting rule acquiring unit for acquiring a sorting rule indicating a condition for sorting a tool indication which is a result of the source code being verified by the static verification device;
An analysis unit that associates the tool indication and information on the source code, and derives, as analysis information, information on a process type indicating the type of process in the source code included in the tool indication ;
And a sorting unit configured to sort the tool indications related to the sorting rule based on the analysis information and the sorting rule.
前記選別ルール取得手段は、前記選別ルールとして、前記ツール指摘に含まれる処理の
順序関係を示す情報であって、前記ツール指摘として指摘される問題の原因となりうる処理が行われる問題作りこみ行、前記問題の原因となる処理から当該問題が実際に発生し得るまでの途中の処理に関係する中間、及び前記問題が実際に発生し得る問題発生行の3つから選択される処理位置に関する情報を取得する、請求項1に記載の指摘選別装置。
The sorting rule acquisition means is information indicating the order relation of processing included in the tool indication as the sorting rule, and a problem creating line in which processing that may cause a problem pointed out as the tool indication is performed. Information regarding the processing position selected from three of the intermediate related to the process on the way from the process causing the problem to the time when the problem may actually occur and the problem line where the problem may actually occur The indication sorting device according to claim 1 which acquires.
前記選別ルール取得手段は、前記選別ルールとして、前記処理位置に関連して実行され
る処理の種類を示す、代入、評価、参照を含む前記処理タイプに関する情報を取得する、請求項2に記載の指摘選別装置。
The sorting rule acquisition means acquires information on the processing type including substitution, evaluation, and reference indicating the type of processing to be executed in relation to the processing position as the sorting rule. Pointed sorting device.
前記選別ルール取得手段は、前記選別ルールとして、前記処理位置及び前記処理タイプに関連して前記ソースコードにて行われる処理の内容を示す処理情報を取得する請求項3に記載の指摘選別装置。   4. The indication and sorting device according to claim 3, wherein the sorting rule acquisition unit acquires, as the sorting rule, processing information indicating contents of processing performed in the source code in relation to the processing position and the processing type. 前記解析手段は、前記ツール指摘に含まれる前記ソースコードにおける処理を前記処理情報として導出する、請求項4に記載の指摘選別装置。   5. The indication sorting device according to claim 4, wherein the analysis means derives processing in the source code included in the tool indication as the processing information. 前記選別手段は、前記解析情報及び前記選別ルールについて、各々に含まれる前記処理
位置、前記処理タイプ及び前記処理情報がそれぞれ所定の条件を満たす場合に前記解析情
報に含まれる前記ツール指摘を選別する、請求項からのいずれかに記載の指摘選別装置。
The sorting means sorts the tool indication included in the analysis information when the processing position, the processing type, and the processing information included in each of the analysis information and the sorting rule satisfy predetermined conditions. The indication sorting device according to any one of claims 4 to 5 .
請求項1からのいずれか一項に記載の指摘選別装置と、
プログラムのソースコードを検証する静的検証装置とを備え、
前記指摘選別装置は、前記静的検証装置にて検証が行われた結果を前記ツール指摘とし
て指摘の選別を行う静的検証システム。
The indication sorting device according to any one of claims 1 to 6 ,
And a static verification device to verify the program source code,
The static verification system, wherein the indication / sorting device performs the sorting of the indication as the tool indication as a result of the verification performed by the static verification unit.
静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別す
る条件を示す選別ルールを取得し、
前記ツール指摘と、前記ソースコードに関する情報とを関連付け、前記ツール指摘に含まれる前記ソースコードにおける処理の種類を示す処理タイプに関する情報を解析情報として導出し、
前記解析情報及び前記選別ルールに基づいて、前記選別ルールに関係する前記ツール指
摘を選別する指摘選別方法。
Obtain a sorting rule that indicates the condition for sorting out tool indications that are the result of the source code being verified by the static verification device,
Associating the tool indication with the information on the source code, and deriving, as analysis information, information on a process type indicating a type of process in the source code included in the tool indication;
An index selection method for selecting the tool indication related to the selection rule based on the analysis information and the selection rule.
コンピュータに、
静的検証装置にてソースコードに対する検証が行われた結果であるツール指摘を選別す
る条件を示す選別ルールを取得する処理と、
前記ツール指摘と、前記ソースコードに関する情報とを関連付け、前記ツール指摘に含まれる前記ソースコードにおける処理の種類を示す処理タイプに関する情報を解析情報として導出する処理と、
前記解析情報及び前記選別ルールに基づいて、前記選別ルールに関係する前記ツール指
摘を選別する処理とを実行させるプログラム。
On the computer
A process of acquiring a sorting rule indicating a condition for sorting a tool indication which is a result of the source code being verified by the static verification device;
A process of associating the tool indication and information on the source code, and deriving, as analysis information, information on a process type indicating a type of process in the source code included in the tool indication;
A program for executing processing for selecting the tool indication related to the selection rule based on the analysis information and the selection rule.
JP2015034293A 2015-02-24 2015-02-24 Indication sorting apparatus, indication sorting method and program Active JP6476994B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015034293A JP6476994B2 (en) 2015-02-24 2015-02-24 Indication sorting apparatus, indication sorting method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015034293A JP6476994B2 (en) 2015-02-24 2015-02-24 Indication sorting apparatus, indication sorting method and program

Publications (2)

Publication Number Publication Date
JP2016157255A JP2016157255A (en) 2016-09-01
JP6476994B2 true JP6476994B2 (en) 2019-03-06

Family

ID=56826076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015034293A Active JP6476994B2 (en) 2015-02-24 2015-02-24 Indication sorting apparatus, indication sorting method and program

Country Status (1)

Country Link
JP (1) JP6476994B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5665128B2 (en) * 2011-05-30 2015-02-04 日本電気通信システム株式会社 Static analysis support device, static analysis support method, and program
JP5335885B2 (en) * 2011-12-26 2013-11-06 みずほ情報総研株式会社 Analysis result evaluation system, analysis result evaluation method, and analysis result evaluation program

Also Published As

Publication number Publication date
JP2016157255A (en) 2016-09-01

Similar Documents

Publication Publication Date Title
JP6217212B2 (en) Test program, test method and test apparatus
US8549478B2 (en) Graphical user interface input element identification
US9081595B1 (en) Displaying violated coding rules in source code
JP5874891B2 (en) Program test apparatus, program test method, and program
EP2960799A1 (en) Defect localization in software integration tests
CN109800147B (en) A test case generation method and terminal device
CN106776334B (en) Comment-based test case generation method and device
CN113805883B (en) Method and system for creating application programs
JP2012164211A (en) Software similarity evaluation method
WO2014157056A1 (en) Source program analysis system, source program analysis method, and recording medium on which program is recorded
US20120185669A1 (en) Program inspection method and non-transitory, computer readable storage medium storing inspection program
CN115630054A (en) Method, device and electronic equipment for data restoration
JP2013077124A (en) Software test case generation device
JP6002507B2 (en) Software verification program and software verification system
CN104885060B (en) Data leakage updates and checks that the leakage of device, data updates inspection method
JP5402936B2 (en) GUI evaluation system, GUI evaluation method, and GUI evaluation program
JP6476994B2 (en) Indication sorting apparatus, indication sorting method and program
US20130226868A1 (en) Method and system for propagation of amendments made to a master to copies
JP2011170697A (en) Software structure analyzing device
US10417110B2 (en) Method for verifying traceability of first instructions in a procedural programming language generated from second instructions in a modelling language
US9600245B2 (en) Computer-implemented method for generating control unit program code and message management environment relating thereto
US20080195453A1 (en) Organisational Representational System
JP5962779B2 (en) Flag access defect inspection device, flag access defect inspection method, flag access defect inspection program
JP2009181180A (en) Inspection program, inspection method, and inspection device of program creating tool
JP5578625B2 (en) Program analysis apparatus, program analysis method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180912

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181106

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190121

R150 Certificate of patent or registration of utility model

Ref document number: 6476994

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150