JP7703197B1 - Automatic programming function that reflects the results of checking input and output in program generation - Google Patents
Automatic programming function that reflects the results of checking input and output in program generation Download PDFInfo
- Publication number
- JP7703197B1 JP7703197B1 JP2024202054A JP2024202054A JP7703197B1 JP 7703197 B1 JP7703197 B1 JP 7703197B1 JP 2024202054 A JP2024202054 A JP 2024202054A JP 2024202054 A JP2024202054 A JP 2024202054A JP 7703197 B1 JP7703197 B1 JP 7703197B1
- Authority
- JP
- Japan
- Prior art keywords
- input
- program
- data
- output
- automatic programming
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
【課題】自動プログラミング機能を持ったシステムにおいて、入力文章に対して、自動プログラミング機能が生成するコードが入力文章の意図したものとは異なる場合が多い。その為自動プログラミング機能を使用する場合、その生成結果を実行し人が確認し、入力を変更しながら本来の意図したプログラムに近づける作業が必要となっている。これを人の介在なしに意図したプログラムの生成を可能にする。
【解決手段】入力文章から導き出した入力として存在しうるパターンとその入力に対して出力として存在しうるパターンを使用し、その入力パターンをプログラムの入力に与えて得られる出力の等価性確認を行い、等価確認のできない分岐条件を使用不可にすることでプログラムの正確性を得る。
【選択図】図1
[Problem] In systems with automatic programming functions, the code generated by the automatic programming function for input text is often different from what was intended by the input text. Therefore, when using the automatic programming function, it is necessary for a person to execute the generated results, check them, and change the input to bring them closer to the originally intended program. This makes it possible to generate the intended program without human intervention.
[Solution] Using patterns that can exist as input derived from an input sentence and patterns that can exist as output for that input, the input patterns are given as input to the program and the equivalence of the resulting output is confirmed, and the accuracy of the program is achieved by disabling branch conditions that cannot be confirmed for equivalence.
[Selected Figure] Figure 1
Description
本発明は、ソフトウエアを自動的に作成する自動プログラム生成機能、所謂自動プログラミングに関し、自動プログラミングを実行する環境つまり自動プログラム生成機能に適用して有効な技術に関する This invention relates to an automatic program generation function that automatically creates software, so-called automatic programming, and to an environment for executing automatic programming, i.e. technology that is effective when applied to the automatic program generation function.
生成AIが一般的に活用されるようになり、人のプログラミングを必要としない自動プログラム生成機能、所謂自動プログラミングが主流になると、自然言語処理を使用した人工知能によってプログラムが生成され、人によるプログラミングが減少していくと考えられている。自動プログラミングは、現状、人によって作成された自然言語とコードを関連付けたものを利用してプログラムの生成を行っており、自動プログラム生成機能に関連付けたデータベース内に、または自動プログラム生成機能を持ったプログラム内に自然言語に対するプログラミングコードを関連付けている。新たな言葉や文章に対して相当するコードを追加していく。 このコードの挿入先は、自動プログラム生成機能を持ったプログラム内または共通に使用するデータベース内となっている。そのことにより使用者毎に入力した自然言語に関わらず、結果として共通に学習成長し、利用する全てのユーザーがその学習したコードと自然言語との関係を利用することができるようになる。このデータベース内に自然言語対応コードを持つ構造は、複数のデータベースにあっても逐次同期を行い、同一のデータベースを利用する形をとっている。また自動プログラム生成機能内に自然言語対応コードを持つ構造は、全ての自動プログラム生成機能に学習した結果を追加し、再コンパイルして逐次同期を行うことで、同一の自動プログラム生成機を維持できる。 それによって全てのユーザーが学習した結果を同様に享受できる。一方で意図しないプログラムとなることも多く見受けられ、意図するプログラムとして生成できるかどうかが、自動プログラミングが一般化する上で重要であると考えられている。 When generative AI becomes more widely used and automatic program generation functions that do not require human programming, so-called automatic programming, become mainstream, it is believed that programs will be generated by artificial intelligence using natural language processing, and human programming will decrease. Currently, automatic programming generates programs by using natural language created by humans and associated with code, and programming code for natural language is associated in a database associated with the automatic program generation function or in a program with an automatic program generation function. Corresponding code is added to new words and sentences. The destination of insertion of this code is in a program with an automatic program generation function or in a commonly used database. As a result, regardless of the natural language input by each user, the result is common learning and growth, and all users who use it can use the relationship between the learned code and natural language. This structure with natural language corresponding code in the database uses the same database by sequentially synchronizing even in multiple databases. In addition, the structure with natural language corresponding code in the automatic program generation function can maintain the same automatic program generator by adding the learned results to all automatic program generation functions, recompiling, and sequentially synchronizing. This allows all users to enjoy the learned results in the same way. On the other hand, it is often the case that the resulting programs are unintended, and it is believed that whether or not the intended programs can be generated is important for the generalization of automatic programming.
自動プログラミング機能を持ったシステムにおいて、入力文章に対して、自動プログラミング機能が生成するコードが入力文章の意図したものとは異なる場合が多い。その為自動プログラミング機能を使用する場合、その生成結果を実行し人が確認し、入力を変更しながら本来の意図したプログラムに近づける作業が必要となっている。これを人の介在なしに意図したプログラムの生成を可能にする。 In systems with automatic programming functions, the code generated by the automatic programming function for input text often differs from what was intended by the input text. For this reason, when using an automatic programming function, it is necessary for a human to execute the generated results, check them, and change the input to bring them closer to the originally intended program. This makes it possible to generate the intended program without human intervention.
入力文章から導き出した入力として存在しうるパターンとその入力に対して出力として存在しうるパターンを作成する。その入出力パターンをプログラムの入力に与えて得られる出力の等価性確認を行い、等価確認のできない分岐を非活性化することでプログラムの正確性を得る。 A pattern that can exist as an input derived from the input text and a pattern that can exist as an output for that input are created. The input/output pattern is given to the program input and the output obtained is checked for equivalence. The program's accuracy is achieved by deactivating branches that cannot be checked for equivalence.
自動プログラミング機能におけるユーザの意図とは異なる動作を含むプログラム生成を防止し、人の介在を不要にする。また入力文章によって人が意識しないで、プログラムが自動作成され、実行することで生成AIが、データの作成にとどまらず自由な動作を生成できるようになる。 This prevents the automatic programming function from generating programs that include actions different from the user's intentions, eliminating the need for human intervention. In addition, programs are automatically created based on the input text without the human having to think about it, and by executing them, the generating AI can go beyond creating data to freely generate actions.
以下、本発明の実施の形態を図面に基づいて詳細に説明する。ただし、本発明は多くの異なる態様で実施することが可能であり、本実施の形態の記載内容に限定して解釈すべきではない。なお、実施の形態の全体を通して同じ要素には同じ番号を付するものとする。 The following describes in detail an embodiment of the present invention 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 description of this embodiment. Note that the same elements are designated by the same numbers throughout the embodiments.
以下の実施の形態では、主に方法またはシステムについて説明するが、当業者であれば明らかなとおり、本発明はコンピュータで使用可能なプログラムとしても実施できる。したがって、本発明は、ハードウェアとしての実施形態、ソフトウェアとしての実施形態またはソフトウェアとハードウェアとの組合せの実施形態をとることができる。プログラムは、ハードディスク、DVD-ROM、光記憶装置または磁気記憶装置、半導体記憶装置等の任意のコンピュータ可読媒体に記録できる。 In the following embodiments, a method or system will be mainly described, but as will be apparent to those skilled in the art, the present invention can also be implemented as a program usable by a computer. Thus, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment that combines software and hardware. The program can be recorded on any computer-readable medium, such as a hard disk, a DVD-ROM, an optical storage device, a magnetic storage device, or a semiconductor storage device.
また以下の実施の形態では、一般的なコンピュータシステム等を用いることができる。実施の形態で用いることができるコンピュータシステムやネットワークシステム、人工知能向けシステムは、中央演算処理装置(CPU)、主記憶装置(メインメモリ:RAM)、不揮発性記憶装置(ROM)、コプロセッサ、画像用プロセッサ(GPU)、キャッシュメモリ、入出力制御装置(I/O)、人工知能機能用半導体、フラッシュメモリ等、一般的にコンピュータシステムやネットワークシステム、人工知能向けシステムに備えられるハードウェア資源を備える。また、ハードディスク装置やフラッシュメモリ等の外部記憶装置、インターネット等のネットワークに接続可能な通信手段を備えることができる。コンピュータシステムには、パーソナルコンピュータ、ワークステーション、メインフレームコンピュータ、サーバー等各種のコンピュータやクラウド化されたネットワーク接続されたコンピュータやタブレットコンピュータ、スマートフォン等各種携帯情報端末、人工知能を構成するシステムが含まれる。 In addition, in the following embodiments, a general computer system or the like can be used. The computer system, network system, and system for artificial intelligence that can be used in the embodiments include hardware resources that are generally provided in computer systems, network systems, and systems for artificial intelligence, such as a central processing unit (CPU), a main memory (RAM), a non-volatile memory (ROM), a coprocessor, a graphics processor (GPU), a cache memory, an input/output control device (I/O), semiconductors for artificial intelligence functions, and a flash memory. In addition, the system can include an external memory device such as a hard disk device or a flash memory, and a communication means that can be connected to a network such as the Internet. Computer systems include various computers such as personal computers, workstations, mainframe computers, and servers, cloud-based network-connected computers, tablet computers, various portable information terminals such as smartphones, and systems that constitute artificial intelligence.
本発明は、自動プログラム生成機能、所謂自動プログラミングにおいて、生成AIや自動プログラム生成機能が、ユーザの期待するプログラムとは異なるプログラムを出力する可能性を低くし、入力する文章にあったプログラムの自動生成が可能にすることを目的とするものである。 The present invention aims to reduce the possibility that a generation AI or automatic program generation function, in so-called automatic programming, will output a program that differs from the program expected by the user, and to enable the automatic generation of a program that matches the text entered.
自動プログラミングシステムまたは自動プログラミング機能を持つ生成AIは、入力文章に対して、自動プログラミング機能によってプログラムの自動生成つまり、コードが自動生成できるようになってきた。生成精度が向上するとユーザが意識しない状況においても、自動的にプログラムが生成され自動実行され、結果を得られるようになる。これはアプリケーションソフトウエアを使用しないでも処理が実行できるようになる。一方で模倣やセキュリティリスクが新たに発生することもありうる。 Automatic programming systems or generative AI with automatic programming functions are now able to automatically generate programs, that is, generate code, for input text using the automatic programming function. As generation accuracy improves, programs can be automatically generated and executed, and results can be obtained, even in situations where the user is not aware of it. This means that processing can be carried out without using application software. On the other hand, this could lead to new imitation and security risks.
現状は、自動プログラミング機能を使用することで生成されたプログラム(以下においてプログラムまたはコードとまたはプログラムコードは同意として記述する)は、入力文章の本来の意図したものとは異なるプログラムが生成されることが多い。 Currently, programs (hereinafter referred to as programs or codes or program codes) generated using automatic programming functions often differ from the original intent of the input text.
異なるコードが生成される原因の一つは、学習の不足による文章の解釈が不十分であるがゆえ、プログラムが期待するものと異なったものが出力されるというものである。この問題は、人工知能の学習が深まることによって、精度は向上するが、前後関係や、文脈など学習による精度の向上は、ある一定の精度以上の向上は望めないことがわかっている。 One of the reasons different codes are generated is that a lack of learning leads to insufficient interpretation of the text, resulting in the output being different from what the program expects. This problem can be solved by deepening the AI's learning, and the accuracy can be improved, but it is known that accuracy cannot be improved beyond a certain level by learning context and other factors.
一定以上の精度にならない原因として3つ考えられている。1番目の原因は、ルールの自動作成における精度の問題である。人工知能は、任意のルールエンジンを使用またはルールエンジンそのものを蓄積した情報から学習によって構築したものを使用している。後者の場合ルールエンジンの精度は、人工知能の学習が深まることによって、精度が向上していく。一方で情報の変化とともに変化する為、ある程度の精度以上の向上は望めないことがわかっている。つまり精度が限界点まで達したときに一義的な選択肢ではなく複数の選択肢が存在し続けることがわかっている。これがルールエンジンに起因する原因である。 There are three possible reasons why accuracy does not reach a certain level. The first reason is a problem with the accuracy of the automatic creation of rules. AI uses either an arbitrary rule engine, or a rule engine itself that has been constructed by learning from accumulated information. In the latter case, the accuracy of the rule engine improves as the AI deepens its learning. However, since the accuracy changes as the information changes, it is known that it is not possible to improve beyond a certain level of accuracy. In other words, it is known that when accuracy reaches its limit, multiple options will continue to exist rather than a single unambiguous option. This is a cause that stems from the rule engine.
2番目の原因は、入力文章の解釈の仕方によって異なるとらえ方ができることに起因する。この原因によるものが複数あると、その数だけ異なるコードを生成する可能性が高くなっていく。この対策として画面等において人がコードを組み合わせる作業を行う手法をとるものも存在する。この問題は、文章の前後関係を踏まえた学習からある程度までは精度が向上することはわかってるが、ある一定以上の精度は、文章の前後関係からでは一義的に定義できないことがわかっている。入力文章から作成されるプログラムが、一義的に決まらない場合、定義付けできないことによって結果が発散してしまい、期待する出力とは別に異なる出力を生み出してしまうことにつながっている。これが2つ目の原因である。なお入力文章の情報不足のよるどちらとも判断がつかないことによっても同様なことが起こる。この場合情報不足の解消には、人がプログラミングを行うことと同等な情報の入力によってのみ解決できるが、判断ができない事が原因であるため、現状自動プログラミングでは解決できない。 The second cause is that the input text can be interpreted differently depending on how it is interpreted. If there are multiple causes, the possibility of generating different codes increases accordingly. As a countermeasure, some methods involve a human combining the codes on a screen, etc. It is known that this problem can be solved to a certain extent by learning based on the context of the text, but it is known that accuracy beyond a certain level cannot be uniquely defined based on the context of the text. If the program created from the input text cannot be uniquely determined, the results will diverge due to the inability to define it, leading to the creation of an output that is different from the expected output. This is the second cause. The same thing can also happen when the input text does not contain enough information to make a judgment. In this case, the lack of information can only be resolved by inputting information equivalent to that of a human programming, but since the problem is caused by an inability to make a judgment, it cannot currently be solved by automatic programming.
3番目の原因は、データを加工する場合において、入力つまりはデータパターンが取得元によって異なる場合に起こる。例えばインターネットからの情報を元に加工するプログラム生成の場合、取得したデータを入力データとして使用する場合において、データの形態によって、プログラムにマッチしないものが含まれてしまう場合がある。 The third cause occurs when processing data, and the input, or data pattern, differs depending on the source. For example, when generating a program to process information from the Internet, if the acquired data is used as input data, depending on the form of the data, it may contain data that does not match the program.
ここで生成AIまたは自動プログラミングが一般的になると、汎用的なアプリケーションプログラムを使用しなくても、都度目的に応じた入力文章を入力するだけで結果を得られるということである。どのような入力を使ってどのような処理を行った結果をどのようなな形で出力するかを指定することだけでよい。このことを前提に本発明では前述の3つの原因を解決することで学習で得られる限界点以上の精度を得て意図したプログラムを出力できるようにする。これは自動プログラミングの使用環境が、一般的になることで、ユーザが都度実施したいことを入力することで、目的専用のプログラムが意識しないで作成され実行されることで、結果を得られるということにつなげるためのもの、つまりプログラムを意識しなくてよくなる環境を作ることである。なお前提として深層学習によって解決できない一定以上の部分の解決を目的とする When generative AI or automatic programming becomes commonplace, results can be obtained by simply inputting input text that matches the purpose each time, without the need for a general-purpose application program. All that is required is to specify what input is used, what processing is performed, and how the results are to be output. Based on this premise, this invention solves the three causes mentioned above, thereby achieving accuracy beyond the limit of what can be achieved through learning, and making it possible to output the intended program. This is intended to create an environment in which users do not have to be conscious of the program, as the use environment for automatic programming becomes commonplace, and users can simply input what they want to do each time, and a program dedicated to the purpose is created and executed without them having to be conscious of it, resulting in the achievement of results. The premise is that the purpose is to solve a certain level of problems that cannot be solved by deep learning.
この解決方法として、汎用性を持たせるために起こるルールエンジン、解釈、データの取得元による違いを入力する文章や文節の組み合わせから自動的にプログラムを生成する際に入力する文章や文節の組み合わせの内容から目的に限定し、入力する文章や文節の組み合わせから指定又は想定されるプログラムの入出力に限定すること、つまり入力した内容限定のプログラムとすることで解決する。 The solution to this problem is to limit the content of the sentences and phrases entered when automatically generating a program from a combination of sentences and phrases to the purpose, and to limit the input and output of the program to those specified or expected from the sentences and phrases entered, in other words, to a program that is limited to the content entered.
学習結果などの利用を前提に、プログラム自動生成において、本発明はプログラム生成前に生成するプログラムへの入力データやそのフォーマットを確定、つまりデータを取得し、その取得結果を反映した上でのプログラム生成を基本とする。その入力データを受け入れることが可能なプログラムとして自動生成する。一般的にプログラムを生成後にデータを入力する場合において、不確定、不特定なデータを取得する場合、プログラムが予期しない動作を引き起こす可能性がある。これを避ける為に生成AIまたは自動プログラミングに入力された内容の文または文節の組み合わせから入力しうるデータが何かを特定、取得し、入力を確定させる必要がある。図3の様に入力文章に指定されたものか、外部データから取得したデータから確定させるか、保持済みの内部データから確定させる。 In automatic program generation, assuming the use of learning results, etc., the basis of this invention is to determine the input data and its format for the program to be generated before the program is generated, that is, to acquire the data and generate the program after reflecting the acquired results. The program is automatically generated as one that can accept the input data. Generally, when inputting data after a program is generated, if uncertain or unspecified data is acquired, there is a possibility that the program will cause unexpected behavior. To avoid this, it is necessary to identify and acquire what data can be input from the combination of sentences or phrases entered into the generation AI or automatic programming, and confirm the input. As shown in Figure 3, it is determined from what is specified in the input text, data acquired from external data, or from retained internal data.
生成するプログラムに対して、入力文章または文節の組み合わせに記載された入出力データまたは、入力文章または入力された文節の組み合わせから入力データを取得対象となるシステム外あるいはシステム内から取得する。例えば取得対象が、システム内の場合、データベースからの文章や文節の組み合わせで指定されたデータが対象となる。システム外としてインターネットから取得するデータなどを入力データとする。その入力によって出力すべきデータを入力文章または入力された文節の組み合わせから、または前述の入力データによって期待する出力データを作成する。その入力データをプログラムの入力に与えて得られる出力が前述の出力データと比較し、等価性確認を行い、一致する組み合わせに使用したプログラム内の分岐条件を使用する分岐条件とし、全ての入出力に対して等価性確認を実施した後に、未使用な分岐条件、つまり使用しない分岐条件をマスクする、あるいは削除する。このことにより使用する入力にのみ対応したプログラムを得る。生成するプログラムに対し入出力データによって使用しないはて内部分岐(if やcase)にマスクすることで、生成したプログラム内の分岐のうち、前述の入出力データによって実行しうるプログラム内の分岐以外のプログラム動作を起こさせないようにする。 For the program to be generated, input data is obtained from outside the system or from within the system, either from the input sentence or combination of phrases, or from the input sentence or combination of phrases. For example, if the target is within the system, data specified by the sentence or combination of phrases from the database is the target. Data obtained from the Internet as outside the system is taken as input data. The data to be output from that input is created from the input sentence or combination of phrases, or from the input data mentioned above. The output obtained by providing that input data to the program is compared with the output data mentioned above to perform an equivalence check, and the branch conditions in the program used for the matching combination are set as the branch conditions to be used. After performing an equivalence check for all inputs and outputs, unused branch conditions, that is, unused branch conditions, are masked or deleted. This results in a program that corresponds only to the input to be used. By masking unused internal branches (if and case) for the program to be generated using input and output data, it is possible to prevent program operations other than those in the program that can be executed using the input and output data mentioned above from occurring among the branches in the generated program.
入力文章や文節の組み合わせから、データを入力した結果、プログラム実行後に何を得るかという内容からプログラムへの入力と出力を抽出する。導き出す入力は、入力文書から入力データの内容、フォーマットがあれば、これらを使用する。フォーマットがない場合は、データからフォーマットを得る。データがない場合は、システム外からデータを取得したうえで、データとそのフォーマットを使用する。システム内データを利用する場合は、内部データを取得したうえで、データとそのフォーマットを使用する。出力のデータとフォーマットは入力文章または文節の組み合わせから取得する。データを含まない場合は、文章から一義的に決まるフォーマットを使用する。それを使用しない場合は、学習済みルールから得られるフォーマットを使用する。これらの入力データおよびフォーマットを使用してプログラムに入力し、得られる出力と前述の出力データおよびフォーマットを使用して生成するプログラムの入出力結果と比較する。比較して一致するデータが使用した分岐条件を継続使用し、全ての入出力データおよびフォーマットが使用しなかった分岐条件を取り除く。つまり活性化しない分岐条件をプログラムの選択肢つまりifやcaseなどの分岐条件の選択肢から除外する。最後に不要な分岐条件を全てを無くしたうえで、再度プログラムを生成する。つまり入出力データに関連した分岐条件のみをもったプログラムとなる。これはプログラムに汎用性を持たせるのではなく、入出力データに依存したプログラムにすることによって意図しないプログラムの生成しないことが可能となる。そのうえで機能を追加する場合は、同様に追加する機能に関する入力文章または文節の組み合わせから生成したプログラムについて前記と同様の処理を行ったうえで、機能別にプログラムを持つ形にするか、あるいはそれぞれのプログラムの共通部分を1つにする機能圧縮を行うことで一つのプログラムとして形にすればよい。 The input and output to the program are extracted from the combination of input sentences and phrases based on what is obtained after the program is executed as a result of inputting data from the input document. The derived input uses the contents and format of the input data from the input document if they are 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 the data and its format are used. If data within the system is used, internal data is obtained and the data and its format are used. The output data and format are obtained from the combination of input sentences or phrases. If data is not included, a format uniquely determined from the sentence is used. If that is not used, a format obtained from the learned rules is used. These input data and formats are used to input the program, and the obtained output is compared with the input/output results of the program generated using the aforementioned output data and format. The branching conditions used by the data that matches are continued to be used, and all input/output data and formats are removed from the branching conditions that were not used. In other words, inactive branching conditions are excluded from the program's options, that is, from the options for branching conditions such as if and case. Finally, all unnecessary branching conditions are eliminated, and the program is generated again. In other words, the program has only branching conditions related to the input/output data. This does not make the program versatile, but makes it possible to prevent the generation of unintended programs by making the program dependent on input and output data. If a function is then added, the same processing as described above is carried out on the program generated from the combination of input sentences or phrases related to the function to be added, and then each function can be made into a separate program, or the common parts of each program can be combined into one program by performing function compression.
図1は、解決方法の概要をフロー化したものである。入力文章または文節の組み合わせから入出力データ部分を抽出する。次に入出力データ部分のうちプログラムに入力すべきデータを取得する。次に入力文章または文節の組み合わせからプログラムを自動作成する。次にプログラムに入力データを入力し出力値を取得する。プログラム出力値と入力文章または文節の組み合わせからの出力データを比較する。一致している組み合わせで、プログラム中の分岐が実施された分岐を記録する。全ての入出力データについて市実施した結果をもとにプログラム中のすべての分岐のうち前記記録した分岐に一致しなかったもの、つまり通過しなかった分岐をマスクする。つまり、未使用の分岐の枝分かれ部分を削除するプログラムを修正する。 Figure 1 shows a flow chart outlining the solution. Extract the input/output data portion from the input sentences or combinations of phrases. Next, obtain the data to be input into the program from the input/output data portion. Next, automatically create a program from the input sentences or combinations of phrases. Next, input the input data into the program and obtain the output value. Compare the program output value with the output data from the input sentences or combinations of phrases. For combinations that match, record the branches in the program that were executed. Based on the results of executing all input/output data, mask all branches in the program that do not match the recorded branches, i.e., branches that were not passed through. In other words, modify the program to delete the branching portions of unused branches.
図2は、図1を詳細にしたフロー図である。入力文章または文節の組み合わせから入力データ相当部分および出力データ相当部分をそれぞれ抽出する。また入力文章または文節の組み合わせからプログラムを自動作成する。入力文章または文節の組み合わせのうちプログラムへの入力データに相当する部分から入力データフォーマットを決定する。同様に出力データ相当部分から出力データフォーマットを決定する。次に入力データおよび入力フォーマットに合致したデータを取得または作成する。これにより入力データをより多くする。同様に入力文章または文節の組み合わせから入力データに類似のデータを導き出す。出力データについては、出力データと出力フォーマットに合致し、前述の増やした入力データに対応した出力データを作成する。次にプログラムに入力データを入力し出力値を取得する。プログラム出力値と入力文章または文節の組み合わせからの出力データを比較する。一致している組み合わせで、プログラム中の分岐が実施された分岐を記録する。全ての入出力データについて比較実施した結果をもとにプログラム中のすべての分岐のうち前記記録した分岐に一致しなかったもの、つまり使用しない分岐条件を削除する。最終の入力データと出力データの組み合わせを用いた比較の終了後に、未使用の分岐条件を削除したプログラムを生成する。 Figure 2 is a detailed flow diagram of Figure 1. From the combination of input sentences or phrases, a portion corresponding to input data and a portion corresponding to output data are extracted. A program is automatically created from the combination of input sentences or phrases. An input data format is determined from the portion of the combination of input sentences or phrases that corresponds to the input data to the program. Similarly, an output data format is determined from the portion corresponding to the output data. Next, data that matches the input data and input format is obtained or created. This increases the amount of input data. Similarly, data similar to the input data is derived from the combination of input sentences or phrases. As for the output data, output data that matches the output data and output format and corresponds to the increased input data is created. Next, the input data is input to the program and an output value is obtained. The program output value is compared with the output data from the combination of input sentences or phrases. For the combinations that match, the branch in the program that was executed is recorded. Based on the results of the comparison of all input and output data, all branches in the program that do not match the recorded branches, that is, unused branch conditions, are deleted. After the comparison using the final combination of input data and output data is completed, a program is generated from which unused branch conditions have been deleted.
図3は、図2における入力データが入力文章や文節の組み合わせに含まれている場合や、インターネットや外部記憶装置などから取得してきた場合、またはシステム内のデータベースから取得する場合の入力フォーンマットを決定するフロー図、つまり#で示した部分のフロー図である。入力文章または文節の組み合わせに入力データのフォーマットを含む場合、そのフォーマットを使用する。入力文章または文節の組み合わせに入力データやフォーマットが含まれる場合はそれを使用し、フォーマットを含まない場合はデータからフォーマットを得る。フォーマットを含まない場合で入力データが外部データの場合、その外部データを格納元から取得しサンプルデータを取得しそのフォーマットを使用する。フォーマットを含まない場合で、内部データの場合は、その内部データを格納元から取得しサンプルデータを取得しそのフォーマットを使用する。 Figure 3 is a flow diagram for determining the input format when the input data in Figure 2 is included in the input sentence or combination of phrases, when it has been obtained from the Internet or an external storage device, or when it is obtained from a database within the system, that is, a flow diagram for the part indicated by #. If the input sentence or combination of phrases includes the input data format, that format is used. If the input sentence or combination of phrases includes the input data or format, it is used, and if it does not include the format, the format is obtained from the data. If it does not include the format and the input data is external data, the external data is obtained from the storage source, sample data is obtained, and that format is used. If it does not include the format and the input data is internal data, the internal data is obtained from the storage source, sample data is obtained, and that format is used.
図4は、図2において入力文章や文節の組み合わせに出力フォーマットが含まれている、あるいは一義的に決まる、あるいは学習済みデータまたは学習済みルールから決定するフロー図、つまり#2で示した部分の詳細フロー図である。 Figure 4 is a detailed flow diagram of the part shown in #2 in Figure 2, where the output format is included in the combination of input sentences or phrases, or is uniquely determined, or is determined from learned data or learned rules.
図5は、図2において入力データを入力した場合のプログラム内部の分岐において条件が合致する場合、条件合致フラグを立て、条件合致しないつまり条件合致フラグがアクティブになっていない条件合致フラグに対応した分岐条件をマスク対象とするという例である。図2の自動プログラミングにおいて、全条件分岐つまりIfやcaseのような条件分岐において条件毎に条件合致フラグを作成する。入力データによって条件を満たす場合、この条件合致フラグをアクティブにする。最終入力データ入力後に条件合致フラグが非アクティブの条件分岐をマスクする。その後全条件合致フラグを削除するか残すかは任意となる。 Figure 5 shows an example in which, when a condition is met in a branch within the program in Figure 2 when input data is entered, a condition match flag is set, and the branch conditions corresponding to condition match flags where the condition is not met, i.e., the condition match flag is not active, are masked. In the automatic programming of Figure 2, a condition match 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 match flag is made active. After the final input data is entered, conditional branches with inactive condition match flags are masked. After that, it is up to the user to delete or leave all condition match flags.
過去の傾向や任意のルールに沿った、人工知能システムではなく、ルールそのものをユーザの期待する情報から生成できる、自動プログラミング機能を持ったシステムに応用し、ユーザがインターネットなど不特定多数のデータから情報を自動収集したうえで、加工し出力形態を指定することで、都度欲しい形に加工したものを取得できるシステムなど、ユーザの趣旨に則ったルールによって情報を加工できるシステムが可能になる Instead of using artificial intelligence systems based on past trends or arbitrary rules, this can be applied to systems with automatic programming capabilities that can generate rules based on the information the user expects. This will enable systems that can process information according to rules that meet the user's needs, such as systems where the user can automatically collect information from an unspecified number of sources, such as the Internet, process it, and specify the output format, allowing the user to obtain the processed information in the format they want each time.
取得するデータからプログラムを生成する自動プログラミング機能をもったシステムに応用可能となる。これを利用することで、自分で考え行動するロボットなど学習した結果を元に実行方法を構築したり、その実行方法を元にして実際に実行する自立システムへの応用が可能 This can be applied to systems with automatic programming functions that generate programs from acquired data. By using this, it is possible to create autonomous systems that can build execution methods based on the results of learning, such as robots that think and act on their own, and actually execute based on those execution methods.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2024202054A JP7703197B1 (en) | 2024-11-20 | 2024-11-20 | Automatic programming function that reflects the results of checking input and output in program generation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2024202054A JP7703197B1 (en) | 2024-11-20 | 2024-11-20 | Automatic programming function that reflects the results of checking input and output in program generation |
Publications (1)
Publication Number | Publication Date |
---|---|
JP7703197B1 true JP7703197B1 (en) | 2025-07-07 |
Family
ID=96299253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2024202054A Active JP7703197B1 (en) | 2024-11-20 | 2024-11-20 | Automatic programming function that reflects the results of checking input and output in program generation |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7703197B1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04278632A (en) * | 1991-03-07 | 1992-10-05 | Hitachi Ltd | Software converting/reforming method |
JP2001184241A (en) * | 1999-12-24 | 2001-07-06 | Nec Software Shikoku Ltd | Method and device for automatically generating data base access program, and recording medium |
JP2005055951A (en) * | 2003-08-04 | 2005-03-03 | Canon Software Inc | PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, PROGRAM, AND RECORDING MEDIUM |
US20110093864A1 (en) * | 2009-10-21 | 2011-04-21 | Wood Stephen B | Integrated Workflow Builder |
JP2016048471A (en) * | 2014-08-27 | 2016-04-07 | 日本電気株式会社 | Application development support device, data processing method and program therefor |
JP2019008825A (en) * | 2018-09-12 | 2019-01-17 | 株式会社三菱Ufj銀行 | Application generation support system and application generation support program |
-
2024
- 2024-11-20 JP JP2024202054A patent/JP7703197B1/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04278632A (en) * | 1991-03-07 | 1992-10-05 | Hitachi Ltd | Software converting/reforming method |
JP2001184241A (en) * | 1999-12-24 | 2001-07-06 | Nec Software Shikoku Ltd | Method and device for automatically generating data base access program, and recording medium |
JP2005055951A (en) * | 2003-08-04 | 2005-03-03 | Canon Software Inc | PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, PROGRAM, AND RECORDING MEDIUM |
US20110093864A1 (en) * | 2009-10-21 | 2011-04-21 | Wood Stephen B | Integrated Workflow Builder |
JP2016048471A (en) * | 2014-08-27 | 2016-04-07 | 日本電気株式会社 | Application development support device, data processing method and program therefor |
JP2019008825A (en) * | 2018-09-12 | 2019-01-17 | 株式会社三菱Ufj銀行 | Application generation support system and application generation support program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11561772B2 (en) | Low-code development platform | |
Sergey et al. | Scilla: a smart contract intermediate-level language | |
Lubin et al. | Program sketching with live bidirectional evaluation | |
US20220075710A1 (en) | System and method for improved unit test creation | |
CN117910473B (en) | Event argument extraction method integrating entity type information and related equipment | |
US8302210B2 (en) | System and method for call path enforcement | |
US11442845B2 (en) | Systems and methods for automatic test generation | |
US20240296350A1 (en) | Computed values for knowledge graph | |
CN115390825A (en) | Application program construction method and device and electronic equipment | |
CN111159268B (en) | Method and device for running ETL (extract-transform-load) process in Spark cluster | |
CN119203156A (en) | A NFT smart contract vulnerability detection method based on large language agent | |
JP7703197B1 (en) | Automatic programming function that reflects the results of checking input and output in program generation | |
Chida et al. | Repairing Regex-Dependent String Functions | |
JP2017204201A (en) | Information processing apparatus, compilation method, and compilation program | |
CN113408597A (en) | Java method name recommendation method based on two-stage framework | |
CN117932561A (en) | Method and system for analyzing torque data of coupler | |
US20240143928A1 (en) | Generation of interactive utterances of code tasks | |
CN117234517A (en) | Interface parameter verification method, device, equipment and storage medium | |
Lin et al. | VarGAN: Adversarial Learning of Variable Semantic Representations | |
CN111736806A (en) | Control injection method, device and terminal device | |
CN114115846A (en) | Method, device and equipment for generating application program interface and storage medium | |
CN113191774A (en) | Updatable intelligent contract dynamic verification method | |
Liang et al. | Directional Diffusion-Style Code Editing Pre-training | |
CN117909389B (en) | SQL fuzzy query method, device and storage medium | |
CN113535142A (en) | Method and device for automatically generating Bean copy code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20241126 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20241126 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250326 |
|
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: 20250527 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250617 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7703197 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |