JP5170555B2 - Error trace simplification system, error trace simplification method, and program - Google Patents

Error trace simplification system, error trace simplification method, and program Download PDF

Info

Publication number
JP5170555B2
JP5170555B2 JP2008265162A JP2008265162A JP5170555B2 JP 5170555 B2 JP5170555 B2 JP 5170555B2 JP 2008265162 A JP2008265162 A JP 2008265162A JP 2008265162 A JP2008265162 A JP 2008265162A JP 5170555 B2 JP5170555 B2 JP 5170555B2
Authority
JP
Japan
Prior art keywords
error trace
expression
conditional
simplification
true
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.)
Expired - Fee Related
Application number
JP2008265162A
Other languages
Japanese (ja)
Other versions
JP2010097251A (en
Inventor
宏樹 徳岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2008265162A priority Critical patent/JP5170555B2/en
Publication of JP2010097251A publication Critical patent/JP2010097251A/en
Application granted granted Critical
Publication of JP5170555B2 publication Critical patent/JP5170555B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、エラートレース簡略化システムに関し、特にソースコード検証におけるエラートレース簡略化システムに関する。   The present invention relates to an error trace simplification system, and more particularly to an error trace simplification system in source code verification.

従来、コンピュータプログラムのソースコードを検証し、エラートレース、すなわちエラーが発生するパスをユーザに提示できるソースコード検証手法が存在する。   Conventionally, there is a source code verification method that can verify a source code of a computer program and present an error trace, that is, a path where an error occurs to a user.

エラートレースは、エラーが発生するまでに実行される各ステップ(プログラムステップ)において、そのステップが対応するソースコード上の行番号、当該ステップで実行された代入の式、当該ステップで評価されて成立した条件の式、及び当該ステップにおける変数の値を含む。   Error tracing is performed at each step (program step) executed until an error occurs, the line number on the source code corresponding to the step, the substitution expression executed at that step, and evaluated at that step. And the value of the variable in that step.

このようなエラートレースをユーザが参照すると、エラーが発生する原因を調査することができる。   When the user refers to such an error trace, the cause of the error can be investigated.

これは、エラートレースを提示しないソースコード検証手法と比較した場合、大きな利点であると言える。エラートレースを提示しないソースコード検証手法として、例えばSplint(非特許文献1参照)等が存在する。   This can be said to be a great advantage when compared to a source code verification method that does not present an error trace. As a source code verification method that does not present an error trace, for example, there is Spint (see Non-Patent Document 1).

なお、エラートレースを提示するソースコード検証手法は、一般に厳密な計算を要求するために、次のような特徴を持つ。例えば、エラートレースを提示するソースコード検証手法では、ソースコード内のメモリ領域に対するアクセスを行う箇所において、静的にアドレスが決まる表現(静的アクセス)は扱えるが、動的にアドレスが決まる表現(動的アクセス)は扱えない。   Note that the source code verification method for presenting an error trace generally has the following characteristics in order to require strict calculation. For example, in the source code verification method that presents an error trace, an expression that statically determines an address (static access) can be handled at a location that accesses a memory area in the source code, but an expression that dynamically determines an address ( Dynamic access) cannot be handled.

一般的なソースコードは、配列の添字が変数である場合や、変数を用いてポインタ演算をする場合等、動的アクセスを多く含む。前述したようなソースコード検証手法では動的アクセスを利用できないため、それらのソースコードをそのままでは扱うことができない。   General source code includes many dynamic accesses, such as when an array index is a variable or when a pointer operation is performed using a variable. Since the source code verification method as described above cannot use dynamic access, the source code cannot be handled as it is.

このような場合、動的アクセスを静的アクセスに書き換える方式を利用できる。このための手段として、条件分岐を用いる技術が知られている(非特許文献2参照)。   In such a case, a method of rewriting dynamic access to static access can be used. As means for this, a technique using conditional branching is known (see Non-Patent Document 2).

これを応用し、動的アクセスを、条件演算子(conditional operator)による条件分岐を用いて、静的アクセスに書き換え、その後にソースコード検証手法を適用する技術が知られている(非特許文献3参照)。このような書き換えのことをフラット化と呼ぶ。   A technique is known in which dynamic access is rewritten to static access using a conditional branch by a conditional operator, and then a source code verification method is applied (Non-patent Document 3). reference). Such rewriting is called flattening.

以上により、動的アクセスを含むソースコードに、ソースコード検証を適用することはできる。   As described above, source code verification can be applied to source code including dynamic access.

しかしながら、従来のソースコード検証手法においては、ユーザがエラートレースを参照する労力が大きいという問題があった。   However, the conventional source code verification method has a problem that the user has a great effort to refer to the error trace.

なぜなら、ソースコード検証手法の出力であるエラートレースは、フラット化後のソースコードに基づくためである。フラット化後のソースコードは条件演算子による演算を多数含むので、結果として、エラートレースも条件演算子による演算を多数含む複雑なものとなる。条件演算子による演算を用いた複雑な式を解釈するのは、ユーザにとって労力を要する作業であると言える。   This is because the error trace that is the output of the source code verification technique is based on the flattened source code. Since the source code after flattening includes many operations using conditional operators, as a result, the error trace also becomes complicated including many operations using conditional operators. It can be said that interpreting a complex expression using an operation by a conditional operator is a labor-intensive work for the user.

関連する技術として、特開2000−215037号公報(特許文献1)にソ―スコ―ド表示装置、ソ―スコ―ド表示方法およびデバック処理装置が開示されている。この関連技術では、プログラムをステップ実行中に分岐処理があると、分岐処理条件を解析してその条件で実行しない行と実行する行とを調べ、ソースコードの表示で実行しない行の色を目立たなくしている。   As a related technique, Japanese Laid-Open Patent Publication No. 2000-215037 (Patent Document 1) discloses a source code display device, a source code display method, and a debug processing device. In this related technology, if there is a branch process during step execution of a program, the branch process condition is analyzed, the line that is not executed under that condition and the line that is executed are examined, and the color of the line that is not executed in the source code display stands out. It is lost.

また、特開2001−142716号公報(特許文献2)にループ内条件分岐削除最適化方式が開示されている。この関連技術では、条件分岐コードから無条件分岐コードへの変更に起因して不要となったコード(当該無条件分岐コードおよび当該変更に起因して決して実行されなくなったコード)を削除している。   Japanese Patent Laid-Open No. 2001-142716 (Patent Document 2) discloses an in-loop conditional branch deletion optimization method. In this related technology, the code that became unnecessary due to the change from the conditional branch code to the unconditional branch code (the unconditional branch code and the code that has never been executed due to the change) is deleted. .

特開2000−215037号公報JP 2000-215037 A 特開2001−142716号公報JP 2001-142716 A IEEE SOFTWARE January/February2002 Improving Security Using Extensible Lightweight Static Analysis <http://www.cs.virginia.edu/papers/ieeesoftware.pdf>IEEE SOFTWARE January / February 2002 Improving Security Usable Extensible Lightweight Static Analysis <http: // www. cs. virginia. edu / papers / ieessoftware. pdf> 「Resolution, Optimization, and Encoding of Pointer Variables for the Behavioral Synthesis from C, IEEE TRANSACTIONS ON COMPUTER−AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL.20, NO.2, FEBRUARY 2001」 <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.31.6774&rep=rep1&type=pdf>"Resolution, Optimization, and Encoding of Pointer Variables for the Behavioral Synthesis from C, IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL.20, NO.2, FEBRUARY 2001" <http: // citeseerx. ist. psu. edu / viewdoc / download? doi = 10.1.1.31.6774 & rep = rep1 & type = pdf> Model Checking C Programs Using F−Soft, Proceedings of the 2005 International Conference on Computer Design <http://portal.acm.org/citation.cfm?id=1097556&dl=ACM&coll=portal>Model Checking C Programs Using F-Soft, Proceedings of the 2005 International Conference on Computer Design <http: // portal. acm. org / citation. cfm? id = 1097556 & dl = ACM & coll = portal>

本発明の目的は、コンピュータプログラムのソースコードに対して、ソースコード検証手法を適用した場合に、得られるエラートレースを参照する作業を省力化するエラートレース簡略化システムを提供することである。   An object of the present invention is to provide an error trace simplification system that saves labor for referring to an error trace obtained when a source code verification method is applied to the source code of a computer program.

本発明のエラートレース簡略化システムは、入力されたソースコードをフラット化するフラット化部と、フラット化されたソースコードを検証し、エラートレースを作成するソースコード検証部と、作成されたエラートレースに含まれるステップに対し、条件演算子による演算を含む場合には、条件演算子による演算を含まない形式に簡略化するエラートレース簡略化部とを具備する。   An error trace simplification system according to the present invention includes a flattening unit that flattens input source code, a source code verification unit that verifies the flattened source code and creates an error trace, and the created error trace. In the case where an operation by a conditional operator is included in the steps included in, an error trace simplification unit that simplifies to a format not including an operation by a conditional operator is provided.

本発明のエラートレース簡略化方法は、入力されたソースコードをフラット化することと、フラット化されたソースコードを検証し、エラートレースを作成することと、作成されたエラートレースに含まれるステップに対し、条件演算子による演算を含む場合には、条件演算子による演算を含まない形式に簡略化することとを含む。   The error trace simplification method of the present invention includes flattening input source code, verifying the flattened source code, creating an error trace, and steps included in the created error trace. On the other hand, in the case of including an operation by a conditional operator, it includes simplification to a format not including an operation by a conditional operator.

本発明のプログラムは、入力されたソースコードをフラット化することと、フラット化されたソースコードを検証し、エラートレースを作成することと、作成されたエラートレースに含まれるステップに対し、条件演算子による演算を含む場合には、条件演算子による演算を含まない形式に簡略化することとをコンピュータに実行させるためのプログラムである。   The program of the present invention flattens input source code, verifies the flattened source code, creates an error trace, and performs conditional operations on the steps included in the created error trace. When a calculation by a child is included, this is a program for causing a computer to execute simplification to a format that does not include a calculation by a conditional operator.

フラット化を用いたソースコード検証処理において、エラートレースに含まれる表現を簡略化し、ユーザにとって分かりやすいエラートレースの出力を可能とする。   In the source code verification process using flattening, the expression included in the error trace is simplified, and an error trace that is easy for the user to output can be output.

以下に、本発明の実施形態について添付図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the accompanying drawings.

図1を参照すると、本発明のエラートレース簡略化システムは、入力ソースコード1と、処理装置2と、記憶装置3と、簡略化エラートレース4を含む。   Referring to FIG. 1, the error trace simplification system of the present invention includes an input source code 1, a processing device 2, a storage device 3, and a simplified error trace 4.

本発明のエラートレース簡略化システムの例として、PC(パソコン)、シンクライアント端末/サーバ、ワークステーション、メインフレーム、スーパーコンピュータ等のコンピュータを想定している。なお、本システムは、端末やサーバに限らず、中継機器や周辺機器でも良い。また、本システムは、コンピュータに搭載される拡張ボードやソフトウェアでも良い。更に、本システムは、コンピュータに搭載された仮想マシン(Virtual Machine(VM))環境でも良い。但し、実際には、これらの例に限定されない。   As an example of the error trace simplification system of the present invention, a computer such as a PC (personal computer), a thin client terminal / server, a workstation, a mainframe, and a supercomputer is assumed. The system is not limited to a terminal or a server, and may be a relay device or a peripheral device. The system may be an expansion board or software installed in a computer. Furthermore, this system may be a virtual machine (Virtual Machine (VM)) environment mounted on a computer. However, actually, it is not limited to these examples.

入力ソースコード1は、ソースコード検証の対象となるソースコードである。図2に、入力ソースコード1の内容を例示する。   The input source code 1 is a source code to be subjected to source code verification. FIG. 2 illustrates the contents of the input source code 1.

処理装置2は、プログラム制御により動作する。処理装置2の例として、CPU(Central Processing Unit)やマイクロプロセッサ(microprocessor)等の処理装置、又は同様の機能を有する半導体集積回路(Integrated Circuit(IC))等が考えられる。なお、処理装置2は、本発明のエラートレース簡略化方法をコンピュータに実行させるためのプログラムでも良い。但し、実際には、これらの例に限定されない。   The processing device 2 operates under program control. As an example of the processing apparatus 2, a processing apparatus such as a CPU (Central Processing Unit) or a microprocessor (microprocessor), or a semiconductor integrated circuit (Integrated Circuit (IC)) having a similar function may be considered. The processing device 2 may be a program for causing a computer to execute the error trace simplification method of the present invention. However, actually, it is not limited to these examples.

記憶装置3は、情報を記憶する。記憶装置3の例として、メモリ等の半導体記憶装置、ハードディスク等の外部記憶装置(ストレージ)、又は、記憶媒体(メディア)等が考えられる。また、記憶装置3は、外付けの記憶装置やネットワーク上のストレージサーバでも良い。但し、実際には、これらの例に限定されない。   The storage device 3 stores information. Examples of the storage device 3 include a semiconductor storage device such as a memory, an external storage device (storage) such as a hard disk, or a storage medium (media). The storage device 3 may be an external storage device or a network storage server. However, actually, it is not limited to these examples.

簡略化エラートレース4は、本発明のエラートレース簡略化システムにおける処理結果である。   The simplified error trace 4 is a processing result in the error trace simplification system of the present invention.

処理装置2は、ソースコード入力部21と、フラット化部22と、ソースコード検証部23と、エラートレース簡略化部24と、結果出力部25を備える。   The processing device 2 includes a source code input unit 21, a flattening unit 22, a source code verification unit 23, an error trace simplification unit 24, and a result output unit 25.

ソースコード入力部21は、入力ソースコード1を読み込み、フラット化部22に受け渡す。   The source code input unit 21 reads the input source code 1 and passes it to the flattening unit 22.

フラット化部22は、入力ソースコード1をフラット化して、ソースコード検証部23に受け渡す。ここでは、フラット化部22は、図2に示すような入力ソースコード1をフラット化して、図3に示すようなフラット化されたソースコード(フラット化コード)を作成し、フラット化されたソースコード(フラット化コード)をソースコード検証部23に受け渡す。   The flattening unit 22 flattens the input source code 1 and passes it to the source code verification unit 23. Here, the flattening unit 22 flattens the input source code 1 as shown in FIG. 2 to create a flattened source code (flattened code) as shown in FIG. 3, and the flattened source The code (flattened code) is transferred to the source code verification unit 23.

ソースコード検証部23は、フラット化されたソースコード(フラット化コード)にソースコード検証を適用し、得られたエラートレースを記憶装置3のエラートレース記憶部31に格納する。すなわち、ソースコード検証部23は、フラット化されたソースコード(フラット化コード)を基に、ソースコード検証手法に従って、エラートレースを作成する。   The source code verification unit 23 applies the source code verification to the flattened source code (flattened code), and stores the obtained error trace in the error trace storage unit 31 of the storage device 3. That is, the source code verification unit 23 creates an error trace according to the source code verification method based on the flattened source code (flattened code).

エラートレース簡略化部24は、記憶装置3のエラートレース記憶部31に格納されたエラートレースに含まれる全てのステップについて、条件演算子による演算を含む場合には簡略化しながら、記憶装置3の簡略化エラートレース記憶部32に格納する。条件演算子による演算は、「条件式 ? 真の式 : 偽の式」で表される。すなわち、条件演算子による演算は、条件式、真の式、偽の式の3要素を含む。エラートレース簡略化部24は、条件式が真であるか偽であるかを当該ステップにおける変数の値を根拠にして判定し、判定の結果と条件演算子によって選択された真の式、又は偽の式のみを残すことにより、式の構成要素を減らす。   The error trace simplification unit 24 simplifies the storage device 3 while simplifying all steps included in the error trace stored in the error trace storage unit 31 of the storage device 3 when including operations by a conditional operator. Stored in the error-error trace storage unit 32. An operation by a conditional operator is represented by “conditional expression? True expression: false expression”. That is, the calculation by the conditional operator includes three elements: a conditional expression, a true expression, and a false expression. The error trace simplification unit 24 determines whether the conditional expression is true or false based on the value of the variable in the corresponding step, and the true expression selected by the determination result and the conditional operator or false By leaving only the formula, the components of the formula are reduced.

なお、エラートレース簡略化部24は、処理装置2の外部に独立して設けられた装置とすることも可能である。例えば、エラートレース簡略化部24は、複数の記憶装置3にアクセス可能なサーバでも良い。また、エラートレース簡略化部24は、記憶装置3を有する端末やサーバ等に含まれていても良い。   Note that the error trace simplification unit 24 may be an apparatus provided independently of the processing apparatus 2. For example, the error trace simplification unit 24 may be a server that can access a plurality of storage devices 3. Further, the error trace simplification unit 24 may be included in a terminal or a server having the storage device 3.

結果出力部25は、記憶装置3の簡略化エラートレース記憶部32に格納されたエラートレースを、簡略化エラートレース4として出力する。   The result output unit 25 outputs the error trace stored in the simplified error trace storage unit 32 of the storage device 3 as the simplified error trace 4.

記憶装置3は、エラートレース記憶部31と、簡略化エラートレース記憶部32を備える。   The storage device 3 includes an error trace storage unit 31 and a simplified error trace storage unit 32.

エラートレース記憶部31は、エラーが発生するまでに実行される各ステップの情報を保持する。具体的には、エラートレース記憶部31に保持される情報は、図4A、図4B、及び図4Cに示すように、そのステップが対応するソースコード上の行番号、当該ステップで実行された代入式、当該ステップで評価され成立した条件式、及び当該ステップにおける変数の値を含む。なお、ステップ数の数え方には様々な基準があるが、多くの場合、プログラムのソースコードの行数である「LOC」(Lines Of Code)を基にした値となる。LOCをそのままステップ数として用いることもあるが、LOCからプログラムとしては意味を成さない空行やコメントの行の数を除いて換算する場合もある。   The error trace storage unit 31 holds information on each step executed until an error occurs. Specifically, as shown in FIGS. 4A, 4B, and 4C, the information held in the error trace storage unit 31 includes the line number on the source code corresponding to the step, and the substitution performed at the step. An expression, a conditional expression that is evaluated and established in the step, and a value of a variable in the step. Although there are various standards for counting the number of steps, in many cases, the value is based on “LOC” (Lines Of Code) which is the number of lines of the source code of the program. LOC may be used as the number of steps as it is, but conversion may be performed by removing the number of blank lines and comment lines that do not make sense as a program from LOC.

簡略化エラートレース記憶部32は、基本的には、エラートレース記憶部31の内容と同様の内容(エラーが発生するまでに実行される各ステップの情報)を保持する。但し、簡略化エラートレース記憶部32は、条件演算子による演算を含むステップについては、簡略化された後に保持する。すなわち、簡略化エラートレース記憶部32は、条件演算子による演算を含まないステップが転記されたエラートレースを格納する。例えば、簡略化エラートレース記憶部32は、エラートレース記憶部31に格納されたエラートレースに、条件演算子による演算を含むステップが含まれていない場合、エラートレース記憶部31に格納されたエラートレースをそのまま格納する。反対に、簡略化エラートレース記憶部32は、エラートレース記憶部31に格納されたエラートレースに、条件演算子による演算を含むステップが含まれていた場合、該エラートレースをエラートレース簡略化部24に提供し、エラートレース簡略化部24で簡略化された後に格納する。   The simplified error trace storage unit 32 basically holds the same content as the content of the error trace storage unit 31 (information of each step executed until an error occurs). However, the simplified error trace storage unit 32 holds the steps including the calculation by the conditional operator after being simplified. That is, the simplified error trace storage unit 32 stores an error trace in which a step not including an operation by a conditional operator is transcribed. For example, the simplified error trace storage unit 32 stores the error trace stored in the error trace storage unit 31 when the error trace stored in the error trace storage unit 31 does not include a step including a calculation by a conditional operator. Is stored as it is. On the contrary, if the error trace stored in the error trace storage unit 31 includes a step including an operation by a conditional operator, the simplified error trace storage unit 32 converts the error trace into the error trace simplification unit 24. And stored after being simplified by the error trace simplification unit 24.

なお、図5と図6は、図4A、図4B、及び図4Cに示すエラートレースに含まれるステップの、簡略化前と簡略化後のステップの状態を示す。ここでは、説明を簡単にするため、簡略化後に式が変化するステップ、すなわち条件演算子による演算を含むステップのみについて示している。図5は、エラートレース記憶部31に格納されている簡略化前のエラートレースに含まれるステップを示す。図6は、簡略化エラートレース記憶部32に格納された簡略化後のエラートレースに含まれるステップを示す。但し、実際には、条件演算子による演算を含むステップ以外のステップも示されている。   5 and 6 show the states of the steps included in the error trace shown in FIGS. 4A, 4B, and 4C before and after the simplification. Here, in order to simplify the explanation, only the step in which the expression changes after simplification, that is, the step including the calculation by the conditional operator is shown. FIG. 5 shows steps included in the error trace before simplification stored in the error trace storage unit 31. FIG. 6 shows steps included in the simplified error trace stored in the simplified error trace storage unit 32. However, actually, steps other than the step including the calculation by the conditional operator are also shown.

次に、図7を参照して、本発明のエラートレース簡略化システムの動作について詳細に説明する。   Next, the operation of the error trace simplification system of the present invention will be described in detail with reference to FIG.

(1)処理手順A1
ソースコード入力部21は、入力ソースコード1を読み込み、フラット化部22に受け渡す。フラット化部22に受け渡される入力ソースコード1の例については、図2に示す通りである。ここでは、ソースコード入力部21は、入力装置や通信用インタフェース等を介して、入力ソースコード1を取得する。なお、ソースコード入力部21は、外部のコンピュータから入力ソースコード1を受け取っても良い。或いは、ソースコード入力部21は、外部の記憶装置や記憶媒体(メディア)から入力ソースコード1を読み出しても良い。
(1) Processing procedure A1
The source code input unit 21 reads the input source code 1 and passes it to the flattening unit 22. An example of the input source code 1 delivered to the flattening unit 22 is as shown in FIG. Here, the source code input unit 21 acquires the input source code 1 via an input device, a communication interface, or the like. The source code input unit 21 may receive the input source code 1 from an external computer. Alternatively, the source code input unit 21 may read the input source code 1 from an external storage device or storage medium (media).

(2)処理手順A2
次に、フラット化部22は、入力ソースコード1をフラット化し、ソースコード検証部23に受け渡す。例えば、フラット化部22は、ソースコード入力部21から、図2に示す入力ソースコード1を受け取ると、フラット化し、結果として図3に示す形のフラット化されたソースコード(フラット化コード)を作成し、ソースコード検証部23に受け渡す。
(2) Processing procedure A2
Next, the flattening unit 22 flattens the input source code 1 and passes it to the source code verification unit 23. For example, when receiving the input source code 1 shown in FIG. 2 from the source code input unit 21, the flattening unit 22 flattens and, as a result, flattened source code (flattened code) having the form shown in FIG. 3. Create and pass to the source code verification unit 23.

(3)処理手順A3
次に、ソースコード検証部23は、フラット化されたソースコード(フラット化コード)を検証する。
(3) Processing procedure A3
Next, the source code verification unit 23 verifies the flattened source code (flattened code).

(4)処理手順A4
ソースコード検証部23は、フラット化されたソースコード(フラット化コード)の検証において、エラートレースが得られたかどうか判断する。ソースコード検証部23は、フラット化されたソースコード(フラット化コード)の検証の結果、エラートレースが得られた場合には、エラートレース記憶部31に格納する。例えば、ソースコード検証部23は、図3に示すフラット化されたソースコード(フラット化コード)を検証した場合には、図4A、図4B、及び図4Cに示すエラートレースが得られるので、この内容(図4A、図4B、及び図4Cに示すエラートレース)をエラートレース記憶部31に格納する。なお、フラット化されたソースコード(フラット化コード)の検証においては、エラーが検出されない場合にはエラートレースは得られない。ソースコード検証部23は、エラートレースが得られなかった場合には、処理を終了する。
(4) Processing procedure A4
The source code verification unit 23 determines whether an error trace is obtained in verification of the flattened source code (flattened code). When an error trace is obtained as a result of the verification of the flattened source code (flattened code), the source code verification unit 23 stores it in the error trace storage unit 31. For example, when the source code verification unit 23 verifies the flattened source code (flattened code) shown in FIG. 3, the error trace shown in FIGS. 4A, 4B, and 4C is obtained. The contents (error traces shown in FIGS. 4A, 4B, and 4C) are stored in the error trace storage unit 31. In the verification of the flattened source code (flattened code), an error trace cannot be obtained if no error is detected. If the error trace is not obtained, the source code verification unit 23 ends the process.

(5)処理手順A5
次に、エラートレース簡略化部24は、得られたエラートレースを簡略化する。例えば、エラートレース簡略化部24は、エラートレース記憶部31に格納されたエラートレースを読み出し、読み出されたエラートレースを簡略化し、簡略化エラートレース記憶部32に格納する。なお、エラートレース簡略化部24は、ソースコード検証部23から直接、得られたエラートレースを受け取るようにしても良い。エラートレース簡略化の詳細については後述する。
(5) Processing procedure A5
Next, the error trace simplification unit 24 simplifies the obtained error trace. For example, the error trace simplification unit 24 reads the error trace stored in the error trace storage unit 31, simplifies the read error trace, and stores it in the simplified error trace storage unit 32. Note that the error trace simplification unit 24 may receive the obtained error trace directly from the source code verification unit 23. Details of the error trace simplification will be described later.

(6)処理手順A6
次に、結果出力部25は、簡略化エラートレース記憶部32に格納されたエラートレースを簡略化エラートレース4として出力する。なお、結果出力部25は、エラートレース簡略化部24から直接、簡略化されたエラートレースを受け取り、簡略化エラートレース4として出力するようにしても良い。
(6) Processing procedure A6
Next, the result output unit 25 outputs the error trace stored in the simplified error trace storage unit 32 as the simplified error trace 4. Note that the result output unit 25 may receive the simplified error trace directly from the error trace simplification unit 24 and output it as the simplified error trace 4.

得られた簡略化エラートレース4は、図7の処理手順A5(エラートレース簡略化)の処理により条件演算子による演算を含まないものとなっているため、本システムのユーザは、条件演算子による演算を解釈することなく、少ない労力でエラートレースを参照できる。   Since the obtained simplified error trace 4 does not include the calculation by the conditional operator by the processing of the processing procedure A5 (error trace simplification) in FIG. 7, the user of the present system uses the conditional operator. The error trace can be referenced with little effort without interpreting the operation.

次に、図8を参照して、エラートレース簡略化(図7の処理手順A5)について詳細に説明する。   Next, error trace simplification (processing procedure A5 in FIG. 7) will be described in detail with reference to FIG.

(1)処理手順B1
エラートレース簡略化部24は、エラートレースの簡略化の処理において、エラートレース記憶部31に格納されたエラートレースに含まれる全てのステップについて、図8の処理手順B2から処理手順B6までの処理を繰り返し、簡略化エラートレース記憶部32に転記する。図4A、図4B、及び図4Cに示すエラートレースの例では、ステップ番号1から55まで、1ステップずつ繰り返すことになる。ここでは、エラートレース簡略化部24は、エラートレース記憶部31に格納されたエラートレースに、未処理のステップがあるか確認する。このとき、エラートレース簡略化部24は、ソースコード検証部23から直接、エラートレースを取得し、取得されたエラートレースに、未処理のステップがあるか確認するようにしても良い。エラートレース簡略化部24は、エラートレース簡略化部24は、エラートレースに未処理のステップが含まれている場合、エラートレース記憶部31に格納されたエラートレースに含まれる全てのステップについて、1ステップずつ読み出す。すなわち、エラートレース簡略化部24は、図4A、図4B、及び図4Cに示すエラートレースの例では、1ステップずつ、ステップ番号1から55に対応するステップの式を読み出す。
(1) Processing procedure B1
The error trace simplification unit 24 performs the processes from the process procedure B2 to the process procedure B6 in FIG. 8 for all steps included in the error trace stored in the error trace storage unit 31 in the error trace simplification process. It repeats and it transcribe | transfers to the simplification error trace memory | storage part 32. FIG. In the error trace examples shown in FIGS. 4A, 4B, and 4C, step numbers 1 to 55 are repeated step by step. Here, the error trace simplification unit 24 checks whether there is an unprocessed step in the error trace stored in the error trace storage unit 31. At this time, the error trace simplification unit 24 may acquire the error trace directly from the source code verification unit 23 and check whether there is an unprocessed step in the acquired error trace. The error trace simplification unit 24 is configured so that the error trace simplification unit 24 calculates 1 for all steps included in the error trace stored in the error trace storage unit 31 when an unprocessed step is included in the error trace. Read step by step. In other words, the error trace simplification unit 24 reads out the step formulas corresponding to the step numbers 1 to 55 step by step in the example of the error trace shown in FIGS. 4A, 4B, and 4C.

(2)処理手順B2
エラートレース簡略化部24は、当該ステップ(読み出されたステップ)の式に、条件演算子による演算が含まれるか否かを判定する。すなわち、エラートレース簡略化部24は、当該ステップの式に、「条件式 ? 真の式 : 偽の式」で表される表現が含まれるか否かを判定する。
(2) Processing procedure B2
The error trace simplification unit 24 determines whether the expression of the step (read step) includes an operation by a conditional operator. That is, the error trace simplification unit 24 determines whether or not the expression of the step includes an expression represented by “conditional expression? True expression: false expression”.

(3)処理手順B3
エラートレース簡略化部24は、当該ステップの式に、条件演算子による演算が含まれる場合、条件演算子による演算の条件式部分を、当該ステップにおける変数の値により評価し、その真偽を判断する。例えば、エラートレース簡略化部24は、図4A、図4B、及び図4Cに示すエラートレースがエラートレース記憶部31に格納されているとして、ステップ番号45のステップを処理する場合、条件演算子による演算を含むため、この分岐はイエスとなり、条件演算子による演算の条件式部分を、当該ステップにおける変数の値により評価し、その真偽を判断する。
(3) Processing procedure B3
The error trace simplification unit 24 evaluates the conditional expression part of the operation by the conditional operator based on the value of the variable in the step and determines its true / false when the operation of the conditional operator is included in the expression of the step. To do. For example, the error trace simplification unit 24 assumes that the error trace shown in FIGS. 4A, 4B, and 4C is stored in the error trace storage unit 31 and processes the step of step number 45 by a conditional operator. Since this includes an operation, this branch becomes yes, and the conditional expression part of the operation by the conditional operator is evaluated based on the value of the variable in the step, and its true / false is determined.

(4)処理手順B4
エラートレース簡略化部24は、判断の結果が偽であれば、結果に従い、偽の式に相当する式をもって条件演算子による演算全体を置換する。これにより、当該ステップの式について、条件演算子による演算が含まれなくなる。
(4) Processing procedure B4
If the determination result is false, the error trace simplification unit 24 replaces the entire calculation by the conditional operator with an expression corresponding to the false expression according to the result. As a result, the calculation by the conditional operator is not included in the expression of the step.

(5)処理手順B5
エラートレース簡略化部24は、判断の結果が真であれば、結果に従い、真の式に相当する式でもって条件演算子による演算全体を置換する。これにより、当該ステップの式について、条件演算子による演算が含まれなくなる。
(5) Processing procedure B5
If the determination result is true, the error trace simplification unit 24 replaces the entire operation by the conditional operator with an expression corresponding to the true expression according to the result. As a result, the calculation by the conditional operator is not included in the expression of the step.

(6)処理手順B6
エラートレース簡略化部24は、当該ステップについて、条件演算子による演算全体を置換した後の情報を、簡略化エラートレース記憶部32に格納するためのエラートレース(簡略化エラートレース4)に転記する。なお、エラートレース簡略化部24は、当該ステップの式に、条件演算子による演算が含まれない場合、当該ステップの情報をそのまま簡略化エラートレース記憶部32に格納するためのエラートレースに転記する。例えば、エラートレース簡略化部24は、図4A、図4B、及び図4Cに示すエラートレースがエラートレース記憶部31に格納されているとして、ステップ番号1のステップを処理する場合、条件演算子による演算を含まないため、当該ステップの情報をそのまま簡略化エラートレース記憶部32に格納するためのエラートレースに転記する。すなわち、エラートレース簡略化部24は、ステップの式に条件演算子による演算を含まないステップの情報を、簡略化エラートレース記憶部32に格納するためのエラートレースに転記する。
(6) Processing procedure B6
The error trace simplification unit 24 transcribes the information after replacing the entire calculation by the conditional operator to the error trace (simplified error trace 4) for storing in the simplified error trace storage unit 32. . The error trace simplification unit 24 transcribes the information of the step as it is to the error trace to be stored in the simplified error trace storage unit 32 when the calculation of the conditional operator is not included in the formula of the step. . For example, the error trace simplification unit 24 assumes that the error trace shown in FIGS. 4A, 4B, and 4C is stored in the error trace storage unit 31 and processes the step of step number 1 by using a conditional operator. Since the calculation is not included, the information of the step is directly transferred to the error trace for storing in the simplified error trace storage unit 32. In other words, the error trace simplification unit 24 transcribes information on a step that does not include an operation by a conditional operator in the step expression into an error trace for storing in the simplified error trace storage unit 32.

(7)処理手順B7
エラートレース簡略化部24は、エラートレース記憶部31に格納されたエラートレースに含まれる全てのステップについて、未処理のステップが無くなった場合、簡略化エラートレース記憶部32に格納するためのエラートレースを、簡略化エラートレース記憶部32に格納して、処理を終了する。なお、エラートレース簡略化部24は、エラートレース記憶部31に格納されたエラートレースに含まれる全てのステップの式に、条件演算子による演算が含まれない場合、エラートレース記憶部31に格納されたエラートレースを、そのまま簡略化エラートレース記憶部32に格納するためのエラートレースとして、簡略化エラートレース記憶部32に格納して、処理を終了する。このとき、エラートレース簡略化部24は、簡略化エラートレース記憶部32に格納するためのエラートレースを、簡略化エラートレース記憶部32に格納せず、直接、結果出力部25に出力するようにしても良い。ここで、エラートレース記憶部31に格納されたエラートレースは、ソースコード検証部23から取得されたエラートレースと読み替えても良い。
(7) Processing procedure B7
The error trace simplification unit 24 stores an error trace to be stored in the simplified error trace storage unit 32 when there are no unprocessed steps for all the steps included in the error trace stored in the error trace storage unit 31. Is stored in the simplified error trace storage unit 32, and the process ends. Note that the error trace simplification unit 24 stores in the error trace storage unit 31 when all the expressions of the steps included in the error trace stored in the error trace storage unit 31 do not include an arithmetic operation by a conditional operator. The error trace is stored in the simplified error trace storage unit 32 as an error trace to be stored in the simplified error trace storage unit 32 as it is, and the process is terminated. At this time, the error trace simplification unit 24 outputs the error trace to be stored in the simplified error trace storage unit 32 directly to the result output unit 25 without storing it in the simplified error trace storage unit 32. May be. Here, the error trace stored in the error trace storage unit 31 may be read as the error trace acquired from the source code verification unit 23.

これにより、簡略化エラートレース記憶部32に格納されたエラートレースに転記されたステップの式は、条件式の真偽の判断がすでに完了した、簡略化された形になる。   As a result, the expression of the step transferred to the error trace stored in the simplified error trace storage unit 32 becomes a simplified form in which the true / false judgment of the conditional expression has already been completed.

ここで、図9を参照して、図4Cのステップ番号45を例に、処理手順B2,B3,B4,B5の詳細について説明する。   Here, with reference to FIG. 9, the details of the processing procedures B2, B3, B4, and B5 will be described using the step number 45 in FIG. 4C as an example.

図9の式4501は、図4Cのステップ番号45における式を転記したものである。式4501は、条件演算子による演算45011を示す。条件演算子による演算45011は、条件式45012と、真の式45013と、偽の式45014を含む。図9の式4501を見ると、条件演算子による演算45011が含まれているため、エラートレース簡略化部24は、処理手順B3を実行する。すなわち、エラートレース簡略化部24は、条件演算子45011による演算の条件式部分を、当該ステップにおける変数の値により評価し、その真偽を判断する。図4Cのステップ番号45の変数iの値を見ると「1」(「i == 1」)となっているため、エラートレース簡略化部24は、条件式45012の「i == 0」を偽であると判断する。従って、条件演算子による演算45011は、偽の式45014により置き換えられ、図9の式4502の形となる。   The formula 4501 in FIG. 9 is a transcription of the formula at step number 45 in FIG. 4C. An expression 4501 indicates an operation 45011 by a conditional operator. The calculation 45011 by the conditional operator includes a conditional expression 45012, a true expression 45013, and a false expression 45014. When the expression 4501 in FIG. 9 is seen, since the calculation 45011 by the conditional operator is included, the error trace simplification unit 24 executes the processing procedure B3. That is, the error trace simplification unit 24 evaluates the conditional expression part of the calculation by the conditional operator 45011 based on the value of the variable in the step, and determines its true / false. Since the value of the variable i at step number 45 in FIG. 4C is “1” (“i == 1”), the error trace simplifying unit 24 sets “i == 0” in the conditional expression 45012. Judged to be false. Therefore, the operation 45011 by the conditional operator is replaced by a fake expression 45014 and takes the form of the expression 4502 in FIG.

図9の式4502は、条件演算子による演算45021を示す。条件演算子による演算45021は、条件式45022と、真の式45023と、偽の式45024を含む。図9の式4502を見ると、条件演算子による演算45021が含まれているため、エラートレース簡略化部24は、再度、処理手順B3を実行する。すなわち、エラートレース簡略化部24は、条件演算子45021による演算の条件式部分を、当該ステップにおける変数の値により評価し、その真偽を判断する。図4Cのステップ番号45の変数iの値を見ると「1」(「i == 1」)となっているため、エラートレース簡略化部24は、条件式45022の「i == 1」は真であると判断する。従って、条件演算子による演算45021は、真の式45023により置き換えられ、図9の4503の形となる。   An expression 4502 in FIG. 9 shows an operation 45021 by a conditional operator. The calculation 45021 by the conditional operator includes a conditional expression 45022, a true expression 45023, and a false expression 45024. When the expression 4502 of FIG. 9 is seen, since the calculation 45021 by the conditional operator is included, the error trace simplification unit 24 executes the processing procedure B3 again. That is, the error trace simplification unit 24 evaluates the conditional expression part of the calculation by the conditional operator 45021 based on the value of the variable in the step, and determines its true / false. Since the value of the variable i at step number 45 in FIG. 4C is “1” (“i == 1”), the error trace simplification unit 24 determines that “i == 1” in the conditional expression 45022. Judge as true. Therefore, the operation 45021 by the conditional operator is replaced by the true expression 45023 and takes the form of 4503 in FIG.

図9の式4503は、条件演算子による演算45031を示す。条件演算子による演算45031は、条件式45032と、真の式45033と、偽の式45034を含む。図9の式4503を見ても、条件演算子による演算45031が含まれているため、エラートレース簡略化部24は、再度、処理手順B3を実行する。すなわち、エラートレース簡略化部24は、条件演算子45031による演算の条件式部分を、当該ステップにおける変数の値により評価し、その真偽を判断する。図4Cのステップ番号45の変数jの値を見ると「0」(「j == 0」)となっているため、エラートレース簡略化部24は、条件式45032の「j == 0」は真であると判断する。従って、条件演算子による演算45031は、真の式45033により置き換えられ、図9の4504の形となる。   An expression 4503 in FIG. 9 shows an operation 45031 by a conditional operator. The calculation 45031 by the conditional operator includes a conditional expression 45032, a true expression 45033, and a false expression 45034. Even if the expression 4503 in FIG. 9 is seen, since the calculation 45031 by the conditional operator is included, the error trace simplification unit 24 executes the processing procedure B3 again. That is, the error trace simplification unit 24 evaluates the conditional expression part of the calculation by the conditional operator 45031 based on the value of the variable in the step, and determines its true / false. Since the value of the variable j of step number 45 in FIG. 4C is “0” (“j == 0”), the error trace simplifying unit 24 determines that “j == 0” in the conditional expression 45032 Judge as true. Therefore, the operation 45031 by the conditional operator is replaced by the true expression 45033 and takes the form of 4504 in FIG.

図9の式4504を見ると、条件演算子による演算は含まれていないため、エラートレース簡略化部24は、このステップに関する処理を終了する。   When the expression 4504 of FIG. 9 is seen, since the calculation by the conditional operator is not included, the error trace simplification unit 24 ends the processing relating to this step.

以上のように、本発明では、コンピュータプログラムのソースコードに対して、ソースコード検証手法を適用した場合に、得られるエラートレースを参照する作業を省力化する。具体的には、エラートレースに含まれる条件演算子による演算を、エラートレースが示す変数の値を根拠にして解釈し、条件演算子が含まれない簡略化されたエラートレースをユーザに提示することにより、ユーザがエラートレースに含まれる条件演算子による演算を解釈する労力を軽減する。   As described above, according to the present invention, when the source code verification method is applied to the source code of the computer program, the work of referring to the obtained error trace is saved. Specifically, the operation by the conditional operator included in the error trace is interpreted based on the value of the variable indicated by the error trace, and a simplified error trace that does not include the conditional operator is presented to the user. Thus, the user can reduce the labor for interpreting the calculation by the conditional operator included in the error trace.

本発明のエラートレース簡略化システムは、フラット化を用いたソースコード検証手法において、エラートレースに含まれる表現を簡略化することにより、ユーザにとって分かりやすいエラートレースを出力する。   The error trace simplification system of the present invention outputs an error trace that is easy for the user to understand by simplifying the expression included in the error trace in the source code verification method using flattening.

まず、本発明のエラートレース簡略化システムは、入力ソースコードを読み込み、入力されたソースコードをフラット化して、フラット化されたソースコード(フラット化コード)にソースコード検証手法を適用し、得られたエラートレースをエラートレース記憶部に格納する。   First, the error trace simplification system of the present invention is obtained by reading an input source code, flattening the input source code, and applying a source code verification method to the flattened source code (flattened code). Stored error traces in the error trace storage unit.

次に、本発明のエラートレース簡略化システムは、エラートレース記憶部に格納されたエラートレースに含まれる全てのステップについて、条件演算子による演算を含む場合には、条件演算子による演算を含まない形式に簡略化し、簡略化エラートレース記憶部に格納する。すなわち、条件演算子は、条件式、真の式、偽の式の要素を含む。kのとき、本発明のエラートレース簡略化システムは、条件式が真であるか偽であるかを当該ステップにおける変数の値を根拠にして判定し、条件演算子によって選択された真の式、又は偽の式のみを残す。   Next, the error trace simplification system of the present invention does not include the calculation by the conditional operator when all the steps included in the error trace stored in the error trace storage unit include the calculation by the conditional operator. Simplify to format and store in simplified error trace storage. That is, the conditional operator includes elements of a conditional expression, a true expression, and a false expression. When k, the error trace simplification system of the present invention determines whether the conditional expression is true or false based on the value of the variable in the step, and the true expression selected by the conditional operator, Or leave only false expressions.

最後に、本発明のエラートレース簡略化システムは、簡略化エラートレース記憶部に格納されたエラートレースを、簡略化エラートレースとして出力する。   Finally, the error trace simplification system of the present invention outputs the error trace stored in the simplified error trace storage unit as a simplified error trace.

これにより、ユーザは条件演算子による演算を解釈することなく、簡略化されたエラートレースを参照できるので、エラートレースを参照する労力を減らすことができる。   Thereby, since the user can refer to the simplified error trace without interpreting the calculation by the conditional operator, the effort for referring to the error trace can be reduced.

以上、本発明の実施形態を詳述してきたが、実際には上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の変更があっても本発明に含まれる。   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.

図1は、本発明のエラートレース簡略化システムの構成例を示すブロック図である。FIG. 1 is a block diagram showing a configuration example of an error trace simplification system of the present invention. 図2は、入力ソースコードの内容の例を示す図である。FIG. 2 is a diagram illustrating an example of the contents of the input source code. 図3は、フラット化されたソースコード(フラット化コード)の内容の例を示す図である。FIG. 3 is a diagram illustrating an example of the content of a flattened source code (flattened code). 図4Aは、エラートレースに含まれる各ステップの情報のステップ番号1から20までの例を示す図である。FIG. 4A is a diagram illustrating an example of step numbers 1 to 20 of information of each step included in the error trace. 図4Bは、エラートレースに含まれる各ステップの情報のステップ番号21から40までの例を示す図である。FIG. 4B is a diagram illustrating an example of step numbers 21 to 40 of information of each step included in the error trace. 図4Cは、エラートレースに含まれる各ステップの情報のステップ番号41から55までの例を示す図である。FIG. 4C is a diagram illustrating an example of step numbers 41 to 55 of information of each step included in the error trace. 図5は、エラートレース記憶部に格納されている簡略化前のエラートレースに含まれるステップの例を示す図である。FIG. 5 is a diagram illustrating an example of steps included in the error trace before simplification stored in the error trace storage unit. 図6は、簡略化エラートレース記憶部に格納された簡略化後のエラートレースに含まれるステップの例を示す図である。FIG. 6 is a diagram illustrating an example of steps included in the simplified error trace stored in the simplified error trace storage unit. 図7は、本発明のエラートレース簡略化システムの動作を示すフローチャートである。FIG. 7 is a flowchart showing the operation of the error trace simplification system of the present invention. 図8は、エラートレース簡略化の詳細な動作を示すフローチャートである。FIG. 8 is a flowchart showing a detailed operation of the error trace simplification. 図9は、エラートレース簡略化の実施例について説明するための図である。FIG. 9 is a diagram for explaining an example of simplification of error tracing.

符号の説明Explanation of symbols

1…入力ソースコード
2…処理装置
21…ソースコード入力部
22…フラット化部
23…ソースコード検証部
24…エラートレース簡略化部
25…結果出力部
3…記憶装置
31…エラートレース記憶部
32…簡略化エラートレース記憶部
4…簡略化エラートレース
DESCRIPTION OF SYMBOLS 1 ... Input source code 2 ... Processing apparatus 21 ... Source code input part 22 ... Flattening part 23 ... Source code verification part 24 ... Error trace simplification part 25 ... Result output part 3 ... Storage device 31 ... Error trace storage part 32 ... Simplified error trace storage unit 4 ... Simplified error trace

Claims (12)

入力されたソースコードをフラット化するフラット化部と、
前記フラット化されたソースコードを検証し、エラートレースを作成するソースコード検証部と、
前記作成されたエラートレースに含まれるステップに対し、条件演算子による演算を含む場合には、前記条件演算子による演算を含まない形式に簡略化するエラートレース簡略化部と
を具備する
エラートレース簡略化システム。
A flattening unit for flattening the input source code;
A source code verification unit that verifies the flattened source code and creates an error trace;
If the step included in the created error trace includes an operation by a conditional operator, the error trace simplification unit includes an error trace simplification unit that simplifies to a format not including the operation by the conditional operator. System.
請求項1に記載のエラートレース簡略化システムであって、
前記条件演算子による演算は、
前記ステップにおける変数の値に基づいて、真であるか偽であるかを判定するための条件式と、
前記条件式が真の場合に選択される真の式と、
前記条件式が偽の場合に選択される偽の式と
を含む
エラートレース簡略化システム。
The error trace simplification system according to claim 1,
The operation by the conditional operator is
A conditional expression for determining whether it is true or false based on the value of the variable in the step;
A true expression selected when the conditional expression is true;
An error trace simplification system including a false expression selected when the conditional expression is false.
請求項2に記載のエラートレース簡略化システムであって、
前記エラートレース簡略化部は、前記ステップにおける変数の値に基づいて、前記条件演算子による演算における条件式が真であるか偽であるかを判定し、判定結果に応じて、前記条件演算子による演算を、前記条件演算子による演算における真の式と偽の式とのいずれかに置き換える
エラートレース簡略化システム。
The error trace simplification system according to claim 2,
The error trace simplification unit determines whether a conditional expression in the calculation by the conditional operator is true or false based on the value of the variable in the step, and the conditional operator is determined according to a determination result. An error trace simplification system that replaces the operation by using either a true expression or a false expression in the operation by the conditional operator.
請求項3に記載のエラートレース簡略化システムであって、
前記エラートレース簡略化部は、前記置き換えられた後の演算が前記条件演算子による演算である場合、前記置き換えられた後の演算に対し、前記ステップにおける変数の値に基づいて、前記置き換えられた後の演算における条件式が真であるか偽であるかを判定し、判定結果に応じて、前記置き換えられた後の演算を、前記置き換えられた後の演算における真の式と偽の式とのいずれかに置き換える
エラートレース簡略化システム。
An error trace simplification system according to claim 3,
The error trace simplification unit, when the replaced operation is an operation based on the conditional operator, the replaced operation based on the value of the variable in the step with respect to the replaced operation. It is determined whether a conditional expression in a subsequent operation is true or false, and the replaced operation is changed into a true expression and a false expression in the replaced operation according to a determination result. Replace with one of the error trace simplification systems.
入力されたソースコードをフラット化することと、
前記フラット化されたソースコードを検証し、エラートレースを作成することと、
前記作成されたエラートレースに含まれるステップに対し、条件演算子による演算を含む場合には、前記条件演算子による演算を含まない形式に簡略化することと
を含む
エラートレース簡略化方法。
Flatten the input source code,
Verifying the flattened source code and creating an error trace;
An error trace simplification method comprising: simplifying the step included in the created error trace to a format that does not include the operation by the conditional operator when the operation by the conditional operator is included.
請求項5に記載のエラートレース簡略化方法であって、
前記条件演算子による演算は、
前記ステップにおける変数の値に基づいて、真であるか偽であるかを判定するための条件式と、
前記条件式が真の場合に選択される真の式と、
前記条件式が偽の場合に選択される偽の式と
を含む
エラートレース簡略化方法。
An error tracing simplification method according to claim 5,
The operation by the conditional operator is
A conditional expression for determining whether it is true or false based on the value of the variable in the step;
A true expression selected when the conditional expression is true;
An error trace simplification method including a false expression selected when the conditional expression is false.
請求項6に記載のエラートレース簡略化方法であって、
前記ステップにおける変数の値に基づいて、前記条件演算子による演算における条件式が真であるか偽であるかを判定し、判定結果に応じて、前記条件演算子による演算を、前記条件演算子による演算における真の式と偽の式とのいずれかに置き換えること
を更に含む
エラートレース簡略化方法。
The error trace simplification method according to claim 6,
Based on the value of the variable in the step, it is determined whether a conditional expression in the calculation by the conditional operator is true or false, and the calculation by the conditional operator is performed according to the determination result. A method for simplifying error tracing, further comprising replacing one of a true expression and a false expression in an operation by.
請求項7に記載のエラートレース簡略化方法であって、
前記置き換えられた後の演算が前記条件演算子による演算である場合、前記置き換えられた後の演算に対し、前記ステップにおける変数の値に基づいて、前記置き換えられた後の演算における条件式が真であるか偽であるかを判定し、判定結果に応じて、前記置き換えられた後の演算を、前記置き換えられた後の演算における真の式と偽の式とのいずれかに置き換えること
を更に含む
エラートレース簡略化方法。
The error trace simplification method according to claim 7,
When the replaced operation is an operation based on the conditional operator, the conditional expression in the replaced operation is true based on the value of the variable in the step with respect to the replaced operation. Or replacing the operation after the replacement with either a true expression or a false expression in the operation after the replacement according to the determination result. Including error trace simplification method.
入力されたソースコードをフラット化することと、
前記フラット化されたソースコードを検証し、エラートレースを作成することと、
前記作成されたエラートレースに含まれるステップに対し、条件演算子による演算を含む場合には、前記条件演算子による演算を含まない形式に簡略化することと
をコンピュータに実行させるための
プログラム。
Flatten the input source code,
Verifying the flattened source code and creating an error trace;
A program for causing a computer to execute simplification to a format that does not include an operation by a conditional operator when an operation by a conditional operator is included in the steps included in the created error trace.
請求項9に記載のプログラムであって、
前記条件演算子による演算は、
前記ステップにおける変数の値に基づいて、真であるか偽であるかを判定するための条件式と、
前記条件式が真の場合に選択される真の式と、
前記条件式が偽の場合に選択される偽の式と
を含む
プログラム。
The program according to claim 9, wherein
The operation by the conditional operator is
A conditional expression for determining whether it is true or false based on the value of the variable in the step;
A true expression selected when the conditional expression is true;
A program including a false expression selected when the conditional expression is false.
請求項10に記載のプログラムであって、
前記ステップにおける変数の値に基づいて、前記条件演算子による演算における条件式が真であるか偽であるかを判定し、判定結果に応じて、前記条件演算子による演算を、前記条件演算子による演算における真の式と偽の式とのいずれかに置き換えること
を更にコンピュータに実行させるための
プログラム。
The program according to claim 10,
Based on the value of the variable in the step, it is determined whether a conditional expression in the calculation by the conditional operator is true or false, and the calculation by the conditional operator is performed according to the determination result. A program that further causes a computer to execute replacement with either a true expression or a false expression in an operation by.
請求項11に記載のプログラムであって、
前記置き換えられた後の演算が前記条件演算子による演算である場合、前記置き換えられた後の演算に対し、前記ステップにおける変数の値に基づいて、前記置き換えられた後の演算における条件式が真であるか偽であるかを判定し、判定結果に応じて、前記置き換えられた後の演算を、前記置き換えられた後の演算における真の式と偽の式とのいずれかに置き換えること
を更にコンピュータに実行させるための
プログラム。
The program according to claim 11,
When the replaced operation is an operation based on the conditional operator, the conditional expression in the replaced operation is true based on the value of the variable in the step with respect to the replaced operation. Or replacing the operation after the replacement with either a true expression or a false expression in the operation after the replacement according to the determination result. A program that causes a computer to execute.
JP2008265162A 2008-10-14 2008-10-14 Error trace simplification system, error trace simplification method, and program Expired - Fee Related JP5170555B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008265162A JP5170555B2 (en) 2008-10-14 2008-10-14 Error trace simplification system, error trace simplification method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008265162A JP5170555B2 (en) 2008-10-14 2008-10-14 Error trace simplification system, error trace simplification method, and program

Publications (2)

Publication Number Publication Date
JP2010097251A JP2010097251A (en) 2010-04-30
JP5170555B2 true JP5170555B2 (en) 2013-03-27

Family

ID=42258913

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008265162A Expired - Fee Related JP5170555B2 (en) 2008-10-14 2008-10-14 Error trace simplification system, error trace simplification method, and program

Country Status (1)

Country Link
JP (1) JP5170555B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11138094B2 (en) 2020-01-10 2021-10-05 International Business Machines Corporation Creation of minimal working examples and environments for troubleshooting code issues
US11163592B2 (en) 2020-01-10 2021-11-02 International Business Machines Corporation Generation of benchmarks of applications based on performance traces

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IN2013MU03461A (en) * 2013-10-31 2015-07-17 Tata Consultancy Services Ltd
JP7256662B2 (en) * 2019-03-22 2023-04-12 三菱電機インフォメーションネットワーク株式会社 Service amount visualization system and service amount visualization program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10333943A (en) * 1997-05-27 1998-12-18 Mitsubishi Electric Corp Method and device for processing trace log of computer system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11138094B2 (en) 2020-01-10 2021-10-05 International Business Machines Corporation Creation of minimal working examples and environments for troubleshooting code issues
US11163592B2 (en) 2020-01-10 2021-11-02 International Business Machines Corporation Generation of benchmarks of applications based on performance traces

Also Published As

Publication number Publication date
JP2010097251A (en) 2010-04-30

Similar Documents

Publication Publication Date Title
JP4148527B2 (en) Functional test script generator
JP5679989B2 (en) Debug pipeline
US9424008B2 (en) API descriptions
US8701084B1 (en) Preview of auto-fix changes to software code
JP5303795B2 (en) Application analysis method, analysis system, and analysis program
US20160004579A1 (en) Method of generating automatic code for remote procedure call
JP5170555B2 (en) Error trace simplification system, error trace simplification method, and program
US20140282123A1 (en) Executable guidance experiences based on implicitly generated guidance models
KR101826828B1 (en) System and method for managing log data
JP4915362B2 (en) Annotation automatic insertion method of static verification tool
JP4929121B2 (en) Source program analysis apparatus, source program analysis method, and computer program
US20130111431A1 (en) Validation of a system model including an activity diagram
US8332204B2 (en) Instruction check program, instruction check apparatus, and I/O simulator
JP5545133B2 (en) Static analysis processing system, method, and program
JP5093508B2 (en) Loop optimization system, loop optimization method, and loop optimization program
JP5755861B2 (en) Test case generation apparatus, test case generation method, and test case generation program
JP5686686B2 (en) Program trace management apparatus, program trace management method and program
JP2005174045A (en) Source program conversion device, source program conversion method, source program conversion program and program recording medium
JP2014106770A (en) Type check device, type check method and type check program
JP2013080386A (en) Information processing device and address management method
JP7534865B2 (en) Test automation equipment
JP5365846B2 (en) Program verification apparatus, program verification method, and verification function execution program
KR101225577B1 (en) Apparatus and method for analyzing assembly language code
JP2007041777A (en) Language processing method
JP2006277560A (en) Software development support device, design document generation program and design document generating method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110803

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121121

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121219

LAPS Cancellation because of no payment of annual fees