JP2023056111A - Software failure analytic device and software failure analytic method - Google Patents

Software failure analytic device and software failure analytic method Download PDF

Info

Publication number
JP2023056111A
JP2023056111A JP2021165227A JP2021165227A JP2023056111A JP 2023056111 A JP2023056111 A JP 2023056111A JP 2021165227 A JP2021165227 A JP 2021165227A JP 2021165227 A JP2021165227 A JP 2021165227A JP 2023056111 A JP2023056111 A JP 2023056111A
Authority
JP
Japan
Prior art keywords
software
analysis
satisfies
test case
function
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.)
Pending
Application number
JP2021165227A
Other languages
Japanese (ja)
Inventor
康文 鈴木
Yasufumi Suzuki
真澄 川上
Masumi Kawakami
和矢 安田
Kazuya Yasuda
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2021165227A priority Critical patent/JP2023056111A/en
Priority to PCT/JP2022/037007 priority patent/WO2023058611A1/en
Publication of JP2023056111A publication Critical patent/JP2023056111A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

To make it possible to efficiently secure and assist in correction on a test case needed to automatically correct a failure of software.SOLUTION: A software failure analytic device 100 is configured to include: a storage device 101 which holds test cases of software and information associated with restrictions on occurrence of a failure in application functions of the test cases; and an arithmetic unit 104 which executes processing to determine a test case satisfying the restrictions on occurrence of the failure among the test cases and processing to output notice of a correction request for expectation as to the test case satisfying the restrictions on occurrence as a result of the determination.SELECTED DRAWING: Figure 2

Description

本発明は、ソフトウェア不具合分析装置及びソフトウェア不具合分析方法に関するものである。 The present invention relates to a software failure analysis device and a software failure analysis method.

ソフトウェアに含まれる不具合は、完全に事前排除する事が難しい。そのため、そうしたソフトウェアから如何に効率的に、また的確に不具合を特定し、これを取り除いて修正するか、様々な検討が進められている。
そうした不具合の検出手法としては、テストケースを用いるものが存在する。このテストケースは、仕様書で定めた或いは開発者が期待する入力及び出力(期待値)を記述したものである。
Defects included in software are difficult to completely eliminate in advance. Therefore, various studies are underway on how to efficiently and accurately identify defects in such software, remove them, and correct them.
As a method for detecting such defects, there is a method using a test case. This test case describes the inputs and outputs (expected values) defined in the specifications or expected by the developer.

不具合の検出に際しては、対象となるソフトウェアにテストケースを適用し、入力に対して正しい期待値を返すか確認する。ここで、入力に対して出力が期待値と異なる、或いはソフトウェア自体が動作停止するといった場合、当該ソフトウェアに不具合が含まれると判定される。 When detecting bugs, apply test cases to the target software and check whether the correct expected value is returned for the input. Here, if the output differs from the expected value for the input, or if the software itself stops operating, it is determined that the software contains a defect.

開発者は、上述の不具合の存在を認識すれば、当該不具合の存在箇所を解析し、適切な入出力を行うように当該ソフトウェアのロジックを修正する。しかし、大規模なソフトウェアであれば、必要となるテストケースも大量となり、手間とコストからしても現実的な手法とは言い難い。 When the developer recognizes the presence of the above-mentioned defect, the developer analyzes the location of the defect and modifies the logic of the software so that appropriate input/output is performed. However, large-scale software requires a large number of test cases, and it is difficult to say that this method is realistic in terms of time and effort and cost.

そこで、こうした不具合修正の自動化を指向する技術が提案されている。例えば、人間が生み出した1つ以上のテストオラクルとともに、自動生成された1つ以上のテストを用いて、ソフトウェアプログラムをインタラクティブに修復する方法(特許文献1参照)が提案されている。 Therefore, techniques have been proposed that aim at automating such defect correction. For example, a method has been proposed for interactively repairing a software program using one or more automatically generated tests together with one or more human-generated test oracles (see Patent Document 1).

この方法は、人間が生み出した1つ以上のテストオラクルを用いてソフトウェアプログラムをインタラクティブに修復する方法であって、ソフトウェアプログラム内の欠陥箇所を特定し、修復候補に基づき、前記欠陥箇所で、可能な修復を生成し、前記可能な修復をテストするよう第1テストを自動生成し、前記第1テストに基づき、第1テストオラクルのための第1クエリを生成し、前記第1クエリに対する応答を人間から取得し、前記第1クエリ及び該第1クエリに対する前記取得された応答に基づき、人間が提供した第1テストオラクルを生成し、拡張された第1テストを生成するよう、前記人間が提供した第1テストオラクルを前記第1テストに加え、前記拡張された第1テストを含むようテストスイートを増補し、前記増補されたテストスイートを用いて、前記可能な修復をテストするものである。 The method is a method of interactively repairing a software program using one or more human-generated test oracles to identify defects in the software program and, based on repair candidates, perform possible tests at the defects. automatically generating a first test to test the possible repair; generating a first query for a first test oracle based on the first test; generating a response to the first query; obtained from a human; generating a first human-provided test oracle based on the first query and the obtained response to the first query; and providing an extended first test. adding a first test oracle to the first test, augmenting a test suite to include the expanded first test, and using the augmented test suite to test the possible repair.

また、自動化されたソフトウェアプログラム修復候補の選択のための方法(特許文献2参照)なども提案されている。 A method for automated software program repair candidate selection (see Patent Document 2) has also been proposed.

この方法は、テストスイートを用いてテスト済みのソフトウェアプログラムにおいて欠陥の欠陥位置を特定し、前記欠陥のための修復候補を取得し、前記修復候補の修復コードパターンを取得し、複数の既存のソフトウェアプログラムの既存のコードにおける前記修復コードパターンの発生回数を決定し、前記修復コードパターンの前記発生回数に基づき、前記修復候補を、前記テスト済みソフトウェアプログラムの修復として優先順位付けし、前記修復候補の前記優先順位付けに従って、前記テスト済みソフトウェアプログラムに
対して修復動作を実行するものである。
The method locates a defect in a software program that has been tested using a test suite, obtains a repair candidate for the defect, obtains a repair code pattern for the repair candidate, obtains a repair code pattern for the repair candidate, and performs a plurality of existing software programs. determining a number of occurrences of the repair code pattern in existing code of a program; prioritizing the repair candidate as a repair of the tested software program based on the number of occurrences of the repair code pattern; A repair action is performed on the tested software program according to the prioritization.

また他にも、テストスイートを使用して、ソフトウェアプログラム内のフォールトのフォールト位置を特定するステップと、前記ソフトウェアプログラムにおいて、前記フォールトに対して修復候補を実装するステップと、前記ソフトウェアプログラムの観測された挙動に基づく複数のテストオラクルであって、前記フォールト位置に対応する複数のテストオラクルを用いて、前記テストスイートを拡張するステップと、前記の実装された修復候補を有する前記ソフトウェアプログラムに対して、前記の拡張されたテストスイートを実行するステップと、前記の拡張されたテストスイートを実行したことに対する前記複数のテストオラクルの失敗率に基づいて、前記ソフトウェアプログラムの修復として、前記修復候補を優先順位付けするステップを含む方法(特許文献3参照)なども提案されている。 Still other steps include using a test suite to identify fault locations for faults in a software program; implementing repair candidates for the faults in the software program; extending the test suite with a plurality of test oracles based on the behavior based on the fault location, the test oracles corresponding to the fault locations; , executing the expanded test suite; and prioritizing the repair candidate as a repair of the software program based on failure rates of the plurality of test oracles for executing the expanded test suite. A method including a ranking step has also been proposed (see Patent Document 3).

特開2019-29015号公報JP 2019-29015 A 特開2019-96292号公報JP 2019-96292 A 特開2018-55676号公報JP 2018-55676 A

ところが従来技術においては、テストケース(テストスイート)が充分かどうか、人間(
開発者)が判断しており、結局のところ相応の工数が必要となる。対象となるソフトウェ
アの規模が大きくなるほど、この工数は増大し、無視できないコストにつながりうる。
また、そうした開発者の判断について、その妥当性を評価することが困難という問題もある。つまり、多大な工数をかけて行う判断であっても、その妥当性が確かなものでなければ、不十分なテストケースに基づく自動修正の精度自体も期待出来ないこととなる。
However, in the conventional technology, it is difficult for humans (
The developer) decides, and in the end, a reasonable amount of man-hours is required. As the scale of the target software increases, this man-hour increases, which can lead to non-negligible costs.
Another problem is that it is difficult to evaluate the appropriateness of such developer's judgment. In other words, even if a decision is made by spending a lot of man-hours, if the validity is not certain, the accuracy of the automatic correction itself based on insufficient test cases cannot be expected.

そこで本発明の目的は、ソフトウェアの不具合自動修正に必要なテストケースの効率的な確保及び修正支援を可能とする技術を提供することにある。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a technique that enables efficient securing of test cases necessary for automatic correction of software defects and correction support.

上記課題を解決する本発明のソフトウェア不具合分析装置は、ソフトウェアのテストケースと、前記テストケースの適用関数における不具合の発生制約に関する情報とを保持する記憶装置と、前記テストケースのうち前記不具合の発生制約を満たすものを判定する処理と、前記判定の結果、前記発生制約を満たすテストケースについて、その期待値の修正要求の通知を出力する処理を実行する演算装置を含むことを特徴とする。
また、本発明のソフトウェア不具合分析方法は、情報処理装置が、ソフトウェアのテストケースと、前記テストケースの適用関数における不具合の発生制約に関する情報とを記憶装置にて保持し、前記テストケースのうち前記不具合の発生制約を満たすものを判定する処理と、前記判定の結果、前記発生制約を満たすテストケースについて、その期待値の修正要求の通知を出力する処理を実行する、ことを特徴とする。
A software failure analysis apparatus of the present invention for solving the above problems comprises a storage device for holding software test cases and information about failure occurrence constraints in application functions of the test cases; It is characterized by including an arithmetic unit that executes a process of judging what satisfies a constraint, and a process of outputting a notification of a correction request for an expected value for a test case that satisfies the generation constraint as a result of the judgment.
Further, in the software defect analysis method of the present invention, the information processing device holds, in a storage device, software test cases and information related to defect occurrence constraints in application functions of the test cases, and among the test cases, the The method is characterized by executing a process of judging a test case that satisfies a defect occurrence constraint and, as a result of the judgment, a process of outputting a notification requesting correction of the expected value of the test case that satisfies the occurrence constraint.

本発明によれば、ソフトウェアの不具合自動修正に必要なテストケースの効率的な確保及び修正支援が可能となる。 According to the present invention, it is possible to efficiently secure test cases necessary for automatic correction of software defects and support correction.

本実施形態におけるソフトウェア不具合分析技術の概要を示す図である。It is a figure which shows the outline|summary of the software failure-analysis technique in this embodiment. 本実施形態におけるソフトウェア不具合分析装置の構成例を示す図である。1 is a diagram showing a configuration example of a software failure analysis device according to this embodiment; FIG. 本実施形態における不具合の発生制約例を示す図である。It is a figure which shows the example of the generation|occurrence|production restrictions of the malfunction in this embodiment. 本実施形態における不具合の発生制約例を示す図である。It is a figure which shows the example of the generation|occurrence|production restrictions of the malfunction in this embodiment. 本実施形態における不具合の発生制約例を示す図である。It is a figure which shows the example of the generation|occurrence|production restrictions of the malfunction in this embodiment. 本実施形態のソフトウェア不具合分析方法のフロー例を示す図である。It is a figure which shows the flow example of the software defect analysis method of this embodiment. 本実施形態での不具合発生制約とテストケースの比較例を示す図である。It is a figure which shows the example of comparison of defect occurrence restrictions and a test case in this embodiment. 本実施形態における出力例を示す図である。It is a figure which shows the output example in this embodiment.

<概要>
図1で例示するように、本実施形態におけるソフトウェア不具合分析装置100は、いわゆるログベースAPR(Automatic Program Repair)の技術を用いて、ソフトウェアの実行ログ(不具合に関するログが含まれる)から当該不具合が発生する制約条件を求める一方、既存のテストケースを分析し、不具合修正に必要なテストケースの追加や修正を実施する。
<Overview>
As exemplified in FIG. 1, the software defect analysis apparatus 100 according to the present embodiment uses a so-called log-based APR (Automatic Program Repair) technique to identify the defect from a software execution log (including a log related to the defect). Analyze the existing test cases and add or modify the test cases necessary to fix the defect while finding the constraints that will occur.

また、ソフトウェア不具合分析装置は100、こうして追加、修正がされたテストケースを用いて、いわゆるテストベースAPR(Automatic Program Repair)を実施し、修正ソースコードを得るものである。 Also, the software failure analysis device 100 uses the test cases added and corrected in this way to perform a so-called test-based APR (Automatic Program Repair) to obtain a corrected source code.

ここで、ソフトウェア不具合分析装置100の入力には、図2で示すように、ソフトウェア11のソースコード12と、ソフトウェア11の実行ログ13とが含まれる。実行ログ13には、実行中に呼び出された関数(メソッド)が含まれている。実行中に例外(例えば0徐算)が発生すると、実行ログ13は例外が発生した関数の呼び出し、および例外が発生したステートメント(ソースコードの行/ステップ)と発生した例外の種類で終わっている(プログラム停止を記録している)。 Here, the input of the software failure analysis device 100 includes the source code 12 of the software 11 and the execution log 13 of the software 11, as shown in FIG. The execution log 13 contains functions (methods) called during execution. When an exception occurs during execution (e.g. division by 0), the execution log 13 ends with the call to the function where the exception occurred, and the statement (source code line/step) where the exception occurred and the type of exception that occurred. (Recording program stop).

ソフトウェア不具合分析装置100は、上述の実行ログ13から、例外が発生した関数のなかの徐算演算を含むソフトウェア11のステートメント(ソースコードの行/ステップ)を解析開始点と設定する。また、利用者(開発者)に問い合わせて、解析開始点を含む関数を直接または間接に呼び出す関数を、解析終了点と設定する。 The software failure analysis device 100 sets the statement (source code line/step) of the software 11 including the division operation in the function in which the exception occurred as the analysis start point from the execution log 13 described above. In addition, a function that directly or indirectly calls the function including the analysis start point is set as the analysis end point by inquiring of the user (developer).

ソフトウェア不具合分析装置100は、上述の解析開始点から解析終了点まで、通常のソフトウェア実行とは逆方向の逆向き記号実行を行う。逆向き記号実行の間は、ソフトウェア不具合分析装置100は、実行パスとパス条件を記録する。 The software failure analysis apparatus 100 performs reverse symbolic execution in the direction opposite to normal software execution from the analysis start point to the analysis end point. During backward symbolic execution, software failure analyzer 100 records execution paths and path conditions.

実行パスは、解析終了点と解析開始点とを結ぶソフトウェア中のパス(ステートメント/行/ステップの並び)であり、実行パスに沿って処理が進む。実行パスは、関数の呼び出しも含む。パス条件は、例外(例えば0徐算)が発生する変数の条件、すなわち不具合の発生制約である。上述の変数には、関数内のローカル変数や関数の入力パラメータが含まれる。 An execution path is a path (a sequence of statements/lines/steps) in software that connects an analysis end point and an analysis start point, and processing proceeds along the execution path. The execution path also includes function calls. A path condition is a variable condition that causes an exception (for example, division by 0), that is, a defect occurrence constraint. The variables mentioned above include local variables within the function and input parameters of the function.

ソフトウェア不具合分析装置100は、上述のように特定した不具合の発生制約に関する情報と、上述のソフトウェア11の関数に関して予め用意しているテストケース20とに基づいて、テストケース20のうち不具合の発生制約を満たすものを判定する。 The software defect analysis apparatus 100 determines the defect occurrence constraint among the test cases 20 based on the information on the defect occurrence constraint specified as described above and the test cases 20 prepared in advance regarding the functions of the software 11 described above. Determine what satisfies

また、ソフトウェア不具合分析装置100は、この判定の結果、上述の不具合の発生制約を満たすテストケースについて、当該期待値の修正要求の通知をユーザ端末200に出力し、当該テストケースの修正を開発者等に行わせる。 Further, as a result of this determination, the software defect analysis apparatus 100 outputs to the user terminal 200 a notification requesting modification of the expected value for the test case that satisfies the above-described defect occurrence constraint, and requests the developer to modify the test case. etc.

また、ソフトウェア不具合分析装置100は、上述の記判定の結果、不具合の発生制約
を満たすテストケースが無かった場合、当該発生制約に関する情報に基づき、当該発生制約を満たす入力を規定したテストケースを生成し、また、こうした入力に対する期待値の設定要求の通知をユーザ端末200に出力する。これを受けた開発者等は、当該テストケースの期待値についてユーザ端末200を通じて設定し、当該テストケースを完成させる。
If, as a result of the determination described above, there is no test case that satisfies the defect occurrence constraint, the software defect analysis apparatus 100 generates a test case specifying inputs that satisfy the defect occurrence constraint based on the information regarding the defect occurrence constraint. Also, it outputs to the user terminal 200 a notification of a request for setting an expected value for such an input. The developer or the like who receives this sets the expected value of the test case through the user terminal 200, and completes the test case.

なお、ソフトウェア不具合分析装置100は、SMTソルバ(Satisfiability Modulo Theories Solver)111を用いてパス条件を満足する解析終了点である関数の入力パラ
メータ値を算出する。この値を入力とするテストを行うことで、不具合を修正したソフトウェア11が正しく動作するかを確認できるようになる。SMTソルバに替えてSATソルバ(SATisfiability Solver)などの他の種類のソルバを用いても良い。
The software failure analysis apparatus 100 uses an SMT solver (Satisfiability Modulo Theories Solver) 111 to calculate the input parameter value of the function that is the analysis end point that satisfies the path condition. By performing a test using this value as an input, it becomes possible to confirm whether the software 11 whose defect has been corrected operates correctly. Other types of solvers such as the SAT solver (SATisfiability Solver) may be used in place of the SMT solver.

また、ソフトウェアにおける不具合の修正は、既知の技術のうち、例えば、テストベースAPR(Automatic Program Repair)の技術を採用する。 In addition, for correction of defects in software, among known techniques, for example, a test-based APR (Automatic Program Repair) technique is adopted.

この技術において、ソフトウェア不具合分析装置100は、不具合修正対象となるソースコードにおける不具合を修正すべく、例えば、修復用のテンプレートと、上述のように修正、追加等を行ったテストケース20とに基づいた所定の修正処理を実行する。 In this technology, the software defect analysis device 100 corrects a defect in the source code to be corrected, for example, based on the template for repair and the test case 20 corrected, added, etc. as described above. A predetermined correction process is executed.

上述のテンプレートは、これを実行することで、ソースコード12の不具合の存在に応じて当該ソースコード12を変更する命令等を含むものである。一方、テストケース20は、ソースコード12が仕様や開発者の指定どおりの挙動(例:所定の入力に対する期待値の出力)を示すか判定するものである。
<ソフトウェア不具合分析装置の入力>
ソフトウェア不具合分析装置100の入力には、ソースコード12、実行ログ13、およびソフトウェア仕様14が含まれる。
The template described above contains instructions and the like for changing the source code 12 according to the presence of a defect in the source code 12 by executing the template. On the other hand, the test case 20 determines whether the source code 12 behaves as specified or specified by the developer (eg, outputs an expected value for a given input).
<Input for software failure analyzer>
Inputs to the software defect analyzer 100 include source code 12 , execution logs 13 and software specifications 14 .

ソースコード12は、分析対象であるソフトウェア11を構成する関数(メソッド)のソースコードである。ソフトウェア仕様14には、関数の名前、および、関数の入力パラメータ値と返り値(戻り値)の名前と型と範囲とが記述されている。 The source code 12 is source code of functions (methods) that constitute the software 11 to be analyzed. The software specification 14 describes the names of functions, and the names, types and ranges of input parameter values and return values (return values) of the functions.

実行ログ13は、ソフトウェア11の実行中の関数呼び出しの記録を含む。実行ログ13には、呼び出された関数の名前(識別情報)の他に呼び出し時の入力パラメータ値や、呼び出しから戻るときの返り値を含んでもよい。 Execution log 13 contains a record of function calls during execution of software 11 . The execution log 13 may include the name (identification information) of the called function, input parameter values at the time of calling, and return values at the time of returning from the call.

実行ログ13は、さらにソフトウェア11の実行中に発生した例外を含んでもよい。例外としては、0徐算やソフトウェア仕様14に記述された入力パラメータ値または返り値の違反(仕様の範囲外の値)がある。
<ソフトウェア不具合分析装置の出力>
ソフトウェア不具合分析装置100の出力には、実行パス21、入力パラメータ値22、及びテストケース20が含まれる。実行パス21は、不具合が発生するソフトウェア中のパス(ソースコード12のなかで順次処理される一連のステートメント/行/ステップ)である。
Execution log 13 may also include exceptions that occurred during execution of software 11 . Exceptions include division by zero and violations of input parameter values or return values described in Software Specification 14 (values outside the specification range).
<Output of software failure analyzer>
Execution paths 21 , input parameter values 22 , and test cases 20 are included in the output of the software failure analysis device 100 . An execution path 21 is the path in the software (a series of statements/lines/steps processed sequentially in the source code 12) where the failure occurs.

実行パス21の一端は、不具合に係る例外(故障)が発生するステートメント/行/ステップであり、解析開始点、または単に開始点と記す。解析開始点は、例えば0徐算が発生する徐算演算を含むステートメントである。 One end of the execution path 21 is a statement/line/step at which an exception (failure) related to a failure occurs, and is referred to as an analysis start point, or simply a start point. A parsing starting point is a statement containing a divide operation, for example, where a divide by 0 occurs.

実行パス21の他端は、解析開始点を含む関数を直接または間接に呼び出す関数であり、解析終了点、またはエントリポイントと記す。解析終了点は、開始点を含む関数であっ
てもよい。
The other end of the execution path 21 is a function that directly or indirectly calls the function including the analysis start point, and is referred to as an analysis end point or entry point. The analysis end point may be a function that includes the start point.

入力パラメータ値22は、エントリポイントとなる関数の、不具合が発生するときの入力パラメータ値である。 The input parameter value 22 is the input parameter value of the entry point function when a problem occurs.

テストケース20は、ソースコード12の関数に関して予め用意しておいたテストケースであるが、本実施形態のソフトウェア不具合分析装置100により、適宜に修正や追加がなされたものとなる。
<ソフトウェア不具合分析装置の構成>
図2に示すソフトウェア不具合分析装置100は、例えば、ソフトウェア11のテスト環境10において配置された情報処理装置であって、当該ソフトウェア11の不具合自動修正に必要なテストケースの効率的な確保及び修正支援を可能とする。ここでは、上述のソフトウェア11がソースコード12で構成されているものとする。
The test case 20 is a test case prepared in advance regarding the functions of the source code 12, but is appropriately modified or added by the software failure analysis device 100 of this embodiment.
<Configuration of software failure analysis device>
The software defect analysis device 100 shown in FIG. 2 is, for example, an information processing device arranged in the test environment 10 of the software 11, and efficiently secures test cases necessary for automatic defect correction of the software 11 and supports correction. enable Here, it is assumed that the software 11 described above is composed of source code 12 .

ソフトウェア不具合分析装置100は、自身でユーザインターフェイスを実装するケースの他、適宜なネットワークを介して接続するユーザ端末200をユーザインターフェイスとして利用するとしてもよい。 The software failure analysis apparatus 100 may use the user terminal 200 connected via an appropriate network as the user interface, in addition to the case where the user interface is implemented by itself.

この場合、ユーザ端末200は、ソフトウェア1の開発者等が操作する端末装置となる。このユーザ端末200は、具体的には、パーソナルコンピュータ、スマートフォン、タブレット端末、などを想定できる。 In this case, the user terminal 200 is a terminal device operated by the developer of the software 1 or the like. Specifically, this user terminal 200 can be assumed to be a personal computer, a smart phone, a tablet terminal, or the like.

なお、ソフトウェア不具合分析装置100と、上述のユーザ端末200を総称してソフトウェア不具合分析システムとしてもよい。 Note that the software failure analysis apparatus 100 and the user terminal 200 may be collectively referred to as a software failure analysis system.

このうち記憶装置101は、SSD(Solid State Drive)やハードディスクドライブなど適宜な不揮発性記憶素子で構成される。 Among them, the storage device 101 is composed of an appropriate non-volatile storage element such as an SSD (Solid State Drive) or a hard disk drive.

また、メモリ103は、RAMなど揮発性記憶素子で構成される。 Also, the memory 103 is composed of a volatile memory element such as a RAM.

また、演算装置104は、記憶装置101に保持されるプログラム102をメモリ103に読み出すなどして実行し装置自体の統括制御を行なうとともに各種判定、演算及び制御処理を行なうCPUである。 Arithmetic device 104 is a CPU that reads program 102 stored in storage device 101 into memory 103 and executes it, performs overall control of the device itself, and performs various determinations, calculations, and control processes.

また、入出力装置105は、開発者等からのキー入力や音声入力を受け付け、また、処理データの表示を行う装置である。或いは、適宜なネットワークと接続してユーザ端末200との通信処理を担うネットワークインターフェイスカードも想定できる。 Also, the input/output device 105 is a device that receives key input and voice input from a developer or the like and displays processed data. Alternatively, a network interface card that connects to an appropriate network and handles communication processing with the user terminal 200 can be assumed.

また、記憶装置101内には、本実施形態のソフトウェア不具合分析装置100として必要な機能を実装する為のプログラム102に加えて、上述のソフトウェア11のソースコード12、当該ソフトウェア11の実行ログ13、ソフトウェア仕様14、関数呼び出し関係DB15、及びテストケース20が少なくとも記憶されている。 Further, in the storage device 101, in addition to the program 102 for implementing the functions necessary for the software failure analysis apparatus 100 of this embodiment, the source code 12 of the software 11 described above, the execution log 13 of the software 11, At least software specifications 14, function call relation DB 15, and test cases 20 are stored.

なお、関数呼び出し関係DB15には、どの関数がどの関数を呼び出すかの関係、換言すれば、呼び出し関係グラフ(関数間の呼び出し関係を表現する制御フローのグラフ)を示すデータが記憶される。 The function call relation DB 15 stores data indicating the relation of which function calls which function, in other words, a call relation graph (graph of control flow representing the call relation between functions).

また、プログラム102は、記号実行エンジン110及びSMTソルバ111を少なくとも含むものとする。 Also, the program 102 is assumed to include at least a symbolic execution engine 110 and an SMT solver 111 .

演算装置104がプログラム102を実行することで、ソースコード12から関数の呼び出し関係を取得して、関数呼び出し関係DB15に格納する機能と、実行ログ13を解析して解析開始点を取得する機能と、解析開始点を含む関数を呼び出す関数を関数呼び出し関係DB15から取得して、エントリポイントの候補として入出力装置105またはユーザ端末200に備わるディスプレイに表示する機能と、表示させたエントリポイントの候補すなわち関数に関してユーザ(開発者)が選択したものを、解析終了点(エントリポイント)として設定する機能と、ここまでの処理で得ている不具合の発生制約の情報と、記憶装置101で保持するテストケース20とに基づいて、テストケース20のうち不具合の発生制約を満たすものを判定する機能と、この判定の結果、不具合の発生制約を満たすテストケースについて、当該期待値の修正要求の通知を入出力装置105やユーザ端末200に出力する機能と、上述の判定の結果、不具合の発生制約を満たすテストケースが無かった場合、当該発生制約に関する情報に基づき、当該発生制約を満たす入力を規定したテストケースを生成し、上述の入力に対する期待値の設定要求の通知を入出力装置105やユーザ端末200に出力する機能と、上述の処理を経たテストケース20を使用して、ソフトウェア11における不具合発生位置を特定する機能と、当該不具合に対して修復用のテンプレート及びテストケース20に基づいて修復候補を生成する機能が実装される。 By executing the program 102 by the arithmetic unit 104, a function of acquiring the function call relationship from the source code 12 and storing it in the function call relationship DB 15, and a function of analyzing the execution log 13 and acquiring the analysis start point. , a function of acquiring from the function call relationship DB 15 a function that calls a function including the analysis start point and displaying it as an entry point candidate on a display provided in the input/output device 105 or the user terminal 200; A function for setting a function selected by a user (developer) as an analysis end point (entry point), information on failure occurrence constraints obtained by the processing up to this point, and test cases held in the storage device 101 20, a function to determine which of the test cases 20 satisfies the defect occurrence constraint, and as a result of this determination, for the test case satisfying the defect occurrence constraint, input/output a notification of a correction request for the expected value. If there is no test case that satisfies the defect occurrence constraint as a result of the above determination, the test case that specifies the input that satisfies the occurrence constraint based on the function to output to the device 105 or the user terminal 200 , and using the function of outputting the notification of the request for setting the expected value for the above-mentioned input to the input/output device 105 and the user terminal 200, and the test case 20 that has undergone the above-described processing, the location of the failure occurrence in the software 11 is determined. A function of specifying and a function of generating a repair candidate based on a repair template and test cases 20 for the defect are implemented.

なお、記号実行エンジン110は、実行パス21およびパス条件を生成する(例:特願2020-143591参照)。パス条件は、分析対象のソフトウェアの実行が実行パス21を通るための変数(ローカル変数や入力パラメータ)の条件である。なお、以下の文献に記号実行エンジンンの詳細が記述されている: Peter Dinges and Gul Agha, "Targeted Test Input Generation Using Symbolic Concrete Backward Execution"。 The symbolic execution engine 110 generates execution paths 21 and path conditions (eg, see Japanese Patent Application No. 2020-143591). A path condition is a variable (local variable or input parameter) condition for the execution of the analysis target software to pass through the execution path 21 . Details of the symbolic execution engine are described in the following document: Peter Dinges and Gul Agha, "Targeted Test Input Generation Using Symbolic Concrete Backward Execution".

また、SMTソルバ111(ソルバ)は、パス条件を満たす入力パラメータ値22生成する。以下の文献にSMTソルバが記述されている: Leonardo de Moura and Nikolaj Bjorner, "Z3: An Efficient SMT Solver"。
<不具合の発生制約例>
ソフトウェア11のソースコード12に関する、不具合の発生制約の例について、図3にて示す。ここで示す例では、関数「Percentage」で0割りの不具合が発生したことが実行ログ13にて判明した状況に対応したものである。
Also, the SMT solver 111 (solver) generates an input parameter value 22 that satisfies the pass condition. The following document describes the SMT solver: Leonardo de Moura and Nikolaj Bjorner, "Z3: An Efficient SMT Solver".
<Example of restrictions on the occurrence of defects>
FIG. 3 shows an example of defect occurrence restrictions regarding the source code 12 of the software 11 . The example shown here corresponds to a situation in which it is found in the execution log 13 that a division by 0 error has occurred in the function "Percentage".

そこで、関数「Percentage」を起点に、上述のログベースでの不具合解析を実行すると、の不具合箇所に到達する実行パスとパス条件すなわち発生制約が3通り求まったとする。 Therefore, when the above log-based failure analysis is executed starting from the function "Percentage", it is assumed that three execution paths and path conditions, that is, occurrence constraints to reach the failure location are obtained.

この場合、ソフトウェア不具合分析装置100は、実行ログ13を解析することで、関数「Percentage」の行10が、徐算演算を含むステートメント/行であるから、開始点を関数「Percentage」の行10に設定する。 In this case, the software defect analysis apparatus 100 analyzes the execution log 13 and finds that the line 10 of the function "Percentage" is a statement/line including a division operation, so the starting point is the line 10 of the function "Percentage". set to

パス条件は、例外が発生する条件/制約である。解析開始点である関数「Percentage」の行10におけるパス条件は「max=0」である。 A path condition is a condition/constraint under which an exception occurs. The path condition in line 10 of the function "Percentage", which is the analysis starting point, is "max=0".

記号実行エンジン110は、開始点から始めて、通常の(前向き)実行とは反対の方向にソースコード12のなかを、エントリポイントに到達するまで探索(逆向き記号実行とも記す)する。エントリポイントが複数ある場合には、記号実行エンジン110は、何れか1つのエントリポイントに到達するまで探索する。 Beginning at a starting point, the symbolic execution engine 110 searches through the source code 12 in a direction opposite to normal (forward) execution until an entry point is reached (also referred to as backward symbolic execution). If there are multiple entry points, the symbolic execution engine 110 searches until any one entry point is reached.

また、記号実行エンジン110は、関数「Percentage」を呼び出すステートメントを探索する。図3の場合、関数「Percentage」を呼び出すステートメン
トは、関数「abs max」であり、記号実行エンジン110は、当該行から探索を継続し、解析終了点までで探索を終了する。ここまでの時点で判明した実行パスとパス条件(エントリポイント(解析終了点)の入力パラメータ値の条件を含んでいる)が、不具合の発生制約となる。なお、SMTソルバ111は、上述のパス条件を解いて、エントリポイントである関数の、パス条件を満たす入力パラメータ値22を算出する。
The symbolic execution engine 110 also looks for statements that call the function "Percentage." In the case of FIG. 3, the statement calling the function "Percentage" is the function "abs max", and the symbolic execution engine 110 continues the search from that line and terminates the search up to the analysis end point. The execution paths and path conditions (including the input parameter value conditions of the entry point (analysis end point)) that have been found up to this point are constraints on the occurrence of defects. It should be noted that the SMT solver 111 solves the path conditions described above and calculates the input parameter values 22 of the function, which is the entry point, that satisfy the path conditions.

こうした発生制約の特定を、ソースコード12に関して実行した結果、図3~図5に例示する。なお、ここで例示する制約はint型が32ビット符号付き整数である環境を仮定しており、実際の値は実行環境により異なる。図3で示す発生制約は、¬(A>B)∩¬(B>0)∩(B-A=0)、入力パラメータ値は、(a,b)=(0,0)となった。 The results of identifying these generation constraints performed on the source code 12 are illustrated in FIGS. 3-5. Note that the constraint illustrated here assumes an environment in which the int type is a 32-bit signed integer, and the actual value varies depending on the execution environment. The generation constraint shown in FIG. 3 is ¬(A>B)∩¬(B>0)∩(BA=0), and the input parameter values are (a, b)=(0, 0).

また、図4で示す発生制約は、¬(0<A)∩¬(0-A<0)∩(B=0)、入力パラメータ値は、(a,b)=(-2147483648,0)となった。 In addition, the generation constraint shown in FIG. became.

また、図5で示す発生制約は、¬(0>B)∩¬(0>0-B)∩(A=0)、入力パラメータ値は、(a,b)=(0,-2147483648)となった。
<ソフトウェア不具合分析処理>
続いて、本実施形態の本実施形態のソフトウェア不具合分析方法のフロー例について、図6に基づき説明する。まず、ソフトウェア不具合分析装置100は、ソースコード12に関する実行ログ13に基づき、不具合の発生パス(実行パス)毎の不具合の発生制約を、既に述べたようにログベースAPRの技術により取得する(s1)。
In addition, the generation constraint shown in FIG. became.
<Software defect analysis processing>
Next, an example flow of the software failure analysis method of this embodiment will be described with reference to FIG. First, the software defect analysis apparatus 100 acquires the defect occurrence constraint for each defect occurrence path (execution path) based on the execution log 13 related to the source code 12 by the log-based APR technology as described above (s1 ).

続いて、ソフトウェア不具合分析装置100は、上述の不具合の発生箇所たる対象関数のテストケース20を記憶装置101から取得する(s2)。 Subsequently, the software failure analysis apparatus 100 acquires the test case 20 of the target function, which is the location where the failure occurs, from the storage device 101 (s2).

また、ソフトウェア不具合分析装置100は、当該対象関数に関してs1で得ている発生制約を一つ選択する(s3)。この選択方法に関して特に限定しない。 Also, the software failure analysis apparatus 100 selects one occurrence constraint obtained in s1 for the target function (s3). This selection method is not particularly limited.

また、ソフトウェア不具合分析装置100は、s2で取得しているテストケースのうち一つを選択する(s4)。この選択方法に関して特に限定しない。 Also, the software failure analysis apparatus 100 selects one of the test cases acquired in s2 (s4). This selection method is not particularly limited.

ここで、ソフトウェア不具合分析装置100は、s4で選択したテストケースの入力値は、s3で選択した発生制約を満たすか判定する(s5)。具体的には、図7で示すように、不具合の発生制約C1~C3と、関数「abs max」に関するテストケース20のケースT1~T4をそれぞれ比較することとなる。この場合の比較は、関数「abs max」のテストケースそれぞれの入力値と期待値の関係を、不具合の発生制約それぞれが満たすか検証する動作となる。 Here, the software failure analysis apparatus 100 determines whether the input value of the test case selected in s4 satisfies the generation constraint selected in s3 (s5). Specifically, as shown in FIG. 7, failure occurrence constraints C1 to C3 are compared with cases T1 to T4 of test case 20 relating to the function "abs max". The comparison in this case is an operation of verifying whether or not the relationship between the input value and the expected value of each test case of the function "abs max" is satisfied by each fault occurrence constraint.

s5の判定の結果、上述の発生制約を満たすテストケースが特定できた場合(s5:Yes)、ソフトウェア不具合分析装置100は、当該テストケースを要修正テストケースとして記録する(s6)。 As a result of the determination in s5, if a test case that satisfies the occurrence constraint described above can be identified (s5: Yes), the software failure analysis device 100 records the test case as a test case requiring correction (s6).

この場合、図8の出力例に示すように、テストケースT1に関して、発生制約C1が条件を満たすと判定されたため(不具合が発生する、修正が必要なテストケースと判明)、ソフトウェア不具合分析装置100は、s6において、テストケースT1の出力すなわち期待値の修正を開発者に要求する通知を、入出力装置105またはユーザ端末200に出力する。 In this case, as shown in the output example of FIG. 8, it is determined that the occurrence constraint C1 satisfies the conditions for the test case T1 (it is determined that the test case causes a defect and requires correction), so the software defect analysis apparatus 100 outputs to the input/output device 105 or the user terminal 200, in s6, a notification requesting the developer to output the test case T1, that is, to modify the expected value.

一方、開発者は、入出力装置105ないしユーザ端末200を操作し、テストケースT
1の期待値について入力する。ソフトウェア不具合分析装置100は、この入力を受けてテストケースT1の修正を完了する。
On the other hand, the developer operates the input/output device 105 or the user terminal 200 to
Input about the expected value of 1. Software failure analysis device 100 receives this input and completes correction of test case T1.

一方、上述の判定の結果、発生制約を満たすテストケースが特定できなかった場合(s5:No)、ソフトウェア不具合分析装置100は、s2で得ているテストケースのうち残りのテストケース(すなわち未処理のもの)があるか判定する(s7)。 On the other hand, as a result of the determination described above, if a test case satisfying the generation constraint could not be specified (s5: No), the software failure analysis apparatus 100 selects the remaining test cases (that is, unprocessed test cases) among the test cases obtained in s2. (s7).

この判定の結果、残りのテストケースが存在することが判明した場合(s7:Yes)、ソフトウェア不具合分析装置100は処理をs4に戻す。 As a result of this determination, if it is found that there are remaining test cases (s7: Yes), the software failure analysis device 100 returns the process to s4.

一方、上述の判定の結果、残りのテストケースが存在しないことが判明した場合(s7:No)、ソフトウェア不具合分析装置100は、当該不具合の発生制約を満たすテストケースが1個以上存在したか判定する(s8)。 On the other hand, if it is determined that there are no remaining test cases as a result of the above determination (s7: No), the software failure analysis apparatus 100 determines whether there is one or more test cases that satisfy the failure occurrence constraint. (s8).

この判定の結果、不具合の発生制約を満たすテストケースが存在しないことが判明した場合(s8:No)、ソフトウェア不具合分析装置100は、図8で例示するように、当該不具合の発生制約C2、C3を満たす入力パラメータ値を入力としたテストケースT5、T6を追加する(s9)。 As a result of this determination, if it is found that there is no test case that satisfies the defect occurrence constraint (s8: No), the software defect analysis apparatus 100, as illustrated in FIG. are added (s9).

この場合、ソフトウェア不具合分析装置100は、s9において、ここで追加したテストケースT5、T6に関して、関数「abs max」の期待値の設定要求を、入出力装置105またはユーザ端末200に出力する。 In this case, the software failure analysis device 100 outputs to the input/output device 105 or the user terminal 200, in s9, a request for setting the expected value of the function "abs max" for the test cases T5 and T6 added here.

一方、開発者は、入出力装置105ないしユーザ端末200を操作し、テストケースT5、T6の各期待値について入力する。ソフトウェア不具合分析装置100は、この入力を受けてテストケースT5、T6の追加を完了する。 On the other hand, the developer operates the input/output device 105 or the user terminal 200 to input expected values of the test cases T5 and T6. Software failure analysis device 100 receives this input and completes addition of test cases T5 and T6.

一方、上述の判定の結果、 当該不具合の発生制約を満たすテストケースが1個以上存在したことが判明した場合(s8:Yes)、ソフトウェア不具合分析装置100は、s1で取得している不具合の発生制約のうち未処理である、残りの発生制約があるか判定する(s10)。 On the other hand, as a result of the determination described above, if it is found that there is one or more test cases that satisfy the defect occurrence constraint (s8: Yes), the software defect analysis apparatus 100 detects the occurrence of the defect acquired in s1. It is determined whether or not there are any remaining generation constraints that have not been processed among the constraints (s10).

この判定の結果、残りの発生制約が存在する場合(s10:Yes)、ソフトウェア不具合分析装置100は、処理をs3に戻す。 As a result of this determination, if there are remaining generation constraints (s10: Yes), the software failure analysis device 100 returns the process to s3.

一方、上述の判定の結果、残りの発生制約が存在しないことが判明した場合(s10:No)、ソフトウェア不具合分析装置100は、ここまで修正、追加が完了したテストケース20を使用して、ソフトウェア11における不具合の発生位置を特定し、この不具合に対して修復用のテンプレート及びテストケース20に基づいて、不具合修正を実行し(s11)、処理を終了する。この不具合の修正処理については、既存のテストケースベースの自動修正技術を適宜採用すればよい。 On the other hand, as a result of the above determination, if it is found that the remaining generation constraints do not exist (s10: No), the software failure analysis device 100 uses the test case 20 that has been corrected and added so far to perform software 11 is specified, and the defect is corrected based on the repair template and the test case 20 (s11), and the process ends. Existing test-case-based automatic correction techniques may be appropriately employed for correcting this defect.

以上、本発明を実施するための最良の形態などについて具体的に説明したが、本発明はこれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能である。 Although the best mode for carrying out the present invention has been specifically described above, the present invention is not limited to this, and can be variously modified without departing from the scope of the invention.

こうした本実施形態によれば、ソフトウェアの不具合自動修正に必要なテストケースの効率的な確保及び修正支援が可能となる。 According to this embodiment, it is possible to efficiently secure test cases necessary for automatic correction of software defects and support correction.

本明細書の記載により、少なくとも次のことが明らかにされる。すなわち、本実施形態のソフトウェア不具合分析装置において、前記演算装置は、前記判定の結果、前記発生制
約を満たすテストケースが無かった場合、前記発生制約に関する情報に基づき、当該発生制約を満たす入力を規定したテストケースを生成し、前記入力に対する期待値の設定要求の通知を出力するものである、としてもよい。
At least the following will be clarified by the description of this specification. That is, in the software failure analysis apparatus of the present embodiment, if the result of the determination is that there is no test case that satisfies the occurrence constraint, the arithmetic device defines an input that satisfies the occurrence constraint based on the information on the occurrence constraint. and outputting a notification requesting to set an expected value for the input.

これによれば、ソフトウェアの不具合修正に必要となるテストケースを不足なく確保可能となる。ひいては、ソフトウェアの不具合自動修正に必要なテストケースのより効率的な確保及び修正支援が可能となる。 According to this, it is possible to ensure sufficient test cases necessary for correcting software defects. As a result, more efficient securing of test cases required for automatic correction of software defects and correction support can be achieved.

また、本実施形態のソフトウェア不具合分析装置において、前記演算装置は、前記ソフトウェアの実行ログに基づき、例外が発生したステートメントを解析開始点として取得する処理と、前記解析開始点を含む関数を直接または間接に呼び出す関数を解析終了点として取得する処理と、前記解析開始点から前記解析終了点に向けて逆向き記号実行を行って実行パスを特定し、前記例外が発生する条件であるパス条件を算出する処理と、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値を、前記発生制約として前記記憶装置に保持する処理を実行するものである、としてもよい。 Further, in the software failure analysis device of the present embodiment, the computing device acquires the statement in which the exception occurred as an analysis start point based on the execution log of the software, and directly or A process of acquiring a function to be indirectly called as an analysis end point, performing backward symbolic execution from the analysis start point toward the analysis end point to identify an execution path, and determining a path condition that is a condition for the exception to occur. The calculation process and the condition of the input parameter value of the function serving as the analysis end point satisfying the path condition, or the input parameter value of the function serving as the analysis end point satisfying the path condition are stored as the generation constraint. It may be assumed that it executes a process held in the device.

これによれば、いわゆるログベースAPR(Automatic Program Repair)における技術を採用し、不具合の発生制約を的確かつ効率的に特定することができる。ひいては、ソフトウェアの不具合自動修正に必要なテストケースのより効率的な確保及び修正支援が可能となる。 According to this, a technique in so-called log-based APR (Automatic Program Repair) is adopted, and the failure occurrence constraint can be specified accurately and efficiently. As a result, more efficient securing of test cases required for automatic correction of software defects and correction support can be achieved.

また、本実施形態のソフトウェア不具合分析装置において、前記演算装置は、前記テストケースを使用して、前記ソフトウェアにおける不具合発生位置を特定する処理と、前記不具合に対して修復用のテンプレート及びテストケースに基づいて修復候補を生成する処理をさらに実行するものである、としてもよい。 Further, in the software defect analysis apparatus of the present embodiment, the arithmetic unit uses the test case to specify a defect occurrence position in the software, and prepares a repair template and test case for the defect. A process of generating a repair candidate based on this may be further executed.

これによれば、いわゆるテストベースAPR(Automatic Program Repair)を上述のログベースAPR(Automatic Program Repair)に適用し、ソフトウェアの不具合自動修正に必要なテストケースの効率的な確保と、当該テストケースに基づくソフトウェア自動修正が可能となる。 According to this, the so-called test-based APR (Automatic Program Repair) is applied to the above-mentioned log-based APR (Automatic Program Repair) to efficiently secure test cases necessary for automatically correcting software defects, and automatic software modification based on

また、本実施形態のソフトウェア不具合分析方法において、前記情報処理装置が、前記判定の結果、前記発生制約を満たすテストケースが無かった場合、前記発生制約に関する情報に基づき、当該発生制約を満たす入力を規定したテストケースを生成し、前記入力に対する期待値の設定要求の通知を出力する、としてもよい。 Further, in the software failure analysis method of the present embodiment, if the result of the determination is that there is no test case that satisfies the occurrence constraint, the information processing device generates an input that satisfies the occurrence constraint based on the information on the occurrence constraint. A defined test case may be generated, and a notification requesting the setting of expected values for the input may be output.

また、本実施形態のソフトウェア不具合分析方法において、前記情報処理装置が、前記ソフトウェアの実行ログに基づき、例外が発生したステートメントを解析開始点として取得する処理と、前記解析開始点を含む関数を直接または間接に呼び出す関数を解析終了点として取得する処理と、前記解析開始点から前記解析終了点に向けて逆向き記号実行を行って実行パスを特定し、前記例外が発生する条件であるパス条件を算出する処理と、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値を、前記発生制約として前記記憶装置に保持する処理を実行する、としてもよい。 Further, in the software defect analysis method of the present embodiment, the information processing device obtains a statement in which an exception occurred as an analysis start point based on the execution log of the software, and directly obtains a function including the analysis start point. Alternatively, a process of obtaining an indirectly called function as an analysis end point, performing reverse symbolic execution from the analysis start point toward the analysis end point to identify an execution path, and a path condition that is a condition for the exception to occur and the condition of the input parameter value of the function serving as the analysis end point that satisfies the path condition, or the input parameter value of the function serving as the analysis end point that satisfies the path condition as the generation constraint. It is also possible to execute the processing held in the storage device.

また、本実施形態のソフトウェア不具合分析方法において、前記情報処理装置が、前記テストケースを使用して、前記ソフトウェアにおける不具合発生位置を特定する処理と、前記不具合に対して修復用のテンプレート及びテストケースに基づいて修復候補を生成する処理をさらに実行する、としてもよい。 Further, in the software defect analysis method of the present embodiment, the information processing apparatus uses the test case to identify a defect occurrence position in the software, and a template and test case for repairing the defect. Further processing may be performed to generate repair candidates based on .

10 テスト環境
11 ソフトウェア
12 ソースコード
13 実行ログ
14 ソフトウェア仕様
15 関数呼び出し関係DB
20 テストケース
21 実行パス
22 入力パラメータ値
100 ソフトウェア不具合分析装置
101 記憶装置
102 プログラム
103 メモリ
104 演算装置
105 入出力装置
110 記号実行エンジン
111 SMTソルバ
200 ユーザ端末
10 Test environment 11 Software 12 Source code 13 Execution log 14 Software specification 15 Function call relation DB
20 test case 21 execution path 22 input parameter value 100 software failure analyzer 101 storage device 102 program 103 memory 104 arithmetic device 105 input/output device 110 symbolic execution engine 111 SMT solver 200 user terminal

Claims (8)

ソフトウェアのテストケースと、前記テストケースの適用関数における不具合の発生制約に関する情報とを保持する記憶装置と、
前記テストケースのうち前記不具合の発生制約を満たすものを判定する処理と、前記判定の結果、前記発生制約を満たすテストケースについて、その期待値の修正要求の通知を出力する処理を実行する演算装置と、
を含むことを特徴とするソフトウェア不具合分析装置。
a storage device that holds software test cases and information about failure occurrence constraints in application functions of the test cases;
An arithmetic unit that executes a process of determining which of the test cases satisfies the defect occurrence constraint, and a process of outputting a notification of a correction request for the expected value of the test case that satisfies the occurrence constraint as a result of the determination. and,
A software failure analysis device comprising:
前記演算装置は、
前記判定の結果、前記発生制約を満たすテストケースが無かった場合、前記発生制約に関する情報に基づき、当該発生制約を満たす入力を規定したテストケースを生成し、前記入力に対する期待値の設定要求の通知を出力するものである、
ことを特徴とする請求項1に記載のソフトウェア不具合分析装置。
The computing device is
As a result of the determination, if there is no test case that satisfies the generation constraint, based on the information on the generation constraint, generate a test case that defines an input that satisfies the generation constraint, and notify a request to set an expected value for the input. which outputs
2. The software failure analysis device according to claim 1, wherein:
前記演算装置は、
前記ソフトウェアの実行ログに基づき、例外が発生したステートメントを解析開始点として取得する処理と、前記解析開始点を含む関数を直接または間接に呼び出す関数を解析終了点として取得する処理と、前記解析開始点から前記解析終了点に向けて逆向き記号実行を行って実行パスを特定し、前記例外が発生する条件であるパス条件を算出する処理と、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値を、前記発生制約として前記記憶装置に保持する処理を実行するものである、
ことを特徴とする請求項1に記載のソフトウェア不具合分析装置。
The computing device is
Based on the execution log of the software, a process of acquiring a statement in which an exception occurred as an analysis start point, a process of acquiring a function that directly or indirectly calls a function containing the analysis start point as an analysis end point, and the analysis start point. A process of performing reverse symbolic execution from a point toward the analysis end point to identify an execution path, calculating a path condition that is a condition for the exception to occur, and a function that becomes the analysis end point that satisfies the path condition. or the input parameter value of the function serving as the analysis end point that satisfies the path condition is stored in the storage device as the generation constraint.
2. The software failure analysis device according to claim 1, wherein:
前記演算装置は、
前記テストケースを使用して、前記ソフトウェアにおける不具合発生位置を特定する処理と、前記不具合に対して修復用のテンプレート及びテストケースに基づいて修復候補を生成する処理をさらに実行するものである、
ことを特徴とする請求項1に記載のソフトウェア不具合分析装置。
The computing device is
Using the test case, a process of identifying a defect occurrence position in the software, and a process of generating a repair candidate based on a repair template and test case for the defect are further executed.
2. The software failure analysis device according to claim 1, wherein:
情報処理装置が、
ソフトウェアのテストケースと、前記テストケースの適用関数における不具合の発生制約に関する情報とを記憶装置にて保持し、
前記テストケースのうち前記不具合の発生制約を満たすものを判定する処理と、前記判定の結果、前記発生制約を満たすテストケースについて、その期待値の修正要求の通知を出力する処理を実行する、
ことを特徴とするソフトウェア不具合分析方法。
The information processing device
holding software test cases and information about failure occurrence constraints in the application function of the test cases in a storage device;
Determining which of the test cases satisfies the defect occurrence constraint, and as a result of the determination, executing a process of outputting a notification requesting modification of the expected value of the test case satisfying the occurrence constraint,
A software failure analysis method characterized by:
前記情報処理装置が、
前記判定の結果、前記発生制約を満たすテストケースが無かった場合、前記発生制約に関する情報に基づき、当該発生制約を満たす入力を規定したテストケースを生成し、前記入力に対する期待値の設定要求の通知を出力する、
ことを特徴とする請求項5に記載のソフトウェア不具合分析方法。
The information processing device
As a result of the determination, if there is no test case that satisfies the generation constraint, based on the information on the generation constraint, generate a test case that defines an input that satisfies the generation constraint, and notify a request to set an expected value for the input. which outputs
6. The software failure analysis method according to claim 5, wherein:
前記情報処理装置が、
前記ソフトウェアの実行ログに基づき、例外が発生したステートメントを解析開始点として取得する処理と、前記解析開始点を含む関数を直接または間接に呼び出す関数を解析終了点として取得する処理と、前記解析開始点から前記解析終了点に向けて逆向き記号実行を行って実行パスを特定し、前記例外が発生する条件であるパス条件を算出する処理と
、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析終了点となる関数の入力パラメータ値を、前記発生制約として前記記憶装置に保持する処理を実行する、
ことを特徴とする請求項5に記載のソフトウェア不具合分析方法。
The information processing device
Based on the execution log of the software, a process of acquiring a statement in which an exception occurred as an analysis start point, a process of acquiring a function that directly or indirectly calls a function containing the analysis start point as an analysis end point, and the analysis start point. A process of performing reverse symbolic execution from a point toward the analysis end point to identify an execution path, calculating a path condition that is a condition for the exception to occur, and a function that becomes the analysis end point that satisfies the path condition. or the input parameter value of the function serving as the analysis end point that satisfies the path condition is stored in the storage device as the generation constraint.
6. The software failure analysis method according to claim 5, wherein:
前記情報処理装置が、
前記テストケースを使用して、前記ソフトウェアにおける不具合発生位置を特定する処理と、前記不具合に対して修復用のテンプレート及びテストケースに基づいて修復候補を生成する処理をさらに実行する、
ことを特徴とする請求項5に記載のソフトウェア不具合分析方法。
The information processing device
Using the test case, further performing a process of identifying a defect occurrence location in the software and a process of generating a repair candidate for the defect based on a repair template and test case,
6. The software failure analysis method according to claim 5, wherein:
JP2021165227A 2021-10-07 2021-10-07 Software failure analytic device and software failure analytic method Pending JP2023056111A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021165227A JP2023056111A (en) 2021-10-07 2021-10-07 Software failure analytic device and software failure analytic method
PCT/JP2022/037007 WO2023058611A1 (en) 2021-10-07 2022-10-03 Software failure analysis apparatus and software failure analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021165227A JP2023056111A (en) 2021-10-07 2021-10-07 Software failure analytic device and software failure analytic method

Publications (1)

Publication Number Publication Date
JP2023056111A true JP2023056111A (en) 2023-04-19

Family

ID=85804286

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021165227A Pending JP2023056111A (en) 2021-10-07 2021-10-07 Software failure analytic device and software failure analytic method

Country Status (2)

Country Link
JP (1) JP2023056111A (en)
WO (1) WO2023058611A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009205239A (en) * 2008-02-26 2009-09-10 Hitachi Ltd Software verification system
US20120159133A1 (en) * 2010-12-17 2012-06-21 Microsoft Corporation Business exception management pattern for business processes
JP2016164727A (en) * 2015-03-06 2016-09-08 株式会社 日立産業制御ソリューションズ Test case selection device
KR101904911B1 (en) * 2017-10-13 2018-10-08 한국인터넷진흥원 Method for Automatically Detecting Security Vulnerability Based on Hybrid Fuzzing, and Apparatus thereof

Also Published As

Publication number Publication date
WO2023058611A1 (en) 2023-04-13

Similar Documents

Publication Publication Date Title
CN106294120B (en) Method, apparatus and computer program product for testing code
US20090319829A1 (en) Pattern extraction method and apparatus
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
JP2018026135A (en) System and method for cause point analysis for effective handling of static analysis alarms
CN111611172A (en) Project test defect analysis method, device, equipment and storage medium
Kadry A new proposed technique to improve software regression testing cost
CN109101410B (en) Risk drive testing method and device and computer readable storage medium
CN112395202B (en) Interface automation test method and device, computer equipment and storage medium
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN110543429B (en) Test case debugging method, device and storage medium
US11960862B2 (en) Source code correction assistance apparatus and source code correction assistance method
EP3734460B1 (en) Probabilistic software testing via dynamic graphs
JP7190246B2 (en) Software failure prediction device
WO2019142266A1 (en) Test case generation device, test case generation method, and test case generation program
WO2023058611A1 (en) Software failure analysis apparatus and software failure analysis method
CN116431522A (en) Automatic test method and system for low-code object storage gateway
JP4957521B2 (en) Software partial test system, method and program used therefor
CN115034165A (en) Chip simulation verification method, system, equipment and storage medium
CN114116470A (en) Automatic static model checking method and device
CN111198798A (en) Service stability measuring method and device
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
WO2023058609A1 (en) Defect analysis device and defect analysis method
CN112905438A (en) Automatic testing method and device
JP7549992B2 (en) Fault analysis device, program, and fault analysis method
CN113343659B (en) Analysis report generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240312