[go: up one dir, main page]

JP2016071774A - Verification support device, verification support method, and computer program - Google Patents

Verification support device, verification support method, and computer program Download PDF

Info

Publication number
JP2016071774A
JP2016071774A JP2014202868A JP2014202868A JP2016071774A JP 2016071774 A JP2016071774 A JP 2016071774A JP 2014202868 A JP2014202868 A JP 2014202868A JP 2014202868 A JP2014202868 A JP 2014202868A JP 2016071774 A JP2016071774 A JP 2016071774A
Authority
JP
Japan
Prior art keywords
group
groups
information
defect candidate
source code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014202868A
Other languages
Japanese (ja)
Other versions
JP6369269B2 (en
Inventor
山本 淳一
Junichi Yamamoto
淳一 山本
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 JP2014202868A priority Critical patent/JP6369269B2/en
Publication of JP2016071774A publication Critical patent/JP2016071774A/en
Application granted granted Critical
Publication of JP6369269B2 publication Critical patent/JP6369269B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To reduce a time required for an operation for verifying whether an inspection result of a source code of a computer program (program) is correct.SOLUTION: A data creation part 2 of a verification support device 1 extracts groups of source code lines relating to processing determined to have a risk of generating a failure, on the basis of inspection result information added to an inspected source program, as failure candidate code groups from the inspected source program. The data creation part 2 sorts a plurality of the source code lines constituting the failure candidate code groups into expression groups including expression lines, which are the source code lines that generate failures, and factor groups including factor lines, which are the source code lines that is to be the factors of the failures. A calculation part 3 calculates a similarity between the expression groups and a similarity between the factor groups in a plurality of the failure candidate code groups extracted by the data creation part 2. A support part 4 presents information that includes information of the similarities calculated by the calculation part 3.SELECTED DRAWING: Figure 1

Description

本発明は、開発中のコンピュータプログラム(ソフトウェア)を検査する技術に関する。   The present invention relates to a technique for inspecting a computer program (software) under development.

近年のソフトウェア(コンピュータプログラム)開発において、開発規模の拡大により、ソフトウェア(ソースプログラム)におけるソースコードの論理的な誤り(不具合)を摘出する作業は多大な手間と時間を要するようになってきている。このため、その摘出作業を補助するために、ソフトウェアを実行せずにソースコードを解析することによって、ソースコードの不具合を指摘するツール(以下、静的解析ツールとも記載する)が開発されている。そのようなツールは、例えば、検査対象のソースプログラムのソースコードが入力すると、当該ツール(システム)内部で独自のプログラムフローを構築し、バグやセキュリティ脆弱性について検査し、検査結果を出力する。   In recent software (computer program) development, with the expansion of development scale, the work of extracting logical errors (problems) in the source code in software (source program) has become very time-consuming and time-consuming. . For this reason, in order to assist the extraction work, a tool that points out a bug in the source code by analyzing the source code without executing the software (hereinafter also referred to as a static analysis tool) has been developed. . For example, when the source code of a source program to be inspected is input, such a tool constructs a unique program flow inside the tool (system), inspects for bugs and security vulnerabilities, and outputs inspection results.

このような静的解析ツールを利用することにより、ソフトウェアの開発時間の短縮化を図ることができる。しかしながら、汎用の静的解析ツールは、検査対象のソースプログラムにおいて、実際には不具合が発生しないのに不具合が発生する虞があるとの指摘(検査結果)を数多く出力してしまう。このため、プログラム開発者は、その指摘(検査結果)の検証(確認)に無用な時間を取られる場合がある。   By using such a static analysis tool, it is possible to shorten the software development time. However, the general-purpose static analysis tool outputs a large number of indications (inspection results) that there is a possibility that a problem may occur in the source program to be inspected even though the problem does not actually occur. For this reason, the program developer may take unnecessary time for verification (confirmation) of the indication (inspection result).

このようなプログラム開発者の負担を軽減するために、例えば、特許文献1には、次のような技術が開示されている。その技術とは、不具合発生の虞があると静的解析ツールにより指摘(判断)されたプログラム部分の位置情報や種別情報に基づいて、不具合を指摘された複数のプログラム部分をグループ分けする技術である。また、特許文献2には、ソースコードの構文情報を基に、不具合を指摘された複数のプログラム部分間の類似度を算出し、類似度の高いプログラム部分の対(ペア)を提示する技術が開示されている。   In order to reduce the burden on such a program developer, for example, Patent Document 1 discloses the following technique. The technology is a technique for grouping multiple program parts that have been pointed out based on the location information and type information of the program part that is pointed out (determined) by the static analysis tool when there is a risk of a problem occurring. is there. Patent Document 2 discloses a technique for calculating a similarity between a plurality of program parts that have been pointed out based on syntax information of source code and presenting a pair of program parts having a high similarity. It is disclosed.

特開2012−248050号公報JP 2012-248050 A 特許第5125938号公報Japanese Patent No. 512538

特許文献1に開示されている技術では、不具合を指摘されたプログラム部分がグループ分けされた状態で提示される。そのグループ分けの判断基準となる情報は、プログラム部分の位置情報や種別情報である。これら情報は不具合が発生するか否かの検証に役立つ情報ではないことから、不具合を指摘されたプログラム部分がグループ分けされた状態で提示されても、それらプログラム部分の検証作業の時間短縮化を図ることは難しい。   In the technique disclosed in Patent Document 1, the program parts pointed out to be defective are presented in a grouped state. Information that is a criterion for determining the grouping is position information and type information of the program part. Since these pieces of information are not useful information for verifying whether or not a failure will occur, even if program parts that have been pointed out are presented in groups, the time required for verifying those program parts can be shortened. It is difficult to plan.

また、特許文献2の技術では、類似度の高いプログラム部分の対が提示されるが、それら対のうちの一方が、検証により不具合が発生しない正常なプログラム部分であると判断されても、他方も不具合が発生しないとは言い切れない。このため、対を成すプログラム部分の両方共に検証する必要があり、特許文献2に開示されている技術も、検証作業の時間短縮化を図ることは難しい。   Further, in the technique of Patent Document 2, a pair of program parts having a high degree of similarity is presented. Even if it is determined that one of the pairs is a normal program part that does not cause a problem by verification, It cannot be said that there will be no problems. For this reason, it is necessary to verify both of the paired program parts, and it is difficult for the technique disclosed in Patent Document 2 to shorten the verification work time.

本発明は上記課題を解決するために考え出された。すなわち、本発明の主な目的は、静的解析ツールによる検査結果を検証する作業に要する時間を短縮化する技術を提供することにある。   The present invention has been devised to solve the above problems. That is, the main object of the present invention is to provide a technique for shortening the time required for the work of verifying the inspection result by the static analysis tool.

上記目的を達成するために、本発明の検証支援装置は、
コンピュータにより実行される複数の処理のそれぞれの処理手順を表す複数のソースコード行が配列されている検査済みのソースプログラムに付加されている検査結果情報に基づいて、前記検査済みのソースプログラムに従って実行可能な複数の前記処理のうち、不具合が発生する虞がある前記処理に関連する前記ソースコード行のグループを不具合候補コード群として前記検査済みのソースプログラムから抽出し、また、前記不具合候補コード群を構成する複数の前記ソースコード行を、不具合が発生する前記ソースコード行である発現行を含む発現グループと、その不具合の要因となる前記ソースコード行である要因行を含む要因グループとに分けるデータ作成部と、
前記データ作成部により抽出された前記不具合候補コード群が複数であった場合に、それら抽出された前記不具合候補コード群における前記発現グループ同士および前記要因グループ同士の類似度を算出する算出部と、
前記算出部により算出された前記類似度の情報を含む情報を提示する支援部と
を備える。
In order to achieve the above object, the verification support apparatus of the present invention provides:
Execution according to the inspected source program based on inspection result information added to the inspected source program in which a plurality of source code lines representing respective processing steps of the plurality of processes executed by the computer are arranged Among the plurality of possible processes, a group of the source code lines related to the process that may cause a defect is extracted as a defect candidate code group from the inspected source program, and the defect candidate code group Are divided into an expression group including an expression line that is the source code line in which a defect occurs and a factor group including a factor line that is the source code line that causes the defect. A data creation unit;
When there are a plurality of defect candidate code groups extracted by the data creation unit, a calculation unit that calculates the similarity between the expression groups and the factor groups in the extracted defect candidate code groups,
A support unit that presents information including information on the similarity calculated by the calculation unit.

また、本発明の検証支援方法は、
コンピュータにより実行される複数の処理のそれぞれの処理手順を表す複数のソースコード行が配列されている検査済みのソースプログラムに付加されている検査結果情報に基づいて、前記検査済みのソースプログラムに従って実行可能な複数の前記処理のうち、不具合が発生する虞がある前記処理に関連する前記ソースコード行のグループを不具合候補コード群として前記検査済みのソースプログラムから抽出し、
また、前記不具合候補コード群を構成する複数の前記ソースコード行を、不具合が発生する前記ソースコード行である発現行を含む発現グループと、その不具合の要因となる前記ソースコード行である要因行を含む要因グループとに分け、
前記抽出された前記不具合候補コード群が複数であった場合に、それら抽出された前記不具合候補コード群における前記発現グループ同士および前記要因グループ同士の類似度を算出し、
その算出された前記類似度の情報を含む情報を提示する。
Further, the verification support method of the present invention includes:
Execution according to the inspected source program based on inspection result information added to the inspected source program in which a plurality of source code lines representing respective processing steps of the plurality of processes executed by the computer are arranged Among the plurality of possible processes, a group of the source code lines related to the process that may cause a defect is extracted from the inspected source program as a defect candidate code group,
A plurality of source code lines constituting the defect candidate code group, an expression group including an expression line that is the source code line in which the defect occurs, and a factor line that is the source code line that causes the defect Divided into factor groups including
When there are a plurality of the extracted defect candidate code groups, calculate the similarity between the expression groups and the factor groups in the extracted defect candidate code groups,
Information including the calculated similarity information is presented.

さらに、本発明のコンピュータプログラムは、
コンピュータにより実行される複数の処理のそれぞれの処理手順を表す複数のソースコード行が配列されている検査済みのソースプログラムに付加されている検査結果情報に基づいて、前記検査済みのソースプログラムに従って実行可能な複数の前記処理のうち、不具合が発生する虞がある前記処理に関連する前記ソースコード行のグループを不具合候補コード群として前記検査済みのソースプログラムから抽出する処理と、
また、前記不具合候補コード群を構成する複数の前記ソースコード行を、不具合が発生する前記ソースコード行である発現行を含む発現グループと、その不具合の要因となる前記ソースコード行である要因行を含む要因グループとに分ける処理と、
前記抽出された前記不具合候補コード群が複数であった場合に、それら抽出された前記不具合候補コード群における前記発現グループ同士および前記要因グループ同士の類似度を算出する処理と、
その算出された前記類似度の情報を含む情報を提示する処理と
をコンピュータに実行させる処理手順が表されている。
Furthermore, the computer program of the present invention is
Execution according to the inspected source program based on inspection result information added to the inspected source program in which a plurality of source code lines representing respective processing steps of the plurality of processes executed by the computer are arranged A process of extracting from the inspected source program a group of source code lines related to the process that may cause a failure among the plurality of possible processes as a defect candidate code group;
A plurality of source code lines constituting the defect candidate code group, an expression group including an expression line that is the source code line in which the defect occurs, and a factor line that is the source code line that causes the defect Processing to be divided into factor groups including
When there are a plurality of the extracted defect candidate code groups, a process of calculating the similarity between the expression groups and the factor groups in the extracted defect candidate code groups;
A processing procedure for causing a computer to execute a process of presenting information including the calculated similarity information is shown.

なお、本発明の前記主な目的は、本発明の検証支援装置に対応する本発明の検証支援方法によっても達成される。また、本発明の前記主な目的は、本発明の検証支援装置および検証支援方法に対応するコンピュータプログラムによっても達成される。   The main object of the present invention is also achieved by the verification support method of the present invention corresponding to the verification support apparatus of the present invention. The main object of the present invention is also achieved by a computer program corresponding to the verification support apparatus and verification support method of the present invention.

本発明によれば、コンピュータプログラムのソースコードに対する検査の結果を検証する作業に要する時間を短縮化できる。   ADVANTAGE OF THE INVENTION According to this invention, the time which the operation | work which verifies the result of the test | inspection with respect to the source code of a computer program can be shortened.

本発明に係る第1実施形態の検証支援装置の構成を簡略化して表すブロック図である。It is a block diagram which simplifies and represents the structure of the verification assistance apparatus of 1st Embodiment which concerns on this invention. 本発明に係る第2実施形態の検証支援装置の構成を簡略化して表すブロック図である。It is a block diagram which simplifies and represents the structure of the verification assistance apparatus of 2nd Embodiment which concerns on this invention. 検査対象のソースプログラムの具体例と、第2実施形態における不具合候補コード群(指摘情報一覧)の具体例を表す図である。It is a figure showing the specific example of the source program of test | inspection, and the specific example of the defect candidate code group (pointing information list) in 2nd Embodiment. 第2実施形態において不具合候補コード群が要因グループと発現グループに分けられた状態の具体例を表す図である。It is a figure showing the specific example of the state by which defect candidate code group was divided into the factor group and the expression group in 2nd Embodiment. 第2実施形態における確率計算部が利用する正当性判断情報の具体例を表す図である。It is a figure showing the specific example of the validity judgment information which the probability calculation part in 2nd Embodiment utilizes. 第2実施形態における算出部が算出した結果である類似度の具体例を表す図である。It is a figure showing the specific example of the similarity which is the result which the calculation part in 2nd Embodiment calculated. 第2実施形態における確率計算部が算出した結果である検査結果の信頼度の具体例を表す図である。It is a figure showing the specific example of the reliability of the test result which is the result which the probability calculation part in 2nd Embodiment calculated. 第2実施形態の検証支援装置の一動作例を表すフローチャートである。It is a flowchart showing the example of 1 operation | movement of the verification assistance apparatus of 2nd Embodiment.

以下に、本発明に係る実施形態を図面を参照しつつ説明する。   Embodiments according to the present invention will be described below with reference to the drawings.

<第1実施形態>
図1は、本発明に係る検証支援装置の構成を簡略化して表すブロック図である。この第1実施形態の検証支援装置1は、検査対象のソースプログラム(コンピュータプログラム)に対する検査結果が正しいか否かを検証する作業を支援する装置である。すなわち、ソースプログラムとは、コンピュータにより実行される複数の処理のそれぞれの処理手順(処理フロー)を表す複数のソースコード行が配列されているものである。第1実施形態の検証支援装置1は、例えば静的解析ツールによる検査結果の情報が付加された検査済みのソースプログラムが入力すると、当該ソースプログラムの検査結果に対する検証作業を支援する情報を作成し、当該情報を提示する。
<First Embodiment>
FIG. 1 is a block diagram showing a simplified configuration of a verification support apparatus according to the present invention. The verification support apparatus 1 according to the first embodiment is an apparatus that supports an operation of verifying whether or not an inspection result for a source program (computer program) to be inspected is correct. That is, the source program is a sequence in which a plurality of source code lines representing respective processing procedures (processing flows) of a plurality of processes executed by the computer are arranged. The verification support apparatus 1 according to the first embodiment creates information that supports verification work on the inspection result of the source program when an inspected source program to which the inspection result information by the static analysis tool is added is input, for example. , Present the information.

この検証支援装置1は、例えばCPU(Central Processing Unit)を備えたコンピュータ装置であり、記憶装置6から読み出したコンピュータプログラム(以下、プログラムとも記載する)7を実行することにより、次のような機能を持つ。なお、記憶装置7は、検証支援装置1に内蔵されている場合もあるし、外付けである場合もある。   The verification support apparatus 1 is a computer apparatus provided with, for example, a CPU (Central Processing Unit). By executing a computer program (hereinafter also referred to as a program) 7 read from the storage device 6, the following functions are provided. have. The storage device 7 may be built in the verification support device 1 or may be externally attached.

すなわち、第1実施形態では、検証支援装置1は、機能部として、データ作成部2と、算出部3と、支援部4とを有している。   That is, in the first embodiment, the verification support apparatus 1 includes a data creation unit 2, a calculation unit 3, and a support unit 4 as functional units.

データ作成部2は、検査済みのソースプログラムに付加されている検査結果情報に基づいて、不具合が発生する虞があると判断された処理(処理フロー)に関連するソースコード行のグループを検査済みのソースプログラムから抽出する機能を備えている。ここでは、その抽出されたソースコード行のグループを不具合候補コード群と呼ぶ。   The data creation unit 2 has inspected a group of source code lines related to a process (processing flow) determined to have a possibility of occurrence of a defect based on the inspection result information added to the inspected source program. It has a function to extract from the source program. Here, the group of the extracted source code lines is called a defect candidate code group.

また、データ作成部2は、不具合候補コード群を構成する複数のソースコード行を、不具合が発生するソースコード行である発現行を含む発現グループと、その要因となるソースコード行である要因行を含む要因グループとに分ける機能を備えている。   In addition, the data creation unit 2 includes a plurality of source code lines constituting the defect candidate code group, an expression group including an expression line that is a source code line in which a defect occurs, and a factor line that is a source code line that causes the defect. The function is divided into factor groups including

算出部3は、データ作成部2により複数の不具合候補コード群が抽出された場合に、それら抽出された不具合候補コード群における発現グループ同士および要因グループ同士の類似度を算出する機能を備えている。   The calculation unit 3 has a function of calculating the similarity between expression groups and factor groups in the extracted defect candidate code groups when a plurality of defect candidate code groups are extracted by the data creation unit 2. .

支援部4は、算出部3により算出された類似度の情報を含む情報を提示する機能を備えている。例えば、支援部4は、算出部3により算出された類似度の情報を表示要求と共にディスプレイ装置(表示装置)に出力する。これにより、その類似度の情報がディスプレイ装置に表示されることにより、当該類似度の情報を例えばプログラム開発者に提示できる。また、支援部4は、その類似度の情報を印刷要求と共にプリンタに出力する。これにより、類似度の情報がプリンタにより印刷されることによって、当該類似度の情報を例えばプログラム開発者に提示できる。   The support unit 4 has a function of presenting information including information on the similarity calculated by the calculation unit 3. For example, the support unit 4 outputs the similarity information calculated by the calculation unit 3 to a display device (display device) together with a display request. Thus, the similarity information is displayed on the display device, so that the similarity information can be presented to a program developer, for example. Further, the support unit 4 outputs the similarity information to the printer together with the print request. Thus, the similarity information is printed by the printer, so that the similarity information can be presented to, for example, a program developer.

この第1実施形態の検証支援装置1は上記のような構成を備えていることにより、ソースプログラムの検査結果に対する検証作業の効率化を図ることができる。すなわち、この第1実施形態の検証支援装置1は、不具合候補コード群をさらに発現グループと要因グループに分け、発現グループ同士および要因グループ同士の類似度を算出している。   Since the verification support apparatus 1 according to the first embodiment has the above-described configuration, it is possible to improve the efficiency of verification work on the inspection result of the source program. That is, the verification support apparatus 1 according to the first embodiment further divides the defect candidate code group into the expression group and the factor group, and calculates the similarity between the expression groups and between the factor groups.

不具合候補コード群による処理手順(処理フロー)が一部でも正当でない(換言すれば、静的解析ツールの性能の限界に起因する、有り得ないソースコードの実行過程(処理フロー)が不具合候補コード群に含まれる)場合には、その不具合候補コード群に対する検査結果は正当ではない。このことから、発現グループと要因グループの検査結果(不具合が発生する虞があるという結果)が両方共に正当である場合にのみ、その発現グループと要因グループを含む不具合候補コード群の検査結果(不具合が発生する虞があるという結果)は正当であると判断でき、その不具合候補コード群は、より重点的に検証すべき対象であると判断できる。換言すれば、発現グループと要因グループの少なくとも一方の検査結果が正当でない場合には、不具合候補コード群に対する検査結果は正当でない。つまり、不具合候補コード群に対する検査結果は誤りであって不具合が発生する確率が低いと想定されるから、当該不具合候補コード群は、プログラム開発者による検証作業の必要性が低い。   Even if a part of the processing procedure (processing flow) by the defect candidate code group is not valid (in other words, the impossible source code execution process (processing flow) due to the performance limit of the static analysis tool is the defect candidate code group. In the case of the error candidate code group, the inspection result for the defect candidate code group is not valid. Therefore, only when the test result of the expression group and the factor group (result that there is a possibility of occurrence of a defect) are both valid, the test result of the defect candidate code group including the expression group and the factor group (defects) As a result, the defect candidate code group can be determined to be an object to be verified more carefully. In other words, when the test result of at least one of the expression group and the factor group is not valid, the test result for the defect candidate code group is not valid. That is, since the inspection result for the defect candidate code group is assumed to be erroneous and the probability of occurrence of the defect is low, the defect candidate code group is less required to be verified by the program developer.

例えば、不具合候補コード群の発現グループと、検査結果が正当であることが分かっている発現グループとの類似度が高い(似ていている)場合には、その不具合候補コード群の発現グループの検査結果は正当である可能性(正当性)が高いと想定される。また同様に、不具合候補コード群の要因グループと、検査結果が正当であることが分かっている要因グループとの類似度が高い(似ていている)場合には、その不具合候補コード群の要因グループの検査結果は正当である可能性(正当性)が高いと想定される。このようなことから、検査結果が正当であることが分かっている発現グループと要因グループとの類似度の情報に基づいて、不具合候補コード群の発現グループと要因グループに対する検査結果の正当性を判断することが可能である。そして、このような類似度を利用した正当性判断により、不具合候補コード群の発現グループおよび要因グループの検査結果が共に正当であると判断した場合には、その不具合候補コード群のソースコードは検証すべき対象であると判断することができる。反対に、不具合候補コード群の発現グループと要因グループの少なくとも一方の検査結果が正当でない場合には、その不具合候補コード群は検証作業の対象から外すことができる。これにより、第1実施形態の検証支援装置1により提示される情報によって、検証作業は軽減されることから、第1実施形態の検証支援装置1は、検証作業に要する時間の短縮化を図ることができる。   For example, if the similarity between the expression group of the defect candidate code group and the expression group whose test result is known to be valid is high (similar), the test of the expression group of the defect candidate code group It is assumed that the result is likely to be valid (validity). Similarly, if the similarity between the factor group of the defect candidate code group and the factor group whose test result is known to be valid is high (similar), the factor group of the defect candidate code group It is assumed that there is a high possibility (validity) that the test result is valid. For this reason, the validity of the test results for the expression group and the factor group of the defect candidate code group is determined based on the similarity information between the expression group and the factor group whose test results are known to be valid. Is possible. If it is determined by the validity judgment using such similarity that the inspection results of the defect candidate code group and the cause group are both valid, the source code of the defect candidate code group is verified. It can be determined that it is a target. On the other hand, when the test result of at least one of the expression group and the factor group of the defect candidate code group is not valid, the defect candidate code group can be excluded from the verification work. As a result, the verification work is reduced by the information presented by the verification support apparatus 1 of the first embodiment, so that the verification support apparatus 1 of the first embodiment shortens the time required for the verification work. Can do.

<第2実施形態>
以下に、本発明に係る第2実施形態を説明する。
Second Embodiment
The second embodiment according to the present invention will be described below.

図2は、第2実施形態の検証支援装置の構成を簡略化して表すブロック図である。この検証支援装置10は、第1実施形態の検証支援装置1と同様に、静的解析ツール25によるソースプログラム(アプリケーションプログラム)の検査結果に対する検証作業を支援する情報を提示する装置である。また、検証支援装置10は、第1実施形態の検証支援装置1と同様に、コンピュータ装置により構成されており、記憶装置11から読み出したコンピュータプログラム12を実行することにより、次のような機能を持つことができる。なお、記憶装置11は、検証支援装置10に内蔵されている場合もあるし、外付けである場合もある。   FIG. 2 is a block diagram illustrating a simplified configuration of the verification support apparatus according to the second embodiment. Similar to the verification support apparatus 1 of the first embodiment, the verification support apparatus 10 is an apparatus that presents information that supports verification work on the inspection result of the source program (application program) by the static analysis tool 25. Moreover, the verification support apparatus 10 is comprised by the computer apparatus similarly to the verification support apparatus 1 of 1st Embodiment, By performing the computer program 12 read from the memory | storage device 11, the following functions are carried out. Can have. The storage device 11 may be built in the verification support device 10 or may be externally attached.

すなわち、検証支援装置10は、機能部として、取得部14と、抽出部15と、算出部16と、確率計算部17と、出力部18と、記憶部19とを備えている。   That is, the verification support apparatus 10 includes an acquisition unit 14, an extraction unit 15, a calculation unit 16, a probability calculation unit 17, an output unit 18, and a storage unit 19 as functional units.

記憶部19は、各種の情報(データやプログラム)を格納する記憶媒体を有して構成されている。記憶部19には、取得部14と抽出部15と算出部16と確率計算部17と出力部18により、情報が書き込まれ、また、それら取得部14と抽出部15と算出部16と確率計算部17と出力部18により、記憶部19から情報が読み出される。   The storage unit 19 includes a storage medium that stores various types of information (data and programs). Information is written in the storage unit 19 by the acquisition unit 14, the extraction unit 15, the calculation unit 16, the probability calculation unit 17, and the output unit 18, and the acquisition unit 14, the extraction unit 15, the calculation unit 16, and the probability calculation. Information is read from the storage unit 19 by the unit 17 and the output unit 18.

取得部14は、静的解析ツール25による検査の実行結果の情報(検査結果情報)が付加されている検査済みのソースプログラムを例えば静的解析ツール25から取得する機能を備えている。さらに、取得部14は、次のような指摘情報一覧を作成し、記憶部19に書き込む機能を備えている。指摘情報一覧とは、不具合候補コード群(指摘フロー)と、当該不具合候補コード群を識別するために当該不具合候補コード群に付与された識別番号(指摘番号)とが関連付けられている情報である。なお、不具合候補コード群とは、第1実施形態でも述べた不具合候補コード群と同様に、静的解析ツール25により不具合発生の虞があると指摘(判断)された処理(処理フロー)を表すソースコード行のグループである。   The acquisition unit 14 has a function of acquiring, from, for example, the static analysis tool 25, an inspected source program to which information (inspection result information) of the inspection execution result by the static analysis tool 25 is added. Furthermore, the acquisition unit 14 has a function of creating the following indication information list and writing it in the storage unit 19. The indication information list is information in which a defect candidate code group (indication flow) is associated with an identification number (indication number) assigned to the defect candidate code group in order to identify the defect candidate code group. . The defect candidate code group represents a process (processing flow) that is pointed out (determined) by the static analysis tool 25 that there is a possibility of a defect, as in the defect candidate code group described in the first embodiment. A group of source code lines.

図3は、検査対象のソースプログラムの具体例と、そのソースプログラムが静的解析ツール25により検査された結果に基づいて取得部14が作成する指摘情報一覧の具体例とを表す図である。   FIG. 3 is a diagram illustrating a specific example of a source program to be inspected and a specific example of an indication information list created by the acquisition unit 14 based on a result of the source program being inspected by the static analysis tool 25.

図3に表されている例では、静的解析ツール25により検査が実行されたソースプログラムには、“発現”と“要因”の情報が静的解析ツール25による検査結果情報(付加情報)として付加されている。“発現”の情報は、付加されているソースコード行(図3の例では、行番号7,10のソースコード行)が、不具合が発生する虞があるソースコード行(発現行)であることを表す情報である。“要因”の情報は、付加されているソースコード行(図3の例では、行番号2のソースコード行)が、その不具合発生の要因となるソースコード行(要因行)であることを表す情報である。   In the example shown in FIG. 3, information on “expression” and “factor” is included as test result information (additional information) by the static analysis tool 25 in the source program that has been tested by the static analysis tool 25. It has been added. In the “expression” information, the added source code line (in the example of FIG. 3, the source code lines of line numbers 7 and 10) is a source code line (expression line) that may cause a problem. Is information. The “factor” information indicates that the added source code line (the source code line of line number 2 in the example of FIG. 3) is the source code line (cause line) that causes the malfunction. Information.

抽出部15は、不具合候補コード群を構成する複数のソースコード行を要因グループと発現グループに分ける機能を備えている。発現グループとは、不具合を発生する処理手順(処理フロー)を表すソースコード行のグループであり、発現行を含んでいる。要因グループとは、その不具合の要因となる処理手順(処理フロー)を表すソースコード行のグループであり、要因行を含んでいる。   The extraction unit 15 has a function of dividing a plurality of source code lines constituting the defect candidate code group into a factor group and an expression group. An expression group is a group of source code lines representing a processing procedure (processing flow) that causes a defect, and includes an expression line. The factor group is a group of source code lines representing a processing procedure (processing flow) that causes the defect, and includes a factor line.

図4は、不具合候補コード群の具体例と、その不具合候補コード群を抽出部15がグループ分けした具体例とを表す図である。この具体例に表されているように、例えば、抽出部15は、不具合候補コード群が表す処理手順を開始するソースコード行から要因行(“要因”の情報が付加されているソースコード行)までの処理手順を表すソースコード行のグループを要因グループとして抽出する。また、抽出部15は、要因行の次の処理手順を表すソースコード行から発現行(“発現”の情報が付加されているソースコード行)に至るまでのソースコード行のグループを発現グループとして抽出する。換言すれば、抽出部15は、不具合候補コード群を要因行に基づいて2つのグループに分ける。   FIG. 4 is a diagram illustrating a specific example of a defect candidate code group and a specific example in which the extraction unit 15 groups the defect candidate code group. As shown in this specific example, for example, the extraction unit 15 causes a cause line (a source code line to which “factor” information is added) from a source code line that starts a processing procedure represented by a defect candidate code group. A group of source code lines representing the processing procedure up to is extracted as a factor group. In addition, the extraction unit 15 sets, as an expression group, a group of source code lines from a source code line representing a processing procedure next to a factor line to an expression line (a source code line to which “expression” information is added). Extract. In other words, the extraction unit 15 divides the defect candidate code group into two groups based on the factor rows.

抽出部15は、さらに、そのようにグループ分けした情報を含めた不具合候補コード群を表す情報を更新指摘情報一覧22として記憶部19に書き込む機能を備えている。   The extraction unit 15 further has a function of writing information representing a defect candidate code group including information grouped in this way into the storage unit 19 as an update indication information list 22.

さらに、抽出部15は、グループ分けの結果情報に基づいて、図5(a)に表されるような正当性判断情報一覧23を作成する機能を備えている。正当性判断情報一覧23とは、不具合候補コード群の要因グループおよび発現グループのそれぞれに対する検査結果の正当性についてプログラム開発者が検証し、当該検証の結果が書き込まれる例えばテーブルデータである。なお、抽出部15が作成する正当性判断情報一覧23は、プログラム開発者が正当性判断結果を入力する前に作成される。このため、抽出部15が作成する正当性判断情報一覧23において、図5(a)のように、全てのグループにそれぞれ関連付けられている正当性判断結果の情報は、“未判断”を表す情報(横棒(−))である。   Further, the extraction unit 15 has a function of creating a validity judgment information list 23 as shown in FIG. 5A based on the grouping result information. The validity judgment information list 23 is, for example, table data in which the program developer verifies the validity of the test result for each of the cause group and the expression group of the defect candidate code group, and the result of the verification is written. The validity judgment information list 23 created by the extraction unit 15 is created before the program developer inputs the validity judgment result. Therefore, in the validity judgment information list 23 created by the extraction unit 15, as shown in FIG. 5A, the validity judgment result information associated with all the groups is information indicating “undecided”. (Horizontal bar (-)).

この第2実施形態では、取得部14および抽出部15が、静的解析ツール25による検査済みのソースプログラムから不具合候補コード群を抽出し、さらに、不具合候補コード群を要因グループと発現グループに分けるデータ作成部を構成する。   In the second embodiment, the acquisition unit 14 and the extraction unit 15 extract a defect candidate code group from a source program that has been inspected by the static analysis tool 25, and further divide the defect candidate code group into a factor group and an expression group. Configure the data creation unit.

算出部16は、全ての不具合候補コード群における要因グループ同士および発現グループ同士の類似度を算出する機能を備えている。図6(a)は、算出部16により算出された要因グループ同士の類似度の具体例を表すテーブルデータである。図6(b)は、算出部16により算出された発現グループ同士の類似度の具体例を表すテーブルデータである。   The calculation unit 16 has a function of calculating the similarity between factor groups and expression groups in all defect candidate code groups. FIG. 6A is table data representing a specific example of the similarity between factor groups calculated by the calculation unit 16. FIG. 6B is table data representing a specific example of the similarity between expression groups calculated by the calculation unit 16.

算出部16が類似度を算出する手法には様々な手法が有り、ここでは、何れの手法を採用してもよいが、その一例を挙げると、例えば、最長共通部分列を行単位で利用する算出手法が有る。この算出手法は、例えば、参考文献:T.コルメン、他8名著、「アルゴリズムの設計と解析手法 (アルゴリズムイントロダクション)」、株式会社近代科学社、2007年3月に示されている。図6(a)、(b)は、その最長共通部分列を利用して算出された類似度の算出例である。   There are various methods by which the calculation unit 16 calculates the similarity, and any method may be adopted here. For example, the longest common subsequence is used in units of rows. There is a calculation method. This calculation method is described in, for example, Reference: T.A. Kolmen and 8 other authors, “Algorithm Design and Analysis Method (Algorithm Introduction)”, Modern Science Co., Ltd., shown in March 2007. FIGS. 6A and 6B are calculation examples of similarity calculated using the longest common subsequence.

あるいは、算出部16は、編集距離(レーベンシュタイン距離)やn-グラム頻度に基づいて類似度を算出する手法により、グループ同士の類似度を算出してもよい。このように、算出部16が類似度を算出する手法には様々な手法が有り、これら手法の中から、不具合候補コード群の特徴に応じた分析が可能な手法が適宜選択され算出部16が類似度を算出する手法として採用してよい。なお、類似度を算出する手法を選択する際の参考文献として、竹田正幸、福田智子著、「古典和歌からの知識発見 モビルスーツを着た国文学者」、情報処理学会論文誌、Vol.43、No.9、2002年9月、p.941−949がある。   Alternatively, the calculation unit 16 may calculate the similarity between groups by a method of calculating the similarity based on the edit distance (Levenstein distance) and the n-gram frequency. As described above, there are various methods for the calculation unit 16 to calculate the degree of similarity, and among these methods, a method capable of analyzing according to the characteristics of the defect candidate code group is appropriately selected and the calculation unit 16 selects the method. You may employ | adopt as a method of calculating a similarity. In addition, as a reference when selecting a method for calculating similarity, Masayuki Takeda and Tomoko Fukuda, "Knowledge literary wearing mobile suits from classical Waka", IPSJ Journal, Vol. 43, No. 9, September 2002, p. 941-949.

算出部16は、上記のように算出した類似度の情報を例えば記憶部19に保持されている図6(a)および(b)のようなテーブルデータに書き込む機能を有する。なお、記憶部19が保持する類似度の情報の形態はテーブルデータの態様に限定されない。   The calculation unit 16 has a function of writing the similarity information calculated as described above into, for example, table data as shown in FIGS. 6A and 6B held in the storage unit 19. The form of the similarity information held by the storage unit 19 is not limited to the form of table data.

出力部18は、記憶部19に格納されている情報や、当該検証支援装置10の制御動作に必要な情報の入力をプログラム開発者に促す情報を、例えばディスプレイ装置(図示せず)に出力する機能を備えている。そのディスプレイ装置は、出力部18から受けた情報を表示する機能を備えている。   The output unit 18 outputs information stored in the storage unit 19 and information prompting the program developer to input information necessary for the control operation of the verification support apparatus 10 to, for example, a display device (not shown). It has a function. The display device has a function of displaying information received from the output unit 18.

例えば、出力部18は、プログラム開発者に向けて、正当性判断情報を例えばキーボード等の入力装置を利用して入力することを促す情報をディスプレイ装置(表示装置)に出力する機能を備えている。この出力部18の機能によってディスプレイ装置に表示された情報に基づいて、プログラム開発者が入力装置により入力した正当性判断情報は、書き込み部(図示せず)によって、記憶部19における図5(a)のような正当性判断情報一覧23に書き込まれる。   For example, the output unit 18 has a function of outputting information prompting a program developer to input validity determination information using an input device such as a keyboard to a display device (display device). . Based on the information displayed on the display device by the function of the output unit 18, the validity determination information input by the program developer using the input device is stored in the storage unit 19 in FIG. ) Is written in the validity judgment information list 23 as shown in FIG.

図5(b)は、正当性判断情報一覧23に正当性判断情報が入力された(書き込まれた)状態の一例を表す図である。この図5(b)において、プログラム開発者が実際に問題が発生し得るソースコードの実行過程であると判断したグループ(例えば、識別番号“1”の要因グループを参照)には、静的解析ツール25の検査結果が正しい、つまり、“正当性有り”を表す情報(丸印(○))が正当性判断情報として関連付けられている。また、プログラム開発者が、静的解析ツール25の検査結果は有り得ないソースコードの実行過程である、つまり、検査結果が誤りで検証作業が不要であると判断したグループ(例えば、識別番号“1”の発現グループなどを参照)には、検査結果の“正当性無し”を表す情報(バツ印(×))が正当性判断情報として関連付けられている。さらに、前述したように、プログラム開発者が検証していないグループには、“未判断”を表す情報(横棒(−))が正当性判断情報として関連付けられている。   FIG. 5B is a diagram illustrating an example of a state in which the validity determination information is input (written) in the validity determination information list 23. In FIG. 5B, a static analysis is performed for a group (for example, refer to the factor group with the identification number “1”) that the program developer determines to be a source code execution process that may actually cause a problem. Information (circle mark (◯)) indicating that the inspection result of the tool 25 is correct, that is, “with validity” is associated as validity determination information. In addition, a group (for example, identification number “1”) determined by the program developer that it is a source code execution process in which an inspection result of the static analysis tool 25 cannot exist, that is, the inspection result is incorrect. The information indicating the “no validity” of the test result (cross mark (×)) is associated with the validity determination information. Further, as described above, information (horizontal bar (−)) indicating “undecided” is associated as validity determination information with a group not verified by the program developer.

確率計算部17は、要因グループおよび発現グループに対して、算出部16により算出された類似度の情報と、プログラム開発者による正当性判断情報とに基づいて、静的解析ツール25による検査結果の信頼性の度合い(信頼度)を算出する機能を備えている。ここでは、確率計算部17は、プログラム開発者が検証していない要因グループあるいは発現グループ(つまり、正当性判断情報として“未判断”が関連付けられているグループ)について、検査結果の信頼度を算出する。例えば、図5(b)に表されている例では、識別番号“2”を持つ不具合候補コード群の要因グループと発現グループおよび識別番号“3”を持つ不具合候補コード群の要因グループについて、確率計算部17は、算出動作を実行する。例えば、確率計算部17は、要因グループと発現グループのそれぞれにおいて、識別番号“i”を持つ不具合候補コード群における信頼度P(i)を次の数式(1)に従って算出する。

Figure 2016071774
The probability calculation unit 17 calculates the test result by the static analysis tool 25 based on the similarity information calculated by the calculation unit 16 and the validity determination information by the program developer for the factor group and the expression group. It has a function to calculate the degree of reliability (reliability). Here, the probability calculation unit 17 calculates the reliability of the test result for a factor group or expression group that is not verified by the program developer (that is, a group that is associated with “undecided” as validity judgment information). To do. For example, in the example shown in FIG. 5B, the probability group for the defect candidate code group having the identification number “2”, the expression group, and the factor group of the defect candidate code group having the identification number “3” The calculation unit 17 performs a calculation operation. For example, the probability calculation unit 17 calculates the reliability P (i) in the defect candidate code group having the identification number “i” in each of the factor group and the expression group according to the following equation (1).
Figure 2016071774

なお、数式(1)におけるNは、全ての不具合候補コード群の数を表す。F(i,j)は、識別番号“i”の不具合候補コード群と識別番号“j”の不具合候補コード群の要因グループ同士あるいは発現グループ同士の、算出部16により算出された類似度を表す。B(j)は、次に表される条件に従った数値を表す。

Figure 2016071774
Note that N in Equation (1) represents the number of all defect candidate code groups. F (i, j) represents the similarity calculated by the calculation unit 16 between the factor groups or the expression groups of the defect candidate code group with the identification number “i” and the defect candidate code group with the identification number “j”. . B (j) represents a numerical value according to the following conditions.
Figure 2016071774

さらに、確率計算部17は、算出した結果(検査結果の信頼度)を記憶部19に書き込む機能を備えている。図7は、記憶部19が保持する、算出結果を表す信頼度一覧24の一例を表す図である。出力部18が、例えば、その信頼度一覧24をディスプレイ装置に出力することにより、当該信頼度一覧24がディスプレイ装置に表示され、プログラム開発者に提示される。なお、この第2実施形態では、確率計算部17と出力部18により、静的解析ツール25による検査結果に対する検証作業を支援する情報を提示する支援部が構成される。   Further, the probability calculation unit 17 has a function of writing the calculated result (the reliability of the inspection result) in the storage unit 19. FIG. 7 is a diagram illustrating an example of the reliability list 24 representing the calculation result held by the storage unit 19. For example, when the output unit 18 outputs the reliability list 24 to the display device, the reliability list 24 is displayed on the display device and presented to the program developer. In the second embodiment, the probability calculation unit 17 and the output unit 18 constitute a support unit that presents information that supports verification work on the inspection result by the static analysis tool 25.

この第2実施形態の検証支援装置10は、上記のように構成されている。次に、この検証支援装置10における動作の一例を図8を利用して説明する。なお、図8は、検証支援装置10における動作の一例を表すフローチャートであり、このフローチャートは、検証支援装置(コンピュータ装置)10が実行するコンピュータプログラムの処理手順を表す。   The verification support apparatus 10 of the second embodiment is configured as described above. Next, an example of the operation in the verification support apparatus 10 will be described with reference to FIG. FIG. 8 is a flowchart illustrating an example of an operation in the verification support apparatus 10, and this flowchart represents a processing procedure of a computer program executed by the verification support apparatus (computer apparatus) 10.

例えば、検証支援装置10の取得部14は、静的解析ツール25により検査された検査結果情報を含む検査済みのソースプログラムを取得すると(ステップS101)、当該ソースプログラムから不具合候補コード群を抽出する(ステップS102)。そして、取得部14は、例えば図3に表されるような指摘情報一覧21を作成し、当該指摘情報一覧21の情報を記憶部19に書き込む。   For example, when the acquisition unit 14 of the verification support apparatus 10 acquires an inspected source program including inspection result information inspected by the static analysis tool 25 (step S101), the defect candidate code group is extracted from the source program. (Step S102). Then, the acquisition unit 14 creates an indication information list 21 as illustrated in FIG. 3, for example, and writes the information of the indication information list 21 in the storage unit 19.

然る後に、抽出部15が、静的解析ツール25による検査結果情報(付加情報)に基づいて、各不具合候補コード群を、要因グループと発現グループにグループ分けする(ステップS103)。そして、抽出部15は、図4に表されるような更新指摘情報一覧22を作成し、この情報を記憶部19に書き込む。   Thereafter, the extraction unit 15 groups each defect candidate code group into a factor group and an expression group based on test result information (additional information) from the static analysis tool 25 (step S103). Then, the extraction unit 15 creates an update indication information list 22 as shown in FIG. 4 and writes this information in the storage unit 19.

その後、算出部16は、その更新指摘情報一覧22によるグループ分け情報に基づいた要因グループ同士および発現グループ同士の類似度を算出する(ステップS104)。そして、算出部16は、例えば図6(a)、(b)のような算出結果の情報を記憶部19に書き込む。   Thereafter, the calculation unit 16 calculates the similarity between the factor groups and the expression groups based on the grouping information based on the updated indication information list 22 (step S104). Then, the calculation unit 16 writes information on the calculation results as shown in FIGS. 6A and 6B in the storage unit 19, for example.

一方、抽出部15は、図5(a)に表されるような正当性判断情報一覧23を作成し、当該正当性判断情報一覧23の情報を記憶部19に書き込む。   On the other hand, the extraction unit 15 creates a validity determination information list 23 as shown in FIG. 5A and writes the information of the validity determination information list 23 in the storage unit 19.

その後、出力部18が、不具合候補コード群の情報と、例えばキーボード等の入力装置を利用して正当性判断情報を入力することを促す情報とをディスプレイ装置(表示装置)に出力する。これにより、ディスプレイ装置が、不具合候補コード群の情報と、正当性判断情報の入力を促す情報とを表示する。これにより、プログラム開発者が正当性判断情報を入力したことにより、正当性判断情報を取得すると(ステップS105)、検証支援装置10は、取得した正当性判断情報を記憶部19の正当性判断情報一覧23に図5(b)のように書き込む。   Thereafter, the output unit 18 outputs information on the defect candidate code group and information that prompts the user to input the validity determination information using an input device such as a keyboard to the display device (display device). As a result, the display device displays information on the defect candidate code group and information prompting input of the validity determination information. Thereby, when the program developer acquires the validity determination information by inputting the validity determination information (step S105), the verification support apparatus 10 uses the acquired validity determination information as the validity determination information in the storage unit 19. The list 23 is written as shown in FIG.

その後、確率計算部17は、予め定められたタイミングでもって、正当性判断情報一覧23に、“未判断”の情報が関連付けられているグループが有るか否かを判断する(ステップS106)。その予め定められたタイミングとは、例えば、正当性判断情報一覧23に情報が書き込まれ、かつ、計算実行の指令が例えばプログラム開発者により入力装置を利用して検証支援装置10に入力されたときである。   After that, the probability calculation unit 17 determines whether or not there is a group associated with “undecided” information in the validity determination information list 23 at a predetermined timing (step S106). The predetermined timing is, for example, when information is written in the validity judgment information list 23 and a calculation execution command is input to the verification support apparatus 10 by using, for example, an input device by a program developer. It is.

そして、確率計算部17は、“未判断”のグループが有ると判断した場合には、算出部16による類似度の情報と、プログラム開発者による正当性判断結果の情報とに基づき、“未判断”のグループに対する検査結果の信頼度を算出する(ステップS107)。確率計算部17は、その算出結果を記憶部19に書き込む。   If the probability calculation unit 17 determines that there is an “undetermined” group, the probability determination unit 17 determines that the “undetermined” is based on the similarity information by the calculation unit 16 and the validity determination result information by the program developer. The reliability of the inspection result for the group "" is calculated (step S107). The probability calculation unit 17 writes the calculation result in the storage unit 19.

然る後に、出力部18が、その算出結果および当該算出結果の表示要求を、ディスプレイ装置(表示装置)に出力する(ステップS108)。これにより、ディスプレイ装置が、算出結果を表示する。この際、例えば、“未判断”のグループに対する正当性判断情報の入力をプログラム開発者に促す情報もディスプレイ装置に表示されるようにする。これにより、例えば、正当性判断情報が記憶部19に新たに書き込まれたことを検知すると、確率計算部17は、ステップS106以降の動作を繰り返す。   Thereafter, the output unit 18 outputs the calculation result and a display request for the calculation result to the display device (display device) (step S108). Thereby, a display apparatus displays a calculation result. At this time, for example, information prompting the program developer to input the validity determination information for the “undecided” group is also displayed on the display device. Thereby, for example, when it is detected that the validity determination information is newly written in the storage unit 19, the probability calculation unit 17 repeats the operations after step S106.

また、確率計算部17は、ステップS106の判断動作により、“未判断”のグループが無いと判断した場合には、動作を終了する。これにより、検証支援装置10は、検証済みのソートプログラムの取得から信頼度の算出および出力に関連する一連の動作を終了する。   If the probability calculation unit 17 determines that there is no “undecided” group by the determination operation in step S106, the operation is terminated. As a result, the verification support apparatus 10 ends a series of operations related to calculation and output of reliability from acquisition of the verified sort program.

この第2実施形態の検証支援装置10は、第1実施形態と同様に、静的解析ツール25による検査結果の検証作業の効率化に寄与することができる。特に、この第2実施形態の検証支援装置10は、確率計算部17を備え、静的解析ツール25による検査結果の信頼度を数値化して表示することを実現する構成を備えている。この構成は、不具合候補コード群の検証作業が実際に必要か否かの判断に有効な情報をプログラム開発者に提供できるので、より一層の検証作業の効率化に寄与するものである。   Similar to the first embodiment, the verification support apparatus 10 of the second embodiment can contribute to the efficiency of the inspection result verification work by the static analysis tool 25. In particular, the verification support apparatus 10 according to the second embodiment includes a probability calculation unit 17 and a configuration that realizes quantifying and displaying the reliability of the inspection result by the static analysis tool 25. This configuration can provide the program developer with information effective for determining whether or not the verification process of the defect candidate code group is actually necessary, and thus contributes to further efficiency of the verification process.

<第3実施形態>
以下に、本発明に係る実施形態を説明する。なお、この第3実施形態の説明において、第2実施形態の検証支援装置の構成部分と同一名称部分には同一符号を付し、その共通部分の重複説明は省略する。
<Third Embodiment>
Embodiments according to the present invention will be described below. In the description of the third embodiment, the same reference numerals are given to the same names as the components of the verification support apparatus of the second embodiment, and the duplicate description of the common parts is omitted.

前述した第2実施形態では、抽出部15は、各不具合候補コード群のソースコード行をグループ分けした後に、図4に表されるように、それらグループ分けした情報の一部としてソースコード行がそのまま含まれている態様である。これに代えて、この第3実施形態では、抽出部15は、不具合候補コード群における各グループのソースコードを構文解析し、この構文解析に基づき、各グループに含まれるソースコードの一部を抽象化する構成を備えている。つまり、ソースプログラムに分岐構造を表す構文(例えばC言語では、if文やfor文)が含まれていない場合、そのソースプログラムにおいて、分岐条件の違いによる類似した不具合(指摘の亜種)が発生することは無い。つまり、分岐構造を含まない範囲でソースコードを抽象化しても、第2実施形態で述べたようなグループ同士の類似度には悪影響が及ばない。このことから、この第3実施形態では、抽出部15は、各グループにおいて、分岐構造を含まないソースプログラム部分の一部を、例えばハッシュ関数を用いた符号化により抽象化する。   In the second embodiment described above, the extraction unit 15 groups the source code lines of each defect candidate code group, and then, as shown in FIG. 4, the source code lines are included as part of the grouped information. It is the aspect included as it is. Instead, in the third embodiment, the extraction unit 15 parses the source code of each group in the defect candidate code group, and abstracts a part of the source code included in each group based on the parse analysis. It has a configuration to make it. In other words, if the source program does not contain a branch structure syntax (for example, if statement or for statement in C language), a similar defect (special variant) occurs due to a difference in the branch condition in the source program. There is nothing to do. That is, even if the source code is abstracted in a range not including the branch structure, the similarity between groups as described in the second embodiment is not adversely affected. From this, in this 3rd Embodiment, the extraction part 15 abstracts a part of source program part which does not contain a branch structure in each group, for example by the encoding using a hash function.

この第3実施形態における上記以外の構成は、第2実施形態と同様である。   The other configuration of the third embodiment is the same as that of the second embodiment.

この第3実施形態の検証支援装置10は、第2実施形態と同様に、静的解析ツール25の検査に基づいた不具合候補コード群の中から、実際に検証する不具合候補コード群の絞り込みに有効な情報を例えばプログラム開発者に提供できる。これにより、第3実施形態の検証支援装置10も、検証作業に要する時間の短縮化を図ることができる。   As in the second embodiment, the verification support apparatus 10 of the third embodiment is effective for narrowing down the defect candidate code group to be actually verified from the defect candidate code group based on the inspection of the static analysis tool 25. Such information can be provided to program developers, for example. As a result, the verification support apparatus 10 according to the third embodiment can also shorten the time required for the verification work.

また、この第3実施形態の検証支援装置10は、類似度の算出に悪影響が及ばないように、各グループにおけるソースプログラムの一部を抽象化している。このため、この第3実施形態の検証支援装置10は、類似度の算出の効率化を図ることができる。   Also, the verification support apparatus 10 of the third embodiment abstracts a part of the source program in each group so that the similarity calculation is not adversely affected. For this reason, the verification support apparatus 10 of the third embodiment can improve the efficiency of calculating the similarity.

<その他の実施形態>
なお、本発明は第1〜第3の実施形態に限定されず、様々な実施の形態を採り得る。例えば、第2と第3の実施形態では、検証支援装置10の出力部18は、確率計算部17による検査結果の信頼度を出力している。これに対し、出力部18は、検査結果の信頼度ではなく、算出部16により算出される各グループ同士の類似度を出力してもよい。この場合には、その出力された情報に基づいて、ディスプレイ装置は、各グループ同士の類似度を表示する。このような場合には、検証支援装置10における確率計算部17が省略されていてもよい。また、出力部18は、例えば装置操作者(プログラム開発者)が入力装置を利用して入力した指示情報に応じて、確率計算部17による検査結果の信頼度と、算出部16による類似度との一方を出力する構成としてもよい。
<Other embodiments>
In addition, this invention is not limited to the 1st-3rd embodiment, Various embodiment can be taken. For example, in the second and third embodiments, the output unit 18 of the verification support apparatus 10 outputs the reliability of the inspection result obtained by the probability calculation unit 17. On the other hand, the output unit 18 may output the similarity between the groups calculated by the calculation unit 16 instead of the reliability of the inspection result. In this case, based on the output information, the display device displays the similarity between the groups. In such a case, the probability calculation unit 17 in the verification support apparatus 10 may be omitted. Further, the output unit 18, for example, according to the instruction information input by the device operator (program developer) using the input device, the reliability of the inspection result by the probability calculation unit 17 and the similarity by the calculation unit 16 One of these may be output.

1,10 検証支援装置
2 データ作成部
3,16 算出部
4 支援部
15 抽出部
17 確率計算部
DESCRIPTION OF SYMBOLS 1,10 Verification support apparatus 2 Data preparation part 3,16 Calculation part 4 Support part 15 Extraction part 17 Probability calculation part

Claims (6)

コンピュータにより実行される複数の処理のそれぞれの処理手順を表す複数のソースコード行が配列されている検査済みのソースプログラムに付加されている検査結果情報に基づいて、前記検査済みのソースプログラムに従って実行可能な複数の前記処理のうち、不具合が発生する虞がある前記処理に関連する前記ソースコード行のグループを不具合候補コード群として前記検査済みのソースプログラムから抽出し、また、前記不具合候補コード群を構成する複数の前記ソースコード行を、不具合が発生する前記ソースコード行である発現行を含む発現グループと、その不具合の要因となる前記ソースコード行である要因行を含む要因グループとに分けるデータ作成部と、
前記データ作成部により抽出された前記不具合候補コード群が複数であった場合に、それら抽出された前記不具合候補コード群における前記発現グループ同士および前記要因グループ同士の類似度を算出する算出部と、
前記算出部により算出された前記類似度の情報を含む情報を提示する支援部と
を備える検証支援装置。
Execution according to the inspected source program based on inspection result information added to the inspected source program in which a plurality of source code lines representing respective processing steps of the plurality of processes executed by the computer are arranged Among the plurality of possible processes, a group of the source code lines related to the process that may cause a defect is extracted as a defect candidate code group from the inspected source program, and the defect candidate code group Are divided into an expression group including an expression line that is the source code line in which a defect occurs and a factor group including a factor line that is the source code line that causes the defect. A data creation unit;
When there are a plurality of defect candidate code groups extracted by the data creation unit, a calculation unit that calculates the similarity between the expression groups and the factor groups in the extracted defect candidate code groups,
A verification support apparatus comprising: a support unit that presents information including information on the similarity calculated by the calculation unit.
前記支援部は、前記算出部により算出された前記類似度の情報を含む情報を提示するのに代えて、前記算出部により算出された前記類似度の情報と、前記不具合候補コード群に対して与えられた正当性判断情報とに基づいて、前記不具合候補コード群に対する前記検査結果情報の信頼度を算出し、当該算出結果を提示する請求項1に記載の検証支援装置。   Instead of presenting information including the similarity information calculated by the calculation unit, the support unit performs the similarity information calculated by the calculation unit and the defect candidate code group. The verification support apparatus according to claim 1, wherein a reliability of the inspection result information for the defect candidate code group is calculated based on the given validity determination information, and the calculation result is presented. 前記支援部は、前記正当性判断情報に基づいて、正当性の有無が判断されていないことを検知した前記不具合候補コード群について選択的に前記検査結果情報の信頼度を算出する請求項2に記載の検証支援装置。   The said support part calculates the reliability of the said test result information selectively about the said defect candidate code group which detected that the presence or absence of the validity was not judged based on the said validity judgment information. The verification support apparatus described. 前記データ作成部は、前記不具合候補コード群における前記発現グループと前記要因グループにおいて前記ソースコード行を構文解析し、この構文解析に基づき、かつ、予め定められた条件に応じて選択されたソースプログラム部分を抽象化する機能をさらに備えている請求項1又は請求項2又は請求項3に記載の検証支援装置。   The data creation unit parses the source code lines in the expression group and the factor group in the defect candidate code group, and is a source program selected based on the syntax analysis and according to a predetermined condition The verification support apparatus according to claim 1, further comprising a function of abstracting a part. コンピュータにより実行される複数の処理のそれぞれの処理手順を表す複数のソースコード行が配列されている検査済みのソースプログラムに付加されている検査結果情報に基づいて、前記検査済みのソースプログラムに従って実行可能な複数の前記処理のうち、不具合が発生する虞がある前記処理に関連する前記ソースコード行のグループを不具合候補コード群として前記検査済みのソースプログラムから抽出し、
また、前記不具合候補コード群を構成する複数の前記ソースコード行を、不具合が発生する前記ソースコード行である発現行を含む発現グループと、その不具合の要因となる前記ソースコード行である要因行を含む要因グループとに分け、
前記抽出された前記不具合候補コード群が複数であった場合に、それら抽出された前記不具合候補コード群における前記発現グループ同士および前記要因グループ同士の類似度を算出し、
その算出された前記類似度の情報を含む情報を提示する
検証支援方法。
Execution according to the inspected source program based on inspection result information added to the inspected source program in which a plurality of source code lines representing respective processing steps of the plurality of processes executed by the computer are arranged Among the plurality of possible processes, a group of the source code lines related to the process that may cause a defect is extracted from the inspected source program as a defect candidate code group,
A plurality of source code lines constituting the defect candidate code group, an expression group including an expression line that is the source code line in which the defect occurs, and a factor line that is the source code line that causes the defect Divided into factor groups including
When there are a plurality of the extracted defect candidate code groups, calculate the similarity between the expression groups and the factor groups in the extracted defect candidate code groups,
A verification support method for presenting information including the calculated similarity information.
コンピュータにより実行される複数の処理のそれぞれの処理手順を表す複数のソースコード行が配列されている検査済みのソースプログラムに付加されている検査結果情報に基づいて、前記検査済みのソースプログラムに従って実行可能な複数の前記処理のうち、不具合が発生する虞がある前記処理に関連する前記ソースコード行のグループを不具合候補コード群として前記検査済みのソースプログラムから抽出する処理と、
また、前記不具合候補コード群を構成する複数の前記ソースコード行を、不具合が発生する前記ソースコード行である発現行を含む発現グループと、その不具合の要因となる前記ソースコード行である要因行を含む要因グループとに分ける処理と、
前記抽出された前記不具合候補コード群が複数であった場合に、それら抽出された前記不具合候補コード群における前記発現グループ同士および前記要因グループ同士の類似度を算出する処理と、
その算出された前記類似度の情報を含む情報を提示する処理と
をコンピュータに実行させる処理手順が表されているコンピュータプログラム。
Execution according to the inspected source program based on inspection result information added to the inspected source program in which a plurality of source code lines representing respective processing steps of the plurality of processes executed by the computer are arranged A process of extracting from the inspected source program a group of source code lines related to the process that may cause a failure among the plurality of possible processes as a defect candidate code group;
A plurality of source code lines constituting the defect candidate code group, an expression group including an expression line that is the source code line in which the defect occurs, and a factor line that is the source code line that causes the defect Processing to be divided into factor groups including
When there are a plurality of the extracted defect candidate code groups, a process of calculating the similarity between the expression groups and the factor groups in the extracted defect candidate code groups;
A computer program in which a processing procedure for causing a computer to execute processing for presenting information including information on the calculated similarity is represented.
JP2014202868A 2014-10-01 2014-10-01 Verification support apparatus, verification support method, and computer program Active JP6369269B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014202868A JP6369269B2 (en) 2014-10-01 2014-10-01 Verification support apparatus, verification support method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014202868A JP6369269B2 (en) 2014-10-01 2014-10-01 Verification support apparatus, verification support method, and computer program

Publications (2)

Publication Number Publication Date
JP2016071774A true JP2016071774A (en) 2016-05-09
JP6369269B2 JP6369269B2 (en) 2018-08-08

Family

ID=55867066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014202868A Active JP6369269B2 (en) 2014-10-01 2014-10-01 Verification support apparatus, verification support method, and computer program

Country Status (1)

Country Link
JP (1) JP6369269B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019114154A (en) * 2017-12-26 2019-07-11 三菱電機株式会社 Element similarity determination device, element similarity determination method, and element similarity determination program
WO2022118627A1 (en) * 2020-12-01 2022-06-09 株式会社日立製作所 Calculator and method for selecting correction location of software

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008021244A (en) * 2006-07-14 2008-01-31 Toshiba Corp Source code correction priority setting system and its priority setting method
JP2010079447A (en) * 2008-09-24 2010-04-08 Fujitsu Ltd Bug detection support program, program for outputting list of resembling sentence structure identification information, bug detection support device, and bug detection support method
JP2011113298A (en) * 2009-11-26 2011-06-09 Canon Inc Shared source code analysis system, program, and recording medium
JP2012164211A (en) * 2011-02-08 2012-08-30 Hitachi Ltd Software similarity evaluation method
JP2012248050A (en) * 2011-05-30 2012-12-13 Nec Commun Syst Ltd Static analysis support device, static analysis support method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008021244A (en) * 2006-07-14 2008-01-31 Toshiba Corp Source code correction priority setting system and its priority setting method
JP2010079447A (en) * 2008-09-24 2010-04-08 Fujitsu Ltd Bug detection support program, program for outputting list of resembling sentence structure identification information, bug detection support device, and bug detection support method
JP2011113298A (en) * 2009-11-26 2011-06-09 Canon Inc Shared source code analysis system, program, and recording medium
JP2012164211A (en) * 2011-02-08 2012-08-30 Hitachi Ltd Software similarity evaluation method
JP2012248050A (en) * 2011-05-30 2012-12-13 Nec Commun Syst Ltd Static analysis support device, static analysis support method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019114154A (en) * 2017-12-26 2019-07-11 三菱電機株式会社 Element similarity determination device, element similarity determination method, and element similarity determination program
WO2022118627A1 (en) * 2020-12-01 2022-06-09 株式会社日立製作所 Calculator and method for selecting correction location of software

Also Published As

Publication number Publication date
JP6369269B2 (en) 2018-08-08

Similar Documents

Publication Publication Date Title
US8627290B2 (en) Test case pattern matching
US9208451B2 (en) Automatic identification of information useful for generation-based functional verification
EP2960799A1 (en) Defect localization in software integration tests
JP6440895B2 (en) Software analysis apparatus and software analysis method
JP2016115175A (en) Software test apparatus and software test program
JP2020126603A (en) Automatic candidate correction patch generation
JP2018092361A (en) Test script correction apparatus and test script correction program
US8589734B2 (en) Verifying correctness of processor transactions
JP6369269B2 (en) Verification support apparatus, verification support method, and computer program
CN103365772B (en) Software test automatic evaluation device and method
JP4477054B2 (en) Counterexample analysis support device
US20140281719A1 (en) Explaining excluding a test from a test suite
JP6169302B2 (en) Specification configuration apparatus and method
JP6451417B2 (en) Debug support device, debug support system, debug support method, and debug support program
JPWO2018154657A1 (en) Equivalence verification device and equivalence verification program
US20200257613A1 (en) Automated software program repair
JP5578625B2 (en) Program analysis apparatus, program analysis method, and program
JP6731366B2 (en) Source code verification system
JP2013206310A (en) Model inspection device, model inspection method, and program
JP5910410B2 (en) Schematic program test data generation apparatus and method, and program
JP2015072576A (en) Test item selection device
JP2008204187A (en) Information processor and information processing method
JPH11282722A (en) Program verification method
US8479167B1 (en) Detecting indexing errors in declarative languages
US8560986B2 (en) Computer product, apparatus, and method for correcting assertion

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170915

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180510

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180625

R150 Certificate of patent or registration of utility model

Ref document number: 6369269

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150