JP2019139268A - Program analysis method, program analysis apparatus and program analysis program - Google Patents

Program analysis method, program analysis apparatus and program analysis program Download PDF

Info

Publication number
JP2019139268A
JP2019139268A JP2018018847A JP2018018847A JP2019139268A JP 2019139268 A JP2019139268 A JP 2019139268A JP 2018018847 A JP2018018847 A JP 2018018847A JP 2018018847 A JP2018018847 A JP 2018018847A JP 2019139268 A JP2019139268 A JP 2019139268A
Authority
JP
Japan
Prior art keywords
business
condition
program
input
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018018847A
Other languages
Japanese (ja)
Other versions
JP6993573B2 (en
Inventor
前田 芳晴
Yoshiharu Maeda
芳晴 前田
昭彦 松尾
Akihiko Matsuo
昭彦 松尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2018018847A priority Critical patent/JP6993573B2/en
Publication of JP2019139268A publication Critical patent/JP2019139268A/en
Application granted granted Critical
Publication of JP6993573B2 publication Critical patent/JP6993573B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To appropriately generate a business rule for a modified program.SOLUTION: A storage unit 11 stores a second program P2 that is a modified first program P1 and has inconsistence with a first business rule table corresponding to the first program P1, and information indicating a definition rule of business terms R1. A processing unit 12 generates an input and output table T2 indicating a branch condition regarding a conditional sentence in the second program P2 and an output according to the branch condition, and defines business terms to a combination of the conditional sentences included in the input and output table T2 based on the information indicating the definition rule R1. The processing unit 12 generates a business rule table T4 corresponding to the second program P2 using the defined business terms and the input and output table T2.SELECTED DRAWING: Figure 1

Description

本発明はプログラム解析方法、プログラム解析装置およびプログラム解析プログラムに関する。   The present invention relates to a program analysis method, a program analysis apparatus, and a program analysis program.

情報処理システムでは、種々の機能を実現するソフトウェアが利用されている。ソフトウェアのプログラムは、機能追加や修正などに伴って更新されることがある。そこで、プログラムの更新を支援する技術が考えられている。   In an information processing system, software that realizes various functions is used. Software programs may be updated as functions are added or modified. Therefore, a technique for supporting program update is considered.

例えば、ソースプログラムから日常の保守作業において修正対象となり易い部分と、システム更新時に主な修正対象となるOS(Operating System)に依存する部分とを自動的に分離・抽出し、システム再構築作業の負荷を軽減する業務仕様解析装置の提案がある。   For example, a part that is likely to be corrected in daily maintenance work from a source program and a part that depends on the OS (Operating System) that is the main correction target at the time of system update are automatically separated / extracted to reconstruct the system. There is a proposal for a business specification analyzer that reduces the load.

なお、利用者により作成された単一条件式および単一条件式が結合した条件式を表示画面中の条件一覧表示域でそれぞれ一つの項として取扱い、利用者による二つの項の論理結合関係の設定の繰返しのみでデータベースの検索条件を作成する作成装置の提案がある。   Note that a single conditional expression created by the user and a conditional expression combined with a single conditional expression are handled as one term in the condition list display area on the display screen, and the logical connection relationship between the two terms by the user There is a proposal of a creation device that creates a database search condition only by repeated setting.

特開平7−104994号公報JP 7-104994 A 特開平11−219371号公報JP-A-11-219371

長期に亘って運用保守された情報処理システムでは、プログラムが部分的に修正されていることが少なくない。ここで、プログラムに対して、開発時に作成された設計文書が存在し得る。ところが、プログラムの修正時に、当該プログラムの設計文書が十分に修正されないことがある。この場合、プログラムの改修内容が設計文書に反映されず、プログラムと設計文書との間に齟齬が生じ得る。例えば、あるデータ項目と当該データ項目を用いたロジックがプログラムに追加されているにも拘わらず、追加されたデータ項目やロジックに関する内容が業務用語や業務ルールなどを記述した文書から漏れるおそれがある。このため、ユーザが現行の情報処理システムの保守や再構築などを行う場合に、既存の設計文書からプログラムの現状を正しく把握できないことがある。   In an information processing system that has been operated and maintained for a long period of time, the program is often partially modified. Here, there can be a design document created during development for the program. However, when the program is modified, the design document of the program may not be sufficiently modified. In this case, the modification content of the program is not reflected in the design document, and a flaw may occur between the program and the design document. For example, despite the fact that a data item and logic using the data item have been added to the program, the added data item and logic may leak from a document that describes business terms, business rules, etc. . For this reason, when the user performs maintenance or reconstruction of the current information processing system, the current state of the program may not be correctly grasped from the existing design document.

1つの側面では、本発明は、修正後のプログラムに対して業務ルールを適切に作成可能にすることを目的とする。   In one aspect, an object of the present invention is to make it possible to appropriately create business rules for a modified program.

1つの態様では、プログラム解析方法が提供される。このプログラム解析方法では、コンピュータが、第1のプログラムの修正後の第2のプログラムであって、第1のプログラムに対応する第1の業務ルール表との齟齬が発生している第2のプログラムを取得し、第2のプログラムにおける条件文に関する分岐条件と分岐条件に応じた出力とを示す入出力表を作成するとともに、業務用語の定義ルールを示す情報に基づいて、入出力表に含まれる条件文の組み合わせに対する業務用語を定義し、定義された業務用語と入出力表とを用いて、第2のプログラムに対応する第2の業務ルール表を作成する。   In one aspect, a program analysis method is provided. In this program analysis method, the computer is the second program after the modification of the first program, and the second program in which a conflict with the first business rule table corresponding to the first program has occurred Is created and an input / output table indicating the branch condition related to the conditional statement in the second program and the output corresponding to the branch condition is created and included in the input / output table based on the information indicating the definition rule of the business term A business term for the combination of conditional statements is defined, and a second business rule table corresponding to the second program is created using the defined business term and the input / output table.

1つの側面では、修正後のプログラムに対して業務ルールを適切に作成できる。   In one aspect, business rules can be appropriately created for the modified program.

第1の実施の形態のプログラム解析装置を示す図である。It is a figure which shows the program analysis apparatus of 1st Embodiment. 第2の実施の形態の解析サーバのハードウェア例を示す図である。It is a figure which shows the hardware example of the analysis server of 2nd Embodiment. V字モデルの例を示す図である。It is a figure which shows the example of a V-shaped model. 文書化された情報範囲と理解の難度の例を示す図である。It is a figure which shows the example of the documented information range and the difficulty of an understanding. V字モデルにおける文書の例(その1)を示す図である。It is a figure which shows the example (the 1) of the document in a V-shaped model. V字モデルにおける文書の例(その2)を示す図である。It is a figure which shows the example (the 2) of the document in a V-shaped model. 解析サーバの機能例を示す図である。It is a figure which shows the function example of an analysis server. シンボリック実行の例を示す図である。It is a figure which shows the example of symbolic execution. 解析対象のプログラムの例を示す図である。It is a figure which shows the example of the program of analysis object. シンボリック実行結果の例を示す図である。It is a figure which shows the example of a symbolic execution result. 入出力表の例を示す図である。It is a figure which shows the example of an input / output table. 業務条件候補抽出用の中間データの例を示す図である。It is a figure which shows the example of the intermediate data for business condition candidate extraction. 業務条件候補表の例を示す図である。It is a figure which shows the example of a business condition candidate table. 業務条件選定用の中間データの例を示す図である。It is a figure which shows the example of the intermediate data for business condition selection. 業務条件選定結果の例を示す図である。It is a figure which shows the example of a business condition selection result. 命名ルール表の例を示す図である。It is a figure which shows the example of a naming rule table | surface. 業務用語表の例を示す図である。It is a figure which shows the example of a business term table | surface. 業務ルール表の例を示す図である。It is a figure which shows the example of a business rule table | surface. 解析サーバの処理例を示すフローチャートである。It is a flowchart which shows the process example of an analysis server. シンボリック実行の処理例を示すフローチャートである。It is a flowchart which shows the process example of symbolic execution. 入出力表生成の処理例を示すフローチャートである。It is a flowchart which shows the process example of an input / output table production | generation. 業務条件候補生成の処理例を示すフローチャートである。It is a flowchart which shows the process example of business condition candidate production | generation. 業務条件選定の処理例を示すフローチャートである。It is a flowchart which shows the process example of business condition selection. 業務用語表出力の処理例を示すフローチャートである。It is a flowchart which shows the process example of a business term table output. 業務ルール表出力の処理例を示すフローチャートである。It is a flowchart which shows the example of a process of business rule table output. 解析サーバの入出力の例を示す図である。It is a figure which shows the example of the input / output of an analysis server. 解析対象のプログラムの他の例を示す図である。It is a figure which shows the other example of the program of analysis object. 解析サーバの入出力の他の例を示す図である。It is a figure which shows the other example of the input / output of an analysis server.

以下、本実施の形態について図面を参照して説明する。
[第1の実施の形態]
図1は、第1の実施の形態のプログラム解析装置を示す図である。プログラム解析装置10は、プログラムの修正に応じた設計文書の改版を支援する。ここで、プログラム解析装置10は、設計文書を電子データとして管理する。設計文書として、システム開発のV字モデルにおける要件定義書や基本設計書が挙げられる。例えば、要件定義書は、業務ルール表を含む。業務ルール表は、業務における特定のデータ項目に対する処理のルール(業務ルール)を示す情報である。また、要件定義書や基本設計書は、業務用語表を含む。業務用語表は、業務ルールで用いられる用語の定義を示す情報である。
Hereinafter, the present embodiment will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram illustrating a program analysis apparatus according to the first embodiment. The program analysis apparatus 10 supports revision of the design document according to the modification of the program. Here, the program analysis apparatus 10 manages the design document as electronic data. The design document includes a requirement definition document and a basic design document in a V-shaped model for system development. For example, the requirement definition document includes a business rule table. The business rule table is information indicating processing rules (business rules) for specific data items in business. In addition, the requirement definition document and the basic design document include a business term table. The business term table is information indicating definitions of terms used in business rules.

プログラム解析装置10は、記憶部11および処理部12を有する。記憶部11は、RAM(Random Access Memory)などの揮発性の半導体メモリでもよいし、HDD(Hard Disk Drive)やフラッシュメモリなどの不揮発性のストレージでもよい。処理部12は、例えば、CPU(Central Processing Unit)やDSP(Digital Signal Processor)などのプロセッサである。ただし、処理部12は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの特定用途の電子回路を含んでもよい。プロセッサは、RAMなどのメモリ(記憶部11でもよい)に記憶されたプログラムを実行する。複数のプロセッサの集合を「マルチプロセッサ」または単に「プロセッサ」と言うこともある。   The program analysis device 10 includes a storage unit 11 and a processing unit 12. The storage unit 11 may be a volatile semiconductor memory such as a RAM (Random Access Memory) or a non-volatile storage such as an HDD (Hard Disk Drive) or a flash memory. The processing unit 12 is, for example, a processor such as a CPU (Central Processing Unit) or a DSP (Digital Signal Processor). However, the processing unit 12 may include an electronic circuit for a specific application such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). The processor executes a program stored in a memory such as a RAM (or the storage unit 11). A set of processors may be referred to as “multiprocessor” or simply “processor”.

記憶部11は、第1のプログラムP1の修正後の第2のプログラムP2を記憶する。記憶部11は、第1のプログラムP1に対応する第1の業務ルール表T1を記憶する。また、記憶部11は、業務用語の定義ルールR1を示す情報を記憶する。   The storage unit 11 stores the second program P2 after the correction of the first program P1. The storage unit 11 stores a first business rule table T1 corresponding to the first program P1. The storage unit 11 also stores information indicating the business term definition rule R1.

ここで、第1のプログラムP1が修正されたにも拘わらず、第1の業務ルール表T1は、修正されていない。第2のプログラムP2は、例えば、第1のプログラムP1に対してデータ項目や当該データ項目に対するロジックが追加されたものである。このため、第2のプログラムP2は、第1の業務ルール表T1と齟齬がある(すなわち、両者の内容が整合していない)。ここで、図1の例における第1のプログラムP1および第2のプログラムP2の左側の番号は、便宜的に付した行番号である。   Here, although the first program P1 is modified, the first business rule table T1 is not modified. For example, the second program P2 is obtained by adding data items and logic for the data items to the first program P1. For this reason, the second program P2 has a conflict with the first business rule table T1 (that is, the contents of both do not match). Here, the numbers on the left side of the first program P1 and the second program P2 in the example of FIG. 1 are line numbers assigned for convenience.

図1の例では、第2のプログラムP2において、その4行目に定数C2の定義が追加され、その6行目に変数“コード”に関する定数C2を用いた条件判定が追加されている点が第1のプログラムP1と異なる。なお、図1では、第2のプログラムP2の第1のプログラムP1に対する追加部分には強調のために下線を付している。このため、例えば、第1の業務ルール表T1の変数“コード”に関する業務ルールにおいて、第2のプログラムP2に追加された定数C2の内容が反映されていない点で、第1の業務ルール表T1と第2のプログラムP2との対応関係に齟齬が発生しているといえる。   In the example of FIG. 1, in the second program P2, the definition of the constant C2 is added to the fourth line, and the condition determination using the constant C2 regarding the variable “code” is added to the sixth line. Different from the first program P1. In FIG. 1, an additional portion of the second program P2 with respect to the first program P1 is underlined for emphasis. For this reason, for example, the first business rule table T1 is that the content of the constant C2 added to the second program P2 is not reflected in the business rules related to the variable “code” in the first business rule table T1. It can be said that there is a wrinkle in the correspondence between the program and the second program P2.

処理部12は、記憶部11に記憶された第2のプログラムP2における条件文に関する分岐条件(分岐毎の入力変数に対する入力値の組)と分岐条件に応じた出力とを示す入出力表T2を作成する。例えば、入出力表T2は、項番、出力および条件(分岐条件)の項目を含む。処理部12は、第2のプログラムP2のシンボリック実行の結果に基づいて、入出力表T2を作成してもよい。シンボリック実行とは、入力変数に記号値を設定してプログラムを模擬的に実行することによりプログラムのロジックを分析する技術である。シンボリック実行の結果は、プログラムに含まれる条件分岐によるパス毎の変数の条件と、出力とを含む。処理部12は、この結果を整理することで、入出力表T2を得る。入出力表T2は、第2のプログラムP2に対応する入出力表である。処理部12は、作成した入出力表T2を示す情報を記憶部11に格納する。   The processing unit 12 generates an input / output table T2 indicating a branch condition (a set of input values for the input variable for each branch) related to the conditional statement in the second program P2 stored in the storage unit 11 and an output corresponding to the branch condition. create. For example, the input / output table T2 includes items of item number, output, and condition (branch condition). The processing unit 12 may create the input / output table T2 based on the result of symbolic execution of the second program P2. Symbolic execution is a technique for analyzing the logic of a program by setting a symbol value in an input variable and executing the program in a simulated manner. The result of symbolic execution includes a variable condition for each path by a conditional branch included in the program, and an output. The processing unit 12 obtains the input / output table T2 by organizing the results. The input / output table T2 is an input / output table corresponding to the second program P2. The processing unit 12 stores information indicating the created input / output table T2 in the storage unit 11.

処理部12は、定義ルールR1を示す情報に基づいて、入出力表T2に含まれる条件文の組み合わせ(複合条件)に対する業務用語を定義する。例えば、定義ルールR1には、条件文の組み合わせの書式に対応する業務用語が予め設定されている。例えば、入出力表T2の項番“1”の分岐条件には第2のプログラムP2の3〜4行目および6〜7行目のIF文に対応する条件文“コード = 1”、“コード = 2”、“0 < 範囲”および“範囲 < 10”が含まれる。   Based on the information indicating the definition rule R1, the processing unit 12 defines business terms for a combination of conditional statements (compound conditions) included in the input / output table T2. For example, in the definition rule R1, business terms corresponding to the format of the combination of conditional sentences are set in advance. For example, for the branch condition of the item number “1” in the input / output table T2, the conditional statements “code = 1” and “code” corresponding to the IF statements on the 3rd to 4th lines and the 6th to 7th lines of the second program P2 = 2 ”,“ 0 <range ”and“ range <10 ”.

第1の例では、定義ルールR1は、「条件“(下限値 < 変数)AND(変数 < 上限値)”にマッチしたら、“変数内”と命名する」というルールを含む。当該ルールにおける“変数”、“下限値”および“上限値”の文字列は、入出力表T2の条件に含まれる具体的な文字列に置換される。本例では、入出力表T2の項番“1”のレコードに含まれる“範囲”を“変数”に、“0”を“下限値”に、“10”を“上限値”にそれぞれ当てはめることができる。したがって、処理部12は、入出力表T2の項番“1”に含まれる複合条件“(0 < 範囲)AND(範囲 < 10)”を業務用語“範囲内”と命名する。なお、処理部12は、入出力表T2に含まれる複合条件のうち、入出力表T2中に、当該複合条件の否定条件が含まれるものに対して業務用語を定義する。否定条件が含まれない条件は、プログラムのパスに影響せず、業務ルールに関与しないと考えられるためである。例えば、入出力表T2の項番“1”の条件“(0 < 範囲)AND(範囲 < 10)”に対しては、同項番“2”の条件“(0 NOT < 範囲)OR(範囲 NOT < 10)”が否定条件となっている。   In the first example, the definition rule R1 includes a rule that “when the condition“ (lower limit value <variable) AND (variable <upper limit value) ”is matched, it is named“ within variable ””. The character strings “variable”, “lower limit value” and “upper limit value” in the rule are replaced with specific character strings included in the conditions of the input / output table T2. In this example, “range” included in the record of item number “1” in the input / output table T2 is applied to “variable”, “0” to “lower limit value”, and “10” to “upper limit value”. Can do. Therefore, the processing unit 12 names the compound term “(0 <range) AND (range <10)” included in the item number “1” of the input / output table T2 as the business term “within range”. Note that the processing unit 12 defines business terms for composite conditions included in the input / output table T2 that include negative conditions in the composite condition in the input / output table T2. This is because a condition that does not include a negative condition does not affect the program path and is not considered to be involved in the business rules. For example, for the condition “(0 <range) AND (range <10)” of the item number “1” in the input / output table T2, the condition “(0 NOT <range) OR (range) of the item number“ 2 ”is used. NOT <10) ”is a negative condition.

第2の例では、定義ルールR1は、「条件“(変数 =定数1)[OR(変数 = 定数2)]+”にマッチしたら、“有効変数”と命名する」というルールを含む。当該ルールの“[OR(変数 = 定数2)]+”の部分は、2つ目以降の定数に関する条件がORで結合され得ることを示す。また、当該ルールにおける“変数”、“定数1”および“定数2”の文字列は、入出力表T2の条件に含まれる具体的な文字列に置換される。本例では、入出力表T2の項番“1”、“2”のレコードに含まれる“コード”を“変数”に、“1”を“定数1”に、“2”を“定数2”にそれぞれ当てはめることができる。したがって、処理部12は、入出力表T2の項番“1”、“2”に含まれる複合条件“(コード = 1)OR(コード = 2)”を業務用語“有効コード”と命名する。なお、入出力表T2の項番“3”の条件“(コード NOT = 1)AND(コード NOT = 2)”は、条件“(コード = 1)OR(コード = 2)”の否定条件となっている。   In the second example, the definition rule R1 includes a rule “name it as an“ effective variable ”when it matches the condition“ (variable = constant 1) [OR (variable = constant 2)] + ””. The “[OR (variable = constant 2)] +” part of the rule indicates that the conditions for the second and subsequent constants can be combined with OR. In addition, the character strings “variable”, “constant 1”, and “constant 2” in the rule are replaced with specific character strings included in the conditions of the input / output table T2. In this example, the “code” included in the record of the item numbers “1” and “2” in the input / output table T2 is “variable”, “1” is “constant 1”, and “2” is “constant 2”. Can be applied to each. Therefore, the processing unit 12 names the compound condition “(code = 1) OR (code = 2)” included in the item numbers “1” and “2” of the input / output table T2 as the business term “effective code”. The condition “(code NOT = 1) AND (code NOT = 2)” of the item number “3” in the input / output table T2 becomes a negative condition of the condition “(code = 1) OR (code = 2)”. ing.

処理部12は、定義された業務用語を含む業務用語表T3を示す情報を記憶部11に格納する。なお、業務用語表T3では、業務用語に対して正条件が対応付けられる。正条件とは、互いに否定の関係にある2つの条件のうち、否定演算子の少ない方の条件である。   The processing unit 12 stores information indicating the business term table T3 including the defined business terms in the storage unit 11. In the business term table T3, positive conditions are associated with business terms. The positive condition is a condition having a smaller negation operator among two conditions that are in a negative relationship with each other.

処理部12は、定義された業務用語と入出力表T2とを用いて、第2のプログラムP2に対応する第2の業務ルール表T4を作成する。例えば、処理部12は、業務用語表T3に基づいて、入出力表T2の項番“1”の条件における“(コード = 1)OR(コード = 2)”の部分を、“有効コード=True”に置換する。ここで、“True”は、業務用語表T3に定義された業務用語の条件に対する正条件であることを示す。同様に、処理部12は、業務用語表T3に基づいて、入出力表T2の項番“1”の条件における“(0 < 範囲)AND(範囲 < 10)”の部分を、“範囲内 = True”に置換する。すると、入出力表T2の項番“1”の条件は、“(有効コード = True)AND(範囲内 = True)”と表される。   The processing unit 12 creates a second business rule table T4 corresponding to the second program P2 by using the defined business terms and the input / output table T2. For example, based on the business term table T3, the processing unit 12 converts the “(code = 1) OR (code = 2)” part in the condition of the item number “1” of the input / output table T2 to “valid code = True”. Replace with Here, “True” indicates a positive condition for the business term condition defined in the business term table T3. Similarly, based on the business term table T3, the processing unit 12 converts the “(0 <range) AND (range <10)” portion in the condition of the item number “1” of the input / output table T2 to “within range = Replace with “True”. Then, the condition of the item number “1” in the input / output table T2 is expressed as “(valid code = True) AND (within range = True)”.

また、処理部12は、業務用語表T3に基づいて、入出力表T2の項番“2”の条件を、“(有効コード = True)AND(範囲内 = False)”と表す。“範囲内 = False”となる理由は、入出力表T2の項番“2”の条件の“(0 NOT < 範囲)OR(範囲 NOT < 10)”の部分は、業務用語“範囲内”の条件に対する否定条件だからである。   Further, based on the business term table T3, the processing unit 12 represents the condition of the item number “2” in the input / output table T2 as “(valid code = True) AND (within range = False)”. The reason for “within range = False” is that “(0 NOT <range) OR (range NOT <10)” in the condition of item number “2” in the input / output table T2 is the business term “within range”. This is because it is a negative condition for the condition.

更に、処理部12は、業務用語表T3に基づいて、入出力表T2の項番“3”の条件を“(有効コード = False)”と表す。“有効コード = False”となる理由は、入出力表T2の項番“3”の条件の“(コード NOT = 1)AND(コード NOT = 2)”は、業務用語“有効コード”の条件に対する否定条件だからである。   Further, the processing unit 12 represents the condition of the item number “3” in the input / output table T2 as “(effective code = False)” based on the business term table T3. The reason for “effective code = false” is that “(code NOT = 1) AND (code NOT = 2)” in the condition of the item number “3” in the input / output table T2 corresponds to the condition of the business term “effective code”. Because it is a negative condition.

処理部12は、作成した第2の業務ルール表T4を記憶部11に格納する。また、処理部12は、業務用語表T3および第2の業務ルール表T4を、第2のプログラムP2に対応付ける。   The processing unit 12 stores the created second business rule table T4 in the storage unit 11. Further, the processing unit 12 associates the business term table T3 and the second business rule table T4 with the second program P2.

こうして新たに作成された業務用語表T3および第2の業務ルール表T4は、第2のプログラムP2に対する修正を反映した内容となる。例えば、第2の業務ルール表T4における“有効コード”に関する条件の記述は、業務用語表T3によれば、新たに追加された定数C2に関する条件が適切に反映されている。このようにして、プログラム解析装置10によれば、修正後のプログラムに対して、業務ルールを適切に作成することができる。   The business term table T3 and the second business rule table T4 newly created in this way have contents reflecting corrections to the second program P2. For example, the description of the condition relating to “valid code” in the second business rule table T4 appropriately reflects the condition related to the newly added constant C2 according to the business term table T3. In this way, according to the program analysis apparatus 10, it is possible to appropriately create a business rule for the corrected program.

以下では、プログラム解析装置10として用いられるサーバコンピュータ(解析サーバ)を例示して、プログラム解析の機能を更に詳細に説明する。
[第2の実施の形態]
図2は、第2の実施の形態の解析サーバのハードウェア例を示す図である。解析サーバ100は、CPU101、RAM102、HDD103、画像信号処理部104、入力信号処理部105、媒体リーダ106およびNIC(Network Interface Card)107を有する。各ハードウェアは解析サーバ100のバスに接続されている。
Hereinafter, a server computer (analysis server) used as the program analysis apparatus 10 will be exemplified to describe the function of program analysis in more detail.
[Second Embodiment]
FIG. 2 is a diagram illustrating a hardware example of the analysis server according to the second embodiment. The analysis server 100 includes a CPU 101, a RAM 102, an HDD 103, an image signal processing unit 104, an input signal processing unit 105, a medium reader 106, and a NIC (Network Interface Card) 107. Each piece of hardware is connected to the analysis server 100 bus.

ここで、解析サーバ100は、第1の実施の形態のプログラム解析装置10の一例である。また、CPU101は、第1の実施の形態の処理部12の一例である。RAM102またはHDD103は、第1の実施の形態の記憶部11の一例である。   Here, the analysis server 100 is an example of the program analysis apparatus 10 according to the first embodiment. The CPU 101 is an example of the processing unit 12 according to the first embodiment. The RAM 102 or the HDD 103 is an example of the storage unit 11 according to the first embodiment.

CPU101は、解析サーバ100の情報処理を制御するハードウェアである。CPU101は、マルチプロセッサであってもよい。CPU101は、例えばCPU、DSP、ASICまたはFPGAなどである。CPU101は、CPU、DSP、ASIC、FPGAなどのうちの2以上の要素の組み合わせであってもよい。   The CPU 101 is hardware that controls information processing of the analysis server 100. The CPU 101 may be a multiprocessor. The CPU 101 is, for example, a CPU, DSP, ASIC, or FPGA. The CPU 101 may be a combination of two or more elements among a CPU, a DSP, an ASIC, an FPGA, and the like.

RAM102は、解析サーバ100の主記憶装置である。RAM102は、CPU101に実行させるOSのプログラムやアプリケーションプログラムの少なくとも一部を一時的に記憶する。また、RAM102は、CPU101による処理に用いる各種データを記憶する。   The RAM 102 is a main storage device of the analysis server 100. The RAM 102 temporarily stores at least part of an OS program and application programs to be executed by the CPU 101. The RAM 102 stores various data used for processing by the CPU 101.

HDD103は、解析サーバ100の補助記憶装置である。HDD103は、内蔵した磁気ディスクに対して、磁気的にデータの書き込みおよび読み出しを行う。HDD103は、OSのプログラム、アプリケーションプログラム、および各種データを記憶する。解析サーバ100は、フラッシュメモリやSSD(Solid State Drive)などの他の種類の補助記憶装置を備えてもよく、複数の補助記憶装置を備えてもよい。   The HDD 103 is an auxiliary storage device of the analysis server 100. The HDD 103 magnetically writes and reads data to and from the built-in magnetic disk. The HDD 103 stores an OS program, application programs, and various data. The analysis server 100 may include other types of auxiliary storage devices such as a flash memory and an SSD (Solid State Drive), or may include a plurality of auxiliary storage devices.

画像信号処理部104は、CPU101からの命令に従って、解析サーバ100に接続されたディスプレイ21に画像を出力する。ディスプレイ21として、CRT(Cathode Ray Tube)ディスプレイや液晶ディスプレイなどを用いることができる。   The image signal processing unit 104 outputs an image to the display 21 connected to the analysis server 100 in accordance with a command from the CPU 101. As the display 21, a CRT (Cathode Ray Tube) display, a liquid crystal display, or the like can be used.

入力信号処理部105は、解析サーバ100に接続された入力デバイス22から入力信号を取得し、CPU101に出力する。入力デバイス22として、例えば、マウスやタッチパネルなどのポインティングデバイス、キーボードなどを用いることができる。   The input signal processing unit 105 acquires an input signal from the input device 22 connected to the analysis server 100 and outputs it to the CPU 101. As the input device 22, for example, a pointing device such as a mouse or a touch panel, a keyboard, or the like can be used.

媒体リーダ106は、記録媒体23に記録されたプログラムやデータを読み取る装置である。記録媒体23として、例えば、フレキシブルディスク(FD:Flexible Disk)やHDDなどの磁気ディスク、CD(Compact Disc)やDVD(Digital Versatile Disc)などの光ディスク、光磁気ディスク(MO:Magneto-Optical disk)を使用できる。また、記録媒体23として、例えば、フラッシュメモリカードなどの不揮発性の半導体メモリを使用することもできる。媒体リーダ106は、例えば、CPU101からの命令に従って、記録媒体23から読み取ったプログラムやデータをRAM102またはHDD103に格納する。   The medium reader 106 is a device that reads programs and data recorded on the recording medium 23. As the recording medium 23, for example, a magnetic disk such as a flexible disk (FD) or HDD, an optical disk such as a CD (Compact Disc) or a DVD (Digital Versatile Disc), or a magneto-optical disk (MO) is used. Can be used. Further, as the recording medium 23, for example, a non-volatile semiconductor memory such as a flash memory card can be used. For example, the medium reader 106 stores a program or data read from the recording medium 23 in the RAM 102 or the HDD 103 in accordance with an instruction from the CPU 101.

NIC107は、ネットワーク24を介して他の装置と通信を行う。NIC107は、有線通信インタフェースでもよいし、無線通信インタフェースでもよい。
図3は、V字モデルの例を示す図である。システム開発の現場では、V字モデルに従って開発工程の計画や、開発作業が行われる。V字モデルは、最初に要件定義を行う。要件定義では、ユーザの要求する要件を明確化する。次いで、要件定義で明確化された要件を実現するための設計を、基本設計および詳細設計の工程により段階的に詳細化し、その後、プログラムの製造の工程を行う。ここまでがV字の左上から下へ向かう開発作業の流れである。プログラムの製造が行われると、V字の下から右上に向かって、各工程の設計とテスト(単体テスト、結合テストおよびシステムテスト)とを対応付けて品質の確認が行われる。
The NIC 107 communicates with other devices via the network 24. The NIC 107 may be a wired communication interface or a wireless communication interface.
FIG. 3 is a diagram illustrating an example of a V-shaped model. In the field of system development, development process planning and development work are performed according to the V-shaped model. In the V-shaped model, the requirement definition is first performed. In the requirement definition, the requirements required by users are clarified. Next, the design for realizing the requirements clarified in the requirement definition is refined step by step through the basic design and detailed design processes, and then the program manufacturing process is performed. This is the flow of development work from the upper left to the lower of the V-shape. When the program is manufactured, the quality is confirmed by associating the design of each process with the test (unit test, integration test, and system test) from the bottom to the top right of the V shape.

ここで、V字モデルの各段階において成果物が作成される。成果物には次の文書がある。
要件定義の成果物は、要件定義書D1である。要件定義書D1は、開発対象のシステムで実現すべき要件や機能を、システムの発注者とシステムの開発者との間で明確化する目的で作成される。要件定義書D1は、システムの開発に詳しくない発注者でも容易に理解できるように、システム開発の用語よりも業務用語などを用いて記述されることがある。
Here, a product is created at each stage of the V-shaped model. The deliverables include the following documents:
The product of the requirement definition is a requirement definition document D1. The requirement definition document D1 is created for the purpose of clarifying requirements and functions to be realized in the development target system between the system orderer and the system developer. The requirement definition document D1 may be described using business terms rather than system development terms so that even an orderer who is not familiar with system development can easily understand.

基本設計の成果物は、基本設計書D2である。基本設計書D2は、要件定義書の要件を実現するための基本的な設計事項を記述する。基本設計書D2は、基本的で概要的な設計書であり、コンピュータで実行可能なレベルまでは記述せずに、業務用語や基本設計用の用語を用いて記述される。   The product of the basic design is the basic design document D2. The basic design document D2 describes basic design items for realizing the requirements of the requirement definition document. The basic design document D2 is a basic and general design document, and is described by using business terms and basic design terms without describing a level that can be executed by a computer.

詳細設計の成果物は、詳細設計書D3である。詳細設計書D3は、基本設計書D2の設計内容をプログラムに実装可能なレベルに詳細化した設計を記述する。プログラム変数に該当するレベルの用語を用いて記述される。   The product of the detailed design is a detailed design document D3. The detailed design document D3 describes a design in which the design contents of the basic design document D2 are refined to a level that can be implemented in a program. It is described using terms at the level corresponding to the program variable.

製造の成果物は、プログラムD4である。プログラムD4は、詳細設計書D3の設計内容をコンピュータで実行するためのソースプログラムであり、プログラム言語を用いて記述される。   The product of manufacture is program D4. The program D4 is a source program for executing the design contents of the detailed design document D3 by a computer, and is described using a program language.

上記の各成果物は、開発工程の進展に伴い、要件定義書D1からプログラムD4へ向かう順に、記述内容の一貫性を維持して詳細化される。
図4は、文書化された情報範囲と理解の難度の例を示す図である。文書は、要件定義書D1からプログラムD4へと詳細化されるに従って、文書化された情報の範囲が増加し、文書化されていない情報が減少する。文書化されていない情報とは、発注者や開発者の間で常識的あるいは暗黙的に共有される業務知識などである。開発初期に作成される要件定義書D1では、発注者や開発者などの関係者が常識的に業務知識を共有する。このため、要件定義書D1が厳密に定義されない業務用語などの業務知識を用いて記述されていても発注者や開発者などは内容を理解可能である。一方、業務用語を用いた記述の方が簡易な記述となり、発注者と開発者との間で共通理解を形成しやすいという一面もある。
Each product is detailed while maintaining the consistency of the description contents in the order from the requirement definition document D1 to the program D4 as the development process progresses.
FIG. 4 is a diagram showing examples of documented information ranges and difficulty levels of understanding. As documents are refined from requirement definition D1 to program D4, the range of documented information increases and undocumented information decreases. The undocumented information includes business knowledge that is commonly or implicitly shared between the orderer and the developer. In the requirement definition document D1 created at the initial stage of development, related parties such as the orderer and the developer commonly share business knowledge. For this reason, even if the requirement definition document D1 is described using business knowledge such as business terms that are not strictly defined, the orderer or developer can understand the contents. On the other hand, a description using business terms becomes a simple description, and there is one aspect that it is easy to form a common understanding between the orderer and the developer.

コンピュータを用いて実行可能なシステムを構築するためには、業務知識の意味を厳密に定義することが求められる。このため、コンピュータで実行可能なプログラムを開発するためには、当該システムに関する情報のプログラムD4への記述を要する。その結果、詳細設計書D3やプログラムD4のように、開発後半の文章の記述は詳細となり、また、記述内容の量が多くなる。以上の結果、詳細設計書D3やプログラムD4は、一般に、理解の困難性が高くなる。   In order to build a system that can be executed using a computer, it is necessary to strictly define the meaning of business knowledge. For this reason, in order to develop a program executable by a computer, it is necessary to describe information related to the system in the program D4. As a result, as in the detailed design document D3 and the program D4, the description of the text in the latter half of the development becomes detailed, and the amount of description content increases. As a result, the detailed design document D3 and the program D4 are generally more difficult to understand.

図5は、V字モデルにおける文書の例(その1)を示す図である。業務ルールD11は、要件定義書D1に記述される。業務ルールD11は、システムの機能に関連する業務上の特定の判断基準を示す。要件定義書D1は、発注者と開発者との間で開発要件を明確化することが目的であるため、例えば、「有効コード」や「期間内」といった業務用語を用いて記述される。図5の業務ルールD11の例では、可読性や一覧性などを高めるために、決定表(表形式)で記述する場合を示したが、例えば、「有効コードで、かつ、期間内ならば、結果は1とする」のように自然言語で記述されてもよい。   FIG. 5 is a diagram showing an example (part 1) of a document in the V-shaped model. The business rule D11 is described in the requirement definition document D1. The business rule D11 indicates a specific business criterion related to the function of the system. Since the purpose of the requirement definition document D1 is to clarify development requirements between the orderer and the developer, for example, the requirement definition document D1 is described using business terms such as “valid code” and “within period”. In the example of the business rule D11 in FIG. 5, the case where it is described in a decision table (table format) in order to improve readability, listability, etc. is shown. May be described in a natural language such as “1”.

業務用語D12は、要件定義書D1や基本設計書D2において、業務ルールD11の「有効コード」や「期間内」の意味を定義する。例えば、「期間内」は、「2017年8月1日から2017年8月31日の間」を意味する。このように自然言語で記述することもあるし、業務用語D12のように条件式を用いて「(20170801 < 期間)AND(期間 < 20170831)」のように記述することもある。なお、業務ルールD11と業務用語D12とが一体となって、業務ルールに関する知識を形成しているともいえる。当初の設計文書では、業務用語D12の内容が業務ルールD11に組み込まれていることもある。   The business term D12 defines the meaning of “effective code” and “within period” of the business rule D11 in the requirement definition document D1 and the basic design document D2. For example, “within period” means “between August 1, 2017 and August 31, 2017”. In this way, it may be described in a natural language, or may be described as “(20110801 <period) AND (period <20110831)” using a conditional expression like the business term D12. It can be said that the business rule D11 and the business term D12 are integrated to form knowledge about the business rule. In the original design document, the contents of the business term D12 may be incorporated in the business rule D11.

詳細化された業務ルールD13は、基本設計書D2に記述される。業務ルールD13は、業務ルールD11をプログラム言語で記述することを可能にするため、業務用語D12を条件式に展開して記述したものである。   The detailed business rule D13 is described in the basic design document D2. The business rule D13 is obtained by developing the business term D12 into a conditional expression so that the business rule D11 can be described in a program language.

図6は、V字モデルにおける文書の例(その2)を示す図である。プログラムD14は、プログラムD4の一部であり、詳細化された業務ルールD13をコンピュータにより実行できるようにプログラム言語で記述したものである。プログラムD14では、プログラム言語の一例として、COBOLを用いた記述を示している。   FIG. 6 is a diagram illustrating an example (part 2) of the document in the V-shaped model. The program D14 is a part of the program D4, and is described in a program language so that the detailed business rule D13 can be executed by a computer. In the program D14, description using COBOL is shown as an example of a program language.

ここで、長期間に亘り運用保守されるシステムでは、不具合の修理や業務内容の変化などに対応するために、機能の変更や追加などの部分的な改修が断続的に行われる。この部分改修を行う際に、開発者により全ての文書とプログラムの一貫性が維持されることが望ましい。しかし、改修のコストや開発期間などの制限のために、開発者が全ての文書とプログラムとを一貫性を維持しながら適切に更新することは容易ではない。   Here, in a system that is operated and maintained for a long period of time, partial modifications such as change or addition of functions are intermittently performed in order to cope with repair of defects or changes in business contents. When making this partial modification, it is desirable that the developer maintain consistency of all documents and programs. However, it is not easy for a developer to properly update all documents and programs while maintaining consistency, due to limitations such as renovation costs and development periods.

このような状況のため、システムの機能に直接関係するプログラムが改修されても、機能には直接関係しない文書は十分に改修されない事態となり、文書の内容に不備が生じる。すなわち、プログラムの改修内容が設計文書に反映されず、プログラムと設計文書との間に齟齬が生じる。このように、プログラムと設計文書との間に齟齬があると、その後のプログラムの改修の際などに、設計文書に記載の情報を利用することができない。   In such a situation, even if a program directly related to the function of the system is modified, a document that is not directly related to the function is not sufficiently modified, and the content of the document is deficient. That is, the contents of the program modification are not reflected in the design document, and a flaw occurs between the program and the design document. As described above, if there is a flaw between the program and the design document, the information described in the design document cannot be used when the program is subsequently modified.

そこで、解析サーバ100は、プログラムの修正に応じて、業務ルールなどの設計文書を適切に再作成する機能を提供する。
図7は、解析サーバの機能例を示す図である。解析サーバ100は、プログラム記憶部110、解析情報記憶部120、命名ルール記憶部130、解析結果記憶部140および解析部150を有する。
Therefore, the analysis server 100 provides a function for appropriately recreating a design document such as a business rule in accordance with the correction of the program.
FIG. 7 is a diagram illustrating an example of functions of the analysis server. The analysis server 100 includes a program storage unit 110, an analysis information storage unit 120, a naming rule storage unit 130, an analysis result storage unit 140, and an analysis unit 150.

プログラム記憶部110、解析情報記憶部120、命名ルール記憶部130および解析結果記憶部140は、RAM102やHDD103の記憶領域を用いて実現される。解析部150は、CPU101がRAM102に記憶されたプログラムを実行することで実現される。   The program storage unit 110, the analysis information storage unit 120, the naming rule storage unit 130, and the analysis result storage unit 140 are realized using storage areas of the RAM 102 and the HDD 103. The analysis unit 150 is realized by the CPU 101 executing a program stored in the RAM 102.

プログラム記憶部110は、解析対象のプログラム111を記憶する。プログラム111は、あるプログラムの修正後のプログラムである。このため、修正前のプログラムに対して作成された既存の設計文書の業務用語の定義内容や業務ルールの内容は、プログラム111に整合していない。   The program storage unit 110 stores a program 111 to be analyzed. The program 111 is a program after a certain program is corrected. For this reason, the definition content of business terms and the content of business rules in the existing design document created for the program before correction are not consistent with the program 111.

解析情報記憶部120は、解析部150の処理に用いられる各種の情報を記憶する。例えば、解析情報記憶部120は、シンボリック実行結果121、入出力表122、業務条件候補表123および業務条件選定結果124を記憶する。これらの情報は、テーブル形式のデータでもよい。   The analysis information storage unit 120 stores various types of information used for the processing of the analysis unit 150. For example, the analysis information storage unit 120 stores a symbolic execution result 121, an input / output table 122, a business condition candidate table 123, and a business condition selection result 124. These pieces of information may be tabular data.

シンボリック実行結果121は、解析部150によるプログラム111のシンボリック実行の結果を示す情報である。シンボリック実行結果121は、シンボリック実行により抽出されたプログラムの処理パスの情報を含む。   The symbolic execution result 121 is information indicating the result of the symbolic execution of the program 111 by the analysis unit 150. The symbolic execution result 121 includes processing path information of the program extracted by symbolic execution.

入出力表122は、解析部150によりシンボリック実行結果121から抽出されたプログラム111における入力と出力との関係を示す情報である。
業務条件候補表123は、解析部150により入出力表122から抽出された業務条件候補を示す情報である。
The input / output table 122 is information indicating the relationship between input and output in the program 111 extracted from the symbolic execution result 121 by the analysis unit 150.
The business condition candidate table 123 is information indicating business condition candidates extracted from the input / output table 122 by the analysis unit 150.

業務条件選定結果124は、解析部150により業務条件候補表123から選定された業務条件を示す情報である。
命名ルール記憶部130は、命名ルール表131を記憶する。命名ルール表131は、業務条件に対する条件名の命名ルールを示す情報である。
The business condition selection result 124 is information indicating the business condition selected from the business condition candidate table 123 by the analysis unit 150.
The naming rule storage unit 130 stores a naming rule table 131. The naming rule table 131 is information indicating a naming rule for condition names for business conditions.

解析結果記憶部140は、解析部150により作成された業務用語表141および業務ルール表142を記憶する。業務用語表141は、業務用語の定義を示す情報である。業務ルール表142は、業務ルールの内容を示す情報である。   The analysis result storage unit 140 stores the business term table 141 and the business rule table 142 created by the analysis unit 150. The business term table 141 is information indicating the definition of business terms. The business rule table 142 is information indicating the content of business rules.

解析部150は、解析対象のプログラム111が入力されると、プログラム111を解析し、業務用語表141および業務ルール表142を出力する。解析部150は、シンボリック実行部151、入出力表生成部152、業務条件候補生成部153、業務条件選定部154、業務条件命名部155および入出力表書換部156を有する。   When the analysis target program 111 is input, the analysis unit 150 analyzes the program 111 and outputs a business term table 141 and a business rule table 142. The analysis unit 150 includes a symbolic execution unit 151, an input / output table generation unit 152, a business condition candidate generation unit 153, a business condition selection unit 154, a business condition naming unit 155, and an input / output table rewriting unit 156.

シンボリック実行部151は、解析対象のプログラム111をシンボリック実行することにより、プログラム111の処理パスを抽出し、シンボリック実行結果121を生成する。シンボリック実行部151は、シンボリック実行結果121を解析情報記憶部120に格納する。   The symbolic execution unit 151 extracts a processing path of the program 111 by generating a symbolic execution result 121 by executing the program 111 to be analyzed symbolically. The symbolic execution unit 151 stores the symbolic execution result 121 in the analysis information storage unit 120.

入出力表生成部152は、シンボリック実行結果121を集計し、整理することで、プログラム111の入力と出力との関係を示す入出力表122を生成し、解析情報記憶部120に入出力表122を格納する。   The input / output table generation unit 152 aggregates and organizes the symbolic execution results 121 to generate an input / output table 122 indicating the relationship between the input and output of the program 111, and the input / output table 122 is stored in the analysis information storage unit 120. Is stored.

業務条件候補生成部153は、入出力表122に含まれる条件から業務条件の候補を生成し、業務条件候補表123に登録する。業務条件候補生成部153は、業務条件候補表123を解析情報記憶部120に格納する。ここで、業務条件とは、プログラム111のうち、ユーザの業務との関連性が比較的強い(例えば、頻繁に更新されるなど)と推定される条件群である。業務条件候補は、複数の条件の組み合わせである複合条件である。したがって、業務条件も複合条件である。複合条件を業務条件の候補とすることで、ユーザにより更新された条件の変更(例えば、変数に対する条件の追加など)を適切に検出可能にする。例えば、新規機能の追加などに応じて、プログラマなどによって、複合的な条件にコードが変更されるケースが多いため、複合条件を検出することで、コードの更新内容を適切に検出できる可能性が高まる。   The business condition candidate generation unit 153 generates business condition candidates from the conditions included in the input / output table 122 and registers them in the business condition candidate table 123. The business condition candidate generation unit 153 stores the business condition candidate table 123 in the analysis information storage unit 120. Here, the business conditions are a group of conditions estimated to be relatively strong in relation to the user's business (for example, frequently updated) in the program 111. The business condition candidate is a composite condition that is a combination of a plurality of conditions. Therefore, business conditions are also complex conditions. By making the composite condition a candidate for business condition, a change in the condition updated by the user (for example, addition of a condition to a variable) can be appropriately detected. For example, there are many cases in which code is changed to a complex condition by a programmer or the like due to the addition of a new function, etc. Therefore, there is a possibility that the update contents of the code can be detected appropriately by detecting the complex condition Rise.

業務条件選定部154は、業務条件候補表123に登録された業務条件の複数の候補のうち、着目する候補について、当該候補の否定条件が当該複数の候補の中に存在するものを業務条件として選定し、業務条件選定結果124を生成する。業務条件選定部154は、業務条件選定結果124を解析情報記憶部120に格納する。   The business condition selection unit 154 uses, as a business condition, a candidate for which a negative condition of the candidate exists among the plurality of candidates among the plurality of business condition candidates registered in the business condition candidate table 123. The business condition selection result 124 is generated. The business condition selection unit 154 stores the business condition selection result 124 in the analysis information storage unit 120.

業務条件命名部155は、業務条件選定結果124に含まれる業務条件に対して、命名ルール表131における命名ルールに基づいて条件名を命名し、命名結果を示す業務用語表141を生成する。業務条件命名部155は、解析結果記憶部140に業務用語表141を格納する。   The business condition naming unit 155 names a condition name based on the naming rules in the naming rule table 131 for the business conditions included in the business condition selection result 124, and generates a business term table 141 indicating the naming result. The business condition naming unit 155 stores the business term table 141 in the analysis result storage unit 140.

入出力表書換部156は、業務条件命名部155により命名された業務条件により、入出力表122に含まれる条件の記述を置き換えることで、業務ルール表142を生成する。入出力表書換部156は、解析結果記憶部140に業務ルール表142を格納する。   The input / output table rewriting unit 156 generates the business rule table 142 by replacing the description of the conditions included in the input / output table 122 with the business conditions named by the business condition naming unit 155. The input / output table rewriting unit 156 stores the business rule table 142 in the analysis result storage unit 140.

図8は、シンボリック実行の例を示す図である。プログラムの分析方法の1つに、シンボリック実行(記号実行)がある。シンボリック実行では、プログラムへの入力値を格納する変数に、具体的な数値や具体的な文字に代えて定数を示すシンボル(記号値)を設定して、プログラムの実行可能なパスを抽出することによって、プログラムを分析する技術である。シンボリック実行に関して、例えば、次の文献を参考にすることができる。   FIG. 8 is a diagram illustrating an example of symbolic execution. One of the program analysis methods is symbolic execution (symbol execution). In symbolic execution, a variable that stores an input value to a program is set with a symbol (symbol value) indicating a constant instead of a specific numerical value or a specific character, and the executable path of the program is extracted. This is a technique for analyzing programs. Regarding symbolic execution, for example, the following documents can be referred to.

(文献)玉井哲雄、福永光一著、「シンボリック実行システム」、情報処理、pp.18−28、1982年1月15日
次に、シンボリック実行によるプログラムの分析例を説明する。
(Reference) Tetsuo Tamai, Koichi Fukunaga, “Symbolic Execution System”, Information Processing, pp. 18-28, January 15, 1982 Next, a program analysis example by symbolic execution will be described.

プログラムE1は、分析対象のプログラムの一例である。ただし、図8では、ロジックがわかり易いように、プログラム言語による記述ではなく、フローチャートの形式でプログラムE1を図示している。   The program E1 is an example of a program to be analyzed. However, in FIG. 8, the program E1 is illustrated in the form of a flowchart instead of a description in a program language so that the logic can be easily understood.

プログラムE1は、変数「性別」の値として2文字の文字列を受け取り、変数「結果」の値として1文字を出力する。プログラムE1は、2つの条件分岐を含む。1つ目の条件分岐では、変数「性別」の値が「男性」であるか判定される。変数「性別」の値が「男性」である場合には変数「結果」の値が「M」に更新され、そうでない場合には変数「結果」の値が「 」(空白)に更新される。また、2つ目の条件分岐では、変数「性別」の値が「女性」であるか判定される。変数「性別」の値が「女性」である場合には変数「結果」の値が「F」に更新され、そうでない場合には変数「結果」の値は変化しない。そして、プログラムE1が終了する。   The program E1 receives a two-character string as the value of the variable “gender” and outputs one character as the value of the variable “result”. The program E1 includes two conditional branches. In the first conditional branch, it is determined whether the value of the variable “gender” is “male”. If the value of the variable “gender” is “male”, the value of the variable “result” is updated to “M”; otherwise, the value of the variable “result” is updated to “” (blank). . In the second conditional branch, it is determined whether the value of the variable “gender” is “female”. If the value of the variable “gender” is “female”, the value of the variable “result” is updated to “F”; otherwise, the value of the variable “result” does not change. Then, the program E1 ends.

プログラムE1には3つのパスA,B,Cが存在する。変数「性別」の値に応じて、これら3つのパスのうちの何れか1つが実行される。パスAでは、変数「性別」の値が「男性」の場合である。この場合、1つ目の分岐条件はYESと判定され、2つ目の分岐条件はNOと判定される。パスAでは、変数「結果」の値は「M」になる。   The program E1 has three paths A, B, and C. Any one of these three passes is executed according to the value of the variable “gender”. In path A, the value of the variable “gender” is “male”. In this case, the first branch condition is determined as YES, and the second branch condition is determined as NO. In the path A, the value of the variable “result” is “M”.

パスBは、変数「性別」の値が「女性」の場合である。パスBでは、1つ目の分岐条件はNOと判定され、2つ目の分岐条件はYESと判定される。パスBでは、変数「結果」の値は「F」になる。   Path B is a case where the value of the variable “gender” is “female”. In path B, the first branch condition is determined as NO, and the second branch condition is determined as YES. In the path B, the value of the variable “result” is “F”.

パスCは、変数「性別」の値が「男性」でも「女性」でもない場合である。パスCでは、1つ目の分岐条件と2つ目の分岐条件の両方がNOと判定される。この実行パスでは、変数「結果」の値は「 」(空白)になる。   Path C is a case where the value of the variable “gender” is neither “male” nor “female”. In path C, it is determined that both the first branch condition and the second branch condition are NO. In this execution path, the value of the variable “result” is “” (blank).

プログラムE1は直列の2つの条件分岐文を含むため、分岐条件の内容を無視すれば、実行パスの候補は4つ存在する。しかし、変数「性別」の値が「男性」であることと変数「性別」の値が「女性」であることは矛盾するため、2つの分岐条件の両方がYESと判定されることはない。よって、4つの実行パスの候補のうち、実行される可能性のある有効な実行パスは3つである。   Since the program E1 includes two serial conditional branch statements, there are four execution path candidates if the contents of the branch condition are ignored. However, since the value of the variable “gender” is “male” and the value of the variable “sex” is “female”, both of the two branch conditions are not determined to be YES. Therefore, of the four execution path candidates, there are three effective execution paths that may be executed.

条件分岐文において、ある分岐方向(YES方向またはNO方向)に進むための条件を満たす変数の値が少なくとも1つ存在するとき、その分岐方向は「充足可能である」と言うことがある。一方、ある分岐方向に進むための条件を満たす変数の値が存在しないとき、その分岐方向は「充足可能でない」と言うことがある。   In a conditional branch sentence, when there is at least one variable value that satisfies a condition for proceeding in a certain branch direction (YES direction or NO direction), the branch direction may be said to be “satisfiable”. On the other hand, when there is no value of a variable that satisfies the condition for proceeding in a certain branch direction, the branch direction may be said to be “not satisfiable”.

プログラムE1において、1つ目の条件分岐では変数「性別」の値は制約されていないため、2つの分岐方向は共に充足可能である。一方、2つ目の条件分岐における充足可能性は、1つ目の条件分岐で選択した分岐方向に依存する。1つ目の条件分岐でYES方向を選択した場合、2つ目の条件分岐のYES方向は充足可能でなくなりNO方向のみ充足可能となる。1つ目の条件分岐でNO方向を選択した場合、2つ目の条件分岐の分岐方向は共に充足可能である。よって、有効な実行パスは3つであると判断できる。   In the program E1, since the value of the variable “gender” is not restricted in the first conditional branch, both the two branch directions can be satisfied. On the other hand, the satisfiability in the second conditional branch depends on the branch direction selected in the first conditional branch. When the YES direction is selected in the first conditional branch, the YES direction of the second conditional branch is no longer satisfactory and only the NO direction can be satisfied. When the NO direction is selected in the first conditional branch, both the branch directions of the second conditional branch can be satisfied. Therefore, it can be determined that there are three effective execution paths.

ここで、プログラムE1をシンボリック実行する例を説明する。シンボリック実行部151は、プログラムE1に対する入力を示す変数「性別」に、具体的な文字ではなく任意の定数を示す抽象的なシンボル(記号値)を割り当てる。ここでは、変数名と同じ「性別」をシンボルとして用いる。シンボリック実行部151は、シンボルを用いてプログラムE1の命令を擬似的に実行していく。   Here, an example in which the program E1 is symbolically executed will be described. The symbolic execution unit 151 assigns an abstract symbol (symbol value) indicating an arbitrary constant instead of a specific character to the variable “gender” indicating the input to the program E1. Here, the same “sex” as the variable name is used as a symbol. The symbolic execution unit 151 executes the instructions of the program E1 in a pseudo manner using symbols.

プログラムE1の始点から1つ目の条件分岐の前までは、パスの分岐は存在しない。1つ目の条件分岐について、この時点ではそのパスが選択される条件(パス条件)は存在せず、2つの分岐方向は共に充足可能である。よって、シンボリック実行部151は、1つ目の条件分岐においてパスを分割し、一方のパスを選択する。ここでは、シンボリック実行部151は、YES方向のパスを選択したとする。   There is no path branch from the start point of the program E1 to before the first conditional branch. For the first conditional branch, there is no condition (path condition) for selecting the path at this point, and both the two branch directions can be satisfied. Therefore, the symbolic execution unit 151 divides the path in the first conditional branch and selects one path. Here, it is assumed that the symbolic execution unit 151 selects a path in the YES direction.

次に、2つ目の条件分岐について、この時点におけるパス条件はシンボル「性別」が「男性」であることであるため、YES方向は充足可能でなくNO方向は充足可能である。よって、シンボリック実行部151はNO方向を選択する。その後、この1番目のパス(パスA)は終了する。シンボリック実行部151は、1番目のパスのパス条件を、シンボル「性別」が「男性」でありかつシンボル「性別」が「女性」でないと判定する。また、シンボリック実行部151は、1番目のパスの処理結果(パス出力)を、変数「結果」の値が「M」であると判定する。シンボリック実行部151は、これらの判定結果を、シンボリック実行結果E2に登録する(項番“1”のレコードに相当)。   Next, for the second conditional branch, since the path condition at this point is that the symbol “sex” is “male”, the YES direction cannot be satisfied, and the NO direction can be satisfied. Therefore, the symbolic execution unit 151 selects the NO direction. Thereafter, the first path (path A) ends. The symbolic execution unit 151 determines that the symbol “sex” is “male” and the symbol “sex” is not “female” for the path condition of the first pass. Also, the symbolic execution unit 151 determines that the value of the variable “result” is “M” for the processing result (path output) of the first pass. The symbolic execution unit 151 registers these determination results in the symbolic execution result E2 (corresponding to the record of the item number “1”).

1番目のパスが終了すると、シンボリック実行部151は、当該パスの直近の分割点まで戻り、未選択のパスを選択する。ここでは、シンボリック実行部151は、1つ目の条件分岐まで戻ってNO方向のパスを選択する。   When the first path ends, the symbolic execution unit 151 returns to the nearest division point of the path and selects an unselected path. Here, the symbolic execution unit 151 returns to the first conditional branch and selects a path in the NO direction.

2つ目の条件分岐について、この時点におけるパス条件はシンボル「性別」が「男性」でないことであるため、YES方向とNO方向の何れも充足可能である。よって、シンボリック実行部151は、2つ目の条件分岐においてパスを更に分割し、一方のパスを選択する。ここでは、シンボリック実行部151は、YES方向の実行パスを選択したとする。その後、この2番目のパス(パスB)は終了する。シンボリック実行部151は、2番目のパスのパス条件を、シンボル「性別」が「男性」でなくかつシンボル「性別」が「女性」であると判定する。また、シンボリック実行部151は、2番目のパスのパス出力を、変数「結果」の値が「F」であると判定する。シンボリック実行部151は、これらの判定結果を、シンボリック実行結果E2に登録する(項番“2”のレコードに相当)。   Regarding the second conditional branch, the path condition at this point is that the symbol “sex” is not “male”, so that both the YES direction and the NO direction can be satisfied. Therefore, the symbolic execution unit 151 further divides the path in the second conditional branch and selects one path. Here, it is assumed that the symbolic execution unit 151 selects an execution path in the YES direction. Thereafter, the second path (path B) ends. The symbolic execution unit 151 determines that the path condition of the second pass is that the symbol “sex” is not “male” and the symbol “sex” is “female”. Further, the symbolic execution unit 151 determines that the value of the variable “result” is “F” for the path output of the second path. The symbolic execution unit 151 registers these determination results in the symbolic execution result E2 (corresponding to the record of item number “2”).

2番目のパスが終了すると、シンボリック実行部151は、2つ目の条件分岐まで戻ってNO方向の実行パスを選択する。その後、この3番目のパス(パスC)は終了する。シンボリック実行部151は、3番目のパスのパス条件を、シンボル「性別」が「男性」でなくかつシンボル「性別」が「女性」でないと判定する。また、シンボリック実行部151は、3番目のパスのパス出力を、変数「結果」の値が「 」(空白)であると判定する。シンボリック実行部151は、これらの判定結果を、シンボリック実行結果E2に登録する(項番“3”のレコードに相当)。そして、未選択の実行パスが存在しないためシンボリック実行が終了する。   When the second path ends, the symbolic execution unit 151 returns to the second conditional branch and selects the execution path in the NO direction. Thereafter, the third path (path C) ends. The symbolic execution unit 151 determines that the symbol condition of the third pass is not “male” and the symbol “sex” is not “female”. Further, the symbolic execution unit 151 determines that the value of the variable “result” is “” (blank) for the path output of the third path. The symbolic execution unit 151 registers these determination results in the symbolic execution result E2 (corresponding to the record of the item number “3”). Then, since there is no unselected execution path, the symbolic execution ends.

なお、シンボリック実行部151は、パスの分割点において、その時点のパス条件と各変数の値とを保存しておく。シンボリック実行部151は、1つのパスが終了して分割点までバックトラックしたとき、保存しておいたパス条件と各変数の値とを引き継いで、未選択の分岐方向に対応する他のパスの探索を続ける。   The symbolic execution unit 151 stores the path condition and the value of each variable at that point at the path division point. The symbolic execution unit 151 takes over the saved path condition and the value of each variable when one path is finished and backtracks to the division point, and the other path corresponding to the unselected branch direction is taken over. Continue searching.

ここで、1番目のパスのパス条件は、「性別が男性である」かつ「性別が女性でない」ことである。これは、「性別が男性である」という条件に簡約化できる。2番目の実行パスのパス条件は、「性別が男性でない」かつ「性別が女性である」ことである。これは、「性別が女性である」という条件に簡約化できる。3番目のパスのパス条件は、「性別が男性でない」かつ「性別が女性でない」ことである。このように、入出力表生成部152は、シンボリック実行結果E2に対する簡約化などを行って整理することで、プログラムE1に関する入出力表E3を生成する。入出力表E3は、プログラムE1に関する入力に応じた条件と出力との対応関係を示す情報である。   Here, the pass condition of the first pass is “gender is male” and “gender is not female”. This can be simplified to the condition “gender is male”. The pass condition of the second execution pass is “gender is not male” and “gender is female”. This can be simplified to the condition that “sex is female”. The pass condition of the third pass is “gender is not male” and “gender is not female”. In this manner, the input / output table generation unit 152 generates the input / output table E3 related to the program E1 by performing simplification or the like on the symbolic execution result E2 and organizing it. The input / output table E3 is information indicating a correspondence relationship between a condition and an output corresponding to an input related to the program E1.

なお、条件分岐文における充足可能性の判断やパス条件の簡約化には、既存の数式処理技術を利用することができる。例えば、シンボリック実行部151は、充足可能性の判断に、SMT(Satisfiability Modulo Theories)ソルバやSAT(Satisfiability)ソルバなどを用いることができる。また、入出力表生成部152は、パス条件の簡約化に、クワイン・マクラスキー(QM:Quine-McCluskey)法などを用いることができる。QM法によれば、例えば、論理式A,B,Cに対して、(A∧B∧C)∨(A∧B∧¬C)=A∧Bのように、論理式を簡約化することができる。あるいは、入出力表生成部152は、次のような手順によりパス条件を簡約化することもできる。   It should be noted that existing mathematical expression processing techniques can be used to determine satisfiability in conditional branch sentences and to simplify path conditions. For example, the symbolic execution unit 151 can use an SMT (Satisfiability Modulo Theories) solver, an SAT (Satisfiability) solver, or the like to determine satisfiability. Further, the input / output table generation unit 152 can use a Quine-McCluskey (QM) method or the like for simplification of the path condition. According to the QM method, for example, with respect to the logical expressions A, B, and C, the logical expression is simplified as (A∧B∧C) ∨ (A∧B∧¬C) = A∧B. Can do. Alternatively, the input / output table generation unit 152 can simplify the path condition by the following procedure.

(手順1)パス条件の条件式を選言標準形(DNF:Disjunctive Normal Form)に展開する(元々DNFであれば展開不要)。展開後の条件式は、連言節(DNF項と称する)の選言である。すなわち、「条件式=DNF項(1)∨DNF項(2)∨・・・」の形式である。具体的な例として、条件式を「((X>1)∧(Y<0))∨((X>1)∧(Y>10))∨((X>1)∧(Y NOT<0)∧(Y NOT>10))」とする。この場合、DNF項は、((X>1)∧(Y<0))、((X>1)∧(Y>10))、((X>1)∧(Y NOT<0)∧(Y NOT>10))である。   (Procedure 1) The conditional expression of the path condition is expanded to a disjunctive normal form (DNF: Disjunctive Normal Form). The expanded conditional expression is a disjunction of a conjunctive clause (referred to as a DNF term). That is, the format is “conditional expression = DNF term (1) (DNF term (2) ∨. As a specific example, the conditional expression is “((X> 1) ∧ (Y <0)) ∨ ((X> 1) ∧ (Y> 10)) ∨ ((X> 1) ∧ (Y NOT <0 ) ∧ (Y NOT> 10)) ”. In this case, the DNF terms are ((X> 1) ∧ (Y <0)), ((X> 1) ∧ (Y> 10)), ((X> 1) ∧ (Y NOT <0) ∧ ( Y NOT> 10)).

(手順2)条件式から、NOT(否定演算子)をもたない比較演算子だけの比較条件式を、原子比較条件式として抽出する。上記の条件式に対して抽出される原子比較条件式は、(X>1)、(Y<0)、(Y>10)である。   (Procedure 2) From the conditional expression, a comparison conditional expression having only a comparison operator having no NOT (negative operator) is extracted as an atomic comparison conditional expression. The atomic comparison conditional expressions extracted for the above conditional expressions are (X> 1), (Y <0), and (Y> 10).

(手順3)DNF項の選言の組み合わせで、原子比較条件式とその否定の連言を因数条件の候補として因数分解する。(X>1)を因数条件として、上記の条件式を因数分解すると、条件式「(X>1)∧((Y<0)∨(Y>10)∨((Y NOT<0)∧(Y NOT>10)))」となる。   (Procedure 3) With the combination of disjunctions in the DNF term, the atomic comparison conditional expression and its negative conjunction are factored as factor condition candidates. When the above conditional expression is factored with (X> 1) as a factor condition, the conditional expression “(X> 1) ∧ ((Y <0) ∨ (Y> 10) ∨ ((Y NOT <0) ∧ ( Y NOT> 10))) ”.

(手順4)上記因数条件と連言される他の因数条件が恒真か判定し、恒真であれば、他の因数条件が恒真である旨を代入することで、当該DNF項の選言を簡約化する。(手順3)の例に対して、因数条件(X>1)と連言される他の因数条件は「(Y<0)∨(Y>10)∨((Y NOT<0)∧(Y NOT>10))=TRUE」であり、当該他の因数条件は恒真(Yの値に依らずに常に真)である。よって、(手順3)で得た条件式に、(手順4)の結果を代入することで、(手順1)で示した条件式は、(X>1)のように簡約化される。   (Procedure 4) It is determined whether another factor condition that is said to be the above factor condition is true, and if it is true, the fact that the other factor condition is true is substituted to select the DNF term. Simplify the word. For the example of (Procedure 3), the other factor condition that is referred to as the factor condition (X> 1) is “(Y <0) ∨ (Y> 10) ∨ ((Y NOT <0) ∧ (Y NOT> 10)) = TRUE ”, and the other factor conditions are true (always true regardless of the value of Y). Therefore, by substituting the result of (Procedure 4) into the conditional expression obtained in (Procedure 3), the conditional expression shown in (Procedure 1) is simplified as (X> 1).

図9は、解析対象のプログラムの例を示す図である。プログラム111は、前述のプログラムD14に対する修正後のプログラムの一例である。ここで、プログラム111に含まれる各行を、プログラム111の左側に便宜的に付した行番号により指し示す。また、図9では、図6のプログラムD14に対する修正箇所を強調のために矩形で囲っている。   FIG. 9 is a diagram illustrating an example of a program to be analyzed. The program 111 is an example of a program after correction with respect to the above-described program D14. Here, each line included in the program 111 is indicated by a line number given to the left side of the program 111 for convenience. Further, in FIG. 9, correction points for the program D14 in FIG. 6 are enclosed by a rectangle for emphasis.

例えば、プログラム111の12行目には、定数C2の定義が追加されている。また、プログラム111の26行目〜34行目には、定数C2を用いた変数“コード”に関する条件判定および条件判定に応じた処理が追加されている。   For example, the definition of the constant C2 is added to the 12th line of the program 111. Further, on the 26th to 34th lines of the program 111, a condition determination regarding the variable “code” using the constant C2 and a process according to the condition determination are added.

図10は、シンボリック実行結果の例を示す図である。シンボリック実行結果121は、プログラム111のシンボリック実行の結果である。シンボリック実行結果121は、項番、パス出力およびパス条件の項目を含む。   FIG. 10 is a diagram illustrating an example of a symbolic execution result. The symbolic execution result 121 is a result of symbolic execution of the program 111. The symbolic execution result 121 includes items of item number, path output, and path condition.

項番の項目には、レコードの識別番号が登録される。パス出力の項目には、該当のパスでの出力が登録される。パス条件の項目には、該当のパスが実行されるときの条件が登録される。   In the item number item, a record identification number is registered. In the path output item, output at the corresponding path is registered. In the path condition item, a condition for executing the corresponding path is registered.

例えば、シンボリック実行結果121には、項番が“1”、パス出力が“結果 = 1”、パス条件が“((コード = 11) AND (20170801 < 期間) AND (期間 < 20170831))”というレコードが登録される。このレコードは、“コード=11”、かつ、“20170801<期間”、かつ、“期間<20170831”の条件を満たす場合に、プログラム111の出力が“結果=1”であることを示す。   For example, in the symbolic execution result 121, the item number is “1”, the path output is “result = 1”, and the path condition is “((code = 11) AND (20110801 <period) AND (period <20110831))”. A record is registered. This record indicates that the output of the program 111 is “result = 1” when the conditions of “code = 11”, “20110801 <period”, and “period <20110831” are satisfied.

シンボリック実行結果121には、プログラム111に含まれる条件分岐の分岐先の組み合わせに応じたパス毎に、パス出力とパス条件とが登録される。
図11は、入出力表の例を示す図である。入出力表122は、項番、出力および条件の項目を含む。項番の項目には、レコードの識別番号が登録される。出力の項目には、シンボリック実行結果121におけるパス出力の値が登録される。ただし、入出力表122では、シンボリック実行結果121においてパス出力の値が同じであるレコードが複数の場合、当該複数のレコードに含まれる複数の条件が1つに集約される。条件の項目には、シンボリック実行結果121におけるパス出力毎のパス条件を乗法標準形(CNF:Conjunctive Normal Form)に変形した結果が登録される。CNFでは、条件式を選言節の連言の形式で表す。入出力表生成部152は、シンボリック実行結果121のパス条件を同じ値であるパス出力毎にまとめて簡約化し、簡約化した結果をCNFに変形することで、入出力表122における条件の内容を求める。CNFへの変形には、既存の方法(例えば、ドモルガンの法則、分配法則、および、Tseitin変換など)を用いることができる。
In the symbolic execution result 121, a path output and a path condition are registered for each path corresponding to a combination of branch destinations of conditional branches included in the program 111.
FIG. 11 is a diagram illustrating an example of an input / output table. The input / output table 122 includes items of item number, output, and condition. In the item number item, a record identification number is registered. In the output item, a path output value in the symbolic execution result 121 is registered. However, in the input / output table 122, when there are a plurality of records having the same path output value in the symbolic execution result 121, a plurality of conditions included in the plurality of records are integrated into one. In the condition item, a result obtained by transforming the path condition for each path output in the symbolic execution result 121 into a multiplicative normal form (CNF: Conjunctive Normal Form) is registered. In CNF, conditional expressions are expressed in the form of disjunctive conjunctions. The input / output table generation unit 152 simplifies the path condition of the symbolic execution result 121 for each path output having the same value, and converts the reduced result into CNF, so that the condition contents in the input / output table 122 are changed. Ask. Existing methods (for example, Domorgan's law, distribution law, and Tseitin transformation) can be used for transformation to CNF.

例えば、入出力表122には、項番が“1”、出力が“結果 = 1”、条件が“((コード = 11) OR (コード = 22)) AND ((20170801 < 期間) AND (期間 < 20170831))”というレコードが登録される。このレコードは、“コード”が“11”または“22”であり、かつ、“20170801<期間”、かつ、“期間<20170831”の条件を満たす場合に、プログラム111の出力が“結果=1”であることを示す。   For example, in the input / output table 122, the item number is “1”, the output is “result = 1”, and the condition is “((code = 11) OR (code = 22)) AND ((2011081 <period) AND (period <20110831)) "is registered. In this record, when the “code” is “11” or “22”, the condition of “20110801 <period” and “period <20110831” is satisfied, the output of the program 111 is “result = 1”. Indicates that

入出力表122には、シンボリック実行結果121における出力“結果 = 2”および“結果 = 3”に対応する各レコードも登録される。入出力表122の当該条件に含まれる“コード = 11”、“コード = 22”、“20170801 < 期間”および“期間 < 20170831”などを、条件文と言うことができる。   In the input / output table 122, records corresponding to the outputs “result = 2” and “result = 3” in the symbolic execution result 121 are also registered. “Code = 11”, “Code = 22”, “2011081 <period”, “period <20110831”, and the like included in the conditions of the input / output table 122 can be referred to as conditional statements.

図12は、業務条件候補抽出用の中間データの例を示す図である。中間データ122aは、業務条件候補の抽出を行うための中間的なデータである。中間データ122aは、入出力表122に基づいて、業務条件候補生成部153により生成され、解析情報記憶部120に格納される。中間データ122aは、条件番号、候補条件、否定関係および正条件の項目を含む。   FIG. 12 is a diagram illustrating an example of intermediate data for extracting business condition candidates. The intermediate data 122a is intermediate data for extracting business condition candidates. The intermediate data 122 a is generated by the business condition candidate generation unit 153 based on the input / output table 122 and stored in the analysis information storage unit 120. The intermediate data 122a includes items of condition number, candidate condition, negative relationship, and positive condition.

条件番号の項目には、業務条件候補の抽出元となる条件(候補条件と言う)の識別番号が登録される。候補条件の項目には、候補条件の内容が登録される。候補条件の内容は、入出力表122に基づいて、業務条件候補生成部153により所定の演算を用いて生成される。否定関係の項目には、該当のレコードの候補条件と否定関係にある他の候補条件の条件番号が登録される。否定関係にある他の候補条件が存在しない場合、否定関係の項目は設定なしとなる。ここで、設定なしをハイフン記号“−”で示す。正条件の項目には、否定関係にある他の候補条件がある場合に、正条件に該当するか否かを示す識別情報が登録される。該当する場合、正条件の項目には“該当”が登録される。該当しない場合(否定関係をもたない場合や正条件でない場合)、正条件の項目は設定なし(“−”)となる。ここで、正条件は、互いに否定関係をもつ2つの候補条件のうち、否定演算子の数が少ない方の候補条件である。否定関係にある他の候補条件がない場合、正条件の項目は常に設定なしとなる。   In the condition number item, an identification number of a condition (referred to as a candidate condition) from which a business condition candidate is extracted is registered. The content of the candidate condition is registered in the item of candidate condition. The contents of the candidate conditions are generated by the business condition candidate generation unit 153 using a predetermined calculation based on the input / output table 122. In the negative relationship item, the condition numbers of other candidate conditions having a negative relationship with the candidate condition of the corresponding record are registered. If there is no other candidate condition in a negative relationship, the item in the negative relationship is not set. Here, no setting is indicated by a hyphen symbol “-”. In the item of the positive condition, when there is another candidate condition having a negative relationship, identification information indicating whether the positive condition is satisfied is registered. If applicable, “Applicable” is registered in the item of the correct condition. When not applicable (when there is no negative relationship or when there is no positive condition), the item of the positive condition is not set ("-"). Here, the positive condition is a candidate condition having a smaller number of negation operators among two candidate conditions having a negative relationship with each other. If there is no other candidate condition in a negative relationship, the positive condition item is always set.

例えば、中間データ122aには、条件番号が“条件1”、候補条件が“((コード = 11) OR (コード = 22)) AND (20170801 < 期間) AND (期間 < 20170831)”、否定関係が“−”、正条件が“−”というレコードが登録される。このレコードは、条件番号“条件1”の候補条件の内容を示しており、当該候補条件には否定関係にある他の候補条件がないことを示す。   For example, in the intermediate data 122a, the condition number is “condition 1”, the candidate condition is “((code = 11) OR (code = 22)) AND (20110801 <period) AND (period <20110831)”, and the negative relation is A record with “−” and a positive condition “−” is registered. This record indicates the contents of the candidate condition with the condition number “condition 1”, and indicates that the candidate condition has no other candidate condition having a negative relationship.

中間データ122aの例では、条件番号“条件2”、“条件3”、“条件6”の候補条件も同様に否定関係にある他の候補条件をもたない。
また、中間データ122aには、条件番号が“条件4”、候補条件が“((20170801 < 期間) AND (期間< 20170831))”、否定関係が“条件7”、正条件が“該当”というレコードが登録される。このレコードは、条件番号“条件4”の候補条件の内容を示す。また、このレコードは、条件番号“条件4”の候補条件には、否定関係にある条件番号“条件7”の他の候補条件があること、条件番号“条件4”および“条件7”の候補条件のうち、条件番号“条件4”の候補条件が正条件に該当することを示す。
In the example of the intermediate data 122a, the candidate conditions with the condition numbers “condition 2”, “condition 3”, and “condition 6” do not have other candidate conditions that are similarly negative.
Further, in the intermediate data 122a, the condition number is “condition 4”, the candidate condition is “((20110801 <period) AND (period <20110831))”, the negative relation is “condition 7”, and the positive condition is “corresponding”. A record is registered. This record indicates the contents of the candidate condition with the condition number “condition 4”. Further, in this record, the candidate condition with the condition number “condition 4” includes other candidate conditions with the condition number “condition 7” having a negative relationship, and candidates with the condition numbers “condition 4” and “condition 7”. Among the conditions, it indicates that the candidate condition with the condition number “condition 4” corresponds to the positive condition.

中間データ122aの例では、条件番号“条件5”および“条件8”の2つの候補条件も互いに否定関係にあり、このうち、条件番号“条件5”の候補条件が正条件である。
図13は、業務条件候補表の例を示す図である。業務条件候補表123は、中間データ122aに基づいて、業務条件候補生成部153により生成される。業務条件候補生成部153は、中間データ122aの候補条件における条件の長い順(節の多い順)、かつ、否定演算子の少ない順に各レコードをソートする。このソートの結果が、業務条件候補表123である(業務条件候補表123における候補条件を、業務条件候補と称する)。業務条件候補表123は、項番、条件番号、業務条件候補、否定関係および正条件の項目を含む。
In the example of the intermediate data 122a, the two candidate conditions with the condition numbers “condition 5” and “condition 8” are also in a negative relationship with each other, and the candidate condition with the condition number “condition 5” is the positive condition.
FIG. 13 is a diagram illustrating an example of the business condition candidate table. The business condition candidate table 123 is generated by the business condition candidate generation unit 153 based on the intermediate data 122a. The business condition candidate generation unit 153 sorts the records in the order in which the conditions in the candidate conditions of the intermediate data 122a are long (in the order of many nodes) and in the order of few negative operators. The result of this sorting is the business condition candidate table 123 (candidate conditions in the business condition candidate table 123 are referred to as business condition candidates). The business condition candidate table 123 includes items of item number, condition number, business condition candidate, negative relationship, and positive condition.

項番の項目には、レコードの識別番号が登録される。条件番号の項目には、候補条件の識別番号が登録される。業務条件候補の項目には、業務条件候補の内容が登録される。否定関係の項目には、該当のレコードの業務条件候補と否定関係にある他の業務条件候補の条件番号が登録される。否定関係の項目の設定ルールは、中間データ122aと同様である。正条件の項目には、否定関係にある他の業務条件候補がある場合に、正条件に該当するか否かを示す識別情報が登録される。正条件の項目の設定ルールは、中間データ122aと同様である。   In the item number item, a record identification number is registered. In the condition number item, an identification number of a candidate condition is registered. In the business condition candidate item, the contents of the business condition candidate are registered. In the item of negative relation, the condition numbers of other business condition candidates having a negative relation with the business condition candidate of the corresponding record are registered. The setting rule for the negative relationship item is the same as that of the intermediate data 122a. In the item of the positive condition, when there is another business condition candidate in a negative relationship, identification information indicating whether or not the positive condition is satisfied is registered. The setting rule for the item of the correct condition is the same as that of the intermediate data 122a.

業務条件候補生成部153は、前述のように、中間データ122aのソート結果である。このため、各項目の具体的な設定内容は、中間データ122aと同様である。ただし、項番の項目には、ソート後に、各レコードの上位から下位へ向かって昇順に番号が設定される。   The business condition candidate generation unit 153 is the sorting result of the intermediate data 122a as described above. For this reason, the specific setting content of each item is the same as that of the intermediate data 122a. However, in the item number item, numbers are set in ascending order from the top to the bottom of each record after sorting.

図14は、業務条件選定用の中間データの例を示す図である。中間データ123aは、業務条件の選定を行うための中間的なデータである。中間データ123aは、業務条件候補表123に基づいて、業務条件選定部154により生成され、解析情報記憶部120に格納される。中間データ123aは、項番、正条件の入出力表項番、否定の入出力表項番および業務条件判定の項目を含む。   FIG. 14 is a diagram illustrating an example of intermediate data for selecting business conditions. The intermediate data 123a is intermediate data for selecting business conditions. The intermediate data 123 a is generated by the business condition selection unit 154 based on the business condition candidate table 123 and stored in the analysis information storage unit 120. The intermediate data 123a includes items of item number, positive condition input / output table item number, negative input / output table item number, and business condition determination.

項番の項目には、レコードの識別番号が登録される。正条件の入出力表項番の項目には、業務条件候補表123の該当の項番に対応する業務条件候補の、入出力表122における存在場所(入出力表122におけるレコードの項番、または、当該項番と条件における位置との組)を示す情報が登録される。正条件は、業務条件候補と同じ条件を示す。該当の業務条件候補が入出力表122のあるレコードの条件の一部に一致する場合、入出力表122の項番と、当該項番に対応する条件のうち該当の業務条件候補と一致する位置を示す情報とが、正条件の入出力表項番の項目に登録される。   In the item number item, a record identification number is registered. The item of the input / output table item number of the normal condition includes the location of the job condition candidate corresponding to the corresponding item number of the job condition candidate table 123 in the input / output table 122 (the record item number in the input / output table 122, or , Information indicating the combination of the item number and the position in the condition) is registered. The positive condition indicates the same condition as the business condition candidate. When the corresponding business condition candidate matches a part of the condition of a record in the input / output table 122, the item number in the input / output table 122 and the position corresponding to the corresponding business condition candidate among the conditions corresponding to the item number Is registered in the item of the input / output table item number of the positive condition.

否定の入出力表項番の項目には、業務条件候補表123の該当の項番に対応する業務条件候補の否定(すなわち、業務条件候補の否定を示す否定条件)の入出力表122における存在場所を示す情報が登録される。該当の業務条件候補の否定が入出力表122のあるレコードの条件の一部に一致する場合、入出力表122の項番と、当該項番に対応する条件のうち該当の業務条件候補の否定と一致する位置を示す情報とが、否定の入出力表項番の項目に登録される。   The item of the negative input / output table item number exists in the input / output table 122 of the negative of the business condition candidate corresponding to the corresponding item number of the business condition candidate table 123 (that is, the negative condition indicating the negative of the business condition candidate). Information indicating the location is registered. If the denial of the relevant business condition candidate matches a part of the condition of a record in the input / output table 122, the relevant business condition candidate is negated from the item number of the input / output table 122 and the condition corresponding to the item number. And the information indicating the position that matches are registered in the negative I / O table item number item.

業務条件判定の項目には、業務条件として選定されたか否かを示す識別情報が登録される。業務条件として選定された場合、業務条件判定の項目には“true”が設定される。業務条件として選定されなかった場合、業務条件判定の項目には“false”が設定される。ここで、互いに否定関係となっている2つの業務条件候補のうち、正条件である方が業務条件として選定される。このため、中間データ123aの項番“6”や項番“8”に対応する業務条件候補は、業務条件の選定の対象外となる。したがって、項番“6”および項番“8”に対応する業務条件候補のレコードには、項番以外の情報が設定されていない(項番以外は設定なし“−”である)。   In the business condition determination item, identification information indicating whether or not the business condition is selected is registered. When the business condition is selected, “true” is set in the business condition determination item. If it is not selected as the business condition, “false” is set in the business condition determination item. Here, of the two business condition candidates that are in a negative relationship with each other, the positive condition is selected as the business condition. For this reason, business condition candidates corresponding to the item numbers “6” and “8” of the intermediate data 123a are excluded from the selection of business conditions. Therefore, information other than the item number is not set in the business condition candidate records corresponding to the item numbers “6” and “8” (other than the item number, “−” is not set).

なお、正条件の入出力表項番および否定の入出力項番の項目は、業務条件判定が“true”の場合に設定値の登録が行われ、業務条件判定が“false”の場合に設定なしとなる。   Note that the input / output table item number of the positive condition and the negative input / output item number are set when the business condition determination is “true” and the set value is registered, and when the business condition determination is “false”. None.

例えば、中間データ123aには、項番が“1”、正条件の入出力表項番および否定の入出力表項番が設定なし“−”、業務条件判定が“false”というレコードが登録される。このレコードは、業務条件候補表123の項番“1”の業務条件候補が、業務条件として選定されなかったことを示す(項番“2”〜“4”のレコードも同様)。   For example, a record in which the item number is “1”, the positive input / output table item number and the negative input / output table item number are not set “−”, and the business condition determination is “false” is registered in the intermediate data 123a. The This record indicates that the business condition candidate of item number “1” in the business condition candidate table 123 has not been selected as the business condition (the same applies to records of item numbers “2” to “4”).

また、中間データ123aには、項番が“5”、正条件の入出力表項番が“1の右端”、否定の入出力表項番が“2の右端”、業務条件判定が“true”というレコードが登録される。このレコードは、業務条件候補表123の項番“5”の業務条件候補と同じ条件が、入出力表122の項番“1”の条件の右端の節にあることを示す。また、当該項番“5”の業務条件候補の否定を示す条件が入出力表122の項番“2”の条件の右端の節であることを示す。更に、当該項番“5”の業務条件候補は、業務条件として選定されたことを示す。   In the intermediate data 123a, the item number is “5”, the positive input / output table item number is “1 right end”, the negative input / output table item number is “2 right end”, and the business condition determination is “true”. "Is registered. This record indicates that the same condition as the job condition candidate of item number “5” in the job condition candidate table 123 is in the rightmost node of the condition of item number “1” in the input / output table 122. Further, the condition indicating that the business condition candidate of the item number “5” is negative is the rightmost node of the condition of the item number “2” in the input / output table 122. Further, it indicates that the business condition candidate of the item number “5” is selected as the business condition.

更に、中間データ123aには、項番が“7”、正条件の入出力表項番が“1の左端、2の左端”、否定の入出力表項番が“3”、業務条件判定が“true”というレコードが登録される。このレコードは、業務条件候補表123の項番“7”の業務条件候補と同じ条件が、入出力表122の項番“1”の左端の節、および、入出力表122の項番“2”の左端の節にあることを示す。また、当該項番“7”の業務条件候補の否定を示す条件が入出力表122の項番“3”の条件であることを示す。更に、当該項番“7”の業務条件候補は、業務条件として選定されたことを示す。   Further, in the intermediate data 123a, the item number is “7”, the input / output table item number of the positive condition is “left end of 1, 2 left end”, the input / output table item number of negative is “3”, and the business condition determination is performed. A record “true” is registered. This record has the same condition as the job condition candidate of item number “7” in the job condition candidate table 123, the leftmost clause of the item number “1” in the input / output table 122, and the item number “2” in the input / output table 122. Indicates that it is in the leftmost node. In addition, the condition indicating that the business condition candidate of the item number “7” is negative is the condition of the item number “3” in the input / output table 122. Further, it indicates that the business condition candidate of the item number “7” is selected as the business condition.

図15は、業務条件選定結果の例を示す図である。業務条件選定結果124は、業務条件選定部154により中間データ123aに基づいて生成される。業務条件選定結果124は、項番、業務条件、正条件の出現場所および否定条件の出現場所の項目を含む。   FIG. 15 is a diagram illustrating an example of a business condition selection result. The business condition selection result 124 is generated based on the intermediate data 123 a by the business condition selection unit 154. The business condition selection result 124 includes items of item number, business condition, appearance place of the positive condition, and appearance place of the negative condition.

項番の項目には、レコードの識別番号が登録される。業務条件の項目には、業務条件の内容が登録される。正条件の出現場所の項目には、業務条件が出現する入出力表122の位置(レコードの項番と、当該レコードの条件内の位置を示す情報)が登録される。否定条件の出現場所の項目には、業務条件の否定が出現する入出力表122の位置(レコードの項番と、当該レコードの条件内の位置を示す情報)が登録される。   In the item number item, a record identification number is registered. The contents of the business condition are registered in the business condition item. In the item of the appearance location of the normal condition, the position (information indicating the item number of the record and the position within the condition of the record) of the input / output table 122 where the business condition appears is registered. In the item of the appearance condition of the negative condition, the position (information indicating the item number of the record and the position within the condition of the record) of the input / output table 122 where the negative of the business condition appears is registered.

例えば、業務条件選定結果124には、項番が“1”、業務条件が“((20170801 < 期間) AND (期間 < 20170831))”、正条件の出現場所が“1)入出力表条件1の右端”、否定条件の出現場所が“1)入出力表条件2の右端”というレコードが登録される。このレコードは、項番“1”の業務条件を示しており、当該業務条件が入出力表122の項番“1”の条件の右端の節に相当することを示す。また、当該業務条件の否定を示す条件が入出力表122の項番“2”の条件の右端の節に相当することを示す。   For example, in the business condition selection result 124, the item number is “1”, the business condition is “((20110801 <period) AND (period <20110831))”, and the place where the positive condition appears is “1) I / O table condition 1 "Right end of", and the appearance of the negative condition is registered as "1) Right end of input / output table condition 2". This record indicates the business condition of item number “1”, and indicates that the business condition corresponds to the rightmost clause of the condition of item number “1” in the input / output table 122. Further, it is indicated that the condition indicating the denial of the business condition corresponds to the rightmost node of the condition of item number “2” in the input / output table 122.

また、業務条件選定結果124には、項番が“2”、業務条件が“((コード = 11) OR (コード = 22)”、正条件の出現場所が“1)入出力表条件1の左端、2)入出力表条件2の左端”、否定条件の出現場所が“1)入出力表条件3”というレコードが登録される。このレコードは、項番“2”の業務条件を示しており、当該業務条件が入出力表122の項番“1”の条件の左端の節に出現することを示す。また、当該業務条件が入出力表122の項番“2”の条件の左端の節に出現することを示す。また、当該業務条件の否定を示す条件が入出力表122の項番“3”の条件に相当することを示す。   In the business condition selection result 124, the item number is “2”, the business condition is “((code = 11) OR (code = 22)”, and the place where the positive condition appears is “1”. Records of the left end, 2) the left end of input / output table condition 2, and the appearance location of the negative condition are “1) input / output table condition 3” are registered. This record indicates the business condition of item number “2” and indicates that the business condition appears in the leftmost section of the condition of item number “1” in the input / output table 122. It also indicates that the business condition appears in the leftmost section of the condition of item number “2” in the input / output table 122. In addition, the condition indicating that the business condition is negative corresponds to the condition of the item number “3” in the input / output table 122.

図16は、命名ルール表の例を示す図である。命名ルール表131は、項番および命名ルールの項目を含む。項番の項目には、レコードの識別番号が登録される。命名ルールの項目には、業務条件に対する業務用語の命名ルールが登録される。   FIG. 16 is a diagram illustrating an example of a naming rule table. The naming rule table 131 includes items of item numbers and naming rules. In the item number item, a record identification number is registered. In the naming rule item, a business term naming rule for business conditions is registered.

例えば、命名ルール表131には、項番が“1”、命名ルールが“業務条件が「(下限 < 変数) AND (変数 < 上限)」にマッチしたら、「変数内」と命名する。”というレコードが登録される。このレコードは、“変数”に関する業務条件の書式が項番“1”の命名ルールの書式に一致する場合に、当該業務条件を、「変数内」と定義することを示す。ここで、「変数内」の文字列のうち、“変数”の箇所は、実際の変数名が挿入される。   For example, in the naming rule table 131, when the item number is “1” and the naming rule is “business condition matches“ (lower limit <variable) AND (variable <upper limit) ”, it is named“ inside variable ”. This record defines the business condition as “in variable” when the format of the business condition related to “variable” matches the format of the naming rule of item number “1”. Indicates. Here, the actual variable name is inserted into the “variable” portion of the character string “inside variable”.

また、命名ルール表131には、項番が“2”、命名ルールが“業務条件が「(変数 = 定数1)[OR (変数 = 定数2)]+」にマッチしたら、「有効変数」と命名する。”というレコードが登録される。このレコードは、“変数”に関する業務条件の書式が項番“2”の命名ルールの書式に一致する場合に、当該業務条件を、「有効変数」と定義することを示す。当該命名ルールの“[OR(変数 = 定数2)]+”の部分は、2つ目以降の定数に関する条件がORで結合され得ることを示す。ここで、「有効変数」の文字列のうち、“変数”の箇所は、実際の変数名が挿入される。   In the naming rule table 131, if the item number matches “2” and the naming rule “business condition is“ (variable = constant 1) [OR (variable = constant 2)] + ””, “effective variable” is indicated. Naming. This record defines the business condition as “valid variable” when the format of the business condition related to “variable” matches the format of the naming rule of item number “2”. Indicates. The “[OR (variable = constant 2)] +” part of the naming rule indicates that the conditions for the second and subsequent constants can be combined with OR. Here, the actual variable name is inserted in the “variable” portion of the character string “valid variable”.

図17は、業務用語表の例を示す図である。業務用語表141は、業務条件選定結果124および命名ルール表131に基づいて、業務条件命名部155により生成される。業務用語表141は、項番、業務用語および条件の項目を含む。   FIG. 17 is a diagram illustrating an example of a business term table. The business term table 141 is generated by the business condition naming unit 155 based on the business condition selection result 124 and the naming rule table 131. The business term table 141 includes items of item number, business term, and condition.

項番の項目には、レコードの識別番号が登録される。業務用語の項目には、命名された業務用語が登録される。条件の項目には、業務用語に対応する条件(業務条件)が登録される。   In the item number item, a record identification number is registered. Named business terms are registered in the business term field. In the condition item, a condition (business condition) corresponding to the business term is registered.

例えば、業務用語表141には、項番が“1”、業務用語が“期間内”、条件が“(20170801 < 期間) AND (期間 < 20170831)”というレコードが登録される。このレコードは、項番“1”の条件に対して、業務用語“期間内”が命名されたことを示す。業務用語“期間内”は、項番“1”の条件に対して、命名ルール表131の項番“1”の命名ルールが適用された結果である。   For example, in the business term table 141, a record is registered in which the item number is “1”, the business term is “within period”, and the condition is “(20110801 <period) AND (period <20110831)”. This record indicates that the business term “within period” is named for the condition of item number “1”. The business term “within period” is a result of applying the naming rule of item number “1” in the naming rule table 131 to the condition of item number “1”.

また、業務用語表141には、項番が“2”、業務用語が“有効コード”、条件が“(コード = 11) OR (コード =22)”というレコードが登録される。このレコードは、項番“2”の条件に対して、業務用語“有効コード”が命名されたことを示す。業務用語“有効コード”は、項番“2”の条件に対して、命名ルール表131の項番“2”の命名ルールが適用された結果である。   In the business term table 141, a record with an item number “2”, a business term “valid code”, and a condition “(code = 11) OR (code = 22)” is registered. This record indicates that the business term “valid code” is named for the condition of item number “2”. The business term “valid code” is a result of applying the naming rule of item number “2” in the naming rule table 131 to the condition of item number “2”.

図18は、業務ルール表の例を示す図である。図18(A)は、第1の形式の業務ルール表142を示す。図18(B)は、第2の形式の業務ルール表143を示す。
業務ルール表142は、入出力表122の条件の内容を、業務用語表141で定義されている業務用語に置換したものである。具体的には、入出力表122の条件に含まれる各節を業務条件の正形式および否定形式で置換する。正形式の場合、“業務用語 = True”という書式であり、否定形式の場合、“業務用語 = False”という書式である。
FIG. 18 is a diagram illustrating an example of a business rule table. FIG. 18A shows the business rule table 142 in the first format. FIG. 18B shows a business rule table 143 in the second format.
The business rule table 142 is obtained by replacing the contents of the conditions in the input / output table 122 with business terms defined in the business term table 141. Specifically, each section included in the condition of the input / output table 122 is replaced with the positive form and negative form of the business condition. In the normal format, the format is “business term = True”, and in the negative format, the format is “business term = False”.

業務ルール表143は、業務ルール表142の条件の内容を、決定表と呼ばれる形式に変換したものである。業務ルール表143では、業務ルール表142における条件のカラムが業務用語毎のカラムに分割され、業務ルール表142における“業務用語 = True”の箇所が“T”に、“業務用語 = False”の箇所が“F”に、それぞれ置き換えられている。   The business rule table 143 is obtained by converting the contents of the conditions of the business rule table 142 into a format called a decision table. In the business rule table 143, the condition column in the business rule table 142 is divided into columns for each business term, where “business term = True” in the business rule table 142 is “T” and “business term = False”. Each part is replaced with “F”.

入出力表書換部156は、入出力表122に基づいて、業務ルール表142および業務ルール表143を生成し、解析結果記憶部140に格納する。
次に、解析サーバ100による処理手順を説明する。
The input / output table rewriting unit 156 generates a business rule table 142 and a business rule table 143 based on the input / output table 122 and stores them in the analysis result storage unit 140.
Next, a processing procedure by the analysis server 100 will be described.

図19は、解析サーバの処理例を示すフローチャートである。解析部150は、ユーザによるプログラム111の解析開始の入力を受け付けると、下記の手順を実行する。
(S1)シンボリック実行部151は、プログラム記憶部110に記憶された解析対象のプログラム111をシンボリック実行することで、プログラム111の処理パスを抽出し、シンボリック実行結果121を生成する。シンボリック実行部151は、シンボリック実行結果121を解析情報記憶部120に格納する。
FIG. 19 is a flowchart illustrating a processing example of the analysis server. When the analysis unit 150 receives an input to start analysis of the program 111 by the user, the analysis unit 150 executes the following procedure.
(S1) The symbolic execution unit 151 extracts the processing path of the program 111 and generates a symbolic execution result 121 by executing the analysis target program 111 stored in the program storage unit 110 symbolically. The symbolic execution unit 151 stores the symbolic execution result 121 in the analysis information storage unit 120.

(S2)入出力表生成部152は、解析情報記憶部120に記憶されたシンボリック実行結果121に基づいて、入出力表122を生成する。入出力表生成部152は、入出力表122を解析情報記憶部120に格納する。   (S2) The input / output table generation unit 152 generates the input / output table 122 based on the symbolic execution result 121 stored in the analysis information storage unit 120. The input / output table generation unit 152 stores the input / output table 122 in the analysis information storage unit 120.

(S3)業務条件候補生成部153は、解析情報記憶部120に記憶された入出力表122に基づいて、中間データ122aを生成する。業務条件候補生成部153は、中間データ122aを解析情報記憶部120に格納する。業務条件候補生成部153は、解析情報記憶部120に記憶された中間データ122aに基づいて業務条件候補表123を生成する。業務条件候補生成部153は、業務条件候補表123を解析情報記憶部120に格納する。   (S3) The business condition candidate generation unit 153 generates intermediate data 122a based on the input / output table 122 stored in the analysis information storage unit 120. The business condition candidate generation unit 153 stores the intermediate data 122a in the analysis information storage unit 120. The business condition candidate generation unit 153 generates the business condition candidate table 123 based on the intermediate data 122 a stored in the analysis information storage unit 120. The business condition candidate generation unit 153 stores the business condition candidate table 123 in the analysis information storage unit 120.

(S4)業務条件選定部154は、解析情報記憶部120に記憶された業務条件候補表123に基づいて、中間データ123aを生成する。業務条件選定部154は、中間データ123aを解析情報記憶部120に格納する。業務条件選定部154は、解析情報記憶部120に記憶された入出力表122と中間データ123aとに基づいて、業務条件選定結果124を生成する。業務条件選定部154は、業務条件選定結果124を解析情報記憶部120に格納する。   (S4) The business condition selection unit 154 generates intermediate data 123a based on the business condition candidate table 123 stored in the analysis information storage unit 120. The business condition selection unit 154 stores the intermediate data 123a in the analysis information storage unit 120. The business condition selection unit 154 generates a business condition selection result 124 based on the input / output table 122 and the intermediate data 123a stored in the analysis information storage unit 120. The business condition selection unit 154 stores the business condition selection result 124 in the analysis information storage unit 120.

(S5)業務条件命名部155は、解析情報記憶部120に記憶された業務条件選定結果124と、命名ルール記憶部130に記憶された命名ルール表131とに基づいて、業務用語表141を生成する。業務条件命名部155は、業務用語表141を解析結果記憶部140に格納する。   (S5) The business condition naming unit 155 generates a business term table 141 based on the business condition selection result 124 stored in the analysis information storage unit 120 and the naming rule table 131 stored in the naming rule storage unit 130. To do. The business condition naming unit 155 stores the business term table 141 in the analysis result storage unit 140.

(S6)入出力表書換部156は、解析情報記憶部120に記憶された入出力表122と解析結果記憶部140に記憶された業務用語表141とに基づいて、業務ルール表142,143を生成する。入出力表書換部156は、業務ルール表142,143を解析結果記憶部140に格納する。そして、解析サーバ100の処理が終了する。   (S6) The input / output table rewriting unit 156 stores the business rule tables 142 and 143 based on the input / output table 122 stored in the analysis information storage unit 120 and the business term table 141 stored in the analysis result storage unit 140. Generate. The input / output table rewriting unit 156 stores the business rule tables 142 and 143 in the analysis result storage unit 140. And the process of the analysis server 100 is complete | finished.

次に、ステップS1〜S6それぞれの手順を説明する。
図20は、シンボリック実行の処理例を示すフローチャートである。シンボリック実行の処理は、図19のステップS1で実行される。
Next, the procedures of steps S1 to S6 will be described.
FIG. 20 is a flowchart illustrating a processing example of symbolic execution. The symbolic execution process is executed in step S1 of FIG.

(S10)シンボリック実行部151は、プログラム記憶部110に記憶された解析対象のプログラム111を取得する。
(S11)シンボリック実行部151は、プログラム111のシンボリック実行を行う。シンボリック実行部151は、図8で例示したように、プログラム111の入力変数にシンボル値を設定して、プログラム111の実行可能な処理パスを抽出することで、プログラム111におけるパス出力とパス条件との関係を取得する。
(S10) The symbolic execution unit 151 acquires the analysis target program 111 stored in the program storage unit 110.
(S11) The symbolic execution unit 151 performs symbolic execution of the program 111. As illustrated in FIG. 8, the symbolic execution unit 151 sets a symbol value to an input variable of the program 111 and extracts a process path that can be executed by the program 111. Get the relationship.

(S12)シンボリック実行部151は、各処理パスの終点において、該当の処理パスのパス条件とパス出力とを、シンボリック実行結果121に記録する。シンボリック実行部151は、シンボリック実行結果121を解析情報記憶部120に格納する。そして、シンボリック実行が終了する。   (S12) The symbolic execution unit 151 records the path condition and path output of the corresponding processing path in the symbolic execution result 121 at the end point of each processing path. The symbolic execution unit 151 stores the symbolic execution result 121 in the analysis information storage unit 120. Then, the symbolic execution ends.

図21は、入出力表生成の処理例を示すフローチャートである。入出力表生成の処理は、図19のステップS2で実行される。
(S20)入出力表生成部152は、シンボリック実行結果121からN(Nはシンボリック実行結果121の全レコード数)個の処理パスのパス出力とパス条件との組(Out,Cnd)(n=1,・・・,N)を取得する。
FIG. 21 is a flowchart illustrating a processing example of input / output table generation. The input / output table generation process is executed in step S2 of FIG.
(S20) The input / output table generating unit 152 sets a pair of path outputs and path conditions (Out n , Cnd n ) (from N to N (where N is the total number of records in the symbolic execution result 121)). n = 1,..., N).

(S21)入出力表生成部152は、nに1を代入する(n=1)。
(S22)入出力表生成部152は、nがN以下であるか否か(n≦Nであるか否か)を判定する。nがN以下である場合、ステップS23に処理が進む。nがNよりも大きい場合、ステップS25に処理が進む。
(S21) The input / output table generation unit 152 substitutes 1 for n (n = 1).
(S22) The input / output table generator 152 determines whether n is N or less (whether n ≦ N). If n is N or less, the process proceeds to step S23. If n is greater than N, the process proceeds to step S25.

(S23)入出力表生成部152は、(Out,Cnd)を取り出し、Outの値毎にCndをOR(論理和)で結合する。
(S24)入出力表生成部152は、nに1を加算する(n=n+1)。そして、ステップS22に処理が進む。
(S23) The input / output table generation unit 152 extracts (Out n , Cnd n ), and combines Cnd n with OR (logical sum) for each value of Out n .
(S24) The input / output table generator 152 adds 1 to n (n = n + 1). Then, the process proceeds to step S22.

(S25)入出力表生成部152は、出力値毎の条件を簡約化する。図8で例示したように、入出力表生成部152は、既存の技術を用いて、条件の簡約化を行える。
(S26)入出力表生成部152は、ステップS25による簡約化後の出力値毎の条件をCNFに変形することで、入出力表122を生成する。CNFへの変形には既存の技術を利用することができる。例えば、CNFへの変形には、ドモルガンの法則、分配法則、および、Tseitin変換などを利用する方法が知られている。
(S25) The input / output table generator 152 simplifies the conditions for each output value. As illustrated in FIG. 8, the input / output table generation unit 152 can simplify the conditions using an existing technique.
(S26) The input / output table generator 152 generates the input / output table 122 by changing the condition for each output value after the reduction in step S25 to CNF. An existing technique can be used for transformation to CNF. For example, a method using Domorgan's law, distribution law, Tseitin transformation, or the like is known for transformation to CNF.

(S27)入出力表生成部152は、生成した入出力表122を出力する。入出力表生成部152は、入出力表122を解析情報記憶部120に格納する。そして、入出力表生成が終了する。   (S27) The input / output table generator 152 outputs the generated input / output table 122. The input / output table generation unit 152 stores the input / output table 122 in the analysis information storage unit 120. Then, the input / output table generation ends.

ここで、図10で例示したシンボリック実行結果121に対するステップS23の結果を具体的に説明する。シンボリック実行結果121に対してステップS23が繰り返し実行されることで、パス出力“結果=1”に対応する2つのパス条件がORで結合される。より具体的には、入出力表生成部152は、“結果=1”に対して“((20170801 < 期間) AND (コード = 11) AND (期間 < 20170831)) OR ((20170801 < 期間) AND (コード = 22) AND (期間 < 20170831))”を得る。   Here, the result of step S23 with respect to the symbolic execution result 121 illustrated in FIG. 10 will be specifically described. By repeatedly executing step S23 on the symbolic execution result 121, two path conditions corresponding to the path output “result = 1” are combined by OR. More specifically, the input / output table generating unit 152 performs “((20170801 <period)) AND (code = 11) AND (period <20170831)) OR ((20110801 <period) AND” with respect to “result = 1”. (Code = 22) AND (period <20110831)) ”.

同様に、パス出力“結果=2”に対応する4つのパス条件がORで結合される。より具体的には、入出力表生成部152は、“結果=2”に対して“((20170801 NOT < 期間) AND (コード = 11)) OR ((20170801 NOT < 期間) AND (コード = 22)) OR ((コード = 11) AND (期間 NOT < 20170831)) OR ((コード = 22) AND (期間 NOT < 20170831))”を得る。   Similarly, four path conditions corresponding to the path output “result = 2” are combined by OR. More specifically, the input / output table generation unit 152 performs “((20170801 NOT <period) AND (code = 11)) OR ((20110801 NOT <period) AND (code = 22) for“ result = 2 ”. )) OR ((code = 11) AND (period NOT <20110831)) OR ((code = 22) AND (period NOT <20110831)) ".

同様に、パス出力“結果=3”に対応する1つのパス条件がORで結合される。より具体的には、入出力表生成部152は、“結果=3”に対して“(コード NOT = 11) AND (コード NOT = 22)”を得る。   Similarly, one path condition corresponding to the path output “result = 3” is combined by OR. More specifically, the input / output table generation unit 152 obtains “(code NOT = 11) AND (code NOT = 22)” for “result = 3”.

この例の場合、出力値毎のパス条件のOR結合結果は、何れも既に簡単であるため、ステップS25において簡約化を施しても元の条件と変わらない。
上記のように、入出力表生成部152は、プログラム111のシンボリック実行の結果に基づいて、入出力表122を作成する。シンボリック実行の結果は、プログラム111による複数の出力(パス出力)それぞれについて、入力変数に関する複数の条件(パス条件)を含む。シンボリック実行結果121の例では、パス出力“結果 = 1”に対して、2つのパス条件が存在し、パス出力“結果 = 2”に対して、4つのパス条件が存在する。入出力表生成部152は、1つの出力に対する複数の条件を1つの分岐条件(入出力表122における条件)に変換する処理を、出力毎に実行することで、入出力表122を作成する。入出力表122の例では、“結果 = 1”に対する2つのパス条件が1つの条件(分岐条件)に変換されている。同様に、“結果 = 2”に対する4つのパス条件が1つの条件(分岐条件)に変換されている。“結果 = 3”については、1つのパス条件しかなかったので、そのまま入出力表122に登録されている。
In the case of this example, the OR combination results of the path conditions for each output value are already simple, so even if simplification is performed in step S25, the original conditions are not changed.
As described above, the input / output table generation unit 152 creates the input / output table 122 based on the result of the symbolic execution of the program 111. The result of symbolic execution includes a plurality of conditions (path conditions) relating to input variables for each of a plurality of outputs (path outputs) by the program 111. In the example of the symbolic execution result 121, there are two path conditions for the path output “result = 1”, and there are four path conditions for the path output “result = 2”. The input / output table generating unit 152 creates the input / output table 122 by executing, for each output, processing for converting a plurality of conditions for one output into one branch condition (condition in the input / output table 122). In the example of the input / output table 122, two path conditions for “result = 1” are converted into one condition (branch condition). Similarly, four path conditions for “result = 2” are converted into one condition (branch condition). Since “result = 3” has only one path condition, it is registered in the input / output table 122 as it is.

図22は、業務条件候補生成の処理例を示すフローチャートである。業務条件候補生成の処理は、図19のステップS3で実行される。
(S30)業務条件候補生成部153は、入出力表122から出力と条件との組(Out,Cnd)(n=1,・・・,N)を取得する(Nは入出力表122の全レコード数)。
FIG. 22 is a flowchart illustrating a processing example for generating business condition candidates. The business condition candidate generation process is executed in step S3 of FIG.
(S30) The business condition candidate generation unit 153 obtains a set of outputs and conditions (Out n , Cnd n ) (n = 1,..., N) from the input / output table 122 (N is the input / output table 122). Total number of records).

(S31)業務条件候補生成部153は、nに1を代入する(n=1)。
(S32)業務条件候補生成部153は、nがN以下であるか否か(n≦Nであるか否か)を判定する。nがN以下である場合、ステップS33に処理が進む。nがNよりも大きい場合、ステップS41に処理が進む。
(S31) The business condition candidate generation unit 153 substitutes 1 for n (n = 1).
(S32) The business condition candidate generation unit 153 determines whether n is N or less (whether n ≦ N). If n is N or less, the process proceeds to step S33. If n is greater than N, the process proceeds to step S41.

(S33)業務条件候補生成部153は、入出力表122におけるCNFで表された条件の選言節の組み合わせを連言した条件(候補条件)を生成する。入出力表122に対する具体例を後述する。   (S33) The business condition candidate generation unit 153 generates a condition (candidate condition) in which a combination of disjunction clauses of the condition represented by CNF in the input / output table 122 is linked. A specific example for the input / output table 122 will be described later.

(S34)業務条件候補生成部153は、nに対して生成した未処理の候補条件を1つ選択する。
(S35)業務条件候補生成部153は、業務条件候補リスト(すなわち、中間データ122a)に、ステップS34で選択した候補条件が存在しないか否かを判定する。存在しない場合、ステップS36に処理が進む。存在する場合、ステップS39に処理が進む。
(S34) The business condition candidate generation unit 153 selects one unprocessed candidate condition generated for n.
(S35) The business condition candidate generation unit 153 determines whether the candidate condition selected in step S34 does not exist in the business condition candidate list (that is, the intermediate data 122a). If not, the process proceeds to step S36. If it exists, the process proceeds to step S39.

(S36)業務条件候補生成部153は、業務条件候補リスト(中間データ122a)に、ステップS34で選択した候補条件を追加する。
(S37)業務条件候補生成部153は、ステップS36で追加した候補条件が、既存の候補条件の否定であるか否かを判定する。追加した候補条件が、既存の候補条件の否定である場合、ステップS38に処理が進む。追加した候補条件が、既存の候補条件の否定でない場合、ステップS39に処理が進む。
(S36) The business condition candidate generation unit 153 adds the candidate condition selected in step S34 to the business condition candidate list (intermediate data 122a).
(S37) The business condition candidate generation unit 153 determines whether the candidate condition added in step S36 is a negative of the existing candidate condition. When the added candidate condition is negative of the existing candidate condition, the process proceeds to step S38. If the added candidate condition is not a negative of the existing candidate condition, the process proceeds to step S39.

(S38)業務条件候補生成部153は、ステップS36で追加した候補条件と当該候補条件と否定関係にある他の候補条件に関して、否定関係を記録する。すなわち、業務条件候補生成部153は、業務条件候補リスト(中間データ122a)において、今回追加した候補条件に対して他の候補条件の識別情報を設定し、また、他の候補条件に対して今回追加した候補条件の識別情報を設定する。   (S38) The business condition candidate generation unit 153 records a negative relationship regarding the candidate condition added in step S36 and other candidate conditions that are negatively related to the candidate condition. In other words, the business condition candidate generation unit 153 sets identification information of other candidate conditions for the candidate condition added this time in the business condition candidate list (intermediate data 122a), and also sets the current condition for other candidate conditions. Set the identification information of the added candidate condition.

(S39)業務条件候補生成部153は、nに対してステップS33で生成した候補条件を全て処理済であるか否かを判定する。全て処理済である場合、ステップS40に処理が進む。全て処理済でない場合、ステップS34に処理が進む。   (S39) The business condition candidate generation unit 153 determines whether all the candidate conditions generated in step S33 have been processed for n. If all have been processed, the process proceeds to step S40. If all have not been processed, the process proceeds to step S34.

(S40)業務条件候補生成部153は、nに1を加算する(n=n+1)。そして、ステップS32に処理が進む。
(S41)業務条件候補生成部153は、業務条件候補リスト(中間データ122a)を参照して、否定関係のある2つの候補条件のうち、否定演算子の少ない方に正条件を示す識別子を設定する。
(S40) The business condition candidate generation unit 153 adds 1 to n (n = n + 1). Then, the process proceeds to step S32.
(S41) The business condition candidate generation unit 153 refers to the business condition candidate list (intermediate data 122a), and sets an identifier indicating the positive condition to the lesser of the negative operators, out of two candidate conditions having a negative relationship. To do.

(S42)業務条件候補生成部153は、業務条件候補リスト(中間データ122a)における候補条件をソートして業務条件候補表123とし、業務条件候補表123を出力する。業務条件候補生成部153は、業務条件候補表123を解析情報記憶部120に格納する。業務条件候補生成部153は、候補条件のソートを所定の規則によって行う。例えば、業務条件候補生成部153は、候補条件に含まれる条件の長い順、および、否定条件の少ない順にソートする。そして、業務条件候補生成が終了する。   (S42) The business condition candidate generation unit 153 sorts the candidate conditions in the business condition candidate list (intermediate data 122a) into the business condition candidate table 123, and outputs the business condition candidate table 123. The business condition candidate generation unit 153 stores the business condition candidate table 123 in the analysis information storage unit 120. The business condition candidate generation unit 153 sorts the candidate conditions according to a predetermined rule. For example, the business condition candidate generation unit 153 sorts in order from the longest condition included in the candidate condition to the smallest negative condition. Then, the business condition candidate generation ends.

ここで、図11で例示した入出力表122に対するステップS33〜S39の結果を具体的に説明する。入出力表122に対してステップS33が実行されることで、出力“結果=1”に対して次の候補条件が生成される。出力“結果=1”に関するCNFの選言節の集合は、{((コード = 11) OR (コード = 22)),(20170801 < 期間),(期間 < 20170831)}である。これらCNFの選言節の組み合わせ(連言による組み合わせ)で生成される候補条件は、次の5つである。   Here, the results of steps S33 to S39 for the input / output table 122 illustrated in FIG. 11 will be specifically described. By executing step S33 for the input / output table 122, the next candidate condition is generated for the output “result = 1”. The set of CNF disjunctive clauses for the output “result = 1” is {((code = 11) OR (code = 22)), (20110801 <period), (period <20110831)}. There are the following five candidate conditions generated by combinations of these CNF disjunctive clauses (combinations by conjunction).

(条件1)((コード = 11) OR (コード = 22)) AND (20170801 < 期間) AND (期間 < 20170831)
(条件2)((コード = 11) OR (コード = 22)) AND (20170801 < 期間)
(条件3)((コード = 11) OR (コード = 22)) AND (期間 < 20170831)
(条件4)((20170801 < 期間) AND (期間 < 20170831))
(条件5)((コード = 11) OR (コード = 22))
ステップS36で上記の条件1〜5は、既存の条件ではないので、中間データ122aに追加される。また、ステップS38で条件1〜5は、既存の否定ではないので、出力“結果=1”の条件の処理は終了する。
(Condition 1) ((Code = 11) OR (Code = 22)) AND (20110801 <period) AND (period <20110831)
(Condition 2) ((Code = 11) OR (Code = 22)) AND (20110801 <Period)
(Condition 3) ((Code = 11) OR (Code = 22)) AND (Period <20110831)
(Condition 4) ((20110801 <period) AND (period <20110831))
(Condition 5) ((Code = 11) OR (Code = 22))
In step S36, since the above conditions 1 to 5 are not existing conditions, they are added to the intermediate data 122a. In addition, since the conditions 1 to 5 are not existing negations in step S38, the processing of the condition of the output “result = 1” ends.

また、入出力表122によれば、出力“結果=2”に関するCNFの選言節の集合は、{((コード = 11) OR (コード = 22))、((20170801 NOT < 期間) OR (期間 NOT < 20170831))}である。これらCNFの選言節の組み合わせで生成される候補条件は、次の3つである。   Also, according to the input / output table 122, the set of CNF disjunctive clauses for the output “result = 2” is {((code = 11) OR (code = 22)), ((20110801 NOT <period) OR ( Period NOT <20110831))}. There are the following three candidate conditions generated by a combination of these CNF disjunctive clauses.

(条件6)((コード = 11) OR (コード = 22)) AND (20170801 NOT < 期間) OR (期間 NOT < 20170831)
(条件7)((20170801 NOT < 期間) OR (期間 NOT < 20170831))
(条件X)((コード = 11) OR (コード = 22))
ステップS36で条件6,7は既存の条件ではないので、中間データ122aに追加される。しかし、条件Xは、既存(条件5に一致)なので、中間データ122aに追加されない。また、ステップS38で、条件7は条件4の否定なので、互いに否定関係にあることを示す識別情報(相手の条件の識別情報)を、中間データ122aに設定する。そして、出力“結果=2”の条件の処理は終了する。
(Condition 6) ((Code = 11) OR (Code = 22)) AND (20110801 NOT <Period) OR (Period NOT <20110831)
(Condition 7) ((20110801 NOT <period) OR (period NOT <20110831))
(Condition X) ((Code = 11) OR (Code = 22))
In Step S36, the conditions 6 and 7 are not existing conditions and are added to the intermediate data 122a. However, since the condition X is existing (matches the condition 5), it is not added to the intermediate data 122a. In step S38, since condition 7 is negative of condition 4, identification information (identification information of the other party's condition) indicating that there is a negative relationship with each other is set in intermediate data 122a. Then, the processing for the condition of output “result = 2” ends.

更に、入出力表122によれば、出力“結果=3”に関する条件は、{((コード NOT = 11) AND (コード NOT = 22))}の1つのみである。したがって、ステップS33で生成される候補条件は、次の1つである。   Furthermore, according to the input / output table 122, the condition relating to the output “result = 3” is only one of {((code NOT = 11) AND (code NOT = 22))}. Accordingly, the candidate condition generated in step S33 is one of the following.

(条件8)((コード NOT = 11) AND (コード NOT = 22))
ステップS36で条件8は既存の条件ではないので、中間データ122aに追加される。また、ステップS38で、条件8は条件5の否定なので、互いに否定関係にあることを示す識別情報(相手の条件の識別情報)を、中間データ122aに設定する。そして、出力“結果=3”の条件の処理は終了する。
(Condition 8) ((Code NOT = 11) AND (Code NOT = 22))
In step S36, condition 8 is not an existing condition and is added to the intermediate data 122a. In step S38, since condition 8 is negative of condition 5, identification information (identification information of the other party's condition) indicating that they are in a negative relationship with each other is set in intermediate data 122a. Then, the processing for the condition of output “result = 3” ends.

なお、以上により入出力表122における全ての出力の条件を処理したので、業務条件候補生成部153は、ステップS41を実行する。そして、業務条件候補生成部153は、条件4と条件7とを比較して条件4に正条件を示す識別子を設定し、条件5と条件8とを比較して条件5に正条件を示す識別子を設定する。そして、業務条件候補生成部153は、ステップS42により中間データ122aをソートすることで、業務条件候補表123を得る。   Since all the output conditions in the input / output table 122 have been processed as described above, the business condition candidate generation unit 153 executes step S41. Then, the business condition candidate generation unit 153 compares the condition 4 with the condition 7, sets an identifier indicating the correct condition in the condition 4, compares the condition 5 with the condition 8, and indicates an identifier indicating the correct condition in the condition 5. Set. Then, the business condition candidate generating unit 153 obtains the business condition candidate table 123 by sorting the intermediate data 122a in step S42.

図23は、業務条件選定の処理例を示すフローチャートである。業務条件選定の処理は、図19のステップS4で実行される。
(S50)業務条件選定部154は、入出力表122の出力と条件との組(Out,Cnd)(m=1,・・・,M)を取得する(Mは入出力表122の全レコード数)。mは、入出力表122の項番に相当する。
FIG. 23 is a flowchart illustrating an example of processing for selecting business conditions. The business condition selection process is executed in step S4 of FIG.
(S50) The business condition selection unit 154 acquires a set (Out m , Cnd m ) (m = 1,..., M) of the output and condition of the input / output table 122 (M is the input / output table 122). Total number of records). m corresponds to the item number in the input / output table 122.

(S51)業務条件選定部154は、業務条件候補表123の条件BzCnd、n=1,・・・,N(Nは業務条件候補表123の全レコード数)を取得する。nは、業務条件候補表123の項番に相当する。業務条件選定部154は、業務条件候補表123に基づいて、中間データ123aを生成する(この段階では、業務条件候補表123の各項番のレコードに対応する項番の値のみが設定されたレコードが中間データ123aに登録される)。 (S51) The business condition selection unit 154 acquires conditions BzCnd n , n = 1,..., N (N is the total number of records in the business condition candidate table 123) in the business condition candidate table 123. n corresponds to an item number in the business condition candidate table 123. The business condition selection unit 154 generates intermediate data 123a based on the business condition candidate table 123 (at this stage, only the item number values corresponding to the record of each item number in the business condition candidate table 123 are set. A record is registered in the intermediate data 123a).

(S52)業務条件選定部154は、nに1を代入する(n=1)。
(S53)業務条件選定部154は、nがN以下であるか否か(n≦Nであるか否か)を判定する。nがN以下である場合、ステップS54に処理が進む。nがNよりも大きい場合、ステップS65に処理が進む。
(S52) The business condition selection unit 154 substitutes 1 for n (n = 1).
(S53) The business condition selection unit 154 determines whether n is N or less (whether n ≦ N). If n is N or less, the process proceeds to step S54. If n is larger than N, the process proceeds to step S65.

(S54)業務条件選定部154は、BzCndが処理済でないか否かを判定する。処理済でない場合、ステップS55に処理が進む。処理済の場合、ステップS58に処理が進む。 (S54) The business condition selection unit 154 determines whether BzCnd n has been processed. If not, the process proceeds to step S55. If it has been processed, the process proceeds to step S58.

(S55)業務条件選定部154は、業務条件候補表123に基づいて、BzCndに否定関係があるか否かを判定する。否定関係がある場合、ステップS56に処理が進む。否定関係がない場合、ステップS58に処理が進む。否定関係がない場合、業務条件選定部154は、中間データ123aの項番nのレコードの業務条件判定の項目に“false”を設定する(当該レコードは処理済となる)。 (S55) The business condition selection unit 154 determines whether BzCnd n has a negative relationship based on the business condition candidate table 123. If there is a negative relationship, the process proceeds to step S56. If there is no negative relationship, the process proceeds to step S58. If there is no negative relationship, the business condition selection unit 154 sets “false” in the business condition determination item of the record of item number n in the intermediate data 123a (the record is processed).

(S56)業務条件選定部154は、業務条件候補表123に基づいて、BzCndが正条件であるか否かを判定する。正条件である場合、ステップS59に処理が進む。正条件でない場合、ステップS57に処理が進む。 (S56) Based on the business condition candidate table 123, the business condition selection unit 154 determines whether BzCnd n is a positive condition. If so, the process proceeds to step S59. If not, the process proceeds to step S57.

(S57)業務条件選定部154は、BzCndを処理済に設定する。そして、ステップS58に処理が進む。
(S58)業務条件選定部154は、nに1を加算する(n=n+1)。そして、ステップS53に処理が進む。
(S57) The business condition selection unit 154 sets BzCnd n as processed. Then, the process proceeds to step S58.
(S58) The business condition selection unit 154 adds 1 to n (n = n + 1). Then, the process proceeds to step S53.

(S59)業務条件選定部154は、BzCndを業務条件に選定する。業務条件選定部154は、中間データ123aの項番nのレコードの業務条件判定の項目に“true”を設定する(当該レコードは処理済となる)。 (S59) The business condition selection unit 154 selects BzCnd n as the business condition. The business condition selection unit 154 sets “true” in the business condition determination item of the record of item number n of the intermediate data 123a (the record is already processed).

(S60)業務条件選定部154は、mに1を代入する(m=1)。
(S61)業務条件選定部154は、mがM以下であるか否か(m≦Mであるか否か)を判定する。mがM以下である場合、ステップS62に処理が進む。mがMよりも大きい場合、ステップS58に処理が進む。
(S60) The business condition selection unit 154 substitutes 1 for m (m = 1).
(S61) The business condition selection unit 154 determines whether m is M or less (whether m ≦ M). If m is M or less, the process proceeds to step S62. If m is greater than M, the process proceeds to step S58.

(S62)業務条件選定部154は、BzCndまたはBzCndの否定がCndに存在するか否かを判定する。BzCndまたはBzCndの否定がCndに存在する場合、ステップS63に処理が進む。BzCndまたはBzCndの否定がCndに存在しない場合、ステップS64に処理が進む。 (S62) The business condition selection unit 154 determines whether the negation of BzCnd n or BzCnd n exists in Cnd m . When the negation of BzCnd n or BzCnd n exists in Cnd m , the process proceeds to step S63. If the negation of BzCnd n or BzCnd n does not exist in Cnd m , the process proceeds to step S64.

(S63)業務条件選定部154は、BzCndまたはBzCndの否定のCndにおける出現場所を記録する。具体的には、業務条件選定部154は、BzCndのCndにおける出現場所(入出力表122におけるレコードの項番mやCndのうちBzCndに一致する箇所を示す情報)を中間データ123aの項番nのレコードに登録する。あるいは、業務条件選定部154は、BzCndの否定のCndにおける出現場所(入出力表122におけるレコードの項番mやCndのうちBzCndに一致する箇所を示す情報)を中間データ123aの項番nのレコードに登録する。 (S63) The business condition selection unit 154 records the appearance location of BzCnd n or BzCnd n in negative Cnd m . Specifically, the business condition selection unit 154 uses BzCnd n as the intermediate data 123a for the appearance location of Cz m in Cnd m (information indicating the item number m or Cnd m of the record in the input / output table 122 that matches BzCnd n ). Is registered in the record of item number n. Alternatively, the business condition selection unit 154 may change the appearance location of BzCnd n in the negative Cnd m (information indicating the position of the record item number m or Cnd m in the input / output table 122 that matches BzCnd n ) of the intermediate data 123a. Register in the record of item number n.

(S64)業務条件選定部154は、mに1を加算する(m=m+1)。そして、ステップS61に処理が進む。
(S65)業務条件選定部154は、中間データ123aに基づいて、業務条件選定結果124を生成し、出力する。業務条件選定部154は、業務条件選定結果124を解析情報記憶部120に格納する。そして、業務条件選定が終了する。
(S64) The business condition selection unit 154 adds 1 to m (m = m + 1). Then, the process proceeds to step S61.
(S65) The business condition selection unit 154 generates and outputs a business condition selection result 124 based on the intermediate data 123a. The business condition selection unit 154 stores the business condition selection result 124 in the analysis information storage unit 120. And business condition selection is complete | finished.

ここで、ステップS62の判定およびステップS63における「出現場所の記録」では、業務条件選定部154は、それぞれの条件を木構造で表現し、業務条件BzCndの木構造がCndの木構造の一部にあるかを調査する。また、否定条件の存在の確認では、業務条件選定部154は、BzCndの否定条件をドモルガンの法則に基づいて生成し、当該否定条件を木構造で表現することで、上記と同様に出現場所を判定する。 Here, in the determination in step S62 and the “record of appearance location” in step S63, the business condition selection unit 154 expresses each condition in a tree structure, and the tree structure of the business condition BzCnd n is a tree structure of Cnd m . Investigate whether it is part of it. In addition, in the confirmation of the existence of the negative condition, the business condition selection unit 154 generates a negative condition of BzCnd n based on Domorgan's law and expresses the negative condition in a tree structure, so Determine.

図24は、業務用語表出力の処理例を示すフローチャートである。業務用語表出力の処理は、図19のステップS5で実行される。
(S70)業務条件命名部155は、業務条件BzCnd、n=1,・・・,Nを業務条件選定結果124から取得する。ここで、Nは業務条件選定結果124の全レコード数である。
FIG. 24 is a flowchart illustrating an example of a business term table output process. The business term table output process is executed in step S5 of FIG.
(S70) The business condition naming unit 155 acquires the business condition BzCnd n , n = 1,..., N from the business condition selection result 124. Here, N is the total number of records in the business condition selection result 124.

(S71)業務条件命名部155は、命名ルール記憶部130から命名ルール表131を取得する。
(S72)業務条件命名部155は、nに1を代入する(n=1)。
(S71) The business condition naming unit 155 acquires the naming rule table 131 from the naming rule storage unit 130.
(S72) The business condition naming unit 155 substitutes 1 for n (n = 1).

(S73)業務条件命名部155は、nがN以下であるか否か(n≦Nであるか否か)を判定する。nがN以下である場合、ステップS74に処理が進む。nがNよりも大きい場合、ステップS77に処理が進む。   (S73) The business condition naming unit 155 determines whether n is N or less (whether n ≦ N). If n is N or less, the process proceeds to step S74. If n is larger than N, the process proceeds to step S77.

(S74)業務条件命名部155は、BzCndの書式が、命名ルール表131における何れかの命名ルールで示される書式に合致するか否かを判定する。BzCndの書式が命名ルールで示される何れかの書式に合致する場合、ステップS75に処理が進む。BzCndの書式が命名ルールで示される何れの書式にも合致しない場合、ステップS76に処理が進む。 (S74) The business condition naming unit 155 determines whether the format of BzCnd n matches the format indicated by any naming rule in the naming rule table 131. If the format of BzCnd n matches any format indicated by the naming rule, the process proceeds to step S75. If the format of BzCnd n does not match any format indicated by the naming rule, the process proceeds to step S76.

(S75)業務条件命名部155は、命名ルールに従って、業務条件を命名する。業務条件と当該業務条件に対して命名した業務用語とを業務用語表141に登録する。
(S76)業務条件命名部155は、nに1を加算する(n=n+1)。そして、ステップS73に処理が進む。
(S75) The business condition naming unit 155 names business conditions according to a naming rule. The business conditions and business terms named for the business conditions are registered in the business term table 141.
(S76) The business condition naming unit 155 adds 1 to n (n = n + 1). Then, the process proceeds to step S73.

(S77)業務条件命名部155は、ディスプレイ21に業務用語表141の内容を表示させる。
(S78)業務条件命名部155は、業務用語を編集するか否かを判定する。業務用語を編集する場合、ステップS79に処理が進む。業務用語を編集しない場合、ステップS80に処理が進む。例えば、ユーザは、ディスプレイ21に表示された業務用語表141の業務用語と業務条件とを参照して、業務条件命名部155により命名された業務用語を編集するか否かを決定することができる。業務条件命名部155は、ユーザによる業務用語の編集指示の入力を受け付けると、業務用語を編集すると判定する。一方、業務条件命名部155は、ユーザによる業務用語の編集を行わない旨の入力を受け付けると、業務用語を編集しないと判定する。
(S77) The business condition naming unit 155 displays the contents of the business term table 141 on the display 21.
(S78) The business condition naming unit 155 determines whether to edit a business term. When editing business terms, the process proceeds to step S79. If the business term is not edited, the process proceeds to step S80. For example, the user can determine whether or not to edit the business terms named by the business condition naming unit 155 with reference to the business terms and business conditions in the business term table 141 displayed on the display 21. . When the business condition naming unit 155 receives an input of a business term editing instruction from the user, the business condition naming unit 155 determines to edit the business term. On the other hand, when the business condition naming unit 155 receives an input indicating that the business term is not edited by the user, the business condition naming unit 155 determines that the business term is not edited.

(S79)業務条件命名部155は、ユーザによる業務用語の編集を受け付け、編集内容に応じて、業務用語表141に登録された業務用語を更新する。
(S80)業務条件命名部155は、業務用語表141を出力する。業務条件命名部155は、業務用語表141を解析結果記憶部140に格納する。そして、業務用語表出力が終了する。
(S79) The business condition naming unit 155 accepts editing of business terms by the user, and updates the business terms registered in the business term table 141 according to the editing content.
(S80) The business condition naming unit 155 outputs the business term table 141. The business condition naming unit 155 stores the business term table 141 in the analysis result storage unit 140. Then, the business term table output ends.

ここで、図21で示されるように、入出力表122における条件(分岐条件)は、CNF(乗法標準形)で表される。入出力表122における各条件は、図22の説明で述べたように、プログラム111の条件文または当該条件文の否定に対応する複数の選言節を含む。業務用語の定義では、まず、業務条件候補生成部153により、業務条件候補表123が生成される。すなわち、業務条件候補生成部153は、入出力表122の条件(分岐条件)に含まれる複数の選言節それぞれを組み合わせることで、条件文の組み合わせの複数の候補(業務条件候補)を生成する。そして、業務条件選定部154は、図23の手順により、当該複数の業務条件候補の中から業務用語の定義対象(すなわち、業務条件)を選択する。   Here, as shown in FIG. 21, the condition (branch condition) in the input / output table 122 is represented by CNF (multiplicative standard form). Each condition in the input / output table 122 includes a plurality of disjunct clauses corresponding to the conditional sentence of the program 111 or the negation of the conditional sentence, as described in the explanation of FIG. In the definition of business terms, first, the business condition candidate generation unit 153 generates a business condition candidate table 123. That is, the business condition candidate generation unit 153 generates a plurality of candidates for the combination of conditional sentences (business condition candidates) by combining each of the plurality of disjunctive clauses included in the conditions (branch conditions) of the input / output table 122. . Then, the business condition selection unit 154 selects a business term definition target (that is, a business condition) from the plurality of business condition candidates according to the procedure of FIG.

具体的には、業務条件選定部154は、複数の業務条件候補のうちの第1の候補に対する否定の条件が当該複数の業務条件候補に含まれるか否かの判定に応じて、第1の候補に対応する条件文の組み合わせを業務用語の定義対象とするか否かを決定する。   Specifically, the business condition selection unit 154 determines whether the negative condition for the first candidate among the plurality of business condition candidates is included in the plurality of business condition candidates. It is determined whether a combination of conditional statements corresponding to candidates is to be defined as a business term.

更に、業務条件選定部154は、第1の候補に対する否定を示す第2の候補が複数の候補に含まれる場合に、第1の候補が正条件であるか否かの判定に応じて、第1の候補に対応する条件文の組み合わせを業務用語の定義対象とするか否かを決定する。   Furthermore, when the second candidate indicating negative to the first candidate is included in the plurality of candidates, the business condition selecting unit 154 determines whether the first candidate is a positive condition or not. It is determined whether or not a combination of conditional sentences corresponding to one candidate is to be defined as a business term.

第1の候補に対する否定条件が業務条件候補表123に存在するか否かを判定する理由は、プログラム111のパスに影響を与える複合条件を適切に抽出するためである。
業務条件命名部155は、こうして決定された業務用語の定義対象(すなわち、業務条件)に対して、図24の手順により、業務用語の命名を行う。これにより、業務条件を適切に選択して、業務条件に対する業務用語の命名を行える。
The reason for determining whether or not a negative condition for the first candidate exists in the business condition candidate table 123 is to appropriately extract a composite condition that affects the path of the program 111.
The business condition naming unit 155 names business terms according to the procedure of FIG. 24 for the business term definition target (that is, business conditions) determined in this way. Thereby, business terms can be appropriately selected and business terms can be named for the business conditions.

図25は、業務ルール表出力の処理例を示すフローチャートである。業務ルール表出力の処理は、図19のステップS6で実行される。
(S90)入出力表書換部156は、業務条件BzCnd、n=1,・・・,Nを業務条件選定結果124から取得する。ここで、Nは業務条件選定結果124の全レコード数である。
FIG. 25 is a flowchart illustrating a processing example of a business rule table output. The business rule table output process is executed in step S6 of FIG.
(S90) The input / output table rewriting unit 156 acquires the business condition BzCnd n , n = 1,..., N from the business condition selection result 124. Here, N is the total number of records in the business condition selection result 124.

(S91)入出力表書換部156は、nに1を代入する(n=1)。
(S92)入出力表書換部156は、nがN以下であるか否か(n≦Nであるか否か)を判定する。nがN以下である場合、ステップS93に処理が進む。nがNよりも大きい場合、ステップS96に処理が進む。
(S91) The input / output table rewriting unit 156 substitutes 1 for n (n = 1).
(S92) The input / output table rewriting unit 156 determines whether n is N or less (whether n ≦ N). If n is N or less, the process proceeds to step S93. If n is greater than N, the process proceeds to step S96.

(S93)入出力表書換部156は、入出力表122におけるBzCndの正条件の出現場所を業務用語表141に基づいて、業務用語を用いた記述に置換する。
(S94)入出力表書換部156は、入出力表122におけるBzCndの否定条件の出現場所を業務用語表141に基づいて、業務用語を用いた記述に置換する。
(S93) The input / output table rewriting unit 156 replaces the occurrence location of the positive condition of BzCnd n in the input / output table 122 with a description using business terms based on the business term table 141.
(S94) The input / output table rewriting unit 156 replaces the appearance location of the negative condition of BzCnd n in the input / output table 122 with a description using business terms based on the business term table 141.

(S95)入出力表書換部156は、nに1を加算する(n=n+1)。そして、ステップS92に処理が進む。
(S96)入出力表書換部156は、書換後(置換後)の入出力表の形式を変更するか否かを判定する。形式を変更する場合、ステップS97に処理が進む。形式を変更しない場合、ステップS98に処理が進む。
(S95) The input / output table rewriting unit 156 adds 1 to n (n = n + 1). Then, the process proceeds to step S92.
(S96) The input / output table rewriting unit 156 determines whether to change the format of the input / output table after rewriting (after replacement). When the format is changed, the process proceeds to step S97. If the format is not changed, the process proceeds to step S98.

(S97)入出力表書換部156は、書換後の入出力表の形式を決定表の形式に変更する。
(S98)入出力表書換部156は、書換後の入出力表を業務ルール表142(ステップS97で決定表に変更した場合は業務ルール表143)として出力する。入出力表書換部156は、業務ルール表142(または、業務ルール表143)を解析結果記憶部140に格納する。そして、業務ルール表出力が終了する。
(S97) The input / output table rewriting unit 156 changes the format of the input / output table after rewriting to the format of the decision table.
(S98) The input / output table rewriting unit 156 outputs the rewritten input / output table as the business rule table 142 (the business rule table 143 when changed to the decision table in step S97). The input / output table rewriting unit 156 stores the business rule table 142 (or the business rule table 143) in the analysis result storage unit 140. Then, the business rule table output ends.

このように、入出力表書換部156は、入出力表122における条件(分岐条件)の中での条件文の組み合わせ(業務条件に相当)の出現場所を検索する。そして、入出力表書換部156は、入出力表122の当該出現場所の記述を当該条件文の組み合わせ(業務条件)に対応する業務用語に置換することで、業務ルール表142,143を生成する。   In this way, the input / output table rewriting unit 156 searches for the appearance location of a combination of conditional statements (corresponding to business conditions) in the conditions (branch conditions) in the input / output table 122. Then, the input / output table rewriting unit 156 generates the business rule tables 142 and 143 by replacing the description of the appearance location of the input / output table 122 with business terms corresponding to the combination of the conditional statements (business conditions). .

図26は、解析サーバの入出力の例を示す図である。第2の実施の形態で説明したように、解析サーバ100は、プログラム111の入力に対して、プログラム111の解析を行い、業務用語表141および業務ルール表143(または、業務ルール表142)を出力する。   FIG. 26 is a diagram illustrating an example of input / output of the analysis server. As described in the second embodiment, the analysis server 100 analyzes the program 111 with respect to the input of the program 111 and obtains the business term table 141 and the business rule table 143 (or the business rule table 142). Output.

ここで、プログラム111は、図9で例示したように、図6のプログラムD14に対して、定数C2の定義や、定数C2を用いた処理の記述が含まれている。こうしたプログラムD14の部分改修が行われると、プログラムD14に対応する業務ルールD11および業務用語D12の内容と、改修後のプログラム111の内容とが整合しなくなる。例えば、業務用語D12には、定数C2(=22)に関連する有効コードの定義がないし、そのため、業務ルールD11の有効コードの条件も、定数C2(=22)が考慮されていない。すなわち、既存の業務ルールD11および業務用語D12と、改修後のプログラム111との間に齟齬がある。   Here, as illustrated in FIG. 9, the program 111 includes a definition of the constant C2 and a description of processing using the constant C2 with respect to the program D14 of FIG. When such partial modification of the program D14 is performed, the contents of the business rules D11 and business terms D12 corresponding to the program D14 and the contents of the modified program 111 become inconsistent. For example, the business term D12 has no definition of a valid code related to the constant C2 (= 22), and therefore the constant C2 (= 22) is not considered in the condition of the valid code of the business rule D11. That is, there is a flaw between the existing business rules D11 and business terms D12 and the modified program 111.

そこで、解析サーバ100は、プログラム111を入力として、プログラム111に対応する業務用語表141および業務ルール表143(または、業務ルール表142)を出力する。業務用語表141の例では、部分改修により追加された定数C2(=22)に関連づけて有効コードが定義されており、そのため、業務ルール表143の有効コードに対する条件も、定数C2(=22)が考慮された内容となる。したがって、業務用語表141および業務ルール表143と、プログラム111の内容とは整合しており、齟齬がない。このように、解析サーバ100は、修正後のプログラム111に対し、業務用語表141および業務ルール表143(または、業務ルール表142)を適切に作成できる。   Therefore, the analysis server 100 receives the program 111 and outputs a business term table 141 and a business rule table 143 (or business rule table 142) corresponding to the program 111. In the example of the business term table 141, the valid code is defined in association with the constant C2 (= 22) added by the partial modification. Therefore, the condition for the valid code in the business rule table 143 is also the constant C2 (= 22). Is considered. Therefore, the business term table 141 and the business rule table 143 are consistent with the contents of the program 111, and there is no flaw. In this way, the analysis server 100 can appropriately create the business term table 141 and the business rule table 143 (or the business rule table 142) for the modified program 111.

図27は、解析対象のプログラムの他の例を示す図である。プログラム112は、図6のプログラムD14が部分改修されて得られた部分改修後のプログラムである。図27では、次の2回の機能追加があった場合を例示する。   FIG. 27 is a diagram illustrating another example of a program to be analyzed. The program 112 is a program after partial modification obtained by partial modification of the program D14 of FIG. FIG. 27 exemplifies a case where the following two function additions have been made.

(追加1)有効コードに“22”を追加して、有効コードを“11”または“22”とする。
(追加2)有効コードに“33”を追加して、有効コードを“11”または“22”または“33”とする。
(Addition 1) “22” is added to the valid code, and the valid code is set to “11” or “22”.
(Addition 2) “33” is added to the valid code, and the valid code is set to “11”, “22”, or “33”.

これらの機能追加に対応するため、主に、次の2回の部分改修がプログラムD14に対して行われたとする。
(改修1)改修後のプログラム112の18行目のIF文条件において、元々は“コード=C1”であった条件に、“コード=C2”を追加して、“(コード=C1)OR(コード=C2)”とする。ここで、C2は、定数であり、プログラム112の12行目に定義が追加される。
Assume that the following two partial modifications are mainly made to the program D14 in order to cope with these function additions.
(Modification 1) In the IF statement condition on the 18th line of the program 112 after the modification, “code = C2” is added to the condition where “code = C1” originally, and “(code = C1) OR ( Code = C2) ”. Here, C2 is a constant, and a definition is added to the 12th line of the program 112.

(改修2)改修後のプログラム112の24行目〜29行目において、ELSE IFブロックを追加する。ここで、C3は、定数であり、プログラム112の13行目に定義が追加される。   (Renovation 2) The ELSE IF block is added to the 24th to 29th lines of the program 112 after the renovation. Here, C3 is a constant, and a definition is added to the 13th line of the program 112.

また、プログラム112の例では、図6のプログラムD14の17,18行目の記述が、プログラム112の19行目の記述にまとめられる改修も行われている。
図27で例示されるように、プログラムD14に対して複数回の改修が行われることもあり、改修の方法も唯一ではない。例えば、改修2は、ELSE IFブロックを追加する代わりに、改修1のようにIF文の条件を改修する方法でも対応可能である。しかしながら、長年の保守の間に、当該プログラムD14の担当プログラマが交代している場合などもあり、様々な記述方法で改修が行われ得る。
Further, in the example of the program 112, the description in the 17th and 18th lines of the program D14 in FIG.
As illustrated in FIG. 27, the program D14 may be modified a plurality of times, and the modification method is not unique. For example, the modification 2 can be dealt with by a method of modifying the condition of the IF sentence like the modification 1 instead of adding the ELSE IF block. However, the programmer in charge of the program D14 may be changed during many years of maintenance, and the modification can be performed by various description methods.

図28は、解析サーバの入出力の他の例を示す図である。解析サーバ100は、プログラム112の入力に対して、プログラム112の解析を行い、業務用語表141aおよび業務ルール表143aを出力する。ただし、解析サーバ100は、業務ルール表143aを決定表形式に変更した業務ルール表を出力することもできる。   FIG. 28 is a diagram illustrating another example of input / output of the analysis server. The analysis server 100 analyzes the program 112 with respect to the input of the program 112, and outputs a business term table 141a and a business rule table 143a. However, the analysis server 100 can also output a business rule table in which the business rule table 143a is changed to a decision table format.

業務用語表141aによれば、部分改修により追加された定数C2(=22)および定数C3(=33)に関連づけて有効コードが定義されている。そのため、業務ルール表143aの有効コードに対する条件も、定数C2(=22)および定数C3(=33)が考慮された内容となる。したがって、業務用語表141aおよび業務ルール表143aと、プログラム112の内容とは整合しており、齟齬がない。このように、解析サーバ100は、修正後のプログラム112に対しても、業務用語表141aおよび業務ルール表143a(または、業務ルール表143aを決定表形式に変更した業務ルール表)を適切に作成できる。   According to the business term table 141a, the valid code is defined in association with the constant C2 (= 22) and the constant C3 (= 33) added by the partial modification. Therefore, the condition for the valid code in the business rule table 143a also takes into account the constant C2 (= 22) and the constant C3 (= 33). Therefore, the business term table 141a and the business rule table 143a are consistent with the contents of the program 112, and there is no flaw. As described above, the analysis server 100 appropriately creates the business term table 141a and the business rule table 143a (or the business rule table obtained by changing the business rule table 143a into the decision table format) even for the modified program 112. it can.

ところで、情報処理システムの保守や再構築の活動では、情報処理システムの現状を把握し、理解するために、当該情報処理システムが扱う業務の知識と当該情報処理システムの実装方法に関する情報(業務用語表や業務ルール表など)が利用される。このような情報は、本来、文書に記述されているものであるが、上記のように当初作成された文書が適切に更新されていないという不備があると、システム開発者は文書を信頼して参照することができない。また、当該情報処理システムの当初の開発担当者などの有識者は、長年の運用期間の間に散逸して不在となる事態も発生するため、有識者に問い合わせることも難しいことが少なくない。   By the way, in the activities of information processing system maintenance and restructuring, in order to understand and understand the current state of the information processing system, knowledge of the business handled by the information processing system and information on how to implement the information processing system (business terminology) Table and business rule table). Such information is originally described in the document, but if there is a deficiency that the originally created document has not been properly updated, the system developer must trust the document. I can't refer to it. In addition, it is often difficult for an expert such as an initial developer in charge of the information processing system to make an inquiry to an expert because it is dissipated during a long operation period.

このような文書の不備や有識者の不在などにより、保守や再構築の作業のための情報が不足する場合に、不足する情報を補うために、情報処理システムの実装実態である現状のプログラムの解析によって、当該情報の復元を試みることがある。   Analysis of the current program that is the actual state of information processing system implementation to compensate for the lack of information for maintenance and reconstruction work due to such lack of documents and the absence of experts. May attempt to restore the information.

しかし、上記のように、長年に亘る部分的な改修を経たプログラムでは業務情報が整然と記述されておらず、プログラム(例えば、プログラム111やプログラム112のように)の所々に分散した形式で記述されることがある。この場合、プログラムの記述をそのまま用いて業務情報を獲得することが難しい。また、設計文書と現状のプログラムとの間に齟齬があり、設計文書に記述された情報を利用できないことがある。   However, as described above, in a program that has undergone partial modification over many years, business information is not neatly described, and is described in a distributed form throughout the program (for example, program 111 or program 112). Sometimes. In this case, it is difficult to acquire business information using the program description as it is. In addition, there is a gap between the design document and the current program, and information described in the design document may not be used.

このように、現状のプログラムから業務情報を得ることが難しかった場合でも、解析サーバ100によれば、現状のプログラムから適切に業務知識(業務用語表や業務ルール表)を作成できる。例えば、解析サーバ100は、作成した業務用語表や業務ルール表をディスプレイ21を用いて表示し、システム開発者に提示する。システム開発者は、解析サーバ100により表示された業務用語表や業務ルール表により、情報処理システムの現状を適切に把握し、理解でき、当該情報処理システムの保守や再構築の活動を効率的に進められるようになる。こうして、解析サーバ100は、ユーザによる既存のソフトウェア資産の適切な把握を支援できる。   As described above, even when it is difficult to obtain business information from the current program, the analysis server 100 can appropriately create business knowledge (business term table or business rule table) from the current program. For example, the analysis server 100 displays the created business term table and business rule table using the display 21 and presents them to the system developer. The system developer can appropriately understand and understand the current state of the information processing system from the business term table and the business rule table displayed by the analysis server 100, and can efficiently perform maintenance and reconstruction activities of the information processing system. Be able to proceed. In this way, the analysis server 100 can support appropriate grasp of existing software assets by the user.

なお、第1の実施の形態の情報処理は、処理部12にプログラムを実行させることで実現できる。また、第2の実施の形態の情報処理は、CPU101にプログラムを実行させることで実現できる。プログラムは、コンピュータ読み取り可能な記録媒体23に記録できる。   The information processing according to the first embodiment can be realized by causing the processing unit 12 to execute a program. The information processing according to the second embodiment can be realized by causing the CPU 101 to execute a program. The program can be recorded on a computer-readable recording medium 23.

例えば、プログラムを記録した記録媒体23を配布することで、プログラムを流通させることができる。また、プログラムを他のコンピュータに格納しておき、ネットワーク経由でプログラムを配布してもよい。コンピュータは、例えば、記録媒体23に記録されたプログラムまたは他のコンピュータから受信したプログラムを、RAM102やHDD103などの記憶装置に格納し(インストールし)、当該記憶装置からプログラムを読み込んで実行してもよい。   For example, the program can be distributed by distributing the recording medium 23 on which the program is recorded. Alternatively, the program may be stored in another computer and distributed via a network. For example, the computer stores (installs) a program recorded in the recording medium 23 or a program received from another computer in a storage device such as the RAM 102 or the HDD 103, and reads and executes the program from the storage device. Good.

10 プログラム解析装置
11 記憶部
12 処理部
P1 第1のプログラム
P2 第2のプログラム
R1 定義ルール
T1 第1の業務ルール表
T2 入出力表
T3 業務用語表
T4 第2の業務ルール表
DESCRIPTION OF SYMBOLS 10 Program analyzer 11 Memory | storage part 12 Processing part P1 1st program P2 2nd program R1 Definition rule T1 1st business rule table T2 Input / output table T3 Business term table T4 2nd business rule table

Claims (9)

コンピュータが、
第1のプログラムの修正後の第2のプログラムであって、前記第1のプログラムに対応する第1の業務ルール表との齟齬が発生している前記第2のプログラムを取得し、
前記第2のプログラムにおける条件文に関する分岐条件と前記分岐条件に応じた出力とを示す入出力表を作成するとともに、業務用語の定義ルールを示す情報に基づいて、前記入出力表に含まれる前記条件文の組み合わせに対する前記業務用語を定義し、
定義された前記業務用語と前記入出力表とを用いて、前記第2のプログラムに対応する第2の業務ルール表を作成する、
プログラム解析方法。
Computer
A second program after correction of the first program, wherein the second program has a conflict with the first business rule table corresponding to the first program;
An input / output table indicating a branch condition related to a conditional statement in the second program and an output corresponding to the branch condition is created, and the information included in the input / output table is based on information indicating a definition rule for a business term. Define the business terms for the combination of conditional statements,
Creating a second business rule table corresponding to the second program using the defined business terms and the input / output table;
Program analysis method.
前記入出力表の作成では、前記第2のプログラムのシンボリック実行の結果に基づいて、前記入出力表を作成する、請求項1記載のプログラム解析方法。   The program analysis method according to claim 1, wherein the input / output table is created based on a result of symbolic execution of the second program. 前記シンボリック実行の結果は、前記第2のプログラムによる複数の出力それぞれについて、入力変数に関する複数の条件を含み、
前記入出力表の生成では、1つの出力に対する前記複数の条件を1つの前記分岐条件に変換する処理を、出力毎に実行する、
請求項2記載のプログラム解析方法。
The result of the symbolic execution includes a plurality of conditions related to input variables for each of a plurality of outputs by the second program,
In the generation of the input / output table, a process of converting the plurality of conditions for one output into one branch condition is executed for each output.
The program analysis method according to claim 2.
前記分岐条件は、乗法標準形であり、
前記業務用語の定義では、前記分岐条件に含まれる複数の選言節それぞれを組み合わせることで、前記条件文の組み合わせの複数の候補を生成し、前記複数の候補の中から前記業務用語の定義対象を選択する、
請求項1乃至3の何れか1項に記載のプログラム解析方法。
The branch condition is a multiplicative standard form,
In the definition of the business term, a plurality of candidates for the combination of the conditional sentences are generated by combining each of a plurality of disjunct clauses included in the branch condition, and the business term is defined from the plurality of candidates Select
The program analysis method according to any one of claims 1 to 3.
前記業務用語の定義では、前記複数の候補のうちの第1の候補に対する否定の条件が前記複数の候補に含まれるか否かの判定に応じて、前記第1の候補に対応する前記条件文の組み合わせを前記業務用語の定義対象とするか否かを決定する、請求項4記載のプログラム解析方法。   In the definition of the business term, the conditional sentence corresponding to the first candidate is determined according to whether or not a negative condition for the first candidate among the plurality of candidates is included in the plurality of candidates. The program analysis method according to claim 4, wherein it is determined whether or not the combination of the business terms is to be defined. 前記業務用語の定義では、前記第1の候補に対する否定を示す第2の候補が前記複数の候補に含まれる場合に、前記第1の候補が正条件であるか否かの判定に応じて、前記第1の候補に対応する前記条件文の組み合わせを前記業務用語の定義対象とするか否かを決定する、請求項5記載のプログラム解析方法。   In the definition of the business term, when a second candidate indicating negative to the first candidate is included in the plurality of candidates, according to the determination as to whether or not the first candidate is a positive condition, The program analysis method according to claim 5, wherein it is determined whether or not the combination of the conditional sentences corresponding to the first candidate is to be defined as the business term. 前記第2の業務ルール表の作成では、前記入出力表における前記分岐条件の中での前記条件文の組み合わせの出現場所を検索し、前記入出力表の前記出現場所の記述を前記条件文の組み合わせに対応する前記業務用語に置換する、請求項1乃至6の何れか1項に記載のプログラム解析方法。   In the creation of the second business rule table, the occurrence location of the combination of the conditional statements in the branch condition in the input / output table is searched, and the description of the occurrence location in the input / output table is described in the conditional statement. The program analysis method according to claim 1, wherein the business term corresponding to a combination is substituted. 第1のプログラムの修正後の第2のプログラムであって、前記第1のプログラムに対応する第1の業務ルール表との齟齬が発生している前記第2のプログラムと、業務用語の定義ルールを示す情報を記憶する記憶部と、
前記第2のプログラムにおける条件文に関する分岐条件と前記分岐条件に応じた出力とを示す入出力表を作成するとともに、前記定義ルールを示す情報に基づいて、前記入出力表に含まれる前記条件文の組み合わせに対する前記業務用語を定義し、定義された前記業務用語と前記入出力表とを用いて、前記第2のプログラムに対応する第2の業務ルール表を作成する処理部と、
を有するプログラム解析装置。
The second program after the modification of the first program, the second program in which there is a conflict with the first business rule table corresponding to the first program, and business term definition rules A storage unit for storing information indicating
An input / output table indicating a branch condition related to a conditional statement in the second program and an output corresponding to the branch condition is created, and the conditional statement included in the input / output table based on information indicating the definition rule A processing unit that defines the business terms for a combination of the first and second business rule tables corresponding to the second program using the business terms and the input / output table defined;
A program analysis apparatus.
第1のプログラムの修正後の第2のプログラムであって、前記第1のプログラムに対応する第1の業務ルール表との齟齬が発生している前記第2のプログラムを取得し、
前記第2のプログラムにおける条件文に関する分岐条件と前記分岐条件に応じた出力とを示す入出力表を作成するとともに、業務用語の定義ルールを示す情報に基づいて、前記入出力表に含まれる前記条件文の組み合わせに対する前記業務用語を定義し、
定義された前記業務用語と前記入出力表とを用いて、前記第2のプログラムに対応する第2の業務ルール表を作成する、
処理をコンピュータに実行させるプログラム解析プログラム。
A second program after correction of the first program, wherein the second program has a conflict with the first business rule table corresponding to the first program;
An input / output table indicating a branch condition related to a conditional statement in the second program and an output corresponding to the branch condition is created, and the information included in the input / output table is based on information indicating a definition rule for a business term. Define the business terms for the combination of conditional statements,
Creating a second business rule table corresponding to the second program using the defined business terms and the input / output table;
A program analysis program that causes a computer to execute processing.
JP2018018847A 2018-02-06 2018-02-06 Program analysis method, program analysis device and program analysis program Active JP6993573B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018018847A JP6993573B2 (en) 2018-02-06 2018-02-06 Program analysis method, program analysis device and program analysis program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018018847A JP6993573B2 (en) 2018-02-06 2018-02-06 Program analysis method, program analysis device and program analysis program

Publications (2)

Publication Number Publication Date
JP2019139268A true JP2019139268A (en) 2019-08-22
JP6993573B2 JP6993573B2 (en) 2022-01-13

Family

ID=67693958

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018018847A Active JP6993573B2 (en) 2018-02-06 2018-02-06 Program analysis method, program analysis device and program analysis program

Country Status (1)

Country Link
JP (1) JP6993573B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416800A (en) * 2020-12-03 2021-02-26 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07104994A (en) * 1993-09-30 1995-04-21 Fujitsu Ltd Job specification analysis device of source program
JP2006252201A (en) * 2005-03-10 2006-09-21 Fujitsu Ltd Source code analysis program
JP2015005031A (en) * 2013-06-19 2015-01-08 株式会社エヌ・ティ・ティ・データ Source code analyzing device, source code analyzing method, and program
JP2017204164A (en) * 2016-05-12 2017-11-16 富士通株式会社 Program analysis method, program analysis device and analysis program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07104994A (en) * 1993-09-30 1995-04-21 Fujitsu Ltd Job specification analysis device of source program
JP2006252201A (en) * 2005-03-10 2006-09-21 Fujitsu Ltd Source code analysis program
JP2015005031A (en) * 2013-06-19 2015-01-08 株式会社エヌ・ティ・ティ・データ Source code analyzing device, source code analyzing method, and program
JP2017204164A (en) * 2016-05-12 2017-11-16 富士通株式会社 Program analysis method, program analysis device and analysis program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
前田 芳晴ほか: "業務システムのモダナイゼーション支援技術", FUJITSU, vol. 68, no. 5, JPN6021044270, 1 September 2017 (2017-09-01), pages 78 - 84, ISSN: 0004634493 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416800A (en) * 2020-12-03 2021-02-26 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium
CN112416800B (en) * 2020-12-03 2023-09-15 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium

Also Published As

Publication number Publication date
JP6993573B2 (en) 2022-01-13

Similar Documents

Publication Publication Date Title
US7937251B2 (en) Method and system for designing and modeling a product in a knowledge based engineering environment
JP3765949B2 (en) Object-oriented software development support apparatus and development support method
JP5005510B2 (en) Software design support method, design support apparatus, and design support program
US7676777B2 (en) Method and apparatus for supporting verification, and computer product
JPH08234975A (en) Program generation device and method
US8527254B2 (en) Simulator engine development system and simulator engine development method
JP3871832B2 (en) Data processing program automatic generation system and method, and computer-readable recording medium
US7490312B1 (en) Partition-based incremental implementation flow for use with a programmable logic device
JP2002279005A (en) Method, device and program for generating three- dimensional analytic model and its recording medium
JP5747698B2 (en) Requirements management support device
JP6993573B2 (en) Program analysis method, program analysis device and program analysis program
JP2008225898A (en) Conversion device, conversion program, and conversion method
JP7073756B2 (en) Merge method, merge device, and merge program
US5533179A (en) Apparatus and method of modifying hardware description language statements
JP6775740B1 (en) Design support device, design support method and design support program
JP2000172739A (en) Design supporting device
JP4906424B2 (en) Web service design method and apparatus
JP5600826B1 (en) Unstructured data processing system, unstructured data processing method and program
JP7469999B2 (en) Search device, search method, and search program
JP6062735B2 (en) Software development support device, software development support method, software development support program
JP6511793B2 (en) Test case generation program, test case generation method and test case generation apparatus
WO2021161428A1 (en) Program generation device, program generation method, and program
JP2010165205A (en) Template automatic generation system, method and program for model
JP3245635B2 (en) Standardization and analysis of software products
KR100656559B1 (en) Program Automatic Generating Tools

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201110

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20201126

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20201126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211013

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211122

R150 Certificate of patent or registration of utility model

Ref document number: 6993573

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150