JP6904914B2 - Decision table generator and decision table generation method - Google Patents

Decision table generator and decision table generation method Download PDF

Info

Publication number
JP6904914B2
JP6904914B2 JP2018016917A JP2018016917A JP6904914B2 JP 6904914 B2 JP6904914 B2 JP 6904914B2 JP 2018016917 A JP2018016917 A JP 2018016917A JP 2018016917 A JP2018016917 A JP 2018016917A JP 6904914 B2 JP6904914 B2 JP 6904914B2
Authority
JP
Japan
Prior art keywords
decision table
rule
information
generation
generation range
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.)
Active
Application number
JP2018016917A
Other languages
Japanese (ja)
Other versions
JP2019133538A (en
Inventor
恭平 小山
恭平 小山
伊藤 信治
信治 伊藤
和矢 安田
和矢 安田
久也 平田
久也 平田
宗司 篠原
宗司 篠原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2018016917A priority Critical patent/JP6904914B2/en
Publication of JP2019133538A publication Critical patent/JP2019133538A/en
Application granted granted Critical
Publication of JP6904914B2 publication Critical patent/JP6904914B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、決定表生成装置、及び決定表生成方法に関する。 The present invention relates to a decision table generator and a decision table generation method.

特許文献1には「表形式のソフトウェア仕様を作成及び検証する技術に関し」、「可読性は確保しつつ決定表の作成・解読工数削減と記憶容量削減を達成する」ため、「ソフトウェア仕様の開発を支援する装置であって、複数の条件を有する条件部および複数の結果を有する結果部からなる複数の命題形式の仕様を受け付ける命題仕様受付手段と、各行が上記複数の条件の1つまたは上記複数の結果の1つを示し、各列が上記複数の命題形式の各々を示す表形式で表した決定表を上記複数の命題形式の仕様から作成する決定表作成手段と、上記複数の命題形式の仕様の各々が互いに矛盾しないかどうかを判定する整合性検証手段とを、備え、上記決定表作成手段は、上記命題仕様受付手段から上記複数の命題形式の仕様を取得すると、上記複数の命題形式の仕様の各々について、当該命題形式の仕様の条件部と結果部を取り出して上記決定表の行を作成し、当該命題形式の仕様に対応する列の当該行の欄に印付けし、上記整合性検証手段は、複数の命題形式の仕様のうち任意の2つの命題形式の仕様を上記決定表から取り出し、上記2つの命題形式の仕様の条件部の論理積が充足可能かどうかを判定し、充足可能であるならば上記複数の命題形式の仕様の各々が互いに矛盾すると出力する装置を提供する。」と記載されている。 Patent Document 1 describes "development of software specifications" in order to "develop technology for creating and verifying tabular software specifications" and "to achieve reduction of manpower for creating and decoding decision tables and reduction of storage capacity while ensuring readability". A device that supports, a proposition specification receiving means that accepts a plurality of propositional specifications consisting of a condition part having a plurality of conditions and a result part having a plurality of results, and each line is one of the above-mentioned plurality of conditions or the above-mentioned plurality of conditions. A decision table creating means for creating a decision table in a table format in which each column indicates each of the above-mentioned multiple proposition formats from the specifications of the above-mentioned multiple proposition formats, and a above-mentioned plurality of proposition formats. The means for creating a decision table is provided with a consistency verification means for determining whether or not each of the specifications is consistent with each other. When the above-mentioned propositional specification receiving means obtains the above-mentioned plurality of propositional format specifications, the above-mentioned plurality of propositional formats are obtained. For each of the specifications of the above propositional form, the condition part and the result part of the specification of the propositional form are taken out to create a row of the above decision table, and the column corresponding to the specification of the propositional form is marked in the column of the row, and the above consistency The sex verification means extracts any two propositional specifications out of the plurality of propositional specifications from the above determination table, determines whether or not the logical product of the condition part of the above two propositional specifications can be satisfied, and determines whether or not the logical product of the condition part of the above two propositional specifications can be satisfied. Provided is a device that outputs when each of the above-mentioned specifications of the plurality of propositional forms contradicts each other if it can be satisfied. "

特開2012−192203号公報Japanese Unexamined Patent Publication No. 2012-192203

一般にソースコード中の命令の実行系列(以下、「実行パス」と称する。)は、ソースコードの中の分岐命令(以下、「If文」と称する。)や反復命令(以下、「ループ文」と称する。)の数に依存し、場合によっては指数関数的に増加する。そのため、If文やループ文の数が増えてソースコードの規模が膨大になるとソースコードのパスも指数関数的に増加し、人がソースコードを確認することが困難になる。 Generally, an execution sequence of instructions in a source code (hereinafter referred to as an "execution path") is a branch instruction (hereinafter referred to as an "If statement") or an iterative instruction (hereinafter referred to as a "loop statement") in the source code. It depends on the number of) and increases exponentially in some cases. Therefore, when the number of If statements and loop statements increases and the scale of the source code becomes enormous, the path of the source code also increases exponentially, making it difficult for a person to check the source code.

そこである変数に着目し、変数への値の割り当て(以下、「結果」と称する。)と、そ
の割り当てが発生する条件(以下、「入力条件」と称する。)の組をルールとみなし、ソースコードから抽出したルールを決定表形式で可視化することによりソースコードの仕様の確認を効率化する方法が存在する。
Therefore, paying attention to a certain variable, the set of the value assignment to the variable (hereinafter referred to as "result") and the condition in which the assignment occurs (hereinafter referred to as "input condition") is regarded as a rule and the source. There is a method to improve the efficiency of checking the source code specifications by visualizing the rules extracted from the code in the form of a decision table.

ソースコードからルールを抽出する方法として記号実行等が知られている。ソースコードからルールを抽出する場合、単純には一つの実行パスが一つのルールに対応する。そのため、抽出されるルールの数はIf文及びループ文の数に対して指数関数的に増加する。 Symbol execution is known as a method of extracting rules from source code. When extracting a rule from the source code, one execution path simply corresponds to one rule. Therefore, the number of extracted rules increases exponentially with the number of If statements and loop statements.

特許文献1には命題形式の仕様(ルールに相当)から決定表を生成する技術に関して記載されている。しかし膨大な数のルールを決定表化すると生成される決定表が巨大化して人による決定表の確認が困難となる。また特許文献1は巨大な決定表の確認を支援する技術に関して何も開示していない。 Patent Document 1 describes a technique for generating a decision table from a propositional specification (corresponding to a rule). However, when a huge number of rules are converted into a decision table, the generated decision table becomes huge and it becomes difficult for a person to confirm the decision table. Further, Patent Document 1 does not disclose anything regarding a technique for supporting confirmation of a huge decision table.

本発明はこうした背景に鑑みてなされたもので、ルールについて部分的な決定表を生成することを可能とし、ルールの確認にかかる人の負荷を軽減することを目的とする。 The present invention has been made in view of this background, and an object of the present invention is to make it possible to generate a partial decision table for a rule and to reduce the burden on a person who confirms the rule.

上記課題を解決するための本発明のうちの一つは、決定表生成装置であって、ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、決定表の生成範囲を特定する情報である生成範囲特定情報、を記憶する情報記憶部と、 前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表を生成する決定表生成部と、を備え、前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、前記決定表生成部は、前記入力条件又は前記ルール仕様に基づき生成された論理式を、論理的に等価な、前記構成要素の論理積である節を論理和で結合した論理式である選言標準形に変換し、前記構成要素ごとに前記入力条件に影響を与えるか否かを判定し、前記入力条件に影響を与えない前記構成要素を前記入力条件から除外して前記決定表を生成する。 One of the present inventions for solving the above problems is a decision table generator, in which the software specifications are based on one or more rules including an input condition and a result which is information indicating the value of an output variable. An information storage unit that stores the rule specifications that are the described information and the generation range specification information that is the information that specifies the generation range of the decision table, and the range of the rule specifications that is specified by the generation range specification information. A decision table generator for generating a decision table is provided, and the component of the input condition is a term that is at least one of a comparison expression, a truth type variable, and a truth value, or a denial of the above term. The decision table generation unit is a logical expression obtained by combining a logical expression generated based on the input condition or the rule specification with a logical sum of clauses which are logically equivalent logical products of the constituent elements. Convert to the selection standard form, determine whether or not each component affects the input condition, exclude the component that does not affect the input condition from the input condition, and remove the decision table. Generate.

その他、本願が開示する課題、及びその解決方法は、発明を実施するための形態の欄、及び図面により明らかにされる。 In addition, the problems disclosed in the present application and the solutions thereof will be clarified by the column of the form for carrying out the invention and the drawings.

本発明によれば、ルールについて部分的な決定表の生成を可能とし、ルールの確認にかかる人の負荷を軽減することができる。 According to the present invention, it is possible to generate a partial decision table for a rule, and it is possible to reduce the burden on the person who confirms the rule.

決定表生成装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of the decision table generator. 決定表生成装置が備える機能を示す図である。It is a figure which shows the function which the decision table generator has. ルール仕様の例である。This is an example of a rule specification. 生成結果の例である。This is an example of the generation result. 設定画面の例である。This is an example of the setting screen. 決定表生成処理を説明するフローチャートである。It is a flowchart explaining the decision table generation process. 差分の決定表生成処理を説明するフローチャートである。It is a flowchart explaining the decision table generation process of a difference. 全体の決定表生成処理を説明するフローチャートである。It is a flowchart explaining the whole decision table generation process. 論理式等価変換処理を説明するフローチャートである。It is a flowchart explaining the logical expression equivalence conversion process.

以下、図面を参照しつつ実施形態について説明する。以下の説明において、同一の又は類似する構成について同一の符号を付して重複した説明を省略することがある。 Hereinafter, embodiments will be described with reference to the drawings. In the following description, the same or similar configurations may be designated by the same reference numerals and duplicate description may be omitted.

図1に一実施形態として説明する決定表生成装置100のハードウェア構成を、図2に決定表生成装置100が備える機能を、夫々示している。決定表生成装置100は、ソフトウェア(例えば、金融、保険、製造、流通、通信、教育、医療等の業務に関するもの)の開発や保守に際して利用される情報処理装置(コンピュータ)である。決定表生成装置100は、例えば、クラウドシステムにより提供されるクラウドサーバのように仮想的な情報処理資源を用いて実現されるものであってもよい。 FIG. 1 shows the hardware configuration of the decision table generation device 100 described as one embodiment, and FIG. 2 shows the functions provided by the decision table generation device 100, respectively. The decision table generation device 100 is an information processing device (computer) used for developing and maintaining software (for example, those related to business such as finance, insurance, manufacturing, distribution, communication, education, medical care, etc.). The decision table generation device 100 may be realized by using virtual information processing resources such as a cloud server provided by a cloud system.

一般にソフトウェアは、商品やサービス等に関する法的な規制、業務上の規則や基準、ビジネスルール、システムルール、チェックルール等に従ってその仕様が決定される。以下、上記仕様における、入力条件とその入力条件を満たしたときの結果の組を「ルール」と称する。ルールは、例えば、「もし〜ならば〜である」といった自然文による記述や「If A=1 And B=2 Then R=1」といった情報処理装置により解釈可能な所定の規則に従った
記述、入力条件と結果の対応関係を表形式で定義した決定表(decision table)による記述等、様々な形で表される。
Generally, the specifications of software are determined in accordance with legal regulations regarding products and services, business rules and standards, business rules, system rules, check rules, and the like. Hereinafter, in the above specifications, an input condition and a set of results when the input condition is satisfied will be referred to as a "rule". The rules are, for example, a description in a natural sentence such as "If A = 1 And B = 2 Then R = 1" or a description according to a predetermined rule that can be interpreted by an information processing device such as "If A = 1 And B = 2 Then R = 1". It is expressed in various forms such as a description in a decision table that defines the correspondence between input conditions and results in a tabular format.

上記の入力条件及び結果は夫々一つ以上の構成要素を含んで構成される。上記構成要素は、例えば、比較式、真偽型の変数、及び真偽値のいずれか(以下、「項」と称する。)、もしくは項の否定である。尚、以下の説明において、項または項の否定のことを「リテラル」と称する。上記入力条件は、例えば、リテラルを論理演算子(論理積(And)や論
理和(Or)等)を用いて組み合わせた論理式で表される。また上記の結果は、例えば、「
変数=値」、「変数=変数」、もしくは「変数=変数を0以上含む計算式」等の形式のリテラルから成る論理式で表される。
Each of the above input conditions and results is composed of one or more components. The component is, for example, any of a comparison expression, a true / false type variable, and a false value (hereinafter referred to as a "term"), or a negation of a term. In the following description, a term or a negation of a term is referred to as a "literal". The above input condition is represented by, for example, a logical expression in which literals are combined using logical operators (logical product (And), logical sum (Or), etc.). In addition, the above result is, for example, "
It is represented by a logical expression consisting of literals in the form of "variable = value", "variable = variable", or "variable = calculation formula containing 0 or more variables".

以下の説明において、ルールの結果に出現する変数のことを「出力変数」と称し、ルールのそれ以外の変数のことを「入力変数」と称する。また出力変数が共通する一つ以上のルールの集合のことを「ルールセット」と称し、ルールセットの集合のことを「ルール仕様」と称する。ルール仕様は、例えば、記号実行等のソースコード解析技術により、情報処理装置を用いてソースコードから自動的に生成することもできる。 In the following description, the variables that appear in the result of the rule are referred to as "output variables", and the variables other than that of the rule are referred to as "input variables". A set of one or more rules having a common output variable is called a "rule set", and a set of rule sets is called a "rule specification". The rule specifications can also be automatically generated from the source code using an information processing device by, for example, a source code analysis technique such as symbol execution.

決定表生成装置100は、ルール仕様と、ルール仕様のうち決定表を生成する範囲(以下、「生成範囲」と称する。)を特定する情報(以下、「生成範囲特定情報」と称する。)とに基づき、リテラルを論理積で結合した論理式により入力条件を表したルールの集合を生成し、生成した上記集合に基づき決定表を生成する。 The decision table generation device 100 includes rule specifications and information for specifying a range (hereinafter, referred to as "generation range") for generating a decision table in the rule specifications (hereinafter, referred to as "generation range specification information"). Based on, a set of rules expressing the input conditions is generated by a logical expression in which the literals are combined by a logical product, and a decision table is generated based on the generated set.

上記の生成範囲特定情報は、例えば、決定表の生成対象であるルール仕様(第1のルール仕様)(以下、「決定表生成対象」と称する。)について、比較の対象となるルール仕様(第2のルール仕様)(以下、「比較対象」と称する。)を特定する情報である。尚、上記の比較対象とするルール仕様は、例えば、決定表生成対象のルール仕様(ソースコード)が変更(修正)された場合における修正前(変更前)のルール仕様(ソースコード)
である。
The above generation range specific information is, for example, a rule specification (first rule specification) to be compared with respect to a rule specification (first rule specification) (hereinafter, referred to as "decision table generation target") which is a generation target of a decision table. 2 rule specifications) (hereinafter referred to as "comparison target") is information for specifying. The rule specifications to be compared above are, for example, the rule specifications (source code) before the modification (before the change) when the rule specification (source code) for which the decision table is generated is changed (modified).
Is.

また上記の生成範囲特定情報は、例えば、決定表の生成対象となるルール仕様のうち、上記ルール仕様について取得されるメトリクス値と、上記メトリクス値を評価して生成範囲を特定するための情報(例えば、閾値や評価式。以下、「メトリクス評価情報」と称する。)とを含んだ情報である。尚、決定表生成装置100は、例えば、ルール仕様を変換して得られるソースコードからメトリクス値を取得する。 Further, the above-mentioned generation range specifying information is, for example, information for specifying the generation range by evaluating the metric value acquired for the above-mentioned rule specification and the above-mentioned metric value among the rule specifications to be generated in the decision table ( For example, it is information including a threshold value and an evaluation formula (hereinafter, referred to as “metrics evaluation information”). The decision table generator 100 acquires, for example, a metric value from a source code obtained by converting a rule specification.

また上記の生成範囲特定情報は、例えば、決定表の生成対象となるルール仕様から生成範囲のルール仕様を抽出する論理式(以下、「フィルタ条件」と称する。)を含んだ情報である。上記のフィルタ条件は、例えば「70<x<80 And y=True」といった論理式で記述される。 Further, the above-mentioned generation range specifying information is information including, for example, a logical expression (hereinafter, referred to as "filter condition") for extracting the rule specification of the generation range from the rule specification to be generated in the decision table. The above filter condition is described by a logical expression such as "70 <x <80 And y = True".

尚、上記のメトリクス値は、例えば、「レアなリテラルの組合せ出現数」、「ルールの長さ」、「距離」、「内包するElse数」等である。このうち「レアなリテラルの組合せの出現数」は、ルール仕様に含まれるリテラルの組合せのうち、閾値以下の数のルールにしか出現しないリテラルの組合せの数である。尚、リテラルの組合せは2つのリテラルの組合せに限らず3つ以上のリテラルの組合せでもよい。また「ルールの長さ」は、ルールの入力条件に含まれるリテラルの数である。また「距離」は、例えば、ルール仕様に対応するソースコードが存在する場合、ルールの入力条件に含まれるリテラルが上記ソースコードのどの命令に対応するかを特定した場合における、2つのリテラル間の上記命令の行番号の差(記述間隔))である。尚、ルールの入力条件にリテラルが3つ以上含まれる場合、例えば、リテラルの全ての組合せに対して、対応する命令の行番号の差を求め、その平均、最大、最小等を距離にする。行番号の差以外に、例えば、各リテラルに対応する各命令が別関数や別ファイルであるか否かに基づき各命令間の距離を求めてもよい。また「内包するElse数」は、ルール仕様に対応するソースコードがあった場合、ルールに含まれるリテラルが上記ソースコードのどの命令に対応するかを測定し、上記対応する命令に、「If Then Else」形式の命令においてElse命令が何個含まれるかを、重複を許さずにカウントした数である。 The above-mentioned metric values are, for example, "the number of rare literal combination appearances", "rule length", "distance", "number of included Elses", and the like. Of these, the "number of appearances of rare literal combinations" is the number of literal combinations that appear only in the number of rules below the threshold value among the literal combinations included in the rule specifications. The combination of literals is not limited to the combination of two literals, and may be a combination of three or more literals. The "rule length" is the number of literals included in the rule input condition. The "distance" is, for example, between two literals when there is a source code corresponding to the rule specification and which instruction in the above source code corresponds to the literal included in the input condition of the rule. This is the difference between the line numbers of the above instructions (description interval). When three or more literals are included in the input condition of the rule, for example, the difference between the line numbers of the corresponding instructions is obtained for all combinations of literals, and the average, maximum, minimum, etc. are set as distances. In addition to the difference in line numbers, for example, the distance between each instruction may be obtained based on whether or not each instruction corresponding to each literal is a different function or a different file. In addition, the "number of Else included" measures which instruction in the above source code corresponds to the literal included in the rule when there is a source code corresponding to the rule specification, and "If Ten" is added to the corresponding instruction. It is the number of Else instructions included in the "Else" type instruction, counted without allowing duplication.

また上記のメトリクス評価情報は、例えば、(1)ルール仕様に含まれるルールのうち
出現頻度が低い(出現頻度が予め設定された閾値以下の)リテラルの組合せを含むルールを決定表生成対象とする、(2)入力条件に含まれるリテラルの数が多い(入力条件に所定数以上のリテラルが含まれる)ルールを決定表生成対象とする、(3)距離が長い(予め設定された閾値以上の)ルールを決定表生成対象とする、(4)ルールが内包するElse数が多い(予め設定された閾値以上の)ルールを決定表生成対象とする、等である。ここで(1)のように出現頻度が低いリテラルの組合せを含むルールを決定表生成対象とするのは、例えば、ルール仕様のうち見落とす可能性の高い部分を決定表にして可視化するためである。また(2)のように入力条件が多いルールを決定表生成対象とするのは、例えば、入力条件が多くて複雑な部分は誤りが生じやすいのでこれを決定表にして可視化しユーザに注意を促すためである。また(3)のように距離が長いルールを決定表生成対象とするのは、距離が長いと誤りが生じやすく(例えば、長いソースコードや複数ファイルに分割されたソースコードは一つの画面に収まりきらず、全体の見通しがつきにくく誤りが生じやすい等)、決定表を生成して可視化しユーザに注意を促すためである。また(4)のようにルールが内包するElse数が多いルールを決定表生成対象とするのは、ユーザが「If 条件 Then 処理1 Else 処理2」という形でソースコードを記述した場合、Elseに相当する条件はソースコード上に明示的には表示されず、ユーザはElseに相当する条件を意識しない可能性があるため、ルールが内包するElse数が多いと誤りが生じやすく、決定表を生成して可視化しユーザに注意を促すためである。
Further, the above-mentioned metric evaluation information includes, for example, (1) a rule including a combination of literals having a low appearance frequency (the appearance frequency is equal to or less than a preset threshold value) among the rules included in the rule specification as a decision table generation target. , (2) A rule with a large number of literals included in the input condition (the input condition contains more than a predetermined number of literals) is targeted for decision table generation, and (3) the distance is long (more than a preset threshold value or more). ) The rule is the decision table generation target, (4) the rule containing a large number of Else (greater than or equal to the preset threshold) is the decision table generation target, and the like. Here, the reason why a rule including a combination of literals with a low frequency of appearance as in (1) is set as a decision table generation target is, for example, to visualize a part of the rule specification that is likely to be overlooked as a decision table. .. Also, as in (2), a rule with many input conditions is targeted for decision table generation. For example, since errors are likely to occur in complicated parts with many input conditions, this is visualized as a decision table and attention is paid to the user. This is to encourage. Also, when a rule with a long distance is targeted for decision table generation as in (3), errors are likely to occur if the distance is long (for example, long source code or source code divided into multiple files fits on one screen. This is because the decision table is generated and visualized to draw the user's attention. Also, as in (4), a rule with a large number of Else included in the rule is targeted for decision table generation when the user describes the source code in the form of "If condition Ten process 1 Else process 2". Since the corresponding condition is not explicitly displayed on the source code and the user may not be aware of the condition corresponding to Else, if the number of Else included in the rule is large, an error is likely to occur and a decision table is generated. This is to visualize and call attention to the user.

図1に示すように、決定表生成装置100は、プロセッサ110、主記憶装置120、補助記憶装置130、入力装置140、出力装置150、及び通信装置160を備える。これらは図示しないバス等の通信手段を介して互いに通信可能に接続されている。 As shown in FIG. 1, the decision table generation device 100 includes a processor 110, a main storage device 120, an auxiliary storage device 130, an input device 140, an output device 150, and a communication device 160. These are connected to each other so as to be able to communicate with each other via a communication means such as a bus (not shown).

プロセッサ110は、例えばCPU(Central Processing Unit)やMPU(Micro Processing Unit)を用いて構成されている。プロセッサ110が、主記憶装置120に格納されているプログラムを読み出して実行することにより、決定表生成装置100の様々な機能が実現される。 The processor 110 is configured by using, for example, a CPU (Central Processing Unit) or an MPU (Micro Processing Unit). When the processor 110 reads and executes the program stored in the main storage device 120, various functions of the decision table generation device 100 are realized.

主記憶装置120は、プログラムやデータを記憶する装置であり、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)、不揮発性半導体メモリ(NVRAM(Non Volatile RAM))等である。 The main storage device 120 is a device that stores programs and data, and is, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a non-volatile semiconductor memory (NVRAM (Non Volatile RAM)), and the like.

補助記憶装置130は、例えば、ハードディスクドライブ、SSD(Solid State Drive)、光学式記憶装置(CD(Compact Disc)、DVD(Digital Versatile Disc)等)
、ストレージシステム、ICカード、SDメモリカードや光学式記録媒体等の記録媒体の読取/書込装置、クラウドサーバの記憶領域等である。補助記憶装置130に格納されているプログラムやデータは主記憶装置120に随時読み込まれる。
The auxiliary storage device 130 includes, for example, a hard disk drive, an SSD (Solid State Drive), an optical storage device (CD (Compact Disc), DVD (Digital Versatile Disc), etc.).
, A storage system, an IC card, a reading / writing device for a recording medium such as an SD memory card or an optical recording medium, a storage area of a cloud server, and the like. Programs and data stored in the auxiliary storage device 130 are read into the main storage device 120 at any time.

入力装置140は、例えば、キーボード、マウス、タッチパネル、カードリーダ、音声入力装置等である。 The input device 140 is, for example, a keyboard, a mouse, a touch panel, a card reader, a voice input device, and the like.

出力装置150は、ユーザに処理経過や処理結果等の各種情報を提供するユーザインタフェースであり、例えば、画像表示装置(液晶モニタ、LCD(Liquid Crystal Display)、グラフィックカード等)、音声出力装置(スピーカ等)、印字装置等である。尚、例えば、決定表生成装置100が通信装置160を介して他の装置との間で情報の入力や出力を行う構成としてもよい。 The output device 150 is a user interface that provides the user with various information such as processing progress and processing results. For example, an image display device (liquid crystal monitor, LCD (Liquid Crystal Display), graphic card, etc.), an audio output device (speaker). Etc.), printing equipment, etc. In addition, for example, the decision table generation device 100 may be configured to input and output information to and from other devices via the communication device 160.

通信装置160は、LAN(Local Area Network)やインターネット等の通信手段を介した他の装置との間の通信を実現する有線方式又は無線方式の通信インタフェースであり、例えば、NIC(Network Interface Card)、無線通信モジュール、USB(Universa
l Serial Interface)モジュール、シリアル通信モジュール等である。
The communication device 160 is a wired or wireless communication interface that realizes communication with other devices via a communication means such as a LAN (Local Area Network) or the Internet, and is, for example, a NIC (Network Interface Card). , Wireless communication module, USB (Universa)
l Serial Interface) module, serial communication module, etc.

図2に示すように、決定表生成装置100は、情報記憶部205、ルール仕様生成部210、決定表生成部220、決定表逆変換部230、及びメトリクス値取得部240の各機能を備える。 As shown in FIG. 2, the decision table generation device 100 includes the functions of the information storage unit 205, the rule specification generation unit 210, the decision table generation unit 220, the decision table inverse conversion unit 230, and the metric value acquisition unit 240.

情報記憶部205は、ソースコード260、ルール仕様270、生成範囲特定情報280、及び生成結果290を記憶する。ソースコード260は、例えば、ユーザが決定表生成装置100に入力したソースコードである。ルール仕様270は、例えば、ユーザが決定表生成装置100に入力したルール仕様、ルール仕様生成部210がソースコード260に記憶されたソースコードから自動生成(抽出)したルール仕様、決定表逆変換部230が決定表から逆変換して自動生成したルール仕様等である。尚、決定表生成装置100にルール仕様をどのようにして与えるか、即ちルール仕様の入力方法は必ずしも限定されない。ルール仕様の入力方法として、例えば、ルール仕様を直接入力する方法、所定の言語で記述されたソースコードを入力として決定表生成装置100が上記ソースコードからルール仕様を生成する方法、決定表を入力として決定表生成装置100が決定表をルール仕様に逆変換する方法等がある。生成範囲特定情報280は、例えば、後述する設定画面500を介して取得される情報である。生成結果290は、決定表生成部220がルール仕様270と生成範囲特定情報280とに基づき生成した決定表等の情報である。 The information storage unit 205 stores the source code 260, the rule specification 270, the generation range specifying information 280, and the generation result 290. The source code 260 is, for example, a source code input by the user to the decision table generator 100. The rule specification 270 is, for example, a rule specification input to the decision table generation device 100 by the user, a rule specification automatically generated (extracted) by the rule specification generation unit 210 from the source code stored in the source code 260, and a decision table inverse conversion unit. 230 is a rule specification or the like automatically generated by reverse conversion from the decision table. It should be noted that how to give the rule specifications to the decision table generator 100, that is, the input method of the rule specifications is not necessarily limited. As a rule specification input method, for example, a method of directly inputting a rule specification, a method of generating a decision table from the above source code by inputting a source code written in a predetermined language, and a method of inputting a decision table. There is a method in which the decision table generator 100 reversely converts the decision table into the rule specifications. The generation range specifying information 280 is, for example, information acquired via the setting screen 500 described later. The generation result 290 is information such as a decision table generated by the decision table generation unit 220 based on the rule specification 270 and the generation range specifying information 280.

上記機能のうち、ルール仕様生成部210は、記号実行等のソースコード解析技術によりソースコード260からルール仕様を抽出し、抽出したルール仕様をルール仕様270として記憶する。決定表生成部220は、ルール仕様270と生成範囲特定情報280とに基づき決定表を生成し、生成した決定表を生成結果290として記憶する。決定表逆変換部230は、決定表をルール仕様に逆変換する。決定表の1行は一つのルールに対応する。決定表逆変換部230は、決定表の1行を「If 入力条件 Then 結果」の形式に変換することで決定表をルール仕様に逆変換する。メトリクス値取得部240は、ソースコード260からメトリクス値を取得する。 Among the above functions, the rule specification generation unit 210 extracts a rule specification from the source code 260 by a source code analysis technique such as symbol execution, and stores the extracted rule specification as the rule specification 270. The decision table generation unit 220 generates a decision table based on the rule specification 270 and the generation range specifying information 280, and stores the generated decision table as the generation result 290. The decision table inverse conversion unit 230 reversely converts the decision table into the rule specifications. One row of the decision table corresponds to one rule. The decision table inverse conversion unit 230 reversely converts the decision table into the rule specifications by converting one row of the decision table into the format of "If input condition Ten result". The metric value acquisition unit 240 acquires the metric value from the source code 260.

図3にルール仕様270の一例を示す。同図に示すように、ルール仕様270は、同一の結果変数を有する一つ以上のルールセットを含む。各ルールセットには識別子(以下、「ルールセットID」と称する。)が付与される。各ルールセットは、「If〜Then」形式で記述される一つ以上のルールを含む。各ルールには識別子(以下、「ルールID」と称する。)が付与される。 FIG. 3 shows an example of the rule specification 270. As shown in the figure, the rule specification 270 includes one or more rule sets having the same result variable. An identifier (hereinafter referred to as "rule set ID") is assigned to each rule set. Each rule set contains one or more rules described in the "If-Then" format. An identifier (hereinafter referred to as "rule ID") is assigned to each rule.

同図に示すルール仕様270は、ルールセットIDが「RS1」のルールセット310と
ルールセットIDが「RS2」のルールセット320とを含む。ルールセット310及びル
ールセット320は夫々、ルールIDが「1」〜「4」の4つのルールを含む。
The rule specification 270 shown in the figure includes a rule set 310 having a rule set ID of “RS1” and a rule set 320 having a rule set ID of “RS2”. The rule set 310 and the rule set 320 each include four rules having rule IDs "1" to "4".

各ルールセットにおいて、入力変数の具体的な値を定めると、各ルールの入力条件が充足するか(真となるか)一意に定まる。ルールの入力条件が充足すると、当該ルールの結果が充足するように出力変数の値が定まる。例えば、図3に例示するルールセット310において、入力変数「x」、「y」、「z」の具体的な値が夫々、「100」、「-1」、「-1」であるときにルールIDが「4」のルールの入力条件は充足し、出力変数「out」の具体的な値が「0」に定まる。 When the specific value of the input variable is defined in each rule set, it is uniquely determined whether the input condition of each rule is satisfied (true). When the input condition of the rule is satisfied, the value of the output variable is determined so that the result of the rule is satisfied. For example, in the rule set 310 illustrated in FIG. 3, when the specific values of the input variables "x", "y", and "z" are "100", "-1", and "-1", respectively. The input condition of the rule whose rule ID is "4" is satisfied, and the specific value of the output variable "out" is set to "0".

図4は、決定表生成部220により生成され情報記憶部205が記憶する生成結果290の一例である。生成結果290は一つ以上の決定表を含む。各決定表には識別子(以下、「決定表ID」と称する。)が付与される。同図に示す生成結果290は、決定表IDが夫々「DT1」〜「DT4」である4つの決定表を含む。決定表は一つ以上の行を含み、各行
には識別子(以下、「行番号」と称する。)が付与される。決定表の各行は、入力条件「If」と結果「Then」とを含み、1行が一つのルールに対応する。例えば、決定表410の2行目は「If x<=50 And y>=0 Then out=1」というルールに対応し、決定表410の3行目は「If 0<x And x<=50 Then out=2」というルールに対応する。各行のセルは変数が同
じ0個以上のリテラルに対応する。例えば、決定表410のセル411は、リテラル「x<=50」に対応し、決定表410のセル412は、リテラル「y>=0」に対応し、決定表41
0のセル413は、リテラル「0<x」と「x<=50」に対応する。尚、決定表410のセル414の「-」は、変数「y」の値が関係ないことを意味している。
FIG. 4 is an example of the generation result 290 generated by the decision table generation unit 220 and stored by the information storage unit 205. The generated result 290 contains one or more decision tables. An identifier (hereinafter referred to as "decision table ID") is assigned to each decision table. The generation result 290 shown in the figure includes four decision tables whose decision table IDs are “DT1” to “DT4”, respectively. The decision table contains one or more rows, and each row is given an identifier (hereinafter referred to as "row number"). Each row of the decision table includes an input condition "If" and a result "Then", and one row corresponds to one rule. For example, the second row of the decision table 410 corresponds to the rule "If x <= 50 And y> = 0 Then out = 1", and the third row of the decision table 410 corresponds to "If 0 <x And x <= 50". Corresponds to the rule "Then out = 2". The cells in each row correspond to zero or more literals with the same variable. For example, cell 411 of the decision table 410 corresponds to the literal "x <= 50", cell 412 of the decision table 410 corresponds to the literal "y> = 0", and the decision table 41
Cell 413 of 0 corresponds to literals "0 <x" and "x <= 50". The "-" in cell 414 of the decision table 410 means that the value of the variable "y" is irrelevant.

決定表410は、図3に示すルールセット310に基づき生成される決定表である。ここでルールセット310のルールIDが「1」及「2」のルールから、「x>50」であれば、「out」は「1」になる。即ちこれらのルールから、「y>0」、「x>0」、「x>100」、「Not(x>100)」を除去したとしても「out」が「1」になる入力条件に影響がない。このように
決定表生成部220は、決定表の生成に際し、除去したとしても入力条件に影響がないリテラル(以下、「ドントケア」と称する。)を除去する。決定表410の1行目の場合、「x>50」以外のリテラルがすべてドントケアとして除去されるため、決定表の行番号「1
」は「If x>50 Then out=1」に対応する内容になっている。
The decision table 410 is a decision table generated based on the rule set 310 shown in FIG. Here, if the rule ID of the rule set 310 is "x>50" from the rules of "1" and "2", "out" becomes "1". That is, even if "y>0","x>0","x>100", and "Not (x>100)" are removed from these rules, it affects the input condition that "out" becomes "1". There is no. In this way, the decision table generation unit 220 removes literals (hereinafter, referred to as "don't care") that do not affect the input conditions even if they are removed when the decision table is generated. In the case of the first row of the decision table 410, all literals other than "x>50" are removed as don't care, so the decision table row number "1"
"Is the content corresponding to" If x> 50 Then out = 1 ".

決定表420は、図3に示すルールセット310を決定表生成対象とし、ルールセット320を比較対象として、ルールセット310とルールセット320との間で、異なる結果となる同一の入力条件(以下、「差分入力条件」と称する。)と差分入力条件における各ルールセットの結果との組合せ(以下、差分入力条件と上記の結果の組合せを「差分」と称する。)を決定表とした例である。ルールセット310とルールセット320とを比較すると、ルールセット310に含まれるリテラル「x>100」、「x <=100」(Not(x>100))、「x>50」、「x<=50」(Not(x>50))が夫々、ルールセット320では「x>=100」、「x<100」(Not(x>=100))、「x>=50」、「x<50」(Not(x>=50))となっているが、「50<=x And x<=50」のときのみ、ルールセット310は「out」が「2」となり、一方、ルールセット320は「out」が「1」となり、両者は異なる結果となる。決定表420の1行目はこの両者の差分を決定表にしたものであり、「If 50 <= x And x <= 50 Then out(RS1(ルールセット310))=2 And out(RS2(ルールセット320))=1」というルールに対応する内容になってい
る。
In the decision table 420, the rule set 310 shown in FIG. 3 is used as the decision table generation target, and the rule set 320 is used as the comparison target. This is an example in which the combination of the "difference input condition") and the result of each rule set in the difference input condition (hereinafter, the combination of the difference input condition and the above result is referred to as "difference") is used as a decision table. .. Comparing the ruleset 310 with the ruleset 320, the literals "x>100","x<=100" (Not (x> 100)), "x>50","x<=" contained in the ruleset 310 50 "(Not (x> 50)), respectively, in rule set 320,"x> = 100 "," x <100 "(Not (x> = 100)),"x> = 50 "," x <50 " (Not (x> = 50)), but only when "50 <= x And x <= 50", the rule set 310 has "out" as "2", while the rule set 320 has. “Out” becomes “1”, and both have different results. The first row of the decision table 420 shows the difference between the two as a decision table, and "If 50 <= x And x <= 50 Then out (RS1 (rule set 310)) = 2 And out (RS2 (rule)) The content corresponds to the rule "Set 320)) = 1".

決定表430は、図3に示すルールセット310を決定表生成対象とし、フィルタ条件「out=2 And y<0」を満たす範囲について決定表を生成した例である。決定表生成部22
0は、生成範囲特定情報280にフィルタリング条件が指定されている場合、フィルタリング条件を満たす範囲について決定表を生成する。決定表430は、ルールセット310の全体の決定表である決定表410のうち、フィルタリング条件「out=2 And y<0」を満
たす3行目のみについて決定表を生成した例である。
The decision table 430 is an example in which the rule set 310 shown in FIG. 3 is used as the decision table generation target and the decision table is generated for the range satisfying the filter condition “out = 2 And y <0”. Decision table generator 22
0 generates a decision table for the range satisfying the filtering condition when the filtering condition is specified in the generation range specific information 280. The decision table 430 is an example in which the decision table is generated only for the third row satisfying the filtering condition “out = 2 And y <0” in the decision table 410 which is the entire decision table of the rule set 310.

決定表440は、図3に示すルールセット310を決定表生成対象とし、図2のメトリクス値取得部240が取得するメトリクス値の一つであるルールの長さが閾値「2」以上を満たす範囲のみについて決定表を生成した例である。決定表生成部220は、例えば、生成範囲特定情報280にメトリクス値と閾値とが設定されている場合、ルールセット310のうちメトリクス値が閾値以上(もしくは閾値以下)の範囲について決定表を生成する。決定表430は、ルールセット310の全体の決定表である410のうち、ルールの長さが2以上である2行目、3行目、及び4行目のみについて決定表を生成した例である。 The decision table 440 targets the rule set 310 shown in FIG. 3 as the decision table generation target, and the range in which the length of the rule, which is one of the metric values acquired by the metric value acquisition unit 240 in FIG. 2, satisfies the threshold value “2” or more. This is an example of generating a decision table for only. The decision table generation unit 220 generates a decision table for a range of the rule set 310 in which the metric value is equal to or more than the threshold value (or less than or equal to the threshold value), for example, when the generation range specific information 280 is set to the metric value and the threshold value. .. The decision table 430 is an example in which the decision table is generated only for the second row, the third row, and the fourth row in which the rule length is 2 or more, out of 410 which is the entire decision table of the rule set 310. ..

図5は、決定表の生成に際し決定表生成部220が出力装置150に出力する画面(以下、「設定画面500」と称する。)の一例である。同図に示すように、設定画面500
には、決定表の生成対象入力欄510、比較対象入力欄520、ルールメトリクス入力欄530、フィルタ条件入力欄540、及び決定表生成ボタン550が設けられている。
FIG. 5 is an example of a screen (hereinafter, referred to as “setting screen 500”) that the decision table generation unit 220 outputs to the output device 150 when the decision table is generated. As shown in the figure, the setting screen 500
Is provided with a decision table generation target input field 510, a comparison target input field 520, a rule metric input field 530, a filter condition input field 540, and a decision table generation button 550.

決定表の生成対象入力欄510には、決定表生成対象を指定する情報が設定される。同図に示すように、決定表の生成対象入力欄510は、テキストフォーム511、ラジオボタン512、及びテキストフォーム513を含む。テキストフォーム511には、決定表生成対象のデータ(ソースコード、仕様ルール、及び決定表のいずれか)を含むファイルのファイル名が設定される。ラジオボタン512は、入力ファイルの種類(ソースコード、仕様ルール、及び決定表のいずれか)の指定を受け付ける。テキストフォーム513には、ラジオボタン512により入力ファイルの種類として「ソースコード」が選択されている場合は出力変数名が設定され、それ以外が選択されている場合は決定表生成対象のルール仕様のルールセットIDが設定される。同図の例では、テキストフォーム511に「rule.cbl」が設定され、ラジオボタン512ではソースコードが選択され、テキストフォーム513に出力変数「out」が設定されている。尚、テキストフォーム511及びテキ
ストフォーム513はダイアログボックス等としてもよい。またラジオボタン512はリストボックス等としてもよい。
Information for designating the decision table generation target is set in the decision table generation target input field 510. As shown in the figure, the generation target input field 510 of the decision table includes a text form 511, a radio button 512, and a text form 513. In the text form 511, the file name of the file including the data (source code, specification rule, or decision table) for which the decision table is generated is set. The radio button 512 accepts the specification of the input file type (either the source code, the specification rule, or the decision table). In the text form 513, the output variable name is set when "source code" is selected as the input file type by the radio button 512, and when other than that is selected, the rule specification of the decision table generation target is set. The rule set ID is set. In the example of the figure, "rule.cbl" is set in the text form 511, the source code is selected by the radio button 512, and the output variable "out" is set in the text form 513. The text form 511 and the text form 513 may be used as a dialog box or the like. Further, the radio button 512 may be used as a list box or the like.

比較対象入力欄520には、決定表の生成範囲の特定に比較対象を用いる場合に必要な情報が設定される。同図に示すように、比較対象入力欄520は、チェックボックス521、テキストフォーム522、ラジオボタン523、及びテキストフォーム524を含む。チェックボックス521には、決定表の生成範囲を特定するために比較対象を用いるか否かのユーザの意思表示が設定され、比較対象を用いる場合、ユーザはチェックボックス521をチェックする。テキストフォーム522には、比較対象のデータ(ソースコード、仕様ルール、及び決定表のいずれか)を含むファイルのファイル名が設定される。ラジオボタン523は、入力ファイルの種類(ソースコード、仕様ルール、及び決定表のいずれか)の指定を受け付ける。テキストフォーム524には、ラジオボタン523により入力ファイルの種類として「ソースコード」が選択されている場合は出力変数名が設定され、それ以外の場合には比較対象のルール仕様のルールセットIDが設定される。同図の例では、チェックボックス521はチェックされておらず、テキストフォーム522には「old_rule.smt2」が設定され、ラジオボタン523では仕様ルールが選択され、テキスト
フォーム524にルールセットID「RS2」が設定されている。尚、テキストフォーム5
22及びテキストフォーム524はダイアログボックス等としてもよい。またラジオボタン523はリストボックス等としてもよい。
In the comparison target input field 520, information necessary when the comparison target is used to specify the generation range of the decision table is set. As shown in the figure, the comparison target input field 520 includes a check box 521, a text form 522, a radio button 523, and a text form 524. The check box 521 is set to indicate the user's intention as to whether or not to use the comparison target to specify the generation range of the decision table, and when the comparison target is used, the user checks the check box 521. In the text form 522, the file name of the file including the data to be compared (source code, specification rule, or decision table) is set. Radio button 523 accepts the specification of the input file type (either source code, specification rule, or decision table). In the text form 524, the output variable name is set when "source code" is selected as the input file type by the radio button 523, and the rule set ID of the rule specification to be compared is set in other cases. Will be done. In the example of the figure, the check box 521 is not checked, "old_rule.smt2" is set in the text form 522, the specification rule is selected by the radio button 523, and the rule set ID "RS2" is set in the text form 524. Is set. Text form 5
22 and the text form 524 may be a dialog box or the like. Further, the radio button 523 may be used as a list box or the like.

ルールメトリクス入力欄530には、メトリクスにより決定表の生成範囲を特定する場合に必要な情報が設定される。同図に示すように、ルールメトリクス入力欄530は、チェックボックス531、メトリクス入力テーブル532、及び一行追加ボタン533を含む。チェックボックス531には、決定表の生成範囲を特定するためにメトリクスを用いるか否かのユーザの意思表示が設定され、メトリクスを用いる場合、ユーザはチェックボックス531をチェックする。メトリクス入力テーブル532には、メトリクス評価情報としてメトリクス名と閾値とが設定される。一行追加ボタン533は、メトリクス入力テーブル532の行数を追加する場合にユーザが操作する。同図の例では、チェックボックス531はチェックされておらず、メトリクス入力テーブル532には、メトリクス名「ルールの長さ」と閾値「2」が入力されている。尚、メトリクスの長さを指定するリスト
ボックスはテキストフォーム等としてもよく、閾値を入力するテキストフォームは、リストボックス等としてもよい。
In the rule metric input field 530, information necessary for specifying the generation range of the decision table by the metric is set. As shown in the figure, the rule metric input field 530 includes a check box 531, a metric input table 532, and a one-row addition button 533. The check box 531 is set to indicate the user's intention whether or not to use the metric to specify the generation range of the decision table, and when the metric is used, the user checks the check box 531. In the metric input table 532, a metric name and a threshold value are set as metric evaluation information. The one-line addition button 533 is operated by the user when adding the number of lines in the metric input table 532. In the example of the figure, the check box 531 is not checked, and the metric name “rule length” and the threshold value “2” are input to the metric input table 532. The list box for specifying the length of the metric may be a text form or the like, and the text form for inputting the threshold value may be a list box or the like.

フィルタ条件入力欄540には、決定表の生成範囲を特定するための情報としてフィルタ条件を使う場合に必要な情報が設定される。同図に示すように、フィルタ条件入力欄540は、チェックボックス541及びテキストフォーム542を含む。チェックボックス
541には、決定表の生成範囲を特定するためにフィルタ条件を使うか否かのユーザの意思表示が設定され、フィルタ条件を使う場合、ユーザはチェックボックス541をチェックする。テキストフォーム542には、フィルタ条件を入力する。同図の例では、チェックボックス541がチェックされ、テキストフォーム542にフィルタ条件「out=2 And y<0」が設定されている。
In the filter condition input field 540, information necessary for using the filter condition as information for specifying the generation range of the decision table is set. As shown in the figure, the filter condition input field 540 includes a check box 541 and a text form 542. The check box 541 is set to indicate the user's intention whether or not to use the filter condition to specify the generation range of the decision table, and when the filter condition is used, the user checks the check box 541. The filter condition is input to the text form 542. In the example of the figure, the check box 541 is checked and the filter condition "out = 2 And y <0" is set in the text form 542.

設定画面500に必要な情報を設定した後、ユーザが決定表生成ボタン550を操作すると、決定表生成装置100が決定表を生成するための処理を開始する。上記処理では、まず決定表生成部220が、設定画面500の内容(決定表の生成対象、決定表、比較対象、メトリクス名、閾値、フィルタ条件等)を生成範囲特定情報280として情報記憶部205に記憶させる。続いて、決定表生成部220が、生成範囲特定情報280を用いて、決定表生成対象のルールセットについて決定表の生成を開始する。尚、設定画面500において、決定表生成対象もしくは比較対象がソースコードで指定されている場合、決定表生成部220は、決定表生成処理の前に、ルール仕様生成部210を用いてソースコードからルール仕様を抽出し、抽出したルール仕様をルール仕様270として情報記憶部205に記憶させる。また例えば、生成対象もしくは比較対象が決定表で指定された場合、決定表生成部220は、決定表逆変換部230を用いて決定表をルール仕様に逆変換し、逆変換したルール仕様をルール仕様270として情報記憶部205に記憶させる。尚、仕様ルールの抽出及び決定表の逆変換は、設定画面500を生成範囲特定情報280として情報記憶部205が記憶するよりも前に行ってもよい。 After setting the necessary information on the setting screen 500, when the user operates the decision table generation button 550, the decision table generation device 100 starts the process for generating the decision table. In the above process, first, the decision table generation unit 220 sets the contents of the setting screen 500 (decision table generation target, decision table, comparison target, metric name, threshold value, filter condition, etc.) as the generation range specific information 280, and the information storage unit 205. To memorize. Subsequently, the decision table generation unit 220 starts the generation of the decision table for the rule set for which the decision table is generated, using the generation range specifying information 280. When the decision table generation target or the comparison target is specified in the source code on the setting screen 500, the decision table generation unit 220 uses the rule specification generation unit 210 from the source code before the decision table generation process. The rule specifications are extracted, and the extracted rule specifications are stored in the information storage unit 205 as the rule specifications 270. Further, for example, when a generation target or a comparison target is specified in the decision table, the decision table generation unit 220 reverse-converts the decision table into a rule specification using the decision table inverse conversion unit 230, and the reverse-converted rule specification is ruled. It is stored in the information storage unit 205 as the specification 270. The extraction of the specification rule and the inverse transformation of the decision table may be performed before the information storage unit 205 stores the setting screen 500 as the generation range specifying information 280.

図6は、決定表の生成に際して決定表生成部220が行う処理(以下、「決定表生成処理S600」と称する。)を説明するフローチャートである。以下、同図とともに決定表生成処理S600について説明する。尚、決定表生成部220は、例えば、ユーザの指示操作を契機として決定表生成処理S600を開始する。また決定表生成部220は、例えば、スケジュールされたタイミングでバッチ処理等により自動的に決定表生成処理S600を実行する。尚、以下において、符号の前に付している文字「S」は処理ステップを意味する。 FIG. 6 is a flowchart illustrating a process (hereinafter, referred to as “decision table generation process S600”) performed by the decision table generation unit 220 when generating the decision table. Hereinafter, the decision table generation process S600 will be described with reference to the figure. The decision table generation unit 220 starts the decision table generation process S600, for example, triggered by a user's instruction operation. Further, the decision table generation unit 220 automatically executes the decision table generation process S600 by batch processing or the like at a scheduled timing, for example. In the following, the letter "S" attached before the code means a processing step.

まず決定表生成部220は、決定表生成対象のルール仕様270(ルールセット)を読み込むとともに(S601)、生成範囲特定情報280を読み込む(S602)。 First, the decision table generation unit 220 reads the rule specification 270 (rule set) for which the decision table is generated (S601) and also reads the generation range specifying information 280 (S602).

続いて、決定表生成部220は、生成範囲特定情報280として比較対象が設定されているか否かを判定する(S603)。比較対象が設定されている場合(S603:YES)、処理はS604に進み、比較対象が設定されていない場合(S603:NO)、処理はS605に進む。 Subsequently, the decision table generation unit 220 determines whether or not the comparison target is set as the generation range specifying information 280 (S603). If the comparison target is set (S603: YES), the process proceeds to S604, and if the comparison target is not set (S603: NO), the process proceeds to S605.

S604では、決定表生成部220は、前述した差分に基づき決定表を生成する処理(以下、「差分の決定表生成処理S604」と称する。)を行う。差分の決定表生成処理S604の詳細については後述する。差分の決定表生成処理S604の終了後、処理はS606に進む。 In S604, the decision table generation unit 220 performs a process of generating a decision table based on the above-mentioned difference (hereinafter, referred to as “difference decision table generation process S604”). The details of the difference determination table generation process S604 will be described later. After the completion of the difference determination table generation process S604, the process proceeds to S606.

S605では、決定表生成部220は、決定表生成対象の全体に基づき決定表を生成する処理(以下、「全体の決定表生成処理S605」と称する。)を行う。全体の決定表生成処理S605の詳細については後述する。全体の決定表生成処理S605の終了後、処理はS607に進む。 In S605, the decision table generation unit 220 performs a process of generating a decision table based on the entire decision table generation target (hereinafter, referred to as “whole decision table generation process S605”). Details of the entire decision table generation process S605 will be described later. After the completion of the entire decision table generation process S605, the process proceeds to S607.

S606では、決定表生成部220は、差分の決定表生成処理S604の結果(戻り値)が「差分無し」であるか否かを判定する。差分の決定表生成処理S604の結果が「差分無し」であれば、決定表生成部220は、決定表生成処理S600を終了する。差分の
決定表生成処理S604の結果が「差分無し」でなければ、処理はS607に進む。
In S606, the decision table generation unit 220 determines whether or not the result (return value) of the difference decision table generation process S604 is "no difference". If the result of the difference decision table generation process S604 is "no difference", the decision table generation unit 220 ends the decision table generation process S600. If the result of the difference determination table generation process S604 is not "no difference", the process proceeds to S607.

S607では、決定表生成部220は、フィルタ条件が設定されているか否か(生成範囲特定情報280がフィルタ条件の設定を含むか否か)を判定する。生成範囲特定情報280にフィルタ条件が設定されている場合(S607:YES)、処理はS608に進み、フィルタ条件が設定されていない場合(S607:NO)、処理はS609に進む。 In S607, the decision table generation unit 220 determines whether or not the filter condition is set (whether or not the generation range specifying information 280 includes the setting of the filter condition). When the filter condition is set in the generation range specific information 280 (S607: YES), the process proceeds to S608, and when the filter condition is not set (S607: NO), the process proceeds to S609.

S608では、決定表生成部220は、S604又はS605にて生成された決定表からフィルタ条件を満たさない部分(行)を除外する。より詳細には、決定表生成部220は、決定表の行ごとに「フィルタ条件 And 入力条件And 結果」が真になり得るか(以下
、真になり得ることを「充足可能」と称し、真になり得ないことを「充足不能」と称する。)を判定し、充足不能の場合、その行を決定表から除外する。尚、論理式の充足可能性を判定する技術として、SMTソルバ(Satisfiability Modulo Theories Solver)があ
る。決定表生成部220は、例えば、SMTソルバ等を用いて充足可能性を判定する。
In S608, the decision table generation unit 220 excludes a portion (row) that does not satisfy the filter condition from the decision table generated in S604 or S605. More specifically, the decision table generator 220 determines whether the "filter condition And input condition And result" can be true for each row of the decision table (hereinafter, the fact that it can be true is referred to as "satisfiable" and is true. (It is called "unsatisfiable"), and if it is unsatisfactory, the row is excluded from the decision table. There is an SMT solver (Satisfiability Modulo Theories Solver) as a technique for determining the satisfiability of a logical expression. The decision table generation unit 220 determines the satisfiability by using, for example, an SMT solver or the like.

続いて、決定表生成部220は、生成範囲特定情報280としてメトリクスに関する情報が設定されているかを判定する(S609)。メトリクスに関する情報が設定されている場合(S609:YES)、処理はS610に進み、メトリクスに関する情報が設定されていない場合(S609:NO)、処理はS612に進む。 Subsequently, the decision table generation unit 220 determines whether or not the information related to the metric is set as the generation range specifying information 280 (S609). If the information about the metric is set (S609: YES), the process proceeds to S610, and if the information about the metric is not set (S609: NO), the process proceeds to S612.

S610では、メトリクス値取得部240が、決定表の行ごとにメトリクス値を取得する。続いて、決定表生成部220は、メトリクス値が予め設定された閾値以下(もしくは上記閾値以上)の行を決定表から除外する(S611)。その後、処理はS612に進む。 In S610, the metric value acquisition unit 240 acquires the metric value for each row of the decision table. Subsequently, the decision table generation unit 220 excludes rows having a metric value equal to or less than a preset threshold value (or more than the above threshold value) from the decision table (S611). After that, the process proceeds to S612.

S612では、決定表生成部220は、以上の処理によって生成された決定表を生成結果290として記憶する。尚、図6のS603〜S606の処理とS607〜S611の処理とは実行順序を逆にしてもよい。 In S612, the decision table generation unit 220 stores the decision table generated by the above processing as the generation result 290. The execution order of the processes S603 to S606 and the processes S607 to S611 in FIG. 6 may be reversed.

図7は、図6における「差分の決定表生成処理S604」を説明するフローチャートである。以下、同図とともに差分の決定表生成処理S604について説明する。 FIG. 7 is a flowchart illustrating the “difference determination table generation process S604” in FIG. Hereinafter, the difference determination table generation process S604 will be described with reference to the figure.

まず決定表生成部220は、決定表生成対象の出力変数と比較対象の出力変数とが一致(変数名が一致)しているか否かを判定する(S701)。両者が一致している場合(S701:YES)、処理はS702に進み、両者が一致していない場合(S702:NO)、処理はS703に進む。 First, the decision table generation unit 220 determines whether or not the output variable of the decision table generation target and the output variable of the comparison target match (variable names match) (S701). If they match (S701: YES), the process proceeds to S702, and if they do not match (S702: NO), the process proceeds to S703.

S702では、決定表生成部220は、決定表生成対象と比較対象とで出力変数が異なるようにする。例えば、決定表生成部220は、決定表生成対象と比較対象の各ルールの結果中の出力変数を「出力変数(対応するルールセットのルールセットID)」に置き換える。例えば、決定表生成対象が図3のルールセット310で、比較対象が図3のルールセット320である場合、決定表生成部220は、出力変数を夫々、「out(RS1)」、「out(RS2)」に置き換える。尚、出力変数の置き換え方法は上記方法に必ずしも限定されない。 In S702, the decision table generation unit 220 makes the output variables different between the decision table generation target and the comparison target. For example, the decision table generation unit 220 replaces the output variable in the result of each rule of the decision table generation target and the comparison target with "output variable (rule set ID of the corresponding rule set)". For example, when the decision table generation target is the rule set 310 of FIG. 3 and the comparison target is the rule set 320 of FIG. 3, the decision table generation unit 220 sets the output variables to "out (RS1)" and "out (out (RS1)", respectively. Replace with RS2) ”. The method of replacing the output variable is not necessarily limited to the above method.

続いて、決定表生成部220は、決定表生成対象と比較対象との差分を論理式で表す(S703)。具体的には、決定表生成部220は、まずルールセットに含まれるルールごとに、入力条件と結果とを論理積で結合し、さらにそれらを論理和で結合することにより、決定表生成対象及び比較対象を論理式に変換する。例えば、図3のルールセット310は「(((y>0 Or x>0) And x>100)And(out=1))Or(((y>0 Or x>0) And Not(x>100) And x>50)And(out=1))Or(((y>0 Or x>0) And Not(x>100) And Not(x>50))And(out=2))Or((Not(y>0
Or x>0))And(out=0))」という論理式に変換される。尚、この論理式は、ルールセット310に含まれるルールIDが「1」〜「4」のルールのうち、一つ以上のルールにおいて入力条件と結果が成り立つことを意味している。
Subsequently, the decision table generation unit 220 expresses the difference between the decision table generation target and the comparison target by a logical expression (S703). Specifically, the decision table generator 220 first joins the input condition and the result by a logical product for each rule included in the rule set, and further joins them by a logical sum to generate the decision table and the decision table. Convert the comparison target to a logical expression. For example, the rule set 310 in FIG. 3 is "(((y> 0 Or x> 0) And x> 100) And (out = 1)) Or (((y> 0 Or x> 0) And Not (x> 100) And x> 50) And (out = 1)) Or (((y> 0 Or x> 0) And Not (x> 100) And Not (x> 50)) And (out = 2)) Or ( (Not (y> 0
Or x> 0)) And (out = 0)) ”is converted to the formula. It should be noted that this logical expression means that the input condition and the result are satisfied in one or more of the rules whose rule IDs are "1" to "4" included in the rule set 310.

続いて、決定表生成部220は、ルールセットの論理式を用いて差分を表す論理式を生成する。ここで差分は、決定表生成対象と比較対象のルールセットが異なる結果に至る入力条件と当該入力条件における結果との組合せであり、「決定表生成対象の論理式 And
比較対象の論理式 And Not(決定表生成対象の出力変数 =比較対象の出力変数)」という論理式で表すことができる。この論理式は、決定表生成対象と比較対象を満たす入力条件と結果のうち、決定表生成対象の出力変数の値と比較対象の出力変数の値とが異なるケースを表している。
Subsequently, the decision table generation unit 220 generates a logical expression representing the difference using the logical expression of the rule set. Here, the difference is a combination of an input condition that leads to a result in which the rule set of the decision table generation target and the comparison target are different and the result in the input condition.
It can be expressed by the logical expression "And Not (output variable for decision table generation = output variable for comparison)". This formula represents a case where the value of the output variable of the decision table generation target and the value of the output variable of the comparison target are different among the input conditions and results that satisfy the decision table generation target and the comparison target.

続いて、決定表生成部220は、差分を表す論理式を、リテラルを論理積で結合し(以下、リテラルを論理積で結合した論理式を「節」と称する。)、節を論理和で結合した形の等価な論理式(以下、「選言標準形」と称する。)に変換する(S704)。この変換処理(以下、「論理式等価変換処理S704」と称する。)の詳細については後述する。 Subsequently, the decision table generation unit 220 joins the logical expressions representing the differences by the logical product of the literals (hereinafter, the logical expression in which the literals are connected by the logical product is referred to as a "section"), and the clauses are ORed. It is converted into an equivalent logical expression of the combined form (hereinafter, referred to as "disjunctive normal form") (S704). The details of this conversion process (hereinafter, referred to as “logical formula equivalent conversion process S704”) will be described later.

続いて、決定表生成部220は、論理式等価変換処理S704の結果(戻り値)が「選言標準形が偽(差分無し)」であるか否かを判断する(S705)。論理式等価変換処理S704の結果が「選言標準形が偽(差分無し)」である場合(S705:YES)、決定表生成部220は、当該処理(差分の決定表生成処理S604)の結果(戻り値)を「差分無し」として当該処理を終了し、その後、処理は図6の決定表生成処理S600のS606に進む。一方、論理式等価変換処理S704の結果が「選言標準形が偽でない(差分あり)」である場合(S705:NO)、処理はS706に進む。 Subsequently, the decision table generation unit 220 determines whether or not the result (return value) of the logical expression equivalent conversion process S704 is "the disjunctive normal form is false (no difference)" (S705). When the result of the logical expression equivalent conversion process S704 is "the disjunctive normal form is false (no difference)" (S705: YES), the decision table generation unit 220 is the result of the process (difference decision table generation process S604). The process is terminated with (return value) set to "no difference", and then the process proceeds to S606 of the decision table generation process S600 of FIG. On the other hand, when the result of the logical expression equivalent conversion process S704 is "the disjunctive normal form is not false (with a difference)" (S705: NO), the process proceeds to S706.

S706では、決定表生成部220は、S704で生成した選言標準形の全ての節についてS707〜S710の処理を繰り返し実行する。選言標準形の全節についてS707〜S710の処理が終了すると、決定表生成部220は、当該処理(差分の決定表生成処理S604)の結果(戻り値)を「差分有り」として当該処理を終了する。その後、処理は図6の決定表生成処理S600のS606に進む。 In S706, the decision table generation unit 220 repeatedly executes the processes of S707 to S710 for all the sections of the disjunctive normal form generated in S704. When the processing of S707 to S710 is completed for all the sections of the disjunctive normal form, the decision table generation unit 220 sets the result (return value) of the processing (difference decision table generation processing S604) as "with difference" and performs the processing. finish. After that, the process proceeds to S606 of the decision table generation process S600 of FIG.

S707では、決定表生成部220は、差分入力条件と差分入力条件における結果との組合せ(以下、「結果ペア」と称する。)を取得する。決定表生成部220は、節に含まれるリテラルのうち出力変数を含まないリテラルをすべて論理積で結合した論理式を差分入力条件とし、節に含まれるリテラルのうち出力変数を含むすべてのリテラルを結果ペアとする。尚、S704で生成した選言標準形の各節には、決定表生成対象の出力変数を含むリテラルと比較対象の出力変数を含むリテラルとが一つずつ含まれる。 In S707, the decision table generation unit 220 acquires a combination of the difference input condition and the result in the difference input condition (hereinafter, referred to as “result pair”). The decision table generator 220 uses a logical expression in which all the literals included in the clause that do not include the output variable are combined by a logical product as a difference input condition, and sets all the literals included in the clause that include the output variable as the difference input condition. Make a result pair. Each section of the disjunctive normal form generated in S704 includes one literal including an output variable to be generated as a decision table and one literal including an output variable to be compared.

S708では、決定表生成部220は、S707で生成した結果ペアに含まれるリテラルにおいて、出力変数の値の不一致が自明であるか否かを判定する。具体的には、例えば、決定表生成部220は、「Not(差分入力条件 → 結果ペアに含まれる各リテラルの右辺を不等号で結合したリテラル)」の充足可能性を判定する。上記論理式が充足不能の場合
、上記論理式から否定を除外した論理式「(差分入力条件 → 結果ペアに含まれる各リテラルの右辺を不等号で結合したリテラル」は常に真である。即ち、差分入力条件が成り立つならば、必ず決定表生成対象の出力変数と比較対象の出力変数に割り当てられる値が異なるので、決定表生成部220は、出力変数の値の不一致が自明であるとする。上記論理式が充足可能の場合、決定表生成部220は、出力変数の値の不一致が自明でないとする。決定表生成部220が出力変数の値の不一致が自明であると判定した場合(S708:YES)、処理はS710に進む。決定表生成部220が出力変数の値の不一致が自明でないと判定した場合(S708:NO)、処理はS709に進む。
In S708, the decision table generation unit 220 determines whether or not the discrepancy in the values of the output variables is obvious in the literal included in the result pair generated in S707. Specifically, for example, the decision table generation unit 220 determines the satisfiability of "Not (difference input condition-> a literal in which the right side of each literal included in the result pair is connected by an inequality sign)". When the above formula cannot be satisfied, the formula "(difference input condition-> literal in which the right side of each literal included in the result pair is combined by an inequality number" excluding negation from the above formula is always true. That is, the difference. If the input conditions are satisfied, the values assigned to the output variables to be generated and the output variables to be compared are always different. Therefore, the decision table generation unit 220 assumes that the discrepancy between the values of the output variables is obvious. When the logical expression can be satisfied, the determination table generation unit 220 determines that the mismatch of the values of the output variables is not obvious. When the determination table generation unit 220 determines that the mismatch of the values of the output variables is obvious (S708: YES), the process proceeds to S710. When the determination table generation unit 220 determines that the discrepancy between the values of the output variables is not obvious (S708: NO), the process proceeds to S709.

S709では、決定表生成部220は、結果ペアに含まれる各リテラルから右辺を抽出し、上記各右辺を不等号で結合したリテラル(以下、「結果不一致リテラル」と称する。)を生成し、上記結果不一致リテラルを差分入力条件に論理積で結合する。 In S709, the decision table generation unit 220 extracts the right side from each literal included in the result pair, generates a literal in which each of the right sides is connected by an inequality sign (hereinafter, referred to as "result mismatch literal"), and the above result. Combine unmatched literals with differential input conditions as a logical product.

S710では、決定表生成部220は、差分入力条件と結果ペアを差分として決定表に設定する。 In S710, the decision table generation unit 220 sets the difference input condition and the result pair as the difference in the decision table.

図8は、図6における「全体の決定表生成処理S605」を説明するフローチャートである。以下、同図とともに全体の決定表生成処理S605について説明する。 FIG. 8 is a flowchart illustrating “whole decision table generation process S605” in FIG. Hereinafter, the entire decision table generation process S605 will be described together with the figure.

まず決定表生成部220は、決定表生成対象に含まれているルールに対して、結果が同じルールをグループ化する(S801)。尚、以下、結果が同じルールの集合のことを「ルールグループ」と称する。 First, the decision table generation unit 220 groups rules having the same result with respect to the rules included in the decision table generation target (S801). Hereinafter, a set of rules having the same result will be referred to as a "rule group".

続いて、S802では、決定表生成部220は、S801で生成した全てのルールグループについてS803〜S809の処理を繰り返し実行する。 Subsequently, in S802, the decision table generation unit 220 repeatedly executes the processes of S803 to S809 for all the rule groups generated in S801.

S803では、決定表生成部220は、ルールグループ中の全てのルールの入力条件を論理和で結合した論理式(以下、「統合入力条件」と称する。)を生成する。 In S803, the decision table generation unit 220 generates a logical expression (hereinafter, referred to as “integrated input condition”) in which the input conditions of all the rules in the rule group are ORed together.

続いて、決定表生成部220は、生成した統合入力条件を選言標準形に変換する(S804)。この変換処理(以下、「論理式等価変換処理S804」と称する。)の詳細については後述する。 Subsequently, the decision table generation unit 220 converts the generated integrated input condition into the disjunctive normal form (S804). The details of this conversion process (hereinafter, referred to as “logical formula equivalent conversion process S804”) will be described later.

続いて、決定表生成部220は、論理式等価変換処理S804の結果が「選言標準形が偽」であるか否かを判断する(S805)。論理式等価変換処理S804の結果が「選言標準形が偽」である場合(S805:YES)、決定表生成部220は、S806〜S809の処理をスキップする。論理式等価変換処理S804の結果が「選言標準形が偽」でない場合(S805:NO)、処理はS806に進む。 Subsequently, the decision table generation unit 220 determines whether or not the result of the logical expression equivalent conversion process S804 is "the disjunctive normal form is false" (S805). When the result of the logical expression equivalent conversion process S804 is "the disjunctive normal form is false" (S805: YES), the decision table generation unit 220 skips the processes of S806 to S809. If the result of the logical expression equivalent conversion process S804 is not "the disjunctive normal form is false" (S805: NO), the process proceeds to S806.

S806では、決定表生成部220は、選言標準形の節を夫々入力条件として抽出する。このとき入力条件は一つ以上抽出される。 In S806, the decision table generation unit 220 extracts the clauses of the disjunctive normal form as input conditions, respectively. At this time, one or more input conditions are extracted.

続いて、決定表生成部220は、ルールグループ内のルールから結果を抽出する(S807)。このとき、ルールグループにおいて全てのルールは結果が同じであり、結果は一つのみ抽出される。 Subsequently, the decision table generation unit 220 extracts the result from the rules in the rule group (S807). At this time, all the rules in the rule group have the same result, and only one result is extracted.

続いて、決定表生成部220は、S806で抽出した入力条件を入力条件とし、S806で抽出した結果を結果とするルール(以下、「決定表ルール」と称する。)を生成する(S808)。尚、決定表ルールはS806で抽出した入力条件ごとに一つ生成される。 Subsequently, the decision table generation unit 220 generates a rule (hereinafter, referred to as "decision table rule") using the input condition extracted in S806 as the input condition and the result extracted in S806 as the result (S808). One decision table rule is generated for each input condition extracted in S806.

続いて、決定表生成部220は、生成した決定表ルールを決定表に設定する(S809)。 Subsequently, the decision table generation unit 220 sets the generated decision table rule in the decision table (S809).

図9は、前述した論理式等価変換処理(図7の「論理式等価変換処理S704」又は図8の「論理式等価変換処理S804」。以下、「論理式等価変換処理S900」と称する。)を説明するフローチャートである。以下、同図とともに論理式等価変換処理S900について説明する。 FIG. 9 shows the above-mentioned logical formula equivalent conversion process (“logical formula equivalent conversion process S704” in FIG. 7 or “logical formula equivalent conversion process S804” in FIG. 8; hereinafter, referred to as “logical formula equivalent conversion process S900”). It is a flowchart explaining. Hereinafter, the logical expression equivalent conversion process S900 will be described with reference to the figure.

まず決定表生成部220は、変換対象の論理式から項を抽出する(S901)。 First, the decision table generation unit 220 extracts terms from the logical expression to be converted (S901).

続いて、決定表生成部220は、S901で抽出した全ての項の否定を生成する。以下、S901で抽出した項、及び、S902で生成した項の否定の集合のことを「リテラル集合」と称する(S902)。尚、決定表生成部220は、S901で抽出した時点で否定が存在する項については否定を生成しない。 Subsequently, the decision table generation unit 220 generates negations of all the terms extracted in S901. Hereinafter, the set of negations of the terms extracted in S901 and the terms generated in S902 will be referred to as a "literal set" (S902). The decision table generation unit 220 does not generate a negation for a term in which a negation exists at the time of extraction in S901.

続いて、決定表生成部220は、変換対象の論理式の否定が充足可能であるか否かを判定する(S903)。変換対象の論理式の否定が充足不能である場合(S903:NO)、処理はS904に進み、変換対象の論理式の否定が充足可能である場合(S903:YES)、処理はS905に進む。 Subsequently, the decision table generation unit 220 determines whether or not the negation of the logical expression to be converted can be satisfied (S903). If the negation of the logical expression to be converted is unsatisfactory (S903: NO), the process proceeds to S904, and if the negation of the logical expression to be converted is satisfiable (S903: YES), the process proceeds to S905.

S904では、決定表生成部220は、「真(True)」を変換後の選言標準形(戻り値)として論理式等価変換処理S900を終了する。 In S904, the decision table generation unit 220 ends the logical expression equivalent conversion process S900 with "True" as the disjunctive normal form (return value) after conversion.

S905では、決定表生成部220は、変換対象の論理式が充足可能か否かを判定する。変換対象の論理式が充足不能な場合(S905:NO)、処理はS906に進み、充足可能な場合(S905:YES)、処理はS907に進む。 In S905, the decision table generation unit 220 determines whether or not the logical expression to be converted can be satisfied. If the logical expression to be converted cannot be satisfied (S905: NO), the process proceeds to S906, and if it can be satisfied (S905: YES), the process proceeds to S907.

S906では、決定表生成部220は、「偽(False)」を変換後の選言標準形(戻り
値)として、論理式等価変換処理S900を終了する。
In S906, the decision table generation unit 220 ends the logical expression equivalent conversion process S900 with "False" as the disjunctive normal form (return value) after conversion.

S907では、決定表生成部220は、変換対象の論理式が充足する変数への値の割り当て(以下、「充足解」と称する。)を取得する。尚、決定表生成部220は、例えば、充足可能な論理式の充足解を取得する機能を有するSMTソルバを用いて充足解を取得する。 In S907, the decision table generation unit 220 acquires the assignment of the value to the variable to which the logical expression to be converted satisfies (hereinafter, referred to as “satisfaction solution”). The decision table generation unit 220 acquires a satisfied solution by using, for example, an SMT solver having a function of acquiring a satisfied solution of a logical expression that can be satisfied.

続いて、決定表生成部220は、S907で取得した充足解において、充足するリテラルをすべて取得する(S908)。以下、S907で取得した充足解において、充足するリテラルの集合のことを「充足節」と称する。 Subsequently, the decision table generation unit 220 acquires all the literals to be satisfied in the satisfying solution acquired in S907 (S908). Hereinafter, in the satisfaction solution acquired in S907, the set of literals to be satisfied is referred to as a "satisfaction clause".

続いて、決定表生成部220は、充足節からドントケアを除外する(S909)。決定表生成部220は、充足節からリテラルを一つ除外し、除外後の充足節に含まれる全てのリテラルと変換対象の論理式の否定とを論理積で結合した論理式が充足可能であるか否かを判定する。充足不能と判定した場合、決定表生成部220は、除外後の充足節は変換対象の論理式を満たすと判断し、除外されたリテラルをドントケアと判断する。決定表生成部220は、充足節に含まれるリテラルについて順にドントケアであるか否かを判定し、ドントケアである場合は充足節からドントケアを除外する。このとき、リテラル間の包含関係を調べ、上記包含関係に基づき、ドントケアであるか否かを判定する順序を決めてもよい。 Subsequently, the decision table generator 220 excludes don't care from the sufficiency node (S909). The determination table generation unit 220 excludes one literal from the satisfied clause, and can satisfy a logical expression in which all the literals included in the excluded satisfied clause and the negation of the logical expression to be converted are combined by a logical product. Judge whether or not. When it is determined that the satisfiability cannot be satisfied, the decision table generation unit 220 determines that the satisfied clause after exclusion satisfies the logical expression to be converted, and determines that the excluded literal is don't care. The decision table generation unit 220 determines in order whether or not the literals included in the sufficiency clause are don't care, and if it is don't care, excludes the don't care from the sufficiency clause. At this time, the inclusion relationship between the literals may be examined, and the order of determining whether or not the literal care may be performed may be determined based on the inclusion relationship.

続いて、決定表生成部220は、S906でドントケアを除外した充足節を充足節の集合(以下、「充足節集合」と称する。)に追加する(S910)。 Subsequently, the decision table generation unit 220 adds the sufficiency clause excluding the don't care in S906 to the set of sufficiency clauses (hereinafter, referred to as "sufficiency clause set") (S910).

続いて、決定表生成部220は、変換対象の論理式に重複禁止式を論理積で結合する(S911)。即ち、決定表生成部220は、類似する充足節が生成されることを防ぐため、充足節に含まれる全てのリテラルを論理積で結合し、全体を否定した論理式を重複禁止式として変換対象の論理式に論理積で結合する。 Subsequently, the decision table generation unit 220 joins the duplication prohibition formula with the logical expression to be converted by a logical product (S911). That is, in order to prevent the generation of similar satisfied clauses, the decision table generation unit 220 joins all the literals included in the satisfied clauses by a logical product, and converts the logical expression that negates the whole as a duplicate prohibition expression. It is combined with the logical expression of.

続いて、決定表生成部220は、変換対象の論理式が充足可能か否かを判定する(S9
12)。変換対象の論理式が充足可能である場合(S912:YES)、処理はS907に戻り、変換対象の論理式が充足不能である場合(S912:NO)、処理はS913に進む。
Subsequently, the decision table generation unit 220 determines whether or not the logical expression to be converted can be satisfied (S9).
12). When the logical expression to be converted can be satisfied (S912: YES), the process returns to S907, and when the logical expression to be converted cannot be satisfied (S912: NO), the process proceeds to S913.

S913では、決定表生成部220は、充足集合節に含まれる全ての充足節に対して全てのリテラルを論理積で結合した論理式を生成し、上記論理式の全てを論理和で結合した論理式を生成してこれを戻り値とする。その後、処理は呼び出し元の処理に後続する処理に進む。即ち図7の論理式等価変換処理S704の場合はS705に進み、図8の論理式等価変換処理S804の場合はS805に進む。 In S913, the decision table generation unit 220 generates a logical expression in which all literals are combined by a logical product for all the satisfied clauses included in the satisfied set clause, and all of the above logical expressions are joined by a logical sum. Generate an expression and use this as the return value. After that, the process proceeds to the process following the process of the caller. That is, in the case of the logical expression equivalent conversion process S704 of FIG. 7, the process proceeds to S705, and in the case of the logical expression equivalent conversion process S804 of FIG. 8, the process proceeds to S805.

以上に説明したように、決定表生成装置100は、決定表生成対象であるルール仕様のうち、生成範囲特定情報280によって特定される範囲について決定表を生成するので、例えば、ルール仕様に含まれるルールが膨大である場合にルール仕様の確認にかかる人の負荷を軽減することができる。 As described above, the decision table generation device 100 generates a decision table for the range specified by the generation range specifying information 280 among the rule specifications for which the decision table is generated, and therefore is included in the rule specifications, for example. When the number of rules is huge, it is possible to reduce the burden on the person who checks the rule specifications.

また決定表生成装置100は、例えば、決定表の生成対象であるルール仕様のうち、異なる結果となる同一の入力条件と当該入力条件における決定表の生成対象のルール仕様の結果及び比較の対象とするルール仕様の結果との組合せ(差分)について決定表を生成する。そのため、ユーザが確認を行いたい部分(例えば、ルール仕様(ソースコード)の変更(修正)前後に関係する部分)のみについて決定表を生成することができ、ユーザは効率よくルール仕様を確認することができる。 Further, the decision table generator 100 is, for example, among the rule specifications for which the decision table is generated, the same input condition that produces different results, and the result and comparison target of the rule specification for which the decision table is generated under the input condition. Generate a decision table for the combination (difference) with the result of the rule specification to be performed. Therefore, the decision table can be generated only for the part that the user wants to check (for example, the part related to before and after the change (correction) of the rule specification (source code)), and the user can check the rule specification efficiently. Can be done.

また決定表生成装置100は、例えば、メトリクス値及びメトリクス評価情報に基づき特定した生成範囲について決定表を生成する。そのため、ユーザはメトリクス値及びメトリクス評価情報を適切に設定することで、確認を行いたい部分について決定表を生成することができ、ユーザは効率よくルール仕様を確認することができる。 Further, the decision table generation device 100 generates a decision table for the generation range specified based on, for example, the metric value and the metric evaluation information. Therefore, the user can generate a decision table for the part to be confirmed by appropriately setting the metric value and the metric evaluation information, and the user can efficiently confirm the rule specifications.

また決定表生成装置100は、例えば、ルール仕様にフィルタ条件を適用することにより特定される生成範囲について決定表を生成する。そのため、ユーザはフィルタ条件を適切に設定することで、確認を行いたい部分について決定表を生成することができ、ユーザは効率よくルール仕様を確認することができる Further, the decision table generation device 100 generates a decision table for a generation range specified by applying a filter condition to a rule specification, for example. Therefore, the user can generate a decision table for the part to be confirmed by setting the filter conditions appropriately, and the user can efficiently confirm the rule specifications.

以上、本発明について実施の形態に基づき具体的に説明したが、本発明は上記の実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。例えば、上記の実施の形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また上記実施形態の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 Although the present invention has been specifically described above based on the embodiments, it goes without saying that the present invention is not limited to the above embodiments and can be variously modified without departing from the gist thereof. do not have. For example, the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the described configurations. Further, it is possible to add / delete / replace a part of the configuration of the above embodiment with another configuration.

例えば、以上ではルールの結果に含まれるリテラルの数が一つである場合を例として説明したが、「変数=値」、「変数=変数」、「変数=変数を0以上含む計算式」といった形式のリテラルを論理積で結合することで、結果に2つ以上のリテラルを含むルールについても前述と同様の論理式で表すことが可能である。また結果に2つ以上のリテラルを含むルールが存在する場合、結果を論理積で分割し、分割後の各リテラルを結果とし、上記結果に二つ以上のリテラルを含むルールの入力条件を入力条件とするルールを生成することで、上記結果に2つ以上のリテラルを含むルールを、結果に一つのリテラルを含むルールに変換することができる。 For example, in the above, the case where the number of literals included in the result of the rule is one has been described as an example, but "variable = value", "variable = variable", "variable = calculation formula including 0 or more variables", etc. By combining the literals of the form by a logical product, it is possible to express a rule containing two or more literals in the result by the same logical expression as described above. If the result has a rule containing two or more literals, the result is divided by the logical product, each literal after the division is used as the result, and the input condition of the rule containing two or more literals in the above result is input. By generating the rule of, it is possible to convert a rule containing two or more literals in the above result into a rule containing one literal in the result.

また上記の各構成、機能部、処理部、処理手段等は、それらの一部または全部を、例えば、集積回路で設計する等によりハードウェアで実現してもよい。また上記の各構成、機
能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリやハードディスク、SSD(Solid State Drive)等の記録装置、また
はICカード、SDカード、DVD等の記録媒体に置くことができる。
Further, each of the above configurations, functional units, processing units, processing means and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. Further, each of the above configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be placed in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.

また上記の各図において、制御線や情報線は説明上必要と考えられるものを示しており、必ずしも実装上の全ての制御線や情報線を示しているとは限らない。例えば、実際にはほとんど全ての構成が相互に接続されていると考えてもよい。 Further, in each of the above figures, the control lines and information lines are shown as necessary for explanation, and not all the control lines and information lines in the implementation are necessarily shown. For example, in practice almost all configurations may be considered interconnected.

また以上に説明した決定表生成装置100の各種機能部、各種処理部、各種データベースの配置形態は一例に過ぎない。各種機能部、各種処理部、各種データベースの配置形態は、決定表生成装置100が備えるハードウェアやソフトウェアの性能、処理効率、通信効率等の観点から最適な配置形態に変更し得る。 Further, the arrangement form of the various functional units, the various processing units, and the various databases of the decision table generation device 100 described above is only an example. The arrangement form of the various functional units, the various processing units, and the various databases can be changed to the optimum arrangement form from the viewpoints of the performance, processing efficiency, communication efficiency, and the like of the hardware and software included in the decision table generator 100.

また前述した各種データベースの構成(スキーマ(Schema)等)は、リソースの効率的な利用、処理効率向上、アクセス効率向上、検索効率向上等の観点から柔軟に変更し得る。 Further, the above-mentioned configurations of various databases (schema, etc.) can be flexibly changed from the viewpoints of efficient use of resources, improvement of processing efficiency, improvement of access efficiency, improvement of search efficiency, and the like.

100 決定表生成装置、205 情報記憶部、210 ルール仕様生成部、220 決定表生成部、230 決定表逆変換部、240 メトリクス値取得部、260 ソースコード、270 ルール仕様、280 生成範囲特定情報、290 生成結果、500 設定画面、S600 決定表生成処理、S604 差分の決定表生成処理、S605 全体の決定表生成処理、S900 論理式等価変換処理 100 Decision table generator, 205 Information storage unit, 210 Rule specification generator, 220 Decision table generator, 230 Decision table inverse conversion unit, 240 Metrics value acquisition unit, 260 Source code, 270 Rule specifications, 280 Generation range identification information, 290 generation result, 500 setting screen, S600 decision table generation process, S604 difference decision table generation process, S605 entire decision table generation process, S900 logical expression equivalent conversion process

Claims (12)

ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、
決定表の生成範囲を特定する情報である生成範囲特定情報、
を記憶する情報記憶部と、
前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表を生成する決定表生成部と、
を備え、
前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、
前記決定表生成部は、
前記入力条件又は前記ルール仕様に基づき生成された論理式を、論理的に等価な、前記構成要素の論理積である節を論理和で結合した論理式である選言標準形に変換し、
前記構成要素ごとに前記入力条件に影響を与えるか否かを判定し、前記入力条件に影響を与えない前記構成要素を前記入力条件から除外して前記決定表を生成する、
決定表生成装置。
The rule specifications, which are information that describes the software specifications by one or more rules, including the input conditions and the results, which are the information indicating the values of the output variables, and the rule specifications.
Generation range identification information, which is information that specifies the generation range of the decision table
Information storage unit that stores
Of the rule specifications, a decision table generation unit that generates a decision table for the range specified by the generation range specific information, and
With
The components of the input condition are a term that is at least one of a comparison expression, a true / false variable, and a false value, or a negation of the term.
The decision table generation unit
A logical expression generated based on the input condition or the rule specification is converted into a disjunctive normal form which is a logical expression in which clauses which are logically equivalent logical products of the constituent elements are combined by a logical sum.
It is determined for each component whether or not it affects the input condition, and the component that does not affect the input condition is excluded from the input condition to generate the decision table.
Decision table generator.
請求項1に記載の決定表生成装置であって、
前記生成範囲特定情報は、決定表の生成対象である第1の前記ルール仕様について比較の対象とする第2の前記ルール仕様を特定する情報を含み、
前記決定表生成部は、前記第1のルール仕様と前記第2のルール仕様のうち、異なる結果となる同一の前記入力条件と当該入力条件における前記第1のルール仕様の結果及び前記第2のルール仕様の結果との組合せについて決定表を生成する、
決定表生成装置。
The decision table generator according to claim 1.
The generation range specifying information includes information for specifying a second rule specification to be compared with respect to the first rule specification to be generated in the decision table.
The decision table generation unit has the same input condition that results in different results among the first rule specification and the second rule specification, the result of the first rule specification under the input condition, and the second rule specification. Generate a decision table for the combination with the result of the rule specification,
Decision table generator.
請求項1に記載の決定表生成装置であって、
前記生成範囲特定情報は、決定表の生成対象である前記ルール仕様について取得されるメトリクス値と、前記メトリクス値を評価して前記生成範囲を特定する情報であるメトリクス評価情報とを含み、
前記決定表生成部は、前記メトリクス値及び前記メトリクス評価情報に基づき前記生成範囲を特定し、特定した前記生成範囲について決定表を生成する、
決定表生成装置。
The decision table generator according to claim 1.
The generation range specifying information includes a metric value acquired for the rule specification that is a generation target of a decision table, and metric evaluation information that is information for evaluating the metric value and specifying the generation range.
The decision table generation unit specifies the generation range based on the metric value and the metric evaluation information, and generates a decision table for the specified generation range.
Decision table generator.
請求項に記載の決定表生成装置であって、
前記メトリクス評価情報は、前記メトリクス値と比較される閾値を含み、
前記決定表生成部は、前記メトリクス値と前記閾値とを比較することにより特定される前記生成範囲について決定表を生成する、
決定表生成装置。
The decision table generator according to claim 3.
The metric evaluation information includes a threshold value to be compared with the metric value.
The decision table generation unit generates a decision table for the generation range specified by comparing the metric value with the threshold value.
Decision table generator.
ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、
決定表の生成範囲を特定する情報である生成範囲特定情報、
を記憶する情報記憶部と、
前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表を生成する決定表生成部と、
を備え、
前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、
前記生成範囲特定情報は、決定表の生成対象である前記ルール仕様について取得されるメトリクス値と、前記メトリクス値を評価して前記生成範囲を特定する情報であるメトリクス評価情報とを含み、
前記決定表生成部は、前記メトリクス値及び前記メトリクス評価情報に基づき前記生成範囲を特定し、特定した前記生成範囲について決定表を生成し、
前記メトリクス値は、前記入力条件の前記構成要素の組合せの数であり、
前記メトリクス評価情報は、予め設定された閾値以下の数のルールにしか出現しない前記組合せを含む前記ルールを前記生成範囲として特定する情報を含む、
決定表生成装置。
The rule specifications, which are information that describes the software specifications by one or more rules, including the input conditions and the results, which are the information indicating the values of the output variables, and the rule specifications.
Generation range identification information, which is information that specifies the generation range of the decision table
Information storage unit that stores
Of the rule specifications, a decision table generation unit that generates a decision table for the range specified by the generation range specific information, and
With
The components of the input condition are a term that is at least one of a comparison expression, a true / false variable, and a false value, or a negation of the term.
The generation range specifying information includes a metric value acquired for the rule specification that is a generation target of a decision table, and metric evaluation information that is information for evaluating the metric value and specifying the generation range.
The decision table generation unit specifies the generation range based on the metric value and the metric evaluation information, and generates a decision table for the specified generation range.
The metric value is the number of combinations of the components of the input condition.
The metric evaluation information includes information that specifies the rule including the combination that appears only in a number of rules equal to or less than a preset threshold value as the generation range.
Decision table generator.
ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、
決定表の生成範囲を特定する情報である生成範囲特定情報、
を記憶する情報記憶部と、
前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表を生成する決定表生成部と、
を備え、
前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、
前記生成範囲特定情報は、決定表の生成対象である前記ルール仕様について取得されるメトリクス値と、前記メトリクス値を評価して前記生成範囲を特定する情報であるメトリクス評価情報とを含み、
前記決定表生成部は、前記メトリクス値及び前記メトリクス評価情報に基づき前記生成範囲を特定し、特定した前記生成範囲について決定表を生成し、
前記メトリクス値は、前記入力条件の前記構成要素の数であり、
前記メトリクス評価情報は、前記構成要素の数が予め設定された閾値以上の前記ルールを前記生成範囲として特定する情報を含む、
決定表生成装置。
The rule specifications, which are information that describes the software specifications by one or more rules, including the input conditions and the results, which are the information indicating the values of the output variables, and the rule specifications.
Generation range identification information, which is information that specifies the generation range of the decision table
Information storage unit that stores
Of the rule specifications, a decision table generation unit that generates a decision table for the range specified by the generation range specific information, and
With
The components of the input condition are a term that is at least one of a comparison expression, a true / false variable, and a false value, or a negation of the term.
The generation range specifying information includes a metric value acquired for the rule specification that is a generation target of a decision table, and metric evaluation information that is information for evaluating the metric value and specifying the generation range.
The decision table generation unit specifies the generation range based on the metric value and the metric evaluation information, and generates a decision table for the specified generation range.
The metric value is the number of the components of the input condition.
The metric evaluation information includes information that specifies the rule whose number of components is equal to or greater than a preset threshold value as the generation range.
Decision table generator.
ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、
決定表の生成範囲を特定する情報である生成範囲特定情報、
を記憶する情報記憶部と、
前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表を生成する決定表生成部と、
を備え、
前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、
前記生成範囲特定情報は、決定表の生成対象である前記ルール仕様について取得されるメトリクス値と、前記メトリクス値を評価して前記生成範囲を特定する情報であるメトリクス評価情報とを含み、
前記決定表生成部は、前記メトリクス値及び前記メトリクス評価情報に基づき前記生成範囲を特定し、特定した前記生成範囲について決定表を生成し、
前記ルール仕様はソースコードに基づき生成されたものであり、
前記メトリクス値は、前記ルールの前記入力条件の前記構成要素に対応する命令の前記ソースコードにおける距離であり、
前記メトリクス評価情報は、前記距離が予め設定された閾値以上の前記ルールを前記生成範囲として特定する情報を含む、
決定表生成装置。
The rule specifications, which are information that describes the software specifications by one or more rules, including the input conditions and the results, which are the information indicating the values of the output variables, and the rule specifications.
Generation range identification information, which is information that specifies the generation range of the decision table
Information storage unit that stores
Of the rule specifications, a decision table generation unit that generates a decision table for the range specified by the generation range specific information, and
With
The components of the input condition are a term that is at least one of a comparison expression, a true / false variable, and a false value, or a negation of the term.
The generation range specifying information includes a metric value acquired for the rule specification that is a generation target of a decision table, and metric evaluation information that is information for evaluating the metric value and specifying the generation range.
The decision table generation unit specifies the generation range based on the metric value and the metric evaluation information, and generates a decision table for the specified generation range.
The rule specifications are generated based on the source code.
The metric value is a distance in the source code of an instruction corresponding to the component of the input condition of the rule.
The metric evaluation information includes information that specifies the rule whose distance is equal to or greater than a preset threshold value as the generation range.
Decision table generator.
ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、
決定表の生成範囲を特定する情報である生成範囲特定情報、
を記憶する情報記憶部と、
前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表を生成する決定表生成部と、
を備え、
前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、
前記生成範囲特定情報は、決定表の生成対象である前記ルール仕様について取得されるメトリクス値と、前記メトリクス値を評価して前記生成範囲を特定する情報であるメトリクス評価情報とを含み、
前記決定表生成部は、前記メトリクス値及び前記メトリクス評価情報に基づき前記生成範囲を特定し、特定した前記生成範囲について決定表を生成し、
前記ルール仕様はソースコードに基づき生成されたものであり、
前記メトリクス値は、前記ルールの前記入力条件の前記構成要素に対応する前記ソースコードの命令が内包する「If〜Then〜Else」形式の命令におけるElse命令の数であり、
前記メトリクス評価情報は、前記Else命令の数が予め設定された閾値以上の前記ルールを前記生成範囲として特定する情報を含む、
決定表生成装置。
The rule specifications, which are information that describes the software specifications by one or more rules, including the input conditions and the results, which are the information indicating the values of the output variables, and the rule specifications.
Generation range identification information, which is information that specifies the generation range of the decision table
Information storage unit that stores
Of the rule specifications, a decision table generation unit that generates a decision table for the range specified by the generation range specific information, and
With
The components of the input condition are a term that is at least one of a comparison expression, a true / false variable, and a false value, or a negation of the term.
The generation range specifying information includes a metric value acquired for the rule specification that is a generation target of a decision table, and metric evaluation information that is information for evaluating the metric value and specifying the generation range.
The decision table generation unit specifies the generation range based on the metric value and the metric evaluation information, and generates a decision table for the specified generation range.
The rule specifications are generated based on the source code.
The metric value is the number of Else instructions in the "If-Then-Else" type instruction included in the instruction of the source code corresponding to the component of the input condition of the rule.
The metric evaluation information includes information that specifies the rule in which the number of Else instructions is equal to or greater than a preset threshold value as the generation range.
Decision table generator.
請求項1に記載の決定表生成装置であって、
前記生成範囲特定情報は論理式で記述されたフィルタ条件を含み、
前記決定表生成部は、前記ルール仕様に前記フィルタ条件を適用することにより特定される前記生成範囲について決定表を生成する、
決定表生成装置。
The decision table generator according to claim 1.
The generation range specific information includes a filter condition described by a logical expression.
The decision table generator generates a decision table for the generation range specified by applying the filter condition to the rule specification.
Decision table generator.
請求項1に記載の決定表生成装置であって、
前記情報記憶部はソースコードを記憶し、
前記出力変数を受け付けるユーザインタフェース、及び前記ソースコードと出力変数とに基づき前記ルール仕様を自動生成するルール仕様生成部をさらに備える、
決定表生成装置。
The decision table generator according to claim 1.
The information storage unit stores the source code and stores the source code.
It further includes a user interface that accepts the output variable, and a rule specification generator that automatically generates the rule specification based on the source code and the output variable.
Decision table generator.
請求項1に記載の決定表生成装置であって、
前記情報記憶部は決定表を記憶し、
前記決定表に基づき前記ルール仕様を自動生成する決定表逆変換部をさらに備える、
決定表生成装置。
The decision table generator according to claim 1.
The information storage unit stores the decision table and
A decision table inverse conversion unit that automatically generates the rule specifications based on the decision table is further provided.
Decision table generator.
情報処理装置が、
ソフトウェアの仕様を入力条件と出力変数の値を示す情報である結果とを含む一つ以上のルールにより記述した情報であるルール仕様、及び、
決定表の生成範囲を特定する情報である生成範囲特定情報、
を記憶するステップ、
前記ルール仕様のうち、前記生成範囲特定情報によって特定される範囲について決定表
を生成するステップ、
を実行し、
前記入力条件の構成要素は、比較式、真偽型の変数、及び真偽値の少なくともいずれかである項、もしくは前記項の否定であり、
前記情報処理装置が、
前記入力条件又は前記ルール仕様に基づき生成された論理式を、論理的に等価な、前記構成要素の論理積である節を論理和で結合した論理式である選言標準形に変換するステップ、
前記構成要素ごとに前記入力条件に影響を与えるか否かを判定し、前記入力条件に影響を与えない前記構成要素を前記入力条件から除外して前記決定表を生成するステップ、
を実行する、決定表生成方法。
Information processing device
The rule specifications, which are information that describes the software specifications by one or more rules, including the input conditions and the results, which are the information indicating the values of the output variables, and the rule specifications.
Generation range identification information, which is information that specifies the generation range of the decision table
Steps to remember,
A step of generating a decision table for a range specified by the generation range specifying information in the rule specifications.
And
The components of the input condition are a term that is at least one of a comparison expression, a true / false variable, and a false value, or a negation of the term.
The information processing device
A step of converting a logical expression generated based on the input condition or the rule specification into a disjunctive normal form which is a logical expression in which clauses which are logical products of the constituent elements are logically equivalent and ORed.
A step of determining whether or not each component affects the input condition, excluding the component that does not affect the input condition from the input condition, and generating the decision table.
How to generate a decision table.
JP2018016917A 2018-02-02 2018-02-02 Decision table generator and decision table generation method Active JP6904914B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018016917A JP6904914B2 (en) 2018-02-02 2018-02-02 Decision table generator and decision table generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018016917A JP6904914B2 (en) 2018-02-02 2018-02-02 Decision table generator and decision table generation method

Publications (2)

Publication Number Publication Date
JP2019133538A JP2019133538A (en) 2019-08-08
JP6904914B2 true JP6904914B2 (en) 2021-07-21

Family

ID=67546212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018016917A Active JP6904914B2 (en) 2018-02-02 2018-02-02 Decision table generator and decision table generation method

Country Status (1)

Country Link
JP (1) JP6904914B2 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005352861A (en) * 2004-06-11 2005-12-22 Nippon Telegr & Teleph Corp <Ntt> Electronic data processing method, apparatus and program
JP2011257965A (en) * 2010-06-09 2011-12-22 Mitsubishi Electric Corp Metrics calculation device
JP5460629B2 (en) * 2011-03-10 2014-04-02 株式会社日立製作所 Tabular software specification creation support method and apparatus
JP5970292B2 (en) * 2012-08-21 2016-08-17 株式会社日立製作所 Software specification development support method and software specification development support device
US9740575B2 (en) * 2012-10-17 2017-08-22 Nec Corporation System design method, system design apparatus, and storage medium storing system design program, for analyzing failure restoration procedure
JP6247976B2 (en) * 2014-03-28 2017-12-13 株式会社日立製作所 Rule management support device and rule management support method
JP6239438B2 (en) * 2014-04-28 2017-11-29 東芝デジタルソリューションズ株式会社 Specification extraction device, specification extraction method and program
JP6254302B2 (en) * 2015-01-06 2017-12-27 株式会社日立製作所 Rule consistency verification apparatus and rule consistency verification method

Also Published As

Publication number Publication date
JP2019133538A (en) 2019-08-08

Similar Documents

Publication Publication Date Title
Saura et al. Using data mining techniques to explore security issues in smart living environments in Twitter
CN107644011B (en) System and method for fine-grained medical entity extraction
RU2571373C2 (en) Method of analysing text data tonality
WO2022218186A1 (en) Method and apparatus for generating personalized knowledge graph, and computer device
Itzik et al. Variability analysis of requirements: Considering behavioral differences and reflecting stakeholders’ perspectives
Christensen et al. Unique variable analysis: A novel approach for detecting redundant variables in multivariate data
Van Benthem et al. Symbolic model checking for dynamic epistemic logic—S5 and beyond
CN108885631B (en) Method and system for contract management in a data marketplace
CN104063314A (en) Test data automatic generation device and test data automatic generation method
CN113032580A (en) Associated file recommendation method and system and electronic equipment
JP5970292B2 (en) Software specification development support method and software specification development support device
AU2022223275A1 (en) Auditing citations in a textual document
CN114840531B (en) Data model reconstruction method, device, equipment and medium based on blood edge relation
JP6205512B2 (en) Rule management support device and rule management support method
JP6692281B2 (en) Test case generation device and test case generation method
Philipp et al. DRAT proofs for XOR reasoning
Sun et al. Decoding the silent majority: Inducing belief augmented social graph with large language model for response forecasting
Sree-Kumar et al. Validating feature models with respect to textual product line specifications
JP6868576B2 (en) Event presentation system and event presentation device
CN114510410A (en) Synthesizing de-identified test data
JP6904914B2 (en) Decision table generator and decision table generation method
CN116503608A (en) Data distillation method based on artificial intelligence and related equipment
US20200174760A1 (en) Automatic code generation
CN115859973A (en) Text feature extraction method and device, nonvolatile storage medium and electronic equipment
JP5655650B2 (en) Test data generation program, apparatus, and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210406

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210525

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210624

R150 Certificate of patent or registration of utility model

Ref document number: 6904914

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150