An automatic programming function that incorporates the results of verification using input and output into program generation.

By creating input/output patterns and masking unmatched branching conditions, the system ensures accurate automatic program generation aligned with user intentions, eliminating the need for human verification.

JP2026089178AActive Publication Date: 2026-06-01PERSONAL AI CORP

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
PERSONAL AI CORP
Filing Date
2024-11-20
Publication Date
2026-06-01

AI Technical Summary

Technical Problem

Existing automatic programming systems often generate programs that deviate from the intended meaning of the input text, necessitating human verification and modification.

Method used

The system creates possible input patterns and output patterns, performs an equivalence check, and masks or removes branching conditions that do not match the input/output data, ensuring program accuracy without human intervention.

Benefits of technology

This approach prevents the generation of unintended programs, enabling automatic program generation aligned with user intentions and eliminating the need for human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026089178000001_ABST
    Figure 2026089178000001_ABST
Patent Text Reader

Abstract

In systems with automatic programming capabilities, the code generated by the automatic programming function often differs from the intended meaning of the input text. Therefore, when using automatic programming, it is necessary for a human to execute the generated result, verify it, and modify the input to bring it closer to the intended program. This solution aims to enable the generation of the intended program without human intervention. [Solution] The program's accuracy is achieved by using patterns that can exist as input derived from the input text and patterns that can exist as output for that input, verifying the equivalence of the output obtained by providing these input patterns to the program's input, and disabling branching conditions that cannot be verified as equivalent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an automatic program generation function for automatically creating software, so-called automatic programming, and relates to a technology effective when applied to an environment for executing automatic programming, that is, an automatic program generation function.

Background Art

[0002] As generative AI has become generally utilized and an automatic program generation function that does not require human programming, so-called automatic programming, has become mainstream, it is considered that programs will be generated by artificial intelligence using natural language processing and human programming will decrease. Currently, automatic programming performs program generation using what associates natural language created by humans with code, and programming codes for natural language are associated within a database related to the automatic program generation function or within a program having the automatic program generation function. Codes corresponding to new words and sentences are added. The insertion destination of this code is within a program having the automatic program generation function or within a commonly used database. As a result, regardless of the natural language input by each user, all users who use it can commonly learn and grow and utilize the relationship between the learned code and natural language. The structure having natural language-corresponding codes within this database takes the form of sequentially synchronizing even if there are a plurality of databases and using the same database. Also, the structure having natural language-corresponding codes within the automatic program generation function can maintain the same automatic program generation machine by adding the results learned by all automatic program generation functions, recompiling, and performing sequential synchronization. As a result, all users can similarly enjoy the results learned. On the other hand, it is often seen that it becomes an unintended program, and it is considered important for the generalization of automatic programming whether it can be generated as an intended program.

Prior Art Documents

Patent Documents

[0003] [Patent Document 1] Japanese Patent Application No. 09-214102: An automatic programming device having a code sequence modification means, which eliminates an operand or modifies the code for an operand in the case of an irregular operand in machine code generated by a combination of existing codes. [Patent Document 2] Japanese Patent Application No. 2023-010303: A method for generating tests in deep learning, for improving the accuracy of existing program code. [Patent Document 3] Japanese Patent Publication No. 09-073306: An input method for creating programs that is closer to natural language (several types are proposed), and an input method for databases closely related to program input. [Patent Document 4] Japanese Patent Publication No. 06-214776: A device that automatically generates target program source code from software specifications written in natural language as input. [Patent Document 5] Patent 7064680: A method for natural language processing is added to Japanese Patent Publication No. 06-214776, and the corresponding program code is stored in a database. [Patent Document 6] Patent No. 6958884: The same content as JP-A-06-21477, with the addition of a conversation reception function. [Patent Document 7] Japanese Patent Application No. 2007-175873: By providing test scenarios, efficient testing based on those test scenarios can be performed. [Patent Document 8] Japanese Patent Application No. 2023-145979: Verification method using equivalence when combining algorithms at a higher level. [Patent Document 9] Japanese Patent Application No. 2022-190529: Method for taking a data flow as input, modeling it, and deriving source code from this model. [Patent Document 10] Japanese Patent Application No. 2021-189515: Automatic conversion of computer modeling environments to different models [Patent Document 11] Japanese Patent Application No. 2018-124226: A method for evaluating learning models that uses verification data to obtain a second execution result based on a second learning model from the execution result based on a model learning model, determines whether the first and second execution results satisfy a logical formula, and compares their behavior. [Overview of the project] [Problems that the invention aims to solve]

[0004] In systems with automatic programming capabilities, the code generated by the automatic programming function often differs from the intended meaning of the input text. Therefore, when using automatic programming, it is necessary for a human to execute the generated result, verify it, and modify the input to bring it closer to the intended program. This solution aims to enable the generation of the intended program without human intervention. [Means for solving the problem]

[0005] The program creates possible input patterns derived from the input text, and possible output patterns for those inputs. It then performs an equivalence check on the output obtained by providing these input / output patterns to the program's input, and deactivates branches that cannot be equivalently checked to ensure program accuracy. [Effects of the Invention]

[0006] This prevents the generation of programs that deviate from the user's intentions in the automatic programming function, eliminating the need for human intervention. Furthermore, by automatically creating and executing programs based on input text without human awareness, the generating AI can generate not only data but also free-form actions. [Brief explanation of the drawing]

[0007] [Figure 1] A process flow for masking branches in a system with a generation AI or automatic programming function when the branching conditions of the program are not met. [Figure 2] Detailed flow of Figure 1 [Figure 3] Details of determining the input format from the input data portion of the input text in Figure 2 (#) [Figure 4] Details of determining the output format from the output data equivalent portion of the input text in Figure 2 (#2) [Figure 5] The program creates condition matching flags for internal branching, identifies branches where the conditions do not match the input data, and masks those conditions where the matching flag is not set. Whether to retain or remove the condition matching flags after checking all input data is optional. [Modes for carrying out the invention]

[0008] The embodiments of the present invention will now be described in detail with reference to the drawings. However, the present invention can be implemented in many different forms and should not be interpreted as being limited to the contents of these embodiments. The same elements will be numbered throughout the embodiments.

[0009] The following embodiments primarily describe methods or systems, but as will be apparent to those skilled in the art, the present invention can also be implemented as a computer-usable program. Therefore, the present invention can take the form of hardware, software, or a combination of software and hardware. The program can be recorded on any computer-readable medium such as a hard disk, DVD-ROM, optical or magnetic storage device, or semiconductor storage device.

[0010] Further, in the following embodiments, a general computer system or the like can be used. The computer system, network system, and artificial intelligence-oriented system that can be used in the embodiments include hardware resources generally provided in a computer system, network system, or artificial intelligence-oriented system, such as a central processing unit (CPU), main memory (main memory: RAM), non-volatile memory (ROM), coprocessor, image processor (GPU), cache memory, input / output control device (I / O), artificial intelligence machine semiconductor, flash memory, etc. Further, it can be provided with an external storage device such as a hard disk device or flash memory, and communication means capable of connecting to a network such as the Internet. The computer system includes various computers such as personal computers, workstations, mainframe computers, servers, etc., computers connected to a cloud-based network, tablet computers, various portable information terminals such as smartphones, and systems constituting artificial intelligence.

[0011] An object of the present invention is to reduce the possibility that a generation AI or an automatic program generation function outputs a program different from the program expected by the user in automatic program generation, so-called automatic programming, and enable automatic generation of a program suitable for the input text.

[0012] In an automatic programming system or a generation AI having an automatic programming function, for an input text, automatic generation of a program by the automatic programming function, that is, code can be automatically generated. As the generation accuracy improves, the program is automatically generated and automatically executed even in a situation where the user is not aware, and a result can be obtained. This makes it possible to execute processing without using application software. On the other hand, new imitation and security risks may occur.

[0013] Currently, programs generated by using an automatic programming function (hereinafter, the program, code, or program code shall be described interchangeably) often generate programs that are different from the original intention of the input text.

[0014] One of the reasons for generating different codes is that due to insufficient interpretation of the text caused by lack of learning, something different from what the program expects is output. Although the accuracy of this problem improves as the learning of artificial intelligence deepens, it has been found that the improvement in accuracy due to learning, such as context and context, cannot be expected to improve beyond a certain level of accuracy.

[0015] Three reasons are considered for not achieving a certain level of accuracy. The first reason is the accuracy problem in automatic rule creation. Artificial intelligence uses an arbitrary rule engine or uses what is constructed by learning from the information accumulated in the rule engine itself. In the latter case, the accuracy of the rule engine improves as the learning of artificial intelligence deepens. On the other hand, since it changes with the change of information, it has been found that improvement beyond a certain level of accuracy cannot be expected. That is, when the accuracy reaches the limit point, it is known that there are multiple options instead of a unique option. This is the cause attributed to the rule engine.

[0016] The second cause stems from the fact that different interpretations can be made depending on how the input text is read. If there are multiple causes for this, the likelihood of generating different codes increases proportionally. As a countermeasure, some methods involve having a human assemble the code on a screen or similar. While it is known that accuracy can be improved to a certain extent through learning based on the context of the text, it is also known that accuracy beyond a certain point cannot be uniquely defined based on the context of the text alone. When the program created from the input text is not uniquely determined, the inability to define it leads to divergence in the results, resulting in output different from the expected output. This is the second cause. The same thing happens when there is insufficient information in the input text, making it impossible to determine either outcome. In this case, the lack of information can only be resolved by inputting information equivalent to that of a human programmer, but since the cause is the inability to make a judgment, it cannot be solved by automated programming at present.

[0017] The third cause occurs when processing data, specifically when the input, or data pattern, differs depending on the source. For example, when generating a program that processes information from the internet, if the acquired data is used as input data, the data format may include elements that do not match the program.

[0018] If generative AI or automated programming becomes commonplace, it will be possible to obtain results simply by inputting text tailored to the purpose each time, without using general-purpose application programs. All that will be required is to specify what input to use, what processing to perform, and in what form to output the results. Based on this premise, this invention aims to achieve accuracy exceeding the limits achievable through learning and output the intended program by solving the three aforementioned problems. This is intended to lead to a situation where, as the use of automated programming becomes commonplace, users can input what they want to do each time, and a program specifically designed for that purpose will be created and executed without their awareness, thus obtaining the results—in other words, creating an environment where users don't need to be aware of the program. It should be noted that this invention aims to solve a certain portion of the problems that cannot be solved by deep learning.

[0019] To address this issue, when automatically generating a program from a combination of input sentences or phrases, the differences that arise due to the rule engine, interpretation, and data source, which are necessary for generality, are limited to the purpose based on the content of the input sentences or phrases, and the input and output of the program are limited to what is specified or expected based on the input sentences or phrases, in other words, the program is limited to the content of the input.

[0020] Assuming the use of learning results and other factors, the present invention is based on the principle of determining the input data and its format to be generated for the program before program generation, that is, acquiring the data, and generating the program after reflecting the acquisition results. The program is automatically generated as one that can accept that input data. Generally, when data is input after program generation, if uncertain or unspecified data is acquired, the program may behave unexpectedly. To avoid this, it is necessary to identify and acquire what data can be input from the combination of sentences or phrases of content input to the generating AI or automatic programming, and to confirm the input. As shown in Figure 3, the input data can be determined from data specified in the input text, data acquired from external data, or data from stored internal data.

[0021] The program to be generated obtains input / output data from a combination of input text or phrases, or input data from a combination of input text or phrases, either from an external or internal source. For example, if the source is internal, the data specified by a combination of text or phrases from a database is the target. External sources include data obtained from the internet. The program then creates the output data that should be produced based on this input, either from the combination of input text or phrases, or from the aforementioned input data. The program then compares the output obtained by providing this input data to the program with the aforementioned output data to perform an equivalence check. The branching conditions used in the program for matching combinations are then used as branching conditions. After performing an equivalence check on all inputs and outputs, unused branching conditions are masked or deleted. This results in a program that corresponds only to the inputs used. By masking the internal branches (if or case) that are not used based on the input / output data in the generated program, the program prevents any program actions other than those that can be executed based on the aforementioned input / output data from occurring.

[0022] The program extracts input and output based on the combination of input sentences and phrases, determining what will be obtained after program execution based on the data input. The input derived uses the content and format of the input data from the input document, if available. If there is no format, the format is obtained from the data. If there is no data, data is obtained from outside the system and its format is used. If internal system data is used, internal data is obtained and its format is used. The output data and format are obtained from the combination of input sentences or phrases. If no data is included, a format uniquely determined from the sentence is used. If this is not used, a format obtained from learned rules is used. These input data and formats are used to input into the program, and the resulting output is compared with the input and output results of the program generated using the aforementioned output data and format. The branching conditions used by matching data are continued to be used, and all branching conditions not used by all input and output data and formats are removed. In other words, branching conditions that are not activated are excluded from the program's options, i.e., the options for branching conditions such as if and case. Finally, all unnecessary branching conditions are removed, and the program is generated again. This results in a program with only branching conditions related to the input and output data. This approach avoids generating unintended programs by making the program dependent on input and output data, rather than making it general-purpose. Furthermore, when adding functionality, the program generated from the input text or phrase combinations related to the added functionality should be processed in the same way as described above. This allows for either creating separate programs for each function, or combining the common parts of each program into a single program through functional compression.

[0023] Figure 1 is a flowchart outlining the solution. The input / output data portion is extracted from the input sentence or phrase combination. Next, the data to be input into the program is obtained from the input / output data portion. Then, the program is automatically created from the input sentence or phrase combination. Next, the input data is input into the program and the output value is obtained. The program output value is compared with the output data from the input sentence or phrase combination. For matching combinations, the branches in the program that were executed are recorded. Based on the results of this process for all input / output data, branches in the program that did not match the recorded branches, i.e., branches that were not traversed, are masked. In other words, the program is modified to remove unused branching portions.

[0024] Figure 2 is a flowchart that provides a more detailed view of Figure 1. It extracts the input data portion and the output data portion from the input sentence or phrase combination. It also automatically generates a program from the input sentence or phrase combination. The input data format is determined from the portion of the input sentence or phrase combination corresponding to the program's input data. Similarly, the output data format is determined from the portion corresponding to the output data. Next, data matching the input data and input format is acquired or created, thereby increasing the amount of input data. Similarly, data similar to the input data is derived from the input sentence or phrase combination. For output data, output data matching the output data and output format, and corresponding to the increased input data mentioned above, is created. Next, the input data is input into the program and the output value is obtained. The program output value is compared with the output data from the input sentence or phrase combination. For matching combinations, the branches in the program where branching was performed are recorded. Based on the results of the comparison performed for all input and output data, all branches in the program that did not match the recorded branches, i.e., unused branching conditions, are deleted. After the final comparison using the input and output data combination is complete, a program with unused branching conditions removed is generated.

[0025] Figure 3 is a flowchart of the part indicated by # that determines the input format when the input data in Figure 2 is included in a combination of input sentences or phrases, obtained from the internet or external storage devices, or obtained from a database within the system. If the input sentence or phrase combination includes the format of the input data, that format is used. If the input sentence or phrase combination includes input data or a format, it is used; otherwise, the format is obtained from the data. If the format is not included and the input data is external data, the external data is obtained from its source, sample data is obtained, and that format is used. If the format is not included and the data is internal, the internal data is obtained from its source, sample data is obtained, and that format is used.

[0026] Figure 4 is a detailed flowchart of the part shown in #2, where the output format is included in the combination of input sentences or phrases in Figure 2, or is uniquely determined, or determined from trained data or trained rules.

[0027] Figure 5 shows an example of how, in the internal branching of the program when input data is entered as shown in Figure 2, a condition matching flag is set when the condition is met, and branch conditions corresponding to condition matching flags that do not meet the condition, i.e., those where the condition matching flag is not active, are masked. In the automated programming of Figure 2, a condition matching flag is created for each condition in all conditional branches, i.e., conditional branches such as If and Case. If the condition is met by the input data, this condition matching flag is activated. After the final input data is entered, conditional branches with inactive condition matching flags are masked. After that, it is optional whether to delete or retain all condition matching flags. [Industrial applicability]

[0028] This technology, rather than relying on artificial intelligence systems based on past trends or arbitrary rules, can be applied to systems with automatic programming capabilities that can generate rules themselves from the information expected by the user. This allows for systems where users can automatically collect information from a large amount of unspecified data, such as the internet, process it, and specify the output format, enabling them to obtain the desired results each time. In short, it enables systems that process information according to rules aligned with the user's intentions.

[0029] This technology can be applied to systems with automatic programming capabilities that generate programs from acquired data. By utilizing this, it becomes possible to develop autonomous systems such as robots that think and act on their own, building execution methods based on learned results, and then actually executing those methods.

Claims

1. A system equipped with a generation AI or automatic program generation function that, before automatically generating a program from a combination of sentences or phrases of input content, acquires input data for that program and generates a program that can accept this input data.

2. A system equipped with a generation AI or automatic program generation function that automatically generates a program from a combination of sentences or phrases of input content, and when there is input to the program, if there are branching conditions within the program that are not related to either input or output, or if there is input to the program but no output, if there are branching conditions within the program that are not related to input, then these branching conditions are disabled when generating the program.

3. A system according to claim 1 or claim 2, comprising a generation AI or automatic program generation function that synthesizes programs by combining common parts of programs automatically generated according to each of multiple combinations of sentences or phrases of input content.