Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4904712B2 - Program automatic generation apparatus, method, and program - Google Patents
[go: Go Back, main page]

JP4904712B2 - Program automatic generation apparatus, method, and program - Google Patents

Program automatic generation apparatus, method, and program Download PDF

Info

Publication number
JP4904712B2
JP4904712B2 JP2005102636A JP2005102636A JP4904712B2 JP 4904712 B2 JP4904712 B2 JP 4904712B2 JP 2005102636 A JP2005102636 A JP 2005102636A JP 2005102636 A JP2005102636 A JP 2005102636A JP 4904712 B2 JP4904712 B2 JP 4904712B2
Authority
JP
Japan
Prior art keywords
program
output point
output
code
point
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.)
Expired - Lifetime
Application number
JP2005102636A
Other languages
Japanese (ja)
Other versions
JP2006285480A (en
Inventor
寛和 徳田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2005102636A priority Critical patent/JP4904712B2/en
Publication of JP2006285480A publication Critical patent/JP2006285480A/en
Application granted granted Critical
Publication of JP4904712B2 publication Critical patent/JP4904712B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、プログラム自動生成装置、方法、およびプログラムに関し、特にプログラムを自動的に生成するプログラム自動生成装置、方法、およびプログラムに関する。   The present invention relates to an automatic program generation device, method, and program, and more particularly, to an automatic program generation device, method, and program for automatically generating a program.

コンピュータプログラムは、テキストエディタなどを使用して設計者が逐次処理内容を文字入力することにより設計が行われていた。しかし、信号処理などのデータのフローを伴うようなプログラムの場合には、信号の流れを図記号を用いて表示すると見通しがよくなるため、図記号で図面を描いて設計を行い、それをもとに設計者がC言語やアセンブラ言語などのプログラム言語を用いてプログラムに変換する。そして、それをクロスコンパイラなどのプログラム製作用のツールを使用して、最終的にコンピュータが実行できるようにしていた。   The computer program has been designed by a designer inputting characters of processing contents sequentially using a text editor or the like. However, in the case of a program that involves a data flow such as signal processing, it is better to see the signal flow using graphic symbols. The designer converts the program into a program using a programming language such as C language or assembler language. Then, using a program production tool such as a cross compiler, the computer can finally execute it.

しかしながら、この方法では、図記号で書いた図面をC言語などのプログラム言語に直すときには単純作業を実施する必要がある。そのため、プログラム開発効率は悪く、また人為的なミスによるプログラム品質の低下を招く原因ともなっていた。   However, with this method, it is necessary to perform a simple operation when converting a drawing written with graphic symbols into a program language such as C language. For this reason, the program development efficiency is poor, and it has been a cause of the deterioration of the program quality due to human error.

そこで、プログラムの開発効率の向上やプログラム品質の向上を目的として、CADによるプログラム入力補助装置を実現し、図記号で書かれた図面からコンピュータが実行できる形式や、一般的な従来技術により最終的にコンピュータが実行できる形式に変形できるC言語などのプログラム言語形式のプログラムを生成したりするための技術が開発されてきた。これらのプログラムの生成のことは、コード生成もしくは、コード自動生成といわれることがある。   Therefore, for the purpose of improving program development efficiency and program quality, a program input auxiliary device using CAD is realized, and finally it is realized by a format that can be executed by a computer from a drawing written in graphic symbols or by a general conventional technique. In addition, a technique for generating a program in a program language format such as C language that can be transformed into a format that can be executed by a computer has been developed. The generation of these programs is sometimes referred to as code generation or code automatic generation.

従来からあるコード自動生成方法および装置としては、たとえば、「画面シフト方式」と呼ばれる手段を具備して画面上の位置をシフトさせることにより、制御プログラムを作る方式があった(たとえば、特許文献1参照。)。また、終端要素から順に前方検索し、コード生成順序を自動決定した後に、自動決定した順序に沿ってコードを生成していくものがあった(たとえば、特許文献2参照。)。
特開昭59−734号公報 特開平5−88869号公報(段落番号〔0077〕〜〔0084〕、図6)
As a conventional code automatic generation method and apparatus, for example, there is a method of creating a control program by shifting the position on the screen by providing means called “screen shift method” (for example, Patent Document 1). reference.). In addition, there is a method in which codes are generated in accordance with the automatically determined order after performing forward search in order from the terminal element and automatically determining the code generation order (see, for example, Patent Document 2).
JP 59-734 Japanese Patent Laid-Open No. 5-88869 (paragraph numbers [0077] to [0084], FIG. 6)

しかし、上記従来技術においても、プログラムを自動生成することは可能であったが、たとえば、上記特許文献1記載の技術を用いるには、CRTなどに表示するなどして、その位置関係を用いてコードの生成順序を確定するという本来のコードの自動生成には無関係な位置情報などを取り扱わなければならないため、プログラムが大規模化するにつれ、コード生成の効率が悪化することは避けられなかった。   However, in the above prior art, it was possible to automatically generate a program. However, for example, in order to use the technique described in Patent Document 1, it is displayed on a CRT or the like and the positional relationship is used. Since it is necessary to handle positional information that is not related to the automatic code generation, which determines the code generation order, it is inevitable that the efficiency of code generation deteriorates as the program becomes larger.

また、上記特許文献2記載の技術を用いると、一度後方からコード生成順序を決定した後、再度前方からコードを生成していくという作業が必要となり、全体として2回走査を行わなければコードが生成できず、やはりプログラムが大規模化するにつれ、コード生成の処理に時間がかかってしまうという問題があった。   In addition, when the technique described in Patent Document 2 is used, it is necessary to once determine the code generation order from the rear and then generate the code from the front again. There is a problem that it takes time to generate the code as the program becomes larger and the program becomes larger.

本発明はこのような点に鑑みてなされたものであり、コード生成に不必要な処理や、冗長な処理を実行せず、プログラムを効率よく自動生成することができるプログラム自動生成装置、方法、およびプログラムを提供することを目的とする。   The present invention has been made in view of such points, and an automatic program generation apparatus, method, and the like that can automatically generate a program efficiently without executing unnecessary processing or redundant processing for code generation. And to provide a program.

本発明では上記課題を解決するために、プログラムを自動的に生成するプログラム自動生成装置において、開始要素、通常要素、終端要素を含むプログラム要素と、前記プログラム要素を結合する結合情報とからなるプログラム情報を記憶するプログラム情報記憶手段と、前記開始要素から、これに接続される前記通常要素を前記結合情報に沿って前記終端要素にいたるまで追跡すると同時に、前記プログラム要素のコードを生成して実行可能なプログラムを生成するプログラム生成手段と、を備え、前記プログラム生成手段は、すべての前記プログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付する識別子付加手段と、前記開始要素および前記通常要素の前記出力点に付された前記識別子を取得して出力点リストを作成するリスト作成手段と、前記通常要素のそれぞれの前記入力点に対して前記通常要素がコード生成可能か否かの属性を持ったフラグを作成するフラグ作成手段と、前記出力点リストから1つの前記出力点を選択して削除する出力点選択手段と、前記出力点選択手段により選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定する要素特定手段と、前記要素特定手段により特定された前記プログラム要素において、前記出力点選択手段により選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更するフラグ属性変更手段と、前記要素特定手段により特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成するコード生成手段と、を有し、前記出力点選択手段による前記出力点の選択および削除、前記要素特定手段による前記プログラム要素の特定、前記フラグ属性変更手段による属性の変更、前記コード生成手段によるコードの生成が可能か否かの判定およびコードの生成、およびコードを生成した前記通常要素の前記出力点の前記リスト作成手段による前記出力点リストへの格納を、前記出力点リストに格納されている前記出力点がなくなるまで繰り返すことを特徴とするプログラム自動生成装置が提供される。 In the present invention, in order to solve the above-mentioned problem, in a program automatic generation apparatus that automatically generates a program, a program comprising a program element including a start element, a normal element, and an end element, and coupling information for combining the program elements Program information storage means for storing information, and tracing the normal element connected to the start element from the start element to the end element along with the combination information, and simultaneously generating and executing the code of the program element Program generating means for generating a possible program, and the program generating means includes an input point that is a point at which a signal is input and an output point that is a point at which the signal is output for all the program elements. Identifier adding means for assigning a unique identifier to each of the starting element and the output point of the normal element Creating a list of output points by obtaining the identifier and a flag having an attribute indicating whether the normal element can generate code for each input point of the normal element The program comprising: a flag creation unit; an output point selection unit that selects and deletes one output point from the output point list; and the input point coupled to the output point selected by the output point selection unit An element specifying means for specifying an element, and an attribute capable of generating a code for the flag of the input point coupled to the output point selected by the output point selecting means in the program element specified by the element specifying means Flag attribute changing means for changing to the above, and the flags of all the input points of the program element specified by the element specifying means are copied. And code generation means for generating a code corresponding to said program element when it is changed to de generation possible attributes, possess, select and delete the output point by the output point selecting means, by the element identification means Identification of the program element, change of attribute by the flag attribute changing means, determination of whether or not code generation by the code generation means is possible and generation of code, and the output point of the normal element that has generated code There is provided an automatic program generation device characterized in that storage in the output point list by the list creating means is repeated until there are no more output points stored in the output point list .

このようなプログラム自動生成装置によれば、プログラム情報記憶手段により、開始要素、通常要素、終端要素を含むプログラム要素と、プログラム要素を結合する結合情報とからなるプログラム情報が記憶され、プログラム生成手段により、開始要素から、これに接続される通常要素を結合情報に沿って終端要素にいたるまで追跡すると同時に、プログラム要素コード生成して実行可能なプログラムが生成される。 According to such an automatic program generation device, the program information storage means stores program information including a program element including a start element, a normal element, and an end element, and coupling information for connecting the program elements. As a result, the normal element connected to the start element is traced from the start element to the end element along the coupling information, and at the same time, a program that can be executed by generating the code of the program element is generated.

また、本発明では、プログラムを自動的に生成するプログラム自動生成方法において、開始要素、通常要素、終端要素を含むすべてのプログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付加する第1ステップと、すべての前記開始要素の前記出力点に付された前記識別子を取得して出力点リストを作成する第2ステップと、前記通常要素のそれぞれの前記入力点に対してコード生成不可の属性に設定したフラグを作成する第3ステップと、前記出力点リストから1つの前記出力点を選択して削除し、選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定し、特定された前記プログラム要素において、選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更する第4ステップと、特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成し、コードを生成した前記プログラム要素の前記出力点に付された前記識別子を取得して前記出力点リストに格納する第5ステップと、を有し、前記第4ステップにて前記出力点リストからの前記出力点の選択に成功しなくなるまで前記第4ステップおよび前記第5ステップを繰り返すことを特徴とするプログラム自動生成方法が提供される。 Further, in the present invention, in the automatic program generation method for automatically generating a program, an input point and a signal are output to all program elements including a start element, a normal element, and a termination element. A first step of adding a unique identifier to each output point that is a point to be generated; a second step of acquiring the identifiers attached to the output points of all the start elements and creating an output point list; A third step of creating a flag set in the code generation disabled attribute for each input point of the normal element, and selecting and deleting one of the output points from the output point list The program element having the input point coupled to the output point is identified, and the input coupled to the selected output point is identified in the identified program element. A fourth step of changing the flag of a point to an attribute capable of generating a code; and the program element when the flags of all the input points of the identified program element are changed to an attribute capable of generating a code And a fifth step of acquiring the identifier attached to the output point of the program element that has generated the code and storing the identifier in the output point list. Thus, there is provided an automatic program generation method characterized by repeating the fourth step and the fifth step until the output point from the output point list is not successfully selected.

このようなプログラム自動生成方法によれば、開始要素から、これに接続される通常要素を結合情報に沿って終端要素にいたるまで追跡すると同時に、プログラム要素コード生成して実行可能なプログラムが生成される。 According to such a program automatic generation method, a start element, and at the same time to track down the end element along the normal elements connected thereto to bond information, generates and executable program code of the program elements Is generated.

また、本発明では、コンピュータに、開始要素、通常要素、終端要素を含むすべてのプログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付する識別子付加手段、前記開始要素および前記通常要素の前記出力点に付された前記識別子を取得して出力点リストを作成するリスト作成手段、前記通常要素のそれぞれの前記入力点に対して前記通常要素がコード生成可能か否かの属性を持ったフラグを作成するフラグ作成手段、前記出力点リストから1つの前記出力点を選択して削除し、選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定し、特定された前記プログラム要素において、選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更し、特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成し、前記リスト作成手段によりコードを生成した前記プログラム要素である前記通常要素の前記出力点に付された前記識別子を取得して前記出力点リストに格納する処理を、前記出力点リストに格納されている前記出力点がなくなるまで繰り返す手段、として機能させるためのプログラム自動生成プログラムが提供される。 Further, according to the present invention, the input point, which is a point at which a signal is input, and the output point, which is a point at which a signal is output, for all program elements including a start element, a normal element, and a termination element, respectively. Identifier adding means for assigning a unique identifier, list creation means for obtaining the identifier attached to the output point of the start element and the normal element and creating an output point list, and the input points of each of the normal elements the flag generation means for normally element to create a flag having whether attribute code can be generated, and select and delete one of the output point from the output point list, the output point is selected with respect to identifying the program element having the input point that is coupled to, in particular has been the program element, the flag of the input point coupled to the output point is selected Change in over de generatable attributes, it generates a code corresponding to said program element when the flags of all of the input point having specific to said program element is changed to the attributes of the code can be generated The process of acquiring the identifier attached to the output point of the normal element that is the program element for which the code is generated by the list creating means and storing the identifier in the output point list is stored in the output point list. There is provided an automatic program generation program for functioning as a means for repeating until the output points are eliminated .

このようなプログラム自動生成プログラムによれば、開始要素から、これに接続される通常要素を結合情報に沿って終端要素にいたるまで追跡すると同時に、プログラム要素コード生成して実行可能なプログラムが生成される。 According to such a program automatically generated program, a start element, and at the same time to track down the end element along the normal elements connected thereto to bond information, generates and executable program code of the program elements Is generated.

本発明のプログラム自動生成装置、方法、およびプログラムによれば、開始要素から終端要素にいたるまで追跡すると同時に、プログラム要素コード生成して実行可能なプログラムが生成されるので、前方から1回走査するだけでコードの生成を実現することでき、コード生成の効率を良好にすることができる。
According to the automatic program generation device, method, and program of the present invention, since tracing is performed from the start element to the end element and at the same time, a code of the program element is generated and an executable program is generated, the program is generated once from the front. Code generation can be realized only by scanning, and the efficiency of code generation can be improved.

〔第1の実施の形態〕
以下、本発明の実施の形態を図面を参照して詳細に説明する。
図1は、本実施の形態に適用される発明の概念図である。図1に示すように、プログラム自動生成装置1には、入力手段2と、表示手段3とが接続されている。また、プログラム自動生成装置1は、プログラム情報4を記憶するプログラム情報記憶手段1aと、プログラム情報4からプログラムを生成するプログラム生成手段1bと、プログラム生成手段1bが生成した生成プログラム1cとを有する。
[First Embodiment]
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a conceptual diagram of the invention applied to this embodiment. As shown in FIG. 1, an input unit 2 and a display unit 3 are connected to the automatic program generation device 1. The automatic program generation apparatus 1 includes a program information storage unit 1a for storing program information 4, a program generation unit 1b for generating a program from the program information 4, and a generation program 1c generated by the program generation unit 1b.

プログラム情報記憶手段1aは、ユーザが入力手段2を用いて入力したプログラム情報4を記憶し、表示手段3と、プログラム生成手段1bとにプログラム情報4を出力する。プログラム生成手段1bは、プログラム情報記憶手段1aから受け取ったプログラム情報4を用いてプログラム生成を行う。そして、生成プログラム1cは、プログラム生成手段1bが生成したプログラムである。また、表示手段3は、プログラム情報記憶手段1aから受け取ったプログラム情報4を表示する。   The program information storage unit 1a stores the program information 4 input by the user using the input unit 2, and outputs the program information 4 to the display unit 3 and the program generation unit 1b. The program generation unit 1b generates a program using the program information 4 received from the program information storage unit 1a. The generation program 1c is a program generated by the program generation unit 1b. The display means 3 displays the program information 4 received from the program information storage means 1a.

図2は、本実施の形態に係るシステム構成例を示す図である。図2に示すように、プログラム自動生成装置100は、ネットワーク200を介して大型プラント300と接続されている。プログラム自動生成装置100は、ユーザから入力されたプログラム情報を元にプログラムを自動生成する。そして、プログラム自動生成装置100は、その生成したプログラムを、ネットワーク200を介して大型プラント300へ送信して、大型プラント300を制御し、動作させる。   FIG. 2 is a diagram illustrating a system configuration example according to the present embodiment. As shown in FIG. 2, the automatic program generation device 100 is connected to a large plant 300 via a network 200. The automatic program generation device 100 automatically generates a program based on program information input from a user. Then, the automatic program generation device 100 transmits the generated program to the large plant 300 via the network 200 to control and operate the large plant 300.

図3は、本実施の形態に係るプログラム自動生成装置のハードウェア構成例である。プログラム自動生成装置100は、CPU(Central Processing Unit)101によって装置全体が制御されている。CPU101には、バス107を介してRAM(Random Access Memory)102、ハードディスクドライブ(HDD:Hard Disk Drive)103、グラフィック処理装置104、入力インタフェース105、および通信インタフェース106が接続されている。   FIG. 3 is a hardware configuration example of the automatic program generation device according to the present embodiment. The entire automatic program generation apparatus 100 is controlled by a CPU (Central Processing Unit) 101. A random access memory (RAM) 102, a hard disk drive (HDD) 103, a graphic processing device 104, an input interface 105, and a communication interface 106 are connected to the CPU 101 via a bus 107.

RAM102には、CPU101に実行させるOSのプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM102には、CPU101による処理に必要な各種データが格納される。HDD103には、OSやアプリケーションプログラムが格納される。   The RAM 102 temporarily stores at least a part of OS programs and application programs to be executed by the CPU 101. The RAM 102 stores various data necessary for processing by the CPU 101. The HDD 103 stores an OS and application programs.

グラフィック処理装置104には、モニタ11が接続されている。グラフィック処理装置104は、CPU101からの命令に従って、画像をモニタ11の画面に表示させる。入力インタフェース105には、キーボード12とマウス13とが接続されている。入力インタフェース105は、キーボード12やマウス13から送られてくる信号を、バス107を介してCPU101に送信する。   A monitor 11 is connected to the graphic processing device 104. The graphic processing device 104 displays an image on the screen of the monitor 11 in accordance with a command from the CPU 101. A keyboard 12 and a mouse 13 are connected to the input interface 105. The input interface 105 transmits a signal transmitted from the keyboard 12 or the mouse 13 to the CPU 101 via the bus 107.

通信インタフェース106は、ネットワーク200に接続されている。通信インタフェース106は、ネットワーク200を介して、他のコンピュータとの間でデータの送受信を行う。以上のようなハードウェア構成によって、本実施の形態の処理機能を実現することができる。   The communication interface 106 is connected to the network 200. The communication interface 106 transmits / receives data to / from other computers via the network 200. With the hardware configuration as described above, the processing functions of the present embodiment can be realized.

次に、プログラム自動生成装置100が有する処理機能について説明する。
図4は、プログラム自動生成装置の処理機能を示す図である。図4に示すように、プログラム自動生成装置100は、モニタ11と、キーボード12が接続されている。また、プログラム自動生成装置100は、プログラム生成部110と、プログラム情報記憶部120と、生成プログラム130とを有している。
Next, processing functions of the automatic program generation device 100 will be described.
FIG. 4 is a diagram illustrating processing functions of the automatic program generation device. As shown in FIG. 4, the automatic program generation device 100 is connected to a monitor 11 and a keyboard 12. The automatic program generation device 100 includes a program generation unit 110, a program information storage unit 120, and a generation program 130.

プログラム情報記憶部120は、ユーザからキーボード12を介してプログラム情報400を受け、記憶する。また、プログラム情報記憶部120は、プログラム情報表示指示の信号を受信すると、モニタ11に対してプログラム情報400を出力する。   The program information storage unit 120 receives and stores the program information 400 from the user via the keyboard 12. Further, when receiving a program information display instruction signal, the program information storage unit 120 outputs the program information 400 to the monitor 11.

プログラム生成部110は、識別番号付加部111と、リスト作成部112と、フラグ作成部113と、出力点選択部114と、要素特定部115と、フラグ属性変更部116と、コード生成部117とを有している。   The program generation unit 110 includes an identification number addition unit 111, a list creation unit 112, a flag creation unit 113, an output point selection unit 114, an element specification unit 115, a flag attribute change unit 116, a code generation unit 117, have.

識別番号付加部111は、プログラム情報400の構成要素のすべての入力点および出力点に対して、一意な識別番号を付加する。また、リスト作成部112は、プログラム情報400の開始要素を検出し、開始要素の出力点に付されている識別番号を検出し、検出した識別番号をリスト化した出力点リストを作成する。   The identification number adding unit 111 adds a unique identification number to all input points and output points of the constituent elements of the program information 400. The list creation unit 112 detects the start element of the program information 400, detects the identification number assigned to the output point of the start element, and creates an output point list in which the detected identification numbers are listed.

フラグ作成部113は、プログラム情報400のすべての通常要素の入力点に対して、その入力点を有する通常要素をコード生成部117がコード生成することが可能か否かを示す属性を記憶させるフラグを設ける。   The flag creation unit 113 stores an attribute indicating whether or not the code generation unit 117 can generate a code for a normal element having the input point for all normal element input points of the program information 400. Is provided.

出力点選択部114は、出力点リストに格納された識別番号から、対応する出力点を1つ選択する。また、選択した出力点を出力点リストから削除する。要素特定部115は、出力点選択部114が選択した出力点に対応する入力点を持つプログラム要素を特定する。   The output point selection unit 114 selects one corresponding output point from the identification numbers stored in the output point list. Also, the selected output point is deleted from the output point list. The element specifying unit 115 specifies a program element having an input point corresponding to the output point selected by the output point selecting unit 114.

フラグ属性変更部116は、出力点選択部114が選択した出力点に対応する入力点に設けられているフラグの属性を変更する。また、コード生成部117は、コード生成を行おうとしている通常要素のすべての入力点のフラグの属性が生成可能になっていることを確認して、コード生成を行う。   The flag attribute changing unit 116 changes the attribute of the flag provided at the input point corresponding to the output point selected by the output point selecting unit 114. In addition, the code generation unit 117 performs code generation after confirming that the flag attributes of all the input points of the normal element for which code generation is to be performed can be generated.

プログラム情報400については、図6以降で処理の内容とともに詳述する。
次に、プログラム自動生成装置100により行われる処理の説明をする。まずは、フローチャートを使ってプログラム自動生成処理の概要を説明し、その後、具体的な表示例を用いて処理手順を説明する。
The program information 400 will be described in detail together with the contents of processing in FIG.
Next, processing performed by the automatic program generation device 100 will be described. First, an outline of the program automatic generation processing will be described using a flowchart, and then the processing procedure will be described using a specific display example.

図5は、本実施の形態のプログラム自動生成処理の手順を示すフローチャートである。以下、図5に示す処理をステップ番号に沿って説明する。
〔ステップS11〕識別番号付加部111は、プログラム情報400の構成要素のすべての入力点および出力点に対して、一意な識別番号を付する。次に、リスト作成部112は、プログラム情報400の開始要素を検出し、開始要素の出力点に付されている識別番号を検出し、検出した識別番号をリスト化した出力点リストを作成する。
FIG. 5 is a flowchart showing a procedure of automatic program generation processing according to the present embodiment. Hereinafter, the process illustrated in FIG. 5 will be described in order of step number.
[Step S11] The identification number adding unit 111 assigns a unique identification number to all input points and output points of the constituent elements of the program information 400. Next, the list creation unit 112 detects the start element of the program information 400, detects the identification number assigned to the output point of the start element, and creates an output point list in which the detected identification numbers are listed.

また、フラグ作成部113は、プログラム情報400のすべての通常要素の入力点に対して、その入力点を有する通常要素をコード生成部117がコード生成することが可能か否かを示す属性を記憶させるフラグを設ける。この識別番号付加処理と、出力点リスト作成処理と、フラグ作成処理の3つの作業をあわせて初期化処理という。なお、初期化処理のとき、フラグ作成部113が作成したすべてのフラグは処理が不可を示す属性に設定しておく。   Further, the flag creation unit 113 stores an attribute indicating whether or not the code generation unit 117 can generate code for the normal elements having the input points with respect to the input points of all the normal elements of the program information 400. Provide a flag to be used. The three operations of the identification number adding process, the output point list creating process, and the flag creating process are collectively called initialization process. In the initialization process, all the flags created by the flag creation unit 113 are set to attributes indicating that the process is impossible.

〔ステップS12〕出力点選択部114は、出力点リストに格納された識別番号から、任意の出力点を1つ選択する。
〔ステップS13〕出力点選択部114は、出力点の選択に成功した場合は、処理をステップS14へ進め、出力点の選択に成功しなかった場合は、処理を終了する。
[Step S12] The output point selection unit 114 selects one arbitrary output point from the identification numbers stored in the output point list.
[Step S13] If the output point selection unit 114 has succeeded in selecting an output point, the output point selection unit 114 proceeds to step S14. If the output point selection has not been successfully completed, the output point selection unit 114 ends the processing.

〔ステップS14〕出力点選択部114は、出力点リストから選択した識別番号を削除する。また、要素特定部115は、出力点選択部114が選択した出力点に対応する入力点を持つプログラム要素を特定する。   [Step S14] The output point selection unit 114 deletes the selected identification number from the output point list. The element specifying unit 115 specifies a program element having an input point corresponding to the output point selected by the output point selecting unit 114.

〔ステップS15〕要素特定部115は、特定した要素が通常要素であるか否かを判断する。通常要素であると判断した場合は、処理をステップS16へ進め、通常要素でないと判断した場合は、処理をステップS12へ進める。   [Step S15] The element specifying unit 115 determines whether or not the specified element is a normal element. If it is determined that the element is a normal element, the process proceeds to step S16. If it is determined that the element is not a normal element, the process proceeds to step S12.

〔ステップS16〕フラグ属性変更部116は、出力点選択部114が選択した出力点に対応する入力点に設けられているフラグの属性を生成可能に変更する。
〔ステップS17〕コード生成部117は、コード生成を行おうとしている通常要素のすべての入力点のフラグの属性が生成可能になっているか否かを判断する。すべてのフラグの属性が生成可能になっている場合は、処理をステップS18へ進め、すべてのフラグの属性が生成可能になっていない場合は、処理をステップS12へ進める。
[Step S16] The flag attribute changing unit 116 changes the attribute of the flag provided at the input point corresponding to the output point selected by the output point selecting unit 114 so as to be generated.
[Step S17] The code generation unit 117 determines whether or not the flag attributes of all input points of the normal element for which code generation is to be performed can be generated. If all the flag attributes can be generated, the process proceeds to step S18. If all the flag attributes cannot be generated, the process proceeds to step S12.

〔ステップS18〕コード生成部117は、要素特定部115によって特定された通常要素のコード生成を行う。
〔ステップS19〕リスト作成部112は、コード生成部117によってコード生成が行われた通常要素のすべての出力点を読み込み、出力点リストに格納する。
[Step S18] The code generation unit 117 generates code for the normal element specified by the element specification unit 115.
[Step S19] The list creation unit 112 reads all the output points of the normal elements for which code generation has been performed by the code generation unit 117, and stores them in the output point list.

以上が、プログラム自動生成装置100が行う、プログラム自動生成処理の概要である。続いて、プログラム情報400の表示例を使って処理手順を説明する。
図6は、本実施の形態の表示装置に表示されるプログラム情報の概要を示す図である。図6に示すように、プログラム情報400は、開始要素411、412と、通常要素421、422、423、424、425と、終端要素431とを備えている。開始要素411、412は、プログラムの端点に相当するものであり、具体的には、外部入力部である。
The above is the outline of the automatic program generation process performed by the automatic program generation apparatus 100. Next, the processing procedure will be described using a display example of the program information 400.
FIG. 6 is a diagram showing an outline of program information displayed on the display device of the present embodiment. As shown in FIG. 6, the program information 400 includes start elements 411 and 412, normal elements 421, 422, 423, 424 and 425, and a terminal element 431. The start elements 411 and 412 correspond to the end points of the program, and specifically are external input units.

通常要素421、422、423、424、425は、プログラム自動生成装置100が生成したプログラムを動かすコンピュータにおいて実行される処理内容を、機能単位にまとめたものである。具体的には、サブルーチンのようなものであり、C言語では関数である。   The normal elements 421, 422, 423, 424, and 425 are obtained by collecting the processing contents executed in the computer that runs the program generated by the automatic program generation device 100 into functional units. Specifically, it is like a subroutine and is a function in the C language.

終端要素431は、プログラムの端点に相当するものであり、具体的には外部出力部である。識別番号付加部111は、プログラム情報400の各構成要素の出力点と入力点に一意な識別番号を付す。識別番号付加部111によって識別番号が付加されたプログラム情報400を図7に示す。   The termination element 431 corresponds to the end point of the program, and is specifically an external output unit. The identification number adding unit 111 assigns a unique identification number to the output point and input point of each component of the program information 400. The program information 400 to which the identification number is added by the identification number adding unit 111 is shown in FIG.

図7は、本実施の形態のプログラム情報の構成要素に識別番号が付された状態を示す図である。図7に示すように、プログラム情報400の各プログラム要素の入力点、および出力点には識別番号が付加されている。このとき、リスト作成部112は、開始要素411、412の出力点に付された識別番号を読み取り、出力点リストを作成する。リスト作成部112によって作成された出力点リストを図8に示す。   FIG. 7 is a diagram showing a state in which identification numbers are assigned to the constituent elements of the program information according to the present embodiment. As shown in FIG. 7, identification numbers are added to the input points and output points of each program element of the program information 400. At this time, the list creation unit 112 reads the identification numbers given to the output points of the start elements 411 and 412 and creates an output point list. The output point list created by the list creation unit 112 is shown in FIG.

図8は、本実施の形態の出力点リストのデータ構造を示す図である。図8に示すように、初期化処理が行われた後の出力点リスト500には、開始要素411、412の出力点に付された識別番号が格納されている。本実施の形態においては、開始要素411の出力点の1と、開始要素412の出力点の10が格納されている。   FIG. 8 is a diagram illustrating a data structure of the output point list according to the present embodiment. As shown in FIG. 8, the output point list 500 after the initialization process stores the identification numbers assigned to the output points of the start elements 411 and 412. In the present embodiment, 1 of the output points of the start element 411 and 10 of the output points of the start element 412 are stored.

次に、フラグ作成処理について説明する。
図9は、本実施の形態の通常要素の入力点にフラグが設けられた状態を示す図である。図9に示すように、フラグ作成部113は、通常要素421、422、423、424、425の入力点に対して、通常要素421、422、423、424、425のコード生成の可否を示すフラグを設ける。
Next, the flag creation process will be described.
FIG. 9 is a diagram illustrating a state in which a flag is provided at an input point of a normal element according to the present embodiment. As illustrated in FIG. 9, the flag creation unit 113 indicates whether or not code generation of the normal elements 421, 422, 423, 424, and 425 is possible for the input points of the normal elements 421, 422, 423, 424, and 425. Is provided.

初期化処理が行われた後のフラグは黒丸となっている。黒丸は、各フラグに対応する通常要素のコード生成が不可能であることを示している。なお、通常要素421、422、423、424、425のコード生成が可能な場合、フラグを白丸で表す。   The flag after the initialization process is a black circle. Black circles indicate that code generation of normal elements corresponding to each flag is impossible. When code generation of the normal elements 421, 422, 423, 424, 425 is possible, the flag is represented by a white circle.

出力点選択部114は、コード生成開始信号を受けると、出力点リスト500から出力点を1つ選択して読み出す。本実施の形態においては、出力点リスト500には1と10が格納されており、出力点選択部114は1と10のどちらを選んでもよいが、ここでは1を選んだとして説明する。出力点選択部114は、出力点リスト500から1を選ぶと、出力点リスト500から選んだ1を削除する。出力点リスト500は、1が削除されると図10のようになる。   When receiving the code generation start signal, the output point selection unit 114 selects and reads one output point from the output point list 500. In this embodiment, 1 and 10 are stored in the output point list 500, and the output point selection unit 114 may select either 1 or 10, but here, it is assumed that 1 is selected. When selecting 1 from the output point list 500, the output point selection unit 114 deletes 1 selected from the output point list 500. The output point list 500 is as shown in FIG. 10 when 1 is deleted.

図10は、出力点選択部が出力点リストから1が削除した後の出力点リストを示す図である。図10に示すように、出力点選択部114が出力点リスト500から1を削除すると、出力点リスト500には10だけが残される。また、フラグ属性変更部116は、出力点選択部114によって出力点リスト500から出力点が選択され、選択された出力点に対応する入力点を有するプログラム要素が要素特定部115によって特定されると、特定されたプログラム要素が通常要素か否かを判断する。図9においては、特定されたプログラム要素は通常要素であるので、選択された出力点に対応する入力点のフラグの属性がフラグ属性変更部116によって変更される。フラグが変更された後のプログラム情報400を図11に示す。   FIG. 10 is a diagram illustrating the output point list after the output point selection unit has deleted 1 from the output point list. As illustrated in FIG. 10, when the output point selection unit 114 deletes 1 from the output point list 500, only 10 remains in the output point list 500. Further, when the output point selection unit 114 selects an output point from the output point list 500, the flag attribute changing unit 116 specifies a program element having an input point corresponding to the selected output point by the element specifying unit 115. Then, it is determined whether or not the specified program element is a normal element. In FIG. 9, since the identified program element is a normal element, the flag attribute changing unit 116 changes the flag attribute of the input point corresponding to the selected output point. FIG. 11 shows the program information 400 after the flag is changed.

図11は、出力点選択部が出力点リストから1を選んだ後のプログラム情報を示す図である。図11に示すように、出力点リスト500から1が選択されたことによって特定された通常要素421の入力点のフラグが白丸になっている。このとき、コード生成部117は、特定された通常要素が有するすべての入力点の属性が変更されているか否かを判断する。   FIG. 11 is a diagram showing program information after the output point selection unit selects 1 from the output point list. As shown in FIG. 11, the flag of the input point of the normal element 421 specified by selecting 1 from the output point list 500 is a white circle. At this time, the code generation unit 117 determines whether or not the attributes of all input points of the specified normal element have been changed.

図11においては、特定された通常要素の有するすべての入力点の属性が変更になっている。このとき、コード生成部117は、その通常要素のコード生成を行う。コード生成部117によってコード生成がされた結果を図12に示す。   In FIG. 11, the attributes of all input points of the specified normal element are changed. At this time, the code generation unit 117 performs code generation of the normal element. The result of code generation by the code generation unit 117 is shown in FIG.

図12は、通常要素がコード生成されたときの具体例を示す図である。通常要素421、422、423、424、425がコード生成されると、各通常要素内に表示されているアルファベットa〜eに対応するコードa();〜e();が生成されるとして説明する。   FIG. 12 is a diagram illustrating a specific example when a normal element is code-generated. When normal elements 421, 422, 423, 424, and 425 are generated, it is assumed that codes a (); to e (); corresponding to alphabets a to e displayed in the respective normal elements are generated. To do.

図12に示すように、通常要素421がコード生成されている。図12においては、C言語でコード生成された場合の書式の例を示している。また、コード生成の部分を明確にするために、関数宣言部などの表記は省略してある。リスト作成部112は、コード生成部117が1つのコード生成が終了すると、コード生成が終了した通常要素421の出力点を検出し、その出力点の識別番号を検出する。そして、検出した識別番号を出力点リスト500に格納する。このときの出力点リスト500の状態を図13に示した。   As shown in FIG. 12, the normal element 421 is generated as a code. FIG. 12 shows an example of a format when code is generated in C language. In addition, in order to clarify the code generation part, notation such as a function declaration part is omitted. When the code generation unit 117 finishes generating one code, the list creation unit 112 detects the output point of the normal element 421 for which code generation has been completed, and detects the identification number of the output point. The detected identification number is stored in the output point list 500. The state of the output point list 500 at this time is shown in FIG.

図13は、出力点リストの状態を示した図である。図13に示すように、出力点リスト500には、図10のときに残っていた10と、図12の処理で新たに付け加わった3が格納されている。   FIG. 13 shows the state of the output point list. As illustrated in FIG. 13, the output point list 500 stores 10 remaining in FIG. 10 and 3 newly added in the process of FIG. 12.

これ以降のコード生成処理は、図9から図13で示した処理を繰り返す。そこで図14以降では、プログラム情報400の表示例と、出力点リスト500のデータ構造と、コード生成された生成プログラム130の結果例の3つを1つの図に表し、各々の状態の遷移を説明する。   In the subsequent code generation processing, the processing shown in FIGS. 9 to 13 is repeated. Therefore, in FIG. 14 and subsequent figures, three examples of the display example of the program information 400, the data structure of the output point list 500, and the result example of the generated code 130 are shown in one figure, and each state transition is explained. To do.

図14は、通常要素422が特定されたときの各々の状態を示す図であり、図14(A)は、通常要素422が特定されたときの出力点リストのデータ構造を示す図であり、図14(B)は、通常要素422が特定されたときのプログラム情報の表示例であり、図14(C)は、通常要素422が特定されたときのコード生成されたプログラムを示す図である。   FIG. 14 is a diagram showing each state when the normal element 422 is specified, and FIG. 14A is a diagram showing the data structure of the output point list when the normal element 422 is specified, FIG. 14B is a display example of program information when the normal element 422 is specified, and FIG. 14C is a diagram showing a code-generated program when the normal element 422 is specified. .

出力点選択部114は、出力点リスト500から出力点を1つ選択しようとする。出力点リスト500には3と10が格納されている。図14(A)に示すように、出力点選択部114は、出力点選択部114が3を選択した場合、出力点リスト500から3を削除する。そして、要素特定部115は、出力点3に対応する入力点4を有する通常要素422を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 500. The output point list 500 stores 3 and 10. As illustrated in FIG. 14A, when the output point selection unit 114 selects 3, the output point selection unit 114 deletes 3 from the output point list 500. Then, the element specifying unit 115 specifies the normal element 422 having the input point 4 corresponding to the output point 3.

図14(B)に示すように、フラグ属性変更部116は、入力点4を有する通常要素422が特定されると、入力点4のフラグの属性を変更する。図14(C)に示すように、コード生成部117は、入力点4を有する通常要素422のすべての入力点のフラグの属性が生成可能に変更されていないので、通常要素422のコード生成は行わない。   As shown in FIG. 14B, when the normal element 422 having the input point 4 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 4. As shown in FIG. 14C, the code generation unit 117 does not change the attributes of the flags of all the input points of the normal element 422 having the input point 4 so that it can be generated. Not performed.

図15は、通常要素424が特定されたときの各々の状態を示す図であり、図15(A)は、通常要素424が特定されたときの出力点リストのデータ構造を示す図であり、図15(B)は、通常要素424が特定されたときのプログラム情報の表示例であり、図15(C)は、通常要素424が特定されたときのコード生成されたプログラムを示す図である。   FIG. 15 is a diagram illustrating each state when the normal element 424 is specified, and FIG. 15A is a diagram illustrating a data structure of the output point list when the normal element 424 is specified. FIG. 15B is a display example of program information when the normal element 424 is specified, and FIG. 15C is a diagram showing a code-generated program when the normal element 424 is specified. .

出力点選択部114は、出力点リスト500から出力点を1つ選択しようとする。出力点リスト500には10が格納されている。図15(A)に示すように、出力点選択部114は、出力点選択部114が10を選択した場合、出力点リスト500から10を削除する。そして、要素特定部115は、出力点10に対応する入力点11を有する通常要素424を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 500. 10 is stored in the output point list 500. As illustrated in FIG. 15A, when the output point selection unit 114 selects 10, the output point selection unit 114 deletes 10 from the output point list 500. Then, the element specifying unit 115 specifies the normal element 424 having the input point 11 corresponding to the output point 10.

図15(B)に示すように、フラグ属性変更部116は、入力点11を有する通常要素424が特定されると、入力点11のフラグの属性を変更する。図15(C)に示すように、コード生成部117は、入力点11を有する通常要素424のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素424のコード生成を行う。
As shown in FIG. 15 (B), the flag attribute change unit 116 is normally element 424 having an input point 11 is identified, change the attributes of the flag of the input point 11. As shown in FIG. 15C, the code generation unit 117 changes the flag attributes of all the input points of the normal element 424 having the input point 11 so that it can be generated. Do.

図16は、通常要素424のコード生成が行われたときの各々の状態を示す図であり、図16(A)は、通常要素424のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図16(B)は、通常要素424のコード生成が行われたときのプログラム情報の表示例であり、図16(C)は、通常要素424のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 16 is a diagram illustrating each state when the code generation of the normal element 424 is performed, and FIG. 16A illustrates the data structure of the output point list when the code generation of the normal element 424 is performed. FIG. 16B is a display example of program information when code generation of the normal element 424 is performed, and FIG. 16C illustrates code generation of the normal element 424. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素424のすべての出力点を読み込み、出力点リスト500に格納する。図16(A)に示すように、リスト作成部112は、出力点リスト500に12を格納する。図16(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を出力点リスト500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト500から出力点を選択しようと試みる。   The list creation unit 112 reads all output points of the normal elements 424 for which code generation has been performed by the code generation unit 117 and stores them in the output point list 500. As illustrated in FIG. 16A, the list creation unit 112 stores 12 in the output point list 500. As shown in FIGS. 16B and 16C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in the output point list 500, the flag attribute change unit 116 Do not change the attribute of the flag. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 500.

図17は、通常要素425が特定されたときの各々の状態を示す図であり、図17(A)は、通常要素425が特定されたときの出力点リストのデータ構造を示す図であり、図17(B)は、通常要素425が特定されたときのプログラム情報の表示例であり、図17(C)は、通常要素425が特定されたときのコード生成されたプログラムを示す図である。   FIG. 17 is a diagram showing each state when the normal element 425 is specified, and FIG. 17A is a diagram showing the data structure of the output point list when the normal element 425 is specified. FIG. 17B is a display example of program information when the normal element 425 is specified, and FIG. 17C is a diagram showing a code-generated program when the normal element 425 is specified. .

出力点選択部114は、出力点リスト500から出力点を1つ選択しようとする。出力点リスト500には12が格納されている。図17(A)に示すように、出力点選択部114は、出力点選択部114が12を選択した場合、出力点リスト500から12を削除する。そして、要素特定部115は、出力点12に対応する入力点13を有する通常要素425を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 500. 12 is stored in the output point list 500. As illustrated in FIG. 17A, when the output point selection unit 114 selects 12, the output point selection unit 114 deletes 12 from the output point list 500. Then, the element specifying unit 115 specifies the normal element 425 having the input point 13 corresponding to the output point 12.

図17(B)に示すように、フラグ属性変更部116は、入力点13を有する通常要素425が特定されると、入力点13のフラグの属性を変更する。図17(C)に示すように、コード生成部117は、入力点13を有する通常要素425のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素425のコード生成を行う。   As shown in FIG. 17B, when the normal element 425 having the input point 13 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 13. As shown in FIG. 17C, the code generation unit 117 changes the flag attributes of all the input points of the normal element 425 having the input point 13 so that it can be generated. Do.

図18は、通常要素425のコード生成が行われたときの各々の状態を示す図であり、図18(A)は、通常要素425のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図18(B)は、通常要素425のコード生成が行われたときのプログラム情報の表示例であり、図18(C)は、通常要素425のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 18 is a diagram illustrating each state when code generation of the normal element 425 is performed, and FIG. 18A illustrates a data structure of an output point list when code generation of the normal element 425 is performed. FIG. 18B is a display example of program information when the code generation of the normal element 425 is performed, and FIG. 18C shows the code generation of the normal element 425. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素425のすべての出力点を読み込み、出力点リスト500に格納する。図18(A)に示すように、リスト作成部112は、出力点リスト500に14を格納する。図18(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を出力点リスト500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト500から出力点を選択しようと試みる。   The list creation unit 112 reads all output points of the normal elements 425 for which code generation has been performed by the code generation unit 117 and stores them in the output point list 500. As illustrated in FIG. 18A, the list creation unit 112 stores 14 in the output point list 500. As shown in FIGS. 18B and 18C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in the output point list 500, the flag attribute change unit 116 Do not change the attribute of the flag. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 500.

図19は、通常要素422が特定されたときの2度目の各々の状態を示す図であり、図19(A)は、通常要素422が特定されたときの2度目の出力点リストのデータ構造を示す図であり、図19(B)は、通常要素422が特定されたときの2度目のプログラム情報の表示例であり、図19(C)は、通常要素422が特定されたときの2度目のコード生成されたプログラムを示す図である。   FIG. 19 is a diagram illustrating the second state when the normal element 422 is specified. FIG. 19A illustrates the data structure of the second output point list when the normal element 422 is specified. FIG. 19B is a display example of program information for the second time when the normal element 422 is specified, and FIG. 19C is a diagram showing 2 when the normal element 422 is specified. It is a figure which shows the program by which the code | cord | chord was generated the second time.

出力点選択部114は、出力点リスト500から出力点を1つ選択しようとする。出力点リスト500には14が格納されている。図19(A)に示すように、出力点選択部114は、出力点選択部114が14を選択した場合、出力点リスト500から14を削除する。そして、要素特定部115は、出力点14に対応する入力点5を有する通常要素422を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 500. 14 is stored in the output point list 500. As illustrated in FIG. 19A, when the output point selection unit 114 selects 14, the output point selection unit 114 deletes 14 from the output point list 500. Then, the element specifying unit 115 specifies the normal element 422 having the input point 5 corresponding to the output point 14.

図19(B)に示すように、フラグ属性変更部116は、入力点5を有する通常要素422が特定されると、入力点5のフラグの属性を変更する。図17(C)に示すように、コード生成部117は、入力点5を有する通常要素422のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素422のコード生成を行う。   As illustrated in FIG. 19B, when the normal element 422 having the input point 5 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 5. As shown in FIG. 17C, the code generation unit 117 changes the flag attributes of all the input points of the normal element 422 having the input point 5 so that it can be generated. Do.

図20は、通常要素422のコード生成が行われたときの各々の状態を示す図であり、図20(A)は、通常要素422のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図20(B)は、通常要素422のコード生成が行われたときのプログラム情報の表示例であり、図20(C)は、通常要素422のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 20 is a diagram illustrating each state when the code generation of the normal element 422 is performed, and FIG. 20A illustrates the data structure of the output point list when the code generation of the normal element 422 is performed. FIG. 20B is a display example of the program information when the code generation of the normal element 422 is performed, and FIG. 20C is the code generation of the normal element 422. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素422のすべての出力点を読み込み、出力点リスト500に格納する。図20(A)に示すように、リスト作成部112は、出力点リスト500に6を格納する。図20(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を出力点リスト500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト500から出力点を選択しようと試みる。   The list creation unit 112 reads all output points of the normal element 422 for which code generation has been performed by the code generation unit 117, and stores it in the output point list 500. As illustrated in FIG. 20A, the list creation unit 112 stores 6 in the output point list 500. As shown in FIGS. 20B and 20C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in the output point list 500, the flag attribute change unit 116 Do not change the attribute of the flag. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 500.

図21は、通常要素423が特定されたときの各々の状態を示す図であり、図21(A)は、通常要素423が特定されたときの出力点リストのデータ構造を示す図であり、図21(B)は、通常要素423が特定されたときのプログラム情報の表示例であり、図21(C)は、通常要素423が特定されたときのコード生成されたプログラムを示す図である。   FIG. 21 is a diagram showing each state when the normal element 423 is specified, and FIG. 21A is a diagram showing the data structure of the output point list when the normal element 423 is specified, FIG. 21B is a display example of program information when the normal element 423 is specified, and FIG. 21C is a diagram showing a code-generated program when the normal element 423 is specified. .

出力点選択部114は、出力点リスト500から出力点を1つ選択しようとする。出力点リスト500には6が格納されている。図21(A)に示すように、出力点選択部114は、出力点選択部114が6を選択した場合、出力点リスト500から6を削除する。そして、要素特定部115は、出力点6に対応する入力点7を有する通常要素423を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 500. 6 is stored in the output point list 500. As illustrated in FIG. 21A, when the output point selection unit 114 selects 6, the output point selection unit 114 deletes 6 from the output point list 500. Then, the element specifying unit 115 specifies the normal element 423 having the input point 7 corresponding to the output point 6.

図21(B)に示すように、フラグ属性変更部116は、入力点7を有する通常要素423が特定されると、入力点7のフラグの属性を変更する。図21(C)に示すように、コード生成部117は、入力点7を有する通常要素423のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素423のコード生成を行う。   As shown in FIG. 21B, when the normal element 423 having the input point 7 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 7. As shown in FIG. 21C, the code generation unit 117 changes the flag attributes of all the input points of the normal element 423 having the input point 7 so that it can be generated. Do.

図22は、通常要素423のコード生成が行われたときの各々の状態を示す図であり、図22(A)は、通常要素423のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図22(B)は、通常要素423のコード生成が行われたときのプログラム情報の表示例であり、図22(C)は、通常要素423のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 22 is a diagram showing each state when the code generation of the normal element 423 is performed. FIG. 22A shows the data structure of the output point list when the code generation of the normal element 423 is performed. FIG. 22B is a display example of the program information when the code generation of the normal element 423 is performed, and FIG. 22C is the code generation of the normal element 423. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素423のすべての出力点を読み込み、出力点リスト500に格納する。図22(A)に示すように、リスト作成部112は、出力点リスト500に8を格納する。図22(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を出力点リスト500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト500から出力点を選択しようと試みる。   The list creation unit 112 reads all the output points of the normal element 423 for which code generation has been performed by the code generation unit 117 and stores it in the output point list 500. As illustrated in FIG. 22A, the list creation unit 112 stores 8 in the output point list 500. As shown in FIGS. 22B and 22C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in the output point list 500, the flag attribute change unit 116 Do not change the attribute of the flag. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 500.

図23は、終端要素431が特定されたときの各々の状態を示す図であり、図23(A)は、終端要素431が特定されたときの出力点リストのデータ構造を示す図であり、図23(B)は、終端要素431が特定されたときのプログラム情報の表示例であり、図23(C)は、終端要素431が特定されたときのコード生成されたプログラムを示す図である。   FIG. 23 is a diagram illustrating each state when the terminal element 431 is specified, and FIG. 23A is a diagram illustrating the data structure of the output point list when the terminal element 431 is specified, FIG. 23B is a display example of program information when the terminal element 431 is specified, and FIG. 23C is a diagram showing a code-generated program when the terminal element 431 is specified. .

出力点選択部114は、出力点リスト500から出力点を1つ選択しようとする。出力点リスト500には8が格納されている。図23(A)に示すように、出力点選択部114は、出力点選択部114が8を選択した場合、出力点リスト500から8を削除する。そして、要素特定部115は、出力点8に対応する入力点9を有する終端要素431を特定する。要素特定部115は、特定したプログラム要素が終端要素431だったので、ふたたび出力点選択部114に出力点リスト500から出力点を選択するように指示を出す。出力点選択部114は、出力点リスト500から出力点を選択しようと試みるが、出力点リスト500にはもう出力点が格納されていないので、コード生成処理を終了する。   The output point selection unit 114 attempts to select one output point from the output point list 500. 8 is stored in the output point list 500. As illustrated in FIG. 23A, when the output point selection unit 114 selects 8, the output point selection unit 114 deletes 8 from the output point list 500. Then, the element specifying unit 115 specifies the terminal element 431 having the input point 9 corresponding to the output point 8. Since the specified program element is the terminal element 431, the element specifying unit 115 instructs the output point selecting unit 114 to select an output point from the output point list 500 again. The output point selection unit 114 attempts to select an output point from the output point list 500. However, since the output point is no longer stored in the output point list 500, the code generation process ends.

図23(B)および(C)に示すように、要素特定部115が特定したプログラム要素が通常要素でない場合は、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。   As shown in FIGS. 23B and 23C, when the program element specified by the element specifying unit 115 is not a normal element, the flag attribute changing unit 116 does not change the flag attribute. The code generation unit 117 does not generate code.

ここまでは、コード生成の順番を明確にするために、開始要素、終端要素のコード生成や、関数の引数、戻り値などのデータ引渡手段を省略して説明したが、実際にはこれらが必要となる場合が多い。そこで、簡単な図面をC言語のプログラムに変換する場合を説明することにより、これらの扱いについて例示する。   Up to this point, in order to clarify the order of code generation, we have omitted the code generation of the start element and end element, and data delivery means such as function arguments and return values, but these are actually necessary. In many cases. Therefore, these cases will be exemplified by explaining a case where a simple drawing is converted into a C language program.

図24は、プログラム情報をC言語のプログラムに変換する場合の例を示した図である。図24に示すような、開始要素1411と、通常要素1421と、終端要素1431とを有するプログラム情報1400を考える。開始要素1411は、CON−INというラベルで示され、終端要素1431は、CON−OUTというラベルで示されるものとする。   FIG. 24 is a diagram showing an example of converting program information into a C language program. Consider program information 1400 having a start element 1411, a normal element 1421, and a termination element 1431 as shown in FIG. The start element 1411 is indicated by a label CON-IN, and the end element 1431 is indicated by a label CON-OUT.

そうすると、コード生成部117は、出力点選択部114によって出力点リスト500から出力点が選択されるとともに、OCN−INの読み出し処理に対応するコードを生成する。つまり、読み出した値を自動変数aに出力するようにしている。これは開始要素1411と通常要素1421を結ぶ結合要素1441が自動変数aに対応付けられていると考えてもよい。   Then, the code generation unit 117 selects an output point from the output point list 500 by the output point selection unit 114 and generates a code corresponding to the OCN-IN reading process. That is, the read value is output to the automatic variable a. This may be considered that the coupling element 1441 connecting the start element 1411 and the normal element 1421 is associated with the automatic variable a.

また、通常要素1421は、たとえばfという名前の関数であり、1入力、1出力であるとしているので、入力を関数の引数、出力を関数の戻り値に割り当てるとよく、関数fは、1引数で戻り値を持つ関数とすればよい。この場合、コード生成部117が生成するコードの形式については、関数fがaを引数として受け取り、戻り値として自動変数bを出力するようにすればよい。これは通常要素1421と終端要素1431を結ぶ結合要素1442が自動変数bに対応付けられていると考えてもよい。   The normal element 1421 is a function named f, for example, and has one input and one output. Therefore, the input may be assigned to the function argument and the output to the function return value. And a function with a return value. In this case, regarding the format of the code generated by the code generation unit 117, the function f may receive a as an argument and output the automatic variable b as a return value. This may be considered that the coupling element 1442 connecting the normal element 1421 and the terminal element 1431 is associated with the automatic variable b.

なお、入力数が多かった場合には、引数を増やせばよいが、出力数が多かった場合については、C言語の場合には戻り値が1つなので、ポインタを使って値を返すか、構造体を使って値を渡すなどの方法を取る必要がある。   Note that if the number of inputs is large, the number of arguments may be increased. However, if the number of outputs is large, the return value is one in the case of C language. It is necessary to take a method such as passing a value using the body.

また、コード生成部117は、要素特定部115によって特定された要素が終端要素1431であった場合、CON−OUTへの書き出し処理に対応するコードを生成する。つまり、通常要素1421がbという値の自動変数を書き出しているので、CON−OUTにbを書き出すコードを生成すればよい。このような処理によって生成された生成プログラムを図25に示す。   In addition, when the element specified by the element specifying unit 115 is the terminal element 1431, the code generating unit 117 generates a code corresponding to the writing process to CON-OUT. That is, since the normal element 1421 writes an automatic variable having a value of b, a code for writing b to CON-OUT may be generated. A generation program generated by such processing is shown in FIG.

図25は、コード生成したときの出力例を示す図である。図25に示す生成プログラム1130は、プログラム情報1400をC言語のプログラムに変換した場合を示している。また、通常要素1421は、CON−INというラベルで示されており、aという変数を出力している。出力された変数aは、関数fに渡され、引数として用いられている。この引数aを使った関数fは、変数bを出力している。そしてその変数bがCON−OUTというラベルで示されている終端要素1431に出力されている。   FIG. 25 is a diagram illustrating an output example when code is generated. A generation program 1130 shown in FIG. 25 shows a case where the program information 1400 is converted into a C language program. The normal element 1421 is indicated by a label CON-IN and outputs a variable a. The output variable a is passed to the function f and used as an argument. The function f using the argument a outputs a variable b. The variable b is output to the termination element 1431 indicated by the label CON-OUT.

以上の処理によってコード生成が実現される。このコード生成が実現されることによって、開始要素から終端要素にいたるまで追跡すると同時に、プログラム要素をコード生成して実行可能なプログラムが生成されるので、前方から1回走査するだけでコード生成が実現することができ、コード生成の効率を良好にすることができる。   Code generation is realized by the above processing. By realizing this code generation, tracing from the start element to the end element, and at the same time, a code element is generated and an executable program is generated. Therefore, the code generation can be performed only by scanning once from the front. The code generation efficiency can be improved.

〔第2の実施の形態〕
次に、本発明の第2の実施の形態について説明する。本実施の形態のプログラム自動生成装置は、出力点を複数有する通常要素が含まれる点が異なる以外は、第1の実施の形態で示した構成と同様である。このため、上記第1の実施の形態とほぼ同様の構成部分については同一の符号を付すなどして適宜その説明を省略する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. The automatic program generation device of the present embodiment is the same as the configuration shown in the first embodiment except that a normal element having a plurality of output points is included. For this reason, about the component similar to the said 1st Embodiment, the same code | symbol is attached | subjected and the description is abbreviate | omitted suitably.

図26は、本実施の形態のプログラム情報の構成要素に識別番号が付された状態を示す図である。図26に示すように、プログラム情報2400は、開始要素2411と、通常要素2421、2422、2423と、終端要素2431、2432とを備えている。開始要素2411は、プログラムの端点に相当するものであり、具体的には、外部入力部である。   FIG. 26 is a diagram showing a state in which identification numbers are assigned to the constituent elements of the program information according to the present embodiment. As shown in FIG. 26, the program information 2400 includes a start element 2411, normal elements 2421, 2422, 2423, and end elements 2431, 2432. The start element 2411 corresponds to the end point of the program, and is specifically an external input unit.

通常要素2421、2422、2423は、プログラム自動生成装置100が生成したプログラムを動かすコンピュータにおいて実行される処理内容を、機能単位にまとめたものである。具体的には、サブルーチンのようなものであり、C言語では関数である。   The normal elements 2421, 2422, and 2423 summarize the processing contents executed in the computer that runs the program generated by the automatic program generation device 100 in units of functions. Specifically, it is like a subroutine and is a function in the C language.

終端要素2431、2432は、プログラムの端点に相当するものであり、具体的には外部出力部である。識別番号付加部111は、プログラム情報2400の各構成要素の出力点と入力点に一意な識別番号を付す。   The termination elements 2431 and 2432 correspond to the end points of the program, and specifically are external output units. The identification number adding unit 111 assigns a unique identification number to the output point and input point of each component of the program information 2400.

図27は、本実施の形態の出力点リストのデータ構造を示す図である。図27に示すように、初期化処理が行われた後の出力点リスト2500には、開始要素2411の出力点に付された識別番号が格納されている。本実施の形態においては、開始要素2411の出力点の21が格納されている。   FIG. 27 is a diagram showing a data structure of the output point list of the present embodiment. As shown in FIG. 27, the output point list 2500 after the initialization process stores the identification numbers assigned to the output points of the start element 2411. In the present embodiment, 21 of output points of the start element 2411 is stored.

次に、フラグ作成処理について説明する。
図28は、本実施の形態の通常要素の入力点にフラグが設けられた状態を示す図である。図28に示すように、フラグ作成部113は、通常要素2421、2422、2423の入力点に対して、通常要素2421、2422、2423のコード生成の可否を示すフラグを設ける。
Next, the flag creation process will be described.
FIG. 28 is a diagram illustrating a state in which a flag is provided at an input point of a normal element according to the present embodiment. As shown in FIG. 28, the flag creation unit 113 provides a flag indicating whether or not code generation of the normal elements 2421, 2422, and 2423 is possible for the input points of the normal elements 2421, 2422, and 2423.

初期化処理が行われた後のフラグは黒丸となっている。黒丸は、各フラグに対応する通常要素のコード生成が不可能であることを示している。なお、通常要素2421、2422、2423のコード生成が可能な場合、フラグを白丸で表す。   The flag after the initialization process is a black circle. Black circles indicate that code generation of normal elements corresponding to each flag is impossible. In addition, when code generation of the normal elements 2421, 2422, and 2423 is possible, the flag is represented by a white circle.

以上が本実施の形態のコード生成処理における初期化処理である。つづいて、本実施の形態のコード生成処理のつづきを説明する。図29以降では、プログラム情報2400の表示例と、出力点リスト2500のデータ構造と、コード生成されたプログラム2130の結果例の3つを1つの図に表し、各々の状態の遷移を説明する。   The above is the initialization process in the code generation process of the present embodiment. Next, the continuation of the code generation process of this embodiment will be described. In FIG. 29 and subsequent figures, a display example of the program information 2400, a data structure of the output point list 2500, and a result example of the code generated program 2130 are shown in one figure, and the transition of each state will be described.

また、コード生成されたプログラム2130は、通常要素2421、2422、2423がコード生成されると、各通常要素内に表示されているアルファベットx〜zに対応するコードx();〜z();が生成されるとして説明する。   In addition, in the code generated program 2130, when normal elements 2421, 2422, and 2423 are generated, codes x (); ~ z (); corresponding to alphabets x to z displayed in each normal element are generated. Will be described as being generated.

図29は、通常要素2421が特定されたときの各々の状態を示す図であり、図29(A)は、通常要素2421が特定されたときの出力点リストのデータ構造を示す図であり、図29(B)は、通常要素2421が特定されたときのプログラム情報の表示例であり、図29(C)は、通常要素2421が特定されたときのコード生成されたプログラムを示す図である。   FIG. 29 is a diagram showing each state when the normal element 2421 is specified, and FIG. 29A is a diagram showing the data structure of the output point list when the normal element 2421 is specified, FIG. 29B is a display example of program information when the normal element 2421 is specified, and FIG. 29C is a diagram showing a code-generated program when the normal element 2421 is specified. .

出力点選択部114は、出力点リスト2500から出力点を1つ選択しようとする。出力点リスト2500には21が格納されている。図29(A)に示すように、出力点選択部114は、出力点選択部114が21を選択した場合、出力点リスト2500から21を削除する。そして、要素特定部115は、出力点21に対応する入力点22を有する通常要素2421を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 2500. 21 is stored in the output point list 2500. As illustrated in FIG. 29A, when the output point selection unit 114 selects 21, the output point selection unit 114 deletes 21 from the output point list 2500. Then, the element specifying unit 115 specifies the normal element 2421 having the input point 22 corresponding to the output point 21.

図29(B)に示すように、フラグ属性変更部116は、入力点22を有する通常要素2421が特定されると、入力点22のフラグの属性を変更する。図29(C)に示すように、コード生成部117は、入力点22を有する通常要素2421のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素2421のコード生成を行う。   As shown in FIG. 29B, when the normal element 2421 having the input point 22 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 22. As shown in FIG. 29C, the code generation unit 117 changes the flag attributes of all the input points of the normal element 2421 having the input point 22 so that it can be generated. Do.

図30は、通常要素2421のコード生成が行われたときの各々の状態を示す図であり、図30(A)は、通常要素2421のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図30(B)は、通常要素2421のコード生成が行われたときのプログラム情報の表示例であり、図30(C)は、通常要素2421のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 30 is a diagram illustrating each state when code generation of the normal element 2421 is performed. FIG. 30A illustrates a data structure of the output point list when code generation of the normal element 2421 is performed. FIG. 30B is a display example of program information when the code generation of the normal element 2421 is performed, and FIG. 30C is the code generation of the normal element 2421. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素2421のすべての出力点を読み込み、出力点リスト2500に格納する。図30(A)に示すように、リスト作成部112は、出力点リスト2500に23と24を格納する。図30(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を出力点リスト2500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト2500から出力点を選択しようと試みる。   The list creation unit 112 reads all the output points of the normal element 2421 for which code generation has been performed by the code generation unit 117, and stores it in the output point list 2500. As illustrated in FIG. 30A, the list creation unit 112 stores 23 and 24 in the output point list 2500. As shown in FIGS. 30B and 30C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in the output point list 2500, the flag attribute change unit 116 Do not change the attribute of the flag. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 2500.

図31は、通常要素2422が特定されたときの各々の状態を示す図であり、図31(A)は、通常要素2422が特定されたときの出力点リストのデータ構造を示す図であり、図31(B)は、通常要素2422が特定されたときのプログラム情報の表示例であり、図31(C)は、通常要素2422が特定されたときのコード生成されたプログラムを示す図である。   FIG. 31 is a diagram showing each state when the normal element 2422 is specified, and FIG. 31A is a diagram showing the data structure of the output point list when the normal element 2422 is specified, FIG. 31B is a display example of program information when the normal element 2422 is specified, and FIG. 31C is a diagram showing a code-generated program when the normal element 2422 is specified. .

出力点選択部114は、出力点リスト2500から出力点を1つ選択しようとする。出力点リスト2500には23と24が格納されている。図31(A)に示すように、出力点選択部114は、出力点選択部114が23を選択した場合、出力点リスト2500から23を削除する。そして、要素特定部115は、出力点23に対応する入力点25を有する通常要素2422を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 2500. The output point list 2500 stores 23 and 24. As illustrated in FIG. 31A, when the output point selection unit 114 selects 23, the output point selection unit 114 deletes 23 from the output point list 2500. Then, the element specifying unit 115 specifies the normal element 2422 having the input point 25 corresponding to the output point 23.

図31(B)に示すように、フラグ属性変更部116は、入力点25を有する通常要素2422が特定されると、入力点25のフラグの属性を変更する。図31(C)に示すように、コード生成部117は、入力点25を有する通常要素2422のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素2422のコード生成を行う。   As shown in FIG. 31B, when the normal element 2422 having the input point 25 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 25. As shown in FIG. 31C, the code generation unit 117 changes the flag attribute of all the input points of the normal element 2422 having the input point 25 so that it can be generated. Do.

図32は、通常要素2422のコード生成が行われたときの各々の状態を示す図であり、図32(A)は、通常要素2422のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図32(B)は、通常要素2422のコード生成が行われたときのプログラム情報の表示例であり、図32(C)は、通常要素2422のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 32 is a diagram showing each state when the code generation of the normal element 2422 is performed, and FIG. 32A shows the data structure of the output point list when the code generation of the normal element 2422 is performed. FIG. 32B is a display example of program information when the code generation of the normal element 2422 is performed, and FIG. 32C is the code generation of the normal element 2422. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素2422のすべての出力点を読み込み、出力点リスト2500に格納する。図32(A)に示すように、リスト作成部112は、出力点リスト2500に27を格納する。図32(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を2500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト2500から出力点を選択しようと試みる。   The list creation unit 112 reads all output points of the normal element 2422 for which code generation has been performed by the code generation unit 117, and stores it in the output point list 2500. As illustrated in FIG. 32A, the list creation unit 112 stores 27 in the output point list 2500. As shown in FIGS. 32B and 32C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in 2500, the flag attribute change unit 116 displays the flag attributes Do not make any changes. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 2500.

図33は、終端要素2431が特定されたときの各々の状態を示す図であり、図33(A)は、終端要素2431が特定されたときの出力点リストのデータ構造を示す図であり、図33(B)は、終端要素2431が特定されたときのプログラム情報の表示例であり、図33(C)は、終端要素2431が特定されたときのコード生成されたプログラムを示す図である。   FIG. 33 is a diagram illustrating each state when the termination element 2431 is identified, and FIG. 33A is a diagram illustrating a data structure of the output point list when the termination element 2431 is identified. FIG. 33B is a display example of program information when the terminal element 2431 is specified, and FIG. 33C is a diagram showing a code-generated program when the terminal element 2431 is specified. .

出力点選択部114は、出力点リスト2500から出力点を1つ選択しようとする。出力点リスト2500には24と27が格納されている。図33(A)に示すように、出力点選択部114は、出力点選択部114が27を選択した場合、出力点リスト2500から27を削除する。そして、要素特定部115は、出力点27に対応する入力点29を有する終端要素2431を特定する。要素特定部115は、特定したプログラム要素が終端要素2431だったので、ふたたび出力点選択部114に出力点リスト2500から出力点を選択するように指示を出す。   The output point selection unit 114 attempts to select one output point from the output point list 2500. In the output point list 2500, 24 and 27 are stored. As illustrated in FIG. 33A, when the output point selection unit 114 selects 27, the output point selection unit 114 deletes 27 from the output point list 2500. Then, the element specifying unit 115 specifies the terminal element 2431 having the input point 29 corresponding to the output point 27. Since the specified program element is the end element 2431, the element specifying unit 115 instructs the output point selecting unit 114 to select an output point from the output point list 2500 again.

図33(B)および(C)に示すように、要素特定部115が特定したプログラム要素が通常要素でない場合は、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。   As shown in FIGS. 33B and 33C, when the program element specified by the element specifying unit 115 is not a normal element, the flag attribute changing unit 116 does not change the flag attribute. The code generation unit 117 does not generate code.

図34は、通常要素2423が特定されたときの各々の状態を示す図であり、図34(A)は、通常要素2423が特定されたときの出力点リストのデータ構造を示す図であり、図34(B)は、通常要素2423が特定されたときのプログラム情報の表示例であり、図34(C)は、通常要素2423が特定されたときのコード生成されたプログラムを示す図である。   FIG. 34 is a diagram showing each state when the normal element 2423 is specified, and FIG. 34A is a diagram showing the data structure of the output point list when the normal element 2423 is specified, FIG. 34B is a display example of program information when the normal element 2423 is specified, and FIG. 34C is a diagram showing a code-generated program when the normal element 2423 is specified. .

出力点選択部114は、出力点リスト2500から出力点を1つ選択しようとする。出力点リスト2500には24が格納されている。図34(A)に示すように、出力点選択部114は、出力点選択部114が24を選択した場合、出力点リスト2500から24を削除する。そして、要素特定部115は、出力点24に対応する入力点26を有する通常要素2423を特定する。   The output point selection unit 114 attempts to select one output point from the output point list 2500. 24 is stored in the output point list 2500. As shown in FIG. 34A, when the output point selection unit 114 selects 24, the output point selection unit 114 deletes 24 from the output point list 2500. Then, the element specifying unit 115 specifies the normal element 2423 having the input point 26 corresponding to the output point 24.

図34(B)に示すように、フラグ属性変更部116は、入力点26を有する通常要素2423が特定されると、入力点26のフラグの属性を変更する。図34(C)に示すように、コード生成部117は、入力点26を有する通常要素2423のすべての入力点のフラグの属性が生成可能に変更されているので、通常要素2423のコード生成を行う。   As shown in FIG. 34B, when the normal element 2423 having the input point 26 is specified, the flag attribute changing unit 116 changes the flag attribute of the input point 26. As shown in FIG. 34C, the code generation unit 117 changes the flag attribute of all the input points of the normal element 2423 having the input point 26 so that it can be generated. Do.

図35は、通常要素2423のコード生成が行われたときの各々の状態を示す図であり、図35(A)は、通常要素2423のコード生成が行われたときの出力点リストのデータ構造を示す図であり、図35(B)は、通常要素2423のコード生成が行われたときのプログラム情報の表示例であり、図35(C)は、通常要素2423のコード生成が行われたときのコード生成されたプログラムを示す図である。   FIG. 35 is a diagram showing each state when the code generation of the normal element 2423 is performed. FIG. 35A shows the data structure of the output point list when the code generation of the normal element 2423 is performed. FIG. 35B is a display example of program information when the code generation of the normal element 2423 is performed, and FIG. 35C is the code generation of the normal element 2423. It is a figure which shows the program by which the code was generated at the time.

リスト作成部112は、コード生成部117によってコード生成が行われた通常要素2423のすべての出力点を読み込み、出力点リスト2500に格納する。図35(A)に示すように、リスト作成部112は、出力点リスト2500に28を格納する。図35(B)および(C)に示すように、リスト作成部112がコード生成部117によってコード生成された通常要素の出力点を2500に格納する場合、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。そして、出力点選択部114が出力点リスト2500から出力点を選択しようと試みる。   The list creation unit 112 reads all the output points of the normal element 2423 for which code generation has been performed by the code generation unit 117, and stores it in the output point list 2500. As illustrated in FIG. 35A, the list creation unit 112 stores 28 in the output point list 2500. As shown in FIGS. 35B and 35C, when the list creation unit 112 stores the output points of the normal elements generated by the code generation unit 117 in 2500, the flag attribute change unit 116 displays the flag attributes Do not make any changes. The code generation unit 117 does not generate code. Then, the output point selection unit 114 attempts to select an output point from the output point list 2500.

図36は、終端要素2432が特定されたときの各々の状態を示す図であり、図36(A)は、終端要素2432が特定されたときの出力点リストのデータ構造を示す図であり、図36(B)は、終端要素2432が特定されたときのプログラム情報の表示例であり、図36(C)は、終端要素2432が特定されたときのコード生成されたプログラムを示す図である。   FIG. 36 is a diagram showing each state when the terminal element 2432 is specified, and FIG. 36A is a diagram showing the data structure of the output point list when the terminal element 2432 is specified, FIG. 36B is a display example of program information when the terminal element 2432 is specified, and FIG. 36C is a diagram showing a code-generated program when the terminal element 2432 is specified. .

出力点選択部114は、出力点リスト2500から出力点を1つ選択しようとする。出力点リスト2500には28が格納されている。図36(A)に示すように、出力点選択部114は、出力点選択部114が28を選択した場合、出力点リスト2500から28を削除する。そして、要素特定部115は、出力点28に対応する入力点30を有する終端要素2432を特定する。要素特定部115は、特定したプログラム要素が終端要素2432だったので、ふたたび出力点選択部114に出力点リスト2500から出力点を選択するように指示を出す。出力点選択部114は、出力点リスト2500から出力点を選択しようと試みるが、出力点リスト2500にはもう出力点が格納されていないので、コード生成処理を終了する。   The output point selection unit 114 attempts to select one output point from the output point list 2500. 28 is stored in the output point list 2500. As shown in FIG. 36A, when the output point selection unit 114 selects 28, the output point selection unit 114 deletes 28 from the output point list 2500. Then, the element specifying unit 115 specifies the terminal element 2432 having the input point 30 corresponding to the output point 28. Since the specified program element is the end element 2432, the element specifying unit 115 instructs the output point selecting unit 114 to select an output point from the output point list 2500 again. The output point selection unit 114 attempts to select an output point from the output point list 2500. However, since the output point is no longer stored in the output point list 2500, the code generation process ends.

図36(B)および(C)に示すように、要素特定部115が特定したプログラム要素が通常要素でない場合は、フラグ属性変更部116は、フラグの属性の変更を行わない。また、コード生成部117は、コード生成を行わない。   As shown in FIGS. 36B and 36C, when the program element specified by the element specifying unit 115 is not a normal element, the flag attribute changing unit 116 does not change the flag attribute. The code generation unit 117 does not generate code.

以上の処理によってコード生成が実現される。このコード生成が実現されることによって、開始要素から終端要素にいたるまで追跡すると同時に、プログラム要素をコード生成して実行可能なプログラムが生成されるので、前方から1回走査するだけでコード生成が実現することができ、コード生成の効率を良好にすることができる。   Code generation is realized by the above processing. By realizing this code generation, tracing from the start element to the end element, and at the same time, a code element is generated and an executable program is generated. Therefore, the code generation can be performed only by scanning once from the front. The code generation efficiency can be improved.

なお、上記実施の形態においては、すべての入力点および出力点を一意に識別するために、識別番号を付加することによってそれぞれの点を識別したが、それぞれの入力点および出力点が一意に識別できるならば、識別子としてアルファベットや図形などを用いてもよい。   In the above embodiment, in order to uniquely identify all input points and output points, each point is identified by adding an identification number. However, each input point and output point is uniquely identified. If possible, alphabets or figures may be used as identifiers.

また、上記実施の形態においては、プログラム自動生成装置100が生成した生成プログラム130をネットワーク200を介して大型プラントを制御するためのコンピュータに送信する旨を記載したが、プログラム自動生成装置100は、大規模なプログラムを自動生成する場合には、どのようなプログラムを自動生成する場合であっても有効である。   In the above embodiment, it has been described that the generation program 130 generated by the automatic program generation device 100 is transmitted to a computer for controlling a large plant via the network 200. When a large-scale program is automatically generated, any program is automatically generated.

なお、上記の処理機能は、コンピュータによって実現することができる。その場合、電子ファイル管理装置が有すべき機能の処理内容を記述した電子ファイル管理プログラムが提供される。その電子ファイル管理プログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述した電子ファイル管理プログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記録装置には、HDD、FD、磁気テープなどがある。光ディスクには、DVD(Digital Versatile Disc)、DVD−RAM、CD−ROM、CD−R(Recordable)/RW(ReWritable)などがある。光磁気記録装置には、MO(Magneto Optical disk)などがある。   The above processing functions can be realized by a computer. In that case, an electronic file management program describing the processing contents of the functions that the electronic file management apparatus should have is provided. By executing the electronic file management program on a computer, the above processing functions are realized on the computer. The electronic file management program describing the processing contents can be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory. Magnetic recording devices include HDDs, FDs, magnetic tapes, and the like. Optical discs include DVD (Digital Versatile Disc), DVD-RAM, CD-ROM, CD-R (Recordable) / RW (ReWritable), and the like. Examples of the magneto-optical recording device include an MO (Magneto Optical disk).

電子ファイル管理プログラムを流通させる場合には、たとえば、その電子ファイル管理プログラムが記録されたDVD、CD−ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにその電子ファイル管理プログラムを転送することもできる。   When the electronic file management program is distributed, for example, portable recording media such as DVDs and CD-ROMs on which the electronic file management program is recorded are sold. It is also possible to store the program in a storage device of a server computer and transfer the electronic file management program from the server computer to another computer via a network.

電子ファイル管理プログラムを実行するコンピュータは、たとえば、可搬型記録媒体に記録された電子ファイル管理プログラムもしくはサーバコンピュータから転送された電子ファイル管理プログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置から電子ファイル管理プログラムを読み取り、電子ファイル管理プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接電子ファイル管理プログラムを読み取り、その電子ファイル管理プログラムに従った処理を実行することもできる。また、コンピュータは、サーバコンピュータから電子ファイル管理プログラムが転送される毎に、逐次、受け取った電子ファイル管理プログラムに従った処理を実行することもできる。   A computer that executes an electronic file management program stores, for example, an electronic file management program recorded on a portable recording medium or an electronic file management program transferred from a server computer in its own storage device. Then, the computer reads the electronic file management program from its own storage device, and executes processing according to the electronic file management program. The computer can also read the electronic file management program directly from the portable recording medium and execute processing according to the electronic file management program. The computer can also sequentially execute processing according to the received electronic file management program every time the electronic file management program is transferred from the server computer.

なお、本発明は、上述の実施の形態にのみ限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変更を加えることができる。
上記については単に本発明の原理を示すものである。さらに、多数の変形、変更が当業者にとって可能であり、本発明は上記に示し、説明した正確な構成および応用例に限定されるものではなく、対応するすべての変形例および均等物は、添付の請求項およびその均等物による本発明の範囲とみなされる。
The present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.
The above merely illustrates the principle of the present invention. In addition, many modifications and changes can be made by those skilled in the art, and the present invention is not limited to the precise configuration and application shown and described above, and all corresponding modifications and equivalents may be And the equivalents thereof are considered to be within the scope of the invention.

第1の実施の形態に適用される発明の概念図である。It is a conceptual diagram of the invention applied to 1st Embodiment. 第1の実施の形態に係るシステム構成例を示す図である。It is a figure which shows the system configuration example which concerns on 1st Embodiment. 第1の実施の形態に係るプログラム自動生成装置のハードウェア構成例である。1 is a hardware configuration example of an automatic program generation device according to a first embodiment. プログラム自動生成装置の処理機能を示す図である。It is a figure which shows the processing function of a program automatic generation apparatus. 第1の実施の形態のプログラム自動生成処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the program automatic generation process of 1st Embodiment. 第1の実施の形態の表示装置に表示されるプログラム情報の概要を示す図である。It is a figure which shows the outline | summary of the program information displayed on the display apparatus of 1st Embodiment. 第1の実施の形態のプログラム情報の構成要素に識別番号が付された状態を示す図である。It is a figure which shows the state by which the identification number was attached | subjected to the component of the program information of 1st Embodiment. 第1の実施の形態の出力点リストのデータ構造を示す図である。It is a figure which shows the data structure of the output point list | wrist of 1st Embodiment. 第1の実施の形態の通常要素の入力点にフラグが設けられた状態を示す図である。It is a figure which shows the state by which the flag was provided in the input point of the normal element of 1st Embodiment. 出力点選択部が出力点リストから1が削除した後の出力点リストを示す図である。It is a figure which shows the output point list after 1 is deleted from the output point list by the output point selection unit. 出力点選択部が出力点リストから1を選んだ後のプログラム情報を示す図である。It is a figure which shows the program information after an output point selection part selects 1 from an output point list | wrist. 通常要素がコード生成されたときの具体例を示す図である。It is a figure which shows the specific example when a normal element is code-generated. 出力点リストの状態を示した図である。It is the figure which showed the state of the output point list. 通常要素422が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 422 is specified. 通常要素424が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 424 is specified. 通常要素424のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 424 is performed. 通常要素425が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 425 is specified. 通常要素425のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 425 is performed. 通常要素422が特定されたときの2度目の各々の状態を示す図である。It is a figure which shows each state of the 2nd time when the normal element 422 is specified. 通常要素422のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 422 is performed. 通常要素423が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 423 is specified. 通常要素423のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 423 is performed. 終端要素431が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the termination | terminus element 431 is specified. プログラム情報をC言語のプログラムに変換する場合の例を示した図である。It is the figure which showed the example in the case of converting program information into the program of C language. コード生成したときの出力例を示す図である。It is a figure which shows the example of an output when a code | cord | chord is generated. 第2の実施の形態のプログラム情報の構成要素に識別番号が付された状態を示す図である。It is a figure which shows the state by which the identification number was attached | subjected to the component of the program information of 2nd Embodiment. 第2の実施の形態の出力点リストのデータ構造を示す図である。It is a figure which shows the data structure of the output point list | wrist of 2nd Embodiment. 第2の実施の形態の通常要素の入力点にフラグが設けられた状態を示す図である。It is a figure which shows the state by which the flag was provided in the input point of the normal element of 2nd Embodiment. 通常要素2421が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 2421 is specified. 通常要素2421のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 2421 is performed. 通常要素2422が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 2422 is specified. 通常要素2422のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 2422 is performed. 終端要素2431が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the termination | terminus element 2431 is specified. 通常要素2423が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the normal element 2423 is specified. 通常要素2423のコード生成が行われたときの各々の状態を示す図である。It is a figure which shows each state when the code | cord | chord generation of the normal element 2423 is performed. 終端要素2432が特定されたときの各々の状態を示す図である。It is a figure which shows each state when the termination | terminus element 2432 is specified.

符号の説明Explanation of symbols

1 プログラム自動生成装置
1a プログラム情報記憶手段
1b プログラム生成手段
1c 生成プログラム
2 入力手段
3 表示手段
4 プログラム情報
DESCRIPTION OF SYMBOLS 1 Program automatic generation apparatus 1a Program information storage means 1b Program generation means 1c Generation program 2 Input means 3 Display means 4 Program information

Claims (5)

プログラムを自動的に生成するプログラム自動生成装置において、
開始要素、通常要素、終端要素を含むプログラム要素と、前記プログラム要素を結合する結合情報とからなるプログラム情報を記憶するプログラム情報記憶手段と、
前記開始要素から、これに接続される前記通常要素を前記結合情報に沿って前記終端要素にいたるまで追跡すると同時に、前記プログラム要素のコードを生成して実行可能なプログラムを生成するプログラム生成手段と、
を備え、
前記プログラム生成手段は、
すべての前記プログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付する識別子付加手段と、
前記開始要素および前記通常要素の前記出力点に付された前記識別子を取得して出力点リストを作成するリスト作成手段と、
前記通常要素のそれぞれの前記入力点に対して前記通常要素がコード生成可能か否かの属性を持ったフラグを作成するフラグ作成手段と、
前記出力点リストから1つの前記出力点を選択して削除する出力点選択手段と、
前記出力点選択手段により選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定する要素特定手段と、
前記要素特定手段により特定された前記プログラム要素において、前記出力点選択手段により選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更するフラグ属性変更手段と、
前記要素特定手段により特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成するコード生成手段と、
を有し、前記出力点選択手段による前記出力点の選択および削除、前記要素特定手段による前記プログラム要素の特定、前記フラグ属性変更手段による属性の変更、前記コード生成手段によるコードの生成が可能か否かの判定およびコードの生成、およびコードを生成した前記通常要素の前記出力点の前記リスト作成手段による前記出力点リストへの格納を、前記出力点リストに格納されている前記出力点がなくなるまで繰り返すことを特徴とするプログラム自動生成装置。
In an automatic program generation device that automatically generates a program,
Program information storage means for storing program information comprising a program element including a start element, a normal element, and an end element, and coupling information for coupling the program elements;
Program generation means for generating the executable program by generating the code of the program element while simultaneously tracing the normal element connected thereto from the start element to the terminal element along the coupling information ,
With
The program generation means includes
Identifier adding means for assigning a unique identifier to an input point that is a point at which a signal is input and an output point that is a point at which the signal is output, for all the program elements;
List creation means for obtaining the identifier attached to the output points of the start element and the normal element and creating an output point list;
Flag creating means for creating a flag having an attribute as to whether or not the normal element can generate code for each input point of the normal element;
Output point selection means for selecting and deleting one of the output points from the output point list;
Element specifying means for specifying the program element having the input point coupled to the output point selected by the output point selecting means;
Flag attribute changing means for changing the flag of the input point coupled to the output point selected by the output point selecting means to an attribute capable of generating code in the program element specified by the element specifying means;
Code generating means for generating a code corresponding to the program element when the flags of all the input points of the program element specified by the element specifying means are changed to an attribute capable of generating code;
Have a, the output point selection and deletion by said output point selection means, whether the element identification of the program elements according to the specific means, changing of attributes by the flag attribute changing means allows the generation of code by said code generating means Whether the output point stored in the output point list is eliminated from the determination of whether or not the code is generated, and the output of the normal element that has generated the code is stored in the output point list by the list creation unit. A program automatic generation device characterized by repeating the process up to.
前記プログラム生成手段は、初期化処理時において、前記識別子付加手段によりすべての前記プログラム要素の前記入力点および前記出力点に一意な識別子を付加し、前記リスト作成手段によりすべての前記開始要素の前記出力点に付された前記識別子を取得して出力点リストを作成し、前記フラグ作成手段により前記通常要素のそれぞれの前記入力点に対してコード生成不可の属性に設定したフラグを作成することを特徴とする請求項1記載のプログラム自動生成装置。   The program generation means adds a unique identifier to the input points and output points of all the program elements by the identifier addition means at the time of initialization processing, and the list creation means adds the identifiers of all the start elements. Obtaining the identifier attached to the output point and creating an output point list, and creating a flag set as an attribute that cannot be generated for each input point of the normal element by the flag creating means The automatic program generation device according to claim 1, wherein: プログラムを自動的に生成するプログラム自動生成方法において、In an automatic program generation method for automatically generating a program,
開始要素、通常要素、終端要素を含むすべてのプログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付加する第1ステップと、  A first step of adding unique identifiers to an input point that is a point at which a signal is input and an output point that is a point from which a signal is output to all program elements including a start element, a normal element, and a terminal element When,
すべての前記開始要素の前記出力点に付された前記識別子を取得して出力点リストを作成する第2ステップと、  A second step of obtaining the identifiers attached to the output points of all the starting elements and creating an output point list;
前記通常要素のそれぞれの前記入力点に対してコード生成不可の属性に設定したフラグを作成する第3ステップと、  A third step of creating a flag set to an attribute that cannot generate a code for each input point of the normal element;
前記出力点リストから1つの前記出力点を選択して削除し、選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定し、特定された前記プログラム要素において、選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更する第4ステップと、  Selecting and deleting one of the output points from the output point list, identifying the program element having the input point coupled to the selected output point, and selected in the identified program element A fourth step of changing the flag of the input point coupled to the output point to an attribute capable of generating a code;
特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成し、コードを生成した前記プログラム要素の前記出力点に付された前記識別子を取得して前記出力点リストに格納する第5ステップと、  When the flag of all the input points of the identified program element is changed to an attribute capable of generating code, a code corresponding to the program element is generated, and the output of the program element generating the code A fifth step of obtaining the identifier attached to a point and storing it in the output point list;
を有し、前記第4ステップにて前記出力点リストからの前記出力点の選択に成功しなくなるまで前記第4ステップおよび前記第5ステップを繰り返すことを特徴とするプログラム自動生成方法。  And the fourth step and the fifth step are repeated until the output point list is not successfully selected from the output point list in the fourth step.
コンピュータに、  On the computer,
開始要素、通常要素、終端要素を含むすべてのプログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付する識別子付加手段、  An identifier adding means for assigning a unique identifier to an input point as a signal input point and an output point as a signal output point for all program elements including a start element, a normal element, and a terminal element ,
前記開始要素および前記通常要素の前記出力点に付された前記識別子を取得して出力点リストを作成するリスト作成手段、  List creation means for obtaining the identifier attached to the output points of the start element and the normal element and creating an output point list;
前記通常要素のそれぞれの前記入力点に対して前記通常要素がコード生成可能か否かの属性を持ったフラグを作成するフラグ作成手段、  Flag creating means for creating a flag having an attribute as to whether or not the normal element can generate code for each input point of the normal element;
前記出力点リストから1つの前記出力点を選択して削除し、選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定し、特定された前記プログラム要素において、選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更し、特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成し、前記リスト作成手段によりコードを生成した前記プログラム要素である前記通常要素の前記出力点に付された前記識別子を取得して前記出力点リストに格納する処理を、前記出力点リストに格納されている前記出力点がなくなるまで繰り返す手段、  Selecting and deleting one of the output points from the output point list, identifying the program element having the input point coupled to the selected output point, and selected in the identified program element The flag of the input point coupled to the output point is changed to an attribute capable of code generation, and the flag of all the input points of the identified program element is changed to an attribute capable of code generation In this case, a code corresponding to the program element is generated, and the identifier attached to the output point of the normal element that is the program element for which the code is generated by the list creation unit is acquired and stored in the output point list Means for repeating the process until the output points stored in the output point list are exhausted,
として機能させるためのプログラム自動生成プログラム。  Program automatic generation program to function as.
コンピュータに、  On the computer,
開始要素、通常要素、終端要素を含むすべてのプログラム要素に対して、信号が入力する点である入力点と信号が出力される点である出力点とにそれぞれ一意な識別子を付する識別子付加手段、  An identifier adding means for assigning a unique identifier to an input point as a signal input point and an output point as a signal output point for all program elements including a start element, a normal element, and a terminal element ,
前記開始要素および前記通常要素の前記出力点に付された前記識別子を取得して出力点リストを作成するリスト作成手段、  List creation means for obtaining the identifier attached to the output points of the start element and the normal element and creating an output point list;
前記通常要素のそれぞれの前記入力点に対して前記通常要素がコード生成可能か否かの属性を持ったフラグを作成するフラグ作成手段、  Flag creating means for creating a flag having an attribute as to whether or not the normal element can generate code for each input point of the normal element;
前記出力点リストから1つの前記出力点を選択して削除し、選択された前記出力点に結合された前記入力点を有する前記プログラム要素を特定し、特定された前記プログラム要素において、選択された前記出力点に結合された前記入力点の前記フラグをコード生成可能の属性に変更し、特定された前記プログラム要素が有するすべての前記入力点の前記フラグがコード生成可能の属性に変更されている場合に前記プログラム要素に対応するコードを生成し、前記リスト作成手段によりコードを生成した前記プログラム要素である前記通常要素の前記出力点に付された前記識別子を前記リスト作成手段が取得して前記出力点リストに格納する処理を、前記出力点リストに格納されている前記出力点がなくなるまで繰り返す手段、  Selecting and deleting one of the output points from the output point list, identifying the program element having the input point coupled to the selected output point, and selected in the identified program element The flag of the input point coupled to the output point is changed to an attribute capable of code generation, and the flag of all the input points of the identified program element is changed to an attribute capable of code generation A code corresponding to the program element is generated, and the list creation means obtains the identifier attached to the output point of the normal element that is the program element for which the code is generated by the list creation means. Means for repeating the process of storing in the output point list until there are no more output points stored in the output point list;
として機能させるためのプログラム自動生成プログラムを記録したコンピュータ読み取り可能な記録媒体。  The computer-readable recording medium which recorded the program automatic generation program for functioning as a computer.
JP2005102636A 2005-03-31 2005-03-31 Program automatic generation apparatus, method, and program Expired - Lifetime JP4904712B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005102636A JP4904712B2 (en) 2005-03-31 2005-03-31 Program automatic generation apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005102636A JP4904712B2 (en) 2005-03-31 2005-03-31 Program automatic generation apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2006285480A JP2006285480A (en) 2006-10-19
JP4904712B2 true JP4904712B2 (en) 2012-03-28

Family

ID=37407363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005102636A Expired - Lifetime JP4904712B2 (en) 2005-03-31 2005-03-31 Program automatic generation apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP4904712B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5040320B2 (en) * 2007-01-15 2012-10-03 富士電機株式会社 Program development support apparatus, program development support method, and program development support program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0588869A (en) * 1991-09-30 1993-04-09 Hitachi Ltd Method and device for automatically generating program
JPH05233240A (en) * 1992-02-19 1993-09-10 Mitsubishi Electric Corp Software development supporting system
JPH10301763A (en) * 1997-04-25 1998-11-13 Mitsubishi Electric Corp Digital control program creation support system
JP2000242480A (en) * 1999-02-18 2000-09-08 Hitachi Ltd Automatic control program generator

Also Published As

Publication number Publication date
JP2006285480A (en) 2006-10-19

Similar Documents

Publication Publication Date Title
JP4667386B2 (en) Business model diagram creation support program, business model diagram creation support method, and business model diagram creation support device
KR101087312B1 (en) Import of automatically generated content
US8726226B2 (en) Integrated work lists for engineering project change management
KR101076867B1 (en) Automatic Image Capture to Generate Content
CN102081520B (en) Method and system for establishing graphical user interface of embedded digital video recorder
JP5327908B2 (en) Method and apparatus for identifying automatic operation parts
JPWO2010044150A1 (en) Program change management apparatus, program change management program, and program change management method
US20200241850A1 (en) Code Management System and Code Management Method
JP4295775B2 (en) GUI test support system and application program for test support
US7908588B2 (en) Program presentation with reviewer feedback maintenance
JP4904712B2 (en) Program automatic generation apparatus, method, and program
JP2013152580A (en) Code generation device, code generation method, and program
US20040170382A1 (en) Task-oriented nonlinear hypervideo editing method and apparatus
JP4475933B2 (en) Flow diagram creation program and flow diagram creation method
JP5040320B2 (en) Program development support apparatus, program development support method, and program development support program
JP2005031737A (en) Source code generation system, generation method thereof, generation program thereof, and software development support tool
JP4672695B2 (en) Control system development support apparatus, control system development support method, and program for causing computer to execute the method
US20040015860A1 (en) In the development of computer programs, a method of recording the sequential development of each of a plurality of files forming the program
JP4848772B2 (en) Program generating apparatus and program generating program
JP5263417B2 (en) Program, editing method, and computer
JP5012887B2 (en) Program, editing method, and computer
JP5842437B2 (en) Information processing apparatus and information processing program
JP4180099B2 (en) Recording medium recording sequence analysis program, sequence analysis apparatus, and sequence analysis method
JP2965000B2 (en) Hardware description language editing apparatus, hardware description language editing method, and storage medium storing hardware description language editing program
JP5263418B2 (en) Program, editing method, and computer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110628

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110826

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110920

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111116

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111226

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150120

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4904712

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term