JP5316273B2 - Program automatic generation apparatus and program automatic generation method - Google Patents

Program automatic generation apparatus and program automatic generation method Download PDF

Info

Publication number
JP5316273B2
JP5316273B2 JP2009165312A JP2009165312A JP5316273B2 JP 5316273 B2 JP5316273 B2 JP 5316273B2 JP 2009165312 A JP2009165312 A JP 2009165312A JP 2009165312 A JP2009165312 A JP 2009165312A JP 5316273 B2 JP5316273 B2 JP 5316273B2
Authority
JP
Japan
Prior art keywords
program
data
version number
code generation
user interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009165312A
Other languages
Japanese (ja)
Other versions
JP2011022682A (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 JP2009165312A priority Critical patent/JP5316273B2/en
Publication of JP2011022682A publication Critical patent/JP2011022682A/en
Application granted granted Critical
Publication of JP5316273B2 publication Critical patent/JP5316273B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To generate a program before a change as the need arises even when a function of handling a user interface is changed by independently managing each of the function of handling the user interface and a function of converting a program having a figure format into a program having a text format. <P>SOLUTION: This automatic program generation device includes: a user interface means 4 imparting an item that is identification information of each processing unit to each processing unit of program generation processing and storing a function corresponding to a logical element symbol or connection relation between the logical element symbols into a storage device as figure format data; and a code generation means 5 executing the generation processing of the program in each processing unit based on the figure format data. The user interface means and the code generation means can be independently replaced. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、図形によってプログラムを記述し、その図形情報をもとにコンピュータが実行あるいは翻訳可能なプログラムを自動生成するプログラム自動生成装置およびプログラム自動生成方法に関する。   The present invention relates to a program automatic generation apparatus and a program automatic generation method for describing a program by a graphic and automatically generating a program that can be executed or translated by a computer based on the graphic information.

通常、プログラムの製作に際しては、C言語などの高級言語を利用して原始プログラムを記述し、コンパイラを用いてコンピュータが実行可能な形式に変換するという方法が採られている。近年、プログラムの品質や生産性向上のために、図形を用いて原始プログラムを記述し、これをコンピュータが直接実行可能な形式に変換したり、あるいは、C言語などの従来のプログラム開発環境を用いればコンピュータが実行可能な形式に変換できるような中間的な形式(多くはテキスト形式)に変換したりする技術が提案されている。この方法は、設計者が記述するプログラムを図形で表現するため、視認性が良く生産性が向上すると共に、プログラムの不具合が容易に発見できるようになるため品質の向上も期待できる。   Normally, when a program is produced, a method is used in which a source program is described using a high-level language such as C language, and converted into a computer-executable format using a compiler. In recent years, in order to improve the quality and productivity of programs, a primitive program is described using graphics and converted into a format that can be directly executed by a computer, or a conventional program development environment such as C language is used. For example, a technique for converting to an intermediate format (mostly text format) that can be converted into a computer-executable format has been proposed. In this method, the program written by the designer is represented by a graphic, so that the visibility is good and the productivity is improved, and the defect of the program can be easily found, so that an improvement in quality can be expected.

従来の図形式のプログラミング技術の例として、特許文献1には、アセンブラのライブラリに対応した図形情報で記述される機能ブロック図によりプログラムを自動生成する技術が開示されている。特許文献2には、図形式で記述したプログラム(モデル)を演算周期ごとに分割し重複メモリを削除するプログラム自動生成装置の技術が開示されている。特許文献3には、定数データ領域を効率的に扱い組み込みマイコンで扱えるプログラムを自動生成するための技術が開示されている。特許文献4には、プログラム記憶手段、プログラム表示手段、プログラム配置手段、履歴テーブル作成手段、操作シミュレーション手段により構成される、プログラム自動生成装置の技術が、開示されている。特許文献5には、グラフィックシンボルを画面上でつなぎ合わせて制御ソフトウェアを設計するプログラム自動生成装置の技術が開示されている。特許文献6には、論理素子シンボルとその間の接続関係から自動的に実行順序を決定するプログラム自動生成装置の技術が開示されている。特許文献7には、属性情報が付記されて図示された制御プログラム仕様に基づいて制御用プログラムを自動生成する装置の技術が開示されている。特許文献8には、グラフィカル・オブジェクトの特性や関係を定義してグラフィカル・エディタによりプログラムの動作を記述するビジュアル・プログラミング方法の技術が開示されている。特許文献9には、絵情報により表現された、標準モジュールを組み合わせて作成される非標準モジュールにより制御用プログラムを記述するプログラム自動生成装置の技術が開示されている。   As an example of a conventional graphical programming technique, Patent Document 1 discloses a technique for automatically generating a program using a functional block diagram described by graphic information corresponding to an assembler library. Patent Document 2 discloses a technology of an automatic program generation device that divides a program (model) described in a diagram format for each calculation cycle and deletes duplicate memory. Patent Document 3 discloses a technique for automatically generating a program that efficiently handles a constant data area and can be handled by an embedded microcomputer. Patent Document 4 discloses a technique of an automatic program generation device that includes program storage means, program display means, program placement means, history table creation means, and operation simulation means. Patent Document 5 discloses a technology of an automatic program generation device that designs control software by connecting graphic symbols on a screen. Patent Document 6 discloses a technique of an automatic program generation device that automatically determines an execution order from logical element symbols and the connection relationship therebetween. Patent Document 7 discloses a technology of an apparatus for automatically generating a control program based on a control program specification shown with attribute information appended thereto. Patent Document 8 discloses a technique of a visual programming method in which the characteristics and relations of a graphical object are defined and the operation of a program is described using a graphical editor. Patent Document 9 discloses a technology of an automatic program generation device that describes a control program using a non-standard module that is created by combining standard modules and is expressed by picture information.

このような図形式プログラムからコンピュータが実行/翻訳可能なプログラムを生成するプログラム自動生成装置を構成するには、図形の入力・検索・管理などのユーザインターフェース(CADインターフェース)を扱う機能と、図形式のプログラムをテキスト形式のプログラムに変換する機能が必要となる。   In order to configure an automatic program generation apparatus that generates a program that can be executed / translated by a computer from such a diagram format program, a function for handling a user interface (CAD interface) such as figure input, search, and management, and diagram format It is necessary to have a function to convert this program into a text format program.

特許文献11には、CADインターフェース機能によって構造化プログラムを扱うための技術が開示されている。また、特許文献12には、図形式のプログラムをテキスト形式のプログラムに変換する機能に関する技術が開示されている。従来は、例えば特許文献6の図1に記載されているように、これらの機能が一体として実装されていた。これは、プログラム自動生成装置のユーザインターフェース機能が改良されることに伴って、コード生成機能により生成されるコードも改良されることがあり得るからである。   Patent Document 11 discloses a technique for handling a structured program by a CAD interface function. Patent Document 12 discloses a technique related to a function of converting a diagram format program into a text format program. Conventionally, for example, as described in FIG. 1 of Patent Document 6, these functions are integrally mounted. This is because the code generated by the code generation function may be improved as the user interface function of the automatic program generation apparatus is improved.

特開2007−128345号公報JP 2007-128345 A 特開2006−201841号公報JP 2006-201841 A 特開2002−91762号公報JP 2002-91762 A 特開平7−200277号公報Japanese Unexamined Patent Publication No. 7-200277 特開平6−301548号公報JP-A-6-301548 特開平5−88869号公報Japanese Patent Laid-Open No. 5-88869 特開平5−265734号公報JP-A-5-265734 WO98/40817WO98 / 40817 特開平2−277126号公報JP-A-2-277126 特開昭64−76278号公報JP-A 64-76278 特開2007−11507号公報JP 2007-11507 A 特開2006−285480号公報JP 2006-285480 A

しかしながら、特に組み込みの分野では、特許文献2で指摘されているように、実行タイミングが厳しいという事情がある。これは、特許文献7にも、ハードウェアの情報への言及があるとおり、組み込み分野では、ハードウェアと協調動作をするようにプログラムが製作される必要があることが一因となっている。   However, particularly in the field of incorporation, as pointed out in Patent Document 2, there is a situation in which execution timing is severe. This is partly because in the embedded field, a program needs to be produced so as to perform a cooperative operation with hardware, as Patent Document 7 also mentions hardware information.

プログラム自動生成装置の更新によりユーザインターフェース等の機能が変更された場合、同時に図形式プログラムをもとに生成されるプログラムにも変更が生じると、実行タイミングが変化する可能性がある。このため、既存のプログラムの再利用を考えた場合、変新されたプログラム自動生成装置によって生成されたプログラムを使用するのが難しくなり、更新されたプログラム自動生成装置自体の使用が難しくなるという問題があった。   When functions such as the user interface are changed by updating the automatic program generation device, there is a possibility that the execution timing may change if a program generated based on the graphic program is also changed. For this reason, when considering the reuse of existing programs, it is difficult to use the program generated by the new automatic program generation device, and it becomes difficult to use the updated automatic program generation device itself. was there.

また、特許文献2や特許文献3で指摘されているように、メモリについても組み込みソフトでは余裕がない場合が多く、メモリの利用状況が変化した場合も、同様に互換性がないとみなされ、新しいプログラム自動生成装置の適用が難しくなるという問題もあった。   In addition, as pointed out in Patent Document 2 and Patent Document 3, there are many cases where there is no room for embedded software, and even when the memory usage changes, it is considered that there is no compatibility, There was also a problem that it was difficult to apply the new automatic program generation device.

さらに、プログラム自動生成装置に図形式プログラムの記述からコンピュータが実行/翻訳可能なプログラムを自動生成するまでの一連の機能を一体として実装しようとすると、図形の入力などのユーザインターフェースを扱う機能と、図形式のプログラムをテキスト形式のプログラムに変換する機能のように、異なる性質のプログラムを同時に製作する必要があり、効率的に製作することができないという問題もあった。   Furthermore, when a series of functions from the description of a diagram format program to the automatic generation of a program that can be executed / translated by a computer are integrated in the program automatic generation device, a function for handling a user interface such as figure input, There is also a problem in that it is necessary to simultaneously create programs having different properties, such as a function of converting a diagram format program into a text format program, and the program cannot be efficiently produced.

本発明は、上述のかかる事情に鑑みてなされたものであり、ユーザインターフェースを扱う機能、および図形式のプログラムをテキスト形式のプログラムに変換する機能をそれぞれ独立して管理でき、ユーザインターフェースを扱う機能に変更があった場合でも、必要に応じて変更前のコードを生成することのできるプログラム自動生成装置およびプログラム自動生成方法を提供することを目的とする。   The present invention has been made in view of the above-described circumstances, and is capable of independently managing a function for handling a user interface and a function for converting a diagram format program into a text format program, and a function for handling a user interface. An object of the present invention is to provide an automatic program generation device and an automatic program generation method capable of generating a code before the change as necessary even when there is a change.

上記目的を達成するため、本発明に係わるプログラム自動生成装置は、論理素子シンボルと該論理素子シンボル間の接続関係によって表される図形情報に基づいてプログラムを生成するプログラム自動生成装置であって、論理素子シンボルに対応する機能または論理素子シンボル間の接続関係をプログラム生成処理の処理単位ごとに各処理単位の識別情報である項目を付して図形式データ(2)として記憶装置(12)に保存するユーザインターフェース手段(4)と、図形式データをもとに処理単位ごとにプログラムの生成処理を実行するコード生成手段(5)と、を備え、ユーザインターフェース手段およびコード生成手段はそれぞれ独立して差し替え可能であることを特徴とする。   In order to achieve the above object, an automatic program generation apparatus according to the present invention is an automatic program generation apparatus that generates a program based on graphic information represented by logical element symbols and connection relationships between the logical element symbols. Functions corresponding to the logic element symbols or connection relations between the logic element symbols are attached to the storage device (12) as graphic data (2) by adding an item which is identification information of each processing unit for each processing unit of the program generation processing. User interface means (4) for saving and code generation means (5) for executing program generation processing for each processing unit based on graphic data, the user interface means and the code generation means are independent of each other. And can be replaced.

本発明のユーザインターフェース手段は、コード生成手段に渡す図形式データをコード生成手段の処理単位ごとに作成するので、ユーザインターフェース手段とコード生成手段を別々に構成することが可能となり、これにより、コード生成手段のみを差し替えて動作させることができるようになる。   Since the user interface means of the present invention creates graphic data to be passed to the code generation means for each processing unit of the code generation means, the user interface means and the code generation means can be configured separately. Only the generating means can be replaced and operated.

好ましくは、この図形式データは、ユーザインターフェース手段の版数(バージョン)データを含み、コード生成手段は、版数データを取得して図形式データを処理可能か否かを判定し、処理可能でないと判定した場合は異常処理を実行するようにすると良い。   Preferably, the graphic data includes version number data of the user interface means, and the code generation means determines whether the graphic data can be processed by acquiring the version data, and is not processable. If it is determined that, abnormal processing should be executed.

これにより、コード生成手段は起動時にまず図形式データ中の版数データのみを検索すればよく、迅速に処理の可否の判定をすることができる。ここで、版数データとは、プログラム等の更新履歴を表すいわゆるバージョン情報のほか、更新によってデータ形式を識別できるデータを追加するなど実質的に版数として管理可能な情報も含む。   As a result, the code generation means only needs to search only the version number data in the graphic data at the time of activation, and can quickly determine whether processing is possible. Here, the version number data includes so-called version information indicating an update history of the program and the like, as well as information that can be managed substantially as a version number, such as adding data that can identify the data format by updating.

本発明によるプログラム自動生成装置は、さらに、ユーザインターフェース手段とコード生成手段が正常に機能するように該両手段の版数データの組み合わせ情報を保存する版数管理テーブル(8)を備え、コード生成手段は、起動時に組み合わせ情報に基づいて、該ユーザインターフェース手段の版数データと該コード生成手段の版数データの組み合わせが正当か否かを判定し、正当であると判定された場合にのみ該ユーザインターフェース手段によって保存された図形式データをもとにプログラムの生成処理を実行することを特徴とする。   The automatic program generation apparatus according to the present invention further includes a version number management table (8) for storing combination information of version number data of both means so that the user interface means and the code generation means function normally, and the code generation The means determines whether or not the combination of the version number data of the user interface means and the version number data of the code generation means is valid based on combination information at the time of activation, and only when it is determined to be valid A program generation process is executed based on the graphic data stored by the user interface means.

本発明では、正常に機能する組み合わせとなるユーザインターフェース手段とコード生成手段の版数を管理するようにする一方、ユーザインターフェース手段は、自己の版数データをコード生成手段に渡すことによって、コード生成手段は正当な組み合わせか否かを正確に判定することができる。   In the present invention, the version number of the user interface unit and the code generation unit, which is a normally functioning combination, is managed. On the other hand, the user interface unit generates the code generation by passing its version number data to the code generation unit. The means can accurately determine whether the combination is valid.

なお、版数データの異なる複数のコード生成手段と、複数のコード生成手段のうち起動すべきコード生成手段を特定するコード生成指定手段とを設け、ユーザインターフェース手段は、コード生成指定手段によって特定されたコード生成手段を起動するようにしてもよい。   A plurality of code generation means having different version number data and a code generation specifying means for specifying a code generation means to be activated among the plurality of code generation means are provided, and the user interface means is specified by the code generation specifying means. The code generation means may be activated.

また、本発明に係わるプログラム自動生成装置は、さらに項目ごとにユーザインターフェース手段の版数データを特定する項目別版数管理テーブル(7)を備え、コード生成手段は、処理すべきか否かの基準となる版数データを起動時に取得し、図形式データの項目ごとに項目別版数管理テーブルを参照して、項目の版数データと取得した版数データとに基づいて処理を実行すべきか否かを判定し、処理すべきであると判定された項目についてのみ所定の処理を実行することを特徴とする。   The automatic program generation apparatus according to the present invention further includes an item-specific version number management table (7) for specifying the version number data of the user interface means for each item, and the code generation means determines whether or not to process. Whether to execute the process based on the version data of the item and the acquired version data, referring to the item version management table for each item of graphic data This is characterized in that a predetermined process is executed only for an item determined to be processed.

本発明では、処理単位の項目ごとにその機能を追加・更新したときのユーザインターフェース手段の版数データを関連付けて管理して、コード生成手段は、起動時に入力した版数データを基準に処理すべきか否かを判定して処理すべき項目についてのみ生成処理を実行する。これにより、ユーザインターフェース手段の版数が更新されても、既存の組み込みシステムのプログラムと同じ版数のプログラムを生成することができる。   In the present invention, the version number data of the user interface means when the function is added / updated for each processing unit item is managed in association with each other, and the code generation means performs processing based on the version number data input at the time of activation. The generation process is executed only for items to be processed. Thereby, even if the version number of the user interface means is updated, a program having the same version number as the program of the existing embedded system can be generated.

好ましくは、コード生成手段は、処理を行った各項目の版数データのうち、最大の版数データを演算して生成したプログラムに関連付けて出力するようにすると良い。これにより、その生成プログラムの版数の管理ができ、新たにプログラムを生成するような場合に、その版数を指定すれば同等の機能・性能を有するプログラムを生成することができる。また、版数データ指定をしないことによって最新の版数データでプログラムを生成することもできる。   Preferably, the code generation means may output the maximum version number data in association with the program generated by calculating the maximum version number data among the processed version number data. Thereby, the version number of the generated program can be managed, and when a new program is generated, a program having the same function and performance can be generated by designating the version number. In addition, the program can be generated with the latest version number data by not specifying the version number data.

本発明に係わるプログラム自動生成装置のコード生成手段は、項目の版数データと入力した版数データとに基づいて処理を実行すべきか否かを判定した結果、処理すべきでないと判定した項目と、項目別版数管理テーブルで該項目に関連付けられた版数データとを記録しておき、プログラムの生成処理の終了後に、記録した内容を出力することを特徴とする。   The code generation means of the automatic program generation device according to the present invention determines whether or not to execute processing based on the version number data of the item and the input version number data, and determines that the item should not be processed. The version number data associated with the item is recorded in the item-specific version number management table, and the recorded contents are output after the program generation process is completed.

本発明では、処理されなかった項目を履歴として記録するので、生成されたプログラムをシステムに組み込む上で問題が無いかどうかを確認ができ、また、必ずしもユーザインターフェース手段のバージョンアップに合わせてコード生成手段をバージョンアップしなくても、既設のシステム対応のプログラムを生成することが可能となる。   In the present invention, since items that have not been processed are recorded as a history, it can be confirmed whether there is no problem in incorporating the generated program into the system, and code generation is always performed in accordance with version upgrade of the user interface means. Even if the means is not upgraded, it is possible to generate an existing system compatible program.

好ましくは、コード生成手段は、図形式データがユーザインターフェース手段の版数データ変更その他の要因により拡張され、コード生成手段の処理不可能な項目を含む場合であっても、処理可能な項目のみを実行してプログラムを生成するようにするとよい。   Preferably, the code generation means includes only items that can be processed even if the graphic data is expanded due to a change in the version number data of the user interface means or other factors and includes items that cannot be processed by the code generation means. It is good to execute and generate a program.

コード生成手段の処理不可能な項目を含む場合に異常終了しないことによって、その版数にあったプログラムの生成が可能になる。   If the code generation means includes an unprocessable item, it does not terminate abnormally, so that a program corresponding to the version number can be generated.

さらに、本発明に係わるプログラム自動生成装置のユーザインターフェース手段は、図形式データにアクセスするための記憶装置内の位置関係を表すルート情報をコード生成手段に渡し、コード生成手段は、該ルート情報をもとに図形式データを取得し、該図形式データに基づいてプログラムを生成することを特徴とする。   Further, the user interface means of the automatic program generation apparatus according to the present invention passes route information indicating the positional relationship in the storage device for accessing the graphic data to the code generation means, and the code generation means Based on the diagram format data, the program is generated based on the diagram format data.

このルート情報によって確実にユーザインターフェース手段とコード生成手段の版数のマッチングをとることができる。なお、ルート情報に基づいてユーザインターフェース手段の実行プログラムからもっとも近い位置に存在するコード生成手段が起動されるようにしても良い。   This route information can reliably match the version numbers of the user interface means and the code generation means. It should be noted that the code generation means existing closest to the execution program of the user interface means may be activated based on the route information.

本発明に係わるプログラム自動生成方法は、コンピュータ装置を用いて、図形情報をもとにプログラムを生成するプログラム自動生成方法であって、コンピュータ装置が、論理素子シンボルと該論理素子シンボル間の接続関係によって表される図形情報の入力を受け付ける段階と、コンピュータ装置が、論理素子シンボルに対応する機能または論理素子シンボル間の接続関係をプログラム生成処理の処理単位ごとに各処理単位の識別情報である項目を付して図形式データを生成する段階と、コンピュータ装置が、図形式データの項目ごとに版数データ付してコンピュータ装置の記憶装置に保存する段階と、コンピュータ装置が、処理すべきか否かの基準となる版数データを入力し、処理対象の図形式データの項目ごとに記憶装置に保存されている該当する項目の版数データと比較して、処理すべきであると判定された項目についてのみプログラムの生成処理を行い、処理すべきであると判定されなかった項目は該項目に関連付けられた版数データを付して記録する段階と、コンピュータ装置が、プログラムの生成処理の終了後に、記録した内容を出力する段階と、を含むことを特徴とする。

A program automatic generation method according to the present invention is a program automatic generation method for generating a program based on graphic information using a computer device , wherein the computer device has a connection relationship between a logic element symbol and the logic element symbol. The step of accepting the input of the graphic information represented by the item , and the computer device is the identification information of each processing unit for each processing unit of the program generation process for the function corresponding to the logical element symbol or the connection relationship between the logical element symbols To generate graphic data, the computer device adds version data to each graphic data item and stores it in the storage device of the computer device, and whether or not the computer device should process The standard version data is input and saved in the storage device for each graphic data item to be processed. Compared with the version data of the corresponding item, the program generation process is performed only for the item that is determined to be processed, and the item that is not determined to be processed is associated with the item. The method includes a step of recording with the version number data and a step of outputting the recorded contents by the computer device after completion of the program generation process.

本発明では、図形式データをプログラムの処理単位ごとに版数データを付し、入力装置等を介して入力された版数データと比較して、この版数データに基づいて図形式データの項目ごとに処理をするかどうかを決定する。   In the present invention, the version data is attached to the figure format data for each processing unit of the program, and compared with the version number data input via the input device or the like, the item of the figure format data is based on the version number data. Decide whether to process each.

本発明によれば、ユーザインターフェースを扱う機能と、コード生成機能を別々に構成することができるようになり、その結果、コード生成機能のみを差し替えて動作させることができるようになる。これにより、このような図形式プログラムのシステムの版数を更新し、ユーザインターフェースのみならず、コード生成機能により生成されるプログラムに変更が生じる場合にも、必要に応じてコード生成機能を旧版に差し替えて利用することが可能になる。   According to the present invention, a function for handling a user interface and a code generation function can be configured separately, and as a result, only the code generation function can be replaced and operated. As a result, the system version of such a diagrammatic program is updated, so that not only the user interface but also the program generated by the code generation function changes, the code generation function can be changed to the old version as necessary. It becomes possible to replace and use.

また、コードの互換性を維持するために、改良されたユーザインターフェースが利用できないという不具合が解消され、より効率的にこのような図形式プログラムのシステムを運用できるようになる。特に、組み込み分野において、プログラムの品質や開発時の生産性の向上を図ることができる。   Further, in order to maintain the compatibility of the code, the problem that the improved user interface cannot be used is solved, and the system of such a graphic program can be operated more efficiently. In particular, in the embedded field, it is possible to improve program quality and productivity during development.

本発明の実施の形態によるプログラム自動生成装置の装置構成図である。It is an apparatus block diagram of the program automatic generation apparatus by embodiment of this invention. 本発明の第1の実施の形態によるプログラム自動生成装置の機能構成図である。It is a functional block diagram of the automatic program generation apparatus by the 1st Embodiment of this invention. 図1の補助記憶装置に記憶されるデータの構成例である。It is a structural example of the data memorize | stored in the auxiliary storage device of FIG. 図2の図形式データの例である。It is an example of the diagram format data of FIG. 本発明の第1の実施の形態によるユーザインターフェース手段4の版数を図形式データ2に記録するようにした例の説明図である。It is explanatory drawing of the example which recorded the version number of the user interface means 4 by the 1st Embodiment of this invention on the graphical data 2. FIG. コード生成手段5が図形式データについて処理可能な形式であるか否かを判定するときの処理手順を示すフローチャートである。It is a flowchart which shows a process sequence when the code production | generation means 5 determines whether it is a format which can be processed about figure format data. 第1の実施の形態の一実施例によるプログラム自動生成装置の装置構成図である。It is an apparatus block diagram of the automatic program generation apparatus by one Example of 1st Embodiment. 図7の版数管理テーブル8のデータ構成図である。It is a data block diagram of the version number management table 8 of FIG. 図7のユーザインターフェース手段4の版数データ管理処理手順を示すフローチャートである。It is a flowchart which shows the version number data management processing procedure of the user interface means 4 of FIG. 図7のコード生成手段5の版数判定処理手順を示すフローチャートである。It is a flowchart which shows the version number determination processing procedure of the code generation means 5 of FIG. 図4の他の実施例であり、データ形式の拡張の例である。4 is another example of FIG. 4 and an example of data format expansion. 複数のコード生成手段を識別するための機能の説明図である。It is explanatory drawing of the function for identifying a some code production | generation means. 図12の他の実施例であり、複数のコード生成手段があるときに切り替えて使用する別の構成例である。FIG. 13 is another example of FIG. 12 and is another configuration example that is used by switching when there are a plurality of code generation means. 図1のコード生成手段5による拡張されたタグのデータを無視する読み込み処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading process which ignores the data of the extended tag by the code generation means 5 of FIG. 他の実施例2による版数データ管理処理で用いられる各テーブルの説明図であり、図15(a)はデータ形式の変更等があったか否かを判定するための判定テーブル21のデータ構成例、図15(b)は判定テーブル21の内容をもとに作成されたコード生成手段の更新要否を判定するためのインストーラ用判定テーブル22のデータ構成例、図15(c)はインストーラ用判定テーブル22に基づいてインストーラによって生成される版数管理テーブル8のデータ構成例である。FIG. 15 is an explanatory diagram of each table used in the version number data management process according to another embodiment 2, and FIG. 15A is a data configuration example of a determination table 21 for determining whether or not the data format has been changed; FIG. 15B shows an example of the data structure of the installer determination table 22 for determining whether or not the code generating means created based on the contents of the determination table 21 needs to be updated. FIG. 15C shows the installer determination table. 22 is a data configuration example of the version number management table 8 generated by the installer based on FIG. 他の実施例2による版数データ管理処理の手順を示すフローチャートである。12 is a flowchart illustrating a procedure of version number data management processing according to another embodiment 2; 他の実施例3による版数データ管理処理で用いられる各テーブルの説明図であり、図17(a)はデータ形式の変更等があったか否かを判定するための判定テーブル21のデータ構成例、図17(b)判定テーブル21に基づいてインストーラによって生成される版数管理テーブル8のデータ構成例である。FIG. 17 is an explanatory diagram of each table used in the version number data management process according to another embodiment 3, and FIG. 17A is a data configuration example of a determination table 21 for determining whether or not a data format has been changed; FIG. 17B is a data configuration example of the version number management table 8 generated by the installer based on the determination table 21. 他の実施例3による版数データ管理処理の手順を示すフローチャートである。12 is a flowchart illustrating a procedure of version number data management processing according to another embodiment 3; 本発明の第2の実施の形態によるプログラム自動生成装置の機能構成図である。It is a functional block diagram of the automatic program generation apparatus by the 2nd Embodiment of this invention. 図19の図形式データ2の構造の説明図である。It is explanatory drawing of the structure of the graphical data 2 of FIG. 図19の項目別版数管理テーブル7のデータ構造図である。It is a data structure figure of the version number management table 7 classified by item of FIG. 図19のコード生成手段5の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the code generation means 5 of FIG.

以下、本発明の実施の形態を説明する。図1は、本実施の形態によるプログラム自動生成装置1の装置構成図である。この図に示すように、プログラム自動生成装置1は、データを入力する入力装置13、種々の演算処理を実行する演算装置10、演算装置10のプログラム実行等に用いられる主記憶装置11、データやプログラムを保存する補助記憶装置12、および、演算結果を表示するディスプレイ装置14から構成されている。   Embodiments of the present invention will be described below. FIG. 1 is a device configuration diagram of an automatic program generation device 1 according to the present embodiment. As shown in this figure, the automatic program generation device 1 includes an input device 13 for inputting data, an arithmetic device 10 for executing various arithmetic processes, a main storage device 11 used for program execution of the arithmetic device 10, etc. The auxiliary storage device 12 stores the program and the display device 14 displays the calculation result.

図2は、本発明の第1の実施の形態によるプログラム自動生成装置1の機能構成図である。図1との関連において説明すると、ユーザインターフェース手段4とコード生成手段5は、実行ファイル形式で、プログラム自動生成装置1の補助記憶装置12に記憶されており、動作時には、主記憶装置11に読み込まれて、演算装置10によって実行される。ユーザインターフェース手段4は、入力装置13やディスプレイ装置14を介して図形式プログラム6を対話的に入力し、入力された図形式プログラム6をもとに図形式データ2を作成する機能である。また、コード生成手段5は、この図形式データ2を読み込んで、組み込みシステム用の生成プログラム3を自動生成する機能である。なお、生成プログラムは、コンパイラ入力用の中間プログラムを含む概念である。   FIG. 2 is a functional configuration diagram of the automatic program generation device 1 according to the first embodiment of the present invention. Referring to FIG. 1, the user interface unit 4 and the code generation unit 5 are stored in the auxiliary storage device 12 of the automatic program generation device 1 in an executable file format and read into the main storage device 11 during operation. And executed by the arithmetic unit 10. The user interface means 4 has a function of interactively inputting a graphic format program 6 via the input device 13 and the display device 14 and creating graphic data 2 based on the input graphic format program 6. The code generation means 5 has a function of reading this graphic data 2 and automatically generating a generation program 3 for an embedded system. The generation program is a concept including an intermediate program for compiler input.

このユーザインターフェース手段4とコード生成手段5は演算装置10の機能としてプログラムによって実現可能である。また、両手段4,5は、別々に補助記憶装置12に実装されるので、それぞれを独立して差し替えることができる。   The user interface unit 4 and the code generation unit 5 can be realized by a program as a function of the arithmetic unit 10. Moreover, since both means 4 and 5 are separately mounted on the auxiliary storage device 12, they can be replaced independently.

ユーザインターフェース手段4を介して作成される図形式データ2やコード生成手段5から出力される生成プログラム3は補助記憶装置12に記憶される。   The graphical data 2 created via the user interface means 4 and the generation program 3 output from the code generation means 5 are stored in the auxiliary storage device 12.

補助記憶装置12は、例えばハードディスクにより構成することができる。図3は、補助記憶装置12に記憶されるデータの構成例を示したものである。図3では階層ディレクトリ構造のファイルシステムが採用されており、ルートディレクトリの下位に実行ファイルを入れるサブディレクトリとデータファイルを入れるサブディレクトリが別々に設けられている。ユーザインターフェース手段4、および、コード生成手段5は、実行形式のファイルとして実行ファイルを入れるサブディレクトリに格納されている。また、図形式データ2と生成プログラム3は、ファイルとしてデータファイル保存用のサブディレクトリに格納されている。これらのファイルは、単一のファイルであっても良いが、規模が大きいときには、複数のファイル(ファイル群)で構成するようにしても良い。   The auxiliary storage device 12 can be constituted by a hard disk, for example. FIG. 3 shows a configuration example of data stored in the auxiliary storage device 12. In FIG. 3, a file system having a hierarchical directory structure is adopted, and a subdirectory for storing an execution file and a subdirectory for storing a data file are separately provided below the root directory. The user interface unit 4 and the code generation unit 5 are stored in a subdirectory in which an execution file is placed as an executable file. The graphic data 2 and the generation program 3 are stored as files in a subdirectory for saving data files. These files may be a single file, but may be composed of a plurality of files (file group) when the scale is large.

次に、上記の構成を有するプログラム自動生成装置1の動作を説明する。
設計者は、ユーザインターフェース手段4により、図形式プログラム6をディスプレイ装置14に表示させながら対話的に入力し、ユーザインターフェース手段4は、その入力されたデータを図形式データ2として保存する。
Next, the operation of the automatic program generation device 1 having the above configuration will be described.
The designer inputs the graphical program 6 interactively while displaying the graphic program 6 on the display device 14 by the user interface means 4, and the user interface means 4 stores the input data as graphic data 2.

次に、設計者は、ユーザインターフェース手段4を操作して、コード生成手段5を起動する。このとき、ユーザインターフェース手段4は、同手段4が保存した図形式データ2を識別可能な情報をコード生成手段5に渡す。コード生成手段5はこの情報を取得し、これをもとに、図形式データ2を読み出し、生成プログラム3に変換する。補助記憶装置12が例えば図3のように管理されているとき、「識別可能な情報」として、図形式データが格納されているファイルのファイル名やパスなど、ファイルを特定できる名称の文字列情報とすることができる。   Next, the designer operates the user interface unit 4 to activate the code generation unit 5. At this time, the user interface unit 4 passes information that can identify the graphic data 2 stored by the unit 4 to the code generation unit 5. The code generation means 5 acquires this information, reads the graphic data 2 based on this information, and converts it into the generation program 3. When the auxiliary storage device 12 is managed as shown in FIG. 3, for example, as “identifiable information”, character string information of a name that can identify a file, such as a file name or path of a file in which graphic data is stored It can be.

図4は図形式プログラムの例であり、図4(A)はディスプレイ装置14に表示されたところを示したものである。また、図4(B)は、図4(A)に対応する図形式プログラムを図形式データ2に格納する場合のデータの一例を表したものである。ここでは、XML形式のデータとしている。このXML形式は、コード生成手段5が処理単位ごとにデータを記述するのに適している。   FIG. 4 is an example of a diagram format program, and FIG. 4A shows what is displayed on the display device 14. FIG. 4B shows an example of data when the diagram format program corresponding to FIG. 4A is stored in the diagram format data 2. Here, the data is in XML format. This XML format is suitable for the code generation means 5 to describe data for each processing unit.

ところで、本システムのようにユーザインターフェース手段4とコード生成手段5を分離して実行させるようにすると、整合性が問題となる場合がある。そのため、本実施の形態では、ユーザインターフェース手段4の版数を識別データとして図形式データ2に記録するようにする。このときのデータの例を図5に示す。図4(B)と比べて、<Ver val="5"> のデータが追加になっている。なお、図形式データ2に記録する識別データは、ユーザインターフェース手段4の版数ではなく、図形式データ2のデータ形式の版数でもあっても良い。この場合も、具体的なデータの形としては図5と同様となる。   By the way, when the user interface unit 4 and the code generation unit 5 are separately executed as in the present system, consistency may be a problem. Therefore, in the present embodiment, the version number of the user interface means 4 is recorded in the graphic data 2 as identification data. An example of data at this time is shown in FIG. Compared to FIG. 4B, data of <Ver val = "5"> is added. The identification data recorded in the graphic data 2 may be the version of the data format of the graphic data 2 instead of the version of the user interface means 4. Also in this case, the specific data form is the same as in FIG.

このようにすれば、コード生成手段5は生成プログラム3を生成するにあたり、図5に示したような識別データを取得し、コード生成手段5が処理不可能な形式であると判定されたときに、異常処理を行うようにし、ユーザインターフェース手段4とコード生成手段5の不整合を防ぐことができる。   In this way, when the code generation means 5 generates the generation program 3, the identification data as shown in FIG. 5 is acquired, and it is determined that the code generation means 5 is in an unprocessable format. Thus, the abnormality process is performed, and the inconsistency between the user interface unit 4 and the code generation unit 5 can be prevented.

コード生成手段5が処理可能な形式であるか否かを判定するフローチャートの例を図6に示す。コード生成手段5には予め取り扱うことのできる版数の有効範囲が設定されており、コード生成手段5が版数データを読み出した後(S101)、版数データが有効範囲であるか否かを判定し(S102)、有効範囲でなかったときには、異常表示をして終了する(S104)。有効範囲であったときは、通常通り、図形式データ2を生成プログラム3に変換して終了する(S103)。   FIG. 6 shows an example of a flowchart for determining whether or not the code generation unit 5 has a processable format. A valid range of version numbers that can be handled in advance is set in the code generation means 5, and after the code generation means 5 reads the version number data (S101), it is determined whether the version number data is in the valid range. When it is determined (S102) and it is not within the effective range, an abnormality is displayed and the process is terminated (S104). If it is within the valid range, the diagram format data 2 is converted into the generation program 3 as usual, and the process ends (S103).

なお、版数データが有効範囲であるか否かを判定するためには、ユーザインターフェース手段4と整合する(すなわち、組み合わせて動作可能な)コード生成手段5の版数を如何に管理するかが重要になる。これについては、図形式データ2のうち実行可能な部分のみを読み取るようにコード生成手段5を構築することにより、以下の構成およびアルゴリズムによって、ユーザインターフェース手段4と整合するコード生成手段5の版数を効率的に管理することができる。   In order to determine whether or not the version number data is within the valid range, how to manage the version number of the code generation means 5 that is consistent with the user interface means 4 (that is, operable in combination) is managed. Become important. For this, by constructing the code generation means 5 so as to read only the executable part of the diagram data 2, the version number of the code generation means 5 that matches the user interface means 4 by the following configuration and algorithm: Can be managed efficiently.

図7は、版数管理を行うための一実施例によるプログラム自動生成装置1の機能構成図である。図2の構成に対して、ユーザインターフェース手段4とコード生成手段5の版数の組み合わせを管理するための版数管理テーブル8を追加している。   FIG. 7 is a functional configuration diagram of the automatic program generation device 1 according to an embodiment for performing version number management. A version number management table 8 for managing the combination of version numbers of the user interface unit 4 and the code generation unit 5 is added to the configuration of FIG.

図8は、版数管理テーブル8のデータ構成例である。ユーザインターフェース手段4の版数ごとに、データ形式の縮小あるいは変更の有無を表すデータ形式変更等フラグとコード生成手段の版数が関連付けられて保存されている。   FIG. 8 is a data configuration example of the version number management table 8. For each version number of the user interface means 4, a data format change flag indicating whether or not the data format has been reduced or changed and the version number of the code generation means are stored in association with each other.

次に、図9、図10を用いて、版数データの管理処理の手順を説明する。
設計者は、ユーザインターフェース手段4のバージョンアップ作業後、その実行ファイルを補助記憶装置12に登録する際に、バージョンアップの元となった一世代前の版数に対してデータ形式の縮小あるいは変更(以下、変更等という。)があったか否かを入力装置13を介して入力する。ユーザインターフェース手段4は、その入力情報に基づいて、データ形式の変更等があった場合は(S401で「Yes」)、版数管理テーブル8のデータ形式変更等フラグを「1」に設定する(S402)。一方、データ形式の変更等が無かった場合は(S401で「No」)、版数管理テーブル8のデータ形式変更等フラグを「0」に設定すると共に、対応するコード生成手段5の版数として、一世代前のユーザインターフェース手段4の版数に対応しているコード生成手段5の版数をセットする(S403,S404)。
Next, the version number data management process will be described with reference to FIGS.
When the designer registers the executable file in the auxiliary storage device 12 after the upgrade of the user interface means 4, the data format is reduced or changed with respect to the version number of the previous generation that is the source of the upgrade. It is input via the input device 13 whether or not (hereinafter referred to as change or the like) has occurred. Based on the input information, the user interface unit 4 sets a data format change flag or the like in the version number management table 8 to “1” when the data format has been changed (“Yes” in S401) ( S402). On the other hand, if there is no change in the data format (“No” in S401), the data format change flag of the version number management table 8 is set to “0” and the version number of the corresponding code generation means 5 is set. Then, the version number of the code generation means 5 corresponding to the version number of the user interface means 4 one generation before is set (S403, S404).

その後、設計者がコード生成手段5を起動すると、コード生成手段5は、ユーザインターフェース手段4が生成した図形式データ2の中から版数データを抽出する(S501)。この版数データは、上述したようにユーザインターフェース手段4の識別データとしての版数である。   Thereafter, when the designer activates the code generation means 5, the code generation means 5 extracts the version number data from the graphic data 2 generated by the user interface means 4 (S501). This version number data is the version number as identification data of the user interface means 4 as described above.

次に、コード生成手段5は、版数管理テーブル8にアクセスして、当該テーブルに、ステップS501で抽出した版数に対応するコード生成手段の版数が登録されているか否かを判定し(S503)、登録されている場合は、そのコード生成手段の版数を抽出する(S504)。そして、コード生成手段5は、ステップS504で抽出した版数が自己の版数と一致しているか否かを判定して、一致している場合は、図形式データ2のプログラム生成処理を実行する(S506)。   Next, the code generation unit 5 accesses the version number management table 8 and determines whether or not the version number of the code generation unit corresponding to the version number extracted in step S501 is registered in the table ( (S503) If registered, the version number of the code generation means is extracted (S504). Then, the code generation means 5 determines whether or not the version number extracted in step S504 matches its own version number, and if it matches, executes the program generation process of the graphic data 2 (S506).

一方、コード生成手段5は、ステップS503またはステップS505で「No」の場合は、注意メッセージを出力して終了する (S507)。   On the other hand, if “No” in step S503 or step S505, the code generation means 5 outputs a caution message and ends (S507).

設計者は、この注意メッセージによって、コード生成手段5をバージョンアップし、版数管理テーブル8のそのユーザインターフェース手段4の版数に関連付けて、バージョンアップしたコード生成手段5の版数を登録する。   The designer upgrades the code generation means 5 by this caution message, and registers the version number of the upgraded code generation means 5 in association with the version number of the user interface means 4 in the version number management table 8.

以上の処理により、ユーザインターフェース手段4とコード生成手段5の正しい組み合わせを管理することができる。   With the above processing, the correct combination of the user interface unit 4 and the code generation unit 5 can be managed.

図8のデータ例に基づいて具体的に説明すると、版数が[5]のユーザインターフェース手段4と整合している版数を有するコード生成手段5の版数は[3]となっている。いま、ユーザインターフェース手段4のデータ形式の変更等を伴わないバージョンアップが行われ、その版数が、[6]、[7]、[8]、となった場合、上記図9の処理によって、これらの版数のユーザインターフェース手段4と整合するコード生成手段5の版数は[3]となる。すなわち、版数[6]、[7]、[8]のユーザインターフェース手段4のバージョンアップの元となった版数[5]のユーザインターフェース手段4と整合するコード生成手段4の版数である[3]が対応付けられることになる。   More specifically, based on the data example of FIG. 8, the version number of the code generation means 5 having the version number consistent with the user interface means 4 having the version number [5] is [3]. Now, when a version upgrade is performed without changing the data format of the user interface means 4 and the version number becomes [6], [7], [8], the process of FIG. The version number of the code generation means 5 that matches the version number of the user interface means 4 is [3]. That is, the version number of the code generation means 4 that matches the version [5] of the user interface means 4 from which the version number [6], [7], [8] of the user interface means 4 is upgraded. [3] is associated.

また、データ形式の変更等のあった版数[9]のユーザインターフェース手段4は、設計者によってバージョンアップされたコード生成手段5の版数[4]がセットされる。このように、データ形式の変更等の有無を判定基準とした版数管理が可能となる。   Further, the version number [4] of the code generation means 5 upgraded by the designer is set in the user interface means 4 of the version number [9] whose data format has been changed. In this way, the version number management based on whether or not the data format has been changed or not can be managed.

次に、図形式データ2のうち実行可能な部分のみを読み取るようにコード生成手段5を構築する手法について説明する。   Next, a method for constructing the code generation means 5 so as to read only the executable portion of the graphical data 2 will be described.

図11は、データ形式を拡張した例を示したものである。元のデータは、図4に示したものであるが、図4(A)から図11(A)に拡張されているのは、各ブロックの下に表示されているブロックのコメントである。これにともない、図形式データ2についても、図4(B)から図11(B)に拡張されている。この例では、コメントは、<Blocks>というブロックに記録されるように拡張されている。   FIG. 11 shows an example in which the data format is extended. The original data is shown in FIG. 4, but what is expanded from FIG. 4 (A) to FIG. 11 (A) is the comment of the block displayed under each block. Accordingly, the diagram format data 2 is also expanded from FIG. 4 (B) to FIG. 11 (B). In this example, the comment is extended to be recorded in a block called <Blocks>.

このときコード生成手段5は図14の処理手順でコード生成処理を実行する。図14において、コード生成手段5は起動されると、全ての下位ノードについて(S201a,S201b)、所定のノード名(項目)が存在するか否かを判定する(S202)。次いでコード生成手段4は、ステップS202で所定のノード名(項目)が存在する場合と判定した場合、さらにそのすべての下位ノードについて(S203a,S203b)、サブ項目であるノード名が存在するか否かを判定する(S204)。そしてコード生成手段4は、ステップS204でサブ項目であるノード名が存在すると判定した場合は、そのノードの属性、すなわち図形の論理素子シンボルに対応する機能や論理素子シンボル間の接続関係を読み込んで、これに基づいて組み込みシステムのプログラムを生成する(S205)。   At this time, the code generation means 5 executes the code generation process according to the processing procedure of FIG. In FIG. 14, when activated, the code generation means 5 determines whether or not a predetermined node name (item) exists for all lower nodes (S201a, S201b) (S202). Next, when it is determined in step S202 that the predetermined node name (item) exists, the code generation unit 4 further determines whether or not there is a sub-item node name for all the lower nodes (S203a, S203b). Is determined (S204). If the code generation unit 4 determines in step S204 that a node name that is a sub-item exists, the code generation unit 4 reads the attribute of the node, that is, the function corresponding to the logic element symbol of the figure and the connection relationship between the logic element symbols. Based on this, an embedded system program is generated (S205).

いま、ユーザインターフェース手段4の版数が[4]に対応するデータ形式が、図4の形式であり、ユーザインターフェース手段4の版数[5]に対応するデータが、図11の形式であったとした場合、図14に示したような処理手順をとることにより、版数[4]に対応するコード生成手段5は、図11(B)のデータが入力されたときにも、拡張されたタグのデータを無視することが可能となり、不整合なく処理をすることが可能となる。   Now, the data format corresponding to the version number [4] of the user interface means 4 is the format shown in FIG. 4, and the data corresponding to the version number [5] of the user interface means 4 is the format shown in FIG. In this case, the code generation means 5 corresponding to the version number [4] can be expanded even when the data shown in FIG. 11B is input by taking the processing procedure as shown in FIG. Can be ignored, and processing can be performed without any inconsistency.

ところで、データ形式の縮小・変更があるような場合でも、データ形式の版数を記録する方式では、対応が可能である。すなわち、ユーザインターフェース手段4の版数が、[5、6、7]と変更されたとしても、それぞれが扱うデータ形式が同じ場合には、データ形式の版数として例えば、版数[2]を記録するものとすると、コード生成手段5は、版数が[2]であればコード生成可能と判定できる。そして、ユーザインターフェース手段4の版数が[8]になったときに、データの追加または削除があって、互換性が取れなくなったとすると、データ形式の版数として、新たに、版数[3]を記録するようにすれば、不整合を防ぐことができる。   By the way, even when the data format is reduced or changed, the method of recording the version number of the data format can cope with it. That is, even if the version number of the user interface means 4 is changed to [5, 6, 7], if the data format handled by each is the same, for example, the version number [2] is set as the version number of the data format. If recording is to be performed, the code generation means 5 can determine that code generation is possible if the version number is [2]. Then, when the version number of the user interface means 4 is [8], if data is added or deleted and compatibility becomes impossible, a new version number [3] is obtained as the version number of the data format. ] Can be recorded to prevent inconsistencies.

(ルート情報の管理)
図12は、複数のコード生成手段5があるときに、それを識別するための機能を説明した例である。図12(A)に示した、実行ファイルのディレクトリには、コード生成A、コード生成Bの2つの版数のコード生成手段5が格納されている。また、コード生成指定というファイル(コード生成指定手段)が追加されている。コード生成指定というファイルには図12(B)に記載した内容が記述されている。この図12(B)の記述により、実際に起動されるコード生成手段5はコード生成Bであることを指定している。ユーザインターフェース手段4は起動時にこのコード生成指定というファイルを読み出し、コード生成Bを選択する。
(Management of route information)
FIG. 12 is an example illustrating a function for identifying a plurality of code generation means 5 when there are a plurality of code generation means 5. In the execution file directory shown in FIG. 12A, two versions of code generation means 5 of code generation A and code generation B are stored. In addition, a file called code generation designation (code generation designation means) is added. The contents described in FIG. 12B are described in a file called code generation designation. The description of FIG. 12B specifies that the code generation means 5 that is actually activated is code generation B. The user interface means 4 reads this code generation designation file at the time of activation and selects the code generation B.

また、この方法は、コード生成手段5が別のディレクトリに格納されているときにも、使用することができる。その場合、図12(B)のパスの記述は、ファイル名だけでなく、相対パス、もしくは、絶対パスでの記述とする。   This method can also be used when the code generation means 5 is stored in another directory. In this case, the description of the path in FIG. 12B is not only a file name but also a relative path or an absolute path.

以上、本実施の形態によれば、ユーザインターフェース手段4とコード生成手段5とを独立して起動可能にし、ユーザインターフェース手段4またはその出力である図形式データに版数を設定して、その版数に対応して動作をするようにしたので、ユーザインターフェース手段4とコード生成手段5を別々に管理することが可能となる。   As described above, according to the present embodiment, the user interface unit 4 and the code generation unit 5 can be activated independently, the version number is set in the user interface unit 4 or the graphic data that is the output thereof, and the version Since the operation corresponds to the number, the user interface means 4 and the code generation means 5 can be managed separately.

(他の実施例1)
図13は、複数のコード生成手段5があるときに、それを切り替えて使用する際の別の構成例である。この場合は、所定の位置に有る、所定の名称のファイルを選択するもので、この例では、実行ファイルのあるフォルダに格納されている「コード生成」で始まるファイルをコード生成手段5として起動するものである。図13(A)では、コード生成Aが、図13(B)では、コード生成Bが起動される。
(Other Example 1)
FIG. 13 shows another configuration example when a plurality of code generation means 5 are used by switching them. In this case, a file having a predetermined name at a predetermined position is selected. In this example, a file starting with “code generation” stored in a folder having an execution file is started as the code generation means 5. Is. In FIG. 13A, code generation A is activated, and in FIG. 13B, code generation B is activated.

この方法は、図13の方法に比べて簡便であるが、同時にディレクトリに格納されているコード生成手段5を切り替えて利用することはできない。   This method is simpler than the method of FIG. 13, but the code generation means 5 stored in the directory cannot be switched at the same time.

また、コード生成手段5自身は同じファイル名としておき、同じファイル名で、内容(版数)が異なるものを差し替えて利用するような方法を取ることも可能である。   It is also possible to adopt a method in which the code generation means 5 itself has the same file name and uses the same file name with different contents (version number).

このように、コード生成手段5を実行するファイルを切り替える場合には、やはり不整合が生じる可能性がある。そのため、上述の図形式データに版数を記録し、確認する方法をとっても良いが、起動時に、呼び出し側のユーザインターフェース手段4がコード生成手段5の版数を取得して整合性を判定するか、ユーザインターフェース手段4から、コード生成手段5へ実行可能な版数を渡すことにより、コード生成側で整合性を確認する方法を取ることもできる。なお、そのときの処理フローは図6と同じものが適用可能である。   As described above, when the file for executing the code generation means 5 is switched, inconsistency may still occur. For this reason, the version number may be recorded and checked in the above-mentioned graphic data. However, at the time of activation, whether the calling user interface unit 4 acquires the version number of the code generation unit 5 and determines the consistency. In addition, by passing the executable version number from the user interface unit 4 to the code generation unit 5, a method of confirming the consistency on the code generation side can be taken. Note that the same processing flow as that in FIG. 6 can be applied.

(他の実施例2)
次に、図9、図10に示した版数データ管理処理の他の実施例として、インストーラによって版数データの管理処理を行う際の手順を図15、図16を用いて説明する。
(Other Example 2)
Next, as another embodiment of the version number data management process shown in FIGS. 9 and 10, a procedure when the version number data management process is performed by the installer will be described with reference to FIGS.

ユーザインターフェース手段4のバージョンアップがあったときは、設計者は、まずデータ形式の変更等があったか否かを判定するための判定テーブル21を更新する。設計者は一世代前の版数のユーザインターフェース手段4に対してデータ形式の変更等があった場合は入力装置13を介して補助記憶装置12に保存されている判定テーブル21にアクセスして、バージョンアップ後の版数のデータ形式変更等フラグを「1」に設定し、データ形式の変更等が無かった場合はこのフラグを「0」に設定する。   When the user interface means 4 is upgraded, the designer first updates the determination table 21 for determining whether or not the data format has been changed. The designer accesses the determination table 21 stored in the auxiliary storage device 12 via the input device 13 when there is a change in the data format or the like for the user interface means 4 of the previous generation version. The data format change flag for the version number after the upgrade is set to “1”, and this flag is set to “0” if there is no data format change.

図15(a)に判定テーブル21のデータ構成例を示す。ユーザインターフェース手段の版数[5]の欄のデータ形式変更等フラグ「1」に設定されているのは、一世代前の版数[4]に対してデータ形式の変更等があったからである。それ以外の版数については、それぞれ一世代前の版数に対してデータ形式の変更等が無く、データ形式変更等フラグ「0」が設定されている。   FIG. 15A shows a data configuration example of the determination table 21. The reason why the data format change flag "1" in the version number [5] column of the user interface means is set because the data format has been changed with respect to the version [4] of the previous generation. . For other version numbers, there is no change in the data format or the like for the version number one generation before, and the data format change flag “0” is set.

さらに、設計者は、この判定テーブル21のデータに基づいて、コード生成手段の更新要否を判定するためのインストーラ用判定テーブル22をあらかじめ作成する。このインストーラ用判定テーブル22は、ユーザインターフェース手段4の一世代前の版数とバージョンアップ作業後の版数との間でデータ形式の変更等があったか否かを判定するためのものである。   Furthermore, the designer creates in advance an installer determination table 22 for determining whether or not the code generation unit needs to be updated based on the data of the determination table 21. The installer determination table 22 is used to determine whether or not the data format has changed between the version number one generation before the user interface unit 4 and the version number after the upgrade.

インストーラ用判定テーブル22のデータ構成例を図15(b)に示す。図15(b)データは図15(a)のデータと関連しており、導入前のユーザインターフェース手段4の各版数から導入後のユーザインターフェース手段4の版数[6]へのバージョンアップの際のデータ形式変更等の有無に対応してデータ形式変更等フラグ「1」または「0」がセットされている。図15(a)では、ユーザインターフェース手段4が版数[4]から[5]にバージョンアップしたときにデータ形式の変更等があったので、図15(b)では、必然的に[4]から[6]に対してもデータ形式の変更等があり、さらに導入前のユーザインターフェース手段4の版数が[4]より小さい版数から版数[6]へバージョンアップする場合も、データ形式の変更等があるのでこれらのデータ形式変更等フラグは「1」にセットされる。   A data configuration example of the installer determination table 22 is shown in FIG. The data in FIG. 15 (b) is related to the data in FIG. 15 (a), and the version upgrade from the version number of the user interface means 4 before introduction to the version number [6] of the user interface means 4 after introduction. The data format change flag “1” or “0” is set corresponding to the presence / absence of the data format change. In FIG. 15A, since the data format has been changed when the user interface means 4 is upgraded from the version number [4] to [5], FIG. 15B inevitably has [4]. There is also a change in the data format from [6] to [6], and even when the version of the user interface means 4 before introduction is upgraded from a version smaller than [4] to a version [6] These data format change etc. flags are set to “1”.

一方、版数[5]から版数[6]へのバージョンアップは、データ形式の変更等を伴わないので、図15(b)において、最下欄のデータ形式変更等フラグは「0」にセットされる。なお、図15(b)おいて、「導入後のユーザインターフェース手段の版数」の列は、すべて同じ値になるので、テーブルごとのデータとして保持するようにしても良い。また、「データ形式変更等フラグ」の列では、最下欄から遡っていき、一度フラグが「1」になれば、それよりも古いデータは「1」になるのは自明であるため省略するようにしても良い。   On the other hand, since the upgrade from the version number [5] to the version number [6] is not accompanied by a change in the data format, the data format change flag in the bottom column in FIG. Set. In FIG. 15B, all columns of “version number of user interface means after introduction” have the same value, and may be held as data for each table. Also, in the “data format change flag” column, it goes back from the bottom column, and once the flag becomes “1”, it is obvious that older data becomes “1” because it is obvious. You may do it.

上記のように判定テーブル21とインストーラ用判定テーブル22が準備され、インストーラが起動されると、バージョンアップされた版数[6]のユーザインターフェース手段4の実行ファイルが補助記憶装置12に登録される(S601)。次に、インストーラは、版数管理テーブル8の末尾に今回登録したユーザインターフェース手段4の版数の行を追加する(S602)。   As described above, when the determination table 21 and the installer determination table 22 are prepared and the installer is started, the executable file of the user interface means 4 of the upgraded version [6] is registered in the auxiliary storage device 12. (S601). Next, the installer adds a version number line of the user interface means 4 registered this time to the end of the version number management table 8 (S602).

そして、インストーラは、インストーラ用判定テーブル22を参照して、前回インストールしたユーザインターフェース手段4の版数と今回インストールしたユーザインターフェース手段の版数によって定まる行のデータ形式変更等フラグが「1」であるか否かを判定し、「1」の場合は(S603で「YES」)、版数管理テーブル8の追加行のデータ形式変更等フラグ欄に「1」を書き込む(S604)。次に、インストーラは、版数管理テーブル8の追加行の「コード生成手段の版数」欄に最新世代の版数をセットすると共に(S605)、その版数のコード生成手段5の実行ファイルを補助記憶装置12に登録する(S606)。   The installer refers to the installer determination table 22 and the data format change flag or the like in the line determined by the version number of the user interface unit 4 installed last time and the version number of the user interface unit installed this time is “1”. In the case of “1” (“YES” in S603), “1” is written in the data format change flag column of the additional row of the version management table 8 (S604). Next, the installer sets the version number of the latest generation in the “version number of the code generation means” column in the additional row of the version number management table 8 (S605), and the executable file of the code generation means 5 of that version number is set. Registration in the auxiliary storage device 12 (S606).

一方、ステップS603でデータ形式変更等フラグが「0」の場合は(S603で「NO」)、版数管理テーブル8のデータ形式変更等フラグを「0」に設定すると共に(S607)、コード生成手段5の版数として、一世代前のユーザインターフェース手段4の版数に対応しているコード生成手段5の版数をセットする。   On the other hand, if the data format change flag is “0” in step S603 (“NO” in S603), the data format change flag in the version management table 8 is set to “0” (S607) and the code is generated. As the version number of the means 5, the version number of the code generation means 5 corresponding to the version number of the user interface means 4 of the previous generation is set.

以上のバージョンアップ処理は、インストーラによって自動的に実行される。インストーラには、ユーザインターフェース手段4の最新版、コード生成手段5の最新版と共に、インストーラ用判定テーブル22を含めておくようにする。   The above upgrade process is automatically executed by the installer. The installer includes an installer determination table 22 together with the latest version of the user interface means 4 and the latest version of the code generation means 5.

上記の処理で、ユーザインターフェース手段4の版数が[4]から[6]へバージョンアップされたときの版数管理テーブル8の例を図15(c)に示す。この例では、新たに追加された最下欄のユーザインターフェース手段の版数[6]の行のデータ形式変更等フラグが「1」にセットされている。これは、図15(b)の導入前のユーザインターフェース手段の版数[4]の行のデータ形式変更等フラグ「1」に対応している。また、版数管理テーブル8のコード゛生成手段の版数欄には最新の版数「3」がセットされている。   FIG. 15C shows an example of the version number management table 8 when the version number of the user interface means 4 is upgraded from [4] to [6] by the above processing. In this example, the data format change flag of the version number [6] row of the newly added user interface means in the bottom column is set to “1”. This corresponds to the data format change flag “1” in the version number [4] line of the user interface means before introduction in FIG. The latest version number “3” is set in the version number column of the code generation means of the version number management table 8.

以上の如く、版数データの管理処理が実行される。本実施例によれば、インストール作業に連動して、効率的な版数管理が可能になる。   As described above, the version number data management process is executed. According to the present embodiment, efficient version management can be performed in conjunction with the installation work.

(他の実施例3)
次に、他の実施例2で説明した版数データ管理処理のさらに他の実施例を図17、図18を用いて説明する。本実施例は、図15(b)のインストーラ用判定テーブル22による管理を省略したものである。
(Other Example 3)
Next, still another embodiment of the version number data management process described in another embodiment 2 will be described with reference to FIGS. In this embodiment, management by the installer determination table 22 in FIG. 15B is omitted.

まず、上記の他の実施例2で説明したように、設計者は入力装置13を介して、一世代前の版数とバージョンアップ作業後の版数をもとに判定テーブル21のデータ形式変更等フラグを設定する。   First, as described in the second embodiment, the designer changes the data format of the determination table 21 based on the version number one generation before and the version number after the upgrade work via the input device 13. Set the equal flag.

そして、設計者によるインストーラの起動により、ユーザインターフェース手段4のバージョンアップ作業後(S701)、インストーラは、版数管理テーブル8の末尾に今回登録するユーザインターフェース手段4の版数の行を追加する(S702)。   Then, after the upgrade of the user interface unit 4 by the activation of the installer by the designer (S701), the installer adds a line of the version number of the user interface unit 4 to be registered this time to the end of the version number management table 8 ( S702).

次に、インストーラは、その版数管理テーブル8の情報に基づいて、既に導入されている一世代前のユーザインターフェース手段4の版数を抽出する。続いて、判定テーブル21を参照して、図17(a)に示すようにバージョンアップ作業後の版数から、当該抽出した版数へと判定テーブル21の版数を遡って検索して、その間にデータ形式変更等フラグ「1」が存在するか否かを判定する(S703)。   Next, the installer extracts the version number of the user interface means 4 that has been introduced one generation before based on the information in the version number management table 8. Subsequently, referring to the determination table 21, as shown in FIG. 17A, the version number of the determination table 21 is retrieved from the version number after the upgrade work to the extracted version number, It is determined whether or not the data format change flag “1” is present in (S703).

その判定の結果、データ形式変更等フラグ「1」が存在する場合は(S703で「YES」)、版数管理テーブル8にアクセスして、今回登録したユーザインターフェース手段4の版数のデータ形式変更等フラグ欄に「1」を書き込む(S704)。次に、インストーラは、コード生成手段の版数として、最新世代の版数をセットすると共に(S705)、その版数のコード生成手段5の実行ファイルを補助記憶装置12に登録する(S706)。   As a result of the determination, if the data format change flag “1” is present (“YES” in S703), the version number management table 8 is accessed to change the data format of the version number of the user interface means 4 registered this time. “1” is written in the equal flag column (S704). Next, the installer sets the latest generation version number as the version number of the code generation means (S705), and registers the execution file of the code generation means 5 of that version number in the auxiliary storage device 12 (S706).

一方、ステップS703でデータ形式変更等フラグ「1」が存在しない場合は(S703で「NO」)、版数管理テーブル8のデータ形式変更等フラグを「0」に設定すると共に(S707)、コード生成手段の版数として、一世代前のユーザインターフェース手段4の版数に対応しているコード生成手段5の版数をセットする。
これによって、他の実施例2と同様に版数データの効率的な管理が可能となる。
On the other hand, if the data format change flag “1” does not exist in step S703 (“NO” in S703), the data format change flag in the version number management table 8 is set to “0” (S707), and the code As the version number of the generation means, the version number of the code generation means 5 corresponding to the version number of the user interface means 4 of the previous generation is set.
As a result, the version number data can be managed efficiently as in the second embodiment.

次に本発明の第2の実施の形態を説明する。
本実施の形態は、図形式データの項目ごとに版数管理を行い、コード生成手段5によって、同手段15あるいは入力装置13等を介して指定された版数に対応した処理のみを実行させるようにしたものである。基本的な装置構成は図2と同様である。
Next, a second embodiment of the present invention will be described.
In the present embodiment, version number management is performed for each item of graphic data, and only the processing corresponding to the version number designated by the code generation means 5 via the means 15 or the input device 13 is executed. It is a thing. The basic device configuration is the same as in FIG.

図19は、第2の実施の形態によるプログラム自動生成装置の機能構成図である。図1に対して、後述する項目別版数管理テーブル7が追加になっている。   FIG. 19 is a functional configuration diagram of the automatic program generation device according to the second embodiment. An item-specific version number management table 7 to be described later is added to FIG.

また、本実施の形態による図形式データを図20に示す。本例では<Connections>,<Blocks>などの項目ごとにデータが生成され、項目ごとに版数管理されている。図21は本実施の形態による項目別版数管理テーブル7のデータ構成例である。項目ごとにその機能を追加・更新したときのユーザインターフェース手段4の版数が関連付けられて保存されている。例えば、ユーザインターフェース手段4の機能が追加になったとき、この項目別版数管理テーブル7に当該追加になった項目が存在するか否かを判定し、存在しない場合は、その項目とそのときのユーザインターフェース手段4の版数を関連付けて登録する。機能が更新になったときも同様に、既に登録になっている項目の版数をそのときのユーザインターフェース手段4の版数に設定変更する。   Further, FIG. 20 shows graphical data according to the present embodiment. In this example, data is generated for each item such as <Connections> and <Blocks>, and the version number is managed for each item. FIG. 21 is a data configuration example of the item-specific version number management table 7 according to the present embodiment. The version number of the user interface means 4 when the function is added / updated for each item is stored in association with each other. For example, when the function of the user interface unit 4 is added, it is determined whether or not the added item exists in the item-specific version number management table 7. The version number of the user interface means 4 is registered in association with each other. Similarly, when the function is updated, the version of the item already registered is changed to the version of the user interface means 4 at that time.

この項目別版数管理テーブル7の保存場所はコード生成手段5からアクセス可能であれば特に限定されない。コード生成手段5は、この項目を処理の単位としてプログラム生成処理を実行する。   The storage location of the item-specific version number management table 7 is not particularly limited as long as it can be accessed from the code generation means 5. The code generation means 5 executes a program generation process using this item as a unit of processing.

以下、図22に基づいて、コード生成手段5の動作を説明する。
まず、設計者は、入力装置13を介して、どの版数の生成プログラムを作成するかを指定して、コード生成手段5の起動を行う。コード生成手段5は、入力装置からの起動要求によって起動されると、版数データを入力して(S301)、版数の指定の有無を判定する(S302)。そして、版数指定が無い場合は(S302で「NO」)、最新の版数で生成プログラムを生成するものとして、指定された版数として予め定められた所定の最大値(例えば、999)をセットする(S303)。
Hereinafter, the operation of the code generation means 5 will be described with reference to FIG.
First, the designer designates which version of the generation program is to be created via the input device 13 and activates the code generation means 5. When activated by an activation request from the input device, the code generation means 5 inputs version number data (S301) and determines whether or not a version number is designated (S302). If the version number is not specified (“NO” in S302), the generation program is generated with the latest version number, and a predetermined maximum value (for example, 999) predetermined as the specified version number is used. Set (S303).

また、コード生成手段5は、版数変数として、版数の最低値(例えば、0)をセットする(S304)。そして、図形式データから最初の項目を入力して(S305)、項目別版数管理テーブル7を参照して入力した項目に関連付けられた版数を抽出する(S306)。   Further, the code generation means 5 sets the minimum value of the version number (for example, 0) as the version number variable (S304). Then, the first item is input from the graphic data (S305), and the version number associated with the input item is extracted by referring to the item-specific version number management table 7 (S306).

次に、コード生成手段5は、抽出された版数と指定された版数とを比較して(S307)、当該項目の登録があって(S308)、その項目について指定された版数が抽出された版数以上の場合は(S309)、その項目の処理を実行する(S310)。   Next, the code generation means 5 compares the extracted version number with the designated version number (S307), the item is registered (S308), and the version number designated for the item is extracted. If the number is greater than or equal to the version number (S309), the process for that item is executed (S310).

続いて、コード生成手段5は、抽出された版数が版数変数よりも大きいか否かを判定して(S311)、大きい場合は(S311で「YES」)、抽出された版数を新たな版数変数としてセットする(S312)。   Subsequently, the code generation means 5 determines whether or not the extracted version number is larger than the version number variable (S311). If it is larger (“YES” in S311), the extracted version number is newly set. Is set as a correct version number variable (S312).

以上の処理の後、コード生成手段5は、図形式データから全ての項目を抽出済みか否かを判定し(S314)、「否」の場合は、次の項目を抽出して(S315)、再びステップS306以降の処理を繰り返す。なお、ステップS308またはステップS309で「NO」の場合は、通知テーブルにその処理項目と版数を記録する(S313)。   After the above processing, the code generation means 5 determines whether all items have been extracted from the graphic data (S314). If “No”, the next item is extracted (S315). The processing after step S306 is repeated again. If “NO” in step S308 or step S309, the processing item and the version number are recorded in the notification table (S313).

コード生成手段5は、全ての項目について抽出を完了した場合は(S314で「YES」)、最終的な生成プログラムと版数変数にセットされている版数とを関連付けて出力する(S316)。また、通知テーブルの内容を出力する(S317)。   When the extraction has been completed for all items (“YES” in S314), the code generation unit 5 outputs the final generation program and the version number set in the version number variable in association with each other (S316). Also, the contents of the notification table are output (S317).

上記の処理によれば、コード生成手段5は、図形式データの版数によらず、指定された版数で生成プログラム3を作成することができる。また、版数指定を行わないことによって最新版数でプログラムを生成する。これにより、同じ図形式データから、既設のシステムについては、その版数のプログラムが生成でき、新規に設置するシステムについては最新の版数のプログラムを生成することができる。   According to the above processing, the code generation means 5 can create the generation program 3 with the specified version number regardless of the version number of the graphic data. In addition, the program is generated with the latest version number by not specifying the version number. Thereby, from the same graphic format data, the program of the version can be generated for the existing system, and the latest version of the program can be generated for the newly installed system.

なお、上記の各実施の形態の説明において、ユーザインターフェース手段4やコード生成手段5のバージョンアップを行う設計者が、プログラム自動生成装置1を利用して図形式データを入力してプログラムを生成することを前提に説明したが、上記インストーラ用判定テーブル22等を用いたインストーラを用意することによって、設計者以外のユーザがプログラム自動生成装置1を利用して、ユーザインターフェース手段4の版数とコード生成手段5の版数の適切な組み合わせによってプログラムを生成することができることは明白である。   In the description of each of the above embodiments, a designer who upgrades the user interface unit 4 or the code generation unit 5 uses the automatic program generation device 1 to input diagram format data to generate a program. As described above, by preparing an installer using the installer determination table 22 or the like, a user other than the designer uses the program automatic generation device 1 to use the version number and code of the user interface means 4. It is obvious that the program can be generated by an appropriate combination of the version numbers of the generation means 5.

本発明は上記の実施の形態に限定されずその要旨を逸脱しない範囲で、種々変形して実施をすることができる。例えば、コード生成手段5は、項目別管理テーブルで項目の版数を確認するのに替えて、ユーザインターフェース手段4が項目ごとに版数を付加して図形式データを生成し、この版数によって確認するようにしても良い。   The present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the invention. For example, instead of checking the item version number in the item-specific management table, the code generation unit 5 generates graphic data by adding the version number for each item, and the user interface unit 4 generates graphic data. You may make it confirm.

1……プログラム自動生成装置
2……図形式データ
3……生成プログラム
4……ユーザインターフェース手段(機能)
5……コード生成手段(機能)
6……図形式プログラム
7……項目別版数管理テーブル
8……版数管理テーブル
10……演算装置
11……主記憶装置
12……補助記憶装置
13……入力装置
14……ディスプレイ装置
21……判定テーブル
22……インストーラ用判定テーブル
DESCRIPTION OF SYMBOLS 1 ... Program automatic generation apparatus 2 ... Graphic data 3 ... Generation program 4 ... User interface means (function)
5. Code generation means (function)
6... Graphical program 7... Version management table 8 by item 8. Version management table 10... Arithmetic device 11. Main storage device 12 .. auxiliary storage device 13. …… Decision table 22 …… Installer determination table

Claims (11)

論理素子シンボルと該論理素子シンボル間の接続関係によって表される図形情報に基づいてプログラムを生成するプログラム自動生成装置であって、
前記論理素子シンボルに対応する機能または前記論理素子シンボル間の接続関係をプログラム生成処理の処理単位ごとに各処理単位の識別情報である項目を付して図形式データとして記憶装置に保存するユーザインターフェース手段と、
前記図形式データをもとに前記処理単位ごとにプログラムの生成処理を実行するコード生成手段と、を備え、
前記ユーザインターフェース手段および前記コード生成手段はそれぞれ独立して差し替え可能であることを特徴とするプログラム自動生成装置。
An automatic program generation device that generates a program based on graphic information represented by a logical element symbol and a connection relationship between the logical element symbols,
A user interface for storing the function corresponding to the logic element symbol or the connection relationship between the logic element symbols in the storage device as a diagram data with an item that is identification information of each processing unit for each processing unit of the program generation processing Means,
Code generation means for executing a program generation process for each processing unit based on the diagram format data;
The automatic program generation apparatus, wherein the user interface means and the code generation means can be replaced independently of each other.
前記図形式データは、前記ユーザインターフェース手段の版数データを含み、
前記コード生成手段は、前記版数データを取得して前記図形式データを処理可能か否かを判定し、処理可能でないと判定した場合は異常処理を実行することを特徴とする請求項1に記載のプログラム自動生成装置。
The graphical data includes version data of the user interface means,
2. The code generation unit according to claim 1, wherein the code generation unit obtains the version number data to determine whether or not the graphic data can be processed, and executes an abnormal process when it is determined that the processing is not possible. The automatic program generation device described.
請求項1に記載のプログラム自動生成装置であって、
さらに、前記ユーザインターフェース手段と前記コード生成手段が正常に機能するように該両手段の版数データの組み合わせ情報を保存する版数管理テーブルを備え、
前記コード生成手段は、起動時に前記組み合わせ情報に基づいて、該ユーザインターフェース手段の版数データと該コード生成手段の版数データの組み合わせが正当か否かを判定し、正当であると判定された場合にのみ該ユーザインターフェース手段によって保存された前記図形式データをもとにプログラムの生成処理を実行することを特徴とするプログラム自動生成装置。
The automatic program generation device according to claim 1,
Further, a version number management table for storing combination information of version number data of both means so that the user interface means and the code generation means function normally,
The code generation unit determines whether the combination of the version number data of the user interface unit and the version number data of the code generation unit is valid based on the combination information at the time of activation, and is determined to be valid An automatic program generation apparatus for executing a program generation process based on the graphic data stored by the user interface means only in the case.
請求項1に記載のプログラム自動生成装置であって、
さらに版数データの異なる複数のコード生成手段と、
前記複数のコード生成手段のうち起動すべきコード生成手段を特定するコード生成指定手段と、を備え、
前記ユーザインターフェース手段は、前記コード生成指定手段によって特定されたコード生成手段を起動することを特徴とするプログラム自動生成装置。
The automatic program generation device according to claim 1,
Furthermore, a plurality of code generation means having different version number data,
Code generation specifying means for specifying a code generation means to be activated among the plurality of code generation means, and
The automatic program generation apparatus, wherein the user interface means activates the code generation means specified by the code generation designation means.
請求項1に記載のプログラム自動生成装置であって、
さらに項目ごとにユーザインターフェース手段の版数データを特定する項目別版数管理テーブルを備え、
前記コード生成手段は、処理すべきか否かの基準となる版数データを起動時に取得し、 前記図形式データの項目ごとに前記項目別版数管理テーブルを参照して、前記項目の版数データと前記取得した版数データとに基づいて処理を実行すべきか否かを判定し、処理すべきであると判定された項目についてのみ所定の処理を実行することを特徴とするプログラム自動生成装置。
The automatic program generation device according to claim 1,
Furthermore, an item-specific version number management table for specifying the version number data of the user interface means for each item is provided,
The code generation means acquires version data serving as a reference for whether or not to process at startup, refers to the item-specific version management table for each item of the graphic data, and version data of the item A program automatic generation apparatus characterized by determining whether or not to execute a process based on the acquired version number data and executing a predetermined process only for an item determined to be processed.
前記コード生成手段は、処理を行った各項目の版数データのうち、最大の版数データを演算して生成したプログラムに関連付けて出力することを特徴とする請求項5に記載のプログラム自動生成装置。   6. The automatic program generation according to claim 5, wherein the code generation means outputs the program associated with a program generated by calculating the maximum version number data among the version number data of each processed item. apparatus. 前記コード生成手段は、前記項目の版数データと前記入力した版数データとに基づいて処理を実行すべきか否かを判定した結果、処理すべきでないと判定した項目と、前記項目別版数管理テーブルで該項目に関連付けられた版数データとを記録しておき、プログラムの生成処理の終了後に、前記記録した内容を出力することを特徴とする請求項5または6に記載のプログラム自動生成装置。   The code generation means determines whether the process should be executed based on the version data of the item and the input version data, and determines the item that should not be processed, and the item-specific version number 7. The automatic program generation according to claim 5 or 6, wherein the version number data associated with the item is recorded in a management table, and the recorded contents are output after the program generation process is completed. apparatus. 前記コード生成手段は、前記図形式データが前記ユーザインターフェース手段の版数データ変更その他の要因により拡張され、前記コード生成手段が処理不可能な項目を含む場合であっても処理可能な項目のみを実行してプログラムを生成することを特徴とする請求項1乃至7のいずれか一に記載のプログラム自動生成装置。   The code generation means only displays items that can be processed even when the graphic data is expanded due to version data change of the user interface means and other factors, and the code generation means includes items that cannot be processed. The program automatic generation apparatus according to claim 1, wherein the program is generated by executing the program. 前記ユーザインターフェース手段は、図形式データにアクセスするための前記記憶装置内の位置関係を表すルート情報を前記コード生成手段に渡し、
前記コード生成手段は、該ルート情報をもとに前記図形式データを取得し、該図形式データに基づいてプログラムを生成することを特徴とする請求項1乃至8のいずれか一に記載のプログラム自動生成装置。
The user interface means passes route information representing a positional relationship in the storage device for accessing graphic data to the code generation means,
9. The program according to claim 1, wherein the code generation unit acquires the graphic data based on the route information, and generates a program based on the graphic data. Automatic generator.
前記コード生成手段は、ルート情報に基づいて前記ユーザインターフェース手段の実行プログラムから最も近い位置に存在するコード生成手段が起動されることを特徴請求項9に記載のプログラム自動生成装置。   10. The automatic program generation apparatus according to claim 9, wherein the code generation means is activated by a code generation means that is present at a position closest to the execution program of the user interface means based on route information. コンピュータ装置を用いて、図形情報をもとにプログラムを生成するプログラム自動生成方法であって、
前記コンピュータ装置が、論理素子シンボルと該論理素子シンボル間の接続関係によって表される図形情報の入力を受け付ける段階と、
前記コンピュータ装置が、前記論理素子シンボルに対応する機能または論理素子シンボル間の接続関係をプログラム生成処理の処理単位ごとに各処理単位の識別情報である項目を付して図形式データを生成する段階と、
前記コンピュータ装置が、図形式データの項目ごとに版数データ付して前記コンピュータ装置の記憶装置に保存する段階と、
前記コンピュータ装置が、処理すべきか否かの基準となる版数データを入力し、処理対象の前記図形式データの項目ごとに前記記憶装置に保存されている該当する項目の版数データと比較して、処理すべきであると判定された項目についてのみプログラムの生成処理を行い、処理すべきであると判定されなかった項目は該項目に関連付けられた版数データを付して記録する段階と、
前記コンピュータ装置が、プログラムの生成処理の終了後に、前記記録した内容を出力する段階と、
を含むことを特徴とするプログラム自動生成方法。
A program automatic generation method for generating a program based on graphic information using a computer device,
The computer device accepting input of graphic information represented by a logic element symbol and a connection relationship between the logic element symbols;
A step of generating graphic data by adding an item, which is identification information of each processing unit, to each processing unit of the program generation processing for the function corresponding to the logical element symbol or the connection relationship between the logical element symbols by the computer device; When,
The computer device attaches version number data to each item of graphic data and stores it in a storage device of the computer device;
The computer apparatus inputs version number data as a criterion for determining whether or not to process, and compares each version of the graphic data to be processed with the version number data of the corresponding item stored in the storage device. A program generation process is performed only for an item that is determined to be processed, and an item that is not determined to be processed is recorded with version data associated with the item; ,
The computer device outputting the recorded content after the end of the program generation process;
A method for automatically generating a program, comprising:
JP2009165312A 2009-07-14 2009-07-14 Program automatic generation apparatus and program automatic generation method Active JP5316273B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009165312A JP5316273B2 (en) 2009-07-14 2009-07-14 Program automatic generation apparatus and program automatic generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009165312A JP5316273B2 (en) 2009-07-14 2009-07-14 Program automatic generation apparatus and program automatic generation method

Publications (2)

Publication Number Publication Date
JP2011022682A JP2011022682A (en) 2011-02-03
JP5316273B2 true JP5316273B2 (en) 2013-10-16

Family

ID=43632722

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009165312A Active JP5316273B2 (en) 2009-07-14 2009-07-14 Program automatic generation apparatus and program automatic generation method

Country Status (1)

Country Link
JP (1) JP5316273B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109955266A (en) * 2019-04-01 2019-07-02 珠海市一微半导体有限公司 Robot time seat code automatically generates equipment and automatic creation system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05250151A (en) * 1991-04-09 1993-09-28 Kobe Nippon Denki Software Kk Program generation information control system
JP3557896B2 (en) * 1998-04-02 2004-08-25 株式会社山武 Configuration tool for control design
JPH11296357A (en) * 1998-04-08 1999-10-29 Oki Electric Ind Co Ltd Flow chart input device
JP2002189506A (en) * 2000-12-22 2002-07-05 Fuji Electric Co Ltd Pc support device
JP4021777B2 (en) * 2003-01-29 2007-12-12 株式会社東芝 Program version management method for distributed linked processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109955266A (en) * 2019-04-01 2019-07-02 珠海市一微半导体有限公司 Robot time seat code automatically generates equipment and automatic creation system

Also Published As

Publication number Publication date
JP2011022682A (en) 2011-02-03

Similar Documents

Publication Publication Date Title
US8826224B2 (en) Apparatus and method for supporting model-driven development
JP4396994B2 (en) Resource file translation verification method, apparatus, and program
CN108762743B (en) Data table operation code generation method and device
JPWO2014115299A1 (en) Program and electronic manual display device
JPWO2020008991A1 (en) Verification automation equipment, verification automation methods, and programs
JP5555550B2 (en) Data conversion method, apparatus and program
JP2011008358A (en) Information processor and information processing method
JP2011248852A (en) System cooperation apparatus
JP4888790B2 (en) Contract definition function verification apparatus, method and program thereof
JP5316273B2 (en) Program automatic generation apparatus and program automatic generation method
JP5532811B2 (en) Parts catalog creation support device, program, and parts catalog creation support method
JP4977681B2 (en) Data pattern / test data generation / storage method and system
JP4906424B2 (en) Web service design method and apparatus
JP2019079165A (en) Editing program, editing device and editing method
JP5037088B2 (en) Document creation system
JP2007226685A (en) Application maintenance support device, application generation device, application maintenance support method and computer program
JP2010128776A (en) Apparatus and method for automatic maintenance of portable terminal
JP2000047861A (en) Influence range detecting device and influence range detecting method
JPS62197826A (en) Production of system flow specifications
JP4484148B2 (en) SI target file and SI related file management system
JP2006268764A (en) Model edit system, model edit apparatus, model edit method and model edit program
JP5413990B2 (en) Manual creation information management device, method and program
JP4120879B2 (en) Program generation system and method and program thereof
CN117453713A (en) SQL sentence generation method, device and storage medium for multi-type database
JP2006107025A (en) Apparatus and method of automatically creating source code, program and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120416

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130426

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130624

R150 Certificate of patent or registration of utility model

Ref document number: 5316273

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