JP2010097328A - Loop optimization system, loop optimization method, and program for loop optimization - Google Patents

Loop optimization system, loop optimization method, and program for loop optimization Download PDF

Info

Publication number
JP2010097328A
JP2010097328A JP2008266347A JP2008266347A JP2010097328A JP 2010097328 A JP2010097328 A JP 2010097328A JP 2008266347 A JP2008266347 A JP 2008266347A JP 2008266347 A JP2008266347 A JP 2008266347A JP 2010097328 A JP2010097328 A JP 2010097328A
Authority
JP
Japan
Prior art keywords
model
cfg
loop
variable
subgraph
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008266347A
Other languages
Japanese (ja)
Other versions
JP5093508B2 (en
Inventor
Masaya Obata
雅哉 小畑
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 JP2008266347A priority Critical patent/JP5093508B2/en
Publication of JP2010097328A publication Critical patent/JP2010097328A/en
Application granted granted Critical
Publication of JP5093508B2 publication Critical patent/JP5093508B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a loop optimization method in model inspection in a loop. <P>SOLUTION: This loop optimization system for performing processing to verify a source code by using a model inspection technology is provided with: a model inspection control part 10 for automatically generating a model from a source code, and for verifying the source code based on model inspection; and an arbitrary value loop control part 30 for moving the substitution formula of variables including an arbitrary value existing in the loop in the model to the outside of the loop, and for shortening the verification time, wherein a verification time for inspection duplicated due to repetition among model inspection in the loop is shortened. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、ループ最適化システムに関し、特にループ内のモデル検査におけるループ最適化システムに関する。   The present invention relates to a loop optimization system, and more particularly to a loop optimization system in model checking in a loop.

C言語等のプログラミング言語で記述されたソースコードを、形式検証の一手法であるモデル検査法で検証する方法として、従来からいくつかの方法が知られている。   Conventionally, several methods are known as methods for verifying a source code described in a programming language such as C language by a model checking method which is one method of formal verification.

一般に、ソースコードから自動的にモデルを構築しモデル検査による検証を行う場合、生成されるモデルの状態数が膨大になり、計算量が非常に多くなるため、モデル化の過程で様々な最適化を行う必要がある。制御構造や処理の流れを表したコントロールフローグラフ(CFG)と呼ばれる中間モデルの生成過程においても、複数の最適化が行われるが、ループ制御構造の解析においては、「ループ不変計算除去」等のコンパイラ最適化技法による最適化処理しか行われていなかった。   In general, when a model is automatically built from source code and verified by model checking, the number of states of the generated model becomes enormous and the amount of calculation becomes very large, so various optimizations are made during the modeling process. Need to do. In the process of generating an intermediate model called a control flow graph (CFG) that represents the control structure and the flow of processing, multiple optimizations are performed, but in the analysis of the loop control structure, "loop invariant calculation removal" etc. Only the optimization processing by the compiler optimization technique was performed.

ここで、「ループ不変計算除去」とは、ループ制御変数の影響を受けないループ不変計算の検出、及びコード移動の処理により、ループ内変数の計算処理をループ外に移動することによって、ループ内での計算処理量を軽減し、検証時間を短縮するというものである。   Here, “loop invariant calculation elimination” means that the loop invariant calculation that is not affected by the loop control variable is detected and the code movement process moves the calculation process of the variable in the loop to the outside of the loop. This reduces the amount of calculation processing and reduces the verification time.

モデル検査において、ループ内に任意値を含む計算処理がある場合に、その計算処理がコンパイラ最適化の対象とならない場合は、モデル検査の過程において、ループによる繰り返し処理の回数分、任意値が取り得る値の全てに対して網羅的な検証が行われるため、計算量が非常に大きくなり、結果として検証時間が長くなるという課題があった。   In model checking, if there is a calculation process that includes an arbitrary value in a loop and that calculation process is not subject to compiler optimization, the model check will take an arbitrary value for the number of iterations in the loop. Since exhaustive verification is performed for all of the obtained values, the amount of calculation becomes very large, and as a result, there is a problem that the verification time becomes long.

ここで、「任意値」とは、モデル検査の処理において、与えられた条件からは特定の値をとることが計算できない変数や、処理の実体が定義されていない関数を、生成されたモデルの中で特別に表現するための要素を意味する。   Here, “arbitrary value” refers to a variable that cannot be calculated from a given condition in a model checking process, or a function that does not define the entity of the process. Means an element that expresses it specially.

モデル検査においては、式の中で任意値が参照されると、取り得る値の全ての状態が存在する可能性があるものとして、虱潰し(網羅的)に全ての状態について検査を行う。例えば、任意値が8ビット符号あり整数型である場合には、「−128、−127、…、0、…、127」(−128〜127)のいずれの値も取り得る可能性があるとして、全ての場合について検査を行う。   In model checking, if an arbitrary value is referenced in an expression, all states of possible values may exist, and all states are checked in a collapsed manner (exhaustively). For example, if the arbitrary value is an 8-bit signed integer type, any value of “−128, −127,..., 0,... 127” (−128 to 127) may be taken. In all cases, inspection is performed.

関連する技術として、特表2007−528059号公報(特許文献1)にソフトウェアのモデル化、抽象、及び分析のためのシステムと方法が記載されている。
この関連技術は、ソースコード検証においてソースコードをモデル検査可能なモデルに変換し検証を行う技術である。しかし、この関連技術では、ループ内に任意値を含む変数の計算処理があっても特別な処理は行わず、そのままモデル検査を行っている。このため、ループ内で繰り返し任意値に関わる検証を行い、重複する部分の検査の検証時間が必要となっていた。
As a related technique, Japanese Patent Publication No. 2007-528059 (Patent Document 1) describes a system and method for software modeling, abstraction, and analysis.
This related technology is a technology for performing verification by converting source code into a model that can be model-checked in source code verification. However, in this related technique, even if there is a calculation process of a variable including an arbitrary value in the loop, no special process is performed and the model check is performed as it is. For this reason, verification related to an arbitrary value is repeatedly performed in the loop, and verification time for inspection of overlapping portions is required.

特表2007−528059号公報Special table 2007-528059 gazette

モデル検査技法を利用してソースコードの検証を行う処理において、モデル検査を実施する前に任意値に関連する計算処理を削除し、ループ外で任意値を代入する処理を追加する。   In the process of verifying the source code using the model checking technique, the calculation process related to the arbitrary value is deleted before the model checking is performed, and the process of substituting the arbitrary value outside the loop is added.

本発明のループ最適化システムは、ソースコードから自動的にモデルを生成し、ソースコードに対し、モデル検査による検証を行うモデル検査制御部と、モデル中のループ内に存在する任意値を含む変数の代入式をループ外に移動し、検証時間の短縮を図る任意値ループ制御部とを具備する。   The loop optimization system according to the present invention automatically generates a model from source code, performs model check control on the source code by model checking, and a variable including an arbitrary value existing in a loop in the model. And an arbitrary value loop control unit for reducing the verification time.

本発明のループ最適化方法は、ソースコードから自動的にモデルを生成し、ソースコードに対し、モデル検査による検証を行うステップと、モデルの生成の過程で、モデル中のループ内に存在する任意値を含む変数の代入式をループ外に移動し、検証時間の短縮を図るステップとを含む。   The loop optimization method of the present invention automatically generates a model from source code, performs verification by model checking on the source code, and any model existing in the loop in the model during the process of generating the model. Moving the substitution expression of the variable including the value out of the loop to shorten the verification time.

本発明のプログラムは、ソースコードから自動的にモデルを生成し、ソースコードに対し、モデル検査による検証を行うステップと、モデルの生成の過程で、モデル中のループ内に存在する任意値を含む変数の代入式をループ外に移動し、検証時間の短縮を図るステップとをコンピュータに実行させるためのプログラムである。   The program of the present invention includes a step of automatically generating a model from source code, performing verification by model checking on the source code, and an arbitrary value existing in a loop in the model in the process of generating the model. This is a program for causing a computer to execute a step of reducing a verification time by moving a variable substitution expression out of a loop.

ループ内のモデル検査のうち、繰り返しで重複する検査分の検証時間を短縮する。   Shorten the verification time for repeated inspections of model checks in the loop.

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

図1を参照すると、本発明のループ最適化システムは、モデル検査制御部10と、記憶部20と、任意値ループ制御部30を備える。   Referring to FIG. 1, the loop optimization system of the present invention includes a model checking control unit 10, a storage unit 20, and an arbitrary value loop control unit 30.

本発明のループ最適化システムの例として、PC(パソコン)、シンクライアント端末/サーバ、ワークステーション、メインフレーム、スーパーコンピュータ等のコンピュータや、携帯電話機、PDA(Personal Digital Assistants)、カーナビ(カーナビゲーションシステム)、携帯ゲーム機、又は同様の無線通信機能を有する電子機器等の携帯端末が考えられる。但し、実際には、これらの例に限定されない。   Examples of the loop optimization system of the present invention include PCs (personal computers), thin client terminals / servers, workstations, mainframes, supercomputers and other computers, mobile phones, PDAs (Personal Digital Assistants), car navigation systems (car navigation systems) ), Portable terminals such as portable game machines or electronic devices having a similar wireless communication function. However, actually, it is not limited to these examples.

モデル検査制御部10、及び任意値ループ制御部30の例として、CPU(Central Processing Unit)やマイクロプロセッサ(microprocessor)等の処理装置、又は同様の機能を有する半導体集積回路(Integrated Circuit:IC)等が考えられる。なお、モデル検査制御部10、及び任意値ループ制御部30は、各々の機能をコンピュータに実行させるためのプログラムでも良い。但し、実際には、これらの例に限定されない。   Examples of the model checking control unit 10 and the arbitrary value loop control unit 30 include a processing device such as a CPU (Central Processing Unit) and a microprocessor, or a semiconductor integrated circuit (Integrated Circuit: IC) having a similar function. Can be considered. The model checking control unit 10 and the arbitrary value loop control unit 30 may be programs for causing a computer to execute each function. However, actually, it is not limited to these examples.

記憶部20の例として、メモリ等の半導体記憶装置、ハードディスク等の外部記憶装置(ストレージ)、又は、記憶媒体(メディア)等が考えられる。また、記憶部20は、中継機器や周辺機器でも良い。更に、記憶部20は、複数のモデル検査制御部10や任意値ループ制御部30により共有されていても良い。但し、実際には、これらの例に限定されない。   Examples of the storage unit 20 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 unit 20 may be a relay device or a peripheral device. Further, the storage unit 20 may be shared by a plurality of model checking control units 10 and arbitrary value loop control units 30. However, actually, it is not limited to these examples.

また、モデル検査制御部10、記憶部20、及び任意値ループ制御部30の各々は、物理的に独立したコンピュータでも良い。例えば、モデル検査制御部10を端末とし、記憶部20や任意値ループ制御部30をサーバとするネットワークシステムが考えられる。但し、実際には、これらの例に限定されない。   Each of the model checking control unit 10, the storage unit 20, and the arbitrary value loop control unit 30 may be a physically independent computer. For example, a network system in which the model checking control unit 10 is a terminal and the storage unit 20 or the arbitrary value loop control unit 30 is a server can be considered. However, actually, it is not limited to these examples.

モデル検査制御部10は、CFGモデル作成部11と、検査モデル作成部12と、モデル検査実行部13と、検査結果出力部14を含む。   The model check control unit 10 includes a CFG model creation unit 11, a check model creation unit 12, a model check execution unit 13, and a check result output unit 14.

記憶部20は、変換前CFGモデル記憶部21と、変換後CFGモデル記憶部22と、検査モデル記憶部23を含む。   The storage unit 20 includes a pre-conversion CFG model storage unit 21, a post-conversion CFG model storage unit 22, and an inspection model storage unit 23.

任意値ループ制御部30は、ループ検出部31と、データ依存グラフ作成部32と、ループ外利用変数マーク部33と、部分グラフ検出部34と、CFGモデル変換部35を含む。   The arbitrary value loop control unit 30 includes a loop detection unit 31, a data dependence graph creation unit 32, an out-loop use variable mark unit 33, a subgraph detection unit 34, and a CFG model conversion unit 35.

CFGモデル作成部11は、検査仕様1と検査対象コード2を読み込み、コンパイラ最適化処理を実施した上でCFGモデルを作成し、記憶部20の変換前CFGモデル記憶部21に出力する。なお、検査仕様1は、モデル検査法を定義した情報である。検査対象コード2は、検査対象となるソースコードである。   The CFG model creation unit 11 reads the inspection specification 1 and the inspection target code 2, performs compiler optimization processing, creates a CFG model, and outputs the CFG model to the pre-conversion CFG model storage unit 21 of the storage unit 20. The inspection specification 1 is information defining a model inspection method. The inspection target code 2 is a source code to be inspected.

検査モデル作成部12は、記憶部20の変換後CFGモデル記憶部21からCFGモデルを読み込み、計算木論理(Computation Tree Logic:CTL)を用いた記号モデル検査法に基づいて検査モデルを作成し、記憶部20の検査モデル記憶部23に出力する。   The inspection model creation unit 12 reads a CFG model from the converted CFG model storage unit 21 of the storage unit 20, creates an inspection model based on a symbolic model inspection method using computation tree logic (CTL), The data is output to the inspection model storage unit 23 of the storage unit 20.

モデル検査実行部13は、記憶部20の検査モデル記憶部23から検査モデルを読み込み、上記の計算木論理(CTL)を用いた記号モデル検査法に基づいて検査を実行する。   The model checking execution unit 13 reads the checking model from the checking model storage unit 23 of the storage unit 20 and executes checking based on the symbol model checking method using the above-described calculation tree logic (CTL).

検査結果出力部14は、記号モデル検査実行部12が実行した検査の結果を検査結果3に出力する。   The inspection result output unit 14 outputs the result of the inspection performed by the symbol model inspection execution unit 12 to the inspection result 3.

変換前CFGモデル記憶部21は、CFGモデル作成部11から変換前のCFGモデルを取得して保持し、変換前のCFGモデルをループ検出部31に提供する。   The pre-conversion CFG model storage unit 21 acquires and holds the pre-conversion CFG model from the CFG model creation unit 11, and provides the pre-conversion CFG model to the loop detection unit 31.

変換後CFGモデル記憶部22は、CFGモデル変換部35から変換後のCFGモデルを取得して保持し、変換後のCFGモデルを検査モデル作成部12に提供する。   The post-conversion CFG model storage unit 22 acquires and stores the post-conversion CFG model from the CFG model conversion unit 35, and provides the post-conversion CFG model to the inspection model creation unit 12.

検査モデル記憶部23は、検査モデル作成部12から検査モデルを取得して保持し、検査モデルをモデル検査実行部13に提供する。   The inspection model storage unit 23 acquires and holds an inspection model from the inspection model creation unit 12 and provides the inspection model to the model inspection execution unit 13.

ループ検出部31は、記憶部20の変換前CFGモデル記憶部21に保持されたCFGモデルを読み込み、CFGモデル中のループ処理を検出する。   The loop detection unit 31 reads the CFG model held in the pre-conversion CFG model storage unit 21 of the storage unit 20 and detects loop processing in the CFG model.

データ依存グラフ作成部32は、データ依存グラフ作成法に基づいて、ループ検出部31が検出したループ中に出現する値のデータ依存グラフを作成する。   The data dependence graph creation unit 32 creates a data dependence graph of values appearing in the loop detected by the loop detection unit 31 based on the data dependence graph creation method.

ループ外利用変数マーク部33は、データ依存グラフ作成部32が作成したデータ依存グラフ中の各変数に対し、その変数(データ依存グラフ中の各変数)がループ以降で利用されていればマークを付ける。すなわち、ループ外利用変数マーク部33は、データ依存グラフ中の各変数のうち、ループ以降で利用されている変数にマークする。   The out-of-loop use variable mark unit 33 marks each variable in the data dependence graph created by the data dependence graph creation unit 32 if the variable (each variable in the data dependence graph) is used after the loop. wear. That is, the out-of-loop use variable mark unit 33 marks variables used after the loop among the variables in the data dependence graph.

部分グラフ検出部34は、データ依存グラフ作成部32が作成したデータ依存グラフの中から、任意値を要素に含み、ループ外利用変数マーク部33がマークした変数をただ一つ含む部分グラフを検出する。   The subgraph detection unit 34 detects a subgraph that includes an arbitrary value as an element and includes only one variable marked by the out-of-loop use variable mark unit 33 from the data dependency graph generated by the data dependency graph generation unit 32. To do.

CFGモデル変換部35は、部分グラフ検出部34が検出した部分グラフに含まれる変数の計算処理に対応するCFGモデル要素をCFGモデルから削除し、当該ループの直後に、部分グラフ検出部34が検出した部分グラフにただ一つ含まれる、ループ外利用変数マーク部33がマークした変数に対して、任意値を代入する計算処理に対応するCFGモデル要素をCFGモデルに追加する。   The CFG model conversion unit 35 deletes the CFG model element corresponding to the calculation processing of the variable included in the subgraph detected by the subgraph detection unit 34 from the CFG model, and the subgraph detection unit 34 detects immediately after the loop. A CFG model element corresponding to a calculation process for substituting an arbitrary value is added to the CFG model for the variable marked by the out-of-loop use variable mark unit 33 that is included in only one subgraph.

次に、図2のフローチャートを参照して、本発明のループ最適化システムの動作について詳細に説明する。   Next, the operation of the loop optimization system of the present invention will be described in detail with reference to the flowchart of FIG.

(1)ステップS101
まず、CFGモデル作成部11は、検査対象コード2をコンパイラ最適化処理を施した上で、検査仕様1を踏まえてCFGモデルを作成し、変換前CFGモデル記憶部21に記憶する。
(1) Step S101
First, the CFG model creation unit 11 performs compiler optimization processing on the inspection target code 2, creates a CFG model based on the inspection specification 1, and stores it in the pre-conversion CFG model storage unit 21.

(2)ステップS102
次に、ループ検出部31は、変換前CFGモデル記憶部21に記憶されたCFGモデルの中に処理対象のループがあるか確認する。ここでは、ループ検出部31は、変換前CFGモデル記憶部21に記憶されたCFGモデルの中にある処理対象のループを検出する。処理対象のループとは、以降のステップS103からステップS107までの処理を実施していない(未実施の)ループである。
(2) Step S102
Next, the loop detection unit 31 confirms whether there is a loop to be processed in the CFG model stored in the pre-conversion CFG model storage unit 21. Here, the loop detection unit 31 detects a loop to be processed in the CFG model stored in the pre-conversion CFG model storage unit 21. The loop to be processed is a loop in which the subsequent processing from step S103 to step S107 is not performed (not performed).

(3)ステップS103
データ依存グラフ作成部32は、ループ検出部31により処理対象のループが検出された場合、ループ検出部31により検出されたループ中に出現する値のデータ依存グラフを作成する。
(3) Step S103
When the loop detection unit 31 detects a loop to be processed, the data dependency graph creation unit 32 creates a data dependency graph of values that appear in the loop detected by the loop detection unit 31.

(4)ステップS104
次に、ループ外利用変数マーク部33は、データ依存グラフ作成部32が作成したデータ依存グラフ中の各変数に対し、その変数がループ以降で利用されていればマークを付ける。
(4) Step S104
Next, the out-of-loop use variable mark unit 33 marks each variable in the data dependence graph created by the data dependence graph creation unit 32 if the variable is used after the loop.

(5)ステップS105
次に、部分グラフ検出部34は、データ依存グラフ作成部32が作成したデータ依存グラフの中から、任意値を要素に含み、ループ外利用変数マーク部33がマークした変数をただ一つ含む部分グラフが存在するか確認する。ここでは、部分グラフ検出部34は、データ依存グラフ作成部32が作成したデータ依存グラフの中から、任意値を要素に含み、ループ外利用変数マーク部33がマークした変数をただ一つ含む部分グラフを検出する。
(5) Step S105
Next, the partial graph detection unit 34 includes an arbitrary value as an element from the data dependency graph generated by the data dependency graph generation unit 32 and includes only one variable marked by the out-of-loop use variable mark unit 33. Check if the graph exists. Here, the partial graph detection unit 34 includes an arbitrary value as an element from the data dependency graph generated by the data dependency graph generation unit 32 and includes only one variable marked by the out-of-loop use variable mark unit 33. Detect the graph.

(6)ステップS106
CFGモデル変換部35は、任意値を要素に含み、ループ外利用変数マーク部33がマークした変数をただ一つ含む部分グラフが存在する場合、すなわち、部分グラフ検出部34により該当する部分グラフが検出された場合、部分グラフ検出部34により検出された部分グラフに含まれる変数の計算処理に対応するCFGモデル要素をCFGモデルから削除する。
(6) Step S106
The CFG model conversion unit 35 includes an arbitrary value as an element, and when there is a subgraph including only one variable marked by the out-of-loop use variable mark unit 33, that is, the subgraph detection unit 34 determines that the corresponding subgraph is If detected, the CFG model element corresponding to the calculation processing of the variable included in the subgraph detected by the subgraph detection unit 34 is deleted from the CFG model.

(7)ステップS107
更に、CFGモデル変換部35は、当該ループの直後に、部分グラフ検出部34が検出した部分グラフにただ一つ含まれる、ループ外利用変数マーク部33がマークした変数に対して、任意値を代入する計算処理に対応するCFGモデル要素をCFGモデルに追加する。
(7) Step S107
Furthermore, immediately after the loop, the CFG model conversion unit 35 assigns an arbitrary value to the variable marked by the out-of-loop use variable mark unit 33 that is included in only one subgraph detected by the subgraph detection unit 34. A CFG model element corresponding to the calculation process to be substituted is added to the CFG model.

(8)ステップS108
上記の(ステップS102からステップS107までの)処理を処理対象のループがなくなるまで実施した後、検査モデル作成部12は、一連の処理で変換されたCFGモデルを記憶する変換後CFGモデル記憶部22のCFGモデルから検査モデルを作成し、検査モデル記憶部23に記憶する。検査モデル作成処理は、従来技術で行うようにしても良い。
(8) Step S108
After performing the above processing (from step S102 to step S107) until there is no loop to be processed, the inspection model creation unit 12 stores the CFG model converted by the series of processing, and stores the converted CFG model storage unit 22. An inspection model is created from the CFG model and stored in the inspection model storage unit 23. The inspection model creation process may be performed by a conventional technique.

(9)ステップS109
モデル検査実行部13は、検査モデル記憶部23に記憶された検査モデルを読み込み、モデル検査を実施する。
(9) Step S109
The model checking execution unit 13 reads the checking model stored in the checking model storage unit 23 and performs model checking.

(10)ステップS110
最後に、検査結果出力部14は、結果を検査結果3に出力する。
(10) Step S110
Finally, the inspection result output unit 14 outputs the result to the inspection result 3.

以下に、任意値ループ制御部30の動作を具体的に説明する。   The operation of the arbitrary value loop control unit 30 will be specifically described below.

まず、図3A,図3Bを参照して、CFGモデルが変換される場合の例を説明する。ここでは、図3Aは、CFGモデルの変換前の手順を示す。図3Bは、CFGモデルの変換後の手順を示す。   First, an example in which a CFG model is converted will be described with reference to FIGS. 3A and 3B. Here, FIG. 3A shows a procedure before conversion of the CFG model. FIG. 3B shows the procedure after conversion of the CFG model.

ループ検出部31は、変換前のCFGモデルを参照し、図3Aに示すように、「if (i < 10)」から「t = f()」へのループを検出する。   The loop detection unit 31 refers to the CFG model before conversion, and detects a loop from “if (i <10)” to “t = f ()” as shown in FIG. 3A.

データ依存グラフ作成部32は、当該ループ中に出現する値のデータ依存グラフを作成する。   The data dependence graph creation unit 32 creates a data dependence graph of values appearing in the loop.

ループ外利用変数マーク部33は、データ依存グラフ作成部32が作成したデータ依存グラフ中の各変数に対し、その変数がループ以降で利用されていればマークを付ける。この例では、図4に示すように、「x」と「y」がループ以降で利用されているとし、「*」マークを付ける。   The out-of-loop use variable mark unit 33 marks each variable in the data dependence graph created by the data dependence graph creation unit 32 if the variable is used after the loop. In this example, as shown in FIG. 4, it is assumed that “x” and “y” are used after the loop, and the “*” mark is given.

部分グラフ検出部34は、データ依存グラフの中で、任意値を持つ「f()」を要素に含み、図4の左側(「x」側)に示すような、ループ外利用変数マーク部33がマークした変数「x」をただ一つ含む部分グラフを検出する。   The subgraph detection unit 34 includes “f ()” having an arbitrary value in the data dependence graph as an element, and is used outside the loop as shown in the left side (“x” side) of FIG. 4. Find the subgraph containing only one variable “x” marked by.

CFGモデル変換部35は、図3Bに示すように、部分グラフ作成部34が検出した部分グラフに含まれる変数の計算処理に対応するCFGモデル要素をCFGから削除し、当該ループの直後に、部分グラフ検出部34が検出した部分グラフにただ一つ含まれる、ループ外利用変数マーク部33がマークした変数「x」に対して、任意値を代入する計算処理に対応するCFGモデル要素をCFGモデルに追加する。CFGモデル要素を追加されたCFGモデルが、変換後のCFGモデルである。   As shown in FIG. 3B, the CFG model conversion unit 35 deletes the CFG model element corresponding to the calculation processing of the variable included in the partial graph detected by the partial graph creation unit 34 from the CFG, and immediately after the loop, A CFG model element corresponding to a calculation process for substituting an arbitrary value for the variable “x” marked by the out-of-loop use variable mark unit 33 that is included in only one subgraph detected by the graph detection unit 34. Add to. The CFG model to which the CFG model element is added is the converted CFG model.

次に、図5を参照して、CFGモデルが変換されない場合の例を説明する。   Next, an example in which the CFG model is not converted will be described with reference to FIG.

ループ検出部31は、「if (i < 10)」から「t = f()」へのループを検出する。このとき、「x = t + i」と「y = t」という計算処理があり、「t」が「x」と「y」の両方と依存関係がある点が図3との違いである。   The loop detection unit 31 detects a loop from “if (i <10)” to “t = f ()”. At this time, there is a calculation process of “x = t + i” and “y = t”, and “t” has a dependency relationship with both “x” and “y”.

データ依存グラフ作成部32は、当該ループ中に出現する値のデータ依存グラフを作成する。ループ外利用変数マーク部33は、データ依存グラフ作成部32が作成したデータ依存グラフ中の各変数に対し、その変数がループ以降で利用されていればマークを付ける。この例では、図6に示すように、「x」と「y」がループ以降で利用されているとし、「*」マークを付ける。   The data dependence graph creation unit 32 creates a data dependence graph of values appearing in the loop. The out-of-loop use variable mark unit 33 marks each variable in the data dependence graph created by the data dependence graph creation unit 32 if the variable is used after the loop. In this example, as shown in FIG. 6, it is assumed that “x” and “y” are used after the loop, and the “*” mark is given.

部分グラフ検出部34は、データ依存グラフの中で、任意値を持つ「f()」を要素に含み、ループ外利用変数マーク部33がマークした変数をただ一つ含む部分グラフを検出しようとするが、この部分グラフ中には「x」と「y」の二つが含まれるので条件に合致しない。従って、この部分グラフに対しては、CFGモデルの変換は行われない。すなわち、部分グラフ検出部34は、データ依存グラフの中で、ループ外利用変数マーク部33がマークした変数が二つ以上含まれる部分グラフに対しては、CFGモデルの変換を制限する。この場合、部分グラフ検出部34は、CFGモデル変換部35の動作を制限する。CFGモデル変換部35は、CFGモデルを変更せずに変換後CFGモデル記憶部22に出力する。   The subgraph detection unit 34 attempts to detect a subgraph that includes “f ()” having an arbitrary value as an element in the data dependence graph and includes only one variable marked by the outside loop use variable mark unit 33. However, since this subgraph includes two of “x” and “y”, the condition does not match. Therefore, the CFG model is not converted for this subgraph. That is, the subgraph detection unit 34 restricts the conversion of the CFG model for a subgraph including two or more variables marked by the out-of-loop use variable mark unit 33 in the data dependence graph. In this case, the partial graph detection unit 34 restricts the operation of the CFG model conversion unit 35. The CFG model conversion unit 35 outputs the converted CFG model to the converted CFG model storage unit 22 without changing the CFG model.

もし、この判定を行わなかった場合、ループ内ならびにループから出た後に保持されているべき「x = y + i」(ループから出た後は、「i」はループの最後に使用された値(図5の例では、i=9)となる)という関係が成立しなくなってしまう。従って、このように部分グラフの中に複数のマークされた変数がある場合には、CFGモデルを変換することはできない。   If this determination is not made, “x = y + i” should be retained in the loop and after exiting the loop (after exiting the loop, “i” is the value used at the end of the loop. (In the example of FIG. 5, i = 9)) is not established. Therefore, when there are a plurality of marked variables in the subgraph, the CFG model cannot be converted.

以上のように、本発明では、モデル検査技法を利用してソースコードの検証を行う処理において、モデル生成の過程で、ループ内に存在する任意値を含む変数の代入式をループ外に移動することにより、検証時間を短縮する。   As described above, according to the present invention, in the process of verifying the source code using the model checking technique, the assignment expression of the variable including the arbitrary value existing in the loop is moved out of the loop in the process of generating the model. This shortens the verification time.

本発明のループ最適化システムは、検査仕様と、検査対象コードと、検査結果と、モデル検査制御部と、記憶部と、任意値ループ制御部を含む。ここで、モデル検査制御部は、コンパイラ最適化処理、及び計算木論理(CTL)を用いた記号モデル検査法等の従来技術で構成するようにしても良い。   The loop optimization system of the present invention includes an inspection specification, an inspection object code, an inspection result, a model inspection control unit, a storage unit, and an arbitrary value loop control unit. Here, the model check control unit may be configured by a conventional technique such as a compiler optimization process and a symbol model check method using calculation tree logic (CTL).

本発明の効果は、ループ内のモデル検査の検証時間を短縮できることにある。その理由は、任意値ループ制御部30により、ループ内に存在する、任意値を含み、ループ内の他の計算処理とは独立した計算処理をループ外に移動するためである。   The effect of the present invention is that the verification time of model checking in a loop can be shortened. The reason is that the arbitrary value loop control unit 30 moves the calculation process including the arbitrary value existing in the loop and independent of other calculation processes in the loop to the outside of the loop.

例えば、従来のモデル検査では、ループ内に任意値が存在した場合、ループの各回において、任意値をしらみつぶしに全ての状態について検査を行う。従って、図3の変換前の例の場合、第1回目のループの検査で変数tが表せる最小値から最大値までの場合が生成されて検査され、第2回目のループの検査で、先に生成された場合のそれぞれから、更に変数tが表せる最小値から最大値までの場合が生成されて検査される。従って、第9回目までに生成される場合の数は、最小値から最大値までの場合の数の9乗となる。   For example, in the conventional model check, when an arbitrary value exists in a loop, the check is performed for all the states in every round of the arbitrary value. Therefore, in the case of the example before the conversion in FIG. 3, the case from the minimum value to the maximum value that can be represented by the variable t is generated and checked in the first loop check, and the first loop check first. From each of the generated cases, cases from the minimum value to the maximum value that can be expressed by the variable t are further generated and inspected. Accordingly, the number generated by the ninth time is the ninth power of the number from the minimum value to the maximum value.

これに対し、本発明では、任意値の計算処理をループ外に移動するため、ループ後に最小値から最大値までの場合の数の検査を行うだけで良い。この場合の数の差が計算量に影響し、検証時間を短くするという効果を持つ。   On the other hand, in the present invention, since the calculation process of an arbitrary value is moved out of the loop, it is only necessary to check the number of cases from the minimum value to the maximum value after the loop. In this case, the difference in the number affects the calculation amount, and the verification time is shortened.

任意値は「取り得る値の全ての状態」を意味するため、任意値に対する計算処理の結果は、任意値の状態に含まれる。従って、任意値を持つ場合の検査を行えば、ある変数の全ての場合の検査を行ったことに相当する。   Since the arbitrary value means “all states of possible values”, the result of the calculation process for the arbitrary value is included in the state of the arbitrary value. Accordingly, if the inspection is performed when there is an arbitrary value, it corresponds to the inspection performed for all cases of a certain variable.

本発明によれば、モデル検査を利用したソースコードの検証ツールの処理時間の効率化といった用途に適用できる。   INDUSTRIAL APPLICABILITY According to the present invention, the present invention can be applied to uses such as improving the processing time of a source code verification tool using model checking.

以上、本発明の実施形態を詳述してきたが、実際には上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の変更があっても本発明に含まれる。   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 a loop optimization system of the present invention. 図2は、本発明のループ最適化システムの動作を示すフローチャートである。FIG. 2 is a flowchart showing the operation of the loop optimization system of the present invention. 図3Aは、CFGモデルが変換される場合の変換前の手順を示す図である。FIG. 3A is a diagram illustrating a procedure before conversion when a CFG model is converted. 図3Bは、CFGモデルが変換される場合の変換後の手順を示す図である。FIG. 3B is a diagram illustrating a procedure after conversion when a CFG model is converted. 図4は、CFGモデルが変換される場合のデータ依存グラフの例を示す図である。FIG. 4 is a diagram illustrating an example of a data dependence graph when the CFG model is converted. 図5は、CFGモデルが変換されない場合の手順を示す図である。FIG. 5 is a diagram illustrating a procedure when the CFG model is not converted. 図6は、CFGモデルが変換されない場合のデータ依存グラフの例を示す図である。FIG. 6 is a diagram illustrating an example of a data dependence graph when the CFG model is not converted.

符号の説明Explanation of symbols

10…モデル検査制御部
11…CFGモデル作成部
12…検査モデル作成部
13…モデル検査実行部
14…検査結果出力部
20…記憶部
21…変換前CFGモデル記憶部
22…変換後CFGモデル記憶部
23…検査モデル記憶部
30…任意値ループ制御部
31…ループ検出部
32…データ依存グラフ作成部
33…ループ外利用変数マーク部
34…部分グラフ検出部
35…CFGモデル変換部
DESCRIPTION OF SYMBOLS 10 ... Model inspection control part 11 ... CFG model preparation part 12 ... Inspection model preparation part 13 ... Model inspection execution part 14 ... Inspection result output part 20 ... Storage part 21 ... CFG model storage part 22 before conversion CFG model storage part after conversion DESCRIPTION OF SYMBOLS 23 ... Examination model memory | storage part 30 ... Arbitrary value loop control part 31 ... Loop detection part 32 ... Data dependence graph preparation part 33 ... Out-of-loop utilization variable mark part 34 ... Subgraph detection part 35 ... CFG model conversion part

Claims (14)

ソースコードから自動的にモデルを生成し、前記ソースコードに対し、モデル検査による検証を行うモデル検査制御部と、
前記モデル中のループ内に存在する任意値を含む変数の代入式をループ外に移動し、検証時間の短縮を図る任意値ループ制御部と
を具備する
ループ最適化システム。
A model check control unit that automatically generates a model from source code and performs verification by model check on the source code;
A loop optimization system comprising: an arbitrary value loop control unit that moves an assignment expression of a variable including an arbitrary value existing in a loop in the model to the outside of the loop, and reduces a verification time.
請求項1に記載のループ最適化システムであって、
前記モデル検査制御部は、
前記ソースコード及び検査仕様を読み込み、コンパイラ最適化処理を実施した上でCFG(コントロールフローグラフ)モデルを作成し、前記任意値ループ制御部に提供するCFGモデル作成部と、
前記任意値ループ制御部から提供されたCFGモデルを読み込み、計算木論理(Computation Tree Logic:CTL)を用いた記号モデル検査法に基づいて検査モデルを作成する検査モデル作成部と、
前記検査モデルを読み込み、前記計算木論理(CTL)を用いた記号モデル検査法に基づいて検査を実行するモデル検査実行部と、
前記実行された検査の結果を出力する検査結果出力部と
を具備する
ループ最適化システム。
The loop optimization system of claim 1,
The model checking control unit
A CFG model creation unit that reads the source code and the inspection specification, performs a compiler optimization process, creates a CFG (control flow graph) model, and provides it to the arbitrary value loop control unit;
A test model creation unit that reads a CFG model provided from the arbitrary value loop control unit and creates a test model based on a symbolic model test method using computation tree logic (CTL);
A model checking execution unit that reads the checking model and executes checking based on a symbolic model checking method using the calculation tree logic (CTL);
A loop optimization system comprising: an inspection result output unit that outputs a result of the executed inspection.
請求項2に記載のループ最適化システムであって、
前記任意値ループ制御部は、
前記モデル検査制御部から提供されたCFGモデルを読み込み、前記CFGモデル中のループを検出するループ検出部と、
前記検出されたループ中に出現する値のデータ依存グラフを作成するデータ依存グラフ作成部と、
前記データ依存グラフ中の各変数のうち、前記検出されたループ以降で利用されている変数にマークするループ外利用変数マーク部と、
前記データ依存グラフの中から、前記任意値を要素に含み、前記マークされた変数を含む部分グラフを検出する部分グラフ検出部と、
前記検出された部分グラフに含まれる変数の計算処理に対応するCFGモデル要素を前記CFGモデルから削除し、前記検出されたループの直後に、前記検出された部分グラフに含まれる前記マークされた変数に対して、前記削除されたCFGモデル要素を前記CFGモデルに追加して、前記モデル検査制御部に提供するCFGモデル変換部と
を具備する
ループ最適化システム。
The loop optimization system according to claim 2, comprising:
The arbitrary value loop control unit
A loop detection unit that reads a CFG model provided from the model checking control unit and detects a loop in the CFG model;
A data dependence graph creating unit for creating a data dependence graph of values appearing in the detected loop;
Of each variable in the data dependence graph, an out-loop use variable mark part that marks a variable used after the detected loop;
A subgraph detection unit for detecting a subgraph including the arbitrary value as an element and including the marked variable from the data dependence graph;
The CFG model element corresponding to the calculation processing of the variable included in the detected subgraph is deleted from the CFG model, and the marked variable included in the detected subgraph is immediately after the detected loop. In contrast, a loop optimization system comprising: a CFG model conversion unit that adds the deleted CFG model element to the CFG model and provides the CFG model element to the model check control unit.
請求項3に記載のループ最適化システムであって、
前記CFGモデル作成部から変換前のCFGモデルを取得して保持し、前記変換前のCFGモデルを前記ループ検出部に前記提供するための変換前CFGモデル記憶部と、
前記CFGモデル変換部から変換後のCFGモデルを取得して保持し、前記変換後のCFGモデルを前記検査モデル作成部に提供するための変換後CFGモデル記憶部と、
前記検査モデル作成部から前記検査モデルを取得して保持し、前記検査モデルを前記モデル検査実行部に提供するための検査モデル記憶部と
を更に具備する
ループ最適化システム。
The loop optimization system according to claim 3,
A pre-conversion CFG model storage unit for obtaining and holding a pre-conversion CFG model from the CFG model creation unit, and providing the pre-conversion CFG model to the loop detection unit;
A converted CFG model storage unit for acquiring and holding the converted CFG model from the CFG model conversion unit and providing the converted CFG model to the inspection model creation unit;
A loop optimization system further comprising: an inspection model storage unit for acquiring and holding the inspection model from the inspection model creation unit and providing the inspection model to the model inspection execution unit.
請求項3又は4に記載のループ最適化システムであって、
前記部分グラフ検出部は、前記データ依存グラフの中から、前記任意値を含む変数の代入式を要素に含み、前記マークされた変数をただ一つ含む部分グラフを検出し、
前記CFGモデル変換部は、前記任意値を含む変数の代入式に対応するCFGモデル要素を前記CFGモデルから削除し、前記検出されたループの直後に、前記検出された部分グラフにただ一つ含まれる前記マークされた変数に対して、前記削除されたCFGモデル要素を前記CFGモデルに追加し、前記モデル検査制御部に提供する
ループ最適化システム。
The loop optimization system according to claim 3 or 4,
The subgraph detection unit includes an assignment expression of a variable including the arbitrary value as an element from the data dependence graph, and detects a subgraph including only one of the marked variables.
The CFG model conversion unit deletes the CFG model element corresponding to the substitution expression of the variable including the arbitrary value from the CFG model, and includes only one in the detected subgraph immediately after the detected loop. A loop optimization system that adds the deleted CFG model element to the CFG model for the marked variable to be provided to the model checking control unit.
請求項5に記載のループ最適化システムであって、
前記部分グラフ検出部は、前記マークされた変数が二つ以上含まれる部分グラフに対しては、前記CFGモデルの変換を制限し、
前記CFGモデル変換部は、前記CFGモデルを前記モデル検査制御部に提供する
ループ最適化システム。
The loop optimization system of claim 5,
The subgraph detection unit restricts the conversion of the CFG model for a subgraph including two or more of the marked variables.
The CFG model conversion unit provides the CFG model to the model check control unit.
ソースコードから自動的にモデルを生成し、前記ソースコードに対し、モデル検査による検証を行うステップと、
前記モデルの生成の過程で、前記モデル中のループ内に存在する任意値を含む変数の代入式をループ外に移動し、検証時間の短縮を図るステップと
を含む
ループ最適化方法。
Automatically generating a model from source code and performing verification by model checking on the source code;
A step of reducing a verification time by moving an assignment expression of a variable including an arbitrary value existing in a loop in the model in a process of generating the model to reduce a verification time.
請求項7に記載のループ最適化方法であって、
前記ソースコード及び検査仕様を読み込み、コンパイラ最適化処理を実施した上でCFG(コントロールフローグラフ)モデルを作成するステップと、
前記CFGモデルを読み込み、前記CFGモデル中のループを検出するステップと、
前記検出されたループ中に出現する値のデータ依存グラフを作成するステップと、
前記データ依存グラフ中の各変数のうち、前記検出されたループ以降で利用されている変数にマークするステップと、
前記データ依存グラフの中から、前記任意値を要素に含み、前記マークされた変数を含む部分グラフを検出するステップと、
前記検出された部分グラフに含まれる変数の計算処理に対応するCFGモデル要素を前記CFGモデルから削除し、前記検出されたループの直後に、前記検出された部分グラフに含まれる前記マークされた変数に対して、前記削除されたCFGモデル要素を前記CFGモデルに追加し、前記CFGモデルを変換するステップと
前記変換されたCFGモデルを読み込み、計算木論理(Computation Tree Logic:CTL)を用いた記号モデル検査法に基づいて検査モデルを作成するステップと、
前記検査モデルを読み込み、前記計算木論理(CTL)を用いた記号モデル検査法に基づいて検査を実行するステップと、
前記実行された検査の結果を出力するステップと
を更に含む
ループ最適化方法。
The loop optimization method according to claim 7, comprising:
Reading the source code and inspection specification, performing compiler optimization processing, and creating a CFG (control flow graph) model;
Reading the CFG model and detecting a loop in the CFG model;
Creating a data dependence graph of values appearing in the detected loop;
Marking each variable in the data dependency graph that is used after the detected loop;
Detecting a subgraph including the arbitrary value as an element and including the marked variable from the data dependence graph;
The CFG model element corresponding to the calculation processing of the variable included in the detected subgraph is deleted from the CFG model, and the marked variable included in the detected subgraph is immediately after the detected loop. In contrast, the deleted CFG model element is added to the CFG model, the CFG model is converted, and the converted CFG model is read, and a symbol using computation tree logic (CTL) is used. Creating an inspection model based on a model checking method;
Reading the check model and performing a check based on a symbolic model check method using the computational tree logic (CTL);
And outputting the result of the executed inspection. A loop optimization method.
請求項8に記載のループ最適化方法であって、
前記データ依存グラフの中から、前記任意値を含む変数の代入式を要素に含み、前記マークされた変数をただ一つ含む部分グラフを検出するステップと、
前記任意値を含む変数の代入式に対応するCFGモデル要素を前記CFGモデルから削除し、前記検出されたループの直後に、前記検出された部分グラフにただ一つ含まれる前記マークされた変数に対して、前記削除されたCFGモデル要素を前記CFGモデルに追加し、前記CFGモデルを変換するステップと
を更に含む
ループ最適化方法。
The loop optimization method according to claim 8, comprising:
Detecting, from the data dependence graph, a subgraph including an assignment expression of a variable including the arbitrary value as an element and including only one of the marked variables;
The CFG model element corresponding to the substitution expression of the variable including the arbitrary value is deleted from the CFG model, and immediately after the detected loop, only one of the marked variables included in the detected subgraph is included. In contrast, the method further comprises: adding the deleted CFG model element to the CFG model and transforming the CFG model.
請求項9に記載のループ最適化方法であって、
前記マークされた変数が二つ以上含まれる部分グラフに対しては、前記CFGモデルの変換を制限するステップと、
前記CFGモデルを読み込み、前記計算木論理(CTL)を用いた記号モデル検査法に基づいて検査モデルを作成するステップと
を更に含む
ループ最適化方法。
The loop optimization method according to claim 9, comprising:
For a subgraph including two or more of the marked variables, limiting the conversion of the CFG model;
Reading the CFG model and creating a check model based on a symbolic model check method using the computational tree logic (CTL). A loop optimization method.
ソースコードから自動的にモデルを生成し、前記ソースコードに対し、モデル検査による検証を行うステップと、
前記モデルの生成の過程で、前記モデル中のループ内に存在する任意値を含む変数の代入式をループ外に移動し、検証時間の短縮を図るステップと
をコンピュータに実行させるための
プログラム。
Automatically generating a model from source code and performing verification by model checking on the source code;
A program for causing a computer to execute a step of reducing a verification time by moving an assignment expression of a variable including an arbitrary value existing in a loop in the model in the process of generating the model.
請求項11に記載のプログラムであって、
前記ソースコード及び検査仕様を読み込み、コンパイラ最適化処理を実施した上でCFG(コントロールフローグラフ)モデルを作成するステップと、
前記CFGモデルを読み込み、前記CFGモデル中のループを検出するステップと、
前記検出されたループ中に出現する値のデータ依存グラフを作成するステップと、
前記データ依存グラフ中の各変数のうち、前記検出されたループ以降で利用されている変数にマークするステップと、
前記データ依存グラフの中から、前記任意値を要素に含み、前記マークされた変数を含む部分グラフを検出するステップと、
前記検出された部分グラフに含まれる変数の計算処理に対応するCFGモデル要素を前記CFGモデルから削除し、前記検出されたループの直後に、前記検出された部分グラフに含まれる前記マークされた変数に対して、前記削除されたCFGモデル要素を前記CFGモデルに追加し、前記CFGモデルを変換するステップと
前記変換されたCFGモデルを読み込み、計算木論理(Computation Tree Logic:CTL)を用いた記号モデル検査法に基づいて検査モデルを作成するステップと、
前記検査モデルを読み込み、前記計算木論理(CTL)を用いた記号モデル検査法に基づいて検査を実行するステップと、
前記実行された検査の結果を出力するステップと
を更にコンピュータに実行させるための
プログラム。
The program according to claim 11,
Reading the source code and inspection specification, performing compiler optimization processing, and creating a CFG (control flow graph) model;
Reading the CFG model and detecting a loop in the CFG model;
Creating a data dependence graph of values appearing in the detected loop;
Marking each variable in the data dependency graph that is used after the detected loop;
Detecting a subgraph including the arbitrary value as an element and including the marked variable from the data dependence graph;
The CFG model element corresponding to the calculation processing of the variable included in the detected subgraph is deleted from the CFG model, and the marked variable included in the detected subgraph is immediately after the detected loop. In contrast, the deleted CFG model element is added to the CFG model, the CFG model is converted, and the converted CFG model is read, and a symbol using computation tree logic (CTL) is used. Creating an inspection model based on a model checking method;
Reading the check model and performing a check based on a symbolic model check method using the computational tree logic (CTL);
A program for causing a computer to further execute the step of outputting the result of the executed inspection.
請求項12に記載のプログラムであって、
前記データ依存グラフの中から、前記任意値を含む変数の代入式を要素に含み、前記マークされた変数をただ一つ含む部分グラフを検出するステップと、
前記任意値を含む変数の代入式に対応するCFGモデル要素を前記CFGモデルから削除し、前記検出されたループの直後に、前記検出された部分グラフにただ一つ含まれる前記マークされた変数に対して、前記削除されたCFGモデル要素を前記CFGモデルに追加し、前記CFGモデルを変換するステップと
を更にコンピュータに実行させるための
プログラム。
A program according to claim 12,
Detecting, from the data dependence graph, a subgraph including an assignment expression of a variable including the arbitrary value as an element and including only one of the marked variables;
The CFG model element corresponding to the substitution expression of the variable including the arbitrary value is deleted from the CFG model, and immediately after the detected loop, only one of the marked variables included in the detected subgraph is included. On the other hand, a program for causing the computer to further add the deleted CFG model element to the CFG model and convert the CFG model.
請求項13に記載のプログラムであって、
前記マークされた変数が二つ以上含まれる部分グラフに対しては、前記CFGモデルの変換を制限するステップと、
前記CFGモデルを読み込み、前記計算木論理(CTL)を用いた記号モデル検査法に基づいて検査モデルを作成するステップと
を更にコンピュータに実行させるための
プログラム。
The program according to claim 13,
For a subgraph including two or more of the marked variables, limiting the conversion of the CFG model;
A program for causing the computer to further execute a step of reading the CFG model and creating a check model based on a symbol model check method using the calculation tree logic (CTL).
JP2008266347A 2008-10-15 2008-10-15 Loop optimization system, loop optimization method, and loop optimization program Expired - Fee Related JP5093508B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008266347A JP5093508B2 (en) 2008-10-15 2008-10-15 Loop optimization system, loop optimization method, and loop optimization program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008266347A JP5093508B2 (en) 2008-10-15 2008-10-15 Loop optimization system, loop optimization method, and loop optimization program

Publications (2)

Publication Number Publication Date
JP2010097328A true JP2010097328A (en) 2010-04-30
JP5093508B2 JP5093508B2 (en) 2012-12-12

Family

ID=42258977

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008266347A Expired - Fee Related JP5093508B2 (en) 2008-10-15 2008-10-15 Loop optimization system, loop optimization method, and loop optimization program

Country Status (1)

Country Link
JP (1) JP5093508B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012150811A (en) * 2011-01-20 2012-08-09 Fujitsu Ltd Method and system for validating c++ programs using symbolic execution
WO2019124022A1 (en) * 2017-12-22 2019-06-27 国立大学法人京都大学 Program verification device, program verification method, computer program for program verification, program converter, program conversion method, computer program for program conversion, program manufacturing method, and program for verification

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004036463A1 (en) * 2002-10-15 2004-04-29 Renesas Technology Corp. Compiler and logic circuit design method
WO2005072257A2 (en) * 2004-01-22 2005-08-11 Nec Laboratories America, Inc. System and method for modeling, abstraction, and analysis of software

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004036463A1 (en) * 2002-10-15 2004-04-29 Renesas Technology Corp. Compiler and logic circuit design method
WO2005072257A2 (en) * 2004-01-22 2005-08-11 Nec Laboratories America, Inc. System and method for modeling, abstraction, and analysis of software

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012150811A (en) * 2011-01-20 2012-08-09 Fujitsu Ltd Method and system for validating c++ programs using symbolic execution
WO2019124022A1 (en) * 2017-12-22 2019-06-27 国立大学法人京都大学 Program verification device, program verification method, computer program for program verification, program converter, program conversion method, computer program for program conversion, program manufacturing method, and program for verification

Also Published As

Publication number Publication date
JP5093508B2 (en) 2012-12-12

Similar Documents

Publication Publication Date Title
CN109426723B (en) Detection method, system, equipment and storage medium using released memory
JP2017033562A (en) System and method for model based technology and process for safety-critical software development
CN101473301B (en) Iterative static and dynamic software analysis
EP3234851B1 (en) A system and method for facilitating static analysis of software applications
US9292652B2 (en) Generic design rule checking (DRC) test case extraction
JP6096930B2 (en) Unique and non-clonal platform identifier using data-dependent circuit path response
US8875064B2 (en) Automated design rule checking (DRC) test case generation
US10592703B1 (en) Method and system for processing verification tests for testing a design under test
US10095512B2 (en) Program development support device, non-transitory storage medium storing thereon computer-readable program development support program, and program development support method
US11474795B2 (en) Static enforcement of provable assertions at compile
CN108874656A (en) Code test method, device, readable storage medium storing program for executing and computer equipment
US20110131031A1 (en) Dynamic generation of tests
US9658938B2 (en) Iterative test generation based on data source analysis
JP5093508B2 (en) Loop optimization system, loop optimization method, and loop optimization program
JP5233355B2 (en) Property generation system and property verification system
US20120291019A1 (en) Program verification apparatus based on model verifying and storage medium
JP5170555B2 (en) Error trace simplification system, error trace simplification method, and program
US8627273B2 (en) Model checking of liveness property in a phase abstracted model
US8352234B2 (en) Model generation based on a constraint and an initial model
JP2015026262A5 (en)
JP5545133B2 (en) Static analysis processing system, method, and program
US8639490B2 (en) Concretization of abstracted traces
JP2019215867A (en) Method and system for verifying properties of source code
WO2019142266A1 (en) Test case generation device, test case generation method, and test case generation program
US8930759B2 (en) Stream generation

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120321

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120604

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120725

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120904

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150928

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees