Cause-effect graph generation device and cause-effect graph generation method

The cause-effect graph generation device uses a large-scale language model to analyze natural language specifications, generating accurate cause-and-effect graphs for effective business logic visualization and testing.

WO2026053402A1PCT designated stage Publication Date: 2026-03-12NT T INC
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

Conventional methods struggle to accurately generate cause-and-effect graphs from sentences written in arbitrary natural languages, making it difficult to express complex business logic effectively.

Method used

A cause-effect graph generation device utilizing a large-scale language model to analyze specifications in natural language, generate conditions and truth tables, and create logical expressions to produce accurate cause-and-effect graphs.

Benefits of technology

Enables the generation of precise cause-and-effect graphs from text in any natural language, facilitating efficient visualization and testing of complex business logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024032174_12032026_PF_FP_ABST
    Figure JP2024032174_12032026_PF_FP_ABST
Patent Text Reader

Abstract

A cause-effect graph generation device according to one aspect of the present disclosure comprises: a requirement analysis unit that uses a specification in which a requirement relating to a development target is described in natural language as input and uses a large language model to generate a condition relating to business logic represented by the specification and a truth table representing a relationship between the authenticity of the condition and the authenticity of results related to the business logic; a logical expression generation unit that uses the condition and the truth table as input and uses the large language model to generate, for each of the results, a logical expression which derives the results from the condition; and a cause-effect graph generation unit that uses the logical expression as input to generate a cause-effect graph which visualizes a relationship between the condition and the results.
Need to check novelty before this filing date? Find Prior Art

Description

Cause-and-effect graph generating device and cause-and-effect graph generating method

[0001] The present disclosure relates to a cause-and-effect graph generation device and a cause-and-effect graph generation method.

[0002] A cause-effect graph (CEG) is a directed graph that represents a certain result, the conditions that lead to that result, and the constraints between those conditions. It is a technique that is primarily used for visualizing and testing complex business logic. A conventional method has been proposed in which a CEG is used as input to mechanically generate decision tables and test cases (Non-Patent Document 1).

[0003] However, accurately expressing business logic in CEG is difficult and requires manual work. In response to this, a method is known in which a CEG is generated by performing morphological analysis on documents written in Korean (Non-Patent Document 2).

[0004] Krupalija, Ehlimana, Emir Cogo, Seila Becirovic, Irfan Prazina, Kerim Hodzic, and Ingmar Besic. "Forward-Propagation Approach for Generating Feasible and Minimum Test Case Suites From Cause-Effect Graph Specifications." IEEE Access 10 (2022): 124545-62. Jang, Woo & Kim, R.. (2022). Automatic Cause-Effect Graph Tool with Informal Korean Requirement Specifications. Applied Sciences. 12. 9310. 10.3390 / app12189310.

[0005] However, with conventional techniques, it is difficult to generate a highly accurate CEG from a sentence written in an arbitrary natural language.

[0006] The present disclosure has been made in consideration of the above points, and aims to provide a technology that can generate an accurate cause-and-effect graph from a sentence written in any natural language.

[0007] A cause-effect graph generation device according to one aspect of the present disclosure has a requirements analysis unit that takes as input specifications in which requirements related to a development target are written in natural language, and uses a large-scale language model to generate conditions related to the business logic represented by the specifications and a truth table that represents the relationship between the truthfulness of the conditions and the truthfulness of results related to the business logic; a logical expression generation unit that takes as input the conditions and the truth table, and uses the large-scale language model to generate, for each result, a logical expression that derives the result from the conditions; and a cause-effect graph generation unit that takes as input the logical expression and generates a cause-effect graph that visualizes the relationship between the conditions and the results.

[0008] It is possible to generate accurate cause-and-effect graphs from text written in any natural language.

[0009] 1 is a diagram illustrating an example of a hardware configuration of a cause-effect graph generation device according to the present embodiment; FIG. 2 is a diagram illustrating an example of a functional configuration of a cause-effect graph generation device according to the present embodiment; FIG. 3 is a diagram illustrating an example of a data structure of a logical expression; FIG. 4 is a diagram illustrating an example of a data structure of logical data; FIG. 5 is a diagram illustrating an example of a data structure of constraint data; FIG. 6 is a flowchart illustrating an example of a cause-effect graph generation process according to the present embodiment; FIG. 7 is a diagram illustrating an example of specifications; FIG. 8 is a diagram illustrating an example of a directive for generating a condition list and a truth table; FIG. 9 is a diagram illustrating an example of a response to a directive for generating a condition list and a truth table; FIG. 10 is a diagram illustrating an example of a condition list; FIG. 11 is a diagram illustrating an example of a truth table; FIG. 12 is a diagram illustrating an example of a directive for modifying a truth table; FIG. 13 is a diagram illustrating an example of a response to a directive for modifying a truth table; FIG. 14 is a diagram illustrating an example of a directive for generating a logical expression; FIG. 15 is a diagram illustrating an example of a response to a directive for generating a logical expression; FIG. 16 is a diagram illustrating an example of a directive for generating a constraint; FIG. 17 is a diagram illustrating an example of a directive for generating constraint data; FIG. 18 is a diagram illustrating an example of a cause-effect graph;

[0010] An embodiment of the present invention will be described in detail below with reference to the drawings. In the following embodiment, a cause-effect graph generation device 10 will be described that, when a document (hereinafter referred to as a "specification") describing some requirements related to software, a system, etc. to be developed in any natural language is given, generates an accurate cause-effect graph (CEG) from the specification.

[0011] A CEG is a graph structure that represents a result, the conditions that lead to that result, and the constraints between the conditions in a directed graph. Because CEG can express business logic unambiguously, it is primarily used for visualizing and testing complex business logic. For example, by creating test cases using CEG, it is possible to cover path coverage and MC / DC (Modified Condition / Decision Coverage) when business logic is expressed in a flowchart. Hereinafter, among the CEG nodes, a node that represents a condition will be referred to as a "condition node," a node that represents a result will be referred to as a "result node," and a node that represents a constraint will be referred to as a "constraint node." Furthermore, a node that exists between a condition node and a result node and is neither a condition node nor a result node will be referred to as an "intermediate node."

[0012] <Example of Hardware Configuration of Cause-Effect Graph Generation Device 10> An example of the hardware configuration of the cause-effect graph generation device 10 according to this embodiment is shown in Fig. 1. As shown in Fig. 1, the cause-effect graph generation device 10 according to this embodiment includes an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Each of these pieces of hardware is connected to each other so as to be able to communicate with each other via a bus 109.

[0013] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the cause-effect graph generation device 10 does not necessarily have to include at least one of the input device 101 and the display device 102, for example.

[0014] The external I / F 103 is an interface with an external device such as a recording medium 103a. Examples of the recording medium 103a include a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.

[0015] The communication I / F 104 is an interface for connecting to a communication network. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a non-volatile storage device such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory. The processor 108 is an arithmetic device such as a CPU (Central Processing Unit).

[0016] 1 is an example, and the hardware configuration of the cause-effect graph generation device 10 is not limited to this. For example, the cause-effect graph generation device 10 may have multiple auxiliary storage devices 107 or multiple processors 108, may not have some of the hardware shown in the figure, or may have various types of hardware other than the hardware shown in the figure.

[0017] <Example of Functional Configuration of Cause-Effect Graph Generation Device 10> An example of the functional configuration of the cause-effect graph generation device 10 according to this embodiment is shown in Fig. 2. As shown in Fig. 2, the cause-effect graph generation device 10 according to this embodiment includes a requirements analysis unit 201, a contradiction correction unit 202, a logical formula generation unit 203, a constraint extraction unit 204, and a cause-effect graph generation unit 205. Each of these units is realized, for example, by processing in which one or more programs installed in the cause-effect graph generation device 10 are executed by the processor 108 or the like.

[0018] The requirements analysis unit 201 receives a given specification 1100 as input, and generates and outputs a condition list 1200 and a truth table 1300 .

[0019] The contradiction correction unit 202 receives the specification 1100, the condition list 1200, and the truth table 1300 as input, corrects the truth table 1300, and outputs it.

[0020] The logical expression generating unit 203 receives the condition list 1200 and the truth table 1300 as input, and generates and outputs logical data 1400 .

[0021] The constraint extraction unit 204 receives the condition list 1200 as an input and generates and outputs constraint data 1500 .

[0022] The cause-effect graph generator 205 receives the logic data 1400 and the constraint data 1500 as input, and generates and outputs a cause-effect graph 1600 .

[0023] <Details of the Requirements Analysis Unit 201> The requirements analysis unit 201 receives the specification 1100 as input and generates and outputs a condition list 1200 and a truth table 1300. At this time, the requirements analysis unit 201 generates the condition list 1200 and the truth table 1300 using a machine learning model called a large language model (LLM). The LLM may be included in the cause-effect graph generation device 10, or may be included in a device or equipment communicatively connected to the cause-effect graph generation device 10. However, it is assumed that the LLM has language comprehension capabilities and inference capabilities for any natural language.

[0024] The specification 1100 is a document in which some requirements for the software, system, etc. to be developed are written in any natural language. However, it is assumed that information such as "if a certain condition is true, a certain result occurs" can be extracted from the document described in the specification 1100. The condition list 1200 is a list of conditions and their names related to the business logic expressed by the natural language statements described in the specification 1100. The truth table 1300 is a table that shows the relationship between the truth or falsehood of each condition included in the condition list 1200 and the truth or falsehood of the result. In the truth table 1300, a certain combination of the truth or falsehood of each condition included in the condition list 1200 and the truth or falsehood of the result at that time are expressed as one row.

[0025] In order to generate a CEG, it is necessary to create a logical formula, but it is expected that a more accurate cause-effect graph 1600 will be generated if the logical formula is created via a truth table rather than by generating the logical formula directly from the specification 1100.

[0026] The instructions to the LLM for generating the condition list 1200 and the truth table 1300 include the following steps 11 to 14. This is because it is known that dividing the steps to achieve a goal into steps and instructing them improves the accuracy of the response to the instructions (this is called "Chain of Thought" or the like).

[0027] Step 11: List the conditions that can be read from the specifications 1100.

[0028] Step 12: If there are two mutually exclusive conditions, delete one of the conditions.

[0029] Step 13: Create a provisional truth table, but do not create rows for combinations of conditions that cannot occur simultaneously.

[0030] Step 14: Check for conditions that do not affect the result (represented by "-" in the truth table) and simplify the truth table.

[0031] Conditions that do not affect the results are also called "don't care conditions."

[0032] By providing the LLM with a directive statement containing the instructions shown in steps 11 to 14 above as input, a response containing a condition list and a truth table is obtained as output. Therefore, the requirements analysis unit 201 can generate the condition list 1200 and the truth table 1300 by syntactically analyzing this response.

[0033] <Details of the inconsistency correction unit 202> The inconsistency correction unit 202 receives the specification 1100, the condition list 1200, and the truth table 1300 as input, and corrects and outputs the truth table 1300. At this time, the inconsistency correction unit 202 corrects the truth table 1300 as necessary using the LLM. That is, the inconsistency correction unit 202 uses the LLM to detect errors in the truth table 1300 output from the requirements analysis unit 201 and corrects the errors. This is expected to generate a cause-effect graph 1600 with high accuracy.

[0034] The directive to the LLM for correcting truth table 1300 instructs it to take specification 1100, condition list 1200, and truth table 1300 as input, interpret all rows of truth table 1300 in natural language, and search for inconsistencies with specification 1100. The directive to correct truth table 1300 also instructs it to correct truth table 1300 if there is an inconsistency, and to repeat the correction until the inconsistency is eliminated.

[0035] By providing the above directive as input to the LLM, an answer including the corrected truth table is obtained as output. Therefore, the contradiction correction unit 202 can generate the corrected truth table 1300 by parsing this answer.

[0036] <Details of Logical Formula Generation Unit 203> The logical formula generation unit 203 receives the condition list 1200 and the truth table 1300 as input, and generates and outputs logical data 1400. At this time, the logical formula generation unit 203 creates a logical formula for each result using LLM, and then generates the logical data 1400 by converting these logical formulas into a predetermined data structure.

[0037] The logical formula for each result is created in, for example, a data structure in JSON format. An example of the data structure of the logical formula for each result is shown in FIG. 3. Both "condition" and "result" included in the data structure 2100 shown in FIG. 3 have list structures, and information obtained by converting the conditions included in the condition list 1200 directly into JSON format is set in "condition." For example, if condition x1 and its name "weekday" are included in the condition list 1200, "x1" is set as the "id" of "condition," and "weekday" is set as the "name."

[0038] On the other hand, "result" is set with information that expresses a logical formula in disjunctive normal form (DNF) by grouping each row of the truth table 1300 by result. For example, let x1, x2, and x3 be the conditions included in the condition list 1200. Furthermore, in the truth table 1300, if T is true and F is false, and x1 = T, x2 = F, and x3 = T or x1 = T, x2 = -, and x3 = F, and the result y1 is derived, the logical formula is y1 = x1 ∧ ¬ x2 ∧ x3 ∨ x1 ∧ ¬ x3. For example, if "∧" (AND) is represented by "&," "∨" (OR) is represented by "|," and "¬" (NOT) is represented by "~," the above logical formula is expressed as y1 = x1&~x2&x3|x1&~x3. Therefore, "y1" is set as the "id" of "result", and "x1&~x2&x3|x1&~x3" is set as the "logic".

[0039] The directives to the LLM for generating logical expressions instruct the content to convert each row of the truth table 1300 into a predetermined data structure after interpreting it as a DNF logical expression. By interpreting each row of the truth table 1300 as a DNF logical expression and then converting it into a predetermined data structure, improvement in the conversion accuracy can be expected.

[0040] By providing the above directive as input to the LLM, an answer containing a logical expression is obtained as output. Therefore, the logical expression generator 203 can generate a logical expression by syntactically analyzing this answer.

[0041] Thereafter, the logical formula generation unit 203 simplifies (this may be called "reduction") the logical formula of the DNF, taking into consideration the readability of the CEG that is finally generated. Furthermore, since there are multiple ways to express even equivalent logical formulas, and the form of the logical formula is reflected as is in the CEG, the logical formula generation unit 203 creates logical formulas using multiple expression methods so that the user can select the best one as the CEG.

[0042] The logical expression generating unit 203 can simplify the DNF by, for example, the Quine-McCluskey method. After that, the logical expression generating unit 203 generates logical expressions in, for example, the following two expression methods.

[0043] Conjunctive Normal Form (CNF) Hybrid Form This gives logical formulas in three representation methods: DNF, CNF, and hybrid form.

[0044] Here, the conversion from DNF to CNF can be performed by combining logically equivalent conversions such as double negation elimination, De Morgan's law, the distributive law, etc. The conversion from CNF to DNF can also be performed in the same way.

[0045] Conversion to a hybrid form can be performed as follows. Assume that a DNF and a CNF simplified by the Quine-McCluskey method have been obtained. At this time, the AND clause in the DNF with the least number of conditions is compared with the OR clause in the CNF, and the form with the least number of conditions is adopted, after which the clause with the least number of conditions is determined. If there are multiple clauses with the least number of conditions, one is selected at random from among them. If the clauses with the least number of conditions are the same, the form selected in the previous operation (DNF or CNF) is selected. If the clauses with the least number of conditions are the same and this is the first operation, DNF is selected. The above operations are performed recursively for the remaining clauses that have not been determined.

[0046] For example, let us assume that the original DNF logical formula is (x1&x2&~x3&x4)|(x1&~x2&x4)|(x2&x3&~x4). In this case, when simplified using the Quine-McCluskey method, the DNF logical formula becomes (x1&x4&~x2)|(x1&x4&~x3)|(x2&x3&~x4). When this is converted to CNF, it becomes (x2|x4)&(x3|x4)&(x1|~x4)&(~x2|~x3|~x4). Using these DNF and CNF logical formulas, we will explain the case of converting to a hybrid form.

[0047] First, comparing the clauses with the fewest conditions, CNF has two clauses with conditions, so for example, the "(x2|x4)&" part is determined. When the remaining undetermined part, "(x3|x4)&(x1|~x4)&(~x2|~x3|~x4)," is converted to DNF, it becomes (x1&~x2&x3)|(x1&~x3&x4)|(x3&~x4). Next, CNF has two clauses with conditions, so for example, "(x2|x4)&(x3|x4)&" is determined. Next, when the remaining undetermined part, "(x1|~x4)&(~x2|~x3|~x4)," is converted to DNF, it becomes (x1&~x2)|(x1&~x3)|~x4. Since DNF has one condition clause, "(x2|x4)&(x3|x4)&~(x4|)" is determined. Next, when the remaining undetermined part, "(x1&~x2)|(x1&~x3)," is converted to CNF, it becomes x1&(~x2|~x3). Since CNF has one condition clause, "(x2|x4)&(x3|x4)&~(x4|(x1&))" is determined, and the remaining part becomes (~x2|~x3). Since the remaining part cannot be simplified any further or converted to DNF, the final hybrid logical formula is (x2|x4)&(x3|x4)&~(x4|(x1&(~x2|~x3))).

[0048] The hybrid form allows nesting of clauses, but is a logical formula in which the number of conditions in each clause is small, so that a logical formula that is more suitable for CEG than DNF or CNF may be obtained.

[0049] Finally, the logical expression generation unit 203 parses each logical expression, converts it into an abstract syntax tree, and then converts it into a list data structure representing the logical portion of the CGE, thereby generating logical data 1400. An example of the data structure of the logical data 1400 is shown in FIG. 4. The ID of the CEG node is set in "id" included in the data structure 2200 shown in FIG. 4, and the name of the node is set in "name." Furthermore, the type of logic at the node is set in "functionType," with AND being a logical product, OR being a logical sum, and EQ indicating that the node is a condition node. Furthermore, "inputs" sets which node to connect to (which node to connect the edge from) using the logic set in "functionType." Note that if "negate" included in "inputs" is set to True, it means that the input from the node with "id" included in that "inputs" is negated.

[0050] In addition, since a single node in a CEG can only express either an AND or OR connection, if the resulting logical expression contains a mixture of AND and OR, a new intermediate node must be generated. The "id" and "name" of the condition node and result node are set to the ID and name generated when the logical expression is generated. On the other hand, the ID and name set to the "id" and "name" of the intermediate node are newly generated. For example, an arbitrary, unique ID is generated for the ID of the intermediate node, and the name is generated from the name of the node input to the intermediate node. To give a specific example, if the names of the two nodes input to the intermediate node are "A" and "B", the name "A and B" is generated.

[0051] <Details of Constraint Extraction Unit 204> The constraint extraction unit 204 receives the condition list 1200 as input and outputs constraint data 1500. At this time, the constraint extraction unit 204 extracts and generates constraints between the conditions included in the condition list 1200 using LLM.

[0052] Constraints in CEG have the advantage of being able to eliminate combinations of conditions that are not feasible from test cases. On the other hand, whether a certain combination of conditions is feasible also depends on the implementation of the target system into which the software is installed. Therefore, in the following, we will only focus on constraints that can be inferred from conditions alone. In other words, we will focus on the following four types of constraints:

[0053] ONE: Only one of the conditions xi, . . . , xj is always true.

[0054] INCL: At least one of the conditions xi, . . . , xj is true.

[0055] EXCL: At most one of the conditions xi, . . . , xj is true.

[0056] REQ: When condition xi is true, conditions xj, . . . , xk are always true.

[0057] In general CEG, in addition to the above constraints, MASK constraints (constraints that when result yi is true, the truth or falsity of results yj, ..., yk cannot be observed) may be used. However, MASK constraints are excluded from this discussion because they do not affect the combination of conditions.

[0058] The directive to the LLM for generating constraints takes the condition list 1200 as input and instructs the following steps 21 and 22.

[0059] Step 21: Considering the combinations of conditions that cannot occur simultaneously, list the four types of constraints mentioned above. Each of these constraints is written as follows:

[0060] ONE(xi, ..., xj) INCL(xi, ..., xj) EXCL(xi, ..., xj) REC(xi->xj, ..., xk) Step 22: Eliminate and replace obvious constraints by the following three operations. This is because the ONE constraint is stricter than the INCL and EXCL constraints.

[0061] Operation 1: If ONE(X) (where X ⊆ {xi, . . . , xj}) holds, delete INCL(xi, . . . , xj).

[0062] Operation 2: If ONE(xi, . . . , xj) holds, delete EXCL(xi, . . . , xj).

[0063] Operation 3: If both INCL(xi, . . . , xj) and EXCL(xi, . . . , xj) hold, delete them and replace them with ONE(xi, . . . , xj).

[0064] Thereafter, the constraint extraction unit 204 generates constraint data 1500 by converting the extracted and generated constraints into a list data structure representing CGE constraints using LLM. An example of the data structure of the constraint data 1500 is shown in FIG. 5. The ID of the CEG constraint node is set to "id" included in the data structure 2400 shown in FIG. 5, and its name is set to "name". Furthermore, the type of constraint at that constraint node is set to "functionType". Furthermore, "inputs" sets which node is to be connected with the constraint set in "functionType" (which node is to connect the edge). Note that if "negate" included in "inputs" is set to True, this means that the input from the node with "id" included in that "inputs" is negated.

[0065] <Details of the Cause-Effect Graph Generator 205> The cause-effect graph generator 205 receives the logical data 1400 and the constraint data 1500 as input and outputs the cause-effect graph 1600. The cause-effect graph generator 205 converts the data into a dot language format that can be visualized using GraphViz or the like, and visualizes the data to output the cause-effect graph 1600 on the display device 102, such as a display. The cause-effect graph generator 205 may visualize the nodes and edges in different ways depending on their types. For example, condition nodes may be visualized in blue, intermediate nodes in gray, and result nodes in red, and constraint nodes may be outlined with dashed lines. Edges exiting constraint nodes may be visualized with dashed lines, and edges exiting each node that represent negation may be visualized in red. Furthermore, the logic (AND or OR) in the node connections may be distinguished by labeling the node into which the edge enters with "∨" or "∧."

[0066] <Cause-Effect Graph Generation Process> An example of the cause-effect graph generation process according to this embodiment will be described with reference to FIG.

[0067] The requirements analysis unit 201 receives a given specification 1100 as an input, and generates and outputs a condition list 1200 and a truth table 1300 (step S101).

[0068] The contradiction correction unit 202 receives the specification 1100, the condition list 1200, and the truth table 1300 as input, corrects the truth table 1300, and outputs it (step S102).

[0069] The logical expression generating unit 203 receives the condition list 1200 and the truth table 1300 as input, and generates and outputs logical data 1400 (step S103).

[0070] The constraint extraction unit 204 receives the condition list 1200 as an input and outputs constraint data 1500 (step S103).

[0071] The cause-effect graph generator 205 receives the logic data 1400 and the constraint data 1500 as input, and outputs a cause-effect graph 1600 (step S102).

[0072] <<Specific Example of Step S101>> As an example, assume that the specification 1100 shown in FIG. 7 is given. The specification 1100 shown in FIG. 7 is a natural sentence describing the requirements for ATM withdrawal fees in Japanese. In this case, the requirements analysis unit 201 inputs the specification 1100 shown in FIG. 7 and gives the directive 3100 shown in FIG. 8 to the LLM. As a result, a response 3200 shown in FIG. 9, for example, is obtained as a response to the directive 3100. Note that the specification 1100 shown in FIG. 7 is set in the "###Specification###" portion included in the directive 3100 shown in FIG. 8.

[0073] 9, the requirements analysis unit 201 generates and outputs the "## condition enumeration" portion included in the response 3200 as the condition list 1200 and the "## final truth table" portion included in the response 3200 as the truth table 1300. This results in the condition list 1200 shown in Fig. 10 and the truth table 1300 shown in Fig. 11. In the truth table 1300 shown in Fig. 11, x1, x3, x4, x5, and x6 represent the conditions, and the fee represents the result.

[0074] <<Specific Example of Step S102>> The contradiction correction unit 202 receives the specification 1100 shown in Fig. 7 and the truth table 1300 shown in Fig. 11 as input, and provides the directive 3300 shown in Fig. 12 to the LLM. As a result, for example, the answer 3400 shown in Fig. 13 is obtained as the answer to the directive 3300. Note that the specification 1100 shown in Fig. 7 is set in the "### specification ###" portion included in the directive 3300 shown in Fig. 12. Similarly, the truth table 1300 shown in Fig. 11 is set in the "### truth table ###" included in the directive 3300 shown in Fig. 12.

[0075] 13, the inconsistency correction unit 202 generates and outputs the "## truth table after correction" portion included in the answer 3400 as the corrected truth table 1300. In this specific example, the truth table 1300 before correction conforms to the specifications and is free of inconsistencies.

[0076] <<Specific Example of Step S103>> The logical formula generation unit 203 receives the condition list 1200 shown in Fig. 10 and the truth table 1300 shown in Fig. 12 as input, and provides the directive statement 3500 shown in Fig. 14 to the LLM. As a result, an answer 3600 shown in Fig. 15, for example, is obtained as an answer to the directive statement 3500. Note that in the answer 3600 shown in Fig. 15, some content is omitted with "...".

[0077] 15, the logical expression generation unit 203 generates a DNF logical expression for the "result" portion of the "## logical expression" included in the answer 3600. Note that two logical expressions are generated for the answer 3600 shown in FIG. 15: a DNF logical expression for the result y1 and a DNF logical expression for the result y2.

[0078] Then, the logical expression generation unit 203 simplifies the DNF logical expression using the Quine-McCluskey method, and generates a CNF logical expression from the simplified DNF logical expression. The logical expression generation unit 203 also generates a hybrid logical expression from the simplified DNF logical expression and the CNF logical expression. These logical expressions are generated in, for example, the JSON format.

[0079] Finally, the logical expression generator 203 parses each logical expression, converts it into an abstract syntax tree, and then converts it into a list data structure (FIG. 4) that represents the logical portion of the CGE, thereby generating logical data 1400.

[0080] <<Specific Example of Step S104>> The constraint extraction unit 204 receives the condition list 1200 shown in Fig. 10 as input and provides the directive 3700 shown in Fig. 16 to the LLM. As a result, a response 3800 shown in Fig. 17, for example, is obtained as a response to the directive 3700.

[0081] Thereafter, the constraint extraction unit 204 generates a constraint, for example, "ONE (x4, x5, x6)" from the "## final constraint" part included in the answer 3800 by syntactically analyzing the answer 3800 shown in FIG.

[0082] Next, the constraint extraction unit 204 inputs the constraint ONE (x4, x5, x6) generated above and provides the directive 3900 shown in Figure 18 to the LLM. This provides an answer to the directive 3900, and the constraint extraction unit 204 generates constraint data 1500 by parsing this answer and converting it into a list data structure (Figure 5) representing CGE constraints. Note that the constraint ONE (x4, x5, x6) generated above is set as the "###Constraint###" included in the directive 3900 in Figure 18.

[0083] <<Specific Example of Step S105>> The cause-effect graph generation unit 205 receives the logical data 1400 and the constraint data 1500 as input, converts the logical data 1400 and the constraint data 1500 into a dot language format, and then visualizes the converted data to output a cause-effect graph 1600 onto the display device 102. As a result, for example, the cause-effect graph 1600 shown in FIG. 19 is visualized on the display device 102.

[0084] In addition, the cause-effect graph generation unit 205 may visualize and output the cause-effect graph 1600, for example, on a display device provided in another device or equipment that is communicatively connected to the cause-effect graph generation device 10.

[0085] <Modifications> Modifications of this embodiment will be described below. Note that the following modifications can also be combined with each other.

[0086] Variation 1 When contradictions in the truth table 1300 are allowed, or when the requirements analysis unit 201 generates an accurate truth table 1300, the cause-effect graph generation device 10 does not need to have the contradiction correction unit 202.

[0087] Modification 2 In cases where there are no constraints between the conditions included in the condition list 1200, or when the constraints are to be ignored, the cause-effect graph generation device 10 does not need to include the constraint extraction unit 204.

[0088] <Summary> As described above, the cause-effect graph generation device 10 according to this embodiment utilizes the language comprehension and inference capabilities of LLM to generate an accurate cause-effect graph from specifications in which requirements related to software, systems, etc. to be developed are written in any natural language. Therefore, for example, by creating test cases from this cause-effect graph using an existing method (for example, the method described in Non-Patent Document 1), it becomes possible to perform efficient and effective software testing, etc.

[0089] The cause-effect graph generation device 10 according to this embodiment can be incorporated into the device that generates the test cases. That is, a device or system that includes the cause-effect graph generation device 10 according to this embodiment may have a functional unit that creates test cases from a cause-effect graph using an existing method (for example, a functional unit called a "test case creation unit" or the like).

[0090] The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.

[0091] REFERENCE SIGNS LIST 10 Cause-effect graph generating device 101 Input device 102 Display device 103 External I / F 103a Recording medium 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage device 108 Processor 109 Bus 201 Requirement analysis unit 202 Constraint correction unit 203 Logical formula generation unit 204 Constraint extraction unit 205 Cause-effect graph generating unit

Claims

1. A cause-effect graph generation device having: a requirements analysis unit that takes as input specifications in which requirements related to a development target are written in natural language, and uses a large-scale language model to generate conditions related to the business logic represented by the specifications and a truth table that shows the relationship between the truth or falsity of the conditions and the truth or falsity of results related to the business logic; a logical expression generation unit that takes as input the conditions and the truth table, and uses the large-scale language model to generate, for each result, a logical expression that derives the result from the conditions; and a cause-effect graph generation unit that takes as input the logical expression and generates a cause-effect graph that visualizes the relationship between the conditions and the results.

2. The cause-effect graph generation device according to claim 1, further comprising a contradiction correction unit that receives the specification, the condition, and the truth table as input and corrects the contradiction if a contradiction exists in the truth table using the large-scale language model.

3. A cause-and-effect graph generation device as described in claim 1 or 2, further comprising a constraint extraction unit that takes the conditions as input and extracts constraints for the conditions using the large-scale language model, and the cause-and-effect graph generation unit takes the logical formula and the constraints as input and generates the cause-and-effect graph.

4. A cause-and-effect graph generation method in which a computer executes the following steps: a requirements analysis procedure that takes as input specifications in which requirements related to a development target are written in natural language, and uses a large-scale language model to generate conditions related to the business logic represented by the specifications and a truth table that shows the relationship between the truth or falsity of the conditions and the truth or falsity of results related to the business logic; a logical expression generation procedure that takes as input the conditions and the truth table, and uses the large-scale language model to generate, for each result, a logical expression that derives the result from the conditions; and a cause-and-effect graph generation procedure that takes as input the logical expression and generates a cause-and-effect graph that visualizes the relationship between the conditions and the results.

Citation Information

Patent Citations

  • Automatic test device for software

    JP1996235024A

  • Scenario generation method, scenario generation program, and scenario generation device

    JP2007257291A

  • Verification apparatus, verification method, and program

    JP2016143074A

  • Information processing device

    JP2019197329A