JP2018205969A - Information processing program, information processing device, and information processing method - Google Patents

Information processing program, information processing device, and information processing method Download PDF

Info

Publication number
JP2018205969A
JP2018205969A JP2017109345A JP2017109345A JP2018205969A JP 2018205969 A JP2018205969 A JP 2018205969A JP 2017109345 A JP2017109345 A JP 2017109345A JP 2017109345 A JP2017109345 A JP 2017109345A JP 2018205969 A JP2018205969 A JP 2018205969A
Authority
JP
Japan
Prior art keywords
satisfiability
group
determination
condition
unit
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
JP2017109345A
Other languages
Japanese (ja)
Other versions
JP6870483B2 (en
Inventor
裕介 佐々木
Yusuke Sasaki
裕介 佐々木
前田 芳晴
Yoshiharu Maeda
芳晴 前田
忠弘 上原
Tadahiro Uehara
忠弘 上原
昭彦 松尾
Akihiko Matsuo
昭彦 松尾
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2017109345A priority Critical patent/JP6870483B2/en
Publication of JP2018205969A publication Critical patent/JP2018205969A/en
Application granted granted Critical
Publication of JP6870483B2 publication Critical patent/JP6870483B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

To provide an information processing program, an information processing device, and an information processing method for simplifying a determination condition of process execution determination at a high speed.SOLUTION: One unselected condition group is selected from among a plurality of condition groups which are generated on the basis of a program of, with use of a determination condition, determining whether or not to execute a prescribed process in response to an input and which are connected with a disjunction, and an element condition including variables that are connected with a conjunction is extracted in the selected condition group. Whether or not all the extracted element conditions can be satisfied is determined on the basis of the result of determination that has been already executed .SELECTED DRAWING: Figure 40

Description

本発明は、情報処理プログラム、情報処理装置及び情報処理方法に関する。   The present invention relates to an information processing program, an information processing apparatus, and an information processing method.

「ある実行条件Aを満たせば業務処理Bを実施する。」という形でアプリケーション上のビジネスルールを管理し、実行するBRMS(Business Rule Management System)が普及してきている。BRMSを導入する場合、既存システムのBRMSへの移行が行われる。   BRMS (Business Rule Management System) that manages and executes business rules on an application in the form of “execution of business process B if a certain execution condition A is satisfied” has become widespread. When introducing BRMS, the existing system is migrated to BRMS.

既存システムをBRMSへ移行するためには、既存システムが有する既存プログラムからのビジネスルールの抽出を行うことになるが、このビジネスルールの抽出を人手で行うことは困難である。そのため、既存プログラムからビジネスルールを自動的に抽出することが望まれる。   In order to migrate an existing system to BRMS, business rules are extracted from existing programs of the existing system. However, it is difficult to manually extract the business rules. Therefore, it is desirable to automatically extract business rules from existing programs.

従来、シンボリック実行を用いて、既存プログラムのソースコードから業務処理を実行するか否かを判定するための条件(パス条件)を自動抽出する技術がある。シンボリック実行とは、入力変数にシンボル値を設定してプログラムの実行をエミュレートする技術である。シンボリック実行の実行結果は、実行可能なパス、パス条件およびパス出力である。これらの実行結果は、例えば、入力に関する条件とその条件が満たされた場合の出力の表であるロジック表として得ることができる。   Conventionally, there is a technique of automatically extracting a condition (path condition) for determining whether or not to execute a business process from the source code of an existing program using symbolic execution. Symbolic execution is a technique for emulating program execution by setting a symbol value to an input variable. The execution result of symbolic execution is an executable path, a path condition, and a path output. These execution results can be obtained as, for example, a logic table that is a table of outputs when the conditions regarding the input and the conditions are satisfied.

ただし、シンボリック実行を用いて自動抽出したパス条件は非常に長い文字列となる場合があり、目視での検証は困難である。例えば、既存プログラムのあるソースコードから抽出される業務処理を実行するためのパス条件は、それぞれが複数の比較式で構成される分岐条件を15個連ねたものとなる場合がある。このように分岐条件が15個もあるプログラムを人の手によって解釈することは困難である。   However, the path condition automatically extracted using symbolic execution may be a very long character string, and visual verification is difficult. For example, the path condition for executing the business process extracted from a certain source code of an existing program may be a series of 15 branch conditions each composed of a plurality of comparison expressions. Thus, it is difficult for a program having 15 branch conditions to be interpreted manually.

そこで、自動抽出したパス条件を簡約化することが望まれる。このように、既存のプログラムから抽出した条件を簡約化することは、BRMSへの移行時だけでなくシステムの移行時にも、実行されることが多い。   Therefore, it is desirable to simplify the automatically extracted path conditions. In this way, the simplification of the conditions extracted from the existing program is often executed not only at the time of transition to BRMS but also at the time of system transition.

既存のプログラムから抽出した条件を簡約化する技術としては、例えば、入力された条件を加法標準形へ展開し、それぞれの連言型について充足可能か否か判定し、充足不要な条件を除去する従来技術がある。また、解析対象のモジュールの分割を行い、生成されるパス条件そのものを減らし、充足可能性判定の負荷を減らす従来技術がある。   As a technique for simplifying the conditions extracted from existing programs, for example, the input conditions are expanded to an additive standard form, and whether or not each conjunctive type can be satisfied is determined, and unnecessary conditions are removed. There are conventional techniques. In addition, there is a conventional technique that divides a module to be analyzed, reduces the generated path condition itself, and reduces the load of satisfiability determination.

特開2014−186477号公報JP 2014-186477 A

しかしながら、複雑なパス条件を加法標準形へ展開した場合、膨大な数の連言形の論理式が生成される可能性がある。このように膨大な数の論理式が生成された場合、簡約化のため充足不要な論理式を除去するために従来の方法で各論理式の充足可能性の判定を行うと、充足可能性の判定処理を生成された論理式の数以上行うことになるおそれがある。また、解析対象のモジュールの分割を行い生成されるパス条件そのものを減らす従来技術は、ビジネスルールを対象とする場合のようにパス条件そのものが入力として与えられる場合には適用することができない。   However, when a complicated path condition is expanded to an additive standard form, a large number of conjunction logical expressions may be generated. When a huge number of logical expressions are generated in this way, the satisfiability of each logical expression is determined by the conventional method in order to eliminate unsatisfiable logical expressions for simplification. There is a risk that determination processing will be performed more than the number of generated logical expressions. Further, the conventional technique for reducing the path condition itself generated by dividing the module to be analyzed cannot be applied when the path condition itself is given as an input as in the case of a business rule.

開示の技術は、上記に鑑みてなされたものであって、処理実行判定の判定条件の簡約化を高速に行う情報処理プログラム、情報処理装置及び情報処理方法を提供することを目的とする。   The disclosed technology has been made in view of the above, and an object thereof is to provide an information processing program, an information processing apparatus, and an information processing method that perform high-speed simplification of determination conditions for processing execution determination.

本願の開示する情報処理プログラム、情報処理装置及び情報処理方法は、一つの態様において、以下の処理を実行する。入力に対して所定の処理を実行するか否かを判定条件を用いて判定するプログラムを基に生成された、選言で接続される複数の条件群から未選択の条件群を1つ選択し、選択した条件群において連言で接続される変数を含む要素条件を抽出する。また、既に実行した充足可能性の判定結果を基に、抽出した前記要素条件の全てを充足可能か否か判定する。   In one aspect, an information processing program, an information processing apparatus, and an information processing method disclosed in the present application execute the following processing. Select one unselected condition group from a plurality of condition groups connected by disjunction, which is generated based on a program that uses a determination condition to determine whether or not to execute predetermined processing on an input. In the selected condition group, element conditions including variables connected in conjunction are extracted. Further, it is determined whether or not all of the extracted element conditions can be satisfied based on the determination result of the satisfiability already executed.

本願の開示する情報処理プログラム、情報処理装置及び情報処理方法の一つの態様によれば、入力に対する処理実行判定の判定条件の簡約化を高速に行うことができるという効果を奏する。   According to one aspect of the information processing program, the information processing apparatus, and the information processing method disclosed in the present application, there is an effect that the determination condition of the process execution determination with respect to the input can be simplified at high speed.

図1は、実施例1に係る条件簡約化装置のブロック図である。FIG. 1 is a block diagram of a condition simplification apparatus according to the first embodiment. 図2は、プログラム簡約化処理の概要を説明するための図である。FIG. 2 is a diagram for explaining the outline of the program simplification process. 図3は、シンボリック実行装置によるシンボリック実行の概要を説明するための図である。FIG. 3 is a diagram for explaining an outline of symbolic execution by the symbolic execution device. 図4は、DNF展開を説明するための図である。FIG. 4 is a diagram for explaining DNF expansion. 図5は、連言節と識別子との対応を表すテーブルの作成を説明するための図である。FIG. 5 is a diagram for explaining the creation of a table representing the correspondence between consecutive clauses and identifiers. 図6は、連言節判定結果リストの作成を説明するための図である。FIG. 6 is a diagram for explaining creation of a joint clause determination result list. 図7は、1回目の要素条件の抽出を説明するための図である。FIG. 7 is a diagram for explaining extraction of the first element condition. 図8は、1回目のグループの作成を説明するための図である。FIG. 8 is a diagram for explaining the first group creation. 図9は、1回目の各グループの充足可能性判定を説明するための図である。FIG. 9 is a diagram for explaining the first satisfiability determination of each group. 図10は、1回目の連言節判定結果リストへの登録を説明するための図である。FIG. 10 is a diagram for describing registration in the first joint clause determination result list. 図11は、1回目のグループ判定結果リストへの登録を説明するための図である。FIG. 11 is a diagram for explaining registration in the first group determination result list. 図12は、2回目の要素条件の抽出を説明するための図である。FIG. 12 is a diagram for explaining extraction of element conditions for the second time. 図13は、2回目のグループの作成を説明するための図である。FIG. 13 is a diagram for explaining the second group creation. 図14は、グループ51に対する充足可能性判定の処理を説明するための図である。FIG. 14 is a diagram for explaining a satisfiability determination process for the group 51. 図15は、グループ52に対する充足可能性判定の処理を説明するための図である。FIG. 15 is a diagram for explaining the satisfiability determination process for the group 52. 図16は、グループ53に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。FIG. 16 is a diagram for explaining satisfiability determination processing using the group determination result list for the group 53. 図17は、グループ53に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。FIG. 17 is a diagram for explaining satisfiability determination processing using an SMT solver for the group 53. 図18は、グループ54に対する充足可能性判定の処理を説明するための図である。FIG. 18 is a diagram for explaining the satisfiability determination process for the group 54. 図19は、グループ55に対する充足可能性判定の処理を説明するための図である。FIG. 19 is a diagram for explaining a satisfiability determination process for the group 55. 図20は、グループ56に対する充足可能性判定の処理を説明するための図である。FIG. 20 is a diagram for explaining the satisfiability determination process for the group 56. 図21は、グループ57に対する充足可能性判定の処理を説明するための図である。FIG. 21 is a diagram for explaining the satisfiability determination process for the group 57. 図22は、2回目の連言節判定結果リストへの登録を説明するための図である。FIG. 22 is a diagram for explaining the second registration to the joint clause determination result list. 図23は、2回目のグループ判定結果リストへの登録を説明するための図である。FIG. 23 is a diagram for explaining registration in the second group determination result list. 図24は、3574回目の要素条件の抽出を説明するための図である。FIG. 24 is a diagram for explaining the extraction of element conditions for the 3574th time. 図25は、3574回目のグループの作成を説明するための図である。FIG. 25 is a diagram for explaining the 3574th group creation. 図26は、グループ71に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。FIG. 26 is a diagram for explaining the satisfiability determination process using the group determination result list for the group 71. 図27は、グループ71に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。FIG. 27 is a diagram for explaining satisfiability determination processing using an SMT solver for the group 71. 図28は、グループ72に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。FIG. 28 is a diagram for explaining satisfiability determination processing using the group determination result list for the group 72. 図29は、グループ72に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。FIG. 29 is a diagram for explaining the satisfiability determination process using the SMT solver for the group 72. 図30は、グループ73に対する充足可能性判定の処理を説明するための図である。FIG. 30 is a diagram for explaining the satisfiability determination process for the group 73. 図31は、グループ74に対する充足可能性判定の処理を説明するための図である。FIG. 31 is a diagram for explaining the satisfiability determination process for the group 74. 図32は、グループ75に対する充足可能性判定の処理を説明するための図である。FIG. 32 is a diagram for explaining the satisfiability determination process for the group 75. 図33は、グループ76に対する充足可能性判定の処理を説明するための図である。FIG. 33 is a diagram for explaining the satisfiability determination process for the group 76. 図34は、グループ77に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。FIG. 34 is a diagram for explaining the satisfiability determination process using the group determination result list for the group 77. 図35は、グループ77に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。FIG. 35 is a diagram for explaining the satisfiability determination process using the SMT solver for the group 77. 図36は、3574回目の連言節判定結果リストへの登録を説明するための図である。FIG. 36 is a diagram for describing the 3574th registration to the joint clause determination result list. 図37は、充足可能な連言節の抽出を説明するための図である。FIG. 37 is a diagram for explaining extraction of conjunctive clauses that can be satisfied. 図38は、簡約化条件生成部による要素条件の抽出を説明するための図である。FIG. 38 is a diagram for explaining extraction of element conditions by the simplification condition generation unit. 図39は、簡約化連言節の生成を説明するための図である。FIG. 39 is a diagram for explaining the generation of simplified conjunctive clauses. 図40は、実施例1に係る条件簡約化装置による簡約化条件の生成処理のフローチャートである。FIG. 40 is a flowchart of a reduction condition generation process performed by the condition reduction apparatus according to the first embodiment. 図41は、実施例1に係る条件簡約化装置による要素条件の充足可能性判定の処理のフローチャートである。FIG. 41 is a flowchart of processing for determining whether or not an element condition can be satisfied by the condition reducing device according to the first embodiment. 図42は、加法標準形に展開された状態の中間データを表す図である。FIG. 42 is a diagram illustrating intermediate data in a state expanded to an additive standard form. 図43は、グループを用いた1回目の充足可能性判定処理を表す図である。FIG. 43 is a diagram illustrating a first satisfiability determination process using a group. 図44は、グループを用いた2回目の充足可能性判定処理を表す図である。FIG. 44 is a diagram illustrating a second satisfiability determination process using a group. 図45は、グループを用いた充足可能性判定処理完了後の状態を表す図である。FIG. 45 is a diagram illustrating a state after completion of the satisfiability determination process using a group. 図46は、実施例2に係る条件簡約化装置のブロック図である。FIG. 46 is a block diagram of a condition simplification apparatus according to the second embodiment. 図47は、実施例2に係る条件簡約化装置による簡約化条件の生成処理のフローチャートである。FIG. 47 is a flowchart of a reduction condition generation process performed by the condition reduction apparatus according to the second embodiment. 図48は、実施例2に係る条件簡約化装置による要素条件の充足可能性判定の処理のフローチャートである。FIG. 48 is a flowchart of a process of determining whether or not an element condition can be satisfied by the condition reducing device according to the second embodiment. 図49は、情報処理プログラムを実行するコンピュータの一例を示す図である。FIG. 49 is a diagram illustrating an example of a computer that executes an information processing program.

以下に、本願の開示する情報処理プログラム、情報処理装置及び情報処理方法の実施例を図面に基づいて詳細に説明する。なお、以下の実施例により本願の開示する情報処理プログラム、情報処理装置及び情報処理方法が限定されるものではない。   Embodiments of an information processing program, an information processing apparatus, and an information processing method disclosed in the present application will be described below in detail with reference to the drawings. The information processing program, the information processing apparatus, and the information processing method disclosed in the present application are not limited by the following embodiments.

図1は、実施例1に係る条件簡約化装置のブロック図である。図1の条件簡約化装置1が、情報処理装置の一例にあたる。条件簡約化装置1は、シンボリック実行装置3と接続される。また、入力端末2は、シンボリック実行装置3と接続される。   FIG. 1 is a block diagram of a condition simplification apparatus according to the first embodiment. The condition reducing device 1 in FIG. 1 is an example of an information processing device. The condition reduction device 1 is connected to the symbolic execution device 3. The input terminal 2 is connected to the symbolic execution device 3.

シンボリック実行装置3は、解析を行うプログラムの入力を入力端末2から受ける。さらに、シンボリック実行装置3は、シンボリック実行に用いる入力データ項目群の入力を入力端末2から受ける。   The symbolic execution device 3 receives an input of a program for analysis from the input terminal 2. Further, the symbolic execution device 3 receives an input of the input data item group used for symbolic execution from the input terminal 2.

まず、図2を参照して、本実施例におけるプログラムの簡約化処理の概要を説明する。図2は、プログラム簡約化処理の概要を説明するための図である。ここでは、解析を行うプログラム100は、少なくとも加工処理A及び業務処理Bを実行するプログラムである。そして、プログラム100は、例えば、業務処理B実行パス101に示すように、業務処理Bを実行するに至るまでに分岐条件#1〜#15という15個の分岐条件(パス条件)を有する。すなわち、業務処理B実行パス101では、分岐条件#1〜#15の全てを充足する場合に業務処理Bが実行される。図2では、分岐条件#1〜#15が充足される場合を「真」とし、充足されない場合を「偽」として表している。   First, the outline of the program simplification process in the present embodiment will be described with reference to FIG. FIG. 2 is a diagram for explaining the outline of the program simplification process. Here, the analysis program 100 is a program that executes at least the processing process A and the business process B. The program 100 has, for example, 15 branch conditions (path conditions), branch conditions # 1 to # 15, until the business process B is executed, as indicated by the business process B execution path 101. That is, in the business process B execution path 101, the business process B is executed when all of the branch conditions # 1 to # 15 are satisfied. In FIG. 2, the case where the branch conditions # 1 to # 15 are satisfied is expressed as “true”, and the case where the branch conditions # 1 to # 15 are not satisfied is expressed as “false”.

シンボリック実行装置3は、プログラム100に入力データ項目群を用いてシンボリック実行を実施し、加工処理A及び業務処理Bを含む各処理毎に、各処理を実施するに至るまでの分岐条件を連言(AND連結)で接続した形式で抽出する。例えば、シンボリック実行装置3は、業務処理Bを実施するに至るまでの分岐条件をパス条件120として抽出する。ここで、BRMSへの移行の場合、各処理を実施するに至るまでの分岐条件がビジネスルールにあたる。   The symbolic execution device 3 executes symbolic execution using the input data item group in the program 100, and categorizes the branch conditions until each process is executed for each process including the processing process A and the business process B. Extract in the form connected by (AND connection). For example, the symbolic execution device 3 extracts the branch condition up to the execution of the business process B as the path condition 120. Here, in the case of transition to BRMS, the branching conditions until the execution of each process corresponds to the business rule.

そして、条件簡約化装置1は、シンボリック実行装置3が抽出した各処理毎の分岐条件を簡約化する。例えば、条件簡約化装置1は、パス条件120を簡約化して、簡約化条件200を生成する。   Then, the condition simplification device 1 simplifies the branch condition for each process extracted by the symbolic execution device 3. For example, the condition reducing device 1 reduces the path condition 120 and generates the reduced condition 200.

次に、プログラム簡約化処理における、シンボリック実行装置3の処理の概要及び条件簡約化装置1の処理の詳細を説明する。以下では、各装置で実施される処理の具体的な説明を行う場合、図2に示したプログラム100、業務処理B実行パス101及びパス条件120を用いて説明する。   Next, an outline of processing of the symbolic execution device 3 and details of processing of the condition reduction device 1 in the program reduction processing will be described. In the following, when a specific description of the processing executed in each apparatus is performed, the description will be made using the program 100, the business process B execution path 101, and the path condition 120 shown in FIG.

シンボリック実行装置3は、入力されたプログラムに対して、入力データ項目群を入力としてシンボリック実行を行う。これによりシンボリック実行装置3は、プログラムにおいて実行される処理毎に、処理の実行にいたるまでの各分岐条件を連言で接続した形式で抽出する。   The symbolic execution device 3 performs symbolic execution on the input program with the input data item group as an input. As a result, the symbolic execution device 3 extracts each branch condition up to the execution of the process in a form connected in conjunction for each process executed in the program.

図3は、シンボリック実行装置によるシンボリック実行の概要を説明するための図である。シンボリック実行装置3は、業務処理B実行パス101の分岐条件#1を論理式111として抽出する。また、シンボリック実行装置3は、業務処理B実行パス101の分岐条件#2を論理式112として抽出する。シンボリック実行装置3は、業務処理B実行パス101の分岐条件#3〜#15も同様に、論理式として抽出する。そして、シンボリック実行装置3は、論理式111及び112を含む分岐条件#1〜#15を表す論理式を連言で接続し、業務処理B実行パス101を表すパス条件120を生成する。   FIG. 3 is a diagram for explaining an outline of symbolic execution by the symbolic execution device. The symbolic execution device 3 extracts the branch condition # 1 of the business process B execution path 101 as the logical expression 111. Further, the symbolic execution device 3 extracts the branch condition # 2 of the business process B execution path 101 as the logical expression 112. Similarly, the symbolic execution device 3 extracts the branch conditions # 3 to # 15 of the business process B execution path 101 as logical expressions. Then, the symbolic execution device 3 connects the logical expressions representing the branch conditions # 1 to # 15 including the logical expressions 111 and 112 in conjunction, and generates a path condition 120 representing the business process B execution path 101.

ここで、シンボリック実行装置3により生成されたパス条件120は、人がそのまま理解することは困難である。また、シンボリック実行装置3により生成されたパス条件120は、そのままでは長いため、機械で処理するとしても読み込みに時間がかかってしまう。そこで、業務処理B実行パス101を表すパス条件120を簡約化することで、人が理解しやすくすることができ、その条件式を用いて処理を行う場合にも処理時間を短縮することができる。そのため、シンボリック実行装置3が生成したパス条件120は、本実施例に係る条件簡約化装置1により簡約化されることが好ましい。パス条件120の簡約化を実施するため、シンボリック実行装置3は、生成したパス条件120を条件簡約化装置1へ出力する。   Here, it is difficult for a person to understand the path condition 120 generated by the symbolic execution device 3 as it is. In addition, since the path condition 120 generated by the symbolic execution device 3 is long as it is, it takes time to read even if it is processed by a machine. Therefore, by simplifying the path condition 120 representing the business process B execution path 101, it is easy for a person to understand, and the processing time can be shortened even when processing is performed using the conditional expression. . Therefore, the path condition 120 generated by the symbolic execution device 3 is preferably simplified by the condition simplification device 1 according to the present embodiment. In order to perform the simplification of the path condition 120, the symbolic execution device 3 outputs the generated path condition 120 to the condition simplification device 1.

図1に戻って説明を続ける。図1に示すように、条件簡約化装置1は、DNF(Disjunctive Normal Form)展開部11、統括制御部12、要素条件抽出部13、グルーピング部14、充足可能性判定部15、グループ判定結果記憶部16、判定結果記憶部17及び簡約化条件生成部18を有する。   Returning to FIG. 1, the description will be continued. As shown in FIG. 1, the condition simplification device 1 includes a DNF (Disjunctive Normal Form) development unit 11, an overall control unit 12, an element condition extraction unit 13, a grouping unit 14, a satisfiability determination unit 15, and a group determination result storage. Unit 16, determination result storage unit 17, and simplification condition generation unit 18.

DNF展開部11、統括制御部12、要素条件抽出部13、グルーピング部14、充足可能性判定部15及び簡約化条件生成部18は、以下のように実現される。例えば、CPU(Central Processing Unit)やMPU(Micro Processing Unit)等によって、内部の記憶装置に記憶されているプログラムがRAM(Random Access Memory)を作業領域として実行されることにより各部の機能が実現される。また、各部の機能は、例えば、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等の集積回路により実現されるようにしてもよい。また、グループ判定結果記憶部16及び判定結果記憶部17は、ハードディスクやメモリなどで実現される。   The DNF expansion unit 11, the overall control unit 12, the element condition extraction unit 13, the grouping unit 14, the satisfiability determination unit 15, and the simplification condition generation unit 18 are realized as follows. For example, a function stored in an internal storage device is executed by a CPU (Central Processing Unit), an MPU (Micro Processing Unit), or the like using a RAM (Random Access Memory) as a work area, thereby realizing the functions of each unit. The The function of each unit may be realized by an integrated circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). The group determination result storage unit 16 and the determination result storage unit 17 are realized by a hard disk, a memory, or the like.

DNF展開部11は、シンボリック実行装置3が生成したパス条件120の入力を受ける。そして、DNF展開部11は、入力されたパス条件120をDNF展開して加法標準形で表される中間データを生成する。中間データは、複数の連言節が選言で接続された形式を有する。ここで、「選言」とは、命題と命題とを「または」「あるいは」に相当する論理で結合する形式を有する論理式である。また、「連言」とは、命題と命題とを「そして」「および」に相当する論理で結合する論理式である。また、「連言節」とは、複数の命題がそれぞれ連言で接続された論理式である。さらに、「充足可能性判定」とは、連言及び選言の何れか一方もしくは双方を用いて生成された論理式が、ある入力データが与えられた場合に、成立するか否かを判定する処理を指す。すなわち、ある入力データが与えられた場合に、特定の論理式が成立する場合、その入力データが、その特定の論理式を充足可能であるという。   The DNF expansion unit 11 receives an input of the path condition 120 generated by the symbolic execution device 3. Then, the DNF expansion unit 11 generates an intermediate data expressed in an additive standard form by DNF expansion of the input path condition 120. The intermediate data has a format in which a plurality of consecutive clauses are connected by disjunction. Here, the “choice” is a logical expression having a form in which a proposition and a proposition are combined with logic corresponding to “or” or “or”. The “collocation” is a logical expression that connects a proposition and a proposition with a logic equivalent to “and” “and”. Further, the “joint clause” is a logical expression in which a plurality of propositions are connected by conjunctions. Furthermore, “satisfiability determination” is to determine whether a logical expression generated using one or both of conjunction and disjunction is established when given input data is given. Refers to processing. That is, given a certain input data, if a specific logical expression is established, the input data can satisfy the specific logical expression.

ここで、DNF展開部11がDNF展開を行うと、非常に多くの連言節が生成されるおそれがある。この点、DNF展開部11が生成する全ての連言節に対して個別に充足可能性判定を行えば充足可能な連言節の抽出が行えるので、パス条件120の簡約化が行える。しかし、連言節の数が非常に多いため簡約化に時間がかかってしまう。そこで、本実施例に係る条件簡約化装置1の各部は、簡約化を高速に行うために、以下の処理を実施する。DNF展開部11は、中間データを統括制御部12へ出力する。   Here, if the DNF expansion unit 11 performs DNF expansion, a large number of conjunctive clauses may be generated. In this regard, if the satisfiability determination is performed individually for all the conjunctive clauses generated by the DNF expansion unit 11, the satisfiable conjunctive clauses can be extracted, so that the path condition 120 can be simplified. However, since the number of conjunctive clauses is so large, simplification takes time. Therefore, each unit of the condition reducing device 1 according to the present embodiment performs the following processing in order to perform reduction at high speed. The DNF expansion unit 11 outputs the intermediate data to the overall control unit 12.

統括制御部12は、加法標準形で表される中間データの入力をDNF展開部11から受ける。そして、統括制御部12は、取得した中間データから連言節を抽出し、各連言節に識別子(ID:Identifier)を与え、連言節と識別子とが登録されたテーブルを生成する。   The overall control unit 12 receives input of intermediate data expressed in an additive standard form from the DNF expansion unit 11. Then, the overall control unit 12 extracts a conjunctive clause from the acquired intermediate data, gives an identifier (ID: Identifier) to each conjunctive clause, and generates a table in which the conjunctive clause and the identifier are registered.

次に、統括制御部12は、生成したテーブルに対応させて充足可能性の欄を生成し、連言節判定結果リスト140を作成する。連言節判定結果リスト140は、各連言節に対する充足可能性の判定結果を登録するためのリストである。統括制御部12は、作成した連言節判定結果リスト140を判定結果記憶部17へ格納する。   Next, the overall control unit 12 generates a satisfiability column corresponding to the generated table, and creates a joint clause determination result list 140. The joint phrase determination result list 140 is a list for registering determination results of satisfiability with respect to each joint phrase. The overall control unit 12 stores the created joint phrase determination result list 140 in the determination result storage unit 17.

さらに、統括制御部12は、グループ判定結果記憶部16に格納されているグループ判定結果リスト150を初期化する。グループ判定結果リスト150は、後述するようにグループ分けした条件式のグループ毎の充足可能性の判定結果を登録するためのリストである。   Furthermore, the overall control unit 12 initializes the group determination result list 150 stored in the group determination result storage unit 16. The group determination result list 150 is a list for registering a determination result of satisfiability for each group of conditional expressions grouped as described later.

次に、統括制御部12は、連言節判定結果リスト140から連言節を1つ選択する。ここで、本実施例では、統括制御部12は、連言節に割り当てた識別子の小さい順に連言節を選択していくものとする。そして、統括制御部12は、選択した連言節を要素条件抽出部13へ出力する。   Next, the overall control unit 12 selects one linked clause from the linked clause determination result list 140. Here, in this embodiment, it is assumed that the overall control unit 12 selects consecutive clauses in ascending order of identifiers assigned to the consecutive clauses. Then, the overall control unit 12 outputs the selected joint clause to the element condition extraction unit 13.

その後、統括制御部12は、選択した連言節の判定完了の通知を充足可能性判定部15から受信する。判定完了の通知を受信すると、統括制御部12は、次に識別子の値が大きい連言節を選択し、選択した連言節を要素条件抽出部13へ出力する。   Thereafter, the overall control unit 12 receives a notification of completion of determination of the selected consecutive phrase from the satisfiability determination unit 15. Upon receiving the notification of determination completion, the overall control unit 12 selects the next conjunction clause having the largest identifier value, and outputs the selected conjunction clause to the element condition extraction unit 13.

統括制御部12は、充足可能性判定部15による充足可能性判定が終了する度に連言節判定結果リスト140から順次連言節を選択し、要素条件抽出部13に選択した連言節を送信することを、連言節判定結果リスト140の全ての連言節に対して行うまで繰り返す。連言節判定結果リスト140の全ての連言節に対する選択及び送信が完了すると、統括制御部12は、簡約化条件の生成を簡約化条件生成部18に指示する。   The overall control unit 12 sequentially selects conjunctive clauses from the conjunctive clause determination result list 140 every time the satisfiability determination unit 15 finishes the satisfiability determination, and the element condition extraction unit 13 selects the selected conjunctive clauses. The transmission is repeated until it is performed for all the conjunctive clauses in the conjunctive clause determination result list 140. When the selection and transmission for all the conjunctive clauses in the conjunctive clause determination result list 140 is completed, the overall control unit 12 instructs the simplification condition generating unit 18 to generate the simplification condition.

要素条件抽出部13は、統括制御部12から1つずつ連言節の入力を受ける。そして、要素条件抽出部13は、入力された連言節の中から条件の一番小さいくくりである要素条件を抽出する。要素条件とは、例えば、連言節の中で連言によって接続される変数を含む個々の条件式である。要素条件抽出部13は、抽出した要素条件をグルーピング部14へ出力する。   The element condition extraction unit 13 receives an input of a joint phrase from the overall control unit 12 one by one. Then, the element condition extraction unit 13 extracts an element condition that is the smallest condition in the input conjunctive clause. An element condition is, for example, an individual conditional expression including variables connected by conjunction in a conjunction clause. The element condition extraction unit 13 outputs the extracted element conditions to the grouping unit 14.

グルーピング部14は、要素条件抽出部13により抽出された要素条件、すなわち1つの連言節に含まれる全ての種類の要素条件の入力を要素条件抽出部13から受ける。そして、グルーピング部14は、入力された要素条件を予め決められた規則にしたがいグループ分けする。ここで、本実施例では、グルーピング部14は、各要素条件の中に含まれる変数によってグループ分けを行う。ここで、本実施例では、変数を用いてグループ分けをしているが、グループ分けの規則はこれに限らないしグループ分けを行わなくてもよい。さらに、本実施例では、グルーピング部14は、同じグループの中に重複する要素条件がある場合、重複する要素条件を削除して重複を無くす。次に、グルーピング部14は、グループ分けした要素条件を充足可能性判定部15へ出力する。   The grouping unit 14 receives from the element condition extraction unit 13 input of the element conditions extracted by the element condition extraction unit 13, that is, all types of element conditions included in one conjunctive clause. Then, the grouping unit 14 groups the input element conditions according to a predetermined rule. Here, in the present embodiment, the grouping unit 14 performs grouping according to variables included in each element condition. Here, in this embodiment, grouping is performed using variables, but the rules for grouping are not limited to this, and grouping may not be performed. Furthermore, in this embodiment, when there are overlapping element conditions in the same group, the grouping unit 14 deletes the overlapping element conditions to eliminate the overlapping. Next, the grouping unit 14 outputs the grouped element conditions to the satisfiability determination unit 15.

グループ判定結果記憶部16は、充足可能性判定部15による各グループの充足可能性判定の結果が登録されるグループ判定結果リスト150を記憶する。グループ判定結果リスト150には、後述するように、グループ毎にそのグループに含まれる要素条件のハッシュ値が充足可能性判定部15による充足可能性判定の結果に対応させて登録される。   The group determination result storage unit 16 stores a group determination result list 150 in which the result of the satisfiability determination of each group by the satisfiability determination unit 15 is registered. As will be described later, the hash value of the element condition included in each group is registered in the group determination result list 150 in association with the result of the satisfiability determination by the satisfiability determination unit 15.

充足可能性判定部15は、グループ分けされた要素条件の入力をグルーピング部14から受ける。そして、充足可能性判定部15は、グループ毎にそのグループに含まれる要素条件に対して予め決められたハッシュ関数を用いてハッシュ値を求めグループのキーとする。ここで、充足可能性判定部15は、ハッシュ関数として、例えばMD(Message Digest)5又はSHA(Secure Hash Algorithm)などを用いることができる。ここで、要素条件の順序が変わっても、連言で結ばれる場合同じ条件となる。そのため、要素条件の順序が変わっても同じキーとなることが好ましい。そこで、充足可能性判定部15は、グループに含まれる要素条件を所定の順番に整列させてからグループのキーを作成する。   The satisfiability determination unit 15 receives an input of grouped element conditions from the grouping unit 14. Then, the satisfiability determining unit 15 obtains a hash value by using a hash function determined in advance for the element condition included in the group for each group, and uses it as a group key. Here, the satisfiability determining unit 15 can use, for example, MD (Message Digest) 5 or SHA (Secure Hash Algorithm) as a hash function. Here, even if the order of the element conditions is changed, the same condition is obtained when they are connected by conjunction. Therefore, it is preferable that the key is the same even if the order of the element conditions is changed. Therefore, the satisfiability determination unit 15 creates group keys after arranging the element conditions included in the group in a predetermined order.

そして、充足可能性判定部15は、算出したハッシュ関数でグループ判定結果リスト150を検索し、一致するグループの充足可能性の判定結果が有るか否かを判定する。一致するグループの充足可能性の判定結果が有る場合、充足可能性判定部15は、グループ判定結果リスト150に登録された充足可能性の判定結果を取得する。そして、充足可能性判定部15は、取得した充足可能性の判定結果を記憶し、次のグループの選択に移る。   Then, the satisfiability determination unit 15 searches the group determination result list 150 with the calculated hash function, and determines whether there is a determination result of the satisfiability of the matching group. If there is a determination result of the satisfiability of matching groups, the satisfiability determination unit 15 acquires the determination result of the satisfiability registered in the group determination result list 150. Then, the satisfiability determination unit 15 stores the acquired satisfiability determination result, and proceeds to selection of the next group.

これに対して、一致するグループの充足可能性の判定結果がグループ判定結果リスト150に無い場合、充足可能性判定部15は、そのグループに含まれる要素条件を連言で接続し、例えば、SMT(Satisfiability Modulo Theories)ソルバを用いて充足可能性判定を行う。そして、充足可能性判定部15は、取得した充足可能性の判定結果を記憶するとともに、グループ判定結果リスト150に新たに求めたグループの充足可能性の判定結果をグループのハッシュ値とともに登録する。その後、充足可能性判定部15は、次のグループの選択に移る。   On the other hand, when the determination result of the satisfiability of the matching group is not in the group determination result list 150, the sufficiency determination unit 15 connects the element conditions included in the group by conjunctive, for example, SMT. (Satisfiability Modulo Theories) Satisfiability is determined using a solver. Then, the satisfiability determination unit 15 stores the acquired satisfiability determination result, and registers the newly determined group satisfiability determination result together with the group hash value in the group determination result list 150. Thereafter, the satisfiability determination unit 15 proceeds to selection of the next group.

充足可能性判定部15は、グルーピング部14から入力された全てのグループの充足可能性の判定結果を取得するまで、グループを選択し、選択したグループに対してグループ判定結果リスト150又はSMTソルバによる充足可能性の判定結果の取得を繰り返す。   The satisfiability determination unit 15 selects a group until the determination results of the satisfiability of all the groups input from the grouping unit 14 are acquired, and the group determination result list 150 or the SMT solver is used for the selected group. Repeat acquisition of the determination result of satisfiability.

充足可能性判定部15は、グルーピング部14から入力された全てのグループの充足可能性の判定結果の取得が完了すると、判定結果の中に充足不能なグループが有るか否かを検索する。充足不能なグループが有る場合、充足可能性判定部15は、それらグループが属する連言節は充足不能であると判定する。これに対して、判定結果の中に充足不能なグループが無い場合、すなわち、全てのグループが充足可能である場合、充足可能性判定部15は、それらのグループが属する連言節は充足可能であると判定する。そして、充足可能性判定部15は、判定結果記憶部17に格納された連言節判定結果リスト140に各連言節の充足可能性の判定結果を順次登録する。   The satisfiability determination unit 15 searches for whether there is an unsatisfiable group in the determination results when acquisition of the determination results of the satisfiability of all the groups input from the grouping unit 14 is completed. When there are unsatisfiable groups, the satisfiability determination unit 15 determines that the conjunctive clauses to which these groups belong cannot be satisfied. On the other hand, when there is no unsatisfiable group in the determination result, that is, when all the groups are satisfiable, the satisfiability determination unit 15 can satisfy the conjunctive clauses to which these groups belong. Judge that there is. Then, the satisfiability determination unit 15 sequentially registers the determination results of satisfiability of each conjunctive clause in the conjunctive clause determination result list 140 stored in the determination result storage unit 17.

簡約化条件生成部18は、簡約化条件の生成の指示を統括制御部12から受ける。そして、簡約化条件生成部18は、連言節判定結果リスト140を判定結果記憶部17から取得する。   The reduction condition generation unit 18 receives an instruction for generation of the reduction condition from the overall control unit 12. Then, the simplification condition generation unit 18 acquires the joint phrase determination result list 140 from the determination result storage unit 17.

次に、簡約化条件生成部18は、連言節判定結果リスト140から充足可能な連言節を抽出する。そして、簡約化条件生成部18は、抽出した各連言節から要素条件を取り出し、重複する要素条件は1つにまとめて要素条件リストを連言節毎に作成する。   Next, the simplification condition generating unit 18 extracts a conjunctive clause that can be satisfied from the conjunctive clause determination result list 140. Then, the simplification condition generation unit 18 extracts element conditions from the extracted conjunctive clauses, collects overlapping element conditions into one, and creates an element condition list for each conjunctive clause.

次に、簡約化条件生成部18は、作成した要素条件リストに含まれる各要素条件を連言で接続し、各連言節に対応する簡約化連言節を生成する。そして、簡約化条件生成部18は、生成した各簡約化連言節を選言で接続し、簡約化条件200を生成する。   Next, the simplification condition generation unit 18 connects each element condition included in the created element condition list with a conjunction, and generates a simplified conjunction clause corresponding to each conjunction clause. Then, the simplification condition generation unit 18 connects the generated simplification consecutive clauses by disjunction to generate the simplification condition 200.

ここで、具体的な例を用いて中間データのDNF展開から簡約化条件200の生成までの処理についてさらに具体的に説明する。以下は、図2及び3で例示したパス条件120の簡約化条件200の生成についてより詳細に説明する。   Here, the processing from the DNF expansion of the intermediate data to the generation of the simplification condition 200 will be described more specifically using a specific example. Hereinafter, the generation of the simplification condition 200 of the path condition 120 illustrated in FIGS. 2 and 3 will be described in more detail.

DNF展開部11は、シンボリック実行装置3が生成したパス条件120の入力を受ける。そして、DNF展開部11は、図4に示すように、入力されたパス条件120をDNF展開して加法標準形で表される中間データ130を生成する。図4は、DNF展開を説明するための図である。中間データ130は、図4に示すように、連言節131及び132を含む複数の連言節が選言で接続された形式を有する。ここで、DNF展開部11は、例えばパス条件120に対して12320個の連言節を有する中間データ130を生成する。そして、DNF展開部11は、中間データ130を統括制御部12へ出力する。   The DNF expansion unit 11 receives an input of the path condition 120 generated by the symbolic execution device 3. Then, as shown in FIG. 4, the DNF expansion unit 11 performs DNF expansion on the input path condition 120 to generate intermediate data 130 expressed in an additive standard form. FIG. 4 is a diagram for explaining DNF expansion. As shown in FIG. 4, the intermediate data 130 has a format in which a plurality of consecutive clauses including the consecutive clauses 131 and 132 are connected by disjunction. Here, for example, the DNF expansion unit 11 generates intermediate data 130 having 12320 consecutive clauses for the path condition 120. Then, the DNF development unit 11 outputs the intermediate data 130 to the overall control unit 12.

統括制御部12は、加法標準形で表される中間データ130の入力をDNF展開部11から受ける。そして、統括制御部12は、図5に示すように、取得した中間データ130から連言節を抽出し、各連言節に識別子(ID)を与え、連言節と識別子とが登録されたテーブル133を生成する。図5は、連言節と識別子との対応を表すテーブルの作成を説明するための図である。   The overall control unit 12 receives input of intermediate data 130 expressed in an additive standard form from the DNF expansion unit 11. Then, as shown in FIG. 5, the overall control unit 12 extracts a conjunctive clause from the acquired intermediate data 130, gives an identifier (ID) to each conjunctive clause, and the conjunctive clause and the identifier are registered. A table 133 is generated. FIG. 5 is a diagram for explaining the creation of a table representing the correspondence between consecutive clauses and identifiers.

次に、統括制御部12は、図6に示すように、テーブル133の各連言節に対応させて充足可能性の欄を生成し、連言節判定結果リスト140を作成する。図6は、連言節判定結果リストの作成を説明するための図である。統括制御部12は、作成した連言節判定結果リスト140を判定結果記憶部17へ格納する。   Next, as shown in FIG. 6, the overall control unit 12 generates a satisfiability column in association with each conjunctive clause in the table 133 and creates a conjunctive clause determination result list 140. FIG. 6 is a diagram for explaining creation of a joint clause determination result list. The overall control unit 12 stores the created joint phrase determination result list 140 in the determination result storage unit 17.

統括制御部12は、図6に示す連言節判定結果リスト140を生成した後、1回目の選択として、連言節判定結果リスト140から最もIDの小さい連言節141を選択する。そして、統括制御部12は、選択した連言節141を要素条件抽出部13へ出力する。   After generating the combined clause determination result list 140 shown in FIG. 6, the overall control unit 12 selects the combined clause 141 having the smallest ID from the combined clause determination result list 140 as the first selection. Then, the overall control unit 12 outputs the selected joint clause 141 to the element condition extraction unit 13.

要素条件抽出部13は、連言節141の入力を統括制御部12から受ける。そして、要素条件抽出部13は、図7に示すように、連言節141から要素条件を抽出し、抽出した要素条件を並べたデータ411を取得する。ここで、図7は、1回目の要素条件の抽出を説明するための図である。そして、要素条件抽出部13は、連言節141に対応するデータ411をグルーピング部14へ出力する。   The element condition extraction unit 13 receives the input of the joint clause 141 from the overall control unit 12. Then, as shown in FIG. 7, the element condition extraction unit 13 extracts element conditions from the conjunctive clause 141, and acquires data 411 in which the extracted element conditions are arranged. Here, FIG. 7 is a diagram for explaining extraction of the first element condition. Then, the element condition extraction unit 13 outputs data 411 corresponding to the conjunctive clause 141 to the grouping unit 14.

グルーピング部14は、データ411の入力を要素条件抽出部13から受ける。そして、グルーピング部14は、データ411の各要素条件に含まれる変数毎に要素条件を分類する。ここで、要素条件の中に複数の変数が含まれる場合、含まれる変数のいずれかを含む要素条件を統合したグループを作成する。たとえば、図8では、要素条件42は、2つの変数var6及びvar7を含む。この場合、グルーピング部14は、var6又はvar7を含む他の要素条件41と要素条件42とを統合して{var6,var7}という1つのグループを作成する。図8は、1回目のグループの作成を説明するための図である。このように、グルーピング部14は、変数毎に要素条件を分類し、グループデータ412を作成する。そして、グルーピング部14は、連言節141に対応するグループデータ412を充足可能性判定部15へ出力する。   The grouping unit 14 receives the input of the data 411 from the element condition extraction unit 13. Then, the grouping unit 14 classifies the element conditions for each variable included in each element condition of the data 411. Here, when a plurality of variables are included in the element condition, a group in which element conditions including any of the included variables are integrated is created. For example, in FIG. 8, the element condition 42 includes two variables var6 and var7. In this case, the grouping unit 14 creates another group {var6, var7} by integrating the element condition 41 and the element condition 42 including var6 or var7. FIG. 8 is a diagram for explaining the first group creation. Thus, the grouping unit 14 classifies element conditions for each variable and creates group data 412. Then, the grouping unit 14 outputs the group data 412 corresponding to the conjunctive clause 141 to the satisfiability determination unit 15.

充足可能性判定部15は、グループデータ412の入力をグルーピング部14から受ける。そして、充足可能性判定部15は、グループデータ412の各グループに対して、1回目の充足可能性判定を行う。この場合、最初の充足可能性判定であるため、グループ判定結果リスト150にはどのグループの充足可能性の判定結果も登録されていない。そこで、この場合、充足可能性判定部15は、図9に示すように、グループデータ412の全てのグループに対して、SMTソルバを用いて充足可能性判定を行い、各グループに充足可能性の判定結果を対応させたデータ413を取得する。ここでは、{var1}及び{var2}のグループが充足不能である場合で説明する。図9は、1回目の各グループの充足可能性判定を説明するための図である。   The satisfiability determination unit 15 receives the group data 412 from the grouping unit 14. Then, the satisfiability determination unit 15 performs the first satisfiability determination on each group of the group data 412. In this case, since it is the first satisfiability determination, no group satisfiability determination result is registered in the group determination result list 150. Therefore, in this case, as shown in FIG. 9, the satisfiability determination unit 15 performs satisfiability determination for all the groups of the group data 412 using the SMT solver, and the satisfaction of each group. Data 413 corresponding to the determination result is acquired. Here, a case will be described where {var1} and {var2} groups are unsatisfiable. FIG. 9 is a diagram for explaining the first satisfiability determination of each group.

次に、充足可能性判定部15は、データ413に示される記憶した充足可能性の判定結果から連言節141の充足可能性判定を行う。図10は、1回目の連言節判定結果リストへの登録を説明するための図である。ここでは、{var1}及び{var2}のグループが充足不能であるので、充足可能性判定部15は、連言節141は充足不能であると判定する。そして、充足可能性判定部15は、図10に示すように、連言節141の充足可能性の判定結果として充足不能を判定結果記憶部17に格納された連言節判定結果リスト140に登録する。   Next, the satisfiability determination unit 15 performs satisfiability determination of the conjunctive clause 141 from the stored determination result of satisfiability shown in the data 413. FIG. 10 is a diagram for describing registration in the first joint clause determination result list. Here, since the groups {var1} and {var2} are unsatisfiable, the satisfiability determination unit 15 determines that the conjunctive clause 141 is unsatisfiable. Then, as shown in FIG. 10, the satisfiability determination unit 15 registers insufficiency as the determination result of the sufficiency of the conjunctive clause 141 in the conjunctive clause determination result list 140 stored in the determination result storage unit 17. To do.

さらに、充足可能性判定部15は、データ413の各グループの要素条件のハッシュ値を求める。そして、充足可能性判定部15は、図11に示すように、各グループのハッシュ値をキーとして、各キーに対応させて充足可能性の判定結果をグループ判定結果記憶部16に格納されるグループ判定結果リスト150に登録する。図11は、1回目のグループ判定結果リストへの登録を説明するための図である。   Further, the satisfiability determination unit 15 obtains a hash value of the element condition of each group of the data 413. Then, as shown in FIG. 11, the satisfiability determination unit 15 uses the hash value of each group as a key, and stores the determination result of satisfiability in the group determination result storage unit 16 in association with each key. Register in the determination result list 150. FIG. 11 is a diagram for explaining registration in the first group determination result list.

次に、統括制御部12は、2回目の選択として、連言節判定結果リスト140から連言節141の次のIDを有する連言節142を選択する。そして、統括制御部12は、選択した連言節142を要素条件抽出部13へ出力する。   Next, as the second selection, the overall control unit 12 selects a joint clause 142 having the next ID of the joint clause 141 from the joint clause determination result list 140. Then, the overall control unit 12 outputs the selected joint clause 142 to the element condition extraction unit 13.

要素条件抽出部13は、連言節142の入力を統括制御部12から受ける。そして、要素条件抽出部13は、図12に示すように、連言節142から要素条件を抽出し、抽出した要素条件を並べたデータ421を取得する。ここで、図12は、2回目の要素条件の抽出を説明するための図である。そして、要素条件抽出部13は、連言節142に対応するデータ421をグルーピング部14へ出力する。   The element condition extraction unit 13 receives the input of the joint clause 142 from the overall control unit 12. Then, as shown in FIG. 12, the element condition extraction unit 13 extracts element conditions from the conjunctive clause 142 and acquires data 421 in which the extracted element conditions are arranged. Here, FIG. 12 is a diagram for explaining extraction of the second element condition. Then, the element condition extraction unit 13 outputs data 421 corresponding to the conjunctive clause 142 to the grouping unit 14.

グルーピング部14は、データ421の入力を要素条件抽出部13から受ける。そして、グルーピング部14は、図13に示すように、データ421の各要素条件に含まれる変数毎に要素条件を分類し、グループ51〜57を有するグループデータ422を作成する。そして、グルーピング部14は、連言節142に対応するグループデータ422を充足可能性判定部15へ出力する。図13は、2回目のグループの作成を説明するための図である。   The grouping unit 14 receives the input of the data 421 from the element condition extraction unit 13. Then, as illustrated in FIG. 13, the grouping unit 14 classifies the element conditions for each variable included in each element condition of the data 421, and creates group data 422 having groups 51 to 57. Then, the grouping unit 14 outputs the group data 422 corresponding to the conjunctive clause 142 to the satisfiability determination unit 15. FIG. 13 is a diagram for explaining the second group creation.

充足可能性判定部15は、グループデータ422の入力をグルーピング部14から受ける。そして、充足可能性判定部15は、グループデータ422からグループ51を選択する。充足可能性判定部15は、グループ51の充足可能性判定を行う。図14は、グループ51に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ51のキーを求める。そして、充足可能性判定部15は、図14に示すように、グループ51のキーを用いてグループ判定結果リスト150を検索する。ここで、図14では、分かり易いようにグループ判定結果リスト150のキーの欄に要素条件を並べて記載しているが実際には、ハッシュ値が格納される。そして、矢印P1は、充足可能性判定部15による矢印の向かう先のグループのキーでのグループ判定結果リスト150の検索処理を示す。この場合、グループ51のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ51の充足可能性の判定結果61として充足不能を取得する。そして、充足可能性判定部15は、グループ51の充足可能性の判定結果61である充足不能を記憶する。矢印P2は、充足可能性判定部15による矢印P1の検索により取得した充足可能性の判定結果を取得し記憶する処理を示す。以下の説明でも、P1及びP2と同様の矢印は同様の処理を表すものとする。   The satisfiability determination unit 15 receives the group data 422 from the grouping unit 14. Then, the satisfiability determination unit 15 selects the group 51 from the group data 422. The satisfiability determination unit 15 performs satisfiability determination of the group 51. FIG. 14 is a diagram for explaining a satisfiability determination process for the group 51. The satisfiability determination unit 15 obtains a key of the group 51. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 51 as shown in FIG. Here, in FIG. 14, element conditions are listed in the key column of the group determination result list 150 for easy understanding, but in practice, hash values are stored. An arrow P1 indicates search processing of the group determination result list 150 by the key of the group to which the arrow is directed by the satisfiability determination unit 15. In this case, since the key of the group 51 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires “unsatisfiable” as the determination result 61 of the satisfiability of the group 51. Then, the satisfiability determination unit 15 stores “unsatisfiable” which is the determination result 61 of the satisfiability of the group 51. An arrow P2 indicates a process for acquiring and storing the determination result of the satisfiability obtained by the search for the arrow P1 by the satisfiability determination unit 15. In the following description, the same arrow as P1 and P2 represents the same processing.

次に、充足可能性判定部15は、グループデータ422からグループ52を選択する。そして、充足可能性判定部15は、グループ52の充足可能性判定を行う。図15は、グループ52に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ52のキーを求める。そして、充足可能性判定部15は、図15に示すように、グループ52のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ52のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ52の充足可能性の判定結果62として充足不能を取得する。そして、充足可能性判定部15は、グループ52の充足可能性の判定結果62である充足不能を記憶する。   Next, the satisfiability determination unit 15 selects the group 52 from the group data 422. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 52. FIG. 15 is a diagram for explaining the satisfiability determination process for the group 52. The satisfiability determination unit 15 obtains a key for the group 52. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 52 as shown in FIG. In this case, since the key of the group 52 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires the unsatisfiable as the determination result 62 of the satisfiability of the group 52. Then, the satisfiability determination unit 15 stores “unsatisfiable” that is the determination result 62 of the satisfiability of the group 52.

次に、充足可能性判定部15は、グループデータ422からグループ53を選択する。そして、充足可能性判定部15は、グループ53の充足可能性判定を行う。図16は、グループ53に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ53のキーを求める。そして、充足可能性判定部15は、図16に示すように、グループ53のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ53のキーがグループ判定結果リスト150においてヒットしないので、充足可能性判定部15は、グループ53の充足可能性の判定結果63を未判定とする。   Next, the satisfiability determination unit 15 selects the group 53 from the group data 422. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 53. FIG. 16 is a diagram for explaining satisfiability determination processing using the group determination result list for the group 53. The satisfiability determination unit 15 obtains a key for the group 53. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 53 as shown in FIG. In this case, since the key of the group 53 does not hit in the group determination result list 150, the satisfiability determination unit 15 determines that the determination result 63 of the satisfiability of the group 53 is not determined.

グループ判定結果リスト150を用いた場合のグループ53の充足可能性の判定結果63が未判定となったため、充足可能性判定部15は、SMTソルバを用いた充足可能性判定に移行する。図17は、グループ53に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ53の充足可能性の判定結果63が未判定であるので、グループ判定結果リスト150を用いた判定を行った段階では、図17のデータ423を保持する。そして、充足可能性判定部15は、未判定であるグループ53に対してSMTソルバを用いて充足可能性判定を行う。本実施例では、充足可能性判定部15は、グループ53の充足可能性の判定結果63として充足可能を取得し、図17のデータ424を保持する。   Since the determination result 63 of the satisfiability of the group 53 when the group determination result list 150 is used is not determined, the satisfiability determination unit 15 proceeds to the satisfiability determination using the SMT solver. FIG. 17 is a diagram for explaining satisfiability determination processing using an SMT solver for the group 53. The satisfiability determination unit 15 retains the data 423 of FIG. 17 when the determination using the group determination result list 150 is performed because the determination result 63 of the satisfiability of the group 53 is not yet determined. Then, the satisfiability determination unit 15 performs satisfiability determination using the SMT solver for the group 53 that has not been determined. In this embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 63 of the satisfiability of the group 53 and holds the data 424 in FIG.

次に、充足可能性判定部15は、グループデータ422からグループ54を選択する。そして、充足可能性判定部15は、グループ54の充足可能性判定を行う。図18は、グループ54に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ54のキーを求める。そして、充足可能性判定部15は、図18に示すように、グループ54のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ54のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ54の充足可能性の判定結果64として充足可能を取得する。そして、充足可能性判定部15は、グループ54の充足可能性の判定結果64である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects the group 54 from the group data 422. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 54. FIG. 18 is a diagram for explaining the satisfiability determination process for the group 54. The satisfiability determination unit 15 obtains a key for the group 54. Then, as shown in FIG. 18, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 54. In this case, since the key of the group 54 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 64 of the satisfiability of the group 54. The satisfiability determination unit 15 stores the satisfiability that is the determination result 64 of the satisfiability of the group 54.

次に、充足可能性判定部15は、グループデータ422からグループ55を選択する。そして、充足可能性判定部15は、グループ55の充足可能性判定を行う。図19は、グループ55に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ55のキーを求める。そして、充足可能性判定部15は、図19に示すように、グループ55のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ55のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ55の充足可能性の判定結果65として充足可能を取得する。そして、充足可能性判定部15は、グループ55の充足可能性の判定結果65である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects the group 55 from the group data 422. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 55. FIG. 19 is a diagram for explaining a satisfiability determination process for the group 55. The satisfiability determination unit 15 obtains a key for the group 55. Then, as shown in FIG. 19, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 55. In this case, since the key of the group 55 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In this embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 65 of the satisfiability of the group 55. The satisfiability determination unit 15 stores the satisfiability that is the determination result 65 of the satisfiability of the group 55.

次に、充足可能性判定部15は、グループデータ422からグループ56を選択する。そして、充足可能性判定部15は、グループ57の充足可能性判定を行う。図20は、グループ56に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ56のキーを求める。そして、充足可能性判定部15は、図20に示すように、グループ56のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ56のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ56の充足可能性の判定結果66として充足可能を取得する。そして、充足可能性判定部15は、グループ56の充足可能性の判定結果66である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects the group 56 from the group data 422. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 57. FIG. 20 is a diagram for explaining the satisfiability determination process for the group 56. The satisfiability determination unit 15 obtains a key for the group 56. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the keys of the group 56 as shown in FIG. In this case, since the key of the group 56 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 66 of the satisfiability of the group 56. The satisfiability determination unit 15 stores the satisfiability that is the determination result 66 of the satisfiability of the group 56.

次に、充足可能性判定部15は、グループデータ422からグループ57を選択する。そして、充足可能性判定部15は、グループ56の充足可能性判定を行う。図21は、グループ57に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ57のキーを求める。そして、充足可能性判定部15は、図21に示すように、グループ57のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ57のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ57の充足可能性の判定結果67として充足可能を取得する。そして、充足可能性判定部15は、グループ57の充足可能性の判定結果67である充足可能を記憶する。これにより、充足可能性判定部15は、2回目の充足可能性判定である連言節142に対応するグループの充足可能性判定を完了する。   Next, the satisfiability determination unit 15 selects the group 57 from the group data 422. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 56. FIG. 21 is a diagram for explaining the satisfiability determination process for the group 57. The satisfiability determination unit 15 obtains a key of the group 57. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 57 as shown in FIG. In this case, since the key of the group 57 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In this embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 67 of the satisfiability of the group 57. Then, the satisfiability determination unit 15 stores the satisfiability that is the determination result 67 of the satisfiability of the group 57. Thereby, the satisfiability determination part 15 completes the satisfiability determination of the group corresponding to the joint phrase 142 which is the second satisfiability determination.

次に、充足可能性判定部15は、記憶したグループ51〜57の充足可能性の判定結果61〜67から連言節142の充足可能性判定を行う。図22は、2回目の連言節判定結果リストへの登録を説明するための図である。ここでは、{var1}及び{var2}のグループが充足不能であるので、充足可能性判定部15は、連言節142は充足不能であると判定する。そして、充足可能性判定部15は、図22に示すように、連言節142の充足可能性の判定結果として充足不能を判定結果記憶部17に格納される連言節判定結果リスト140に登録する。   Next, the satisfiability determination unit 15 performs satisfiability determination of the conjunctive clause 142 from the determination results 61 to 67 of the satisfiability of the stored groups 51 to 57. FIG. 22 is a diagram for explaining the second registration to the joint clause determination result list. Here, since the groups {var1} and {var2} are unsatisfiable, the sufficiency determination unit 15 determines that the conjunctive clause 142 is unsatisfiable. Then, as shown in FIG. 22, the satisfiability determination unit 15 registers insufficiency as a determination result of the sufficiency of the conjunctive clause 142 in the conjunctive clause determination result list 140 stored in the determination result storage unit 17. To do.

さらに、充足可能性判定部15は、連言節142において新たに充足可能性の判定結果を取得したグループの充足可能性の判定結果をグループ判定結果リスト150に登録する。図23は、2回目のグループ判定結果リストへの登録を説明するための図である。充足可能性判定部15は、図23に示すように、連言節142の各グループの充足可能性の判定結果を含むデータ425から、新たに求めたグループ53の充足可能性の判定結果63を取得する。そして、充足可能性判定部15は、グループ53のキーに充足可能性の判定結果を対応させたエントリ151をグループ判定結果記憶部16に格納されるグループ判定結果リスト150に登録する。   Further, the satisfiability determination unit 15 registers the determination result of the satisfiability of the group for which the determination result of the satisfiability is newly acquired in the joint clause 142 in the group determination result list 150. FIG. 23 is a diagram for explaining registration in the second group determination result list. As shown in FIG. 23, the satisfiability determination unit 15 obtains a newly determined satisfiability determination result 63 of the group 53 from the data 425 including the determination result of the satisfiability of each group of the conjunctive clause 142. get. Then, the satisfiability determination unit 15 registers an entry 151 in which the determination result of satisfiability is associated with the key of the group 53 in the group determination result list 150 stored in the group determination result storage unit 16.

その後、統括制御部12は、連言節判定結果リスト140から連言節の選択を順次行っていく。また、要素条件抽出部13は、入力された連言節に対する要素条件の抽出を繰り返す。また、グルーピング部14は、入力された要素条件のグルーピングを繰り返す。そして、充足可能性判定部15は、入力されたグループの充足可能性判定及びそれらのグループに対応する連言節の充足可能性判定を繰り返す。   Thereafter, the overall control unit 12 sequentially selects the conjunctive clauses from the conjunctive clause determination result list 140. Further, the element condition extraction unit 13 repeats extraction of element conditions for the input conjunctive clause. The grouping unit 14 repeats grouping of the input element conditions. Then, the satisfiability determination unit 15 repeats the satisfiability determination of the input groups and the satisfiability determination of the conjunctive clauses corresponding to those groups.

次に、本実施例における3574回目の充足可能性判定について説明する。図24は、3574回目の要素条件の抽出を説明するための図である。統括制御部12は、3574回目の選択として、連言節判定結果リスト140から連言節143を選択する。そして、統括制御部12は、選択した連言節143を要素条件抽出部13へ出力する。   Next, the 3574th satisfiability determination in the present embodiment will be described. FIG. 24 is a diagram for explaining the extraction of element conditions for the 3574th time. The overall control unit 12 selects the combined clause 143 from the combined clause determination result list 140 as the 3574th selection. Then, the overall control unit 12 outputs the selected joint clause 143 to the element condition extraction unit 13.

要素条件抽出部13は、連言節143の入力を統括制御部12から受ける。そして、要素条件抽出部13は、図24に示すように、連言節143から要素条件を抽出し、抽出した要素条件を並べたデータ431を取得する。そして、要素条件抽出部13は、連言節143に対応するデータ431をグルーピング部14へ出力する。   The element condition extraction unit 13 receives the input of the joint clause 143 from the overall control unit 12. Then, as shown in FIG. 24, the element condition extraction unit 13 extracts element conditions from the conjunctive clause 143, and acquires data 431 in which the extracted element conditions are arranged. Then, the element condition extraction unit 13 outputs data 431 corresponding to the conjunction clause 143 to the grouping unit 14.

グルーピング部14は、データ431の入力を要素条件抽出部13から受ける。そして、グルーピング部14は、図25に示すように、データ431の各要素条件に含まれる変数毎に要素条件を分類し、グループ71〜77を有するグループデータ432を作成する。そして、グルーピング部14は、連言節143に対応するグループデータ432を充足可能性判定部15へ出力する。図25は、3574回目のグループの作成を説明するための図である。   The grouping unit 14 receives the input of the data 431 from the element condition extraction unit 13. Then, as shown in FIG. 25, the grouping unit 14 classifies the element conditions for each variable included in each element condition of the data 431 and creates group data 432 having groups 71 to 77. Then, the grouping unit 14 outputs group data 432 corresponding to the conjunctive clause 143 to the satisfiability determination unit 15. FIG. 25 is a diagram for explaining the 3574th group creation.

充足可能性判定部15は、グループデータ432からグループ71を選択する。そして、充足可能性判定部15は、グループ71の充足可能性判定を行う。図26は、グループ71に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ71のキーを求める。そして、充足可能性判定部15は、図26に示すように、グループ71のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ71のキーがグループ判定結果リスト150においてヒットしないので、充足可能性判定部15は、グループ71の充足可能性の判定結果81を未判定とする。   The satisfiability determination unit 15 selects the group 71 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 71. FIG. 26 is a diagram for explaining the satisfiability determination process using the group determination result list for the group 71. The satisfiability determination unit 15 obtains a key for the group 71. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 71 as shown in FIG. In this case, since the key of the group 71 does not hit in the group determination result list 150, the satisfiability determination unit 15 sets the determination result 81 of the satisfiability of the group 71 as undetermined.

グループ判定結果リスト150を用いた場合のグループ71の充足可能性の判定結果81が未判定となったため、充足可能性判定部15は、SMTソルバを用いた充足可能性判定に移行する。図27は、グループ71に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ71の充足可能性の判定結果81が未判定であるので、グループ判定結果リスト150を用いた判定を行った段階では、図27のデータ433を保持する。そして、充足可能性判定部15は、未判定であるグループ71に対してSMTソルバを用いて充足可能性判定を行う。本実施例では、充足可能性判定部15は、グループ71の充足可能性の判定結果81として充足可能を取得し、図27のデータ434を保持する。   Since the determination result 81 of the satisfiability of the group 71 when the group determination result list 150 is used becomes undetermined, the satisfiability determination unit 15 proceeds to the satisfiability determination using the SMT solver. FIG. 27 is a diagram for explaining satisfiability determination processing using an SMT solver for the group 71. The satisfiability determination unit 15 retains the data 433 of FIG. 27 when the determination using the group determination result list 150 is performed because the determination result 81 of the satisfiability of the group 71 is not yet determined. Then, the satisfiability determination unit 15 performs satisfiability determination using an SMT solver for the group 71 that has not been determined. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 81 of the satisfiability of the group 71, and holds the data 434 in FIG.

次に、充足可能性判定部15は、グループデータ432からグループ72を選択する。そして、充足可能性判定部15は、グループ72の充足可能性判定を行う。図28は、グループ72に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ72のキーを求める。そして、充足可能性判定部15は、図28に示すように、グループ72のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ72のキーがグループ判定結果リスト150においてヒットしないので、充足可能性判定部15は、グループ72の充足可能性の判定結果82を未判定とする。   Next, the satisfiability determination unit 15 selects the group 72 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 72. FIG. 28 is a diagram for explaining satisfiability determination processing using the group determination result list for the group 72. The satisfiability determination unit 15 obtains a key for the group 72. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 72 as shown in FIG. In this case, since the key of the group 72 does not hit in the group determination result list 150, the satisfiability determination unit 15 sets the determination result 82 of the satisfiability of the group 72 as undetermined.

グループ判定結果リスト150を用いた場合のグループ72の充足可能性の判定結果82が未判定となったため、充足可能性判定部15は、SMTソルバを用いた充足可能性判定に移行する。図29は、グループ72に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ72の充足可能性の判定結果82が未判定であるので、グループ判定結果リスト150を用いた判定を行った段階では、図29のデータ435を保持する。そして、充足可能性判定部15は、未判定であるグループ72に対してSMTソルバを用いて充足可能性判定を行う。本実施例では、充足可能性判定部15は、グループ72の充足可能性の判定結果82として充足可能を取得し、図29のデータ436を保持する。   Since the determination result 82 of the satisfiability of the group 72 when the group determination result list 150 is used becomes undetermined, the satisfiability determination unit 15 proceeds to the satisfiability determination using the SMT solver. FIG. 29 is a diagram for explaining the satisfiability determination process using the SMT solver for the group 72. The satisfiability determination unit 15 retains the data 435 of FIG. 29 when the determination using the group determination result list 150 is performed because the determination result 82 of the satisfiability of the group 72 is not yet determined. Then, the satisfiability determination unit 15 performs satisfiability determination using the SMT solver for the group 72 that has not been determined. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 82 of the satisfiability of the group 72, and holds the data 436 in FIG.

次に、充足可能性判定部15は、グループデータ432からグループ73を選択する。そして、充足可能性判定部15は、グループ73の充足可能性判定を行う。図30は、グループ73に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ73のキーを求める。そして、充足可能性判定部15は、図30に示すように、グループ73のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ73のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ73の充足可能性の判定結果83として充足可能を取得する。そして、充足可能性判定部15は、グループ73の充足可能性の判定結果83である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects a group 73 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 73. FIG. 30 is a diagram for explaining the satisfiability determination process for the group 73. The satisfiability determination unit 15 obtains the key of the group 73. Then, as shown in FIG. 30, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 73. In this case, since the key of the group 73 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 83 of the satisfiability of the group 73. Then, the satisfiability determination unit 15 stores the satisfiability that is the determination result 83 of the satisfiability of the group 73.

次に、充足可能性判定部15は、グループデータ432からグループ74を選択する。そして、充足可能性判定部15は、グループ74の充足可能性判定を行う。図31は、グループ74に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ74のキーを求める。そして、充足可能性判定部15は、図31に示すように、グループ74のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ74のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ74の充足可能性の判定結果84として充足可能を取得する。そして、充足可能性判定部15は、グループ74の充足可能性の判定結果84である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects a group 74 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 74. FIG. 31 is a diagram for explaining the satisfiability determination process for the group 74. The satisfiability determination unit 15 obtains a key of the group 74. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 74 as shown in FIG. In this case, since the key of the group 74 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 84 of the satisfiability of the group 74. Then, the satisfiability determination unit 15 stores the satisfiability that is the determination result 84 of the satisfiability of the group 74.

次に、充足可能性判定部15は、グループデータ432からグループ75を選択する。そして、充足可能性判定部15は、グループ75の充足可能性判定を行う。図32は、グループ75に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ75のキーを求める。そして、充足可能性判定部15は、図32に示すように、グループ75のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ75のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ75の充足可能性の判定結果85として充足可能を取得する。そして、充足可能性判定部15は、グループ75の充足可能性の判定結果85である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects a group 75 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 75. FIG. 32 is a diagram for explaining the satisfiability determination process for the group 75. The satisfiability determination unit 15 obtains a key for the group 75. Then, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 75 as shown in FIG. In this case, since the key of the group 75 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 85 of the satisfiability of the group 75. The satisfiability determination unit 15 stores the satisfiability that is the determination result 85 of the satisfiability of the group 75.

次に、充足可能性判定部15は、グループデータ432からグループ76を選択する。そして、充足可能性判定部15は、グループ76の充足可能性判定を行う。図33は、グループ76に対する充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ76のキーを求める。そして、充足可能性判定部15は、図33に示すように、グループ76のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ76のキーがグループ判定結果リスト150においてヒットするので、充足可能性判定部15は、ヒットしたキーに対応する充足可能性の判定結果を取得する。本実施例では、充足可能性判定部15は、グループ76の充足可能性の判定結果86として充足可能を取得する。そして、充足可能性判定部15は、グループ76の充足可能性の判定結果86である充足可能を記憶する。   Next, the satisfiability determination unit 15 selects a group 76 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 76. FIG. 33 is a diagram for explaining the satisfiability determination process for the group 76. The satisfiability determination unit 15 obtains a key for the group 76. Then, as shown in FIG. 33, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 76. In this case, since the key of the group 76 is hit in the group determination result list 150, the satisfiability determination unit 15 acquires the determination result of the satisfiability corresponding to the hit key. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 86 of the satisfiability of the group 76. The satisfiability determination unit 15 stores the satisfiability that is the determination result 86 of the satisfiability of the group 76.

充足可能性判定部15は、グループデータ432からグループ77を選択する。そして、充足可能性判定部15は、グループ77の充足可能性判定を行う。図34は、グループ77に対するグループ判定結果リストを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ77のキーを求める。そして、充足可能性判定部15は、図34に示すように、グループ77のキーを用いてグループ判定結果リスト150を検索する。この場合、グループ77のキーがグループ判定結果リスト150においてヒットしないので、充足可能性判定部15は、グループ77の充足可能性の判定結果87を未判定とする。   The satisfiability determination unit 15 selects a group 77 from the group data 432. Then, the satisfiability determination unit 15 performs the satisfiability determination of the group 77. FIG. 34 is a diagram for explaining the satisfiability determination process using the group determination result list for the group 77. The satisfiability determination unit 15 obtains a key of the group 77. Then, as shown in FIG. 34, the satisfiability determination unit 15 searches the group determination result list 150 using the key of the group 77. In this case, since the key of the group 77 does not hit in the group determination result list 150, the satisfiability determination unit 15 sets the determination result 87 of the satisfiability of the group 77 as undetermined.

グループ判定結果リスト150を用いた場合のグループ77の充足可能性の判定結果87が未判定となったため、充足可能性判定部15は、SMTソルバを用いた充足可能性判定に移行する。図35は、グループ77に対するSMTソルバを用いた充足可能性判定の処理を説明するための図である。充足可能性判定部15は、グループ77の充足可能性の判定結果87が未判定であるので、グループ判定結果リスト150を用いた判定を行った段階では、図35のデータ437を保持する。そして、充足可能性判定部15は、未判定であるグループ77に対してSMTソルバを用いて充足可能性判定を行う。本実施例では、充足可能性判定部15は、グループ77の充足可能性の判定結果87として充足可能を取得し、図35のデータ438を保持する。   Since the determination result 87 of the satisfiability of the group 77 when the group determination result list 150 is used becomes undetermined, the satisfiability determination unit 15 proceeds to the satisfiability determination using the SMT solver. FIG. 35 is a diagram for explaining the satisfiability determination process using the SMT solver for the group 77. The satisfiability determination unit 15 retains the data 437 of FIG. 35 when the determination using the group determination result list 150 is performed because the determination result 87 of the satisfiability of the group 77 is not yet determined. Then, the satisfiability determination unit 15 performs satisfiability determination on the undetermined group 77 using an SMT solver. In the present embodiment, the satisfiability determination unit 15 acquires satisfiability as the determination result 87 of the satisfiability of the group 77, and holds the data 438 in FIG.

次に、充足可能性判定部15は、記憶したグループ71〜77の充足可能性の判定結果81〜87から連言節143の充足可能性判定を行う。図36は、3574回目の連言節判定結果リストへの登録を説明するための図である。ここでは、グループ71〜77の全てが充足可能であるので、充足可能性判定部15は、連言節143は充足可能であると判定する。そして、充足可能性判定部15は、図36に示すように、連言節143の充足可能性の判定結果として充足可能を判定結果記憶部17に格納される連言節判定結果リスト140に登録する。さらに、充足可能性判定部15は、グループ71、72及び77の各キーにそれぞれの充足可能性の判定結果を対応させたエントリをグループ判定結果記憶部16に格納されるグループ判定結果リスト150に登録する。   Next, the satisfiability determination unit 15 performs the satisfiability determination of the conjunctive clause 143 from the determination results 81 to 87 of the satisfiability of the stored groups 71 to 77. FIG. 36 is a diagram for describing the 3574th registration to the joint clause determination result list. Here, since all of the groups 71 to 77 are satisfiable, the satisfiability determination unit 15 determines that the joint clause 143 is satisfiable. Then, as shown in FIG. 36, the satisfiability determination unit 15 registers the satisfaction as a determination result of the sufficiency of the conjunctive clause 143 in the conjunctive clause determination result list 140 stored in the determination result storage unit 17. To do. Further, the satisfiability determination unit 15 adds an entry in which the determination result of each satisfiability is associated with each key of the groups 71, 72, and 77 in the group determination result list 150 stored in the group determination result storage unit 16. sign up.

その後、統括制御部12、要素条件抽出部13、グルーピング部14及び充足可能性判定部15は、連言節判定結果リスト140に記載された全ての連言節に対する充足可能性判定処理を繰り返す。本実施例では、連言節143以外の連言節は、全て充足可能性の判定結果が充足不能であるものとする。連言節判定結果リスト140に記載された全ての連言節の充足可能性判定が完了すると、統括制御部12は、簡約化条件生成部18に簡約化条件の作成を指示する。   Thereafter, the overall control unit 12, the element condition extraction unit 13, the grouping unit 14, and the satisfiability determination unit 15 repeat the satisfiability determination process for all the conjunctive clauses described in the conjunctive clause determination result list 140. In the present embodiment, it is assumed that all the conjunctive clauses other than the conjunctive clause 143 are unsatisfactory in the satisfiability determination result. When the satisfiability determination of all the conjunctive clauses described in the joint clause determination result list 140 is completed, the overall control unit 12 instructs the simplification condition generation unit 18 to create the simplification condition.

簡約化条件生成部18は、図37に示すように、判定結果記憶部17に格納された連言節判定結果リスト140に登録された連言節の中から充足可能性の判定結果が充足可能である連言節を抽出する。本実施例では、充足可能である連言節は連言節143のみであるので、簡約化条件生成部18は、図37に示すように、連言節判定結果リスト140から連言節143のみを抽出する。図37は、充足可能な連言節の抽出を説明するための図である。   As shown in FIG. 37, the simplification condition generation unit 18 can satisfy the determination result of satisfiability from the conjunctive clauses registered in the conjunctive clause determination result list 140 stored in the determination result storage unit 17. Extract the collocation clause. In the present embodiment, since the conjunctive clauses that can be satisfied are only the conjunctive clauses 143, the simplification condition generating unit 18 only includes the conjunctive clauses 143 from the joint clause determination result list 140 as shown in FIG. To extract. FIG. 37 is a diagram for explaining extraction of conjunctive clauses that can be satisfied.

次に、簡約化条件生成部18は、図38に示すように、抽出した連言節143から要素条件を抽出し、抽出した要素条件の中で重複する要素条件を1つにまとめて要素条件を並べた要素条件リスト441を取得する。図38は、簡約化条件生成部による要素条件の抽出を説明するための図である。   Next, as shown in FIG. 38, the simplification condition generation unit 18 extracts element conditions from the extracted conjunctive clause 143, and combines the element conditions that overlap in the extracted element conditions into one element condition. To obtain an element condition list 441. FIG. 38 is a diagram for explaining extraction of element conditions by the simplification condition generation unit.

次に、簡約化条件生成部18は、図39に示すように、要素条件リスト441に含まれる各要素を連言で接続し、連言節143に対応する簡約化連言節160を生成する。図39は、簡約化連言節の生成を説明するための図である。   Next, as shown in FIG. 39, the simplification condition generation unit 18 connects the elements included in the element condition list 441 with conjunctions, and generates a simplification conjunction clause 160 corresponding to the conjunction clause 143. . FIG. 39 is a diagram for explaining the generation of simplified conjunctive clauses.

その後、簡約化条件生成部18は、生成した簡約化連言節を選言で接続して簡約化条件200を生成する。ただし、本実施例では、簡約化連言節160のみが生成されたので、簡約化条件生成部18は、簡約化連言節160をそのまま簡約化条件200とする。   Thereafter, the simplification condition generation unit 18 generates the simplification condition 200 by connecting the generated simplified conjunction clauses by disjunction. However, in this embodiment, since only the simplified conjunctive clause 160 is generated, the simplification condition generating unit 18 sets the simplified conjunctive clause 160 as the simplification condition 200 as it is.

次に、図40を参照して、本実施例に係る条件簡約化装置1による簡約化条件の生成の全体的な流れについて説明する。図40は、実施例1に係る条件簡約化装置による簡約化条件の生成処理のフローチャートである。   Next, with reference to FIG. 40, the overall flow of the generation of the reduction conditions by the condition reduction device 1 according to the present embodiment will be described. FIG. 40 is a flowchart of a reduction condition generation process performed by the condition reduction apparatus according to the first embodiment.

DNF展開部11は、シンボリック実行装置3が生成したパス条件の入力を受ける。そして、DNF展開部11は、取得したパス条件をDNF展開し中間データ130を生成する(ステップS1)。その後、DNF展開部11は、生成した中間データ130を統括制御部12へ出力する。   The DNF expansion unit 11 receives an input of a path condition generated by the symbolic execution device 3. Then, the DNF expansion unit 11 performs DNF expansion on the acquired path condition to generate intermediate data 130 (step S1). Thereafter, the DNF expansion unit 11 outputs the generated intermediate data 130 to the overall control unit 12.

統括制御部12は、加法標準形で表される中間データ130の入力をDNF展開部11から受ける。次に、統括制御部12は、取得した中間データ130から連言節を抽出し識別子を与える。そして、統括制御部12は、IDが割り当てられた各連言節の充足可能性の判定結果を登録するための連言節判定結果リスト140を生成する(ステップS2)。そして、統括制御部12は、生成した連言節判定結果リスト140を判定結果記憶部17へ格納する。   The overall control unit 12 receives input of intermediate data 130 expressed in an additive standard form from the DNF expansion unit 11. Next, the overall control unit 12 extracts conjunctive clauses from the acquired intermediate data 130 and gives an identifier. Then, the overall control unit 12 generates a joint clause determination result list 140 for registering a determination result of satisfiability of each joint clause to which the ID is assigned (step S2). Then, the overall control unit 12 stores the generated joint phrase determination result list 140 in the determination result storage unit 17.

次に、統括制御部12は、グループ判定結果記憶部16に格納されているグループ判定結果リスト150を初期化する(ステップS3)。   Next, the overall control unit 12 initializes the group determination result list 150 stored in the group determination result storage unit 16 (step S3).

統括制御部12は、連言節判定結果リスト140に登録された連言節の中から未判定の連言節を1つ選択する(ステップS4)。そして、統括制御部12は、選択した連言節を要素条件抽出部13へ出力する。   The overall control unit 12 selects one undetermined joint clause from the joint clauses registered in the joint clause determination result list 140 (step S4). Then, the overall control unit 12 outputs the selected joint clause to the element condition extraction unit 13.

要素条件抽出部13は、連言節の入力を統括制御部12から受ける。そして、要素条件抽出部13は、取得した連言節から要素条件を抽出する(ステップS5)。この時、要素条件抽出部13は、重複する連言節を1つにまとめる。その後、要素条件抽出部13は、抽出した要素条件を、グルーピング部14へ出力する。   The element condition extraction unit 13 receives an input of a joint phrase from the overall control unit 12. Then, the element condition extraction unit 13 extracts an element condition from the acquired conjunctive clause (step S5). At this time, the element condition extraction unit 13 combines overlapping conjunctive clauses into one. Thereafter, the element condition extraction unit 13 outputs the extracted element conditions to the grouping unit 14.

グルーピング部14は、連言節に含まれる要素条件の入力を要素条件抽出部13から受ける。そして、グルーピング部14は、各要素条件に含まれる変数を基準として要素条件を分類してグループを生成する(ステップS6)。そして、グルーピング部14は、グループ化した要素条件を充足可能性判定部15へ出力する。   The grouping unit 14 receives input of element conditions included in the conjunctive clause from the element condition extraction unit 13. Then, the grouping unit 14 classifies the element conditions on the basis of the variable included in each element condition, and generates a group (step S6). Then, the grouping unit 14 outputs the grouped element conditions to the satisfiability determination unit 15.

次に、充足可能性判定部15は、グループ化された要素条件の入力をグルーピング部14から受ける。そして、充足可能性判定部15は、グループ毎に要素条件の充足可能性判定を行う(ステップS7)。   Next, the satisfiability determination unit 15 receives an input of grouped element conditions from the grouping unit 14. Then, the satisfiability determination unit 15 performs satisfiability determination of the element condition for each group (step S7).

次に、充足可能性判定部15は、各グループの要素条件の充足可能性の判定結果を基に、連言節の充足可能性判定を行う。そして、充足可能性判定部15は、連言節の充足可能性の判定結果を判定結果記憶部17に格納された連言節判定結果リスト140に登録する(ステップS8)。そして、充足可能性判定部15は、選択された連言節の充足可能性判定の完了を統括制御部12に通知する。   Next, the satisfiability determination unit 15 performs the sufficiency determination of the conjunctive clause based on the determination result of the satisfiability of the element condition of each group. Then, the satisfiability determination unit 15 registers the determination result of the sufficiency of conjunctive clauses in the conjunctive clause determination result list 140 stored in the determination result storage unit 17 (step S8). Then, the satisfiability determination unit 15 notifies the overall control unit 12 of the completion of the satisfiability determination of the selected conjunctive clause.

統括制御部12は、充足可能性判定部15からの充足可能性判定の完了通知を受けて、連言節判定結果リスト140に登録された全ての連言節の充足可能性判定が完了したか否かを判定する(ステップS9)。充足可能性判定を行っていない連言節が残っている場合(ステップS9:否定)、統括制御部12は、ステップS4へ戻る。   Whether the overall control unit 12 has received the completion notification of the satisfiability determination from the satisfiability determination unit 15 and has completed the satisfiability determination of all the conjunctive clauses registered in the combined clause determination result list 140 It is determined whether or not (step S9). If there is a conjunctive clause that has not undergone satisfiability determination (No at Step S9), the overall control unit 12 returns to Step S4.

これに対して、連言節判定結果リスト140に登録された全ての連言節の充足可能性判定が完了した場合(ステップS9:肯定)、統括制御部12は、簡約化条件の生成を簡約化条件生成部18に指示する。簡約化条件生成部18は、統括制御部12からの指示を受けて、連言節判定結果リスト140から充足可能な連言節を抽出する(ステップS10)。   On the other hand, when the sufficiency determination of all the conjunctive clauses registered in the conjunctive clause determination result list 140 is completed (step S9: affirmative), the overall control unit 12 simplifies the generation of the simplification condition. To the activating condition generator 18. In response to the instruction from the overall control unit 12, the simplification condition generation unit 18 extracts a conjunctive clause that can be satisfied from the joint clause determination result list 140 (step S <b> 10).

次に、簡約化条件生成部18は、抽出した各連言節から要素条件を抽出し、重複する要素条件を1つにまとめて、要素条件リストを作成する(ステップS11)。   Next, the simplification condition generation unit 18 extracts element conditions from the extracted consecutive clauses, collects overlapping element conditions into one, and creates an element condition list (step S11).

次に、簡約化条件生成部18は、要素条件リストに含まれる各要素条件を連言で接続し簡約化連言節160を生成する(ステップS12)。   Next, the simplification condition generation unit 18 connects each element condition included in the element condition list with a conjunction and generates a simplified conjunction clause 160 (step S12).

次に、簡約化条件生成部18は、簡約化連言節160を選言で接続し、簡約化条件200を生成する(ステップS13)。   Next, the simplification condition generation unit 18 connects the simplified conjunctive clause 160 by disjunction, and generates the simplification condition 200 (step S13).

次に、図41を参照して、本実施例に係る条件簡約化装置1による要素条件の充足可能性判定の処理の流れについて説明する。図41は、実施例1に係る条件簡約化装置による要素条件の充足可能性判定の処理のフローチャートである。図41に示すフローは、図40のステップS7で実行される処理の一例にあたる。   Next, with reference to FIG. 41, the flow of processing for determining whether or not the element condition can be satisfied by the condition reducing device 1 according to the present embodiment will be described. FIG. 41 is a flowchart of processing for determining whether or not an element condition can be satisfied by the condition reducing device according to the first embodiment. The flow shown in FIG. 41 is an example of the process executed in step S7 of FIG.

充足可能性判定部15は、要素条件のグループの中から未選択のグループを1つ選択する(ステップS21)。   The satisfiability determination unit 15 selects one unselected group from the group of element conditions (step S21).

次に、充足可能性判定部15は、グループに含まれる要素条件に対して予め決められたハッシュ関数を用いてハッシュを行い、グループのキーを作成する(ステップS22)。   Next, the satisfiability determining unit 15 performs hashing by using a predetermined hash function for the element conditions included in the group, and creates a key for the group (step S22).

次に、充足可能性判定部15は、作成したキーでグループ判定結果リスト150を検索し、グループ判定結果リスト150にキーが存在するか否かを判定する(ステップS23)。キーが存在している場合(ステップS23:肯定)、充足可能性判定部15は、グループ判定結果リスト150に登録されている充足可能性を取得し、ステップS28へ進む。   Next, the satisfiability determination unit 15 searches the group determination result list 150 with the created key, and determines whether or not the key exists in the group determination result list 150 (step S23). When the key exists (step S23: Yes), the satisfiability determination unit 15 acquires the satisfiability registered in the group determination result list 150, and proceeds to step S28.

これに対して、キーが存在していない場合(ステップS23:否定)、充足可能性判定部15は、SMTソルバによる充足可能性判定を実行する(ステップS24)。そして、充足可能性判定部15は、そのグループが充足可能か否かを判定する(ステップS25)。   On the other hand, when the key does not exist (Step S23: No), the satisfiability determination unit 15 performs the satisfiability determination by the SMT solver (Step S24). Then, the satisfiability determination unit 15 determines whether or not the group can be satisfied (step S25).

充足可能な場合(ステップS25:肯定)、充足可能性判定部15は、グループの充足可能をグループ判定結果リスト150に登録する(ステップS26)。これに対して、充足不能な場合(ステップS25:否定)、充足可能性判定部15は、グループの充足不能をグループ判定結果リスト150に登録する(ステップS27)。ここで、図41のフローでは、SMTソルバによる充足可能判定をした場合に、新たにグループ判定結果リスト150への登録が行われることを明確にするため、充足可能性判定部15は、グループの判定毎に登録を行っている。ただし、上述したように、充足可能性判定部15は、連言節に含まれる全てのグループの充足可能性判定を行った後に、グループ判定結果リスト150への登録を行ってもよい。   If it is satisfiable (step S25: Yes), the satisfiability determination unit 15 registers the group satisfiability in the group determination result list 150 (step S26). On the other hand, when it is unsatisfiable (step S25: No), the sufficiency possibility determination unit 15 registers the unsatisfiability of the group in the group determination result list 150 (step S27). Here, in the flow of FIG. 41, in order to clarify that registration to the group determination result list 150 is newly performed when the satisfiability determination by the SMT solver is performed, the satisfiability determination unit 15 Registration is performed for each judgment. However, as described above, the satisfiability determination unit 15 may perform registration to the group determination result list 150 after performing satisfiability determination of all the groups included in the conjunctive clause.

そして、充足可能性判定部15は、グループの充足可能性の判定結果を記憶する(ステップS28)。   Then, the satisfiability determination unit 15 stores the determination result of the group satisfiability (step S28).

次に、充足可能性判定部15は、要素条件のグループの中の全てのグループの充足可能性判定を完了したか否かを判定する(ステップS29)。充足可能性判定を行っていないグループが残っている場合(ステップS29:否定)、充足可能性判定部15は、ステップS21へ戻る。   Next, the satisfiability determination unit 15 determines whether or not the satisfiability determination of all the groups in the element condition group has been completed (step S29). When the group which has not performed satisfiability possibility determination remains (step S29: No), the sufficiency possibility determination part 15 returns to step S21.

これに対して、要素条件のグループの中の全てのグループの充足可能性判定が完了した場合(ステップS29:肯定)、充足可能性判定部15は、1つの連言節に対応する要素条件の充足可能性判定処理を終了する。   On the other hand, when the satisfiability determination of all the groups in the element condition group is completed (step S29: affirmative), the satisfiability determination unit 15 determines the element condition corresponding to one conjunctive clause. The satisfiability determination process ends.

ここで、図42〜45を参照して、条件簡約化装置1による充足可能性判定処理の高速化の効果について説明する。図42は、加法標準形に展開された状態の中間データを表す図である。図43は、グループを用いた1回目の充足可能性判定処理を表す図である。図44は、グループを用いた2回目の充足可能性判定処理を表す図である。図45は、グループを用いた充足可能性判定処理完了後の状態を表す図である。   Here, with reference to FIGS. 42 to 45, the effect of speeding up the satisfiability determination process by the condition reducing device 1 will be described. FIG. 42 is a diagram illustrating intermediate data in a state expanded to an additive standard form. FIG. 43 is a diagram illustrating a first satisfiability determination process using a group. FIG. 44 is a diagram illustrating a second satisfiability determination process using a group. FIG. 45 is a diagram illustrating a state after completion of the satisfiability determination process using a group.

図42に示すように、DNF展開により生成された中間データ130は、連言節131及び132を含む12320種類の連言節を有する。ここで、連言節131に対しての充足可能性判定、連言節132に対しての充足可能性判定、というように各連言節に対して充足可能性判定を行った場合、12320回の充足可能性判定を行うことになる。   As shown in FIG. 42, the intermediate data 130 generated by the DNF expansion has 12320 kinds of consecutive clauses including consecutive clauses 131 and 132. Here, when the satisfiability determination is performed for each conjunctive clause, such as the satisfiability determination for the conjunctive clause 131 and the satisfiability determination for the conjunctive clause 132, 12320 times Will be determined.

これに対して、本実施例では、図43に示すように、連言節131をグループ化し充足可能性判定を行う。1回目は未だどのグループに対しても充足可能性の判定結果は出ていないので、充足可能性判定部15は、各グループに対してSMTソルバを用いた充足可能性判定を行う。   On the other hand, in the present embodiment, as shown in FIG. Since the determination result of satisfiability has not yet been output for any group at the first time, the satisfiability determination unit 15 performs satisfiability determination using an SMT solver for each group.

しかし、2回目の連言節132の充足可能性判定においては、図44に示すように、既にグループ群501に含まれるグループに関しては充足可能性判定が行われており、充足可能性判定部15は、単にその結果を取得するだけである。そして、この場合、グループ502に対してのみ、充足可能性判定部15は、SMTソルバを用いた充足可能性判定を行う。   However, in the second determination of the satisfiability of the conjunctive clause 132, as shown in FIG. 44, the satisfiability determination has already been performed for the groups included in the group group 501, and the satisfiability determination unit 15 Just get the result. In this case, the satisfiability determination unit 15 performs satisfiability determination using the SMT solver only for the group 502.

最終的に、図45に示すように、充足可能性判定部15は、1694種類のグループに対してSMTソルバを用いた充足可能性判定を行うことで、中間データ130に含まれる全ての連言節の充足可能性判定を完了する。すなわち、条件簡約化装置1は、要素条件をグループ化し、同じ要素条件の組には既存の充足可能性の判定結果を用いることで、SMTソルバを用いた判定回数を、連言節毎に別個に充足可能性判定を行う場合に比べて、1694/12320に低減することができる。   Finally, as shown in FIG. 45, the satisfiability determination unit 15 performs satisfiability determination using an SMT solver for 1694 types of groups, and thereby, all conjuncts included in the intermediate data 130. Complete the clause satisfiability assessment. That is, the condition simplification device 1 groups the element conditions and uses the existing determination result of the satisfiability for the same set of element conditions, so that the number of determinations using the SMT solver is separated for each conjunctive clause. It can be reduced to 1694/12320 compared to the case where the satisfaction possibility determination is performed.

以上に説明したように、本実施例に係る条件簡約化装置は、グループ毎の充足可能性の判定結果を記憶しておき、1度判定を行った要素条件の組み合わせのグループに対しては判定結果を再利用する。これにより、本実施例に係る条件簡約化装置は、プログラムにおける処理実行判定の判定条件の簡約化を高速に行うことができる。   As described above, the condition simplification apparatus according to the present embodiment stores a determination result of satisfiability for each group, and determines for a group of element condition combinations that have been determined once. Reuse the results. Thereby, the condition simplification apparatus according to the present embodiment can simplify the determination condition of the process execution determination in the program at high speed.

また、本実施例に係る条件簡約化装置は、充足可能性判定の対象となる連言節を、関連する要素条件でグループ化し、グループ毎に充足可能性判定を行う。これにより、充足可能性判定を行う対象のバリエーションを少なくすることができる。特に、連言形へ変形された条件の場合、同じ要素条件の組み合わせが複数回出現する性質があるため、グループ化による高速化の効果が大きくなる。   Moreover, the condition simplification apparatus according to the present embodiment groups the conjunctive clauses that are the targets of satisfiability determination according to related element conditions, and performs satisfiability determination for each group. Thereby, the variation of the object which performs satisfiability possibility determination can be decreased. In particular, in the case of a condition transformed into a conjunctive form, since the combination of the same element conditions appears multiple times, the effect of speeding up by grouping is increased.

図46は、実施例2に係る条件簡約化装置のブロック図である。本実施例に係る条件簡約化装置1は、ある連言節におけるグループの充足可能性判定を行う際に、充足不能と判定された場合、その連言節を充足不能と判定し、その後のグループの判定を行わないことが実施例1と異なる。以下では、グループの充足可能性判定及び連言節の充足可能性判定を主に説明する。以下の説明では、実施例1と同じ各部の機能については説明を省略する。   FIG. 46 is a block diagram of a condition simplification apparatus according to the second embodiment. When the condition simplification device 1 according to the present embodiment determines that a group in a certain conjunctive phrase is satisfiable, the condition simplification apparatus 1 determines that the conjunctive phrase is unsatisfiable, and the group after that The difference from the first embodiment is that this determination is not performed. In the following, group satisfiability determination and conjunctive clause satisfiability determination will be mainly described. In the following description, the description of the functions of the same parts as those in the first embodiment will be omitted.

本実施例に係る充足可能性判定部15は、連言節の要素条件を登録するための要素条件リストを有する。充足可能性判定部15は、充足可能性判定の対象とする連言節に含まれるグループの情報をグルーピング部14から受ける。そして、充足可能性判定部15は、要素条件リストを初期化し、未だ要素条件が登録されていない状態にする。   The satisfiability determination unit 15 according to the present embodiment has an element condition list for registering element conditions of a joint clause. The satisfiability determination unit 15 receives from the grouping unit 14 information on groups included in the conjunctive clauses that are targets of satisfiability determination. Then, the satisfiability determination unit 15 initializes the element condition list so that no element condition is registered yet.

次に、充足可能性判定部15は、グループを1つ選択する。そして、充足可能性判定部15は、選択したグループの要素条件に対して予め決められたハッシュ関数を用いてハッシュを行いグループのキーを作成する。さらに、充足可能性判定部15は、作成したキーを用いてグループ判定結果リスト150を検索する。   Next, the satisfiability determination unit 15 selects one group. Then, the satisfiability determining unit 15 performs hashing using a predetermined hash function for the element condition of the selected group, and creates a group key. Further, the satisfiability determination unit 15 searches the group determination result list 150 using the created key.

作成したキーがグループ判定結果リスト150でヒットした場合、充足可能性判定部15は、グループ判定結果リスト150を用いてそのグループが充足可能か否かを判定する。そのグループが充足可能な場合、充足可能性判定部15は、グループに含まれる要素条件を要素条件リストへ追加する。この場合、充足可能性判定部15は、重複する要素条件は1つにまとめて登録する。これに対して、そのグループが充足不能の場合、充足可能性判定部15は、判定対象の連言節を充足不能と判定して、その連言節の充足可能性判定を終了する。   When the created key is hit in the group determination result list 150, the satisfiability determination unit 15 uses the group determination result list 150 to determine whether or not the group can be satisfied. When the group is satisfiable, the satisfiability determination unit 15 adds the element condition included in the group to the element condition list. In this case, the satisfiability determination unit 15 registers overlapping element conditions as one. On the other hand, if the group is unsatisfiable, the satisfiability determination unit 15 determines that the determination target conjunctive phrase is unsatisfiable, and ends the constrainability determination of the conjunctive phrase.

また、作成したキーがグループ判定結果リスト150でヒットしない場合、充足可能性判定部15は、そのグループに対してSMTソルバによる充足可能性判定を実行する。そして、そのグループが充足可能な場合、充足可能性判定部15は、グループ判定結果リスト150にそのグループの充足可能性である充足不能を登録する。そして、充足可能性判定部15は、判定対象の連言節を充足不能と判定して、その連言節の充足可能性判定を終了する。   When the created key does not hit in the group determination result list 150, the satisfiability determination unit 15 performs satisfiability determination by the SMT solver on the group. If the group is satisfiable, the satisfiability determination unit 15 registers in the group determination result list 150 the unsatisfiability that is the satisfiability of the group. Then, the satisfiability determining unit 15 determines that the determination target conjunctive phrase is unsatisfiable, and ends the satisfiability determination of the conjunctive phrase.

これに対して、そのグループが充足可能な場合、充足可能性判定部15は、グループ判定結果リスト150にそのグループの充足可能性として充足可能を登録する。さらに、充足可能性判定部15は、グループに含まれる要素条件を要素条件リストへ追加する。   On the other hand, when the group is satisfiable, the satisfiability determination unit 15 registers the satisfiability as the satisfiability of the group in the group determination result list 150. Further, the satisfiability determination unit 15 adds the element condition included in the group to the element condition list.

グループ判定結果リスト150に各グループの充足可能性を登録することにより、充足可能性判定部15は、同じ要素条件を有するグループに対するSMTソルバによる充足判定を回避することができる。   By registering the satisfiability of each group in the group determination result list 150, the sufficiency determination unit 15 can avoid the satisfaction determination by the SMT solver for the groups having the same element condition.

さらに、充足可能性判定部15は、充足可能性判定の対象とする連言節の全てのグループの判定が完了したか否かを判定する。充足可能性の判定が完了していないグループがある場合、充足可能性判定部15は、次のグループの判定に進む。このように、充足可能性判定部15は、充足可能性判定の対象とする連言節の全てのグループの判定が完了する、又はグループが充足不能と判定されるまで充足可能性判定を繰り返す。   Furthermore, the satisfiability determination unit 15 determines whether or not the determination of all the groups of the conjunctive clauses that are the targets of the satisfiability determination has been completed. If there is a group for which the satisfiability determination has not been completed, the satisfiability determination unit 15 proceeds to the determination of the next group. As described above, the satisfiability determination unit 15 repeats the satisfiability determination until the determination of all the groups of the conjunctive clauses that are the targets of the satisfiability determination is completed or the group is determined to be unsatisfiable.

充足可能性判定部15は、連言節の全てのグループが充足可能と判定された場合、その連言節の要素条件リストを判定結果記憶部17に格納する。さらに、充足可能性判定部15は、連言節の充足可能を統括制御部12に通知する。このように、充足可能性判定部15は、各連言節の充足可能性判定を行い、全てのグループが充足可能とされた連言節毎に要素条件リストを判定結果記憶部17に格納する。   The satisfiability determination unit 15 stores the element condition list of the conjunctive clauses in the determination result storage unit 17 when it is determined that all groups of the conjunctive clauses can be satisfied. Further, the satisfiability determination unit 15 notifies the overall control unit 12 that the conjunctive clause can be satisfied. As described above, the satisfiability determination unit 15 performs satisfiability determination of each conjunctive clause, and stores the element condition list in the determination result storage unit 17 for each conjunctive clause in which all groups can be satisfied. .

簡約化条件生成部18は、簡約化連言節の作成の指示を統括制御部12から受ける。次に、簡約化条件生成部18は、判定結果記憶部17の中から指定された連言節の要素条件リストを取得する。そして、簡約化条件生成部18は、取得した要素条件リストに記載された要素条件を連言で接続し簡約化連言節を作成する。その後、簡約化条件生成部18は、判定結果記憶部17に格納された簡約化連言節リスト170に作成した簡約化連言節を登録する。   The simplification condition generation unit 18 receives an instruction to create a simplified conjunctive clause from the overall control unit 12. Next, the simplification condition generation unit 18 acquires the element condition list of the specified joint clause from the determination result storage unit 17. Then, the simplification condition generation unit 18 connects the element conditions described in the acquired element condition list with conjunctions, and creates a reduction conjunction clause. Thereafter, the simplification condition generation unit 18 registers the created simplified conjunctive clause in the simplified conjunctive clause list 170 stored in the determination result storage unit 17.

その後、簡約化条件生成部18は、簡約化条件200の生成の指示を統括制御部12から受ける。そして、簡約化条件生成部18は、簡約化連言節リスト170に登録された簡約化連言節を選言で接続し、簡約化条件200を生成する。   Thereafter, the simplification condition generation unit 18 receives an instruction to generate the simplification condition 200 from the overall control unit 12. Then, the simplification condition generation unit 18 connects the simplified conjunctive clauses registered in the simplified conjunctive clause list 170 by disjunction, and generates the simplification condition 200.

統括制御部12は、連言節の充足可能の通知を充足可能性判定部15から受けると、その連言節に対する簡約化連言節の作成の指示を簡約化条件生成部18に指示する。また、統括制御部12は、全ての連言節の充足可能性判定の終了の通知を充足可能性判定部15から受けると、簡約化条件の生成を簡約化条件生成部18に指示する。   When the overall control unit 12 receives from the satisfiability determination unit 15 a notification that the conjunctive clause is satisfiable, the general control unit 12 instructs the simplification condition generation unit 18 to create a simplified conjunctive clause for the conjunctive clause. When the overall control unit 12 receives a notification of completion of the satisfiability determination of all the conjunctive clauses from the satisfiability determination unit 15, the overall control unit 12 instructs the simplification condition generation unit 18 to generate a simplification condition.

次に、図47を参照して、本実施例に係る条件簡約化装置1による簡約化条件の生成の全体的な流れについて説明する。図47は、実施例2に係る条件簡約化装置による簡約化条件の生成処理のフローチャートである。   Next, with reference to FIG. 47, an overall flow of generation of the reduction condition by the condition reduction device 1 according to the present embodiment will be described. FIG. 47 is a flowchart of a reduction condition generation process performed by the condition reduction apparatus according to the second embodiment.

DNF展開部11は、シンボリック実行装置3が生成したパス条件の入力を受ける。そして、DNF展開部11は、取得したパス条件をDNF展開し中間データを生成する(ステップS101)。その後、DNF展開部11は、生成した中間データを統括制御部12へ出力する。   The DNF expansion unit 11 receives an input of a path condition generated by the symbolic execution device 3. Then, the DNF expansion unit 11 performs DNF expansion on the acquired path condition to generate intermediate data (step S101). Thereafter, the DNF expansion unit 11 outputs the generated intermediate data to the overall control unit 12.

統括制御部12は、加法標準形で表される中間データの入力をDNF展開部11から受ける。次に、統括制御部12は、取得した中間データから連言節を抽出し識別子を与える。さらに、統括制御部12は、判定結果記憶部17に格納された簡約化連言節リスト170を初期化する(ステップS102)。   The overall control unit 12 receives input of intermediate data expressed in an additive standard form from the DNF expansion unit 11. Next, the overall control unit 12 extracts a conjunctive clause from the acquired intermediate data and gives an identifier. Furthermore, the overall control unit 12 initializes the simplified conjunctive phrase list 170 stored in the determination result storage unit 17 (step S102).

次に、統括制御部12は、グループ判定結果記憶部16に格納されているグループ判定結果リスト150を初期化する(ステップS103)。   Next, the overall control unit 12 initializes the group determination result list 150 stored in the group determination result storage unit 16 (step S103).

統括制御部12は、中間データから抽出した連言節の中から未判定の連言節を1つ選択する(ステップS104)。そして、統括制御部12は、選択した連言節を要素条件抽出部13へ出力する。   The overall control unit 12 selects one undetermined link clause from the link clauses extracted from the intermediate data (step S104). Then, the overall control unit 12 outputs the selected joint clause to the element condition extraction unit 13.

要素条件抽出部13は、連言節の入力を統括制御部12から受ける。そして、要素条件抽出部13は、取得した連言節から要素条件を抽出する(ステップS105)。この時、要素条件抽出部13は、重複する連言節を1つにまとめる。その後、要素条件抽出部13は、抽出した要素条件を、グルーピング部14へ出力する。   The element condition extraction unit 13 receives an input of a joint phrase from the overall control unit 12. Then, the element condition extraction unit 13 extracts element conditions from the acquired conjunctive clauses (step S105). At this time, the element condition extraction unit 13 combines overlapping conjunctive clauses into one. Thereafter, the element condition extraction unit 13 outputs the extracted element conditions to the grouping unit 14.

グルーピング部14は、連言節に含まれる要素条件の入力を要素条件抽出部13から受ける。そして、グルーピング部14は、各要素条件に含まれる変数を基準として要素条件を分類してグループを生成する(ステップS106)。そして、グルーピング部14は、グループ化した要素条件を充足可能性判定部15へ出力する。   The grouping unit 14 receives input of element conditions included in the conjunctive clause from the element condition extraction unit 13. Then, the grouping unit 14 generates a group by classifying the element conditions based on the variables included in each element condition (step S106). Then, the grouping unit 14 outputs the grouped element conditions to the satisfiability determination unit 15.

次に、充足可能性判定部15は、グループ化された要素条件の入力をグルーピング部14から受ける。そして、充足可能性判定部15は、グループ毎に要素条件リストを作成しながら連言節の充足可能性判定を行う(ステップS107)。この処理については次に詳細に説明する。   Next, the satisfiability determination unit 15 receives an input of grouped element conditions from the grouping unit 14. Then, the satisfiability determination unit 15 determines the sufficiency of the conjunctive clause while creating an element condition list for each group (step S107). This process will be described in detail next.

そして、充足可能性判定部15は、連言節が充足可能か否かを判定する(ステップS108)。連言節が充足不能の場合(ステップS108:否定)、充足可能性判定部15は、選択された連言節の充足可能性判定の完了を統括制御部12に通知し、処理はステップS111へ進む。   Then, the satisfiability determination unit 15 determines whether or not the conjunctive clause can be satisfied (step S108). If the conjunctive clause is unsatisfiable (No at Step S108), the satisfiability determination unit 15 notifies the overall control unit 12 of the completion of the satisfiability determination of the selected conjunctive clause, and the process proceeds to Step S111. move on.

これに対して、連言節が充足可能の場合(ステップS108:肯定)、充足可能性判定部15は、連言節の充足可能を統括制御部12に通知する。その後、簡約化条件生成部18は、簡約化連言節の作成の指示を統括制御部12から受けて、指定された連言節に対応する要素条件リストに記載された要素条件を連言で接続し、簡約化連言節を生成する(ステップS109)。   On the other hand, if the conjunctive clause is satisfiable (step S108: affirmative), the satisfiability determining unit 15 notifies the overall control unit 12 that the conjunctive clause is satisfiable. After that, the simplification condition generation unit 18 receives an instruction to create a simplification conjunction clause from the overall control unit 12, and uses the conjunctive element condition described in the element condition list corresponding to the designated conjunction clause. Connect and generate a simplified conjunctive clause (step S109).

次に、簡約化条件生成部18は、生成した簡約化連言節を簡約化連言節リスト170へ追加する(ステップS110)。充足可能性判定部15は、選択された連言節の充足可能性判定の完了を統括制御部12に通知する。   Next, the simplification condition generation unit 18 adds the generated simplified conjunction clause to the simplified conjunction clause list 170 (step S110). The satisfiability determination unit 15 notifies the overall control unit 12 of the completion of the satisfiability determination of the selected conjunctive clause.

統括制御部12は、充足可能性判定部15からの充足可能性判定の完了通知を受けて、中間データから抽出した全ての連言節の充足可能性判定が完了したか否かを判定する(ステップS111)。充足可能性判定を行っていない連言節が残っている場合(ステップS111:否定)、統括制御部12は、ステップS104へ戻る。   The overall control unit 12 receives the notification of the satisfiability determination completion from the satisfiability determination unit 15 and determines whether or not the satisfiability determination of all the conjunctive clauses extracted from the intermediate data has been completed ( Step S111). If there are still phrases that have not undergone satisfiability determination (No at Step S111), the overall control unit 12 returns to Step S104.

これに対して、中間データから抽出した全ての連言節の充足可能性判定が完了した場合(ステップS111:肯定)、統括制御部12は、簡約化条件200の生成を簡約化条件生成部18に指示する。簡約化条件生成部18は、判定結果記憶部17に格納された簡約化連言節リスト170に登録された簡約化連言節を取得する。そして、簡約化条件生成部18は、取得した簡約化連言節を選言で接続し、簡約化条件200を生成する(ステップS112)。   On the other hand, when the determination of satisfiability of all the conjunctive clauses extracted from the intermediate data is completed (step S111: affirmative), the overall control unit 12 generates the reduction condition 200 by the reduction condition generation unit 18. To instruct. The simplification condition generation unit 18 acquires the simplified conjunctive clause registered in the simplified conjunctive clause list 170 stored in the determination result storage unit 17. Then, the simplification condition generation unit 18 connects the acquired simplified conjunction clauses by disjunction, and generates the simplification condition 200 (step S112).

次に、図48を参照して、本実施例に係る条件簡約化装置1による連言節の充足判定の処理の流れについて説明する。図48は、実施例2に係る条件簡約化装置による要素条件の充足判定の処理のフローチャートである。図48に示すフローは、図47のステップS107で実行される処理の一例にあたる。   Next, with reference to FIG. 48, the flow of processing for determining whether or not a conjunctive phrase is satisfied by the condition reducing device 1 according to the present embodiment will be described. FIG. 48 is a flowchart of the element condition satisfaction determination process performed by the condition simplification apparatus according to the second embodiment. The flow shown in FIG. 48 is an example of the process executed in step S107 of FIG.

充足可能性判定部15は、要素条件リストを初期化する(ステップS121)。次に、充足可能性判定部15は、要素条件のグループの中から未選択のグループを1つ選択する(ステップS122)。   The satisfiability determination unit 15 initializes the element condition list (step S121). Next, the satisfiability determination unit 15 selects one unselected group from the group of element conditions (step S122).

次に、充足可能性判定部15は、グループに含まれる要素条件に対して予め決められたハッシュ関数を用いてハッシュを行い、グループのキーを作成する(ステップS123)。   Next, the satisfiability determination unit 15 performs hashing using a predetermined hash function for the element conditions included in the group, and creates a key for the group (step S123).

次に、充足可能性判定部15は、作成したキーでグループ判定結果リスト150を検索し、グループ判定結果リスト150にキーが存在するか否かを判定する(ステップS124)。キーが存在している場合(ステップS124:肯定)、充足可能性判定部15は、グループ判定結果リスト150に登録されている充足可能性の判定結果から、そのグループが充足可能か否かを判定する(ステップS125)。   Next, the satisfiability determination unit 15 searches the group determination result list 150 with the created key, and determines whether or not the key exists in the group determination result list 150 (step S124). When the key exists (step S124: affirmative), the satisfiability determination unit 15 determines whether the group is satisfiable from the determination result of the satisfiability registered in the group determination result list 150. (Step S125).

そのグループが充足可能な場合(ステップS125:肯定)、充足可能性判定部15は、ステップS130へ進む。これに対して、そのグループが充足不能な場合(ステップS125:否定)、充足可能性判定部15は、充足可能性判定の対象とした連言節を充足不能と判定し、連言節の充足可能性判定を終了する。   If the group is satisfiable (step S125: affirmative), the satisfiability determination unit 15 proceeds to step S130. On the other hand, when the group is unsatisfiable (step S125: No), the satisfiability determination unit 15 determines that the conjunctive clause targeted for the satisfiability determination is unsatisfiable and satisfies the conjunctive clause. End the possibility determination.

これに対して、キーが存在していない場合(ステップS124:否定)、充足可能性判定部15は、SMTソルバによる充足可能性判定を実行する(ステップS126)。そして、充足可能性判定部15は、そのグループが充足可能か否かを判定する(ステップS127)。   On the other hand, when the key does not exist (No at Step S124), the satisfiability determination unit 15 performs the satisfiability determination by the SMT solver (Step S126). Then, the satisfiability determination unit 15 determines whether or not the group can be satisfied (step S127).

充足不能な場合(ステップS127:否定)、充足可能性判定部15は、グループの充足不能をグループ判定結果リスト150に登録する(ステップS128)。そして、充足可能性判定部15は、充足可能性判定の対象とした連言節を充足不能と判定し、連言節の充足可能性判定を終了する。   If it is not satisfiable (No at Step S127), the satisfiability determination unit 15 registers that the group cannot be satisfied in the group determination result list 150 (Step S128). Then, the satisfiability determination unit 15 determines that the conjunctive phrase that is the target of the satisfiability determination is unsatisfiable, and ends the sufficiency determination of the conjunctive phrase.

これに対して、充足可能な場合(ステップS127:肯定)、充足可能性判定部15は、グループの充足可能をグループ判定結果リスト150に登録する(ステップS129)。   On the other hand, when it is satisfiable (step S127: affirmative), the satisfiability determination unit 15 registers that the group is satisfiable in the group determination result list 150 (step S129).

そして、充足可能性判定部15は、そのグループに含まれる要素条件を要素条件リストへ登録する(ステップS130)。   Then, the satisfiability determination unit 15 registers the element conditions included in the group in the element condition list (step S130).

次に、充足可能性判定部15は、要素条件のグループの中の全てのグループの充足可能性判定を完了したか否かを判定する(ステップS131)。充足可能性判定を行っていないグループが残っている場合(ステップS131:否定)、充足可能性判定部15は、ステップS122へ戻る。   Next, the satisfiability determination unit 15 determines whether or not the satisfiability determination of all the groups in the element condition group has been completed (step S131). When the group which has not performed satisfiability possibility determination remains (step S131: No), the sufficiency possibility determination part 15 returns to step S122.

これに対して、要素条件のグループの中の全てのグループの充足可能性判定が完了した場合(ステップS131:肯定)、充足可能性判定部15は、充足可能性判定の対象とした連言節を充足可能と判定し、連言節の充足可能性判定を終了する。   On the other hand, when the satisfiability determination of all the groups in the element condition group is completed (step S131: affirmative), the satisfiability determination unit 15 uses the conjunctive clauses that are the targets of the satisfiability determination. Is determined to be satisfiable, and the satisfiability determination of the conjunctive clause is terminated.

以上に説明したように、本実施例に係る条件簡約化装置は、グループが充足不能な場合に、そのグループが属する連言節を充足不能と判定し、次の連言節の判定に移る。これにより、不要なグループの充足可能性の判定を抑制することができ、より高速に簡約化条件を生成することができる。   As described above, when the group cannot be satisfied, the conditional simplification apparatus according to the present embodiment determines that the conjunctive clause to which the group belongs cannot be satisfied, and proceeds to the determination of the next conjunctive clause. Thereby, it is possible to suppress the determination of the possibility of satisfying an unnecessary group, and it is possible to generate the simplification condition at a higher speed.

ここで、各実施例で図示した各部の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各部の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。   Here, each component of each part illustrated in each embodiment does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each unit is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed / integrated in arbitrary units according to various loads or usage conditions. Can be configured.

さらに、各装置で行われる各種処理機能は、CPU(またはMPU、MCU(Micro Controller Unit)等のマイクロ・コンピュータ)上で、その全部または任意の一部を実行するようにしてもよい。また、各種処理機能は、CPU(またはMPU、MCU等のマイクロ・コンピュータ)で解析実行されるプログラム上、またはワイヤードロジックによるハードウェア上で、その全部または任意の一部を実行するようにしてもよいことは言うまでもない。   Furthermore, various processing functions performed by each device may be executed entirely or arbitrarily on a CPU (or a microcomputer such as an MPU or MCU (Micro Controller Unit)). In addition, various processing functions may be executed in whole or in any part on a program that is analyzed and executed by a CPU (or a microcomputer such as an MPU or MCU) or on hardware based on wired logic. Needless to say, it is good.

ところで、上記の実施例で説明した各種の処理は、予め用意されたプログラムをコンピュータで実行することで実現できる。そこで、以下では、上記の実施例と同様の機能を有するプログラムを実行するコンピュータの一例を説明する。図49は、情報処理プログラムを実行するコンピュータの一例を示す図である。   By the way, the various processes described in the above embodiments can be realized by executing a program prepared in advance by a computer. Therefore, in the following, an example of a computer that executes a program having the same function as in the above embodiment will be described. FIG. 49 is a diagram illustrating an example of a computer that executes an information processing program.

図49に示すように、コンピュータ900は、各種演算処理を実行するCPU901と、データ入力を受け付ける入力装置902と、モニタ903とを有する。また、コンピュータ900は、記憶媒体からプログラム等を読み取る媒体読取装置904と、各種装置と接続するためのインタフェース装置905と、他の情報処理装置等と有線または無線により接続するための通信装置906とを有する。また、コンピュータ900は、各種情報を一時記憶するRAM907と、ハードディスク装置908とを有する。また、各装置901〜908は、バス909に接続される。   As illustrated in FIG. 49, the computer 900 includes a CPU 901 that executes various arithmetic processes, an input device 902 that receives data input, and a monitor 903. The computer 900 also includes a medium reading device 904 that reads a program and the like from a storage medium, an interface device 905 for connecting to various devices, and a communication device 906 for connecting to other information processing devices and the like by wire or wirelessly. Have The computer 900 also includes a RAM 907 that temporarily stores various information and a hard disk device 908. Each device 901 to 908 is connected to a bus 909.

ハードディスク装置908には、図1及び46に示したDNF展開部11、統括制御部12、要素条件抽出部13、グルーピング部14、充足可能性判定部15及び簡約化条件生成部18の各処理部と同様の機能を有する情報処理プログラムが記憶される。また、ハードディスク装置908には、グループ判定結果記憶部16及び判定結果記憶部17、並びに、情報処理プログラムを実現するための各種データが記憶される。入力装置902は、例えば、コンピュータ900の管理者から操作情報、管理情報等の各種情報の入力を受け付ける。モニタ903は、例えば、コンピュータ900の管理者に対して表示画面、管理情報の画面および各種画面を表示する。媒体読取装置904は、例えば、記録媒体に記録された情報を読み取る。インタフェース装置905は、例えば印刷装置等が接続される。通信装置906は、例えば、図示しないネットワークと接続され、各種装置と各種情報をやりとりする。   The hard disk device 908 includes processing units such as the DNF expansion unit 11, the overall control unit 12, the element condition extraction unit 13, the grouping unit 14, the satisfiability determination unit 15, and the reduction condition generation unit 18 illustrated in FIGS. 1 and 46. An information processing program having the same function is stored. The hard disk device 908 stores the group determination result storage unit 16 and the determination result storage unit 17 and various data for realizing the information processing program. The input device 902 receives input of various information such as operation information and management information from an administrator of the computer 900, for example. The monitor 903 displays, for example, a display screen, a management information screen, and various screens for the administrator of the computer 900. The medium reading device 904 reads information recorded on a recording medium, for example. The interface device 905 is connected to a printing device, for example. The communication device 906 is connected to a network (not shown), for example, and exchanges various information with various devices.

CPU901は、ハードディスク装置908に記憶された各プログラムを読み出して、RAM907に展開して実行することで、各種の処理を行う。また、これらのプログラムは、コンピュータ900を図1及び46に示したDNF展開部11、統括制御部12、要素条件抽出部13、グルーピング部14、充足可能性判定部15及び簡約化条件生成部18として機能させることができる。   The CPU 901 reads out each program stored in the hard disk device 908, develops it in the RAM 907, and executes it to perform various processes. These programs are stored in the computer 900 by the DNF expansion unit 11, the overall control unit 12, the element condition extraction unit 13, the grouping unit 14, the satisfiability determination unit 15, and the reduction condition generation unit 18 shown in FIGS. Can function as.

なお、上記の情報処理プログラムは、必ずしもハードディスク装置908に記憶されている必要はない。例えば、コンピュータ900が読み取り可能な記憶媒体に記憶されたプログラムを、コンピュータ900が読み出して実行するようにしてもよい。コンピュータ900が読み取り可能な記憶媒体は、例えば、CD−ROMやDVDディスク、USBメモリ等の可搬型記録媒体、フラッシュメモリ等の半導体メモリ、ハードディスクドライブ等が対応する。また、公衆回線、インターネット、LAN等に接続された装置にこの情報処理プログラムを記憶させておき、コンピュータ900がこれらから情報処理プログラムを読み出して実行するようにしてもよい。   Note that the above information processing program is not necessarily stored in the hard disk device 908. For example, the computer 900 may read and execute a program stored in a storage medium readable by the computer 900. The storage medium readable by the computer 900 corresponds to, for example, a portable recording medium such as a CD-ROM, a DVD disk, and a USB memory, a semiconductor memory such as a flash memory, a hard disk drive, and the like. Alternatively, the information processing program may be stored in a device connected to a public line, the Internet, a LAN, or the like, and the computer 900 may read out and execute the information processing program therefrom.

さらに、以上の各実施例に係る条件簡約化装置を用いた場合の効果についてまとめて説明する。   Furthermore, the effect at the time of using the condition reduction apparatus which concerns on each above Example is demonstrated collectively.

まず、1つの適用方法として例えば以下の方法がある。あるプログラムを改修した場合に、改修前のプログラムから抽出したパス条件と改修後のプログラムから抽出したパス条件とを比較する。そして、改修前後で同じ入力値を与えて出力値が等価でない場合に真となるパス条件を抽出する。そして、そのパス条件に対して各実施例に係る条件簡約化装置を用いて簡約化条件を生成することで、利用者は改修前後でパス条件の挙動がどうして変わるのかを理解することが容易となる。さらに、その後、生成した簡易条件に対してSMTソルバなどの制約ソルバを用いて充足可能性判定を行い、改修後で挙動が変わる入力データを取得することができる。この時に、各実施例に係る条件簡約化装置により生成された簡約化条件を用いることで、制約ソルバを実行する情報処理装置にデータを読み込ます時間を短縮することができる。   First, for example, there is the following method as one application method. When a certain program is repaired, the path condition extracted from the program before the repair is compared with the path condition extracted from the program after the repair. Then, a path condition that is true when the same input value is given before and after the repair and the output values are not equivalent is extracted. And, by generating the reduction condition using the condition reduction device according to each embodiment for the pass condition, it is easy for the user to understand how the behavior of the pass condition changes before and after the refurbishment. Become. Furthermore, after that, the satisfiability determination is performed on the generated simple condition using a constraint solver such as an SMT solver, and input data whose behavior changes after the modification can be acquired. At this time, by using the reduction condition generated by the condition reduction apparatus according to each embodiment, it is possible to shorten the time for reading data into the information processing apparatus that executes the constraint solver.

さらに、他の適用方法として例えば以下の方法がある。あるプログラムを改修した場合に、改修前後のプログラムのそれぞれから抽出したパス条件に対して各実施例に係る条件簡約化装置を用いて簡約化条件をそれぞれ生成する。これにより、利用者はパス条件が容易に理解できる形となり、利用者が人手でプログラムを改修する際の手がかりとすることができる。その後、簡約化条件を手掛かりとして改修されたプログラムの改修前後のパス条件を比較し、同じ入力値を与えて出力値が等価でない場合に真となるパス条件を抽出する。その後、生成した簡易条件に対してSMTソルバなどの制約ソルバを用いて充足可能性判定を行い、改修後で挙動が変わる入力データを取得することができる。   Further, as another application method, for example, there are the following methods. When a certain program is refurbished, simplification conditions are respectively generated for the path conditions extracted from the programs before and after the refurbishment using the condition simplification device according to each embodiment. As a result, the user can easily understand the path condition, and can be used as a clue when the user manually modifies the program. Thereafter, the path conditions before and after the modification of the program modified using the simplification condition are compared, and the path condition that is true when the same input value is given and the output values are not equivalent is extracted. Thereafter, a satisfiability determination is performed on the generated simple condition using a constraint solver such as an SMT solver, and input data whose behavior changes after the modification can be acquired.

1 条件簡約化装置
2 入力端末
3 シンボリック実行装置
11 DNF展開部
12 統括制御部
13 要素条件抽出部
14 グルーピング部
15 充足可能性判定部
16 グループ判定結果記憶部
17 判定結果記憶部
18 簡約化条件生成部
100 プログラム
120 パス条件
130 中間データ
140 連言節判定結果リスト
150 グループ判定結果リスト
160 簡約化連言節
DESCRIPTION OF SYMBOLS 1 Condition simplification apparatus 2 Input terminal 3 Symbolic execution apparatus 11 DNF expansion | deployment part 12 General control part 13 Element condition extraction part 14 Grouping part 15 Satisfiability determination part 16 Group determination result memory | storage part 17 Judgment result memory | storage part 18 Simplification condition production | generation 18 Part 100 Program 120 Path condition 130 Intermediate data 140 Conjunctive clause judgment result list 150 Group judgment result list 160 Simplified conjunctive clause

Claims (6)

入力に対して所定の処理を実行するか否かを判定条件を用いて判定するプログラムを基に生成された、選言で接続される複数の条件群から未選択の条件群を1つ選択し、選択した条件群において連言で接続される変数を含む要素条件を抽出し、
既に実行した充足可能性の判定結果を基に、抽出した前記要素条件の全てを充足可能か否か判定する
処理をコンピュータに実行させることを特徴とする情報処理プログラム。
Select one unselected condition group from a plurality of condition groups connected by disjunction, which is generated based on a program that uses a determination condition to determine whether or not to execute predetermined processing on an input. , Extract element conditions including variables connected in conjunction in the selected condition group,
An information processing program for causing a computer to execute a process of determining whether or not all of the extracted element conditions can be satisfied based on a determination result of satisfiability already executed.
前記判定の処理は、選択した条件群に含まれる前記要素条件をグループ化し、前記グループ毎に前記要素条件が充足可能か否かを判定し、且つ前記グループにおいて既に前記要素条件が充足可能か否かの判定が実行されている場合、既存の判定結果を用いて判定を行い、全てのグループにおいて前記要素条件の充足が可能な場合に選択した条件群が充足可能と判定することを特徴とする請求項1に記載の情報処理プログラム。   The determination processing groups the element conditions included in the selected condition group, determines whether or not the element conditions can be satisfied for each group, and whether or not the element conditions can already be satisfied in the group. When the determination is performed, the determination is performed using the existing determination result, and it is determined that the selected condition group can be satisfied when the element condition can be satisfied in all the groups. The information processing program according to claim 1. 各前記要素条件に含まれる変数毎に前記要素条件をグループ化することを特徴とする請求項2に記載の情報処理プログラム。   The information processing program according to claim 2, wherein the element conditions are grouped for each variable included in each element condition. 前記プログラムに対するシンボリック実行の結果を加法標準形に展開して中間データを生成することを特徴とする請求項1〜3のいずれか一つに記載の情報処理プログラム。   4. The information processing program according to claim 1, wherein intermediate data is generated by expanding a result of symbolic execution on the program into an additive standard form. 入力に対して所定の処理を実行するか否かを判定条件を用いて判定するプログラムを基に生成された、選言で接続される複数の条件群から未選択の条件群を1つ選択する条件群選択部と、
前記条件群選択部により選択された前記条件群において連言で接続される変数を含む要素条件を抽出する要素条件抽出部と、
前記要素条件抽出部により抽出された前記要素条件の全てが充足可能か否かを、既に実行した充足可能性の判定結果を基に判定する充足可能性判定部と
を備えたことを特徴とする情報処理装置。
One unselected condition group is selected from a plurality of condition groups connected by disjunction, which is generated based on a program that uses a determination condition to determine whether or not to execute predetermined processing on an input. A condition group selector;
An element condition extraction unit that extracts element conditions including variables connected in conjunction in the condition group selected by the condition group selection unit;
A satisfiability determination unit that determines whether or not all of the element conditions extracted by the element condition extraction unit are satisfiable based on a determination result of satisfiability that has already been performed. Information processing device.
サーバが、
入力に対して所定の処理を実行するか否かを判定条件を用いて判定するプログラムを基に生成された、選言で接続される複数の条件群から未選択の条件群を1つ選択し、選択した条件群において連言で接続される変数を含む要素条件を抽出し、
既に実行した充足可能性の判定結果を基に、抽出した前記要素条件の全てを充足可能か否か判定する
ことを特徴とする情報処理方法。
The server
Select one unselected condition group from a plurality of condition groups connected by disjunction, which is generated based on a program that uses a determination condition to determine whether or not to execute predetermined processing on an input. , Extract element conditions including variables connected in conjunction in the selected condition group,
An information processing method comprising: determining whether or not all of the extracted element conditions can be satisfied based on a determination result of satisfiability already executed.
JP2017109345A 2017-06-01 2017-06-01 Information processing program, information processing device and information processing method Active JP6870483B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017109345A JP6870483B2 (en) 2017-06-01 2017-06-01 Information processing program, information processing device and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017109345A JP6870483B2 (en) 2017-06-01 2017-06-01 Information processing program, information processing device and information processing method

Publications (2)

Publication Number Publication Date
JP2018205969A true JP2018205969A (en) 2018-12-27
JP6870483B2 JP6870483B2 (en) 2021-05-12

Family

ID=64957171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017109345A Active JP6870483B2 (en) 2017-06-01 2017-06-01 Information processing program, information processing device and information processing method

Country Status (1)

Country Link
JP (1) JP6870483B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011052030A1 (en) * 2009-10-26 2011-05-05 株式会社 東芝 Precondition generator
JP2013143067A (en) * 2012-01-12 2013-07-22 Fujitsu Ltd Generating device, generating method, and generating program
WO2016121074A1 (en) * 2015-01-30 2016-08-04 株式会社日立製作所 Software inspection apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011052030A1 (en) * 2009-10-26 2011-05-05 株式会社 東芝 Precondition generator
JP2013143067A (en) * 2012-01-12 2013-07-22 Fujitsu Ltd Generating device, generating method, and generating program
WO2016121074A1 (en) * 2015-01-30 2016-08-04 株式会社日立製作所 Software inspection apparatus

Also Published As

Publication number Publication date
JP6870483B2 (en) 2021-05-12

Similar Documents

Publication Publication Date Title
US8370808B2 (en) Apparatus and a method for generating a test case
JP5946423B2 (en) System log classification method, program and system
JP5324792B2 (en) System and method for verifying system operation
TWI322365B (en) Design verification system for integrated circuit design and computer program product thereof
CN113239365B (en) Vulnerability repairing method based on knowledge graph
CN103207906A (en) Method for delivering search results and search engine
JP6256115B2 (en) Operation search program, operation search method, and operation search device
US10778811B2 (en) Protocol model generator and modeling method thereof
JP2000242672A (en) Device and method for formal logic verification
JP5440287B2 (en) Symbolic execution support program, method and apparatus
JP6870483B2 (en) Information processing program, information processing device and information processing method
JPH1063537A (en) Property verifying method and device therefor
JP5609681B2 (en) Test data generation program, method and apparatus
JP2010256978A (en) Configuration data verification device and verification method, and program
US20060235657A1 (en) System of accumulating component design experience and method thereof
JP5875607B2 (en) Performance model inspection apparatus, method and program
Corno et al. VEGA: a verification tool based on genetic algorithms
JP6802109B2 (en) Software specification analyzer and software specification analysis method
JP2020098413A (en) Test support device, test support method and computer program
JP5600826B1 (en) Unstructured data processing system, unstructured data processing method and program
JP6107494B2 (en) Verification device, verification method and verification program
JP6949440B2 (en) Vector generator and vector generator program
JP2013206310A (en) Model inspection device, model inspection method, and program
JP7372808B2 (en) Fault tree generation device and method
JP5918102B2 (en) Analysis system, analysis apparatus, analysis method, and analysis program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210302

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210329

R150 Certificate of patent or registration of utility model

Ref document number: 6870483

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150