JP2003076547A - System and method for automatically generating control software - Google Patents

System and method for automatically generating control software

Info

Publication number
JP2003076547A
JP2003076547A JP2001268683A JP2001268683A JP2003076547A JP 2003076547 A JP2003076547 A JP 2003076547A JP 2001268683 A JP2001268683 A JP 2001268683A JP 2001268683 A JP2001268683 A JP 2001268683A JP 2003076547 A JP2003076547 A JP 2003076547A
Authority
JP
Japan
Prior art keywords
program
control
interface
data
control processing
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.)
Pending
Application number
JP2001268683A
Other languages
Japanese (ja)
Inventor
Joji Ido
譲治 井戸
Jiro Sumitani
次郎 隅谷
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2001268683A priority Critical patent/JP2003076547A/en
Publication of JP2003076547A publication Critical patent/JP2003076547A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a system and a method for automatically generating control software that enable exclusive control even when a control processing program is automatically generated based on a data flow chart or state flow chart describing control specifications. SOLUTION: Interface information regarding call including specification of presence/absence of exclusive control by the control processing program to be required when the control processing program is automatically generated based on the data flow chart is called from an external program created in other form is created, stored in an interface information describing part and an interface program which is used when the external program calls the control processing program is automatically generated by an interface program automatic generating means based on the interface information stored in the interface information describing part.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は制御システムの開
発効率を向上させるための制御ソフトウェア自動生成シ
ステムおよび方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control software automatic generation system and method for improving the development efficiency of a control system.

【0002】[0002]

【従来の技術】制御ソフトウェアの開発においては、各
種システムに組み込むソフトウェアの量が年々大きくな
っていることから、これに対応すべく、ソフトウェア開
発効率の向上が強く求められている。その課題のひとつ
が、ビジュアルプログラミング技術に基づく制御処理プ
ログラムの自動生成であり、これにシミュレーション・
デバック機能を加えた制御ソフトウェア開発支援であ
る。ビジュアルプログラミング技術に基づく制御処理プ
ログラムの自動生成とは、画面上で各種変数や演算のシ
ンボルを配置してこれらを結線することによりデータフ
ロー図もしくはステートフロー図の形で制御仕様を記述
し、これを元に制御処理プログラムを自動生成するもの
であるため、これを採用することにより制御仕様の記述
が容易になるとともに見やすくなる。さらに、自動生成
により、人によるコーディングミスと言う要因がなくな
るため、デバッグの効率も向上する。
2. Description of the Related Art In the development of control software, the amount of software incorporated in various systems is increasing year by year, and there is a strong demand for improvement in software development efficiency in order to cope with this. One of the challenges is the automatic generation of control processing programs based on visual programming technology.
This is a control software development support with a debug function. Automatic generation of control processing program based on visual programming technology means that control specifications are described in the form of data flow diagram or state flow diagram by arranging various variables and operation symbols on the screen and connecting them. Since the control processing program is automatically generated based on, the adoption of this facilitates the description of the control specification and makes it easier to see. Furthermore, since the automatic generation eliminates the factor of coding mistakes by humans, debugging efficiency is also improved.

【0003】このような利点があることから、ビジュア
ルプログラミング技術に基づく制御処理プログラムの自
動生成の技術を採用した制御ソフトウェア開発支援シス
テムは、車両ECU (Electronic Con
trol Unit : 電子制御装置)等、様々な制
御システムの開発に利用されている。この様な一例とし
て、特開2000−020291号公報に記載された発
明では、データフロー図及びステートフロー図を用いて
車両の制御仕様が記述され、この両フロー図に基づい
て、車両ECU(Electronic Contro
l Unit :電子制御装置)用の車両制御プログラ
ムコードが自動生成される。この発明は、従来の自動生
成プログラムの問題点の一つであった、プログラムが冗
長で容量が大きくなるということに起因する、メモリ容
量が大きくなること、および実行速度が低下してしまう
ことについて、整数ロジックを採用することにより改善
を図ったものである。これまでは、整数ロジックを導入
すると、その部分は手作業プログラミングが必要になる
ため、プログラミングの自動化に逆行すると言うジレン
マがあったが、前記発明ではこれを含めてプログラムを
自動生成できる様にした。
Because of these advantages, a control software development support system that employs a technique for automatically generating a control processing program based on a visual programming technique is a vehicle ECU (Electronic Conic).
It is used for the development of various control systems such as control unit (electronic control device). As an example of such a case, in the invention disclosed in Japanese Unexamined Patent Publication No. 2000-020291, the control specification of the vehicle is described using a data flow diagram and a state flow diagram, and based on both the flow diagrams, a vehicle ECU (Electronic) Contro
l Unit: Vehicle control program code for electronic control unit) is automatically generated. The present invention is one of the problems of the conventional automatic generation program, which is that the memory capacity increases and the execution speed decreases due to the redundancy of the program and the increase in capacity. It is intended to be improved by adopting integer logic. In the past, when integer logic was introduced, that part required manual programming, so there was a dilemma that it was against the automation of programming, but in the above invention it was made possible to automatically generate a program including this. .

【0004】尚、先に記載した「制御処理プログラム」
とは、個々の制御仕様から自動生成したプログラムのこ
とを言い、複数の制御処理プログラムもしくはその他の
必要なプログラムを具体的な制御システム用に統合した
もの全体を、以後、「制御プログラム」と呼ぶことにす
る。
Incidentally, the above-mentioned "control processing program"
Means a program automatically generated from individual control specifications, and the whole of a plurality of control processing programs or other necessary programs integrated for a specific control system is hereinafter referred to as a "control program". I will decide.

【0005】一方、各種の制御システムではマルチタス
クの並列実行を必要とすることがある。車両制御システ
ムでの例を挙げると、エンジン制御ソフトウェアにおい
て、クランク角に同期したアクチュエータへの制御指令
と一定周期で動作する時定数の長いセンサ値の更新と
は、いわゆるマルチタスク構成となる。マルチタスク構
成では、タスク間で共有されるデータを排他アクセスし
たり、特定の処理の実行中はその処理への他タスクから
の割込みを禁止したりするなど、いわゆる排他制御が必
要となる。
On the other hand, various control systems may require multitasking parallel execution. As an example of the vehicle control system, in the engine control software, the control command to the actuator synchronized with the crank angle and the update of the sensor value having a long time constant that operates at a constant cycle have a so-called multi-task configuration. In the multi-task configuration, so-called exclusive control is required, such as exclusive access to data shared between tasks and prohibition of interrupts from other tasks during the execution of a particular process.

【0006】図21に、このような排他制御処理が必要
な制御プログラムの構造概念を示す。図21において、
100及び200はタスクa及びb、110及び210
はそれぞれタスクa及びbで実行される制御処理プログ
ラムA及びB、300はOSやタスク管理プログラム等
の呼び出し側プログラムで、制御処理プログラムA11
0、B2102つの制御処理プログラムのタスクa10
0及びb200の実行を管理するものである。400は
共有データで、制御処理プログラムA110、制御処理
プログラムB210で共有して使用されるデータが格納
されている。500は呼び出し側プログラム300によ
り提供されるタスク同期機構システムサービス(タスク
同期サービスと略称)である。
FIG. 21 shows a structural concept of a control program that requires such exclusive control processing. In FIG. 21,
100 and 200 are tasks a and b, 110 and 210
Is a control processing program A and B executed in tasks a and b, respectively, and 300 is a calling side program such as an OS and a task management program.
0, B210 Two control processing program tasks a10
0 and b200 are managed. Reference numeral 400 denotes shared data, which stores data shared by the control processing program A110 and the control processing program B210. Reference numeral 500 denotes a task synchronization mechanism system service (abbreviated as task synchronization service) provided by the calling program 300.

【0007】制御処理プログラムA110とB210が
並列実行される制御処理では、共有データにアクセスす
る際にデータの整合性を保つため、呼び出し側プログラ
ム300のタスク同期サービスを利用する。例えば、タ
スクa100の制御処理プログラムA110が共有デー
タ400にアクセスする場合、まずタスク同期サービス
500を呼び出す。タスク同期サービス500の機能に
より、他に共有データを占有しているタスクがいなけれ
ば、タスクa100は共有データ400を占有し、そこ
で実行される制御処理プログラムA110は、この共有
データ400にアクセスできる。アクセスが終わればタ
スク同期サービス500を呼び出して占有を解除する。
In the control processing in which the control processing programs A110 and B210 are executed in parallel, the task synchronization service of the calling program 300 is used in order to maintain data consistency when accessing shared data. For example, when the control processing program A110 of the task a100 accesses the shared data 400, the task synchronization service 500 is first called. By the function of the task synchronization service 500, if there is no other task occupying the shared data, the task a100 occupies the shared data 400, and the control processing program A110 executed there can access this shared data 400. When the access is completed, the task synchronization service 500 is called to release the occupation.

【0008】タスクa100が共有データ400を占有
中に制御処理プログラムB210を実行するタスクb2
00が動作して共有データ400にアクセスしようとす
る場合、制御処理プログラムA110による共有データ
400の占有が解除されるまで、制御処理プログラムB
210を実行しているタスクb200は待たされ、占有
解除後にタスクb200は共有データ400を占有して
実行を再開する。この様に、各種の制御システムではし
ばしばマルチタスクの並列実行処理が行われ、その際に
は、排他制御が必要となる。
A task b2 which executes the control processing program B210 while the task a100 occupies the shared data 400.
00 operates and tries to access the shared data 400, the control processing program B 110 waits until the occupation of the shared data 400 by the control processing program A 110 is released.
The task b200 executing 210 is kept waiting, and after the occupation is released, the task b200 occupies the shared data 400 and resumes the execution. Thus, in various control systems, multitask parallel execution processing is often performed, and in that case, exclusive control is required.

【0009】しかし、図2に示したようなデータフロー
図を使って制御仕様を記述し−この図は二つの入力in
_x、in_yの和を出力out_zとするような制御
仕様を表している。−、このデータフロー図を元にプロ
グラムを自動生成する場合、データフロー図には、もと
もと並列実行可能なマルチタスクや割り込みという概念
が無いため、本質的にマルチタスク並列実行時の排他制
御に関して考慮することができないという問題がある。
したがって、図21の制御処理プログラムA110やB
210が、データフロー図から自動生成されたプログラ
ムである場合は前記のようなタスク同期サービスに対応
できるようなプログラム構造になっておらず、排他制御
が必要な場合は、手作業で排他制御に関する部分を追加
・修正する必要があった。
However, the data flow diagram as shown in FIG. 2 is used to describe the control specification--this diagram shows two inputs in
The control specification is such that the output out_z is the sum of _x and in_y. -When automatically generating a program based on this data flow diagram, the data flow diagram does not originally have the concept of multitasks or interrupts that can be executed in parallel, so essentially consider exclusive control during multitask parallel execution. There is a problem that you cannot do it.
Therefore, the control processing programs A110 and B of FIG.
When 210 is a program automatically generated from the data flow diagram, it does not have a program structure that can support the task synchronization service as described above, and when exclusive control is required, it relates to exclusive control manually. It was necessary to add / modify parts.

【0010】図23に、そのような場合の従来の制御プ
ログラム生成手順をフロー図で示した。以下ではデータ
フロー図についてのみ説明し、ステートフロー図につい
ての説明は省略するが、ステートフロー図についても同
様である。図23において、S1001ではデータフロ
ー図により制御仕様を記述し、S1002ではS100
1で記述したデータフロー図に従ってシミュレーション
を実行し、制御仕様に問題がないかどうかをチェック、
確認する。S1003では、制御仕様を記述したデータ
フロー図を元に制御処理プログラムを自動生成する。S
1004では、自動生成された各制御処理プログラムを
呼び出し、逐次的あるいは並列的に実行させるためのタ
スク管理プログラム等の呼び出し側プログラムを作成す
る(呼び出し側プログラムは一般には既製のプログラム
を利用することが多い。)。
FIG. 23 is a flow chart showing a conventional control program generating procedure in such a case. Hereinafter, only the data flow diagram will be described and the description of the state flow diagram will be omitted, but the same applies to the state flow diagram. In FIG. 23, control specifications are described by a data flow diagram in S1001 and S1002 in S1002.
Execute the simulation according to the data flow diagram described in 1 to check whether there are any problems with the control specifications.
Check. In step S1003, a control processing program is automatically generated based on the data flow diagram describing the control specifications. S
In 1004, a calling side program such as a task management program for calling each automatically generated control processing program and executing them sequentially or in parallel is created (the calling side program may generally be an off-the-shelf program). Many.).

【0011】自動生成されたプログラムを呼び出し側プ
ログラムで呼び出して並列処理する場合、上述した様
に、自動生成プログラムに排他制御に関する追加・修正
を施す必要があり、S1005では自動生成された制御
処理プログラムに排他制御に関する追加・修正を手作業
によって施す。S1004で呼び出し側プログラムも新
規に作成する場合の詳細はS1001〜S1003の手
順と同様であるが図23では省略してある。この場合
は、S1005にて必要に応じて呼び出し側プログラム
への追加・修正も実施する。S1006では、この様に
追加・修正した制御処理プログラムと呼び出し側プログ
ラムをコンパイル・リンクして、特定目的のための、た
とえば車両用の制御プログラムとして完成する。尚、図
23のデータフロー図に基づき自動生成される制御処理
プログラムは、図21に示す制御処理プログラムAや制
御処理プログラムBに対応しており、複数の制御処理プ
ログラムを対象として含みうるものである。
When the calling program calls the automatically generated program for parallel processing, it is necessary to add / correct the exclusive control to the automatically generated program as described above. In S1005, the automatically generated control processing program is executed. Add / modify exclusive control manually to. Details of the case where the calling program is newly created in S1004 are the same as the procedures of S1001 to S1003, but are omitted in FIG. In this case, addition / correction to the calling program is also performed in S1005 as necessary. In step S1006, the control processing program thus added or modified and the calling program are compiled and linked to complete a control program for a specific purpose, for example, for a vehicle. Note that the control processing program automatically generated based on the data flow diagram of FIG. 23 corresponds to the control processing program A and the control processing program B shown in FIG. 21, and may include a plurality of control processing programs as targets. is there.

【0012】[0012]

【発明が解決しようとする課題】この様に、これまで
は、データフロー図で記述された制御仕様を元に自動生
成された複数の制御処理プログラムがマルチタスクとし
て並列実行されうるためには、図23のS1005の所
で述べた様に、自動生成された制御処理プログラムを排
他制御に関して手作業により追加・修正しなければなら
なかった。このためプログラム自動生成が不徹底にな
り、プログラム生成時間が増加するとともに、コーディ
ングミスの可能性が生じ、開発工数、若しくは開発期間
の増大となり、プログラム開発効率改善のネックになっ
ていた。
As described above, in order to enable a plurality of control processing programs automatically generated based on the control specifications described in the data flow diagram to be executed in parallel as a multitask, As described in S1005 of FIG. 23, the automatically generated control processing program had to be manually added / modified for exclusive control. For this reason, the automatic program generation becomes incomplete, the program generation time increases, the possibility of coding mistakes occurs, the development man-hours or the development period increase, and it becomes a bottleneck for improving the program development efficiency.

【0013】本発明は、このような問題点を解消するた
めになされたもので、制御仕様を記述したデータフロー
図もしくはステートフロー図に基づき制御処理プログラ
ムを自動生成する場合についても排他制御を可能にする
制御ソフトウェア自動生成システムおよび方法を提供す
ることを目的としている。
The present invention has been made to solve such a problem, and exclusive control is possible even when a control processing program is automatically generated based on a data flow diagram or a state flow diagram describing control specifications. It is an object of the present invention to provide a control software automatic generation system and method.

【0014】[0014]

【課題を解決するための手段】この発明は、データフロ
ー図の形式で記述された制御仕様に基づき制御処理プロ
グラムを自動生成する制御処理プログラム生成手段、前
記制御処理プログラム自動生成手段で生成された制御処
理プログラムの関数インタフェース形式と、外部プログ
ラムが前記制御処理プログラムを呼び出す際の関数イン
タフェース形式と、前記外部プログラムおよび前記制御
処理プログラムの間での、排他制御の有無の指定を含む
データの受け渡しの定義とからなるインタフェース情報
を記憶格納するインタフェース情報記述部、前記インタ
フェース情報記述部に記憶格納されているインタフェー
ス情報に基づきインタフェースプログラムを生成するイ
ンタフェースプログラム生成手段、および前記外部プロ
グラムと前記制御処理プログラムと前記インタフェース
プログラムとをコンパイル・リンクして制御プログラム
を自動生成するコンパイル・リンク手段を備えたことを
特徴とする制御ソフトウェア自動生成システムとする。
According to the present invention, there is provided a control processing program generating means for automatically generating a control processing program based on a control specification described in a data flow diagram format, and the control processing program automatic generating means. The function interface format of the control processing program, the function interface format when the external program calls the control processing program, and the transfer of data between the external program and the control processing program, including the specification of the presence or absence of exclusive control. An interface information description section for storing and storing interface information consisting of definitions, an interface program generating means for generating an interface program based on the interface information stored and stored in the interface information description section, the external program and the control And control software automatic generation system characterized by comprising a compilation link means for automatically generating a physical program and said interface program was compiled and linked with the control program.

【0015】また、データフロー図の形式で記述された
制御仕様に基づき制御処理プログラムを自動生成する制
御処理プログラム生成手段、前記制御処理プログラム自
動生成手段で生成された制御処理プログラムの関数イン
タフェース形式と、外部プログラムが前記制御処理プロ
グラムを呼び出す際の関数インタフェース形式と、前記
外部プログラムおよび前記制御処理プログラムの間で
の、排他制御の有無の指定を含むデータの受け渡しの定
義とからなるインタフェース情報を記憶格納するインタ
フェース情報記述部、前記インタフェース情報記述部に
記憶格納されているインタフェース情報に基づきインタ
フェースプログラムを生成するインタフェースプログラ
ム生成手段、および前記外部プログラムと前記制御処理
プログラムと前記インタフェースプログラムとをコンパ
イル・リンクして制御プログラムを自動生成するコンパ
イル・リンク手段を備えたことを特徴とする制御ソフト
ウェア自動生成方法とする。
Further, a control processing program generating means for automatically generating a control processing program based on a control specification described in the form of a data flow diagram, and a function interface format of the control processing program generated by the control processing program automatic generating means. Storing interface information consisting of a function interface format when an external program calls the control processing program, and a definition of data transfer between the external program and the control processing program including designation of the presence / absence of exclusive control An interface information description part to be stored, an interface program generation means for generating an interface program based on the interface information stored and stored in the interface information description part, the external program, the control processing program, and the interface. And control software automatically generating method characterized by comprising a compilation link means for automatically generating interface program and the compile link to control program.

【0016】[0016]

【発明の実施の形態】以下、本発明の実施の形態につい
て説明する。図1は本発明の実施の形態を示す構成図で
ある。図において、1は制御ソフトウェア自動生成シス
テム、2は入力手段、3は出力手段、4は制御仕様をデ
ータフロー図の形に設計記述する制御仕様設計手段、6
は自動生成される制御処理プログラム(一般には複数あ
るがここでは代表して1個だけを示した。)を、別の手
段で作成された外部プログラムから呼び出す際に必要と
なる、インタフェース形式に関する情報と排他制御対象
を指定する排他制御指定情報とを含めたインタフェース
情報を格納したインタフェース情報記述部、7は前記外
部プログラムから前記制御処理プログラムを呼び出すと
きに使用するインタフェースプログラムを、前記インタ
フェース情報記述部に格納されたインタフェース情報を
使って自動生成するインタフェースプログラム生成手
段、8はプログラム記憶格納手段で、外部プログラム8
1、制御処理プログラム82、インタフェースプログラ
ム83、制御プログラム84を記憶格納する。9はコン
パイル/リンク手段で、外部プログラム81と制御処理
プログラム82、インタフェースプログラム83をコン
パイル/リンクし、特定目的の制御プログラム84を生
成する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below. FIG. 1 is a block diagram showing an embodiment of the present invention. In the figure, 1 is a control software automatic generation system, 2 is input means, 3 is output means, 4 is control specification design means for designing and describing control specifications in the form of a data flow diagram, 6
Is the information about the interface format that is required when an automatically generated control processing program (generally there are multiple, only one is shown here as a representative) from an external program created by another means. And an interface information description unit that stores interface information including exclusive control designation information that designates an exclusive control target. Reference numeral 7 denotes an interface program used when the control processing program is called from the external program. Interface program generating means for automatically generating using the interface information stored in the external program 8
1, a control processing program 82, an interface program 83, and a control program 84 are stored and stored. A compile / link means 9 compiles / links an external program 81, a control processing program 82, and an interface program 83 to generate a special purpose control program 84.

【0017】ここで、外部プログラム81とは自動生成
された各制御処理プログラムを呼び出し、逐次的あるい
は並列的に実行させるためのプログラムで、呼び出し側
プログラムと呼ぶこともある。なお、呼び出される側は
処理側プログラムと呼ぶことにする。(呼び出し側/処
理側として以下で使用する。)なお、図21との対応で
言えばOSやタスク管理プログラムに相当するものであ
る。図1では既存のプログラムを想定して示してあるた
め、入力手段2経由でプログラム記憶格納手段8に格納
するという形にしてあるが、後述する制御処理プログラ
ム82の生成手順と同様の手順で自動生成したものを格
納してもよい。
Here, the external program 81 is a program for calling each automatically generated control processing program and executing the control processing programs sequentially or in parallel, and may be called a calling side program. The called side is called the processing side program. (It will be used below as a calling side / processing side.) Note that, in correspondence with FIG. 21, it corresponds to an OS or a task management program. In FIG. 1, since an existing program is assumed and stored, the program is stored in the program storage means 8 via the input means 2, but the procedure is the same as that of the control processing program 82, which will be described later. The generated one may be stored.

【0018】インタフェース情報は、外部プログラムか
ら呼び出す際に必要となる、プログラム間の呼び出し形
式の違いやデータ構造の違いなどインタフェース形式に
関する情報、および複数の制御処理プログラムの共有デ
ータ、もしくは制御処理プログラム全体を排他制御対象
とすべきかどうかを指定する排他制御指定情報を含む。
インタフェース形式に関する情報については、制御処理
プログラム82および外部プログラム81からプログラ
ム構文解析ツール等を用いて自動的に抽出してもよい
し、制御処理プログラム生成手段がこれらの情報を抽出
するための機能を提供できる場合もある。更に、入力手
段2を用いて(ユーザーインタフェース画面等の援用を
含む)、マニュアルで設定してもよい。排他制御に関す
る情報は入力手段を経由してのマニュアルによる設定に
なる。外部プログラム81に関連するインタフェース情
報もプログラム構文解析ツール等が利用できない場合は
入力手段2経由でマニュアルによる設定になる。
The interface information is information related to the interface format, such as a difference in calling format and a data structure between programs, which is required when calling from an external program, shared data of a plurality of control processing programs, or the entire control processing program. Includes exclusive control specification information that specifies whether or not to be subject to exclusive control.
The information regarding the interface format may be automatically extracted from the control processing program 82 and the external program 81 using a program parsing tool or the like, or the control processing program generating means may have a function for extracting such information. In some cases, it can be provided. Further, it may be set manually by using the input means 2 (including assistance of a user interface screen or the like). Information regarding exclusive control is manually set via the input means. Interface information related to the external program 81 is also manually set via the input means 2 when the program syntax analysis tool or the like cannot be used.

【0019】インタフェースプログラム83は、プログ
ラム間の呼び出し形式の違いやデータ構造の違いによる
呼び出し上の問題点を解消するとともに、複数の制御処
理プログラム82のマルチタスク並列実行時に必要な排
他制御機能を設定する。
The interface program 83 solves the problem of calling due to the difference in the calling format and the difference in the data structure between the programs, and sets the exclusive control function required for the multitask parallel execution of the plurality of control processing programs 82. To do.

【0020】次に本実施の形態の手順を図24のフロー
図を使って説明する。図24は図23と対応しており、
S1101からS1103は図23のS1001からS
1003と、同S1105は図23のS1004と同一
の内容である。図1の制御仕様設計手段4での処理がS
1101とS1102に対応する。図24のS1104
ではS1103で自動生成(図1の制御処理プログラム
生成手段5での処理)された制御処理プログラム(図1
の制御処理プログラム82に対応)の関数インタフェー
ス情報(後述)を取得しインタフェース情報として図1
に示すインタフェース情報記述部6に設定し、S110
6ではS1105で作成した(もしくは既設の)呼び出し
側プログラム(図1の外部プログラム81に対応)から
制御処理プログラムを呼び出す際の関数インタフェース
情報(後述。図16に例示)を取得し、インタフェース
情報として図1に示すインタフェース情報記述部6に記
憶・格納する。S1107ではS1104、S1106
で作成したインタフェース情報に排他制御に関する情報
を、入力手段2を経由して(ユーザーインタフェース画
面を援用してもよい。)設定し、S1108ではS11
07で作成したインタフェース情報からインタフェース
プログラム(図1のインタフェースプログラム83に対
応)を自動生成する(図1のインタフェースプログラム
生成手段7での処理)。S1109ではS1103で自
動生成された制御処理プログラム82、S1105で生
成された呼び出し側プログラム(図1の外部プログラム
81に対応)およびS1108で自動生成されたインタ
フェースプログラム83を図1のコンパイル/リンク手
段9にてコンパイル/リンクして、特定目的の、たとえ
ば車両用の制御プログラム(図1の制御プログラム84
に対応))とする。結果は必要に応じて出力手段3で出
力する。
Next, the procedure of this embodiment will be described with reference to the flowchart of FIG. FIG. 24 corresponds to FIG. 23,
S1101 to S1103 are the same as S1001 to S in FIG.
1003 and S1105 have the same contents as S1004 in FIG. The processing in the control specification design means 4 in FIG. 1 is S
It corresponds to 1101 and S1102. S1104 of FIG.
Then, in S1103, the control processing program automatically generated (processing by the control processing program generation means 5 of FIG. 1) (FIG. 1).
Function interface information (described later) of the control processing program 82 of FIG.
Set in the interface information description section 6 shown in
In step 6, function interface information (to be described later, exemplified in FIG. 16) for calling the control processing program from the calling program (corresponding to the external program 81 in FIG. 1) created in S1105 (corresponding to the external program 81 in FIG. 1) is acquired and used as interface information. It is stored and stored in the interface information description unit 6 shown in FIG. In S1107, S1104 and S1106
Information relating to exclusive control is set in the interface information created in step 1 via the input means 2 (a user interface screen may be used), and in step S1108, step S11.
An interface program (corresponding to the interface program 83 in FIG. 1) is automatically generated from the interface information created in 07 (processing by the interface program generating means 7 in FIG. 1). In step S1109, the control processing program 82 automatically generated in step S1103, the calling program (corresponding to the external program 81 in FIG. 1) generated in step S1105, and the interface program 83 automatically generated in step S1108 are compiled / link means 9 in FIG. The control program for a specific purpose, for example, for a vehicle (control program 84 in FIG.
It corresponds to))). The result is output by the output means 3 as needed.

【0021】図22に本実施の形態に係るソフトウェア
の構造を示す。これは既述の図21と対比すべきもので
ある。図22において、符号100、110、200、
210、300、400、500は図21の場合と同じ
である。違いは、タスクa、タスクb上での、制御プロ
グラムA,Bの実行が、インタフェースプログラムa1
20、b220介して行われていることである。
FIG. 22 shows the structure of software according to this embodiment. This should be compared with FIG. 21 described above. In FIG. 22, reference numerals 100, 110, 200,
210, 300, 400 and 500 are the same as in the case of FIG. The difference is that the execution of the control programs A and B on the task a and the task b is the interface program a1.
20 and b220.

【0022】図22は、排他制御を記述できていない自
動生成プログラムである制御処理プログラムA110及
びB210をマルチタスク環境で用いるために、排他制
御処理を伴うインタフェースプログラムを導入した制御
ソフトウェアの構造を示している。制御処理プログラム
A110及びB210は、OS/タスク管理プログラム
といった呼び出し側プログラムが管理するタスク上で、
直接ではなく、インタフェースプログラムを介して実行
される。
FIG. 22 shows the structure of control software in which an interface program accompanied by exclusive control processing is installed in order to use the control processing programs A110 and B210 which are automatically generated programs in which exclusive control cannot be described in a multitask environment. ing. The control processing programs A110 and B210 are provided on a task managed by a calling program such as an OS / task management program.
It is executed through the interface program, not directly.

【0023】排他制御を実現するタスク同期サービス5
00の呼び出しは、インタフェースプログラム中で行わ
れる。制御処理プログラムA110が共有データ400
にアクセスする必要がある場合、インタフェースプログ
ラムa120では、制御処理プログラムA110を呼び
出す前にタスク同期サービス500の呼び出しを行う。
タスク同期サービス500の機能により、他に共有デー
タ400を占有している制御処理プログラムがなけれ
ば、タスクa100は共有データ400を占有して実行
を継続する。その際、インタフェース情報において、
「処理全体を排他」に設定してある場合、生成されたイ
ンタフェースプログラムa120は共有データ400の
占有を継続したまま制御処理プログラムA110を呼び
出し、制御処理プログラムA110は共有データ400
にアクセスできる。アクセスが終わり、制御処理プログ
ラムA110から戻ると、インタフェースプログラムa
120はタスク同期サービス500を呼び出して占有を
解除する。
Task synchronization service 5 for realizing exclusive control
00 is called in the interface program. Control processing program A110 is shared data 400
When it is necessary to access the task synchronization service 500, the interface program a120 calls the task synchronization service 500 before calling the control processing program A110.
By the function of the task synchronization service 500, if there is no other control processing program that occupies the shared data 400, the task a100 occupies the shared data 400 and continues execution. At that time, in the interface information,
When "Exclusive for all processes" is set, the generated interface program a120 calls the control processing program A110 while continuing to occupy the shared data 400, and the control processing program A110 sets the shared data 400.
Can be accessed. When the access is completed and the process returns from the control processing program A110, the interface program a
120 calls the task synchronization service 500 to release the occupation.

【0024】一方、インタフェース情報において、個々
の入出力データに対して排他制御の指定がなされている
場合、インタフェースプログラムa120は個々の入出
力の都度、共有データ400の占有/占有解除を行う。
例えば、指定データの入力の後、それを使って制御処理
プログラムA110で処理した結果を共有データに出力
する場合を考えると、まず、インタフェースプログラム
a120は共有データ400を占有し、指定されたデー
タにアクセスし、これを一時変数にコピーした後一旦占
有を解除する。
On the other hand, when exclusive control is designated for each input / output data in the interface information, the interface program a120 occupies / releases the shared data 400 for each input / output.
For example, considering a case where the result of processing by the control processing program A110 using the designated data is output to the shared data after inputting the designated data, first, the interface program a120 occupies the shared data 400 and creates the designated data. Access it, copy it to a temporary variable, and then release the occupancy.

【0025】その後、インタフェースプログラムa12
0は制御処理プログラムA110を、出力先が一時変数
になるようにして呼び出す。制御処理プログラムA11
0は処理結果を一時変数に出力し、インタフェースプロ
グラムa120に戻る。インタフェースプログラムa1
20は再度タスク同期サービス500を呼び出して共有
データ400の占有を行い、処理結果である一時変数の
内容を共有データ400に書き戻した後、共有データ4
00の占有を解除する。
After that, the interface program a12
0 calls the control processing program A110 so that the output destination becomes a temporary variable. Control processing program A11
0 outputs the processing result to a temporary variable and returns to the interface program a120. Interface program a1
20 calls the task synchronization service 500 again to occupy the shared data 400, writes back the contents of the temporary variable as the processing result to the shared data 400, and then the shared data 4
Release the occupancy of 00.

【0026】タスクa100が共有データ400を占有
中に、共有データ400へのアクセスを伴う制御処理プ
ログラムB210を実行するタスクb200が動作しよ
うとする場合、まず、インタフェースプログラムb22
0が呼び出され、そこでタスク同期サービス500を呼
び出した時点でタスク同期サービス500の機能により
タスクb200は待たされる。タスクa100による共
有データ400の占有が解除された時点で、タスクb2
00は共有データ400を占有して実行を再開し、イン
タフェースプログラムb220は制御処理プログラムB
210を呼び出すことになる。
When the task b200, which executes the control processing program B210 involving access to the shared data 400, tries to operate while the task a100 occupies the shared data 400, first, the interface program b22.
0 is called, and when the task synchronization service 500 is called, the task b200 is kept waiting by the function of the task synchronization service 500. When the occupation of the shared data 400 by the task a100 is released, the task b2
00 occupies the shared data 400 and resumes execution, and the interface program b220 is the control processing program B.
210 will be called.

【0027】具体例について述べる。図1に示した制御
仕様設計手段4で作成可能なデータフロー図は、例えば
図2に示すようなものである。このデータフロー図で
は、ふたつの入力in_x、in_yの和を出力out
_zとする制御仕様が表されている。本発明では、この
ようなデータフロー図編集機能をもつ既存ソフトウェア
製品を、制御仕様設計手段4として利用することができ
る。
A specific example will be described. The data flow diagram that can be created by the control specification designing means 4 shown in FIG. 1 is as shown in FIG. 2, for example. In this data flow diagram, the sum of two inputs in_x and in_y is output out
The control specification of _z is shown. In the present invention, an existing software product having such a data flow diagram editing function can be used as the control specification design means 4.

【0028】図1に示した制御処理プログラム生成手段
5は、データフロー図から、例えばC言語のプログラム
ソースコードを生成するものである。このようなプログ
ラムコード生成機能を持つ既存ソフトウェア製品を、制
御処理プログラム生成手段5として利用することができ
る。
The control processing program generating means 5 shown in FIG. 1 is for generating, for example, a program source code in C language from the data flow diagram. An existing software product having such a program code generation function can be used as the control processing program generation means 5.

【0029】制御処理プログラム生成手段5が、次のよ
うな形式のC言語関数のプログラムソースコードを生成
する場合を例にとり説明する。 (1)関数の型はvoid、(2)入力データは値渡し
の引数、(3)出力データは参照渡しの引数。このと
き、制御処理プログラム生成手段5を用いると、図2に
示したデータフロー図に対応するCプログラムコードと
して、図3に示す制御処理プログラム82が生成され
る。
The case where the control processing program generation means 5 generates the program source code of the C language function of the following format will be described as an example. (1) Function type is void, (2) Input data is an argument passed by value, and (3) Output data is an argument passed by reference. At this time, when the control processing program generating means 5 is used, the control processing program 82 shown in FIG. 3 is generated as the C program code corresponding to the data flow diagram shown in FIG.

【0030】図1のインタフェースプログラム生成手段
7の説明に移る前に、インタフェース情報について説明
しておく。図1のインタフェース情報記述部6に格納さ
れるインタフェース情報には、(1)データフロー図か
ら生成される制御処理プログラム82の関数インタフェ
ース形式、(2)外部プログラム81がデータフロー図
で記述された制御処理プログラム82を呼び出す際の関
数インタフェース形式、(3)外部プログラム81と制
御処理プログラム82との間での排他制御の有無を含め
たデータ受渡し、が含まれる。
Before proceeding to the description of the interface program generating means 7 of FIG. 1, the interface information will be described. In the interface information stored in the interface information description unit 6 of FIG. 1, (1) the function interface format of the control processing program 82 generated from the data flow diagram and (2) the external program 81 are described in the data flow diagram. It includes a function interface format when calling the control processing program 82, and (3) data transfer including the presence / absence of exclusive control between the external program 81 and the control processing program 82.

【0031】インタフェース情報記述部6に格納される
インタフェース情報のうち、(1)制御処理プログラム
82の関数インタフェース形式に関する情報は、図16
に示すようなもので、ここでは、一例として図3に示し
た制御処理プログラムに関する情報が示されている。図
16はユーザーの便宜のために関数インタフェース形式
に関する情報を表示したユーザーインタフェース画面
で、ここでは、関数名および関数の型と、引数の名前、
データ型、入出力の区別などが設定されるようになって
いる。
Of the interface information stored in the interface information description unit 6, (1) information regarding the function interface format of the control processing program 82 is shown in FIG.
The information regarding the control processing program shown in FIG. 3 is shown as an example here. FIG. 16 is a user interface screen displaying information on the function interface format for the convenience of the user. Here, the function name and function type, argument names,
The data type, input / output distinction, etc. are set.

【0032】これらの情報は、ユーザーインタフェース
画面を用いてマニュアルで設定しても良いし、プログラ
ム構文解析ツール等を用いて、制御処理プログラム82
から自動的に抽出し設定されるようにしても良い。ま
た、制御処理プログラム生成手段5が図16に示すよう
な情報を取得するための機能を提供できる場合、これを
用いて設定しても良い。以下の説明では、制御処理を記
述したデータフロー図から生成される制御処理プログラ
ム82の関数インタフェース形式のことを、単に処理側
関数形式と呼ぶことにする。
These pieces of information may be set manually by using a user interface screen, or by using a program syntax analysis tool or the like.
May be automatically extracted from and set. Further, when the control processing program generation means 5 can provide a function for acquiring information as shown in FIG. 16, it may be set using this. In the following description, the function interface format of the control processing program 82 generated from the data flow diagram describing the control processing will be simply referred to as the processing function format.

【0033】インタフェース情報記述部6に格納される
インタフェース情報のうち、(2)外部プログラム81
がデータフロー図から生成された制御処理プログラム8
2を呼び出す際の関数インタフェース形式に関する情報
は、図16に示した、データフロー図から生成される制
御処理プログラム82の関数インタフェース形式に関す
る情報と同様であるが、図18に示すように、引数を用
いずに大域変数を用いることもできる。この場合も名
前、データ型、入出力の区別が設定されるようになって
いる。
Of the interface information stored in the interface information description section 6, (2) external program 81
Is a control processing program 8 generated from the data flow diagram
The information about the function interface format when calling 2 is similar to the information about the function interface format of the control processing program 82 generated from the data flow diagram shown in FIG. 16, but as shown in FIG. It is also possible to use a global variable without using it. In this case as well, the name, data type, and input / output distinction are set.

【0034】図18では、関数プロトタイプが voi
d func(void)で、内部で3つの大域変数
x、y、zを用いるような関数インタフェース形式に関
する情報が示されている。以下の説明では、外部プログ
ラム81がデータフロー図から生成された制御処理プロ
グラム82を呼び出す際の関数インタフェース形式のこ
とを、単に外部呼出し形式と呼ぶことにする。
In FIG. 18, the function prototype is voi
In d func (void), information about a function interface format that internally uses three global variables x, y, and z is shown. In the following description, the function interface format when the external program 81 calls the control processing program 82 generated from the data flow diagram will be simply referred to as the external call format.

【0035】図1のインタフェース情報記述部6に格納
されるインタフェース情報のうち、(3)外部プログラ
ム81と制御処理プログラム82との間での排他制御の
有無を含めたデータ受渡しに関する情報、すなわち外部
データ(=外部プログラム81で使用しているデータ)
と制御処理プログラム82の入出力との間でのデータ受
渡しに関する情報の例を図19に示す。図19は入出力
データ毎に排他制御要否を指定する場合の排他制御指定
情報の例を示しており、外部データから制御処理プログ
ラム82への入力、制御処理プログラム82から外部デ
ータへの出力についてのデータの対応と排他制御の指定
が設定されている。なお、これとは別にプログラム処理
全体に対して排他制御を設定するかどうかも指定できる
ようになっている(図19左上に「処理全体を排他」と
記載した欄のチェックの有無による。)。
Of the interface information stored in the interface information description section 6 of FIG. 1, (3) information relating to data transfer including the presence / absence of exclusive control between the external program 81 and the control processing program 82, that is, the external Data (= data used by external program 81)
FIG. 19 shows an example of information relating to data transfer between the input and output of the control processing program 82. FIG. 19 shows an example of exclusive control designation information in the case where exclusive control necessity is designated for each input / output data. Regarding input from external data to the control processing program 82 and output from the control processing program 82 to external data. Correspondence of data and specification of exclusive control are set. In addition to this, it is also possible to specify whether or not exclusive control is set for the entire program processing (depending on whether or not there is a check in the column labeled "Exclusive processing" in the upper left of FIG. 19).

【0036】この場合は、データフロー図から生成され
た制御処理プログラム82を排他制御の対象とするた
め、入力データ受渡し部、出力データ受渡し部、あるい
はこれらと関数呼出しの全てを、対象となるプラットホ
ームのタスク同期サービスが提供する排他区間開始関数
及び排他区間終了関数の呼出しで囲んでやるようにす
る。排他区間開始関数として_EX_STARTが、終
了関数として_EX_ENDが用いられる。なお、以下
の説明では、制御処理仕様を記述したデータフロー図か
ら生成された制御処理プログラムで用いられるデータを
処理側データ、外部呼出し形式で用いられる外部データ
を呼出し側データと呼ぶことにする。
In this case, since the control processing program 82 generated from the data flow diagram is targeted for exclusive control, the input data passing unit, the output data passing unit, or all of these and function calls are targeted. Enclose it by calling the exclusive section start function and exclusive section end function provided by the task synchronization service of. _EX_START is used as the exclusive section start function, and _EX_END is used as the end function. In the following description, the data used in the control processing program generated from the data flow diagram describing the control processing specifications will be called processing side data, and the external data used in the external calling format will be called calling side data.

【0037】図19では、入力として、呼出し側データ
の大域変数xを処理側データの引数in_xに、呼出し
側データの大域変数yを処理側データの引数in_y
に、それぞれ受け渡すことが示されている。また、出力
として、処理側データの引数out_zを呼出し側デー
タの大域変数zに受け渡すことが示されている。また、
呼出し側データの大域変数xから処理側データの引数i
n_xへの受渡しと、呼出し側データの大域変数yから
処理側データの引数in_yへの受渡しを、排他制御の
対象とすることが指定されている。以上がインタフェー
ス情報の構成とその内容である。
In FIG. 19, as input, the global variable x of the calling side data is the argument in_x of the processing side data, and the global variable y of the calling side data is the argument in_y of the processing side data.
It is shown that each is delivered. Further, as an output, it is shown that the argument out_z of the processing side data is passed to the global variable z of the calling side data. Also,
From the global variable x of the calling side data to the argument i of the processing side data
It is specified that the transfer to n_x and the transfer from the global variable y of the calling side data to the argument in_y of the processing side data are the targets of exclusive control. The above is the structure and contents of the interface information.

【0038】次に、これらのインタフェース情報から、
図1のインタフェースプログラム生成手段7によりイン
タフェースプログラム83を生成する方法について説明
する。インタフェースプログラム生成手段7は、インタ
フェースプログラム83として、C言語で記述された、
次のようなセクションから構成される関数を生成する。
(1)大域変数宣言部、(2)一時変数定義部、(3)
入力データ受渡し部、(4)関数呼び出し部、(5)出
力データ受渡し部。これらの関数生成を含むインタフェ
ースプログラム83生成の全体の流れを図6に示す。な
お、前記各セクションのうち、入力データ受渡し部と出
力データ受渡し部のそれぞれ、または、入力データ受渡
し部、関数呼び出し部、出力データ受渡し部全体が、排
他制御指定に従い、排他区間とされる。
Next, from these interface information,
A method of generating the interface program 83 by the interface program generating means 7 of FIG. 1 will be described. The interface program generating means 7 is written in C language as the interface program 83.
Generate a function consisting of the following sections:
(1) Global variable declaration part, (2) Temporary variable definition part, (3)
Input data passing unit, (4) function calling unit, (5) output data passing unit. FIG. 6 shows an overall flow of generation of the interface program 83 including generation of these functions. It should be noted that, of the respective sections, each of the input data passing unit and the output data passing unit, or the input data passing unit, the function calling unit, and the entire output data passing unit are set as exclusive sections according to the exclusive control designation.

【0039】インタフェースプログラム83生成手順の
概要は、図6に従って以下のようになる。最初に、イン
タフェースプログラム83の内部で、データ受渡しのた
めに一時変数を用いる必要があるかどうかを調べ(ステ
ップS101)、次にインタフェースプログラム83の
関数定義開始部分の出力処理を行い(ステップS102
からステップS106)、続いて、前記の大域変数宣言
部、一時変数定義部、入力データ受渡し部、関数呼出し
部、出力データ受渡し部の出力処理を順に行う(ステッ
プS107からステップS111)。最後に、インタフ
ェースプログラム83の関数定義の終了部分を出力する
(ステップS112)。
The outline of the procedure for generating the interface program 83 is as follows according to FIG. First, it is checked inside the interface program 83 whether or not it is necessary to use a temporary variable for data transfer (step S101), and then output processing of the function definition start portion of the interface program 83 (step S102).
To step S106), the output process of the global variable declaration part, the temporary variable definition part, the input data passing part, the function calling part, and the output data passing part is sequentially performed (steps S107 to S111). Finally, the end part of the function definition of the interface program 83 is output (step S112).

【0040】以下、関連する図を及びその説明も含め、
図6について詳細に説明する。図6のステップS10
1、一時変数要否チェック処理手順は図9に示すとおり
である。ステップS501から始まるループは、図19
に示したようなデータ受渡し情報のそれぞれに対して、
処理を行うものである。図9については、まず排他制御
指定の有無を調べる(ステップS502)。排他制御指
定があれば、一時変数を用いることとし、そのデータ型
を定めるために、次に処理側データがポインタ型か否か
を調べる(ステップS503)。ポインタ型であれば、
処理側データのデータ型に対する基本データ型をデータ
型とし、処理側データと同名の一時変数を用い(ステッ
プS504)、そうでなければ、処理側データと同名、
同データ型の一時変数を用いる(ステップS505)。
Hereinafter, including the related drawings and the description thereof,
FIG. 6 will be described in detail. Step S10 of FIG.
1. The temporary variable necessity check processing procedure is as shown in FIG. The loop starting from step S501 is shown in FIG.
For each of the data passing information as shown in
The processing is performed. Regarding FIG. 9, first, it is checked whether or not exclusive control is designated (step S502). If exclusive control is designated, a temporary variable is used, and in order to determine its data type, it is next checked whether or not the processing side data is a pointer type (step S503). If it is a pointer type,
A basic data type for the data type of the processing side data is set as a data type, and a temporary variable having the same name as the processing side data is used (step S504). Otherwise, the same name as the processing side data,
A temporary variable of the same data type is used (step S505).

【0041】排他制御指定がない場合、出力データ受渡
しか否かを調べ、出力データ受渡しでなければ、一時変
数を用いない。出力データ受渡しであれば、呼出し側デ
ータがポインタ型でない引数であるかまたは関数の返り
値であるか、チェックする。いずれかであれば、処理側
データのデータ型に対する基本データ型をデータ型と
し、処理側データと同名の一時変数を用いる(ステップ
S508)。いずれでもなければ、一時変数を用いない
(ステップS509)。
When the exclusive control is not designated, it is checked whether or not the output data is delivered, and if the output data is not delivered, the temporary variable is not used. If the output data is passed, it is checked whether the calling data is a non-pointer type argument or a function return value. In either case, the basic data type corresponding to the data type of the processing side data is set as the data type, and the temporary variable having the same name as the processing side data is used (step S508). If neither, the temporary variable is not used (step S509).

【0042】図19に示したデータ受渡しの場合では、
結果は図14のようになる。まず呼出し側のxから処理
側のin_xへのデータ受渡しについては、排他制御指
定ありで、処理側データはポインタ型ではないので、処
理側データと同名で同一データ型、即ち uint1
6、in_x という一時変数が準備され、このデータ
受渡し情報に関連付けられる。呼出し側のyから処理側
のin_yへのデータ受渡しについても同様である。処
理側out_zから呼出し側の関数の返り値へのデータ
受渡しは、排他制御指定がなく、出力に関するものであ
り、呼出し側データは大域変数であるため、ステップS
507の条件は成立せず、一時変数は不要と判断され
る。
In the case of data transfer shown in FIG. 19,
The result is as shown in FIG. First, regarding the data transfer from x on the calling side to in_x on the processing side, since exclusive control is specified and the processing side data is not a pointer type, it has the same name as the processing side data, that is, uint1.
6, a temporary variable in_x is prepared and associated with this data passing information. The same applies to data transfer from y on the calling side to in_y on the processing side. Data passing from the processing side out_z to the return value of the calling side function is related to output without specifying the exclusive control, and since the calling side data is a global variable, step S
The condition of 507 is not satisfied, and it is determined that the temporary variable is unnecessary.

【0043】次に、図6のステップS102からステッ
プS106までの処理であるインタフェースプログラム
83の関数定義開始部分の出力処理が行われ、続いてス
テップS107の大域変数宣言部出力処理が行われる。
大域変数宣言部は、外部データに対応した大域変数を、
データフロー図より生成される制御処理プログラム82
からアクセスする場合などに必要となる大域変数の宣言
文を置く部分である。次に、ステップS108の一時変
数定義文出力処理が行われる。一時変数定義部は、外部
データとデータフロー図より生成される制御処理プログ
ラム82の入出力との間でのデータ受渡しを、一時変数
を介して行う場合に、一時変数の定義文を置く部分であ
る。先に述べたように図18の場合、引数を用いずに大
域変数が指定されているので、これらについての宣言文
が出力される。また、前記の一時変数要否チェックの結
果(図14)により、ふたつの一時変数の定義文が出力
される。
Next, the output processing of the function definition start portion of the interface program 83, which is the processing from step S102 to step S106 of FIG. 6, is performed, and then the global variable declaration part output processing of step S107 is performed.
The global variable declaration part stores global variables corresponding to external data as
Control processing program 82 generated from data flow diagram
This is the part to put the declaration statement of the global variable which is necessary when accessing from. Next, the temporary variable definition statement output process of step S108 is performed. The temporary variable definition part is a part for placing a definition statement of a temporary variable when passing data between the external data and the input / output of the control processing program 82 generated from the data flow diagram through the temporary variable. is there. As described above, in the case of FIG. 18, since global variables are specified without using arguments, declaration statements regarding these are output. In addition, two temporary variable definition statements are output according to the result of the above-mentioned temporary variable necessity check (FIG. 14).

【0044】図6のステップS109に記載されている
入力データ受渡し部は、外部で定義したデータをデータ
フロー図より生成される制御処理プログラム82の入力
へ受け渡すための代入文を置く部分である。入力データ
受渡し部の出力処理手順は図10に示すとおりである。
図10の処理では、まず、図19に示すようなインタフ
ェース情報において、処理全体を排他の対象とする指定
の有無を調べる(ステップS601)。
The input data transfer section described in step S109 of FIG. 6 is a section for placing an assignment statement for transferring the externally defined data to the input of the control processing program 82 generated from the data flow diagram. . The output processing procedure of the input data transfer unit is as shown in FIG.
In the process of FIG. 10, first, in the interface information as shown in FIG. 19, it is checked whether or not the entire process is designated as an exclusion target (step S601).

【0045】排他制御指定があれば、まず排他区間開始
関数の呼出し文を出力し(S602)、続けて、入力デ
ータ受渡し文出力処理を入力データ受渡し定義のそれぞ
れに対して行う(ステップS603からS605)。ス
テップS604の処理手順詳細については、入力データ
受渡し文出力処理手順として図7に示した(S301か
らS304)。
If the exclusive control is designated, the calling statement of the exclusive section start function is first output (S602), and subsequently the input data delivery statement output processing is performed for each of the input data delivery definitions (steps S603 to S605). ). Details of the processing procedure in step S604 are shown in FIG. 7 as the input data delivery sentence output processing procedure (S301 to S304).

【0046】処理全体を排他とする指定が無ければ(ス
テップS601)、入力データ受渡しの定義で排他制御
指定を持つものがあるかを調べる(ステップS60
6)。ひとつでも排他制御指定を持つ入力データ受渡し
定義があれば、まず排他区間開始関数の呼出し文を出力
し(ステップS607)、続いて、排他制御指定を持つ
入力データ受渡し定義のそれぞれについて入力データ受
渡し文出力処理を行う(ステップS608からS61
0)。ステップS609の入力データ受渡し文出力処理
手順の詳細は図7に示す。更に、排他区間終了関数の呼
出し文を出力し(ステップS611)、最後に、排他制
御指定の無い入力データ受渡し定義のそれぞれについ
て、入力データ受渡し文出力処理を行う(ステップS6
12からS614)。
If there is no designation that the entire process is exclusive (step S601), it is checked whether or not there is an exclusion control designation in the definition of input data transfer (step S60).
6). If there is at least one input data passing definition having the exclusive control specification, first, the calling statement of the exclusive section start function is output (step S607), and then the input data passing statement for each of the input data passing definition having the exclusive control specification. Perform output processing (steps S608 to S61)
0). Details of the input data delivery sentence output processing procedure in step S609 are shown in FIG. Further, the calling statement of the exclusive section end function is output (step S611), and finally, the input data passing statement output process is performed for each of the input data passing definitions without the exclusive control designation (step S6).
12 to S614).

【0047】ステップS613の入力データ受渡し文出
力処理手順の詳細は図7に示す。排他指定を持つものが
なければ、排他区間開始/終了関数の呼び出しを出力す
ることなく、データ受渡し定義のそれぞれについての図
12に示した入力データ受渡し文出力処理を行う(ステ
ップS612からS614)。図19に示した例の場
合、処理全体を排他とする指定が無く、ふたつの入力デ
ータ受渡しはいずれも排他制御指定があるので、これら
の入力データ受渡しのための代入文を、排他区間開始関
数呼出し文および終了関数呼出し文で囲んだコードが出
力される。
Details of the input data delivery sentence output processing procedure in step S613 are shown in FIG. If there is no one having an exclusive designation, the input data delivery statement output process shown in FIG. 12 for each of the data delivery definitions is performed without outputting the call of the exclusive section start / end function (steps S612 to S614). In the case of the example shown in FIG. 19, there is no designation that the entire process is exclusive, and since there is an exclusive control designation for both of the two input data transfers, the assignment statements for these input data transfers are exclusive section start functions. The code enclosed in the call statement and termination function call statement is output.

【0048】図6のステップS110の関数呼び出し部
は、データフロー図より生成される制御処理プログラム
82の関数を呼び出す部分で、この処理の流れは図8に
示す通りである。まず関数名を出力し(ステップS40
1)、続いて、呼び出し時の実引数を出力していく(ス
テップS402からステップS416)。
The function calling unit in step S110 in FIG. 6 is a part for calling the function of the control processing program 82 generated from the data flow diagram, and the flow of this processing is as shown in FIG. First, the function name is output (step S40
1) Then, the actual argument at the time of calling is output (step S402 to step S416).

【0049】実引数は、図16に示した処理側データの
引数に関する情報のそれぞれに対して、次のように決定
する。まず、この引数に対するデータ受け渡しに関する
情報を取得する(ステップS403)。この引数に対す
るデータ受け渡しで一時変数を用いるか否かを確認する
(ステップS404)。一時変数を用いる場合、次に処
理側データについて調べ、処理側データがポインタ型で
あれば処理側データ名にアドレス演算子を付与したもの
を実引数とし(ステップS406)、ポインタ型でなけ
れば処理側データ名そのものを実引数とする(ステップ
S407)。ここでは一時変数の名前を処理側データと
同じものとしているので、ステップS406およびステ
ップS407は、実引数に一時変数を用いていることに
なる。
The actual argument is determined as follows for each piece of information regarding the argument of the processing side data shown in FIG. First, information regarding data transfer for this argument is acquired (step S403). It is confirmed whether or not a temporary variable is used in data transfer for this argument (step S404). If a temporary variable is used, then the processing-side data is examined, and if the processing-side data is a pointer type, the processing-side data name with an address operator added is taken as the actual argument (step S406), and if not the pointer type The side data name itself is used as an actual argument (step S407). Since the name of the temporary variable is the same as the processing-side data here, it means that the temporary variable is used as the actual argument in steps S406 and S407.

【0050】データ受け渡しに一時変数を用いない場
合、次に処理側データと呼び出し側データのデータの型
の相違を調べる(ステップS408、ステップS41
0)。処理側データがポインタ型でなく呼び出し側デー
タがポインタ型の場合、呼び出し側データ名に間接演算
子を付与したものを実引数とし(ステップS409)、
処理側データがポインタ型で呼び出し側データがポイン
タ型でない場合、呼び出し側データ名にアドレス演算子
を付与したものを実引数とする(ステップS411)。
いずれでもない場合は、呼び出し側データ名そのものを
実引数とする(ステップS412)。つまり、一時変数
を用いない場合は、呼び出し側データを実引数に用い
る。
When the temporary variable is not used for data transfer, the difference between the data types of the processing side data and the calling side data is examined (steps S408 and S41).
0). When the processing side data is not the pointer type and the calling side data is the pointer type, the calling side data name to which the indirect operator is added is set as the actual argument (step S409),
When the processing-side data is the pointer type and the calling-side data is not the pointer type, the calling-side data name to which the address operator is added is used as the actual argument (step S411).
If neither, the caller data name itself is used as the actual argument (step S412). That is, when the temporary variable is not used, the calling side data is used as the actual argument.

【0051】図16、図18、図19に示すインタフェ
ース情報を例にとると、最初の引数in_xについて
は、このデータ受渡しに一時変数を用い、処理側データ
はポインタ型ではないので、処理側データ名即ち一時変
数名in_xを実引数とする(図8のステップS40
7)。次の引数in_yについても同様に、in_yを
実引数とする。最後の引数out_zについては、デー
タ受渡しに一時変数を用いず、処理側データはポインタ
型で呼出し側データはポインタ型ではないので、呼出し
側データ名にアドレス演算子を付与したもの、即ち&
(z)を実引数とする(図8のステップS411)。
Taking the interface information shown in FIGS. 16, 18, and 19 as an example, for the first argument in_x, a temporary variable is used for passing this data, and the processing-side data is not a pointer type, so the processing-side data is The name, that is, the temporary variable name in_x is used as the actual argument (step S40 in FIG.
7). Similarly, for the next argument in_y, in_y is the actual argument. For the last argument out_z, a temporary variable is not used for data transfer, the processing side data is a pointer type and the calling side data is not a pointer type, so the calling side data name is given an address operator, that is, &
Let (z) be the actual argument (step S411 in FIG. 8).

【0052】図6のステップS111の出力データ受渡
し部は、図1のデータフロー図より生成される制御処理
プログラム82の出力を外部で定義されたデータへ受け
渡すための代入文を置く部分であり、その出力処理手順
は図11に示す通りである。
The output data transfer unit of step S111 of FIG. 6 is a part for placing an assignment statement for transferring the output of the control processing program 82 generated from the data flow diagram of FIG. 1 to externally defined data. The output processing procedure is as shown in FIG.

【0053】以下、図11に従って説明する。まず、図
19に示すようなインタフェース情報において、処理全
体を排他とする指定の有無を調べる(ステップS70
1)。あれば、非返り値出力データ受渡し文出力処理
を、出力データ受渡し定義のそれぞれに対して行う(ス
テップS702からS704)。 ステップS703の
非返り値出力データ受渡し文出力処理の手順詳細は図1
2に示した。続いて排他区間終了関数の呼出し文を出力
(ステップS705)した後、図13に示す返り値出力
データ受渡し文出力処理(ステップS706)を、出力
データ受渡し定義のうち呼出し側がデータ関数の返り値
であるものに対して行う。
The following is a description with reference to FIG. First, in the interface information as shown in FIG. 19, it is checked whether or not the entire process is designated as exclusive (step S70).
1). If there is, a non-return value output data delivery statement output process is performed for each output data delivery definition (steps S702 to S704). The detailed procedure of the non-returned value output data delivery statement output process in step S703 is shown in FIG.
Shown in 2. Then, after outputting the call statement of the exclusive section end function (step S705), the return value output data delivery statement output process (step S706) shown in FIG. 13 is executed by the caller side of the output data delivery definition with the return value of the data function. Do for something.

【0054】図11のステップS701で、処理全体を
排他とする指定が無ければ、出力データ受渡しの定義で
排他制御指定を持つものがあるかどうかを調べる(ステ
ップS707)。ひとつでも排他制御指定を持つ出力デ
ータ受渡し定義があれば、まず排他区間開始関数の呼出
し文を出力し(ステップS708)、続いて、排他制御
指定を持つ出力データ受渡し定義のそれぞれについて図
12に示した非返り値出力データ受渡し文出力処理を行
い(ステップS709からS711)、排他区間終了関
数の呼出し文を出力し(ステップS712)、排他制御
指定の無い出力データ受渡し定義のそれぞれについて図
12に示した非返り値出力データ受渡し文出力処理を行
い(ステップS713からS715)、最後に図13に
示した返り値出力データ受渡し文出力処理を、出力デー
タ受渡し定義のうち呼出し側データが関数の返り値であ
るものに対して行う(ステップS706)。
If it is determined in step S701 in FIG. 11 that the entire process is not exclusive, it is checked whether or not there is an exclusive control specification in the output data transfer definition (step S707). If there is at least one output data transfer definition having the exclusive control specification, the call statement of the exclusive section start function is first output (step S708), and subsequently, the output data transfer definition having the exclusive control specification is shown in FIG. The non-return value output data passing statement output processing is performed (steps S709 to S711), the calling statement of the exclusive section end function is output (step S712), and the output data passing definition without exclusive control designation is shown in FIG. The non-return value output data delivery statement output processing is performed (steps S713 to S715), and finally the return value output data delivery statement output processing shown in FIG. 13 is performed, in which the caller data in the output data delivery definition is the return value of the function. Is performed (step S706).

【0055】出力データ受渡しの定義で排他制御指定を
持つものがなければ(ステップS707)、排他区間始
/終了関数の呼出しを出力することなく、出力データ受
渡し定義のそれぞれについて図12に示した非返り値出
力データ受渡し文出力処理を行い(ステップS713か
らS715)、その後図13に示した返り値出力データ
受渡し文出力処理を、出力データ受渡し定義のうち呼出
し側がデータ関数の返り値であるものに対して行う(ス
テップS706)。
If none of the output data delivery definitions has an exclusive control designation (step S707), the output data delivery definitions for each of the output data delivery definitions shown in FIG. The return value output data delivery statement output processing is performed (steps S713 to S715), and then the return value output data delivery statement output processing shown in FIG. 13 is performed on the output data delivery definition in which the calling side is the return value of the data function. (Step S706).

【0056】図19に示した例の場合、処理全体を排他
制御とする指定が無く、出力データ受渡しは排他制御指
定が無く、データ受渡しに一時変数を用いないので、出
力データ受渡し部には何も出力されない。
In the case of the example shown in FIG. 19, there is no designation of exclusive control for the entire process, there is no exclusive control designation for output data delivery, and no temporary variable is used for data delivery. Is not output.

【0057】最後に、図6、ステップS112の関数定
義のブロック終了記号を出力して、インタフェースプロ
グラム生成処理を完了する。以上のような手順を踏むこ
とで、インタフェースプログラム生成手段7は、図1
6、図18、図19に示したインタフェース情報に対し
て、図4に示すようなインタフェースプログラム83を
生成する。
Finally, the block end symbol of the function definition in step S112 in FIG. 6 is output, and the interface program generation process is completed. By following the procedure as described above, the interface program generating means 7
The interface program 83 as shown in FIG. 4 is generated with respect to the interface information shown in FIG.

【0058】このインタフェースプログラム83は、排
他制御が必要な呼出し側データへのアクセスを排他区間
の中で行って、得られたデータをデータフロー図から生
成された制御処理プログラム82に受渡し、また逆に、
制御処理プログラム82の出力データを、排他区間の中
で呼出し側データに受け渡す。そのため、データフロー
図から生成された制御処理プログラム82を、このイン
タフェースプログラム83を介して呼び出すことによ
り、排他制御を扱えないデータフロー図に基づいて自動
生成されたプログラムを、排他制御が必要な処理に対し
ても適用することができるようになる。
This interface program 83 accesses the data on the calling side that requires exclusive control in the exclusive section, and passes the obtained data to the control processing program 82 generated from the data flow diagram, and vice versa. To
The output data of the control processing program 82 is transferred to the calling side data in the exclusive section. Therefore, by calling the control processing program 82 generated from the data flow diagram through the interface program 83, the program automatically generated based on the data flow diagram that cannot handle the exclusive control is processed by the exclusive control. Will also be applicable to.

【0059】次に、図19と異なり、関数呼出しも含め
て排他区間とする場合について説明する。図20には、
図16に示した処理側関数形式、図18に示した呼出し
側関数形式に対して、処理全体を排他とする指定がなさ
れたデータ受渡し情報が示されている。この場合、デー
タ受渡しのそれぞれに対する排他制御指定は無いものと
判断される。
Next, different from FIG. 19, a case where a function call is included in an exclusive section will be described. In FIG. 20,
For the processing function format shown in FIG. 16 and the calling function format shown in FIG. 18, data transfer information designated to exclude the entire processing is shown. In this case, it is determined that there is no exclusive control designation for each data transfer.

【0060】インタフェースプログラム生成は、前記の
例と同様である。まず、一時変数要否チェックでは(図
6のステップS101)、呼出し側データxから処理側
データin_xへのデータ受渡しは、排他制御指定がな
く、入力に関するものなので、一時変数を用いないと判
断される(図9のステップS502、S506、S50
9)。呼出し側データyから処理側データin_yへの
データ受渡しも同様である。処理側データout_zか
ら呼出し側データzへのデータ受渡しは、排他制御指定
がなく、出力に関するもので、呼出し側は大域変数であ
るため、一時変数を用いない、と判断される(図9のス
テップS502、S506、S507、S509)。チ
ェックの結果は図15のようになる。
The interface program generation is the same as in the above example. First, in the temporary variable necessity check (step S101 in FIG. 6), since the data transfer from the calling side data x to the processing side data in_x is related to input without specifying the exclusive control, it is determined that the temporary variable is not used. (Steps S502, S506, S50 of FIG. 9)
9). The same applies to data transfer from the calling side data y to the processing side data in_y. Data passing from the processing side data out_z to the calling side data z is related to output without specifying the exclusive control, and since the calling side is a global variable, it is determined that the temporary variable is not used (step in FIG. 9). S502, S506, S507, S509). The result of the check is as shown in FIG.

【0061】次に、インタフェースプログラム83の関
数定義の開始部分の出力処理が行われ(図6のステップ
S102からステップS106まで)、続いて大域変数
宣言部出力処理、一時変数定義文出力処理が行われる。
図18の場合、大域変数が指定されているので、これら
についての宣言文が出力される。また、前記の一時変数
要否チェックの結果(図15)により、一時変数定義部
には何も出力されない。入力データ受渡し部出力処理
(図6のステップS109)では、図20で処理全体を
排他とする指定があるため、まず排他区間開始関数呼出
し文が出力される(図10のステップS601、S60
2)。その後、ふたつの入力データ受渡しに対する代入
文の生成を試みるが、これらはいずれも一時変数を用い
ないため、入力データ受渡しのための代入文は生成され
ない(図7のステップS301)。
Next, output processing of the start portion of the function definition of the interface program 83 is performed (from step S102 to step S106 in FIG. 6), followed by global variable declaration part output processing and temporary variable definition statement output processing. Be seen.
In the case of FIG. 18, since global variables are specified, declaration statements for these are output. In addition, as a result of the above-mentioned temporary variable necessity check (FIG. 15), nothing is output to the temporary variable definition part. In the input data delivery unit output process (step S109 in FIG. 6), the exclusion section start function call statement is first output because the entire process is specified to be exclusive in FIG. 20 (steps S601 and S60 in FIG. 10).
2). After that, an attempt is made to generate an assignment statement for passing two pieces of input data, but none of them uses a temporary variable, so an assignment statement for passing input data is not generated (step S301 in FIG. 7).

【0062】関数呼出し部出力処理(図6のステップS
110)では、引数in_x及びin_yについては、
いずれも一時変数を用いず、処理側データと呼出し側デ
ータの双方がポインタ型ではないので、呼出し側データ
名、即ちxおよびyを実引数とする(図8のステップS
404、S408、S410、S412)。引数out
_zについては、一時変数を用いず、処理側データがポ
インタ型で呼出し側データがポインタ型でないので、呼
出し側データ名にアドレス演算子を付与したもの、即ち
&(z)を実引数とする(ステップS404、S40
8、S410、S411)。
Function call section output processing (step S in FIG. 6)
110), for the arguments in_x and in_y,
Since neither of the processing side data and the calling side data is a pointer type, neither the temporary side variable is used, and the calling side data name, that is, x and y are used as actual arguments (step S in FIG. 8).
404, S408, S410, S412). Argument out
Regarding _z, since the processing side data is not a pointer type and the calling side data is not a pointer type without using a temporary variable, the calling side data name with an address operator, that is, & (z) is used as an actual argument ( Steps S404 and S40
8, S410, S411).

【0063】出力データ受渡し部出力処理(図6のステ
ップS111)では、図20で処理全体を排他とする指
定があるため、まず出力データ受渡しに対する代入文の
生成を試みるが、このデータ受渡しは呼出し側データは
返り値でなく、かつ一時変数を用いないため、出力デー
タ受渡しのための代入文は生成されない(図12のステ
ップS801、S802)。続いて排他区間終了関数呼
出し文が出力される(図11のステップS705)。
In the output data delivery unit output process (step S111 in FIG. 6), since the entire process is specified to be exclusive in FIG. 20, the assignment statement for the output data delivery is first tried, but this data delivery is called. Since the side data is not a return value and a temporary variable is not used, an assignment statement for passing output data is not generated (steps S801 and S802 in FIG. 12). Then, the exclusive section end function call statement is output (step S705 in FIG. 11).

【0064】最後に、関数定義のブロック終了記号を出
力して(図6のステップS112)、インタフェースプ
ログラム生成処理を完了する。以上のような手順を踏む
ことで、インタフェースプログラム生成手段7は、図1
6、図18、図20に示したインタフェース情報に対し
て、図5に示すようなインタフェースプログラム83を
生成する。このインタフェースプログラム83は、呼出
し側データへのアクセス及びデータフロー図から生成さ
れた制御処理プログラム82の呼び出しを、排他区間の
中で行う。そのため、このインタフェースプログラム8
3により、排他制御を扱えないデータフロー図に基づい
て自動生成されたプログラムを、排他制御が必要な処理
に対しても適用することができるようになる。
Finally, the block end symbol of the function definition is output (step S112 in FIG. 6) to complete the interface program generation process. By following the procedure as described above, the interface program generating means 7
An interface program 83 as shown in FIG. 5 is generated with respect to the interface information shown in FIG. The interface program 83 accesses the calling side data and calls the control processing program 82 generated from the data flow diagram in the exclusive section. Therefore, this interface program 8
According to 3, the program automatically generated based on the data flow diagram that cannot handle the exclusive control can be applied to the process that requires the exclusive control.

【0065】このように、データフロー図に基づいて自
動生成された制御処理プログラムについても人手による
プログラムの追加・修正作業なしで排他制御が可能とな
る。そのため、プログラム自動生成が徹底され、プログ
ラム生成時間が低減できるとともに、コーディングミス
の可能性が無くなり、開発工数の低減、若しくは開発期
間の短縮につながり、プログラムの開発効率が改善され
る。また、逆に、排他制御を含む制御仕様に対応できる
制御処理プログラムを自動生成する際に、簡便なデータ
フロー図形式で制御仕様を記述することが可能となるの
で、その意味での開発効率の改善にも寄与できる。な
お、ここでは制御仕様をデータフロー図で記述したもの
として説明したが、ステートフロー図を単独でもしくは
データフロー図と併用して制御仕様を記述した場合も本
実施の形態は共通で、且つ、同様な効果を奏することが
できる。
In this way, even for the control processing program automatically generated based on the data flow diagram, exclusive control can be performed without manually adding or correcting the program. Therefore, automatic program generation is thorough, the program generation time can be shortened, the possibility of coding mistakes is eliminated, leading to a reduction in development man-hours or a reduction in development period, thereby improving program development efficiency. On the other hand, when automatically generating a control processing program that can handle control specifications including exclusive control, it is possible to describe the control specifications in a simple data flow diagram format. It can also contribute to improvement. Although the control specification is described here as a data flow diagram, the present embodiment is common when the control specification is described alone or in combination with the data flow diagram, and Similar effects can be achieved.

【0066】[0066]

【発明の効果】この発明によれば、データフロー図の形
式で記述された制御仕様に基づき制御処理プログラムを
自動生成する制御処理プログラム生成手段、前記制御処
理プログラム自動生成手段で生成された制御処理プログ
ラムの関数インタフェース形式と、外部プログラムが前
記制御処理プログラムを呼び出す際の関数インタフェー
ス形式と、前記外部プログラムおよび前記制御処理プロ
グラムの間での、排他制御の有無の指定を含むデータの
受け渡しの定義とからなるインタフェース情報を記憶格
納するインタフェース情報記述部、前記インタフェース
情報記述部に記憶格納されているインタフェース情報に
基づきインタフェースプログラムを生成するインタフェ
ースプログラム生成手段、および前記外部プログラムと
前記制御処理プログラムと前記インタフェースプログラ
ムとをコンパイル・リンクして制御プログラムを自動生
成するコンパイル・リンク手段を備えたことを特徴とす
る制御ソフトウェア自動生成システムとしたので、この
システムの採用により、データフロー図に基づいて自動
生成された制御処理プログラムについても人手によるプ
ログラムの追加・修正作業なしで排他制御が可能とな
る。そのため、プログラム自動生成が徹底され、プログ
ラム生成時間が低減できるとともに、コーディングミス
の可能性が無くなり、開発工数の低減、若しくは開発期
間の短縮につながり、プログラムの開発効率が改善され
る。
According to the present invention, the control processing program generation means for automatically generating the control processing program based on the control specification described in the form of the data flow diagram, and the control processing generated by the control processing program automatic generation means. A function interface format of a program, a function interface format when an external program calls the control processing program, and a definition of data transfer including specification of exclusive control between the external program and the control processing program An interface information description section for storing and storing interface information consisting of, an interface program generating means for generating an interface program based on the interface information stored and stored in the interface information description section, the external program and the control processing program. The control software automatic generation system is characterized by comprising a compile / link means for compiling / linking the RAM and the interface program to automatically generate the control program. Even for the control processing program automatically generated, exclusive control can be performed without manually adding or modifying the program. Therefore, automatic program generation is thorough, the program generation time can be shortened, the possibility of coding mistakes is eliminated, leading to a reduction in development man-hours or a reduction in development period, thereby improving program development efficiency.

【0067】また、この発明によれば、データフロー図
の形式で記述された制御仕様に基づき制御処理プログラ
ムを自動生成する制御処理プログラム生成手段、前記制
御処理プログラム自動生成手段で生成された制御処理プ
ログラムの関数インタフェース形式と、外部プログラム
が前記制御処理プログラムを呼び出す際の関数インタフ
ェース形式と、前記外部プログラムおよび前記制御処理
プログラムの間での、排他制御の有無の指定を含むデー
タの受け渡しの定義とからなるインタフェース情報を記
憶格納するインタフェース情報記述部、前記インタフェ
ース情報記述部に記憶格納されているインタフェース情
報に基づきインタフェースプログラムを生成するインタ
フェースプログラム生成手段、および前記外部プログラ
ムと前記制御処理プログラムと前記インタフェースプロ
グラムとをコンパイル・リンクして制御プログラムを自
動生成するコンパイル・リンク手段を備えたことを特徴
とする制御ソフトウェア自動生成方法としたので、この
方法の採用により、データフロー図に基づいて自動生成
された制御処理プログラムについても人手によるプログ
ラムの追加・修正作業なしで排他制御が可能となる。そ
のため、プログラム自動生成が徹底され、プログラム生
成時間が低減できるとともに、コーディングミスの可能
性が無くなり、開発工数の低減、若しくは開発期間の短
縮につながり、プログラムの開発効率が改善される。
According to the present invention, the control processing program generating means for automatically generating the control processing program based on the control specifications described in the data flow diagram format, and the control processing generated by the control processing program automatic generating means. A function interface format of a program, a function interface format when an external program calls the control processing program, and a definition of data transfer including specification of exclusive control between the external program and the control processing program An interface information description part for storing and storing interface information consisting of, an interface program generating means for generating an interface program based on the interface information stored and stored in the interface information description part, the external program and the control process The control software automatic generation method is characterized by comprising compile / link means for compiling / linking the program and the interface program to automatically generate the control program. Even for the control processing program automatically generated, exclusive control can be performed without manually adding or modifying the program. Therefore, automatic program generation is thorough, the program generation time can be shortened, the possibility of coding mistakes is eliminated, leading to a reduction in development man-hours or a reduction in development period, thereby improving program development efficiency.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の実施の形態である制御ソフトウェア
自動生成システムの構成図である。
FIG. 1 is a configuration diagram of a control software automatic generation system according to an embodiment of the present invention.

【図2】 制御仕様を表すデータフロー図の例である。FIG. 2 is an example of a data flow diagram showing control specifications.

【図3】 データフロー図から生成されるプログラムコ
ードを示す図である。
FIG. 3 is a diagram showing a program code generated from a data flow diagram.

【図4】 外部データへのアクセスが排他区間で行われ
る必要がある場合に対処する、インタフェースプログラ
ムのコードを示す図である。
FIG. 4 is a diagram showing a code of an interface program for dealing with a case where access to external data needs to be performed in an exclusive section.

【図5】 制御処理そのものを含めて排他区間で行われ
る必要がある場合に対処する、インタフェースプログラ
ムのコードを示す図である。
FIG. 5 is a diagram showing a code of an interface program, which deals with the case where the control process itself needs to be performed in an exclusive section.

【図6】 インタフェースプログラム生成処理手順を示
すフロー図である。
FIG. 6 is a flowchart showing an interface program generation processing procedure.

【図7】 インタフェースプログラム中の入力データ受
渡し部を構成する入力データ受渡し文の出力処理手順を
示すフロー図である。
FIG. 7 is a flowchart showing an output processing procedure of an input data transfer statement that constitutes an input data transfer unit in the interface program.

【図8】 インタフェースプログラム中で、データフロ
ー図から生成された制御プログラム関数を呼び出す部分
の出力処理手順を示すフロー図である。
FIG. 8 is a flow chart showing an output processing procedure of a portion that calls a control program function generated from the data flow chart in the interface program.

【図9】 排他制御への対処が可能なインタフェースプ
ログラムを生成する際の、一時変数要否チェック処理手
順を示すフロー図である。
FIG. 9 is a flowchart showing a procedure for checking the necessity of a temporary variable when an interface program capable of dealing with exclusive control is generated.

【図10】 排他制御への対処が可能なインタフェース
プログラムを生成する際の、入力データ受渡し部の出力
処理手順を示すフロー図である。
FIG. 10 is a flowchart showing an output processing procedure of an input data transfer unit when an interface program capable of dealing with exclusive control is generated.

【図11】 排他制御への対処が可能なインタフェース
プログラムを生成する際の、出力データ受渡し部の出力
処理手順を示すフロー図である。
FIG. 11 is a flowchart showing an output processing procedure of an output data transfer unit when an interface program capable of dealing with exclusive control is generated.

【図12】 返り値でない出力データに対するデータ受
渡し文の出力処理手順を示すフロー図である。
FIG. 12 is a flowchart showing an output processing procedure of a data transfer statement for output data that is not a return value.

【図13】 返り値である出力データに対するデータ受
渡し文の出力処理手順を示すフロー図である。
FIG. 13 is a flowchart showing an output processing procedure of a data transfer statement for output data which is a return value.

【図14】 外部データへのアクセスが排他区間で行わ
れる必要がある場合の、一時変数要否チェックの結果を
反映した、インタフェース情報記述部の内容を示す図で
ある。
FIG. 14 is a diagram showing the contents of an interface information description part, which reflects the result of the temporary variable necessity check when external data needs to be accessed in an exclusive section.

【図15】 制御処理そのものを含めて排他区間で行わ
れる必要がある場合の、一時変数要否チェックの結果を
反映した、インタフェース情報記述部の内容を示す図で
ある。
FIG. 15 is a diagram showing the contents of the interface information description part, which reflects the result of the temporary variable necessity check when the control process itself needs to be performed in the exclusive section.

【図16】 インタフェース情報記述部の内容のうち、
データフロー図から生成される関数のインタフェース形
式に関する情報を示す図である。
FIG. 16 is a block diagram showing the contents of the interface information description part
It is a figure which shows the information regarding the interface format of the function produced | generated from the data flow diagram.

【図17】 インタフェース情報記述部の内容のうち、
データフロー図から生成されるプログラムの呼出し形式
が、外部プログラムからの呼出し形式と異なる場合の、
外部プログラムからの呼び出し形式に関する情報を示す
図である。
FIG. 17 shows the contents of the interface information description part
When the calling format of the program generated from the data flow diagram is different from the calling format from the external program,
It is a figure which shows the information regarding the calling format from an external program.

【図18】 インタフェース情報記述部の内容のうち、
外部データへのアクセスが排他区間で行われる必要があ
る場合の、外部プログラムからの呼び出し形式に関する
情報を示す図である。
[Fig. 18] Of the contents of the interface information description part,
It is a figure which shows the information regarding the calling format from an external program, when access to external data needs to be performed in an exclusive section.

【図19】 インタフェース情報記述部の内容のうち、
外部データへのアクセスが排他区間で行われる必要があ
る場合の、データ受渡しに関する情報を示す図である。
FIG. 19 shows the contents of the interface information description part
It is a figure which shows the information regarding data delivery when access to external data needs to be performed in an exclusive section.

【図20】 インタフェース情報記述部の内容のうち、
制御処理そのものを含めて排他区間で行われる必要があ
る場合の、データ受渡しに関する情報を示す図である。
[Fig. 20] Of the contents of the interface information description part,
It is a figure which shows the information regarding data delivery in the case where it is necessary to perform in the exclusive section including the control processing itself.

【図21】 排他制御が必要な制御プログラムの構造を
示す図である。
FIG. 21 is a diagram showing the structure of a control program that requires exclusive control.

【図22】 本発明による排他制御処理を伴うインタフ
ェースプログラムが組み込まれた制御プログラムの構造
を示す図である。
FIG. 22 is a diagram showing the structure of a control program in which an interface program involving exclusive control processing according to the present invention is incorporated.

【図23】 従来方法によるデータフロー図形式で記述
された制御仕様に基づき制御プログラムを自動生成する
手順を示す図である。
FIG. 23 is a diagram showing a procedure for automatically generating a control program based on a control specification described in a data flow diagram format by a conventional method.

【図24】 本発明によるデータフロー図形式で記述さ
れた制御仕様に基づき制御プログラムを自動生成する手
順を示す図である。
FIG. 24 is a diagram showing a procedure for automatically generating a control program based on a control specification described in a data flow diagram format according to the present invention.

【符号の説明】[Explanation of symbols]

1 制御ソフトウェア自動生成システム、2 入力手
段、3 出力手段、4 制御仕様設計手段、5 制御処
理プログラム生成手段、6 インタフェース情報既述
部、7 インタフェースプログラム生成手段、8 プロ
グラム記憶格納部、9コンパイル/リンク手段、81
外部プログラム、82 制御処理プログラム、83 イ
ンタフェースプログラム 84 制御プログラム、100 タスクa 、110
制御処理A、120 インタフェースプログラムa 、
200 タスクb 、210 制御処理B、220 イ
ンタフェースプログラムb、300 OS/タスク管理
プログラム、400 共有データ、 500 タスク同
期サービス
1 automatic control software generation system, 2 input means, 3 output means, 4 control specification design means, 5 control processing program generation means, 6 interface information description section, 7 interface program generation section, 8 program storage section, 9 compile / Linking means, 81
External program, 82 control processing program, 83 interface program 84 control program, 100 task a, 110
Control process A, 120 interface program a,
200 task b, 210 control process B, 220 interface program b, 300 OS / task management program, 400 shared data, 500 task synchronization service

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B076 DC09 DD04 DE01 DF09 5H215 AA10 BB10 CC07 CX02 GG04 HH01    ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 5B076 DC09 DD04 DE01 DF09                 5H215 AA10 BB10 CC07 CX02 GG04                       HH01

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 データフロー図の形式で記述された制御
仕様に基づき制御処理プログラムを自動生成する制御処
理プログラム生成手段、前記制御処理プログラム自動生
成手段で生成された制御処理プログラムの関数インタフ
ェース形式と、外部プログラムが前記制御処理プログラ
ムを呼び出す際の関数インタフェース形式と、前記外部
プログラムおよび前記制御処理プログラムの間での、排
他制御の有無の指定を含むデータの受け渡しの定義とか
らなるインタフェース情報を記憶格納するインタフェー
ス情報記述部、前記インタフェース情報記述部に記憶格
納されているインタフェース情報に基づきインタフェー
スプログラムを生成するインタフェースプログラム生成
手段、および前記外部プログラムと前記制御処理プログ
ラムと前記インタフェースプログラムとをコンパイル・
リンクして制御プログラムを自動生成するコンパイル・
リンク手段を備えたことを特徴とする制御ソフトウェア
自動生成システム。
1. A control processing program generating means for automatically generating a control processing program based on a control specification described in a data flow diagram format, and a function interface format of the control processing program generated by the control processing program automatic generating means. Storing interface information consisting of a function interface format when an external program calls the control processing program and a definition of data transfer between the external program and the control processing program including designation of the presence or absence of exclusive control An interface information description section to be stored, an interface program generation means for generating an interface program based on the interface information stored and stored in the interface information description section, the external program, the control processing program, and the interface. Compile with
Compile to link and automatically generate control program
A control software automatic generation system characterized by comprising link means.
【請求項2】 データフロー図の形式で記述された制御
仕様に基づき制御処理プログラムを自動生成する制御処
理プログラム生成手段、前記制御処理プログラム自動生
成手段で生成された制御処理プログラムの関数インタフ
ェース形式と、外部プログラムが前記制御処理プログラ
ムを呼び出す際の関数インタフェース形式と、前記外部
プログラムおよび前記制御処理プログラムの間での、排
他制御の有無の指定を含むデータの受け渡しの定義とか
らなるインタフェース情報を記憶格納するインタフェー
ス情報記述部、前記インタフェース情報記述部に記憶格
納されているインタフェース情報に基づきインタフェー
スプログラムを生成するインタフェースプログラム生成
手段、および前記外部プログラムと前記制御処理プログ
ラムと前記インタフェースプログラムとをコンパイル・
リンクして制御プログラムを自動生成するコンパイル・
リンク手段を備えたことを特徴とする制御ソフトウェア
自動生成方法。
2. A control processing program generation means for automatically generating a control processing program based on a control specification described in a data flow diagram format, and a function interface format of the control processing program generated by said control processing program automatic generation means. Storing interface information consisting of a function interface format when an external program calls the control processing program and a definition of data transfer between the external program and the control processing program including designation of the presence or absence of exclusive control An interface information description section to be stored, an interface program generation means for generating an interface program based on the interface information stored and stored in the interface information description section, the external program, the control processing program, and the interface. Compile with
Compile to link and automatically generate control program
A control software automatic generation method comprising a link means.
JP2001268683A 2001-09-05 2001-09-05 System and method for automatically generating control software Pending JP2003076547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001268683A JP2003076547A (en) 2001-09-05 2001-09-05 System and method for automatically generating control software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001268683A JP2003076547A (en) 2001-09-05 2001-09-05 System and method for automatically generating control software

Publications (1)

Publication Number Publication Date
JP2003076547A true JP2003076547A (en) 2003-03-14

Family

ID=19094627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001268683A Pending JP2003076547A (en) 2001-09-05 2001-09-05 System and method for automatically generating control software

Country Status (1)

Country Link
JP (1) JP2003076547A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338660A (en) * 2005-05-30 2006-12-14 Honda Research Inst Europe Gmbh Method for developing parallel/distributed application
JP2009193182A (en) * 2008-02-13 2009-08-27 Meidensha Corp Software development support system, support method, and program
CN111158796A (en) * 2019-12-25 2020-05-15 中国航空工业集团公司西安飞机设计研究所 Data processing method of hydraulic control software

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338660A (en) * 2005-05-30 2006-12-14 Honda Research Inst Europe Gmbh Method for developing parallel/distributed application
JP2009193182A (en) * 2008-02-13 2009-08-27 Meidensha Corp Software development support system, support method, and program
CN111158796A (en) * 2019-12-25 2020-05-15 中国航空工业集团公司西安飞机设计研究所 Data processing method of hydraulic control software
CN111158796B (en) * 2019-12-25 2023-05-23 中国航空工业集团公司西安飞机设计研究所 Data processing method of hydraulic control software

Similar Documents

Publication Publication Date Title
JP2666847B2 (en) Heterogeneous language communication method
US7610475B2 (en) Programmable logic configuration for instruction extensions
US5291427A (en) Method for assisting the development of a set of communicating automata
JPH09259153A (en) Device and method for generating batch execution control program
US11126408B2 (en) Incremental code generation method
JP2003076547A (en) System and method for automatically generating control software
JPH01118931A (en) Program conversion system
JP2002268896A (en) Method and device for generating control program
US5765148A (en) Database processing apparatus and database processing method for variable length objects, and computer-readable memory medium for storing database processing program
CN114879593B (en) Method, device and equipment for operating PLC (programmable logic controller) in real-time system and storage medium
JPH09282174A (en) Program execution method
JPH11242598A (en) Compiling method and device, object program executing method and device and program storage medium
JP2002312167A (en) Program for making computer calculate value of variable, compile program, variable value determining method, and program generating method
JP2841363B2 (en) External module acquisition method
Mailund et al. Generic Dynamic Arrays
JP2001142719A (en) Compiler device and recording medium with recorded compiler program
JPS6139134A (en) Program converting method
JP2022023631A (en) Assembly instruction conversion program, assembly instruction conversion method, and information processing apparatus
JP3424596B2 (en) Method and apparatus for caching symbol reference information
JP2021033877A (en) Simulation device and simulation method
JPH02236732A (en) Source program generating system
JP2009245194A (en) Programmable controller, programmable controller support apparatus, and programmable controller system
JPH0390931A (en) Generation of rom transformation program
JPH03229327A (en) Computer program executing system
JPH06266562A (en) Object code size optimizing system in object-oriented language processing system

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040708