JP6079201B2 - Symbolic execution method, symbolic execution program, and symbolic execution device - Google Patents
Symbolic execution method, symbolic execution program, and symbolic execution device Download PDFInfo
- Publication number
- JP6079201B2 JP6079201B2 JP2012273459A JP2012273459A JP6079201B2 JP 6079201 B2 JP6079201 B2 JP 6079201B2 JP 2012273459 A JP2012273459 A JP 2012273459A JP 2012273459 A JP2012273459 A JP 2012273459A JP 6079201 B2 JP6079201 B2 JP 6079201B2
- Authority
- JP
- Japan
- Prior art keywords
- value
- data
- file
- symbol variable
- read
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、シンボリック実行技術に関する。 The present invention relates to a symbolic execution technique.
シンボリック実行とは、プログラム内の変数を具体化せず、変数をシンボル化して(すなわち、記号のまま)プログラムを実行する技術である。シンボル化される変数は、シンボル変数と呼ばれる。シンボリック実行中においては、具体値ではなくシンボル変数が満たすべき条件(以下、パス条件と呼ぶ)がシンボル変数の値としてメモリ等に保持される。そして、シンボリック実行が完了すると、プログラムにおける各パスについてパス条件が得られるため、パス条件を満たすシンボル変数の具体値を求めることで、プログラムをテストするためのテストデータを得ることができる。 Symbolic execution is a technique for executing a program by converting variables into symbols (that is, with symbols) without embodying variables in the program. Variables that are symbolized are called symbol variables. During symbolic execution, not a specific value but a condition to be satisfied by a symbol variable (hereinafter referred to as a path condition) is held in a memory or the like as a symbol variable value. When the symbolic execution is completed, a path condition is obtained for each path in the program. Therefore, test data for testing the program can be obtained by obtaining a specific value of the symbol variable that satisfies the path condition.
例えば、図1に示した制御構造を有するプログラムについてシンボリック実行を行うことを考える。この制御構造には、2つの分岐が含まれる。1つ目の分岐は、シンボル変数bが0であるか否かを判断する分岐であり、0である場合にはパス11に進み、0ではない場合にはパス12に進む。2つ目の分岐は、シンボル変数bが5以下であるか否かを判断する分岐であり、5以下である場合には変数aをデクリメントするパス21に進み、5より大きい場合には変数aをインクリメントするパス22に進む。
For example, consider performing symbolic execution on a program having the control structure shown in FIG. This control structure includes two branches. The first branch is a branch for determining whether or not the symbol variable b is 0. When the symbol variable b is 0, the process proceeds to the
図2に、図1に示した制御構造を有するプログラムの一例を示す。このプログラムにおいては、1行目の「@Symbolic(”true”)」がシンボリック実行を行うことを表している。そして、実際にこのプログラムについてシンボリック実行を行うと、b=0というテストデータ(パス条件は(b=0)∧(b≦5))と、b=1というテストデータ(パス条件は(b≠0)∧(b≦5))と、b=6というテストデータ(パス条件は(b≠0)∧(b>5))とを得ることができる。 FIG. 2 shows an example of a program having the control structure shown in FIG. In this program, “@Symbolic (“ true ”)” on the first line indicates that symbolic execution is performed. When symbolic execution is actually performed on this program, test data of b = 0 (pass condition is (b = 0) ∧ (b ≦ 5)) and test data of b = 1 (pass condition is (b ≠ 0) ∧ (b ≦ 5)) and test data b = 6 (pass condition is (b ≠ 0) ∧ (b> 5)).
ここで、図1に示した制御構造を図3に示すように変更する。図3に示した制御構造において、1つ目の分岐は図1と同じである。1つ目の分岐と2つ目の分岐との間に、シンボル変数bの値を「Test.txt」という名前のファイルに出力する処理と、「Test.txt」という名前のファイルから値を読み出す処理とが含まれる。2つ目の分岐においては、ファイルから読み出した値が5以下である場合には変数aをデクリメントするパス21に進み、5より大きい場合には変数aをインクリメントするパス22に進む。
Here, the control structure shown in FIG. 1 is changed as shown in FIG. In the control structure shown in FIG. 3, the first branch is the same as in FIG. A process of outputting the value of the symbol variable b to a file named “Test.txt” between the first branch and the second branch, and reading the value from the file named “Test.txt” Processing. In the second branch, if the value read from the file is 5 or less, the process proceeds to the
図4に、図3に示した制御構造を有するプログラムの一例を示す。このプログラムは、図2に示したプログラムに、点線で囲った5行のコードを追加したプログラムである。そして、実際にこのプログラムについてシンボリック実行を行うと、b=0というテストデータ(パス条件は(b=0))と、b=1というテストデータ(パス条件は(b≠0))とを得ることができる。このテストデータは、図2の例で得られるテストデータとは異なっている。 FIG. 4 shows an example of a program having the control structure shown in FIG. This program is a program obtained by adding five lines of code surrounded by a dotted line to the program shown in FIG. When symbolic execution is actually performed on this program, test data of b = 0 (pass condition is (b = 0)) and test data of b = 1 (pass condition is (b ≠ 0)) are obtained. be able to. This test data is different from the test data obtained in the example of FIG.
このように、プログラムの途中でシンボル変数の値を永続化すると、適切なテストデータを得られなくなることがある。これは、永続化によりシンボル変数が消えるためである。図4の例であれば、「dis.readInt()」という命令によってファイルから読み込む値がシンボル変数bの値であることが認識されず、シンボル変数bが消えるため、シンボリック実行にシンボル変数bを引き継ぐことができない。シンボリック実行に関する従来の技術においては、このような問題については検討されていない。 Thus, if the value of the symbol variable is made permanent in the middle of the program, appropriate test data may not be obtained. This is because symbol variables disappear due to persistence. In the example of FIG. 4, since the value read from the file by the instruction “dis.readInt ()” is not recognized as the value of the symbol variable b and the symbol variable b disappears, the symbol variable b is set for symbolic execution. I can't take over. Such a problem is not examined in the conventional technique regarding symbolic execution.
1つの側面では、本発明の目的は、シンボル変数の値が永続化される場合であってもシンボリック実行を行えるようにするための技術を提供することである。 In one aspect, an object of the present invention is to provide a technique for enabling symbolic execution even when the value of a symbol variable is made permanent.
本発明に係るシンボリック実行方法は、シンボル変数の値を含む第1のデータをファイルに書き込むことを命令する書き込み命令を実行する場合、書き込み命令に従って第1のデータをファイルに書き込むと共に、内部表現のシンボル変数の値を記憶装置に格納し、第1のデータをファイルから読み込むことを命令する読み込み命令を実行する場合、記憶装置から内部表現のシンボル変数の値を読み込み、内部表現のシンボル変数の値を含む第1のデータを、読み込み命令の返り値に設定する処理を含む。 In the symbolic execution method according to the present invention, when executing a write command instructing to write the first data including the value of the symbol variable to the file, the first data is written to the file according to the write command, and the internal representation When the value of the symbol variable is stored in the storage device and the read command for instructing to read the first data from the file is executed, the value of the symbol variable of the internal representation is read from the storage device, and the value of the symbol variable of the internal representation Includes a process of setting the first data including the value to the return value of the read command.
シンボル変数の値が永続化される場合であってもシンボリック実行を行えるようになる。 Symbolic execution can be performed even when the value of a symbol variable is made persistent.
図5に、本実施の形態における情報処理装置1の機能ブロック図を示す。情報処理装置1は、シンボリック実行の対象となるクラスである対象クラスを格納する対象クラス格納部110と、モデルクラス群101、判断部102、シンボル変数格納部104及び実行エンジン103を含むシンボリック実行部100と、第1処理部106及び第2処理部107を含む入出力処理部105と、シンボル値格納部109と、ファイル格納部108とを含む。
FIG. 5 shows a functional block diagram of the
実行エンジン103は、シンボリック実行を行うモジュールであり、例えばJava(登録商標) PathFinderである。実行エンジン103は、シンボリック実行におけるシンボル変数をシンボル変数格納部104を用いて管理している。
The
モデルクラス群101は、複数のモデルクラスを含む。モデルクラスは、例えばファイルへのデータの書き込み又はファイルからのデータの読み込み等の処理を実行するためのクラスであり、対象クラスから呼び出される。
The
判断部102は、モデルクラス群101における、ファイルへのデータの書き込み又はファイルからのデータの読み込み等を実行するためのモデルクラスが呼び出されると、当該モデルクラスから呼び出される。判断部102は、シンボル変数格納部104に格納されているデータを用いて、出力データにシンボル変数が含まれているか否かを判断し、含まれている場合には書き込みメソッドに係るデータを入出力処理部105に出力する。また、判断部102は、読み込み対象のファイルの情報がシンボル値格納部109に格納されているか判断し、格納されている場合には読み込みメソッドに係るデータを入出力処理部105に出力する。
When a model class for executing writing of data to a file or reading of data from a file in the
入出力処理部105における第1処理部106は、判断部102から受け取った、書き込みメソッドに係るデータを用いて処理を行う。入出力処理部105における第2処理部107は、判断部102から受け取った、読み込みメソッドに係るデータを用いて処理を行う。
The
次に、図6乃至図10を用いて、情報処理装置1の動作について説明する。まず、図6乃至図9を用いて、ファイルへの書き込みを行う際に実行する処理について説明する。
Next, the operation of the
シンボリック実行部100における実行エンジン103は、ユーザからの指示を受け付けると、対象クラス格納部110に格納されている対象クラスを用いて、シンボリック実行を開始する。シンボリック実行中、実行エンジン103は、ファイルへの書き込み命令(例えば図4の例であれば、dos.writeInt(b))を実行する(図6:ステップS1)。ファイルへの書き込み命令とは、Java(登録商標)であれば、例えばwriteInt、writeChar又はwriteLong等を含む命令である。
When the
実行エンジン103がファイルへの書き込み命令を実行すると、書き込みメソッドを実行するモデルクラスがモデルクラス群101から呼び出される。また、呼び出されたモデルクラスが、判断部102を呼び出し(ステップS3)、判断部102に書き込みメソッドに係るデータを出力する。この処理は、例えば、モデルクラス「DataOutputStream」の中に、書き込みメソッドを実行する部分とは別に、判断部102を呼び出す部分を設けることにより実現する。なお、書き込みメソッドに係るデータには、出力データ、ファイル名、書き込み開始位置の情報、出力データ長の情報及び型の情報等が含まれる。
When the
判断部102は、シンボル変数格納部104に格納されているシンボル変数が出力データに含まれているか判断する(ステップS5)。
The
図7に、シンボル変数格納部104に格納されるデータの一例を示す。図7の例では、シンボル変数と、変数の型とが格納される。例えば図4に示したプログラムの場合、冒頭の2行がシンボル変数を定義する部分にあたるため、この部分が実行されると図7に示したようなデータが格納される。
FIG. 7 shows an example of data stored in the symbol
例えば、writeInt(b)という書き込みメソッドであればbが出力データであるが、bはシンボル変数としてシンボル変数格納部104に登録されているため、シンボル変数が出力データに含まれるということになる。
For example, if the write method is writeInt (b), b is output data, but b is registered in the symbol
シンボル変数が出力データに含まれない場合(ステップS7:Noルート)、通常どおりの書き込みメソッドであるので、ステップS9の処理に移行する。そして、書き込みメソッドを実行するモデルクラスが、書き込みメソッドに係るデータに従って出力データをファイル格納部108におけるファイルに書き込む(ステップS9)。
If the symbol variable is not included in the output data (step S7: No route), since it is a normal writing method, the process proceeds to step S9. Then, the model class that executes the write method writes the output data to the file in the
一方、シンボル変数が出力データに含まれる場合(ステップS7:Yesルート)、判断部102は、書き込みメソッドに係るデータを入出力処理部105に出力する。そして、入出力処理部105における第1処理部106は、実行エンジン103が使用するメモリ領域から、内部表現のシンボル変数の値を取得する(ステップS11)。内部表現のシンボル変数の値には、ステップS11の時点においてメモリ領域に格納されているパス条件が含まれる。
On the other hand, when the symbol variable is included in the output data (step S <b> 7: Yes route), the
第1処理部106は、書き込みメソッドに係るデータに含まれるファイルの情報と取得された内部表現のシンボル変数の値とをシンボル値格納部109に追加する(ステップS13)。
The
図8に、シンボル値格納部109に格納されるデータの一例を示す。図8の例では、ファイル名と、書き込み開始位置の情報及び出力データ長の情報と、内部表現のシンボル変数の値とが格納される。
FIG. 8 shows an example of data stored in the symbol
第1処理部106は、判断部102から受け取った、書き込みメソッドに係るデータに従って、ファイル格納部108におけるファイルに出力データを書き込む(ステップS15)。そして処理を終了する。
The
図9に、ファイル格納部108に格納されるファイルの一例を示す。図9に示したファイルは、ファイル名が「Test.txt」であり、出力データは「0」である。内部表現のシンボル変数bの値は図8における2行目の3列目に示された値であるが、ファイル上では整数型(Int)で表されているため「0」になっている。
FIG. 9 shows an example of a file stored in the
以上のような処理を実行すれば、ファイルへの書き込みの時点における出力データを保存できるので、後にファイルから読み込みを行う際に利用できるようになる。 By executing the processing as described above, the output data at the time of writing to the file can be saved, so that it can be used later when reading from the file.
次に、図10を用いて、ファイルからの読み込みを行う際に実行する処理について説明する。 Next, processing executed when reading from a file will be described with reference to FIG.
シンボリック実行部100における実行エンジン103は、ユーザからの指示を受け付けると、対象クラス格納部110に格納されている対象クラスを用いて、シンボリック実行を開始する。シンボリック実行中、実行エンジン103は、ファイルの読み込み命令(例えば図4の例であれば、dis.readInt())を実行する(図10:ステップS21)。ファイルの読み込み命令とは、Java(登録商標)であれば、例えばreadInt、readChar又はreadLong等を含む命令である。
When the
実行エンジン103がファイルの読み込み命令を実行すると、読み込みメソッドを実行するモデルクラスがモデルクラス群101から呼び出される。また、呼び出されたモデルクラスが、判断部102を呼び出し(ステップS23)、読み込みメソッドに係るデータを判断部102に出力する。例えば、モデルクラス「DataInputStream」の中に、読み込みメソッドを実行する部分とは別に、判断部102を呼び出す部分を設けることにより実現する。なお、読み込みメソッドに係るデータには、ファイル名、読み込み開始位置の情報、データ長の情報及び型の情報等が含まれる。
When the
判断部102は、読み込み対象のファイルの情報(ここでは、ファイル名、読み込み開始位置の情報及びデータ長の情報)がシンボル値格納部109に格納されているか判断する(ステップS25)。
The
格納されていない場合(ステップS27:Noルート)、通常どおりの読み込みメソッドであるので、読み込みメソッドを実行するモデルクラスが、読み込みメソッドに係るデータに従ってデータをファイル格納部108におけるファイルから読み込む。そして、読み込みメソッドを実行するモデルクラスは、ファイルから読み込んだデータを読み込みメソッドの返り値に設定する(ステップS29)。
If it is not stored (step S27: No route), since it is a normal reading method, the model class that executes the reading method reads data from the file in the
一方、格納されている場合(ステップS27:Yesルート)、判断部102は、読み込みメソッドに係るデータを入出力処理部105に出力する。そして、入出力処理部105における第2処理部107は、読み込み対象のファイルの情報に対応する内部表現のシンボル変数の値をシンボル値格納部109から取得する(ステップS31)。シンボル値格納部109に格納されている内部表現のシンボル変数の値には、書き込みの時点においてメモリ領域に格納されていたパス条件が含まれる。
On the other hand, if it is stored (step S <b> 27: Yes route), the
第2処理部107は、取得された内部表現のシンボル変数の値を含む設定値を生成する(ステップS33)。例えばwriteInt(b)という命令では出力データそのものがシンボル変数であるため、ステップS33の処理をスキップしてもよい。これに対し、出力データの一部にシンボル変数が含まれるような場合には、ステップS33の処理を実行する。そして、第2処理部107は、生成された設定値を判断部102に出力する。
The
判断部102は、第2処理部107から受け取った設定値を、読み込みメソッドの返り値に設定する(ステップS35)。例えば、第2処理部107は、返り値としてSymbolic Exp[(s_b_3_SYMINT_STATIC_FIELD+CONST_1)]を設定する。そして処理を終了する。これにより、実行エンジン103にシンボル変数の値を引き継ぐことができる。
The
以上のような処理を実行すれば、ファイル上の値ではなく内部表現のシンボル変数の値をシンボリック実行に引き継ぐことができるので、シンボル変数の値が永続化される場合であってもシンボリック実行を行えるようになる。 By executing the above process, the symbol variable value of the internal representation can be taken over by symbolic execution instead of the value on the file, so symbolic execution can be performed even if the value of the symbol variable is made permanent. You can do it.
以上本発明の一実施の形態を説明したが、本発明はこれに限定されるものではない。例えば、上で説明した情報処理装置1の機能ブロック構成は実際のプログラムモジュール構成に対応しない場合もある。
Although one embodiment of the present invention has been described above, the present invention is not limited to this. For example, the functional block configuration of the
また、上で説明した各テーブルの構成は一例であって、上記のような構成でなければならないわけではない。さらに、処理フローにおいても、処理結果が変わらなければ処理の順番を入れ替えることも可能である。さらに、並列に実行させるようにしても良い。 Further, the configuration of each table described above is an example, and the configuration as described above is not necessarily required. Further, in the processing flow, the processing order can be changed if the processing result does not change. Further, it may be executed in parallel.
例えば、上ではJava(登録商標)のプログラムを例にして説明したが、その他のプログラミング言語のプログラムであってもよい。 For example, while a Java (registered trademark) program has been described above as an example, a program of another programming language may be used.
なお、上で述べた情報処理装置1は、コンピュータ装置であって、図11に示すように、メモリ2501とCPU(Central Processing Unit)2503とハードディスク・ドライブ(HDD:Hard Disk Drive)2505と表示装置2509に接続される表示制御部2507とリムーバブル・ディスク2511用のドライブ装置2513と入力装置2515とネットワークに接続するための通信制御部2517とがバス2519で接続されている。オペレーティング・システム(OS:Operating System)及び本実施例における処理を実施するためのアプリケーション・プログラムは、HDD2505に格納されており、CPU2503により実行される際にはHDD2505からメモリ2501に読み出される。CPU2503は、アプリケーション・プログラムの処理内容に応じて表示制御部2507、通信制御部2517、ドライブ装置2513を制御して、所定の動作を行わせる。また、処理途中のデータについては、主としてメモリ2501に格納されるが、HDD2505に格納されるようにしてもよい。本発明の実施例では、上で述べた処理を実施するためのアプリケーション・プログラムはコンピュータ読み取り可能なリムーバブル・ディスク2511に格納されて頒布され、ドライブ装置2513からHDD2505にインストールされる。インターネットなどのネットワーク及び通信制御部2517を経由して、HDD2505にインストールされる場合もある。このようなコンピュータ装置は、上で述べたCPU2503、メモリ2501などのハードウエアとOS及びアプリケーション・プログラムなどのプログラムとが有機的に協働することにより、上で述べたような各種機能を実現する。
The
以上述べた本発明の実施の形態をまとめると、以下のようになる。 The embodiment of the present invention described above is summarized as follows.
本実施の形態に係るシンボリック実行方法は、(A)シンボル変数の値を含む第1のデータをファイルに書き込むことを命令する書き込み命令を実行する場合、書き込み命令に従って第1のデータをファイルに書き込むと共に、内部表現のシンボル変数の値を記憶装置に格納し、(B)第1のデータをファイルから読み込むことを命令する読み込み命令を実行する場合、記憶装置から内部表現のシンボル変数の値を読み込み、内部表現のシンボル変数の値を含む第1のデータを、読み込み命令の返り値に設定する処理を含む。 In the symbolic execution method according to the present embodiment, (A) when executing a write command instructing to write the first data including the value of the symbol variable to the file, the first data is written to the file according to the write command. At the same time, the value of the symbol variable of the internal representation is stored in the storage device, and (B) the value of the symbol variable of the internal representation is read from the storage device when executing a read command that instructs to read the first data from the file. The first data including the value of the symbol variable of the internal representation is set as the return value of the read instruction.
このようにすれば、ファイル上のシンボル変数の値ではなく内部表現のシンボル変数の値をシンボリック実行に引き継ぐことができるので、シンボル変数の値が永続化される場合であってもシンボリック実行を行えるようになる。 In this way, the value of the symbol variable in the internal representation instead of the value of the symbol variable on the file can be inherited to the symbolic execution, so the symbolic execution can be performed even if the value of the symbol variable is made permanent. It becomes like this.
また、本シンボリック実行方法が、(C)シンボル変数の値を含まない第2のデータを上記ファイル以外のファイルである第2のファイルから読み込むことを命令する第2の読み込み命令を実行する場合、第2の読み込み命令に従って第2のデータを第2のファイルから読み込み、第2の読み込み命令の返り値に設定する処理をさらに含むようにしてもよい。このようにすれば、シンボル変数の値を含まないデータをファイルから読み込む場合には通常どおりの読み込みを行うことができるようになる。 When the symbolic execution method executes (C) a second read instruction for instructing to read second data not including the value of the symbol variable from a second file other than the above file, A process of reading the second data from the second file in accordance with the second read command and setting the return value of the second read command may be further included. In this way, when data including no symbol variable value is read from a file, it can be read as usual.
また、上で述べた内部表現のシンボル変数の値を記憶装置に格納する処理において、(a1)第1のデータが書き込まれるファイルの情報を内部表現のシンボル変数に対応付けて記憶装置に格納し、上で述べた読み込み命令の返り値に設定する処理において、(b1)読み込み命令において指定されているファイルの情報に対応付けて格納されている内部表現のシンボル変数の値を、記憶装置から読み込むようにしてもよい。このようにすれば、例えば複数のシンボル変数を扱うような場合であっても、適切な値を記憶装置から読み込めるようになる。 In the process of storing the value of the symbol variable of the internal representation described above in the storage device, (a1) the information of the file to which the first data is written is associated with the symbol variable of the internal representation and stored in the storage device. In the process of setting the return value of the read command described above, (b1) The value of the symbol variable of the internal representation stored in association with the file information specified in the read command is read from the storage device. You may do it. In this way, for example, even when handling a plurality of symbol variables, an appropriate value can be read from the storage device.
なお、上記方法による処理をコンピュータに行わせるためのプログラムを作成することができ、当該プログラムは、例えばフレキシブルディスク、CD−ROM、光磁気ディスク、半導体メモリ、ハードディスク等のコンピュータ読み取り可能な記憶媒体又は記憶装置に格納される。尚、中間的な処理結果はメインメモリ等の記憶装置に一時保管される。 A program for causing a computer to perform the processing according to the above method can be created. The program can be a computer-readable storage medium such as a flexible disk, a CD-ROM, a magneto-optical disk, a semiconductor memory, or a hard disk. It is stored in a storage device. The intermediate processing result is temporarily stored in a storage device such as a main memory.
以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。 The following supplementary notes are further disclosed with respect to the embodiments including the above examples.
(付記1)
シンボル変数の値を含む第1のデータをファイルに書き込むことを命令する書き込み命令を実行する場合、前記書き込み命令に従って前記第1のデータを前記ファイルに書き込むと共に、内部表現の前記シンボル変数の値を記憶装置に格納し、
前記第1のデータを前記ファイルから読み込むことを命令する読み込み命令を実行する場合、前記記憶装置から前記内部表現のシンボル変数の値を読み込み、前記内部表現のシンボル変数の値を含む前記第1のデータを、前記読み込み命令の返り値に設定する
処理をコンピュータが実行するシンボリック実行方法。
(Appendix 1)
When executing a write command for instructing to write first data including a value of a symbol variable to a file, the first data is written to the file according to the write command, and the value of the symbol variable of an internal representation is set Stored in a storage device,
When executing a read instruction for instructing to read the first data from the file, the value of the symbol variable of the internal representation is read from the storage device, and the value of the symbol variable of the internal representation is included. A symbolic execution method in which a computer executes processing for setting data as a return value of the read instruction.
(付記2)
前記シンボル変数の値を含まない第2のデータを前記ファイル以外のファイルである第2のファイルから読み込むことを命令する第2の読み込み命令を実行する場合、前記第2の読み込み命令に従って前記第2のデータを前記第2のファイルから読み込み、前記第2の読み込み命令の返り値に設定する
処理をさらにコンピュータが実行する付記1記載のシンボリック実行方法。
(Appendix 2)
When executing a second read instruction that instructs to read second data that does not include the value of the symbol variable from a second file that is a file other than the file, the second read instruction is executed according to the second read instruction. The symbolic execution method according to
(付記3)
前記内部表現のシンボル変数の値を記憶装置に格納する処理において、
前記第1のデータが書き込まれる前記ファイルの情報を前記内部表現のシンボル変数に対応付けて前記記憶装置に格納し、
前記読み込み命令の返り値に設定する処理において、
前記読み込み命令において指定されているファイルの情報に対応付けて格納されている前記内部表現のシンボル変数の値を、前記記憶装置から読み込む
ことを特徴とする付記1記載のシンボリック実行方法。
(Appendix 3)
In the process of storing the value of the symbol variable of the internal representation in a storage device,
Storing the information of the file in which the first data is written in the storage device in association with the symbol variable of the internal representation;
In the process of setting the return value of the read instruction,
The symbolic execution method according to
(付記4)
シンボル変数の値を含む第1のデータをファイルに書き込むことを命令する書き込み命令を実行する場合、前記書き込み命令に従って前記第1のデータを前記ファイルに書き込むと共に、内部表現の前記シンボル変数の値を記憶装置に格納し、
前記第1のデータを前記ファイルから読み込むことを命令する読み込み命令を実行する場合、前記記憶装置から前記内部表現のシンボル変数の値を読み込み、前記内部表現のシンボル変数の値を含む前記第1のデータを、前記読み込み命令の返り値に設定する
処理をコンピュータに実行させるためのシンボリック実行プログラム。
(Appendix 4)
When executing a write command for instructing to write first data including a value of a symbol variable to a file, the first data is written to the file according to the write command, and the value of the symbol variable of an internal representation is set Stored in a storage device,
When executing a read instruction for instructing to read the first data from the file, the value of the symbol variable of the internal representation is read from the storage device, and the value of the symbol variable of the internal representation is included. A symbolic execution program for causing a computer to execute processing for setting data as a return value of the read instruction.
(付記5)
シンボル変数の値を含む第1のデータをファイルに書き込むことを命令する書き込み命令を実行する場合、前記書き込み命令に従って前記第1のデータを前記ファイルに書き込むと共に、内部表現の前記シンボル変数の値を記憶装置に格納する書き込み処理部と、
前記第1のデータを前記ファイルから読み込むことを命令する読み込み命令を実行する場合、前記記憶装置から前記内部表現のシンボル変数の値を読み込む読み込み処理部と、
前記読み込み処理部により読み込まれた前記内部表現のシンボル変数の値を含む前記第1のデータを、前記読み込み命令の返り値に設定する設定部と
を有するシンボリック実行装置。
(Appendix 5)
When executing a write command for instructing to write first data including a value of a symbol variable to a file, the first data is written to the file according to the write command, and the value of the symbol variable of an internal representation is set A write processing unit to be stored in the storage device;
A read processing unit that reads a value of a symbol variable of the internal representation from the storage device when executing a read command for instructing to read the first data from the file;
A symbolic execution device comprising: a setting unit configured to set the first data including the value of the symbol variable of the internal representation read by the read processing unit as a return value of the read command.
1 情報処理装置 100 シンボリック実行装置
101 モデルクラス群 102 判断部
103 実行エンジン 104 シンボル変数格納部
105 入出力処理部 106 第1処理部
107 第2処理部 108 ファイル格納部
109 シンボル値格納部 110 対象クラス格納部
DESCRIPTION OF
Claims (5)
前記第1のデータを前記ファイルから読み込むことを命令する読み込み命令を実行する場合、前記記憶装置から内部表現の前記シンボル変数の値を読み込み、内部表現の前記シンボル変数の値を含む第2のデータを前記第1のデータに基づき生成し、前記第2のデータを前記読み込み命令の返り値に設定する
処理をコンピュータが実行するシンボリック実行方法。 When executing a write command for instructing to write first data including a value of a symbol variable to a file, the first data is written to the file according to the write command, and the value of the symbol variable of an internal representation is set Stored in a storage device,
When executing a read instruction that instructs the reading the first data from the file, reads the value of the symbol variable internal representation from the storage device, the second containing the value of the symbol variable internal representation A symbolic execution method in which a computer executes a process of generating the first data based on the first data and setting the second data as a return value of the read instruction.
処理をさらに前記コンピュータが実行する請求項1記載のシンボリック実行方法。 When executing the second read instruction to instruction to read the third data not including the value of the symbol variable from the second file is a file other than the file, the third according to the second read instruction The symbolic execution method according to claim 1, wherein the computer further executes a process of reading the data from the second file and setting a return value of the second read instruction.
前記第1のデータが書き込まれる前記ファイルの情報を内部表現の前記シンボル変数の値に対応付けて前記記憶装置に格納し、
前記第2のデータを前記読み込み命令の返り値に設定する処理において、
前記読み込み命令において指定されている前記ファイルの情報に対応付けて格納されている内部表現の前記シンボル変数の値を、前記記憶装置から読み込む
ことを特徴とする請求項1記載のシンボリック実行方法。 The value of the symbol variable internal representation in the process of storing in the storage device,
In association with information of the files that the first data is written to the value of the symbol variable internal representation and stored in the storage device,
In the process of setting the second data as a return value of the read command,
The value of the symbol variable internal representation which is stored in association with the information of the file specified in the read command, the symbolic execution method according to claim 1, wherein the reading from the storage device.
前記第1のデータを前記ファイルから読み込むことを命令する読み込み命令を実行する場合、前記記憶装置から内部表現の前記シンボル変数の値を読み込み、内部表現の前記シンボル変数の値を含む第2のデータを前記第1のデータに基づき生成し、前記第2のデータを前記読み込み命令の返り値に設定する
処理をコンピュータに実行させるためのシンボリック実行プログラム。 When executing a write command for instructing to write first data including a value of a symbol variable to a file, the first data is written to the file according to the write command, and the value of the symbol variable of an internal representation is set Stored in a storage device,
When executing a read instruction that instructs the reading the first data from the file, reads the value of the symbol variable internal representation from the storage device, the second containing the value of the symbol variable internal representation A symbolic execution program for causing a computer to execute the process of generating the data based on the first data and setting the second data as a return value of the read instruction.
前記第1のデータを前記ファイルから読み込むことを命令する読み込み命令を実行する場合、前記記憶装置から内部表現の前記シンボル変数の値を読み込む読み込み処理部と、
前記読み込み処理部により読み込まれた内部表現の前記シンボル変数の値を含む第2のデータを前記第1のデータに基づき生成し、前記第2のデータを前記読み込み命令の返り値に設定する設定部と
を有するシンボリック実行装置。 When executing a write command for instructing to write first data including a value of a symbol variable to a file, the first data is written to the file according to the write command, and the value of the symbol variable of an internal representation is set A write processing unit to be stored in the storage device;
When executing a read instruction that instructs the reading the first data from the file, and the read processing unit to read the value of the symbol variable internal representation from the storage device,
Setting said second data including a value of the symbol variable internal representations read by read processing unit generates, based on the first data, setting the second data to the return value of the read instruction And a symbolic execution device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012273459A JP6079201B2 (en) | 2012-12-14 | 2012-12-14 | Symbolic execution method, symbolic execution program, and symbolic execution device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012273459A JP6079201B2 (en) | 2012-12-14 | 2012-12-14 | Symbolic execution method, symbolic execution program, and symbolic execution device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2014119869A JP2014119869A (en) | 2014-06-30 |
| JP6079201B2 true JP6079201B2 (en) | 2017-02-15 |
Family
ID=51174671
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012273459A Expired - Fee Related JP6079201B2 (en) | 2012-12-14 | 2012-12-14 | Symbolic execution method, symbolic execution program, and symbolic execution device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6079201B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104750608B (en) * | 2015-03-25 | 2017-10-27 | 南京大学 | A kind of automatic location of mistake method performed in program based on dynamic symbol |
| JP6659955B2 (en) * | 2016-05-12 | 2020-03-04 | 富士通株式会社 | Program analysis method, program analysis device, and analysis program |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007122207A (en) * | 2005-10-26 | 2007-05-17 | Fujitsu Ltd | Program analysis program, program analysis apparatus, and program analysis method |
| US9069804B2 (en) * | 2010-07-07 | 2015-06-30 | Fujitsu Limited | System and a method for generating database model for analysis of applications |
-
2012
- 2012-12-14 JP JP2012273459A patent/JP6079201B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2014119869A (en) | 2014-06-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8321843B2 (en) | Automatic analysis of an application's run-time settings | |
| US8849753B2 (en) | Automating asynchronous programming in single threaded systems | |
| JP5244826B2 (en) | Separation, management and communication using user interface elements | |
| US9092565B2 (en) | Synchronization point visualization for modified program source code | |
| US10810105B2 (en) | Logging stored information for identifying a fix for and/or a cause of an error condition | |
| JP6003699B2 (en) | Test data generation program, method and apparatus | |
| EP2511820A1 (en) | Bypassing user mode redirection | |
| JP6079201B2 (en) | Symbolic execution method, symbolic execution program, and symbolic execution device | |
| US10310871B2 (en) | Non-transitory computer-readable recording medium storing control program, control device and control method | |
| CN104866285A (en) | Programmable controller | |
| US20160350155A1 (en) | Synthesizing inputs to preserve functionality | |
| JP2009157441A (en) | Information processing apparatus, file rearrangement method, and program | |
| US20080313647A1 (en) | Thread virtualization techniques | |
| US20080320475A1 (en) | Switching user mode thread context | |
| JP6136834B2 (en) | Storage control device, control program, and control method | |
| JP5023169B2 (en) | Required patch list creation apparatus and method | |
| US8402532B2 (en) | Host control of partial trust accessibility | |
| JP2010033354A (en) | Microcontroller simulator, its simulation method, program, and computer readable medium | |
| US10496378B2 (en) | Generating and executing multi-entry point functions | |
| JP6260179B2 (en) | Arithmetic apparatus and arithmetic method | |
| KR101908573B1 (en) | Method of generating a computer program for efficiently defending against a return-oriented programing | |
| JP2015069220A (en) | Device, method, and program for generating performance evaluation program | |
| JP2017142733A (en) | Driver generation program, apparatus, and method | |
| US9678776B2 (en) | Suppress newer facilities when simulating an older machine | |
| JP2015103225A (en) | Determination program, determination unit and determination method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150804 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160513 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160614 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160810 |
|
| 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: 20161220 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170102 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6079201 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |