JP7631164B2 - Fault analysis device and fault analysis method - Google Patents
Fault analysis device and fault analysis method Download PDFInfo
- Publication number
- JP7631164B2 JP7631164B2 JP2021166472A JP2021166472A JP7631164B2 JP 7631164 B2 JP7631164 B2 JP 7631164B2 JP 2021166472 A JP2021166472 A JP 2021166472A JP 2021166472 A JP2021166472 A JP 2021166472A JP 7631164 B2 JP7631164 B2 JP 7631164B2
- Authority
- JP
- Japan
- Prior art keywords
- analysis
- loops
- function
- condition
- loop
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention 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)
Description
本発明は、不具合解析装置及び不具合解析方法に関するものである。 The present invention relates to a defect analysis device and a defect analysis method.
ソフトウェア開発において、仕様書と異なる、または開発者が想定していないソフトウェア(プログラム、ソフトウェアプログラム)の動作は、不具合と呼ばれる。
ソフトウェアをリリースする前に、そうした不具合を全て修正し解消することが望ましい。
In software development, behavior of software (programs, software programs) that differs from the specifications or is not anticipated by the developer is called a defect.
It is advisable to fix and eliminate all such defects before releasing the software.
上述の不具合を検出する一般的な手法としては、テストが存在する。テストでは、仕様書に記述された又は開発者が期待する、入力及び出力をテストケースとして作成する。また、このテストケースを利用して、対象プログラムが入力に対して正しい出力を返すかを確認する。 Testing is a common method for detecting the above defects. In testing, test cases are created based on the inputs and outputs described in the specifications or expected by the developer. These test cases are then used to verify whether the target program returns the correct output for the input.
その結果、入力に対して出力が異なる、又は例外(故障)が発生してプログラムが動作しない場合、不具合がある(不具合が発生した)と判断される。 As a result, if the output differs from the input, or an exception (fault) occurs and the program does not run, it is determined that there is a malfunction (a malfunction has occurred).
不具合がある場合、開発者は、ソフトウェアのどの部分で想定外の処理がなされたかを解析し、原因箇所を特定する。そして開発者は、適切な入出力を行うように当該プログラムのロジックを修正する。 If a defect is found, the developer analyzes which part of the software is performing the unexpected processing and identifies the cause. The developer then modifies the logic of the program in question so that it performs appropriate input and output.
一方、巨大で複雑なプログラムでは、多くのテストケースが必要となる。より具体的には、プログラムの全てのステートメント(行/ステップ)、分岐、分岐条件などをカバーするため、膨大な数のテストケースが必要となる。こうした膨大な数のテストケースを生成することは、現実的ではない。 On the other hand, large and complex programs require many test cases. More specifically, a huge number of test cases are required to cover all statements (lines/steps), branches, branch conditions, etc. of the program. Generating such a huge number of test cases is not realistic.
ところで、入力から出力を計算する制御プログラムにおいて、殆どの入力に対しては正しく処理するが、非常にまれな条件で不正な処理を行う場合がある。このような不具合は、非再現性不具合と呼ばれ、不具合が起きる、まれな条件を特定するのが困難である。 However, in a control program that calculates output from input, most inputs are processed correctly, but in very rare conditions, incorrect processing may occur. This type of malfunction is called a non-reproducible malfunction, and it is difficult to identify the rare conditions under which the malfunction occurs.
出荷直前に非再現性不具合が見つかると、不具合の解析に非常に時間がかかってしまい、出荷が延期されてしまう可能性もある。また、出荷後に非再現性不具合が見つかると、原因となる手がかりが少ないため、原因分析が非常に難しくなる。 If a non-reproducible defect is found just before shipment, it may take a very long time to analyze the defect, which may result in the shipment being delayed. Also, if a non-reproducible defect is found after shipment, there are few clues as to the cause, making cause analysis very difficult.
一定の確率で不具合が発生するならば、製品回収や製品修正のためのリコールを行わざるをえなくなる。出荷遅延や製品回収、リコールは利用者の信頼を傷付け、さらに非常に大きなコストがかかるため、できる限り避けるのが望ましい。 If there is a certain probability of a defect occurring, a product recall or product modification will be necessary. Shipping delays, product recalls, and recalls damage user trust and are extremely costly, so they should be avoided as much as possible.
そこで例えば、ソフトウェアコンポーネントの仕様から、ソフトウェアコンポーネントにおいて故障がどのように伝播するかを評価する方法(特許文献1参照)などが提案されている。 For example, a method has been proposed for evaluating how faults propagate in software components based on the specifications of the software components (see Patent Document 1).
この方法は、モデルの形式検証機能を有するコンピュータが、ソフトウェアコンポーネントの入力インタフェース仕様、出力インタフェース仕様、内部仕様を含む仕様情報を取得する仕様情報取得ステップと、前記仕様情報中の入力インタフェース仕様を正常値以外に変更した仕様情報に従って、前記形式検証機能によって前記ソフトウェアコンポーネントを検証する検証ステップと、前記検証ステップにおいて前記出力インタフェース仕様を
満足しない出力値となる例が発見された場合には、前記正常値以外に変更した入力と、前記出力インタフェース仕様を満たさない出力とを、対応づけて記憶する故障伝播路記憶ステップを実行するものである。
This method includes a specification information acquisition step in which a computer having a formal verification function for a model acquires specification information including an input interface specification, an output interface specification, and an internal specification of a software component; a verification step in which the formal verification function verifies the software component according to specification information in which the input interface specification in the specification information has been changed to a value other than a normal value; and, if an example of an output value that does not satisfy the output interface specification is discovered in the verification step, a fault propagation path storage step in which the input that has been changed to a value other than the normal value and the output that does not satisfy the output interface specification are stored in correspondence with each other.
上述の従来技術によれば、確かに、異常な入力を与えた場合のソフトウェアコンポーネントの挙動を評価できる。ところが、入出力単位で制約違反かどうかの粒度でしか評価がなされていない。したがって、不具合発生の事象が、一方のループの引数が他方のループの出力値であるといった、互いに関連しあう複数ループに起因するケースには対応困難である。そうした多層的な関係も網羅した構造に関して従来技術を単純に適用しようとしても、状態数が爆発して解析が終了しなくなる問題も存在する。
そこで本発明の目的は、対象プログラムのループ構造を踏まえた効率的な不具合解析を可能とする技術を提供することにある。
The above-mentioned conventional technology certainly makes it possible to evaluate the behavior of software components when abnormal input is given. However, the evaluation is only performed at the granularity of whether or not there is a constraint violation on an input/output basis. Therefore, it is difficult to deal with cases where a malfunction occurs due to multiple loops that are related to each other, such as when an argument of one loop is the output value of another loop. Even if the conventional technology is simply applied to a structure that covers such multi-layered relationships, there is a problem that the number of states explodes and the analysis does not end.
Therefore, an object of the present invention is to provide a technique that enables efficient fault analysis taking into account the loop structure of a target program.
上記課題を解決する本発明の不具合解析装置は、解析対象であるソフトウェアのソースコードにおける、解析の開始及び終了、各ループの開始、及び関数呼出関係の各情報を保持する記憶部と、前記各ループのうち前記解析の開始点を含むものを起点とし、前記関数呼出関係にある一連のループ群での呼出元方向に応じて、前記解析の終了点に向け、当該ループ群の各ループに関して、前記ソースコードで規定された変数の値域ごとに記号実行を並行処理して、不具合が検出された箇所と条件を出力する制御部と、を含むことを特徴とする。
また、本発明の不具合解析方法は、情報処理装置が、記憶部において、解析対象であるソフトウェアのソースコードにおける、解析の開始及び終了、各ループの開始、及び関数呼出関係の各情報を保持し、前記各ループのうち前記解析の開始点を含むものを起点とし、前記関数呼出関係にある一連のループ群での呼出元方向に応じて、前記解析の終了点に向け、当該ループ群の各ループに関して、前記ソースコードで規定された変数の値域ごとに記号実行を並行処理して、不具合が検出された箇所と条件を出力する、ことを特徴とする。
The defect analysis device of the present invention, which solves the above problems, is characterized by including a memory unit that retains information on the start and end of analysis, the start of each loop, and function call relationships in the source code of the software to be analyzed, and a control unit that starts from the loop that includes the start point of the analysis, and, depending on the caller direction in a series of loops in the function call relationship, processes symbolic execution in parallel for each value range of variables specified in the source code for each loop in the series of loops in the series of loops in the series, toward the end point of the analysis, and outputs the location where a defect was detected and the condition.
In addition, the defect analysis method of the present invention is characterized in that an information processing device stores in a memory unit information on the start and end of analysis, the start of each loop, and function call relationships in the source code of the software to be analyzed, and starts from one of the loops that includes the start point of the analysis as a starting point, and depending on the caller direction in a series of loops in the function call relationship, performs symbolic execution in parallel for each value range of variables specified in the source code for each loop in the series of loops in the loop group, toward the end point of the analysis, and outputs the location and condition where a defect was detected.
本発明によれば、対象プログラムのループ構造を踏まえた効率的な不具合解析が可能となる。 The present invention enables efficient bug analysis that takes into account the loop structure of the target program.
以下に、本実施形態における不具合解析装置について説明する。本実施形態における不具合解析装置は、対象プログラムのループ構造を踏まえた効率的な不具合解析を可能とする情報処理装置である。
また、本実施形態の不具合解析装置は、特に、記号実行エンジンおよびSMTソルバを備え、不具合の発生箇所を含むループを解析開始点にし、複数のループ間における関数呼出関係に基づく、解析終了点に向けた逆向きの記号実行を行って、SMTソルバによる不具合箇所の関数やその際のパラメータを特定できる。
The defect analysis device according to the present embodiment is an information processing device that enables efficient defect analysis in consideration of the loop structure of a target program.
Furthermore, the fault analysis device of this embodiment is particularly equipped with a symbolic execution engine and an SMT solver, and sets the loop containing the fault occurrence point as the analysis starting point, and performs backward symbolic execution toward the analysis end point based on the function call relationships between multiple loops, and can identify the function at the faulty point and the parameters at that time using the SMT solver.
こうした不具合解析装置の入力には、プログラムのソースコードと、プログラムの実行ログ、プログラム仕様などが含まれる。 The inputs for such defect analysis devices include the program source code, program execution logs, program specifications, etc.
このうちソースコードは、不具合解析対象となるプログラムのものである。また、実行ログには、当該プログラムの実行中に呼び出された関数(メソッド)が含まれている。実行中に例外(例えば0徐算)が発生すると、実行ログは例外が発生した関数の呼び出しで終わっている(プログラム停止を記録している)。 Of these, the source code is that of the program that is the subject of bug analysis. The execution log also contains the functions (methods) that were called during the execution of the program. If an exception occurs during execution (e.g. division by zero), the execution log ends with the call of the function where the exception occurred (recording the program stopping).
不具合解析装置は、上述の実行ログから、例外が発生した関数中の例外が発生した(例えば0徐算の徐算演算)プログラムのステートメント(ソースコードの行/ステップ)を利用者に提示し、解析開始点の指定を受け付ける。 The defect analysis device presents to the user from the execution log the program statement (the line/step of source code) where the exception occurred in the function where the exception occurred (e.g., a division operation by zero) and accepts the user's specification of the starting point of the analysis.
また、不具合解析装置は、利用者(開発者)に問い合わせて、上述の解析開始点を基点に関数呼出関係に連なる一連の各ループを母集団とした、解析処理対象とする最大ループ数を、解析終了の条件として設定する。或いは、上述の解析開始点を基点に、関数呼出関係を踏まえた所定ループの関数を解析終了点と設定する。 The defect analysis device also queries the user (developer) and sets the maximum number of loops to be analyzed as the condition for ending the analysis, with each loop in the function call relationship starting from the above-mentioned analysis start point as the population. Alternatively, the device sets the function of a specified loop based on the function call relationship starting from the above-mentioned analysis start point as the analysis end point.
不具合解析装置は、解析開始点から処理を始め、最大で解析終了条件のループ数に至るまで、通常のプログラム実行とは逆方向の逆向き記号実行を行う。逆向き記号実行の間、不具合解析装置は、実行パスとパス条件を記録する。 The fault analysis device starts processing from the analysis start point and performs backward symbolic execution in the opposite direction to normal program execution until it reaches the number of loops that is the analysis end condition at most. During the backward symbolic execution, the fault analysis device records the execution path and path conditions.
実行パスは、解析終了となった点と解析開始点とを結ぶプログラム中のパス(ステートメント/行/ステップの並び)であり、実行パスに沿って処理が進む。実行パスは、関数の呼び出しも含む。 An execution path is a path (a sequence of statements/lines/steps) in a program that connects the end point of analysis to the start point of analysis, and processing proceeds along the execution path. Execution paths also include function calls.
パス条件は、例外(例えば0徐算)が発生する変数の条件である。変数には、関数内のローカル変数や関数の入力パラメータが含まれる。 A path condition is a condition on a variable that causes an exception (for example, division by zero). Variables include local variables within a function and input parameters to the function.
実行パスやパス条件を参照することで、利用者は、どのようにして例外(不具合)が発生するかを理解することができ、不具合の修正方法を検討する材料にすることができる。結果として、不具合解析装置は、利用者の不具合の解析(分析)を支援することができる。 By referring to the execution path and path conditions, the user can understand how the exception (fault) occurs and can use this information to consider how to fix the fault. As a result, the fault analysis device can assist the user in analyzing the fault.
不具合解析装置は、SMTソルバ(Satisfiability Modulo Theories Solver)を用い
てパス条件を満足する解析終了点である関数の入力パラメータ値を算出する。この値を入力とするテストを行うことで、利用者は修正したプログラムが正しく動作するかを確認できるようになる。
≪不具合解析装置の構成≫
図1は、本実施形態に係る不具合解析装置100の入力、出力、および全体構成を示す図である。不具合解析装置100は、制御部110、記憶部120、および入出力部180を備える。
The defect analysis device uses a Satisfiability Modulo Theories Solver (SMT solver) to calculate the input parameter values of the function that is the analysis end point that satisfies the path conditions. By performing a test using these values as input, the user can check whether the modified program works correctly.
<Configuration of defect analysis device>
1 is a diagram showing the input, output, and overall configuration of a
このうち制御部110は、記憶部120で保持するプログラム121を呼び出して実行し、必要な機能(機能部111~114)を実装するCPU(Central Processing Unit)である。また、記号実行エンジン115およびSMTソルバ116も有する。
The
記憶部120は、RAM(Random Access Memory)やROM(Read Only Memory)、SSD(Solid State Drive)などから構成される。記憶部120には、プログラム121
や関数呼出関係DB122、解析開始/終了点情報123、ループ開始点情報124などが記憶される。
The
A function
なお、プログラム121は、コンピュータを不具合解析装置100として機能させるためのプログラムであって、不具合解析処理の処理手順の記述を含む。
The
また、関数呼出関係DB122には、ループ間でどの関数がどの関数を呼び出すかの関係、換言すれば、呼出関係グラフ(関数間の呼出関係を表現する制御フローのグラフ)を示すデータが記憶される。 Function call relationship DB122 also stores data showing the relationships between which functions call which other functions between loops, in other words, a call relationship graph (a graph of the control flow that represents the call relationships between functions).
入出力部180は、ディスプレイやキーボード、マウスなどのユーザインターフェイスである。この入出力部180は、さらに、通信インターフェイスや記録媒体の読み書きデバイスを備えてもよい。
The input/
制御部110を説明する前に、不具合解析装置100の入力と出力とを説明する。
≪不具合解析装置の入力≫
不具合解析装置100の入力には、ソースコード210、プログラム実行ログ220、およびプログラム仕様230が含まれる。ソースコード210は、解析対象であるソフトウェアプログラムを構成する関数(メソッド)のソースコードである。プログラム仕様230には、関数の名前、および、関数の入力パラメータ値と返り値(戻り値)の名前と型と範囲とが記述されている。
Before describing the
<Failure analysis device input>
The inputs to the
プログラム実行ログ220(実行ログ)は、プログラム実行中の関数呼び出しの記録を含む。プログラム実行ログ220には、呼び出された関数の名前(識別情報)の他に呼び出し時の入力パラメータ値や、呼び出しから戻るときの返り値を含んでもよい。プログラム実行ログ220は、さらにプログラム実行中に発生した例外を含んでもよい。例外としては、0徐算やプログラム仕様230に記述された入力パラメータ値または返り値の違反(仕様の範囲外の値)がある。
≪不具合解析装置の出力≫
不具合解析装置100の出力には、実行パス240、および入力パラメータ値250が含まれる。実行パス240は、不具合が発生するプログラム中のパス(ソースコード210のなかで順次処理される一連のステートメント/行/ステップ)である。
The program execution log 220 (execution log) contains a record of function calls made during program execution. The
<Output from defect analysis device>
The output of the
実行パス240の一端は、不具合に係る例外(故障)が発生するステートメント/行/ステップであり、解析開始点、または単に開始点と記す。解析開始点は、例えば0徐算が発生する徐算演算を含むステートメントである。
One end of the
実行パス240の他端は、解析開始点を含む関数を直接または間接に呼び出すループの関数であり、解析終了点、またはエントリポイントと記す。
The other end of the
入力パラメータ値250は、エントリポイントとなる関数の、不具合が発生するときの入力パラメータ値である。
≪不具合解析装置の制御部の構成≫
制御部110は、CPU(Central Processing Unit)を含んで構成され、呼出関係生
成部111、解析開始点取得部112、解析終了点取得部113、ループ開始点取得部114、記号実行エンジン115、およびSMTソルバ116を備える。
An
<Configuration of the control unit of the defect analysis device>
The
呼出関係生成部111は、ソースコード210から、複数ループの各間における関数の呼出関係を取得し、これを関数呼出関係DB122に格納する。
The call
解析開始点取得部112は、実行ログ220が示す不具合発生箇所に基づいた、開発者からの解析開始点の指定を受け付けるか、あるいは、プログラム実行ログ220を解析して解析開始点を取得するとしてもよい(その場合の解析開始点の取得手順の詳細は後記する)。
The analysis start
解析終了点取得部113は、上述の解析開始点を基点に関数呼出関係に連なる一連の各ループを母集団とした、解析処理対象とするループ数の最大値を、解析終了の条件として開発者から受け付ける。
The analysis end
或いは、上述の解析開始点を基点に、関数呼出関係を踏まえた所定ループの関数を解析終了点と設定する。その場合、解析開始点を含む関数を呼び出す関数を関数呼出関係DB122から取得して、エントリポイントの候補として入出力部180に備わるディスプレイに表示する。利用者(開発者)は、候補のなかから1つまたは複数のエントリポイントを選択する。解析終了点取得部113は、選択された関数を解析終了点(エントリポイント)として設定する。
Alternatively, a function of a specified loop based on the function call relationship is set as the analysis end point, taking the above-mentioned analysis start point as the base point. In this case, functions that call the function including the analysis start point are obtained from the function
ループ開始点取得部114は、ソースコード210が含む各ループにおける開始点について、例えば、開発者から指定を受けるか、或いは予め定めた所定コードをキーにループ開始点を検索、特定する。
The loop start point acquisition unit 114 searches for and identifies the start point of each loop contained in the
記号実行エンジン115は、実行パス240、およびパス条件を生成する。パス条件は、解析対象のプログラムの実行が実行パス240を通るための変数(ローカル変数や入力パラメータ)の条件である。実行パス240やパス条件の詳細は後記する。
The
記号実行エンジン115は、ソースコード210が含む各ループのうち解析開始点を含むものを起点とし、関数呼出関係DB122が示す呼出関係に基づく一連のループ群での呼出元方向に応じて、解析終了点に向け、当該ループ群の各ループに関して、共通変数の値域ごとに記号実行を並行処理する。その結果、上述の実行パス240、およびパス条件が生成される。
The
以下の文献に記号実行エンジンンの詳細が記述されている: Peter Dinges and Gul Agha, "Targeted Test Input GenerationUsing Symbolic Concrete Backward Execution"。 The symbolic execution engine is described in detail in the following paper: Peter Dinges and Gul Agha, "Targeted Test Input GenerationUsing Symbolic Concrete Backward Execution".
SMTソルバ116(ソルバ)は、上述の記号実行エンジン115が生成したパス条件を満たす入力パラメータ値250を生成する。以下の文献にSMTソルバが記述されている: Leonardo deMoura and Nikolaj Bjorner, "Z3: An Efficient SMT Solver"。
≪実行パスとパス条件:基本的な考え方≫
図2は、本実施形態に係る実行パスおよびパス条件を説明するための図である。図2は、関数baz10、関数bar20、および関数foo30の3つの関数のソースコード210を含む。関数baz10は関数bar20を呼び出し、関数bar20は関数foo30を呼び出す。関数foo30で0徐算の例外が発生し、エントリポイントとして関数baz10が指定されたという前提で、説明を続ける。
The SMT solver 116 (solver) generates input parameter values 250 that satisfy the path conditions generated by the above-mentioned
<<Execution paths and path conditions: Basic concepts>>
Fig. 2 is a diagram for explaining execution paths and path conditions according to this embodiment. Fig. 2 includes
この場合、プログラム実行ログ220は、関数baz10の呼び出しの記録、関数bar20の呼び出しの記録、関数foo30の呼び出しの記録を含み、0徐算発生の記録で終わる。
In this case, the
プログラム実行ログ220を解析することで、解析開始点取得部112は、関数foo30のなかで0徐算の例外が発生したことを検出する。関数fooの行3が、徐算演算を含む唯一のステートメント/行であるから、解析開始点取得部112は、開始点を関数foo30の行3に設定する。つまりは解析開始点取得部112は、実行ログから例外が発生したプログラムのステートメントを解析開始点として取得する。
By analyzing the
パス条件は、例外が発生する条件/制約である。解析開始点である関数foo30の行3におけるパス条件32は「b=0」である。
A path condition is a condition/constraint under which an exception occurs. The
記号実行エンジン115は、開始点から始めて、通常の(前向き)実行とは反対の方向にプログラム(ソースコード210)のなかを、エントリポイントに到達するまで探索(逆向き記号実行とも記す)する。エントリポイントが複数ある場合には、記号実行エンジン115は、何れか1つのエントリポイントに到達するまで探索する。
The
図2の場合、記号実行エンジン115は、関数foo30の行3から探索を始めて、行1(先頭行)に到達する。この時点での実行パスは、関数foo30の行3~行1である。行1におけるパス条件31は「b=0」のままとなる。
In the case of FIG. 2, the
記号実行エンジン115は、関数foo30が、第2入力パラメータのbが0で呼ばれたと判断して、関数foo30を呼び出すステートメントを探索する。図2の場合、関数foo30を呼び出すステートメントは、関数bar20の行3であり、記号実行エンジン115は、当該行から探索を継続する。
The
この行におけるパス条件22は、第2入力パラメータが0となる「a-b=0」である。この時点における実行パスは、関数foo30の行3~行1、関数bar20の行3である。また、この時点でのパス条件は、関数foo30における「b=0」、関数bar20における「a-b=0」である。
The
なお、関数baz10、関数bar20、および関数foo30にそれぞれ同じ名前の変数a,b,cがあるが、これらはぞれぞれの関数のローカル変数であり、異なる変数である。 Note that functions baz10, bar20, and foo30 each have variables with the same names, a, b, and c, but these are local variables of each function and are different variables.
記号実行エンジン115は、関数bar20の行3から探索を始めて、行1に到達する。この時点での実行パスは、関数foo30の行3~行1、関数bar20の行3~行1である。行1におけるパス条件21は「a=b」であり、パス条件22の「a-b=0」と同等である。
The
記号実行エンジン115は、関数bar20が、第1パラメータと第2入力パラメータとが同じ値で呼ばれたと判断して、関数bar20を呼び出すステートメントを探索する。図2の場合、関数bar20を呼び出すステートメントは、関数baz10の行3であり、記号実行エンジン115は、当該行から探索を継続する。この行におけるパス条件12は「a=b」である。
The
この時点における実行パスは、関数foo30の行3~行1、関数bar20の行3~行1、関数baz10の行3である。また、この時点でのパス条件は、関数foo30に
おける「b=0」、関数bar20における「a-b=0」、関数baz10における「a=b」である。
The execution path at this point is
記号実行エンジン115は、関数baz10の行3から探索を始めて、行1に到達する。関数baz10は、解析終了点なので、探索はここで終了する。この時点での実行パスは、関数foo30の行3~行1、関数bar20の行3~行1、関数baz10の行3~行1である。また、この時点でのパス条件は、関数foo30における「b=0」、関数bar20における「a-b=0」、関数baz10における「a=b」である。
The
パス条件には、エントリポイント(解析終了点)の入力パラメータ値の条件を含んでいる。SMTソルバ116は、パス条件を解いて、エントリポイントである関数baz10の、パス条件を満たす入力パラメータ値250、例えばa=0でb=0、を算出する。
The path conditions include conditions for the input parameter values of the entry point (end point of analysis). The
最後に、記号実行エンジン115は、実行パスを入出力部180に備わるディスプレイに表示する(実行パスを出力する)。利用者は、プログラムのなかで、どのような条件でどのように処理が進んで不具合が発生するかを理解することができる。ひいては、問題点を見出し、プログラムを修正することができるようになる。
Finally, the
SMTソルバ116は、入力パラメータ値250(パス条件を満たすエントリポイント(解析終了点)の入力値)を提供し、利用者はこの値を用いて修正したプログラムのテストができる。
The
上記の説明において、関数foo30、および関数bar20の呼び出し元のステートメントはそれぞれ1つであった。複数の呼び出し元がある場合には、それぞれの呼び出し元から探索を継続する。 In the above explanation, function foo30 and function bar20 each had one caller statement. If there are multiple callers, the search continues from each caller.
例えば、関数bazA(不図示)が、行5でbar(d+1,d―2)と関数bar20を呼び出したとする。記号実行エンジン115は、関数bazAの行5まで探索して、パス条件を求める。
For example, assume that function bazA (not shown) calls bar(d+1, d-2) and function bar20 on line 5. The
この場合、関数bar20のパス条件である第1パラメータと第2パラメータとが等しいことから、「d+1=d―2」がパス条件となる。しかしながら、このような条件が成立することはないので、記号実行エンジン115は、関数bazAの行5からの探索を打ち切り、別の呼び出し元の探索を継続する。
In this case, the first and second parameters, which are path conditions for function bar20, are equal, so "d+1=d-2" becomes the path condition. However, since such a condition is never satisfied, the
なお、複数の呼び出し元の探索を行い、それぞれがエントリポイントに到達した場合には、記号実行エンジン115は、それぞれの実行パスとパス条件とを記録するようにしてもよい。このような場合には、実行パスとパス条件とが、それぞれ複数あることになる。換言すれば、異なる条件で、同じ個所(解析開始点)で例外が発生することが判明したことになる。
When multiple callers are searched and each of them reaches the entry point, the
探索途中で条件分岐があった場合には、記号実行エンジン115は、分岐条件をパス条件に加える。例えば、関数foo30の行3が、「if (x<=y) c=a/b;」であったとする。この場合のパス条件は、「b=0」かつ「x<=y」である。
If a conditional branch occurs during the search, the
解析終了点が複数指定されたり、関数の呼び出し元が複数あったり、条件分岐があったりする場合には、探索で辿り着く解析終了点や実行パス、パス条件が複数になる場合がある。記号実行エンジン115は、このようにして実行パスとパス条件とを算出して特定する。
When multiple analysis end points are specified, when there are multiple callers of a function, or when there are conditional branches, the search may reach multiple analysis end points, execution paths, and path conditions. In this way, the
≪ユーザインターフェイス≫
図3は、本実施形態に係る不具合解析装置100の画面400の構成図である。画面400の左右における中央には上から、解析開始点の情報表示領域411、解析終了点の情報表示領域412、および解析結果の情報表示領域413が配置される。
<User Interface>
3 is a configuration diagram of a
解析開始点取得部112が解析開始点を設定すると、解析開始点の情報表示領域411に解析開始点を含む関数名や解析開始点の行数、例外が発生する条件などが表示される。例えば、0徐算の例外が発生し徐算演算が複数ある場合には、解析開始点の候補が複数あることになる。このような場合には、情報表示領域411には、解析開始点の候補が複数あり、そのなかの1つを選択するように利用者を促すメッセージが表示される。利用者は、「指定」ボタン421を押下して、解析開始点の候補を表示する画面(不図示)から1つの解析開始点を選択する。解析開始点取得部112は、選択された解析開始点の候補を解析開始点と設定する。
When the analysis start
不具合解析装置100の起動直後の時点では、解析終了点の情報表示領域412には、解析終了点(エントリポイント)の選択を促すメッセージが表示される。利用者は「指定」ボタン422を押下して、解析終了点の候補(開始点を含む関数、当該関数を直接または間接に呼び出す関数)を表示する画面(不図示)から1つ以上の解析終了点を選択する。解析終了点取得部113は、選択された解析終了点の候補を解析終了点と設定して、情報表示領域412に表示する。複数選択された場合には、複数の解析終了点が情報表示領域412に表示される。
Immediately after the
「解析開始」ボタン423が押下されると、記号実行エンジン115が、実行パスの探索を行い、辿り着いた解析終了点と解析終了点の入力パラメータに関するパス条件が、解析結果の情報表示領域413に表示される。複数の解析終了点、または、複数の入力パラメータに関するパス条件があれば、情報表示領域413には、複数の解析終了点やパス条件が表示される。
When the "Start Analysis"
「実行パス表示」ボタン424が押下されると、実行パス表示画面430(後記する図4参照)が入出力部180に備わるディスプレイに表示される。 図4は、本実施形態に係る実行パス表示画面430の構成図である。実行パス表示画面430には、実行パスが通る関数baz10、関数bar20、および関数foo30のソースコードが表示される。
When the "Display execution path"
関数baz10、関数bar20、および関数foo30のソースコードのなかで、それぞれの実行パス431,432,433となるステートメントは、反転表示される。また、解析開始点のステートメントには「開始点」が、エントリポイントの関数名のステートメントには「終了点」がプログラムのコメントとして表示される。 In the source code for functions baz10, bar20, and foo30, the statements that are execution paths 431, 432, and 433, respectively, are displayed in reverse video. In addition, the statement at the start of the analysis is marked with "start point," and the statement with the entry point function name is marked with "end point" as a program comment.
さらに、ステートメントに対応してパス条件が、プログラムのコメントとして表示される。プログラムの流れを示す実行パス、および実行パスにおける不具合が発生する条件であるパス条件を確認することで、利用者(開発者)は不具合が発生する原因が理解でき、延いてはどのようにソースコードを修正するかを検討しやすくなる。 In addition, the path conditions corresponding to each statement are displayed as program comments. By checking the execution path, which shows the flow of the program, and the path conditions, which are the conditions under which a defect will occur along that execution path, users (developers) can understand the cause of the defect, which in turn makes it easier to consider how to modify the source code.
図4では、開始点、終了点、パス条件が、プログラムのコメントの形式で表示されるが、ステートメント/行との対応が把握可能であれば、他の形式であってもよい。 In Figure 4, the start point, end point, and path conditions are displayed in the form of program comments, but other formats are acceptable as long as the correspondence with statements/lines can be understood.
≪ループの概念を踏まえた例≫
上述の≪実行パスとパス条件:基本的な考え方≫では、同じ処理を周期的に実行する、いわゆるループ構造に関して特に配慮した概念について示してはいない。一方、組込み制
御ソフトはループ構造を持つことが多い。
<Example based on the concept of loop>
The above "Execution Paths and Path Conditions: Basic Concepts" does not show any concept that takes into consideration so-called loop structures, which execute the same process cyclically. However, embedded control software often has loop structures.
そうしたループ構造を有するプログラムでの不具合は、図5で例示するように、最初の周期のループから複数周期離れたループで発生するケースも多い。この時、各周期のループ間には共通して用いる変数つまり共通変数Sがあり、当該共通変数Sの値をループ間(の関数を介して)で伝達している。 In programs with such loop structures, problems often occur in loops that are several cycles away from the first loop, as shown in the example in Figure 5. In such cases, there is a variable that is used in common between the loops in each cycle, that is, a common variable S, and the value of the common variable S is transmitted between the loops (via a function).
この値が、エラー発生時点で、共通変数Sにて想定している値の範囲にない場合、不具合の原因は、最初に値の範囲を逸脱した範囲のソースコード部位近辺にあると考えられる。そこで、ループ開始点となる毎に、複数の変数の値域(例:if文で分岐したパスごと)で記号実行を並行処理に分割し、ループ開始点で変数仕様を満たす時点を検出した時点で解析を終了する。また、解析が終了しなかった場合に備え、最大ループ数を指定するものとする。 If this value is not within the range of values expected for common variable S at the time the error occurs, the cause of the malfunction is likely to be near the part of the source code where the value range first deviated. Therefore, at each loop start point, symbolic execution is divided into parallel processes for multiple variable ranges (e.g., for each path branched by an if statement), and analysis is terminated when a point is detected at the loop start point where the variable specifications are satisfied. Additionally, a maximum number of loops is specified in case the analysis does not end.
≪不具合解析処理≫
図6は、本実施形態に係る不具合解析処理のフローチャートである。また、図7は、本実施形態におけるループ構造での不具合解析概念を示す説明図である。
<Failure analysis processing>
Fig. 6 is a flowchart of the defect analysis process according to this embodiment, and Fig. 7 is an explanatory diagram showing the concept of defect analysis in a loop structure according to this embodiment.
ステップs10において制御部110は、入力であるソースコード210(図8)、プログラム実行ログ220、プログラム仕様230を読み込む。
In step s10, the
ステップs11において呼出関係生成部111は、読み込まれたソースコード210(図8)から関数の呼出関係を抽出して、関数呼出関係DB122に格納する。
In step s11, the call
ステップs12において解析開始点取得部112は、プログラム実行ログ220から解析開始点を取得して設定する。
In step S12, the analysis start
例えば、プログラム仕様230によれば共通変数sの値域は「0」か「1」であるところ、実行ログ220における不具合発生箇所では、共通変数Sの値が「-100」となっていた。つまり、図8のソースコードサンプルにおいて、「y=s/(s+100)」の関数)が0除算のエラー発生箇所となっており、このコードを含むループが解析開始点となる。
For example, according to the
なお、解析開始点の候補が複数ある場合には、利用者に問い合わせて取得する(図3記載の「指定」ボタン421参照)。また、このステップs12において解析終了点取得部113は、利用者に問い合わせて解析終了条件を取得して設定する。図7では、処理上限とするループ数の最大値を「200」と利用者が設定し、これを受け付けた例を示している。
If there are multiple candidates for the analysis start point, the user is queried to obtain them (see the "Specify"
ステップs13において記号実行エンジン115は、解析開始点のループから、関数呼出関係に従って、一連のループそれぞれについて探索(逆向き記号実行)を開始する。こうした逆向き記号実行の流れ自体は、対象が図8のソースコードとなった点を除けば、図2~4のものとほぼ同様である。ただし、図8で示すソースコードを繰り返し実行するごと、すなわちループするごとに、共通変数Sの値が規定値域を越えていないか確認する探索を行う点は特徴的である。
In step s13, the
ステップ14において記号実行エンジン115は、解析終了条件に到達しているか判定する。つまり、ループの処理回数が上限の「200」を越えたか判定する。この判定の結果、ループの処理回数が上限の「200」回を越えていない場合(s14:N)、ステップs15において記号実行エンジン115は、当該ループでの共通変数Sの値が規定の値
域に適合しているか判定する。
In step s14, the
この判定の結果、共通変数Sの値が規定の値域に適合している場合(ステップs15:Y)、処理はs13に遷移する。 If the result of this determination is that the value of the common variable S fits within the specified range (step s15: Y), the process transitions to s13.
他方、上述の判定の結果、共通変数Sの値が規定の値域に適合していない場合(ステップs15:N)、ステップs16において記号実行エンジン115は、実行パスとパス条件を記録し、処理をs13に戻す。
On the other hand, if the result of the above determination is that the value of the common variable S does not fit the specified range (step s15: N), in step s16, the
上述のように、ステップs14において解析終了条件に到達したと判定されるまで、各ループで共通変数の値についての判定と、実行パス及びパス条件の記録を繰り返す。 As described above, in each loop, the determination of the value of the common variable and the recording of the execution path and path conditions are repeated until it is determined in step S14 that the analysis end condition has been reached.
ステップS17において記号実行エンジン115は、探索(逆向き記号実行)の結果として、例えば、複数ループの実行に伴う不具合の発生元である関数:mainに関して、呼出変数のパラメータ:x=53,y=1.1, s=1、を表示する(図9参照)。
In step S17, the
なお、記号実行エンジン115は、ソースコードで規定された変数の値域ごとに記号実行を並行処理し、不具合が検出された箇所と条件を出力するものとする。また、各ループに関する記号実行及び不具合の検出に際し、当該ループの開始点で変数の所定仕様を満たすことを検出した場合、当該ループに関して解析を終了するものである、
以上、本発明を実施するための最良の形態などについて具体的に説明したが、本発明はこれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能である。
The
Although the best mode for carrying out the present invention has been specifically described above, the present invention is not limited to this, and various modifications are possible without departing from the spirit and scope of the present invention.
こうした本実施形態によれば、対象プログラムのループ構造を踏まえた効率的な不具合解析が可能となる。 This embodiment enables efficient bug analysis that takes into account the loop structure of the target program.
本明細書の記載により、少なくとも次のことが明らかにされる。すなわち、本実施形態の不具合解析装置において、前記制御部は、前記起点から前記呼出元方向に応じて、前記解析の終了点に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、当該ループの開始点で前記変数の所定仕様を満たすことを検出した場合、当該ループに関して解析を終了するものである、としてもよい。 The description in this specification makes clear at least the following. That is, in the defect analysis device of this embodiment, the control unit may be configured to end the analysis of a loop when it detects that a predetermined specification of the variable is satisfied at the start point of the loop during the symbolic execution and defect detection for each loop from the start point to the caller direction toward the end point of the analysis.
これによれば、不具合発生箇所ではないループに関して処理を回避/終了し、全体として効率化を図ることにつながる。ひいては、対象プログラムのループ構造を踏まえた、より効率的な不具合解析が可能となる。 This allows processing to be avoided/terminated for loops where no bugs occur, leading to greater efficiency overall. Ultimately, this enables more efficient bug analysis that takes into account the loop structure of the target program.
また、本実施形態の不具合解析装置において、前記記憶部は、前記解析の終了の情報として、処理対象とする最大ループ数の情報を保持し、前記制御部は、前記起点から前記呼出元方向に応じて、前記解析の終了点に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、前記解析が終了となったループが前記最大ループ数に達した時点で処理を終了するものである、としてもよい。 In addition, in the defect analysis device of this embodiment, the storage unit may hold information on the maximum number of loops to be processed as information on the end of the analysis, and the control unit may end the processing when the loop for which the analysis has ended reaches the maximum number of loops when executing the symbols and detecting the defects for each loop toward the end point of the analysis according to the direction from the starting point to the caller.
これによれば、解析自体が未完となってしまう自体を効果的に回避可能となる。ひいては、対象プログラムのループ構造を踏まえた、より効率的な不具合解析が可能となる。 This effectively avoids situations where the analysis itself is left incomplete. Ultimately, it enables more efficient bug analysis that takes into account the loop structure of the target program.
また、本実施形態の不具合解析装置において、前記制御部は、前記解析の開始点から終了点に向けた逆向きの記号実行を行うことで実行パスを出力する記号実行エンジンを用いて、不具合が発生する条件であるパス条件を算出し、前記不具合の箇所と条件の検出および出力に際し、所定のソルバを用いて、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析の終了点となる関
数の入力パラメータ値を出力するものである、としてもよい。
Furthermore, in the defect analysis device of this embodiment, the control unit may calculate a path condition, which is the condition for a defect to occur, using a symbolic execution engine that outputs an execution path by performing symbolic execution in the reverse direction from the start point to the end point of the analysis, and when detecting and outputting the location and condition of the defect, use a specified solver to output the condition of the input parameter value of the function that is the end point of the analysis that satisfies the path condition, or the input parameter value of the function that is the end point of the analysis that satisfies the path condition.
これによれば、不具合箇所の特定や条件を効率的に実行できる。ひいては、対象プログラムのループ構造を踏まえた、より効率的な不具合解析が可能となる。 This allows for efficient identification of defect locations and conditions. Ultimately, this enables more efficient defect analysis that takes into account the loop structure of the target program.
また、本実施形態の不具合解析方法において、前記情報処理装置が、前記起点から前記呼出元方向に応じて、前記解析の終了点に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、当該ループの開始点で前記変数の所定仕様を満たすことを検出した場合、当該ループに関して解析を終了する、としてもよい。 In addition, in the defect analysis method of this embodiment, the information processing device may terminate the analysis of a loop when it detects that a predetermined specification of the variable is satisfied at the start point of the loop during the symbolic execution and defect detection for each loop from the start point to the caller direction toward the end point of the analysis.
また、本実施形態の不具合解析方法において、前記情報処理装置が、前記記憶部において、前記解析の終了の情報として、処理対象とする最大ループ数の情報を保持し、前記起点から前記呼出元方向に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、前記解析が終了となったループが前記最大ループ数に達した時点で処理を終了する、としてもよい。 In addition, in the defect analysis method of this embodiment, the information processing device may store information on the maximum number of loops to be processed in the memory unit as information on the end of the analysis, and when performing the symbolic execution and detecting the defect for each loop from the starting point toward the caller, end the processing when the loop for which the analysis has ended reaches the maximum number of loops.
また、本実施形態の不具合解析方法において、前記情報処理装置が、前記解析の開始点から終了点に向けた逆向きの記号実行を行うことで実行パスを出力する記号実行エンジンを用いて、不具合が発生する条件であるパス条件を算出し、前記不具合の箇所と条件の検出および出力に際し、所定のソルバを用いて、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値を出力する、としてもよい。 In addition, in the defect analysis method of this embodiment, the information processing device may use a symbolic execution engine that outputs an execution path by performing symbolic execution in the reverse direction from the start point to the end point of the analysis to calculate a path condition that is the condition under which a defect occurs, and when detecting and outputting the defect location and condition, may use a specified solver to output the condition of the input parameter value of the function that is the end point of the analysis that satisfies the path condition, or the input parameter value of the function that is the end point of the analysis that satisfies the path condition.
100 不具合解析装置
110 制御部
111 呼出関係生成部
112 解析開始点取得部
113 解析終了点取得部
114 ループ開始点取得部
115 記号実行エンジン
116 SMTソルバ(ソルバ)
120 記憶部
121 プログラム
122 関数呼出関係DB
123 解析開始/終了点情報
124 ループ開始点情報
180 入出力部
210 ソースコード(プログラム)
220 プログラム実行ログ(実行ログ)
230 プログラム仕様
240 実行パス
250 入力パラメータ値
100: Fault analysis device 110: Control unit 111: Call relationship generation unit 112: Analysis start point acquisition unit 113: Analysis end point acquisition unit 114: Loop start point acquisition unit 115: Symbolic execution engine 116: SMT solver (solver)
120
123 Analysis start/
220 Program execution log (execution log)
230
Claims (8)
前記各ループのうち前記解析の開始点を含むものを起点とし、前記関数呼出関係にある一連のループ群での呼出元方向に応じて、前記解析の終了点に向け、当該ループ群の各ループに関して、前記ソースコードで規定された変数の値域ごとに記号実行を並行処理して、不具合が検出された箇所と条件を出力する制御部と、
を含むことを特徴とする不具合解析装置。 a storage unit for storing information on the start and end of analysis, the start of each loop, and function call relationships in the source code of the software to be analyzed;
a control unit that performs symbolic execution in parallel for each of the loops in the series of loops in the loop group, starting from one of the loops that includes the start point of the analysis and corresponding to a caller direction in the series of loops in the function call relationship, toward the end point of the analysis, and outputs a location and a condition where a malfunction has been detected;
A failure analysis device comprising:
前記起点から前記呼出元方向に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、当該ループの開始点で前記変数の所定仕様を満たすことを検出した場合、当該ループに関して解析を終了するものである、
ことを特徴とする請求項1に記載の不具合解析装置。 The control unit is
when detecting the symbolic execution and the fault detection for each of the loops from the starting point toward the caller, if it is detected that the variable satisfies a predetermined specification at the starting point of the loop, the analysis for the loop is terminated.
2. The failure analysis device according to claim 1,
前記解析の終了の情報として、処理対象とする最大ループ数の情報を保持し、
前記制御部は、
前記起点から前記呼出元方向に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、前記解析が終了となったループが前記最大ループ数に達した時点で処理を終了するものである、
ことを特徴とする請求項2に記載の不具合解析装置。 The storage unit is
As information on the end of the analysis, information on the maximum number of loops to be processed is stored;
The control unit is
When the symbolic execution and the detection of the fault are performed for each of the loops from the starting point toward the caller, the processing is terminated when the number of loops for which the analysis has been completed reaches the maximum number of loops.
3. The failure analysis device according to claim 2.
前記解析の開始点から終了点に向けた逆向きの記号実行を行うことで実行パスを出力する記号実行エンジンを用いて、不具合が発生する条件であるパス条件を算出し、
前記不具合の箇所と条件の検出および出力に際し、所定のソルバを用いて、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値を出力するものである、
ことを特徴とする請求項1に記載の不具合解析装置。 The control unit is
Calculating a path condition that is a condition under which a defect occurs using a symbolic execution engine that outputs an execution path by performing symbolic execution backward from the start point to the end point of the analysis;
When detecting and outputting the defective location and condition, a predetermined solver is used to output a condition of an input parameter value of a function that is an end point of the analysis that satisfies the path condition, or an input parameter value of a function that is an end point of the analysis that satisfies the path condition.
2. The failure analysis device according to claim 1,
記憶部において、解析対象であるソフトウェアのソースコードにおける、解析の開始及び終了、各ループの開始、及び関数呼出関係の各情報を保持し、
前記各ループのうち前記解析の開始点を含むものを起点とし、前記関数呼出関係にある一連のループ群での呼出元方向に応じて、前記解析の終了点に向け、当該ループ群の各ループに関して、前記ソースコードで規定された変数の値域ごとに記号実行を並行処理して、不具合が検出された箇所と条件を出力する、
ことを特徴とする不具合解析方法。 An information processing device,
A storage unit stores information on the start and end of analysis, the start of each loop, and function call relationships in the source code of the software to be analyzed;
starting from one of the loops including the start point of the analysis as a starting point, and processing symbolic execution in parallel for each of the loops in the series of loops in the function call relationship toward the end point of the analysis for each of the loops in the series of loops, for each range of variables defined in the source code, and outputting the location and condition where a defect is detected;
A defect analysis method comprising:
前記起点から前記呼出元方向に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、当該ループの開始点で前記変数の所定仕様を満たすことを検出した場合、当該ループに関して解析を終了する、
ことを特徴とする請求項5に記載の不具合解析方法。 The information processing device,
when detecting, in the symbolic execution and the detection of the fault for each of the loops from the starting point toward the caller, that a predetermined specification of the variable is satisfied at the starting point of the loop, the analysis for the loop is terminated;
6. The method for analyzing a defect according to claim 5.
前記記憶部において、前記解析の終了の情報として、処理対象とする最大ループ数の情報を保持し、
前記起点から前記呼出元方向に向けた、前記各ループに関する前記記号実行及び前記不具合の検出に際し、前記解析が終了となったループが前記最大ループ数に達した時点で処理を終了する、
ことを特徴とする請求項6に記載の不具合解析方法。 The information processing device,
The storage unit stores information on a maximum number of loops to be processed as information on the end of the analysis,
when the symbolic execution and the detection of the fault are performed for each of the loops from the starting point toward the caller, the processing is terminated when the number of loops for which the analysis has been completed reaches the maximum number of loops.
7. The method for analyzing a defect according to claim 6.
前記解析の開始点から終了点に向けた逆向きの記号実行を行うことで実行パスを出力する記号実行エンジンを用いて、不具合が発生する条件であるパス条件を算出し、
前記不具合の箇所と条件の検出および出力に際し、所定のソルバを用いて、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値の条件、または、前記パス条件を満たす前記解析の終了点となる関数の入力パラメータ値を出力する、
ことを特徴とする請求項5に記載の不具合解析方法。 The information processing device,
Calculating a path condition that is a condition under which a defect occurs using a symbolic execution engine that outputs an execution path by performing symbolic execution backward from the start point to the end point of the analysis;
When detecting and outputting the defective location and condition, a predetermined solver is used to output a condition of an input parameter value of a function that is an end point of the analysis that satisfies the path condition, or an input parameter value of a function that is an end point of the analysis that satisfies the path condition.
6. The method for analyzing a defect according to claim 5.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021166472A JP7631164B2 (en) | 2021-10-08 | 2021-10-08 | Fault analysis device and fault analysis method |
| PCT/JP2022/037005 WO2023058609A1 (en) | 2021-10-08 | 2022-10-03 | Defect analysis device and defect analysis method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021166472A JP7631164B2 (en) | 2021-10-08 | 2021-10-08 | Fault analysis device and fault analysis method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023056953A JP2023056953A (en) | 2023-04-20 |
| JP7631164B2 true JP7631164B2 (en) | 2025-02-18 |
Family
ID=85804285
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021166472A Active JP7631164B2 (en) | 2021-10-08 | 2021-10-08 | Fault analysis device and fault analysis method |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP7631164B2 (en) |
| WO (1) | WO2023058609A1 (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018190219A (en) | 2017-05-09 | 2018-11-29 | 株式会社日立製作所 | Software specification analysis apparatus and software specification analysis method |
| US20210019250A1 (en) | 2019-07-16 | 2021-01-21 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, device and computer-readable storage medium for guiding symbolic execution |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8763001B2 (en) * | 2010-10-29 | 2014-06-24 | Fujitsu Limited | Technique for efficient parallelization of software analysis in a distributed computing environment through intelligent dynamic load balancing |
-
2021
- 2021-10-08 JP JP2021166472A patent/JP7631164B2/en active Active
-
2022
- 2022-10-03 WO PCT/JP2022/037005 patent/WO2023058609A1/en not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018190219A (en) | 2017-05-09 | 2018-11-29 | 株式会社日立製作所 | Software specification analysis apparatus and software specification analysis method |
| US20210019250A1 (en) | 2019-07-16 | 2021-01-21 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, device and computer-readable storage medium for guiding symbolic execution |
Non-Patent Citations (1)
| Title |
|---|
| 地引 尚史, ほか1名,プログラム解析による宣言的仕様の生成と読解支援への応用,第50回(平成7年前期)全国大会講演論文集(5) ソフトウェア ソフトウェア工学,日本,社団法人情報処理学会,1995年03月15日,5-287~5-288 |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2023058609A1 (en) | 2023-04-13 |
| JP2023056953A (en) | 2023-04-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100916329B1 (en) | Software Vulnerability Checking Device and Method | |
| US8943478B2 (en) | Fault detection and localization in dynamic software applications | |
| US6173440B1 (en) | Method and apparatus for debugging, verifying and validating computer software | |
| US8578342B2 (en) | Fault detection and localization in dynamic software applications requiring user inputs and persistent states | |
| US7353505B2 (en) | Tracing the execution path of a computer program | |
| US9015671B2 (en) | Integrating program construction | |
| US20110016456A1 (en) | Generating additional user inputs for fault detection and localization in dynamic software applications | |
| JP2006185211A (en) | Program analysis device, test execution device, analysis method thereof, and program | |
| CN119690854B (en) | Large model-assisted program function automatic perception fuzz testing method and system | |
| Thooriqoh et al. | Selenium framework for web automation testing: A systematic literature review | |
| JP7549992B2 (en) | Fault analysis device, program, and fault analysis method | |
| CN121070314A (en) | Test code repairing method and related equipment | |
| Li et al. | ADAutomation: An activity diagram based automated GUI testing framework for smartphone applications | |
| CN103365772B (en) | Software test automatic evaluation device and method | |
| Calvagna et al. | A formal logic approach to constrained combinatorial testing | |
| US12248769B2 (en) | Program analyzing apparatus, program analyzing method, and trace processing addition apparatus | |
| JP7631164B2 (en) | Fault analysis device and fault analysis method | |
| Barth et al. | Test-case generation with automata-based software model checking | |
| JP2009129132A (en) | Software partial test system, method and program used therefor | |
| JP7760317B2 (en) | Software defect analysis device and software defect analysis method | |
| Elsaka | Fault Localization Using Hybrid Static/Dynamic Analysis | |
| Sotto-Mayor et al. | Spectrum-based fault diagnosis with partial traces | |
| JP2023124531A (en) | Defect analysis apparatus and defect analysis method | |
| CN116860628A (en) | Static analyzer testing method and device | |
| US20240020217A1 (en) | Computer and Method for Selecting Correction Part of Software |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240312 |
|
| 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: 20250128 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250205 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7631164 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |