JP2010072883A - Program verification apparatus, program verification method, and program - Google Patents
Program verification apparatus, program verification method, and program Download PDFInfo
- Publication number
- JP2010072883A JP2010072883A JP2008238690A JP2008238690A JP2010072883A JP 2010072883 A JP2010072883 A JP 2010072883A JP 2008238690 A JP2008238690 A JP 2008238690A JP 2008238690 A JP2008238690 A JP 2008238690A JP 2010072883 A JP2010072883 A JP 2010072883A
- Authority
- JP
- Japan
- Prior art keywords
- program
- verification
- assumption
- target program
- verification target
- 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
Links
Images
Abstract
Description
本発明は、プログラム検証装置に関し、特にモデル検査技術を用いたプログラム検証装置に関する。 The present invention relates to a program verification apparatus, and more particularly to a program verification apparatus using a model checking technique.
プログラムの正しさ検証するために、ヌルポインタ参照、配列境界違反、或いはゼロ除算等の実行時エラーや、ユーザ定義のアサーション違反の有無をチェックする技術の1つに、状態空間を網羅的に探索するモデル検査技術を用いたプログラム検証がある。 In order to verify the correctness of the program, a comprehensive search of the state space is one of the techniques for checking for run-time errors such as null pointer references, array boundary violations, or division by zero, and user-defined assertion violations. There is program verification using model checking technology.
モデル検査技術を用いて開放システムの検証を行う場合、検証対象システムの動作コンテキストを与える外部の環境モデリングが検証精度及び検証性能に大きな影響を与えるため、正しく環境モデリングを行うことが重要となる。モデル検査技術を用いたプログラムの検証でも、プログラム、特に関数・モジュール等により構成される部分プログラムは基本的に開放システムとなるので、外部の環境モデリングが事実上必須となる。 When the open system is verified using the model checking technique, it is important to correctly perform the environment modeling because the external environment modeling that gives the operation context of the verification target system greatly affects the verification accuracy and the verification performance. Even in the verification of a program using the model checking technique, an external environment modeling is practically indispensable because a program, particularly a partial program composed of functions, modules, etc., is basically an open system.
検証対象プログラムの外部環境をモデリングする方法としては、検証対象プログラムが実行される時点で前提となる条件(事前条件)を仮定として定義する手法が一般的に用いられている。 As a method for modeling the external environment of the verification target program, a method is generally used in which a condition (precondition) that is a premise at the time of execution of the verification target program is defined as an assumption.
例えば、非特許文献1では、Java(登録商標)プログラムのモデル検査の環境を構築する技術の中で仮定(該文献中では「assumption」と表記)が用いられている。
For example, in Non-Patent
また、モデル検査技術を用いたプログラム検証においては、検査対象プログラムの動作コンテキストを与える仮定(主に、プログラムに対する入力の値域を制限する条件)や検査対象プログラムの振る舞いに関する制約等を表明として定義し、その正しさを確認するために、従来は、主に検証作業者(以下、作業者と表す)及び関係者によるレビューが行われていた。そのため、表明に含まれる仮定の誤りを見逃すことがあり、正しい検証結果を得られないことがあった。 In program verification using model checking technology, the assumptions that give the operation context of the program to be checked (mainly the conditions that limit the range of input to the program) and restrictions on the behavior of the program to be checked are defined as assertions. In order to confirm the correctness, reviews are conventionally performed mainly by verification workers (hereinafter referred to as workers) and related parties. For this reason, the assumptions included in the assertion may be missed, and correct verification results may not be obtained.
非特許文献2、非特許文献3に、この問題を解決する方法として、検証結果の一部として出力される、誤った弱い仮定(入力の値域を弱く制限する条件)により誤検出された問題に着目し、検証の過程で誤った弱い仮定を修正する手法(以下、CEGERと表す)が提案されている。ところが、該手法(CEGER)では、問題の見逃しを引き起こす、誤った強い仮定(入力の値域を強く制限する条件)が存在することを知り、仮定を修正することはできない。
As a method for solving this problem in
例えば、図1に示すC言語プログラムに対してモデル検査技術を用いたゼロ除算エラーのプログラム検証を行う場合を考える。 For example, consider a case where program verification of a divide-by-zero error using a model checking technique is performed on the C language program shown in FIG.
モデル検査技術では状態空間を網羅的に探索して検査するので、プログラムの実行箇所とその時点での全変数の値の組み合わせを状態として定義した場合には、全変数値の取り得る組合せ、及び、その組合せで到達可能な全実行パスについて検査することができる。また、外部からの入力は非決定な任意値として扱われるので、該プログラムでは関数の引数n1、n2、aが任意値として扱われる。この場合、任意値は、最小値「INT_MIN」から最大値「INT_MAX」までの値である。 Since the model checking technique exhaustively searches and checks the state space, if the combination of the program execution location and the value of all variables at that time is defined as a state, the possible combinations of all variable values, and , All execution paths reachable by the combination can be inspected. Further, since the input from the outside is treated as an undetermined arbitrary value, the function arguments n1, n2, and a are treated as arbitrary values in the program. In this case, the arbitrary value is a value from the minimum value “INT_MIN” to the maximum value “INT_MAX”.
該プログラムでは、1〜5行目のコメントにある条件を前提としているので、動作コンテキストとして与えられる仮定は、引数n1に対する条件「n1== 0||n1 == 1」が正しい。その仮定を用いてプログラム検証をした場合、22行目のローカル変数yの値の設定ミスを原因とする26行目のyでのゼロ除算エラーが検出される。25行目にもローカル変数xでの除算があるが、前記の仮定のもとでは必ずxに0以外の値が設定されるので、ゼロ除算エラーは検出されない。 In this program, since the conditions in the comments on the first to fifth lines are premised, the condition “n1 == 0 || n1 == 1” for the argument n1 is correct as the assumption given as the operation context. When program verification is performed using this assumption, a divide-by-zero error at y on the 26th line due to a setting error of the value of the local variable y on the 22nd line is detected. Although there is division by the local variable x on the 25th line, a value other than 0 is always set to x under the above assumption, so no division by zero error is detected.
これに対して、誤って弱い仮定、例えば「n1 >= 0」という仮定が与えられた場合、n1の値が1以外の正値の場合には、xの値は0に初期化されたままで25行目に到達するので、そこで発生するゼロ除算エラーも問題として検出される。CEGERでは、検出された問題が誤検出と判断された場合に誤検出の原因を作業者が分析し、その分析結果にもとづき仮定を修正することができる。 On the other hand, if a weak assumption, for example, “n1> = 0” is given by mistake, and if the value of n1 is a positive value other than 1, the value of x remains initialized to 0. Since the 25th line is reached, a divide-by-zero error occurring there is also detected as a problem. In CEGER, when it is determined that the detected problem is a false detection, an operator can analyze the cause of the false detection and correct the assumption based on the analysis result.
ところが、誤って強い仮定、例えば「(n1 == 0||n1 == 1)&& n2 >=0」という仮定が与えられた場合、n2は負値になることがなく、21〜23行の「else」節に到達する実行パスは検査されないので、本来発生する可能性のある25行目のゼロ除算エラーは問題として検出されない。この場合、検証結果だけでは仮定の誤りを知る手がかりがないので、仮定を修正することができない。 However, if a wrong assumption is given, for example, “(n1 == 0 || n1 == 1) && n2> = 0”, n2 does not become a negative value. Since the execution path that reaches the “else” clause is not checked, the zero division error on the 25th line that may occur originally is not detected as a problem. In this case, the assumption cannot be corrected because there is no clue to know the assumption error from the verification result alone.
関連する技術として、特開2008−071135号公報(特許文献1)に検証処理装置が開示されている。
この関連技術では、モデル検査は、状態遷移図(状態遷移グラフ)の全ての状態と全てのパスの検査を行い、指定された特徴を持つ状態や遷移パスが存在するか否かを判定する。モデル検査を用いた検証処理装置では、検証対象であるデータ処理システムの動作を状態遷移グラフに変換し、また検証対象であるデータ処理システムの機能仕様を状態遷移グラフ上の状態または遷移パスの特徴に変換する。このとき、検証対象であるデータ処理システムの状態遷移グラフを取得し、データ処理システムへの要求を取得し、データ処理システムの検証範囲に含まれるべき動作を示すカバレッジ指標を取得する。取得された状態遷移グラフが要求を満足するか検証し、取得されたカバレッジ指標に対応して状態遷移グラフのカバレッジを測定し、結果を出力する。
As a related technique, Japanese Patent Application Laid-Open No. 2008-071135 (Patent Document 1) discloses a verification processing apparatus.
In this related technique, the model check checks all states and all paths in the state transition diagram (state transition graph), and determines whether or not there is a state or transition path having a specified feature. In the verification processing device using model checking, the operation of the data processing system to be verified is converted into a state transition graph, and the function specifications of the data processing system to be verified are the characteristics of the state or transition path on the state transition graph. Convert to At this time, a state transition graph of the data processing system to be verified is acquired, a request to the data processing system is acquired, and a coverage index indicating an operation that should be included in the verification range of the data processing system is acquired. Whether the acquired state transition graph satisfies the request is verified, the coverage of the state transition graph is measured corresponding to the acquired coverage index, and the result is output.
仮定を用いてプログラムのモデル検査を行う場合、仮定が誤っていると検証結果も誤ったものとなる。具体的には、誤った弱い仮定が用いられた場合には本来問題とならない箇所が問題として検出され、誤った強い仮定が用いられた場合には本来問題となる箇所が問題として検出されない。すなわち、「誤検出」と「見逃し」が発生する。そのため、モデル検査により正しい検証結果を得るためには、検証前に、若しくは、検証の過程で、仮定を正しく定義する必要がある。 When performing a model check of a program using assumptions, if the assumption is incorrect, the verification result is also incorrect. Specifically, when an erroneous weak assumption is used, a part that does not become a problem is detected as a problem, and when an incorrect strong assumption is used, a part that is originally a problem is not detected as a problem. That is, “false detection” and “missing” occur. Therefore, in order to obtain a correct verification result by model checking, it is necessary to correctly define assumptions before or during the verification process.
本発明のプログラム検証装置は、検証対象プログラム、及び検証対象プログラムの動作コンテキストとして与えられる仮定に関する情報を記憶する二次記憶装置と、検証対象プログラムの条件分岐箇所へ到達確認用のコードを埋め込んで検証し、検証された範囲を網羅度として測定し、検証結果と共に測定結果を出力し、検証対象プログラムの動作コンテキストとして与えられる仮定の誤りの可能性を示す中央処理装置とを具備する。 The program verification device of the present invention embeds a verification target program, a secondary storage device that stores information on assumptions given as an operation context of the verification target program, and a code for arrival confirmation at a conditional branch location of the verification target program And a central processing unit that measures the verified range as the coverage, outputs the measurement result together with the verification result, and indicates the possibility of an assumed error given as the operation context of the verification target program.
本発明のプログラム検証方法は、検証対象プログラム、及び検証対象プログラムの動作コンテキストとして与えられる仮定に関する情報を参照するステップと、検証対象プログラムの条件分岐箇所へ到達確認用のコードを埋め込んで検証し、検証された範囲を網羅度として測定し、検証結果と共に測定結果を出力し、検証対象プログラムの動作コンテキストとして与えられる仮定の誤りの可能性を示すステップとを含む。 In the program verification method of the present invention, the step of referring to the verification target program and the information related to the assumption given as the operation context of the verification target program, and verification by embedding the code for arrival confirmation in the conditional branch location of the verification target program, Measuring the verified range as the coverage, outputting the measurement result together with the verification result, and indicating the possibility of a hypothetical error given as the operation context of the verification target program.
本発明のプログラムは、検証対象プログラム、及び検証対象プログラムの動作コンテキストとして与えられる仮定に関する情報を参照するステップと、検証対象プログラムの条件分岐箇所へ到達確認用のコードを埋め込んで検証し、検証された範囲を網羅度として測定し、検証結果と共に測定結果を出力し、検証対象プログラムの動作コンテキストとして与えられる仮定の誤りの可能性を示すステップとをコンピュータに実行させるためのプログラムである。 The program of the present invention is verified by embedding a verification target program and a step of referring to information about an assumption given as an operation context of the verification target program, and by embeding a code for confirming arrival at a conditional branch location of the verification target program. This is a program for causing a computer to execute a step of measuring a range as a coverage, outputting a measurement result together with a verification result, and indicating a possibility of an assumed error given as an operation context of the verification target program.
このように、条件分岐箇所へ到達確認用のコードを埋め込む等の既存技術を用いてモデル検査技術で検証した範囲を網羅度として測定し、検証結果とともにその測定結果を示すことにより、作業者に仮定の誤りの可能性を示す。網羅度が100%未満の場合、すなわち、未検査の分岐が存在する場合には、仮定に誤りがある可能性がある。 In this way, by measuring the range verified by the model checking technology using existing technology such as embedding the arrival confirmation code at the conditional branch location, and showing the measurement result together with the verification result, Indicates the possibility of incorrect assumptions. If the coverage is less than 100%, that is, if there is an unchecked branch, the assumption may be incorrect.
例えば、図1に示すC言語プログラムに対して「(n1 == 0||n1 == 1)&& n2 >= 0」という仮定を用いてプログラム検証を行い、「問題無し」と言う検証結果とともに、網羅度86%(「decision coverage」での数値)を示す。これにより、作業者は仮定に誤りがある可能性があることがわかる。 For example, program verification is performed on the C language program shown in FIG. 1 using the assumption that “(n1 == 0 || n1 == 1) && n2> = 0”, and the verification result is “no problem”. The coverage is 86% (numerical value in “decision coverage”). As a result, the operator knows that there is a possibility that the assumption is incorrect.
モデル検査技術を用いたプログラムの検証において、プログラム検証に用いる仮定の誤りの可能性を明示し、仮定を正しく定義することを可能にする。 In the verification of a program using model checking technology, it is possible to clearly define the possibility of an assumption error used in the program verification and to correctly define the assumption.
以下に、本発明の第1実施形態について添付図面を参照して説明する。
図2に示すように、本実施形態におけるプログラム検証装置は、中央処理装置10と、二次記憶装置20と、入力装置30と、出力装置40を備える。
Hereinafter, a first embodiment of the present invention will be described with reference to the accompanying drawings.
As shown in FIG. 2, the program verification apparatus according to the present embodiment includes a
中央処理装置10は、プログラム入力部11と、表明入力部12と、モデル検査部13と、網羅度測定部14を備える。
The
二次記憶装置20は、プログラム記憶部21と、表明記憶部22を備える。
The
プログラム入力部11は、入力装置30から検証対象プログラムを読み取り、二次記憶装置20のプログラム記憶部21に格納する。
The
表明入力部12は、入力装置30から作業者等のユーザが定義した表明を読み取り、二次記憶装置20の表明記憶部22に格納する。
The
モデル検査部13は、プログラム記憶部21から検証対象プログラムを読み取り、表明記憶部22から検証対象プログラムの動作コンテキストとして与えられる仮定を読み取り、予め定義されたエラーについての網羅的な検証を行い、出力装置40に検証結果を出力する。
The
網羅度測定部14は、プログラム記憶部21から検証対象プログラムを読み取り、条件分岐箇所へ到達確認用のコードを埋め込み、表明記憶部22から検証対象プログラムの動作コンテキストとして与えられる仮定を読み取り、モデル検査部13を用いて条件分岐箇所への到達を確認し、その確認結果から網羅度を算出し、出力装置40に仮定と網羅度と到達箇所・不到達箇所の情報を出力する。このとき、網羅度測定部14は、網羅度が100%未満であり、未検査の分岐が存在する場合、前記仮定に誤りがある可能性があると判断し、その旨を示す情報を出力するようにしても良い。
The
プログラム記憶部21は、検証対象プログラムを記憶する。
The
表明記憶部22は、検証対象プログラムの動作コンテキストとして与えられる仮定を含む表明を記憶する。
The
中央処理装置10の例として、CPU(Central Processing Unit)やマイクロプロセッサ(microprocessor)等の処理装置、又は同様の機能を有する半導体集積回路(Integrated Circuit(IC))等が考えられる。なお、プログラム入力部11、表明入力部12、モデル検査部13、及び網羅度測定部14は、各々の機能をコンピュータに実行させるためのプログラムでも良い。但し、実際には、これらの例に限定されない。
As an example of the
二次記憶装置20の例として、メモリ等の半導体記憶装置、ハードディスク等の外部記憶装置(ストレージ)、又は、記憶媒体(メディア)等が考えられる。但し、実際には、これらの例に限定されない。
Examples of the
入力装置30の例として、キーボードやキーパッド、画面上のキーパッド、タッチパネル(touch panel)、タブレット(tablet)、又は、記憶媒体(メディア)等の読取装置等が考えられる。或いは、入力装置30は、外部の入力装置や記憶装置から情報を取得するためのインターフェース(I/F:interface)でも良い。但し、実際には、これらの例に限定されない。
Examples of the
出力装置40の例として、LCD(液晶ディスプレイ)やPDP(プラズマディスプレイ)、有機ELディスプレイ(organic electroluminescence display)等の表示装置、又は、表示内容を壁やスクリーンに投影するプロジェクタ等の映写装置、表示内容を用紙等に印刷するプリンタ等の印刷装置等が考えられる。或いは、出力装置40は、外部の表示装置や記憶装置に情報を出力するためのインターフェースでも良い。但し、実際には、これらの例に限定されない。
As an example of the
次に、図3のフローチャートを参照して、中央処理装置10が行う動作について、実際のデータを用いて詳細に説明する。ここでは、図1に示すC言語プログラムに対して、「(n1== 0||n1 == 1)&& n2 >= 0」と言う仮定を用いてゼロ除算エラーのプログラム検証をすることとする。
Next, operations performed by the
(1)ステップST1
まず、プログラム入力部11は、入力装置30から検証対象プログラムを読み取り、二次記憶装置20のプログラム記憶131に格納する。ここでは、プログラム入力部11は、入力装置30から図1に示すC言語プログラムを読み取り、二次記憶装置20のプログラム記憶131に格納する。
(1) Step ST1
First, the
(2)ステップST2
表明入力部12は、入力装置30からユーザが定義した表明を読み取り、二次記憶装置20の表明記憶部22に格納する。ここでは、表明入力部12は、入力装置30から「(n1== 0||n1 == 1)&& n2 >= 0」と言う仮定だけからなる表明を読み取り、二次記憶装置20の表明記憶部22に格納する。
(2) Step ST2
The
(3)ステップST3
次に、モデル検査部13は、プログラム記憶部21から検証対象プログラムを、表明記憶部22から検証対象プログラムの動作コンテキストとして与えられる仮定を読み取り、予め定義されたエラーについての網羅的な検証を行う。ここでは、モデル検査部13は、プログラム記憶部21に格納された検証対象プログラムを読み取り、表明記憶部22に格納された仮定を読み取り、ゼロ除算エラーについての網羅的な検証を行い、「問題なし」と言う結果を得る。
(3) Step ST3
Next, the
(4)ステップST4
網羅度測定部14は、プログラム記憶部21から検証対象プログラムを読み取り、条件分岐箇所へモデル検査部13の仕様や実装に依存した形式の到達確認用のコードを埋め込み、表明記憶部22から仮定を読み取り、モデル検査部13を用いて条件分岐箇所への到達を確認し、その結果から網羅度を算出する。ここでは、網羅度測定部14は、プログラム記憶部21から検証対象プログラムを読み取り、条件分岐箇所へ到達確認用のコードを埋め込み、図4のようなプログラムを作成する。なお、到達確認用のコードは、必ず不成立となるアサーション記述(ASSERT(0)等)であるものとする。モデル検査部13は、アサーション記述毎にモデル検査を行い、検証対象プログラムの条件分岐箇所への到達への到達を確認する。このとき、モデル検査部13は、アサーションの不成立が検出されれば到達、検出されなければ不到達と判断する。この事例では、モデル検査部13は、条件分岐箇所への到達を確認すると、「11、15、18、20、26、29行目」は到達し、「32行目」は到達しないことが分かるので、その結果から網羅度を「86%」と算出する。すなわち、モデル検査部13は、7つの条件分岐箇所「11、15、18、20、26、29、32行目」のうち、6つの条件分岐箇所「11、15、18、20、26、29行目」に到達しているため、網羅度を「(6÷7)×100≒86%」と算出する。
(4) Step ST4
The
(5)ステップST5
最後に、網羅度測定部14は、検証に用いた仮定、算出された網羅度、及び到達箇所・不到達箇所の情報を出力装置40に出力し、モデル検査部13は、検証した結果を出力装置40に出力し、終了する。ここでは、網羅度測定部14は、検証に用いた仮定「(n1== 0||n1 == 1)&& n2 >= 0」と、算出された網羅度「86%」と、不到達箇所として「32行目」を出力装置40に出力し、モデル検査部13は、検証した結果として「問題なし」を出力装置40に出力し、終了する。
(5) Step ST5
Finally, the
作業者は、出力装置40に出力された網羅度が100%未満であることから、入力した仮定「(n1== 0||n1 == 1)&& n2 >= 0」に誤りがある可能性があることがわかる。
Since the degree of coverage output to the
本発明の第1の効果は、プログラム検証に用いる仮定の誤りを見逃さなくなることにある。その理由は、検証に用いた仮定と一緒に網羅度が表示されることにより作業者に仮定の誤りがある可能性を示すことができるためである。 The first effect of the present invention is that an assumption error used for program verification is not overlooked. The reason is that it is possible to indicate a possibility that the worker has an error in the assumption that the coverage is displayed together with the assumption used in the verification.
本発明の第2の効果は、不到達コード(デッドコード)を検出できることにある。その理由は、誤りの可能性を指摘された仮定について精査した結果、仮定に誤りがないことが判明した場合、不到達箇所として示された分岐箇所は不到達コードと判断できるためである。 The second effect of the present invention is that a non-reachable code (dead code) can be detected. The reason is that, as a result of careful examination of the hypothesis in which the possibility of error is pointed out, if it is found that there is no error in the hypothesis, a branch point indicated as a non-reachable point can be determined as a non-reachable code.
以下に、本発明の第2実施形態について説明する。
図2に示す装置の構成において、入力装置112、プログラム入力部11、表明入力部12が無くても良い。例えば、二次記憶装置20がリポジトリとして使われている等、検証対象プログラム及び表明が二次記憶装置20に事前に格納されている場合、中央処理装置10は、検証対象プログラム及び表明を、二次記憶装置20から直接読み取る。この場合、中央処理装置10は、事前設定に基づき自動的に、或いは、ユーザ操作に応じて、検証対象プログラム及び表明を、二次記憶装置20から直接読み取る。
The second embodiment of the present invention will be described below.
In the configuration of the apparatus shown in FIG. 2, the input device 112, the
以下に、本発明の第3実施形態について説明する。
図2に示す装置の構成において、網羅度測定部14がモデル検査部13と分離しておらず、統合されていても良い。その場合、統合されたモデル検査部13が、図3のフローチャートのステップST3、ステップST4、ステップST5の全てを行うことになる。
The third embodiment of the present invention will be described below.
In the configuration of the apparatus illustrated in FIG. 2, the coverage
以下に、本発明の第4実施形態について説明する。
図3に示すフローチャートにおいて、ステップST3のモデル検査処理が無くても良い。その場合、ステップST5では検証結果は出力できず、網羅度により誤った強い仮定になっている可能性は示せるが、問題の誤検出を引き起こす誤った弱い仮定の可能性を示すことはできない。すなわち、CEGERは行えない。また、ステップST3のモデル検査処理とステップST4の網羅度測定処理は順序が逆でも並行して行われても良い。
The fourth embodiment of the present invention will be described below.
In the flowchart shown in FIG. 3, the model checking process in step ST3 may be omitted. In this case, in step ST5, the verification result cannot be output, and it is possible to indicate the possibility of an erroneous strong assumption depending on the degree of coverage, but it is not possible to indicate the possibility of an erroneous weak assumption that causes a false detection of a problem. That is, CEGER cannot be performed. Further, the model checking process in step ST3 and the coverage degree measuring process in step ST4 may be performed in reverse or in parallel.
以上のように、本発明は、プログラムと表明を入力としモデル検査技術を用いたプログラムの検証において、検査対象プログラムの動作コンテキストを与える仮定の誤りの可能性を示すことを可能にする。 As described above, the present invention makes it possible to indicate the possibility of a hypothetical error that gives the operation context of a program to be tested in the verification of a program using the model checking technique with the program and assertion as inputs.
本発明によれば、モデル検査技術を用いたプログラム検証における仮定の修正や、プログラムの不具合検出といった用途に適用できる。 The present invention can be applied to uses such as correction of assumptions in program verification using model checking technology and detection of program defects.
以上、本発明の実施形態を詳述してきたが、実際には上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の変更があっても本発明に含まれる。 As mentioned above, although embodiment of this invention was explained in full detail, actually it is not restricted to said embodiment, Even if there is a change of the range which does not deviate from the summary of this invention, it is contained in this invention.
10… 中央処理装置
11… プログラム入力部
12… 表明入力部
13… モデル検査部
14… 網羅度測定部
20… 二次記憶装置
21… プログラム記憶部
22… 表明記憶部
30… 入力装置
40… 出力装置
DESCRIPTION OF
Claims (15)
前記検証対象プログラムの条件分岐箇所へ到達確認用のコードを埋め込んで検証し、検証された範囲を網羅度として測定し、検証結果と共に測定結果を出力し、前記検証対象プログラムの動作コンテキストとして与えられる仮定の誤りの可能性を示す中央処理装置と
を具備する
プログラム検証装置。 A secondary storage device that stores information about a verification target program and assumptions given as an operation context of the verification target program;
A verification code is embedded and verified at the conditional branch location of the verification target program, the verified range is measured as the coverage, the measurement result is output together with the verification result, and given as the operation context of the verification target program A program verification apparatus comprising: a central processing unit that indicates a possibility of an assumption error.
前記二次記憶装置は、
前記検証対象プログラムを記憶するプログラム記憶手段と、
前記検証対象プログラムの動作コンテキストとして与えられる仮定を含む表明を記憶する表明記憶手段と
を具備する
プログラム検証装置。 The program verification device according to claim 1,
The secondary storage device
Program storage means for storing the verification target program;
An assertion storage means for storing an assertion including an assumption given as an operation context of the verification target program.
前記中央処理装置は、
前記プログラム記憶手段から前記検証対象プログラムを読み取り、前記表明記憶手段から前記仮定を読み取り、予め定義されたエラーについての網羅的な検証を行い、検証結果を出力するモデル検査手段と、
前記プログラム記憶手段から前記検証対象プログラムを読み取り、前記検証対象プログラムの条件分岐箇所へ到達確認用のコードとして必ず不成立となるアサーション記述を埋め込み、前記表明記憶手段から前記仮定を読み取り、前記検証対象プログラムの条件分岐箇所への到達を確認し、確認結果から前記網羅度を算出し、前記仮定、前記網羅度、及び到達箇所・不到達箇所の情報を出力する網羅度測定手段と
を具備する
プログラム検証装置。 The program verification device according to claim 2,
The central processing unit is
A model checking unit that reads the verification target program from the program storage unit, reads the assumption from the assertion storage unit, performs exhaustive verification on a predefined error, and outputs a verification result;
Read the verification target program from the program storage means, embed an assertion description that is always unsatisfied as a code for confirming arrival at the conditional branch location of the verification target program, read the assumption from the assertion storage means, and A program verification comprising: a coverage degree measuring means for confirming the arrival at the conditional branch location, calculating the coverage level from the confirmation result, and outputting the assumption, the coverage level, and the information of the reached / unreached location apparatus.
前記中央処理装置は、
外手段から入力された検証対象プログラムを読み取り、前記プログラム記憶手段に格納するプログラム入力手段と、
ユーザが定義した表明を読み取り、前記表明記憶手段に格納する表明入力手段と
を更に具備する
プログラム検証装置。 The program verification device according to claim 3,
The central processing unit is
A program input means for reading a verification target program input from an external means and storing it in the program storage means;
A program verification apparatus, further comprising an assertion input unit that reads an assertion defined by a user and stores the assertion in the assertion storage unit.
前記中央処理装置は、前記網羅度が100%未満であり、未検査の分岐が存在する場合、前記仮定に誤りがある可能性があると判断する
プログラム検証装置。 The program verification device according to any one of claims 1 to 4,
The central processing unit determines that there is a possibility of an error in the assumption when the coverage is less than 100% and there is an unexamined branch.
前記検証対象プログラムの条件分岐箇所へ到達確認用のコードを埋め込んで検証し、検証された範囲を網羅度として測定し、検証結果と共に測定結果を出力し、前記検証対象プログラムの動作コンテキストとして与えられる仮定の誤りの可能性を示すステップと
を含む
プログラム検証方法。 Referring to information on a verification target program and assumptions given as an operation context of the verification target program;
A verification code is embedded and verified at the conditional branch location of the verification target program, the verified range is measured as the coverage, the measurement result is output together with the verification result, and given as the operation context of the verification target program A program verification method comprising the steps of indicating a possible hypothesis error.
前記検証対象プログラムを保持するステップと、
前記検証対象プログラムの動作コンテキストとして与えられる仮定を含む表明を保持するステップと
を更に含む
プログラム検証方法。 The program verification method according to claim 6,
Holding the program to be verified;
Holding a statement including an assumption given as an operation context of the program to be verified.
前記検証対象プログラムを読み取り、前記仮定を読み取り、予め定義されたエラーについての網羅的な検証を行い、検証結果を出力するステップと、
前記検証対象プログラムを読み取り、前記検証対象プログラムの条件分岐箇所へ到達確認用のコードとして必ず不成立となるアサーション記述を埋め込み、前記仮定を読み取り、前記検証対象プログラムの条件分岐箇所への到達への到達を確認し、確認結果から前記網羅度を算出し、前記仮定、前記網羅度、及び到達箇所・不到達箇所の情報を出力するステップと
を更に含む
プログラム検証方法。 The program verification method according to claim 7, wherein:
Reading the verification target program, reading the assumption, performing a comprehensive verification on a predefined error, and outputting a verification result;
Read the program to be verified, embed an assertion description that is always not satisfied as a code for confirming arrival at the conditional branch location of the verification target program, read the assumption, and reach the conditional branch location of the verification target program The program verification method further includes the steps of: calculating the coverage from the confirmation result, and outputting the assumption, the coverage, and information on the reached / unreached location.
外部から入力された検証対象プログラムを読み取り、二次記憶装置に格納するステップと、
ユーザが定義した表明を読み取り、前記二次記憶装置に格納するステップと
を更に含む
プログラム検証方法。 The program verification method according to claim 8, comprising:
Reading a verification target program input from the outside and storing it in a secondary storage device;
Reading the assertion defined by the user and storing it in the secondary storage device.
前記網羅度が100%未満であり、未検査の分岐が存在する場合、前記仮定に誤りがある可能性があると判断するステップ
を更に含む
プログラム検証方法。 A program verification method according to any one of claims 6 to 9, comprising:
The program verification method further comprising the step of determining that there is a possibility of an error in the assumption when the coverage is less than 100% and there is an unchecked branch.
前記検証対象プログラムの条件分岐箇所へ到達確認用のコードを埋め込んで検証し、検証された範囲を網羅度として測定し、検証結果と共に測定結果を出力し、前記検証対象プログラムの動作コンテキストとして与えられる仮定の誤りの可能性を示すステップと
をコンピュータに実行させるための
プログラム。 Referring to information on a verification target program and assumptions given as an operation context of the verification target program;
A verification code is embedded and verified at the conditional branch location of the verification target program, the verified range is measured as the coverage, the measurement result is output together with the verification result, and given as the operation context of the verification target program A program that causes a computer to execute a step that indicates the possibility of a false assumption.
前記検証対象プログラムを保持するステップと、
前記検証対象プログラムの動作コンテキストとして与えられる仮定を含む表明を保持するステップと
を更にコンピュータに実行させるための
プログラム。 The program according to claim 11,
Holding the program to be verified;
A program for causing a computer to further execute a step of holding an assertion including an assumption given as an operation context of the verification target program.
前記検証対象プログラムを読み取り、前記仮定を読み取り、予め定義されたエラーについての網羅的な検証を行い、検証結果を出力するステップと、
前記検証対象プログラムを読み取り、前記検証対象プログラムの条件分岐箇所へ到達確認用のコードとして必ず不成立となるアサーション記述を埋め込み、前記仮定を読み取り、前記検証対象プログラムの条件分岐箇所への到達への到達を確認し、確認結果から前記網羅度を算出し、前記仮定、前記網羅度、及び到達箇所・不到達箇所の情報を出力するステップと
を更にコンピュータに実行させるための
プログラム。 A program according to claim 12,
Reading the verification target program, reading the assumption, performing a comprehensive verification on a predefined error, and outputting a verification result;
Read the program to be verified, embed an assertion description that is always not satisfied as a code for confirming arrival at the conditional branch location of the verification target program, read the assumption, and reach the conditional branch location of the verification target program , Calculating the degree of coverage from the confirmation result, and outputting the information on the assumption, the degree of coverage, and the reached / unreached location information.
外部から入力された検証対象プログラムを読み取り、二次記憶装置に格納するステップと、
ユーザが定義した表明を読み取り、前記二次記憶装置に格納するステップと
を更にコンピュータに実行させるための
プログラム。 The program according to claim 13,
Reading a verification target program input from the outside and storing it in a secondary storage device;
A program for causing a computer to further execute a step of reading a statement defined by a user and storing it in the secondary storage device.
前記網羅度が100%未満であり、未検査の分岐が存在する場合、前記仮定に誤りがある可能性があると判断するステップ
を更にコンピュータに実行させるための
プログラム。 The program according to any one of claims 11 to 14,
A program for causing a computer to further execute a step of determining that there is a possibility of an error in the assumption when the coverage is less than 100% and there is an unexamined branch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008238690A JP2010072883A (en) | 2008-09-17 | 2008-09-17 | Program verification apparatus, program verification method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008238690A JP2010072883A (en) | 2008-09-17 | 2008-09-17 | Program verification apparatus, program verification method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010072883A true JP2010072883A (en) | 2010-04-02 |
Family
ID=42204611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008238690A Pending JP2010072883A (en) | 2008-09-17 | 2008-09-17 | Program verification apparatus, program verification method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010072883A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020067697A (en) * | 2018-10-22 | 2020-04-30 | 富士通株式会社 | Dead code analysis program, dead code analysis method, and dead code analysis device |
KR20230049380A (en) * | 2021-10-06 | 2023-04-13 | 고려대학교 산학협력단 | Method for feedback of program |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05324309A (en) * | 1992-05-14 | 1993-12-07 | Toshiba Corp | Device and method for evaluating software quality |
JPH10232795A (en) * | 1997-02-19 | 1998-09-02 | Hitachi Ltd | Software component combination test method |
-
2008
- 2008-09-17 JP JP2008238690A patent/JP2010072883A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05324309A (en) * | 1992-05-14 | 1993-12-07 | Toshiba Corp | Device and method for evaluating software quality |
JPH10232795A (en) * | 1997-02-19 | 1998-09-02 | Hitachi Ltd | Software component combination test method |
Non-Patent Citations (2)
Title |
---|
CSND200600601014; '世界はオブジェクトの海に浮かぶ .NET Frameworkで楽しむオブジェクト指向 第7回 デバッ' Windows Developer Magazine 第11巻、第8号, 20051101, pp.138-145, 株式会社翔泳社 * |
JPN6012064065; '世界はオブジェクトの海に浮かぶ .NET Frameworkで楽しむオブジェクト指向 第7回 デバッ' Windows Developer Magazine 第11巻、第8号, 20051101, pp.138-145, 株式会社翔泳社 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020067697A (en) * | 2018-10-22 | 2020-04-30 | 富士通株式会社 | Dead code analysis program, dead code analysis method, and dead code analysis device |
JP7077909B2 (en) | 2018-10-22 | 2022-05-31 | 富士通株式会社 | Dead code analysis program, dead code analysis method and dead code analysis device |
KR20230049380A (en) * | 2021-10-06 | 2023-04-13 | 고려대학교 산학협력단 | Method for feedback of program |
KR102525344B1 (en) | 2021-10-06 | 2023-04-24 | 고려대학교 산학협력단 | Method for feedback of program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6484134B1 (en) | Property coverage in formal verification | |
US8813033B2 (en) | System and method for static analysis using fault paths | |
US9104806B2 (en) | Tracking of code base and defect diagnostic coupling with automated triage | |
US8386851B2 (en) | Functional coverage using combinatorial test design | |
US8645761B2 (en) | Precise fault localization | |
US8397104B2 (en) | Creation of test plans | |
US7293204B2 (en) | Computer peripheral connecting interface system configuration debugging method and system | |
KR20200136967A (en) | Devices, systems, and processes for redundant processor error detection | |
US9389984B2 (en) | Directing verification towards bug-prone portions | |
CN112257054B (en) | Software application unauthorized risk detection method, electronic equipment and storage medium | |
US8042003B2 (en) | Method and apparatus for evaluating effectiveness of test case | |
US8347260B2 (en) | Method of designing an integrated circuit based on a combination of manufacturability, test coverage and, optionally, diagnostic coverage | |
JP2010072883A (en) | Program verification apparatus, program verification method, and program | |
US9646252B2 (en) | Template clauses based SAT techniques | |
US8739091B1 (en) | Techniques for segmenting of hardware trace and verification of individual trace segments | |
CN112631852B (en) | Macro checking method, macro checking device, electronic equipment and computer readable storage medium | |
US8856755B2 (en) | Dominant-state-based coverage metric | |
US8639490B2 (en) | Concretization of abstracted traces | |
CN117112435B (en) | Vulnerability linkage detection result fusion method, storage medium and electronic equipment | |
CN117313604B (en) | Timing exception constraint checking method, device, system and storage medium | |
CN110020565B (en) | Probe information reading fault prompting method, device, server and storage medium | |
JP4985813B2 (en) | Electronic medical record apparatus, addition target existence determination method and program | |
JP5365846B2 (en) | Program verification apparatus, program verification method, and verification function execution program | |
JP2795332B2 (en) | Loop processing error detection device | |
JP2011227646A (en) | Computer diagnosis device and diagnosis method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110712 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121121 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121211 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130404 |