JP3102030B2 - Program creation device - Google Patents

Program creation device

Info

Publication number
JP3102030B2
JP3102030B2 JP02337781A JP33778190A JP3102030B2 JP 3102030 B2 JP3102030 B2 JP 3102030B2 JP 02337781 A JP02337781 A JP 02337781A JP 33778190 A JP33778190 A JP 33778190A JP 3102030 B2 JP3102030 B2 JP 3102030B2
Authority
JP
Japan
Prior art keywords
program
processing
message
control
branch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP02337781A
Other languages
Japanese (ja)
Other versions
JPH04205423A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP02337781A priority Critical patent/JP3102030B2/en
Publication of JPH04205423A publication Critical patent/JPH04205423A/en
Application granted granted Critical
Publication of JP3102030B2 publication Critical patent/JP3102030B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は実時間ソフトウエアの記述を効率良く行うこ
との可能なプログラム作成装置に関するものである。更
に詳しくは、本発明は複数のタスクを単一あるいは複数
のマイクロプロセッサによって並列処理させるための並
列処理プログラムを同一画面上において効率良く簡単に
作成可能なプログラク作成装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a program creating apparatus capable of efficiently describing real-time software. More specifically, the present invention relates to a program creation device capable of efficiently and easily creating a parallel processing program for causing a plurality of tasks to be processed in parallel by a single or a plurality of microprocessors on the same screen.

〔従来の技術〕[Conventional technology]

制御機器制御、通信制御等の目的で搭載されるソフト
ウエアは、概念的に言えば、ソフトウエアの内側と制御
対象の外界とが必ず存在し、外界に対して何らかの相互
関係を保ちながら動作を行うものである。そして、外界
に何らかの変化が起きたときには、ある限られた時間の
中でそれに対する処理を行う必要がある。このように、
規定された時間内に所定の処理を遂行しなければならな
い性格のソフトウエアを実時間ソフトウエアと呼んでい
る。このような実時間ソフトウエアのうち、外界からの
入力としてある刺激を受け、これに対して処理を行うと
いう系列で処理を実行していくソフトウエアは、離散的
事象駆動型実時間ソフトウエアと呼ばれており、いわゆ
るマイクロプロセッサが組み込まれている制御機器のソ
フトウエアは通常はこの範疇に入るものである。
Conceptually speaking, software installed for the purpose of control device control, communication control, etc. always has the inside of the software and the outside world to be controlled, and operates while maintaining some mutual relationship with the outside world. Is what you do. When any change occurs in the outside world, it is necessary to perform processing for the change within a limited time. in this way,
Software that is required to perform a predetermined process within a specified time is called real-time software. Among such real-time software, software that receives a stimulus as an input from the outside world and performs processing in a series of performing processing on the stimulus is a discrete event-driven real-time software. That is, the software of a control device incorporating a so-called microprocessor is usually included in this category.

近年、ソフトウエア工学の発展により、構造化プログ
ラミング言語、高水準言語等を利用して効率よくソフト
ウエアを作成する手法が提案されており、これらはソフ
トウエハ全般に渡って適用可能な手法である。しかしな
がら、上記の離散的事象駆動型実時間ソフトウエアはそ
の他のソフトウエアに比べて特別な性格を有しており、
ソフトウエア全般に渡って適用可能な作成手法の他に
も、かかるソフトウエアの作成を効率良く簡単に行うた
めの改良の余地が依然として残っている。
In recent years, with the development of software engineering, techniques for efficiently creating software using structured programming languages, high-level languages, etc., have been proposed, and these are techniques that can be applied to all software wafers. . However, the discrete event-driven real-time software described above has special characteristics compared to other software,
In addition to the creation method applicable to the entire software, there is still room for improvement for efficiently and easily creating such software.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

すなわち、かかる離散的事象駆動型実時間ソフトウエ
アは、製造ライン上に配置された複数の作業用ロボット
の駆動用ソフトウエアに代表されるように、ローカルエ
リアネットワーク上で並列して動作する複数のプロセス
を記述する必要がある。しかしながら、いままで行われ
ているこのようなソフトウエアは、ある一つのプログラ
ミング言語を用いてCRT上で1ステップづつ記述するこ
とによってプログラムされる。このような作成方法で
は、並列動作する複数のプロセスをそれぞれ個別に作成
し、しかる後に作成したプロセスが各マイクロプロセッ
サ上で並列動作状態で実行されるように、これらの個別
作成したプロセスを合成する必要がある。
That is, such discrete event-driven real-time software includes a plurality of operating software operating in parallel on a local area network, as represented by software for driving a plurality of working robots arranged on a production line. You need to describe the process. However, such conventional software is programmed by describing one step at a time on a CRT using a certain programming language. In such a creation method, a plurality of processes that operate in parallel are individually created, and then the individually created processes are combined so that the created process is executed in a parallel operation state on each microprocessor. There is a need.

しかし、このようにして並列処理される複数のプロセ
スをプログラミングしていたのでは、プログラム作成者
は、制御の全体的な流れと、個別的にマイクロプロセッ
サによって実行される制御の流れとを正確に認識するこ
とが困難であり、これらの整合性をとることが困難であ
る。このために、効率良く目標とするプログラムを作成
することが困難な場合が多い。
However, by programming multiple processes to be processed in parallel in this way, the program creator must accurately define the overall flow of control and the flow of control performed individually by the microprocessor. It is difficult to recognize, and it is difficult to ensure their consistency. For this reason, it is often difficult to efficiently create a target program.

本発明の課題は、上記の点に鑑みて、このような離散
的事象駆動型実時間ソフトウエアの作成を効率良く簡単
に行うことの可能なプログラム作成装置を実現すること
にある。
In view of the above, an object of the present invention is to realize a program creating apparatus capable of efficiently and easily creating such discrete event driven real-time software.

〔課題を解決するための手段〕[Means for solving the problem]

本発明者は、以上のような背景のもとに、離散的事象
駆動型実時間ソフトウエアの記述に適した言語およびそ
のための開発支援環境を実現した。以後、この言語をプ
ラネット(PLANET)と呼ぶものとする。このプラネット
を用いた本発明のプログラム作成装置においては、プロ
セスの並列動作、同期等の諸用件をペトリネットにもと
づく記述形式で表現可能としている。また、プログラミ
ングの全てにわたって図式を導入可能とし、処理用件の
記述性、了解性の向上を図っている。
Based on the above background, the present inventor has realized a language suitable for describing discrete event-driven real-time software and a development support environment therefor. Hereinafter, this language is called a planet (PLANET). In the program creating apparatus of the present invention using this planet, various requirements such as parallel operation and synchronization of processes can be expressed in a description format based on Petri nets. In addition, a diagram can be introduced throughout the entire programming to improve the descriptiveness and intelligibility of processing requirements.

すなわち、本発明は、ネットワーク上の複数の制御主
体によって並列処理されるプログラムを作成するための
ログラム作成装置において、複数の制御主体を含むネッ
トワークのハードウエア情報を保持したハードウエア情
報保持手段と、プログラム作成領域を一枚の画面として
表示する画面表示手段と、前記表示画面上においてプロ
グラムを作成するプログラム作成手段と、作成されたプ
ログラムを機械語に翻訳する翻訳手段と、翻訳された機
械語からなるプログラムを記憶する記憶手段とから基本
的に構成されている。
That is, the present invention provides a program creation device for creating a program that is processed in parallel by a plurality of control entities on a network, wherein the hardware information holding means holds hardware information of a network including the plurality of control entities, Screen display means for displaying the program creation area as one screen, program creation means for creating a program on the display screen, translation means for translating the created program into machine language, and Storage means for storing a program.

上記のプログラム作成手段は、プラネットの言語要素
である、プログラムの時系列的に処理される各処理の内
容を表示する複数種類の図面パターンを発生可能なプロ
グラム作成用図形パターン発生手段と、上記のハードウ
エア情報をプログラム作成用の一枚の表示画面上に入力
可能なハードウエア情報入力手段と、図形パターンを順
次に選択してプログラム表示画面上に表示するパターン
選択手段とを備えている。プログラム言語要素である図
面パターンは、処理内容を示す複数種類の図形パターン
と、処理用件の時系列的な流れ方向を示す有向枝と、少
なくとも二股に分岐し、時系列的に後続する処理要件が
並列処理されるべきものであることを示す第1の分岐有
向枝と、少なくとも二股に分岐した分岐枝が纏まって後
続の処理要件が複数の先行する処理要件終了の同期をと
って処理される処理動作であることを示す第2の分岐有
向枝とを含んでいる。
The above-mentioned program creating means is a language element of the planet, and a graphic pattern generating means for creating a program capable of generating a plurality of types of drawing patterns for displaying the contents of each processing performed in time series of the program; It is provided with hardware information input means capable of inputting hardware information on one display screen for creating a program, and pattern selection means for sequentially selecting graphic patterns and displaying them on the program display screen. A drawing pattern, which is a programming language element, includes a plurality of types of graphic patterns indicating processing contents, a directed branch indicating a chronological flow direction of a processing object, and at least two branches, and a chronologically succeeding processing. A first directed branch indicating that the requirement is to be processed in parallel, and at least a forked bifurcated branch are combined so that subsequent processing requirements are processed in synchronization with completion of a plurality of preceding processing requirements. And a second directional branch that indicates the processing operation to be performed.

一方、翻訳手段は、ハードウエア情報保持手段から得
られる情報に基づき、第1の分岐有向枝に後続する複数
の処理要素列のそれぞれを、複数の制御主体のそれぞれ
により並列処理されるプログラムとして分類して割り当
てる並列処理プログラム割当手段を有しており、操作者
が一枚の画面上に作成したプログラムが、この手段によ
って、自動的に各制御手段毎に分類されて、これらの制
御主体に割当られる。
On the other hand, the translating means converts, based on the information obtained from the hardware information holding means, each of the plurality of processing element sequences following the first directional branch into a program which is processed in parallel by each of the plurality of control entities. It has a parallel processing program allocating means for categorizing and allocating, and the program created by the operator on one screen is automatically classified for each control means by this means, and is assigned to these control subjects. Assigned.

〔作用〕[Action]

本発明のプログラム作成装置においては、プログラム
作成者は、画面表示手段によって表示されているプログ
ラム作成用の一枚の画面に対して、パターン選択手段に
より、処理要件を示す図形パターンと、有向枝あるいは
分岐有向枝とを交互に選択するという操作を繰り返し
て、プログラムを、同一画面上に作成できる。ここに、
画面表示手段により複数の画面を表示可能の場合には、
同一画面上に作成したプログラムの処理要素の下位階層
側プログラムは、その処理要素の下位階層として規定さ
れた別の一枚の画面上に作成することができる。
In the program creation device of the present invention, the program creator uses the pattern selection means to display a graphic pattern indicating processing requirements and a directed branch on one program creation screen displayed by the screen display means. Alternatively, the program can be created on the same screen by repeating the operation of alternately selecting the directional branch. here,
If multiple screens can be displayed by the screen display means,
The lower layer program of the processing element of the program created on the same screen can be created on another screen defined as the lower layer of the processing element.

このようにして作成されたプログラムは、翻訳手段に
よって、マイクロプロセサを実際に駆動可能な機械語か
ら構成されるログラムに変換される。この翻訳手段にお
ける変換処理においては、プログラム言語である有向枝
および二股状の有向枝で結合されている並行処理される
処理要素群を、ハードウエア情報に基づき、各制御主体
毎のプログラムに分類して、対応する制御主体に割りつ
ける。このように、本発明においては、並列処理される
プログラムを同一画面上において簡単に作成することが
できる。
The program created in this way is converted by the translation means into a program composed of a machine language that can actually drive the microprocessor. In the conversion processing by the translation means, a group of processing elements to be processed in parallel connected by a directional branch and a bifurcated directional branch, which are program languages, are converted into a program for each control entity based on hardware information. Classify and assign to the corresponding control entity. Thus, in the present invention, a program to be processed in parallel can be easily created on the same screen.

作成されたプログラムはデバッガ手段によってデバッ
グされる。このデバッグ手段により、作成時と同一の画
面が再生表示され、この画面上においてデバッグを行う
ことができる。なお、デバッグされた後のプログラム
は、例えばROMなどの記憶媒体内に格納されて、実際の
処理装置上で走行されることになる。
The created program is debugged by debugger means. By this debugging means, the same screen as at the time of creation is reproduced and displayed, and debugging can be performed on this screen. The program after the debugging is stored in a storage medium such as a ROM, for example, and is run on an actual processing device.

〔実施例〕〔Example〕

以下に、本発明の実施例を説明する。 Hereinafter, examples of the present invention will be described.

まず、本明細書によって新たに開発された実時間制御
ソフトウエアに記述に適したプログラム言語プラネット
(PLANET)の内容を説明する。
First, the contents of the programming language Planet (PLANET) suitable for description in the real-time control software newly developed according to the present specification will be described.

このプラネットでは、制御実体(外界からの入力事象
と内部処理を規定して分割されたタスク)群と制御実体
との相互関係でソフトウエアを構成している。さらに、
制御実体の内部処理に含まれるプロセスの並列動作、同
期等の諸用件をペトリネットにもとづく記述形式で表現
する。この際、プログラミングの全てにわたって図式を
導入することで、処理用件の記述性、了解性の向上を図
っている。
In this planet, software is configured by a mutual relationship between a control entity (a task divided by defining an input event from the outside world and internal processing) and the control entity. further,
Various requirements such as parallel operation and synchronization of processes included in the internal processing of the control entity are expressed in a description format based on Petri nets. At this time, by introducing a diagram throughout the programming, the description and understanding of the processing requirements are improved.

プラネットによる記述形式 実時間制御システムには、入力群(各種センサ群)/
出力群(アクチュエータ群)並びに通信路が結合されて
いる。多数の入出力をもつ比較的大規模なシステムで
は、機能ごとに入出力群が分割されている。分割された
各入出力群ごとに制御を行うモジュール(タスク)がシ
ステム内に複数存在し、これらのモジュールのやり取り
でシステムを記述するという手法が従来から適用されて
いる。このように外界からの入力事象と内部処理が規定
されており、独立性があり、駆動されればシステム中に
継続して存在する機能モジュールを、プラネットでは制
御実体あるいはサブシステムと称している。さらに制御
実体同士のやり取りをメッセージ送受信で行うものとし
ている。
Description format by planet The real-time control system has input groups (various sensor groups) /
An output group (actuator group) and a communication path are connected. In a relatively large-scale system having many inputs / outputs, an input / output group is divided for each function. Conventionally, a method has been applied in which a system has a plurality of modules (tasks) for controlling each divided input / output group, and the system is described by exchanging these modules. In this manner, the input event from the outside world and the internal processing are defined, and the function modules which are independent and continue to exist in the system when driven are referred to as control entities or subsystems in Planet. Further, the exchange between the control entities is performed by transmitting and receiving messages.

(制御実体のモデル化) 上記したように分割された制御実体の動作は、第1図
に示すモデルで表現できる。この図において、入力事象
集合Eは、制御実体が関与する各種センサおよび時間情
報の有限集合であり、時間の経過に伴ってeiからセンサ
等の状態遷移項目がストリーム的に入力される。入力メ
ッセージ集合Miは、制御実体にストリーム的に入力する
メッセージの集合である。内部状態保持集合Sは制御実
体の内部状態を表現するベクトルである。出力要素集合
Oは制御実体が関与する各種アクチュエータを駆動する
要素の集合、出力メッセージ集合は制御実体からストリ
ーム的に出力されるメッセージの集合である。出力メッ
セージは他の制御実体の入力メッセージになる。この結
合はネットワークを介してもよい。更に、入力事象集合
E、入力メッセージ集合Mi、および内部状態集合Sに基
づき、出力要件集合O、出力メッセージ集合Moを規定す
るF、Gなる写像が存在し、これらが制御実体の内部処
理を規定する。すなわち、第1図は刻々と変化するセン
サの状態(E)を監視し、外部から到達したメッセージ
(Mi)を受理し、内部状態(S)を更新しながら入力に
見合った出力要件(O)、出力メッセージ(Mo)を生成
する制御実体の動作を表現している。
(Modeling of Control Entity) The operation of the control entity divided as described above can be represented by a model shown in FIG. In this figure, an input event set E is a finite set of various sensors and time information related to the control entity, and state transition items such as sensors are input from ei in a stream as time elapses. The input message set Mi is a set of messages input to the control entity in a stream. The internal state holding set S is a vector expressing the internal state of the control entity. The output element set O is a set of elements for driving various actuators involving the control entity, and the output message set is a set of messages output in a stream from the control entity. The output message becomes the input message of another control entity. This coupling may be via a network. Further, based on the input event set E, the input message set Mi, and the internal state set S, there are mappings F and G that define an output requirement set O and an output message set Mo, and these define the internal processing of the control entity. I do. That is, FIG. 1 monitors the ever-changing state (E) of the sensor, receives a message (Mi) arriving from the outside, updates the internal state (S), and updates the output condition (O) corresponding to the input. , The operation of the control entity that generates the output message (Mo).

第2図は、ある組み込み産業機械の動作の簡単な部分
をプラネットで記述した例である。ここでは、産業機械
の動作が、「console」、「conveyor」、「assembl
y」、「partsmanager」、[measurementsystem」と命名
された5つの制御実体に分割されて、これら制御実体の
相互関係がそれぞれの視点から記述されている。すなわ
ち、矩形で囲まれた「console」、「conveyor」、「ass
embly」、「partsmanager」、[measurementsystem」が
各制御実体を表現しており、矩形図形の上辺、下辺に記
述されている「begin」、「pallet」等の制御実体に入
出力するメッセージの端子を表現している。更に、メッ
セージ端子は有向枝によって結合され、更新するメッセ
ージの方向が矢印の向きによって規定されている。制御
実体は「begin」という特別な名前の入力端子にメッセ
ージが到達したときに駆動され、制御実体の内部処理お
よびメッセージ送受信機能が動作を開始する。メッセー
ジは制御実体が送信操作を行う毎に出力され、有向枝を
パイプライン状にFIFO管理がなされて交信する。
FIG. 2 is an example in which a simple part of the operation of a certain embedded industrial machine is described by a planet. Here, the operation of the industrial machine is "console", "conveyor", "assembl"
It is divided into five control entities named "y", "partsmanager", and [measurementsystem], and the interrelationship of these control entities is described from each viewpoint. That is, "console", "conveyor", "ass
"embly", "partsmanager", and "measurementsystem" represent each control entity. expressing. Further, the message terminals are connected by directional branches, and the direction of the message to be updated is defined by the direction of the arrow. The control entity is activated when a message arrives at an input terminal with a special name "begin", and the internal processing of the control entity and the message transmission / reception function start operating. The message is output each time the control entity performs a transmission operation, and the directional branches are communicated by FIFO management in a pipeline manner.

第2図に記述されている処理要件は以下の通りであ
る。「console」という制御盤をモニタする制御実体か
ら出力される開始要求によって、「conveyor」、「asse
mbly」、「partsmanager」、[measurementsystem」の
四つの制御実体が駆動される。「conveyor」が運んでき
た入力パレットに、「partsmaneger」が供給する部品が
「assembly」によって組み込まれ、「measurementsyste
m」を経由して「conveyor」がそれを運び出す。これと
同時に、「measurementsystem」が入力するパレットを
受理して出力した測定データを、組み込み産業機械外部
に送出する。「partsmanager」が部品不足を検出したら
「console」に警告を発行する。このように制御実体の
やり取りを視点別に鳥瞰図的に見ることができるので、
記述内容が理解しやすい。
The processing requirements described in FIG. 2 are as follows. According to the start request output from the control entity that monitors the control panel called "console", "conveyor", "asse
Four control entities of “mbly”, “partsmanager”, and “measurementsystem” are driven. The parts supplied by "partsmaneger" are incorporated by "assembly" into the input pallet carried by "conveyor", and "measurementsyste
The "conveyor" carries it out via the "m". At the same time, the pallet input by the "measurement system" is received and output, and the measurement data is sent out of the built-in industrial machine. If "partsmanager" detects a shortage of parts, it issues a warning to "console". In this way, the exchange of control entities can be seen in a bird's-eye view for each viewpoint,
The description is easy to understand.

(有向グラフによるシーケンス記述) 次に、制御実体の内部処理について、その構成手段を
述べる。内部処理の動作仕様において、経験上、「○が
○の状態にあるとき、●が●すれば、◎を◎し、□が□
の状態に移行する」という断片的な宣言がよく用いられ
る。この表現は、○○が事象入力前の制御実体の内部状
態(処理前状態)、●●が入力事象、◎◎が活動要件
(応答)、□□が処理の制御実体の内部状態(処理後状
態)をそれぞれ意味している。この四つの事柄で表現さ
れるモデルを一般に刺激応答モデルと称している。この
宣言の個々の内容は極く単純なものであり、容易に実現
することが可能である。ところが実時間制御ソフトウエ
アの性格上、入力事象は非同期に複数発生し、内部状態
によって検出すべき事象が刻々と変化するので、複雑に
入り組み、このことが従来の逐次手続き型言語で問題を
記述する際の大きなネックになっている。
(Sequence Description by Directed Graph) Next, the constituent means of the internal processing of the control entity will be described. In the operation specifications of internal processing, empirically, "When ○ is in the state of ○, ● indicates ●, ◎ indicates ◎, □ indicates □
State transition "is often used. In this expression, XX is the internal state of the control entity before event input (pre-processing state), ●● is the input event, ◎◎ is the activity requirement (response), and □□ is the internal state of the control entity of the processing (after processing). State). A model represented by these four things is generally called a stimulus response model. The particulars of this declaration are extremely simple and can be easily implemented. However, due to the nature of real-time control software, multiple input events occur asynchronously, and the events to be detected change every moment depending on the internal state. It is a big bottleneck when writing.

このような処理を素直に表現するために、プラネット
では従来の文字列による一次元的な処理系列ではなく、
ペトリネットに基づいた有向グラフ構造により記述方式
を採用している。すなわち、メッセージ入力端子を始
端、メッセージ出力端子を終端として、入力事象、活動
要件を節で表現し、それらを実行順序を規定する有向枝
で結合した図式で処理系列を記述する。内部状態は、そ
の時点で制御がどこにあるのか、すなわちペトリネット
でいうところのマーキングで表現される。
In order to express such processing honestly, in Planet, instead of a conventional one-dimensional processing sequence using character strings,
The description method is adopted by a directed graph structure based on Petri net. In other words, the input event and the activity requirement are expressed as nodes with the message input terminal as the start and the message output terminal as the end, and the processing sequence is described in a diagram in which they are connected by a directed branch that defines the execution order. The internal state is represented by where the control is at the moment, ie, a marking in the Petri net.

第3図には、プラネットで記述された制御実体の内部
処理の一例が示されている。入力する有向枝のない長円
形節(startと記入された節で、この名前が前述した制
御実体のメッセージ入力端子名に対応する)が処理系列
の始端を表現している。二重矩形節で囲まれた節(even
tと記入されている節であり、実際には「sensorはオン
したか?」などの事象検知のための条件判断の句が記述
される)が入力事象検出を示しており、記入されている
事象が生起したときにはその処理を終了する。一方、一
重矩形節で囲まれた節(actionとある節であり、実際に
は「solenoideをオンにする」などのレスポンスのため
の句が記述される)は活動要件を示しており、駆動され
れば直ちに処理を遂行する。各節を結合する有向枝は処
理の実行順序関係を表現しており、この図の「action
1」、「action2」から伸びる有向枝のように複数に分岐
するものは、後続する処理が同時に実行されること、す
なわち平行処理されることを示している。また、「acti
on2」、「action5」にように複数の有向枝が入力する処
理要件は、その処理要件の全ての先行要素の処理が終了
したときに駆動されること、すなわち同期を表現してい
る。このように、実行順序が規定された処理系列は、制
御実体のメッセージ出力端子に対応する長円形節で終端
する。
FIG. 3 shows an example of internal processing of a control entity described by a planet. An input oval node with no directed branch (a node marked "start", whose name corresponds to the message input terminal name of the control entity described above) represents the beginning of the processing sequence. A section surrounded by double rectangular sections (even
This is a section marked with t, and in fact, a phrase for condition determination for event detection such as “Is the sensor turned on?” indicates input event detection and is filled in. When an event occurs, the process is terminated. On the other hand, a section enclosed by a single rectangular clause (action and a clause, which actually describes a response phrase such as "turn on solenoide") indicates an activity requirement, If so, the process is performed immediately. The directed branch connecting each clause expresses the execution order relation of the processing, and the "action
Branching into a plurality, such as a directional branch extending from “1” and “action2”, indicates that subsequent processing is executed simultaneously, that is, parallel processing is performed. Also, "acti
A processing requirement input by a plurality of directed edges, such as "on2" and "action5", indicates that the processing is driven when the processing of all preceding elements of the processing requirement is completed, that is, that synchronization is expressed. As described above, the processing sequence in which the execution order is defined ends in an oval node corresponding to the message output terminal of the control entity.

(手続きの階層性) 前述した第3図に示すように、プラネットにおいて
は、一連の纏まった処理群がそれぞれ一枚の図式として
表現される。当然、プログラム規模が大きくなると図式
は巨大になるし煩雑になり、分かりにくくなる。また、
汎用の手続きは共用で使用したいし、再帰的呼出機構も
使いたい。そこで、プラネットにおいては、ひとまとま
りの処理を一枚の図式に収め、それを上位抽象レベルの
図式中の一処理要件として呼び出すことができるように
している。第4図にはこの関係を示してある。この関係
を以下に手続きの階層化と呼ぶ。下位階層の処理は、上
位階層の処理要件に制御が到達したときに駆動される。
すなわち、下位階層図式中の「begin」入力端子に制御
が渡され、下位階層処理系列が実行を開始する。そし
て、下位階層の処理が進行し、「end」出力端子に制御
が到達したときに、下位階層中の全ての制御が破棄され
て、上位階層に制御が返される。返された制御は上位階
層中の処理要件を継続する。
(Procedure Hierarchy) As shown in FIG. 3 described above, in the planet, a series of integrated processing groups is represented as a single diagram. Naturally, if the program scale becomes large, the diagram becomes huge and complicated, and it becomes difficult to understand. Also,
I want to use general-purpose procedures in common, and also use a recursive calling mechanism. Therefore, in the planet, a group of processes is stored in one diagram, and can be called as one processing requirement in a diagram of a higher abstract level. FIG. 4 shows this relationship. This relationship is hereinafter referred to as procedure hierarchy. The processing of the lower layer is driven when the control reaches the processing requirement of the upper layer.
That is, control is passed to the "begin" input terminal in the lower hierarchy diagram, and the lower hierarchy processing sequence starts executing. Then, when the processing of the lower layer proceeds and the control reaches the “end” output terminal, all the controls in the lower layer are discarded and the control is returned to the upper layer. The returned control continues the processing requirements in the upper layer.

以上要するに、一枚の画面上においては、その上下方
向が処理の時系列方向を意味しており、左右の広がりが
処理の並行性を意味している。そして、画面の、所謂深
み方向が階層性を意味している。これらの関係を第5図
に示してある。
In short, on one screen, the vertical direction means the time-series direction of the processing, and the spread on the left and right means the parallelism of the processing. The so-called depth direction of the screen means the hierarchy. These relationships are shown in FIG.

(言語構成要素) 以上においては、プラネットにおけるプログラミング
形式として、制御実体の相互関係、内部処理の記述方式
について述べた。次に、プラネットにおける実際にプロ
グラムを記述するための各言語構成要素について定義す
る。
(Language Constituent Elements) In the above, the description has been given of the interrelation between control entities and the description method of internal processing as the programming format in the planet. Next, each language component for actually describing a program in the planet is defined.

言語構成要素を以下に列記する。 The language components are listed below.

プログラム枠 サブシステム ブロック メッセージ入出力端子 事象待ち節 活動処理節 条件分岐節 選択的事象待ち節 繰り返し制御枠 式とデータ型 各言語構成要素を以下に説明する。 Program frame Subsystem block Message input / output terminal Event wait clause Activity processing clause Conditional branch clause Selective event wait clause Iterative control framework Formula and data type Each language component is described below.

プログラム枠 制御実体の内部処理あるいはその下位階層の手続きを
表現する一枚の図式(画面)である。このプログラム枠
には、第6図に示すように、名前を記入する欄が右下に
設定されている。ここの書かれた名前が制御実体あるい
は下位階層手続きの名前となる。この名前は識別子とし
て扱われ、メッセージの送り先を指定し、あるいは下位
階層の呼出し先を指定する場合に使用される。名前の構
文を以下に示す。
Program frame This is a single diagram (screen) that represents the internal processing of the control entity or the procedure in the lower hierarchy. In this program frame, as shown in FIG. 6, a column for entering a name is set at the lower right. The name written here becomes the name of the control entity or lower-layer procedure. This name is treated as an identifier and is used to specify the destination of the message or to specify a lower-level call destination. The syntax of the name is shown below.

名前::=文字|名前 文字|名前 数字 文字::=英文字|仮名文字|_ サブシステム 制御実体を外界からみたときのものがサブシステムで
ある。この処理要件が現れる場合、第7図に示すよう
に、制御実体名が矩形の枠で囲まれた図形として表現さ
れる。制御実体のメッセージ入出力端子は、サブシステ
ムの上辺、下辺上に位置して、端子名が付随している小
矩形枠で表現される。端子名は、同一のサブシステム中
で唯一である。プログラム中に同一の名前の端子が複数
ある場合には、その何氏は共通のものとして解釈され
る。ネットワークを介した制御システム間のメッセージ
送受信操作も、制御システム内部の制御実体間中心と同
様に記述される。なお、このときに必要なメッセージパ
ッケトの形状は、後述のコンパイラが自動的に生成す
る。
Name :: = Character | Name Character | Name Numeric character Character :: = English character | Kana character | _ Subsystem A subsystem is a control entity as viewed from the outside. When this processing requirement appears, as shown in FIG. 7, the control entity name is expressed as a figure surrounded by a rectangular frame. The message input / output terminals of the control entity are located on the upper and lower sides of the subsystem and are represented by small rectangular frames accompanied by terminal names. Terminal names are unique within the same subsystem. If there is more than one terminal with the same name in the program, the name is interpreted as common. A message transmission / reception operation between control systems via a network is also described in the same manner as the center between control entities inside the control system. The shape of the message packet required at this time is automatically generated by a compiler described later.

制御実体は「begin」という名前をもつ入力端子にメ
ッセージが到達したときに活性化される。その内部処理
は、構成要素を節としてその実行順序を矢印で規定され
たプログラムネットで記述される。制御実体の内部処理
が進行して、制御が「end」という名前の出力端子に到
達したとき、その制御実体中で動作する全ての制御が処
理を中断して、破棄される。
The control entity is activated when the message reaches the input terminal named "begin". The internal processing is described by a program net whose constituent elements are nodes and whose execution order is defined by arrows. When the internal processing of the control entity proceeds and the control reaches an output terminal named "end", all controls operating in the control entity are interrupted and discarded.

ブロック 制御実体の内部処理が大規模、複雑になる場合に手続
きを階層化して、上位階層プログラムの制御要件として
記述されたひとかたまりの副手続きプログラムを、ブロ
ックと呼んでいる。ブロックには名前が付けられてお
り、その名前を上位階層ブロックの処理要件に記入する
ことにより、下位階層ブロックを呼び出す。
Blocks When the internal processing of the control entity becomes large-scale and complicated, the procedures are hierarchized, and a set of subprocedure programs described as control requirements of an upper-layer program is called a block. The block is named, and the lower layer block is called by writing the name in the processing requirement of the upper layer block.

上位階層中の処理要件に制御が到達した時点で、下位
階層ブロックが呼び出される。下位階層ブロックの呼出
しには、再帰、間接再帰が許可されている。呼び出され
た下位階層ブロックは、「begin」という名前の長円形
の端子から実行が開始され、処理が進行して「end」と
いう名前の長円形の端子に制御が到達したときに、その
ブロック内部の全てのプロセスが中断して破棄される。
その後、制御が上位階層の処理要件に返却されて、上位
階層ブロックの実行が継続される。
When control reaches the processing requirement in the upper layer, the lower layer block is called. Recursion and indirect recursion are permitted for calling the lower hierarchical block. The called lower-level block starts executing from the oval terminal named "begin", and when processing progresses and control reaches the oval terminal named "end", the inside of the block is called. All processes are interrupted and destroyed.
Thereafter, the control is returned to the processing requirement of the upper layer, and the execution of the upper layer block is continued.

ブロック呼出しに引数を与えることができ、その場合
に呼び出すブロック名の後に変数名あるいは値を「 ,
」で区切ったリストを括弧でくくって利用する。ブロ
ックの引数に変数が使用される場合、引数の与え方はい
わゆる名前呼出しで行われる。すなわち、上記階層で与
えられた引数を下位階層で値を更新すると、上位階層に
戻ったときにその変数の値が変化する。
Arguments can be given to the block call, in which case the variable name or value is replaced by ",
Use a list separated by parentheses in parentheses. When a variable is used as an argument of a block, the argument is given by a so-called name call. That is, when the value of the argument given in the above hierarchy is updated in the lower hierarchy, the value of the variable changes when returning to the upper hierarchy.

一例として、第8図に再帰呼出しを用いた「nの階乗
を求める」ブロックを示す。この例では「begin」入力
端子中の引数「f」に求めた値が格納され、「factoria
l」を呼び出した結果として、その値が利用される。下
位階層ブロックの内に出現するメッセージ入出力端子に
ついてもう一度述べると、ブロックが制御実体の下位手
続きとして表現されているので、ブロック内に現れる入
出力メッセージ端子は、そのブロックを呼び出している
制御実体のメッセージ端子として解釈される。
As an example, FIG. 8 shows a block "Find the factorial of n" using a recursive call. In this example, the value obtained in the argument “f” in the “begin” input terminal is stored and “factoria
The value is used as a result of calling "l". To reiterate the message I / O terminals that appear in the lower hierarchical block, since the block is represented as a sub-procedure of the control entity, the I / O message terminals that appear in the block are those of the control entity that calls the block. Interpreted as a message terminal.

「begin端子」と「end端子」の構文を以下に示す。 The syntax of "begin terminal" and "end terminal" is shown below.

begin端子:: =‘begin'|‘begin'()|‘begin'(引数リス
ト) end端子:: =‘end'|‘end'(‘TRUE')|‘end'(FALSE') 引数リスト:: =型宣言 名前|引数リスト,名前 |引数リスト,型宣言 名前 引数リストは型+名前、あるいは名前が「 , 」で
区切られた恰好でできている。左から右に評価してい
き、型+名前ではその名前の引数が指定した型であるこ
とを宣言する。更に、名前だけが「 , 」で区切られ
たものはその引数が左の引数と同じ型であることを宣言
している。従って、 int a,b,char c,int d,float f,g の例では、「a」と「b」はint型、「c」はchar型、
「d」はint型、「f」、「g」はfloat型であることを
宣言している。
begin terminal :: = 'begin' | 'begin' () | 'begin' (argument list) end terminal :: = 'end' | 'end'('TRUE') | 'end' (FALSE ') argument list: : = Type declaration name | argument list, name | argument list, type declaration name The argument list is made up of type + name, or names separated by ",". Evaluating from left to right, type + name declares that the argument with that name is the specified type. In addition, only names separated by "," declare that the argument is of the same type as the left argument. Therefore, in the example of int a, b, char c, int d, float f, g, “a” and “b” are int type, “c” is char type,
“D” declares that it is an int type, and “f” and “g” declare that it is a float type.

下位階層の呼出しの構文を以下に示す。 The syntax of the lower-level call is shown below.

下位階層呼出し::= 名前|名前(値リスト) | 名前| 名前(値リスト) 値リスト::=値|値リスト, 値 プラネットでは分割コンパイルをサポートしており、
同一のソースファイル上にない下位階層手続きを呼び出
すときには、最初に「@」を付けて記述する。
Lower-level call ::: name | name (value list) | name | name (value list) value list ::: value | value list, value Planet supports split compilation,
When calling a lower-layer procedure that is not in the same source file, write "\" first.

入出力端子 制御実体間のメッセージ送受信操作においては、受信
の受け口にあたる端子を入力端子と呼んでいる。一方、
送信の送り口に当たる端子を、出力端子と呼んでいる。
入出力端子を第9図に示す。入力端子と出力端子とは同
一の長円形をしている。長円形に入力する矢印があるも
のが出力端子であり、そうでないものが入力端子であ
る。入出力端子には名前が付けられている。前述の手続
きの階層性のところで説明した「begin」端子と、「en
d」端子は入出力端子として扱われない。
Input / output terminal In the message transmission / reception operation between control entities, a terminal corresponding to a reception port is called an input terminal. on the other hand,
The terminal corresponding to the transmission port is called an output terminal.
The input / output terminals are shown in FIG. The input terminal and the output terminal have the same oval shape. An output terminal has an oval input arrow, and an input terminal does not have an arrow. The input / output terminals are given names. The "begin" terminal described in the hierarchy of procedures above and "en
The “d” terminal is not treated as an input / output terminal.

メッセージの送信操作は出力端子に制御が到達したと
きに行われる。メッセージの受信操作は、メッセージが
入力端子に到達したときに行われる。すなわち、入力端
子はメッセージバッファーの役割をする。入力端子から
矢印が結合している場合には、メッセージが入力した時
点でそのメッセージが読み出されて矢印以降の処理が駆
動される。一方、矢印のない入力端子は、手続き系列で
記述したメッセージ読出操作によって、入力端子からメ
ッセージが読み出される。メッセージの読出操作は条件
判断句の中に入力端子名を記入することによって行われ
る。
The message transmission operation is performed when control reaches the output terminal. The message receiving operation is performed when the message reaches the input terminal. That is, the input terminal functions as a message buffer. When an arrow is connected from the input terminal, the message is read out when the message is input, and the processes after the arrow are driven. On the other hand, a message is read from an input terminal without an arrow by a message reading operation described in a procedure series. The message reading operation is performed by writing the input terminal name in the condition judgment phrase.

入出力端子は制御実体を外界からみたサブシステムの
メッセージ端子に対応している。すなわち、第8図に示
すように、(a)の出力端子に制御が到達して、メッセ
ージ送信操作が行われると、(c)のようなメッセージ
結合によってメッセージが交信する。そのメッセージは
(b)の入力端子に到達し、メッセージを利用すること
ができる。また、(c)のようにメッセージ結合の様子
を記述せずに、(d)のように内部手続きの中で異なる
制御実体のメッセージを送受信することも可能である。
The input / output terminals correspond to the message terminals of the subsystem when the control entity is viewed from the outside. That is, as shown in FIG. 8, when the control reaches the output terminal (a) and the message transmission operation is performed, the message is exchanged by the message combination as shown in (c). The message reaches the input terminal of (b), and the message can be used. Also, it is possible to transmit and receive messages of different control entities in an internal procedure as shown in (d), without describing the state of message connection as in (c).

メッセージにデータを載せる場合、第10図の(a)の
ように出力端子の名前と共に、値を「,」で区切ったリ
ストを括弧でくくって送出受する(この場合「(1,5,1.
234)」がそれです。変数を用いることも可能であ
る。)。一方、それを受けるサブシステム間のメッセー
ジ結合では、同図(b)のようにメッセージ端子の名前
の後に、データの名前と型を指定したリストを付けて記
述する。この例では出力側サブシステムのメッセージ端
子の「(int x,int y,float z)」、側サブシステムの
メッセージ端子の「(x,y,z)」がデータリストであ
る。更に受信側の制御実体の入力端子に、同図(c)の
ような入力端子の名前の後に入力するデータと型の指定
されたリスト「(int a,b,float f)」を記入する。こ
の例では、整数型のデータ「1」、「5」及び浮動小数
型のデータ「1.234」の三つの値がメッセージに載せら
れて交信している。このメセージが(c)の入力端子に
到達すると、入力端子の引数「a」「b」「f」には、
それぞれ「1」「5」「1.234」の値が設定される。ま
た(d)のように、制御実体の内部手続きの中で異なる
制御実体にメッセージを出力する場合には、サブシステ
ムのメッセージ端子に直接「(1,5,1.234)」の値並び
を記述すればデータが送信できる。
When data is to be added to the message, a list of values separated by "," is enclosed in parentheses and sent and received together with the name of the output terminal as shown in (a) of FIG. 10 (in this case, "(1,5,1 .
234) "is that. It is also possible to use variables. ). On the other hand, in the message connection between the subsystems that receive the message, a list specifying the name and type of data is added after the name of the message terminal as shown in FIG. In this example, "(int x, int y, float z)" of the message terminal of the output side subsystem and "(x, y, z)" of the message terminal of the side subsystem are data lists. Further, a list "(int a, b, float f)" in which the data to be input and the type are specified after the name of the input terminal as shown in FIG. In this example, three values of integer-type data "1" and "5" and floating-point type data "1.234" are communicated in a message. When this message reaches the input terminal of (c), the arguments “a”, “b”, and “f” of the input terminal include:
Values of “1”, “5”, and “1.234” are set respectively. When a message is output to a different control entity in the internal procedure of the control entity as shown in (d), the value sequence of “(1,5,1.234)” must be described directly in the message terminal of the subsystem. Data can be transmitted.

更に、メッセージ結合を示す第10図(b)の図上のメ
ッセージ中のデータを加工することができる。例えば、
メッセージの入力側サブシステムのメッセージ端子の値
並びを「(y,x,z)」と並びを変えれば、(c)の入力
引数「a」「b」「c」には値が交換されて、それぞれ
「5」「1」「1.234」が設定される。また、「(x+
1,y,2*z)」のように式による値の変換を行えば、得
られた値「2」「5」「2.468」がそれぞれ設定され
る。
Further, the data in the message on the diagram of FIG. 10 (b) showing the message combination can be processed. For example,
If the value list of the message terminal of the message input side subsystem is changed to "(y, x, z)", the values are exchanged for the input arguments "a", "b" and "c" of (c). , "5", "1", and "1.234" are set respectively. Also, "(x +
If the value is converted by an expression such as "1, y, 2 * z)", the obtained values "2", "5", and "2.468" are respectively set.

データを含んだメッセージを送受する場合、メッセー
ジ端子及び入出力端子間のデータの型の並びは一致して
いなければならない。
When transmitting and receiving a message including data, the arrangement of data types between the message terminal and the input / output terminal must match.

入出力端子、サブシステムのメッセージ端子の構文を
以下に示す。
The syntax of the input / output terminal and the message terminal of the subsystem are shown below.

入力端子::=名前|名前()|名前(引数リスト) 出力端子::=名前|名前()/名前(値リスト) サブシステムメッセージ出力端子::=名前|名前(変
数束縛リスト) サブシステムメッセージ入力端子::=名前|名前(値
リスト) 変数束縛リスト::=型宣言 名前|名前|変数束縛リ
スト,型宣言 名前|変速束縛リスト,名前 変数束縛リストは前述した引数リストとは異なった評
価をする。例として、引数リストで述べたものと同じ宣
言、 int a,b,char c,int d,float f,g を用いる。変数束縛リストも同じく、型+名前あるいは
名前が「,」で区切られている。名前だけが「,」で区
切られているもの、例えば変数「b」や「f」は内部変
数や入力引数のように別の場所で宣言されたものを記入
する。そうすると、メッセージ端子にメッセージが渡さ
れてきたときに、メッセージ中のデータをその変数に格
納するように動作する。
Input terminal :: = name | name () | name (argument list) Output terminal :: = name | name () / name (value list) Subsystem message output terminal ::: name | name (variable binding list) Subsystem Message input terminal :: = name | name (value list) Variable binding list ::: type declaration Name | name | variable binding list, type declaration name | speed binding list, name The variable binding list is different from the argument list described above. Make an evaluation. As an example, use the same declarations as in the argument list: int a, b, char c, int d, float f, g. The variable binding list is also type-name or name-separated by ",". Those whose names are separated by ",", for example, variables "b" and "f" are those declared elsewhere, such as internal variables and input arguments. Then, when the message is passed to the message terminal, the data in the message is stored in the variable.

事象待ち節 外界からの入力自象を待つ処理を事象待ち節と称し
て、第11図に示すように、二重の矩形節で記述する。処
理は「●が●になるまで待つ。」とするものである。矩
形の中には「●は●か?」とする条件判断句が記述され
る。事象待ち節に制御が到達すると、条件判断句を評価
する。条件判断句が真を返すまで、条件判断句の評価を
繰り返し行う。
Event Waiting Node The process of waiting for input from the outside world is called an event waiting node, and is described by a double rectangular node as shown in FIG. The processing is "wait until ● becomes". " In the rectangle, a condition judgment phrase “? Is ●?” Is described. When control reaches the event waiting node, the conditional clause is evaluated. The evaluation of the condition judgment phrase is repeated until the condition judgment phrase returns true.

条件判断句として適用できるものは、以下の三種類で
ある。
The following three types can be applied as condition judgment phrases.

入力センサ状態の判断結果の値 例えば、スイッチがONされたか、入力ポートの値が特
定の値になったか等の条件判断である。
The value of the determination result of the input sensor state is, for example, a condition determination such as whether the switch is turned on or the value of the input port has reached a specific value.

時間待ち要素 時間が経過したかという条件判断で、指定した時間だ
け処理を中断させるものである。
Time wait element The processing is interrupted for the specified time based on the condition judgment whether the time has elapsed.

入力端子名 「その入力端子にメッセージが到達したか?」という
条件判断で、メッセージが到達すれば、メッセージ読み
出し操作を行う。
Input terminal name If a message arrives in the condition judgment of "has the message arrived at that input terminal?", A message read operation is performed.

活動処理節 外界に出力を行ったり、演算をしたり、値を代入した
りする処理を、活動処理と称して一重の矩形節で第12図
のように記述する。矩形節の中には、「◎を◎する」と
いう処理を行う句が記入される。
Activity Processing Section Processing for outputting to the outside world, performing calculations, and substituting values is referred to as activity processing and is described in a single rectangular section as shown in FIG. In the rectangular section, a phrase for performing the processing of “do ◎” is written.

条件分岐節 手続き系列の条件分岐構造は条件分岐節によって記述
される。第13図に条件分岐節の記述例を示す。条件分岐
節は、同図に示すように、矩形が積み重なった形状をし
ており、複数の出力点を持っている。各々の矩形の中に
は条件判断句が記入され、条件分岐節を通過した制御
は、複数ある出力点のうち条件の成り立つ出力点から出
力される。出力点が振り分けられるので、条件分岐を実
現することになります。条件分岐節は左上隅から下に向
かって評価が開始され、条件が成立していれば下へ、そ
うでなければ右へ評価が逐次に進行する。下に条件判断
がないところまで評価が到達すれば、それに対応する出
力点以降の処理が継続される。条件分岐節の条件判断句
の中には、「else」という特別な句を記入することがで
きる。「else」は、「条件が成立していなければ右へ評
価が進む」という動作の中で、最後に評価されて常に
「真」になる。従って、条件がすべて成立していなけれ
ば、「else」の出力点に制御が出力される。
Conditional branch clause The conditional branch structure of a procedure sequence is described by a conditional branch clause. FIG. 13 shows a description example of a conditional branch clause. As shown in the figure, the conditional branch node has a shape in which rectangles are stacked, and has a plurality of output points. A conditional judgment phrase is written in each rectangle, and the control that has passed through the conditional branch node is output from an output point where the condition is satisfied among a plurality of output points. Since output points are sorted, conditional branching is realized. The evaluation of the conditional branch starts from the upper left corner downward, and the evaluation proceeds downward if the condition is satisfied, and proceeds to the right otherwise. If the evaluation reaches the point where there is no condition judgment below, the processing after the corresponding output point is continued. A special phrase "else" can be entered in the conditional judgment phrase of the conditional branch clause. “Else” is evaluated last in the operation “evaluation proceeds to the right if the condition is not satisfied” and always becomes “true”. Therefore, if all the conditions are not satisfied, the control is output to the output point "else".

第13図の例の場合、まず「sw==ON」が評価される。
swが入力されていれば次に「ph c==OFF」が評価さ
れ、phcが入力されていなければ出力点aから制御が出
力される。phcが入力されていれば「i==2」が評価
され、変数iが2であれば出力点bから制御が出力され
る。変数iが2でなければ、「else」によって出力点c
から制御が出力される。最初にswが入力していなけれ
ば、右端の「else」によって出力点dから制御が出力さ
れる。
In the case of the example of FIG. 13, “sw == ON” is evaluated first.
If sw is input, then "ph c == OFF" is evaluated, and if phc is not input, control is output from output point a. If phc is input, “i == 2” is evaluated, and if the variable i is 2, control is output from the output point b. If the variable i is not 2, the output point c is determined by "else".
Outputs the control. If sw is not input first, control is output from the output point d by "else" at the right end.

選択的事象待ち節 実時間処理の用件のなかには、複数の事象を同時に検
知していてどれが一つの事象が検知されたら、その事象
に対応する処理を継続して、他の事象待ちを放棄すると
いう処理に帰着させる事柄がよくある。「ソレノイドに
通電した後にセンサが検出するのを待っていて、二秒経
ってもセンサが検出しなければ警告する」とすうように
制御対象の異常検出を時間待ち処理で行う問題や、「三
つのスイッチを監視していて、最初に入力されたスイッ
チにしたがって処理を行う」という問題が例として挙げ
られることができる。これを、プラネットでは選択的事
象待ちと称して、選択的事象待ち節によって第14図のよ
うに記述する。
Selective event wait clause In the real-time processing requirements, multiple events are detected at the same time, and if one event is detected, processing corresponding to that event is continued and waiting for other events is abandoned. There are many things that result in the process of doing. The problem of performing an abnormal detection of a controlled object in a time waiting process, such as `` Waiting for the sensor to detect after energizing the solenoid, and warning if the sensor does not detect after 2 seconds, '' One switch is monitored, and processing is performed according to the switch that is input first. " This is called "selective event waiting" in the planet, and is described by the selective event waiting node as shown in FIG.

選択的事象待ち節は、二重矩形で囲まれた事象待ち節
が横に並んで、それぞれに出力点を待つ節で、条件分岐
節とよく似た形状をしている。その実行規則は次のよう
なものである。選択的事象待ち節が駆動されれば横に並
んでいる全ての事象待ちを並行に駆動し、最も早く処理
が終了したものは、横に並んでいる他の処理をすべて棄
却して、事象が成立したものに対応する出力点以降の処
理を継続する。第14図(a)では、「sensor==ON」と
「timer==2000」の二つの選択的事象待ちである。つ
まり、センサが先に入力すれば出力点aから抜け出し正
常な処理を行うようにしている。また、先に時間が二秒
経てば出力点bからエラー復帰処理を行うようにしてい
る。また、第14図(b)は、「sw1==ON」、「sw2==
ON」更に「sw3==ON」の三つの選択的事象待ちであ
る。三つのスイッチをスキャンしていて、最初に入力さ
れたスイッチに対応してそれぞれ出力点c,d,eから制御
が振り開けられる。
The selective event waiting node is a node in which event waiting nodes surrounded by a double rectangle are arranged side by side, and each waits for an output point, and has a shape very similar to a conditional branching node. The execution rules are as follows. If the Selective Event Waiting node is activated, all event queues that are next to each other are driven in parallel. The processing after the output point corresponding to the established one is continued. In FIG. 14 (a), two selective events of “sensor == ON” and “timer == 2000” are awaited. That is, if the sensor inputs first, the sensor exits from the output point a and performs normal processing. If the time has elapsed for two seconds, the error recovery processing is performed from the output point b. FIG. 14 (b) shows “sw1 == ON” and “sw2 ==
ON "and" sw3 == ON ". The three switches are scanned, and control is opened from output points c, d, and e, respectively, corresponding to the first input switch.

選択的事象待ちの終了時に他の制御を棄却する操作
は、下位階層を呼び出しているときにも有効である。こ
れは非常に強力な特質で、一連の手続き系列を実行させ
ながら同時に停止要求を検知し、停止要求が発行される
と動作している手続き系列を中断させる処理が、選択事
象待ち節によって記述できる。第15図に列に示す。図
中、左側事象待ち節の「cycle」は下位階層を持ってお
り、機械を制御する一連の手続き系列を実行していると
仮定する。右側の事象待ち節「stop」は、この制御実体
に停止要求メッセージ「stop」が入力されるのを待って
いるものである。同図中選択時事象待ち節に制御が到達
すると、「cycle」が起動される。これと同時に、停止
要求メッセージを検知する処理も駆動される。停止要求
メッセージが入力されないうちは、プログラムは手続き
「cycle」によって機械の動作を制御している。停止要
求メッセージが到達することの選択的事象待ち節の動作
によって、「cycle」を実行している制御がすべて棄却
され、「cycle」実行が中断される。その後、「sotp」
待ちの出力点以降で機械体のリセット動作が行われ、処
理が終了する。
The operation of rejecting another control at the end of the selective event wait is effective even when the lower hierarchy is being called. This is a very powerful feature. The process of detecting a stop request at the same time as executing a series of procedure series and interrupting the running procedure series when the stop request is issued can be described by a selection event wait node. . The columns are shown in FIG. In the figure, it is assumed that "cycle" of the left event waiting node has a lower hierarchy and executes a series of procedural steps for controlling the machine. The event waiting node “stop” on the right is waiting for input of a stop request message “stop” to this control entity. When the control reaches the event waiting node at the time of selection in the figure, "cycle" is started. At the same time, the process of detecting the stop request message is also driven. Before the stop request message is input, the program controls the operation of the machine by the procedure "cycle". Due to the operation of the optional event waiting node that the stop request message arrives, all the control executing “cycle” is rejected, and the execution of “cycle” is interrupted. Then "sotp"
After the waiting output point, the reset operation of the machine body is performed, and the process ends.

繰り返し制御枠 処理系列の繰り返し構造を繰り返し枠で記述する。矢
印の結線でループを組むと繰り返し構造になるが、プロ
グラムが煩雑になるので繰り返し枠を使用することが望
ましい。第16図に記述例を示してある。繰り返し枠は、
左上隅の制御手段を示す矩形節と右下隅の「end」が囲
まれた矩形節、更にこの二つの矩形を対角とする枠によ
って構成される。
Repetition control frame Describe the repetition structure of the processing series in a repetition frame. If a loop is formed by connecting the arrows, the structure becomes a repetition. However, since the program becomes complicated, it is desirable to use a repetition frame. FIG. 16 shows a description example. The repeating frame is
It is composed of a rectangular node indicating the control means at the upper left corner, a rectangular node surrounded by "end" at the lower right corner, and a frame having the two rectangles as diagonals.

繰り返し制御枠は次のように動作する。左上隅の矩形
節に制御が到達してときから繰り返し構造が始まる。そ
の矩形節中に記述されている制御手段によって制御が振
り分けられるが、脱出条件が成り立っていないのでまだ
制御が繰り返し構造の中にあるときには、その矩形節か
ら右下隅の「end」矩形節までの手続き系列を実行す
る。「end」矩形節に制御が到達すれば、再び左上隅制
御手段節に制御が移る。このようにして、両矩形節に挟
まれた手続き系列が繰り返し実行される。条件が成り立
って制御手段節によって繰り返し構造から脱出すると、
「end」矩形節以降の手続き系列が実行される。更に、
条件分岐節あるいは選択的事象待つ節によって繰り返し
構造から強制的に脱出することもできる。制御手段に
は、「loop」句・「while」句・「until」句・「for」
句が用意されている。
The repetition control frame operates as follows. The repetitive structure starts when control reaches the rectangular node in the upper left corner. The control is distributed by the control means described in the rectangular section, but when the control is still in the repetitive structure because the escape condition has not been satisfied, the section from the rectangular section to the “end” rectangular section in the lower right corner is Execute a procedural sequence. When control reaches the “end” rectangular node, control is transferred again to the upper left corner control means node. In this way, the procedure sequence sandwiched between both rectangular nodes is repeatedly executed. When the condition is satisfied and the control means clause repeatedly escapes from the structure,
The procedure sequence after the “end” rectangle clause is executed. Furthermore,
It is also possible to forcibly escape from the repetitive structure by using a conditional branch clause or a clause waiting for an optional event. Control means include "loop" clause, "while" clause, "until" clause, "for"
A phrase is provided.

「loop」句 「loop」句は、無限ループを実現する。無条件に「en
d」節に至る制御系列の実行を繰り返すものである。無
限ループから脱出するには、条件分岐節や選択的事象待
ち節によって脱出させるようにする。
"Loop" clause The "loop" clause implements an infinite loop. Unconditionally "en
The execution of the control sequence leading to section "d" is repeated. In order to escape from the infinite loop, it is necessary to escape with a conditional branch clause or a selective event wait clause.

「while」句 「while」句の構文は以下の通りである。"While" clause The syntax of the "while" clause is as follows.

while句::=‘while'(条件判断句) 「while」句に制御が到達したときに括弧でくくられ
た条件判断句が評価され、その結果が真であれば繰り返
し構造内に、偽ならば「end」節に制御が振り分けられ
る。
while clause ::: 'while' (condition decision clause) When control reaches the "while" clause, the condition decision clause enclosed in parentheses is evaluated. If so, control is distributed to the "end" clause.

「until」句 「until」句の構文は以下の通りである。"Until" clause The syntax of the "until" clause is as follows.

until句::=‘until'(条件判断句) 「until」句に制御が到達すると、「until」句以降の
「end」の節に至る手続き系列が実行され、「end」節に
制御が到達したときに「until」句中の括弧でくくられ
た条件判断句が評価される。制御は、その結果が真なら
ば「end」節以降に、偽ならば「util」句以降に振り分
けられる。
until clause :: = 'until' (condition judgment clause) When control reaches the “until” clause, the procedural sequence from the “until” clause to the “end” clause is executed, and control reaches the “end” clause. Then, the condition judgment clause enclosed in parentheses in the "until" clause is evaluated. Control is distributed after the "end" clause if the result is true, and after the "util" clause if false.

「for」句 「for」句の構文は以下の通りである。"For" clause The syntax of the "for" clause is as follows.

for句::=‘for'変数= 値 ‘to' 値 |‘for' 変数 = 値‘to'値 ‘step'定数 「for」句は、加算な閉区間を順繰りにたどる制御手
段である。上記の「変数」は宣言されていなければなら
ない。例えば「for i=x to y step c」のfor句では、
区間開始値x及び区間終了値yによって囲まれた領域r
(r={j|x<=j<y})を、変数iからxから刻み
cづつ増加させながらiがr内にあるまで繰り返され
る。
for clause :: = 'for' variable = value 'to' value | 'for' variable = value 'to' value 'step' constant The "for" clause is a control means for sequentially tracing an additional closed interval. The above "variable" must be declared. For example, in the for clause of "for i = x to y step c",
Area r surrounded by section start value x and section end value y
(R = {j | x <= j <y}) is repeated from the variable i by increments of x from the variable x until i is within r.

式とデータ型 プラネットで操作できる基本データ型を以下に示す。Expressions and Data Types The basic data types that can be manipulated by Planet are shown below.

以下に、それぞれのデータ型の詳細について述べる。 The details of each data type are described below.

char型 8ビットの二進数である。符号無しのデータで0から
255までの値をとる。文字や小さい整数を表現するのに
用いられる。
char type 8-bit binary number. Unsigned data from 0
Take values up to 255. Used to represent letters and small integers.

int型 16ビットの符号付き二進数である。−32768から+327
67までの値をとる。16ビットのデータ中MSBが符号を表
現している。負の数は2の補数で表現される。一般的に
用いられる整数である。
int 16-bit signed binary number. −32768 to +327
Take values up to 67. The MSB in the 16-bit data represents the code. Negative numbers are represented by two's complement. This is a commonly used integer.

long型 32ビットの符号付き二進数である。−2147483648から
+2147483647jまでの非常に大きな範囲の整数を表現す
ることができる。int型と同様に、負の数は2の補数で
表現される。
long type 32-bit signed binary number. A very large range of integers from −2147483648 to + 2147483647j can be represented. Like the int type, negative numbers are represented by two's complement.

float型 浮動小数点数である。符号ビット・指数部・仮数部あ
わせて32ビットで構成されている。データのフォーマッ
トはshort realと呼ばれているもので、IEEE規格に準拠
している。第17図にデータフォーマットを示す。
float A floating point number. It consists of 32 bits including the sign bit, exponent part and mantissa part. The format of the data is called short real and conforms to the IEEE standard. FIG. 17 shows the data format.

bit型 I/Oポートに接続とされているセンサ・アクチュエイ
タの操作を行わせるために使用される。bit型の変数の
操作は、bit変数の零判断、bit変数を1にする。bit変
数を0にする、の三つである。これ以外、例えばorをと
るとかandをとるとかはできない。
Used to operate the sensor / actuator connected to the bit type I / O port. The operation of a bit-type variable sets the bit variable to zero judgment and sets the bit variable to 1. Set the bit variable to 0. Other than this, for example, you cannot take or or and.

port型 I/Oポートの8ビット単位の操作を行うために使用す
る。port型はI/Oポートアドレスで物理アドレスが指定
される。port型の変数を参照したときには、char型のデ
ータとして扱われる。port型の変数に値を設定するに
は、bit型以外のデータを使用することができ、このと
き設定される値はchar型に型変換されて格納される。
port type Used to perform 8-bit operation of I / O port. In the port type, a physical address is specified by an I / O port address. When a port type variable is referenced, it is treated as char type data. To set a value to a port type variable, data other than bit type can be used, and the value set at this time is converted to char type and stored.

内部変数とI/O変数 char型・int型・long型・float型のデータをメモリ上
に格納することができる。これを言う言語処理要素が内
部変数宣言である。以下に内部変数宣言の記述を示す。
更に手続き中でI/Oポートのデータ即ちbit型及びport型
のデータをアクセスする場合にも、内部変数宣言と同様
の宣言を行う。
Internal variables and I / O variables Char, int, long, and float data can be stored in memory. The language processing element that says this is an internal variable declaration. The description of the internal variable declaration is shown below.
Further, when accessing I / O port data, that is, bit type and port type data during the procedure, the same declaration as the internal variable declaration is made.

int i,j,k, char ch; long cout, float data; bit sensor, solenoid; port outport; 上の表において、変数「i」「j」「k」がint型、
「ch」がchar型、「count」がlong型、「data」がfloat
型として宣言され、メモリ上にそれぞれの領域が確保さ
れる。bit型及びport型のデータは、メモリ上に領域が
確保されずに、宣言された名前のI/Oデータが使用され
ていることをコンパイラに知らせるために使用される。
int i, j, k, char ch; long cout, float data; bit sensor, solenoid; port outport; In the above table, the variables "i", "j" and "k" are int type,
"Ch" is char type, "count" is long type, "data" is float
It is declared as a type, and each area is allocated in memory. Bit-type and port-type data are used to notify the compiler that I / O data with the declared name is being used without securing an area on the memory.

以下に内部変数宣言の構文を示す。 The syntax of the internal variable declaration is shown below.

内部変数宣言::=型宣言 名前|‘global' 型宣言 名前 |内部変数宣言 ,名前 |内部変数宣言 ,型宣言 名前 |内部変数宣言 ;内部変数 宣言 |内部変数宣言 〔正定数〕 型宣言::=‘char'¥|‘int'|‘long'|‘float'|‘b
it'|‘port'|データ構造対宣言名 内部変数の記憶領域の確保の仕方について述べる。制
御実体の内部手続きは階層をなしている。最上位の手続
きの中で宣言された変数は、静的なメモリ上に確保さ
れ、プログラムの実行時に終始存在し続ける。一方、下
位階層として宣言されたブロック中で内部変数が宣言さ
れると、その内部変数は下位階層が起動されたときにス
タックフレーム上に、動的に生成される。そして、下位
階層が手続き終了すると確保された変数領域は消滅す
る。下位階層の手続きの中で、前記構文にあるように
「global」という修飾子を型宣言の前に記述すれば、最
上位の静的に宣言された変数をアクセスすることができ
る。
Internal variable declaration ::: type declaration name | 'global' type declaration name | internal variable declaration, name | internal variable declaration, type declaration name | internal variable declaration; internal variable declaration | internal variable declaration [positive constant] type declaration :: = 'Char' ¥ | 'int' | 'long' | 'float' | 'b
it '|' port '| Data structure vs. declaration name This section describes how to secure the storage area for internal variables. The internal procedures of the control entity form a hierarchy. Variables declared in the top-level procedure are allocated in static memory, and remain present throughout the execution of the program. On the other hand, when an internal variable is declared in a block declared as a lower layer, the internal variable is dynamically generated on the stack frame when the lower layer is activated. Then, when the lower hierarchy ends the procedure, the secured variable area disappears. In the lower-layer procedure, if the qualifier "global" is described before the type declaration as described in the above syntax, the top-level statically declared variable can be accessed.

下位階層呼び出しと入力引数 下位階層手続きを呼び出すときに与えられたデータ
を、入力引数と呼んでいる。前述したように、「begin
端子」に記入されている引数リストがそれにあたる。入
力引数で宣言されたデータも、内部変数と同様にアクセ
スすることができる。入力引数として前述した六つのデ
ータ型を与えることができる。下位階層呼び出し仕組み
は次のようなものである。入力引数には変数のアドレス
が渡される(これで名前呼び出しを実現する)。引数が
char型・int型・long型・float型のときには、メモリ上
のアドレスが渡される。またbit型・port型のときにはI
/Oポートのアドレス、I/Oポートアドレスとビット位置
がそれぞれ渡される。入力引数をアクセスするときに
は、与えられたアドレスからデータの値を得て使用す
る。下位階層呼び出しの引数で変数名でない値が渡され
たとき、例えば「1」「3.1415」などの即値や「i+
1」のように演算結果値の場合、変数でないのでアドレ
スが定義できない。このような値を下位階層に渡すとき
に処理系は、まず一時的なメモリ領域を確保して値を格
納する。次に、その格納した領域のアドレスを下位下層
に渡すような走行コードを生成する。
Lower layer call and input argument The data given when calling the lower layer procedure is called an input argument. As mentioned earlier, "begin
The argument list written in "terminal" corresponds to it. Data declared as input arguments can be accessed in the same way as internal variables. The above six data types can be given as input arguments. The lower-level calling mechanism is as follows. The input argument is passed the address of the variable (this implements a name call). Argument is
For char, int, long, and float types, the address in memory is passed. In case of bit type / port type, I
The / O port address, I / O port address and bit position are passed. When accessing an input argument, a data value is obtained from a given address and used. When a value that is not a variable name is passed as an argument of the lower hierarchy call, for example, an immediate value such as “1” or “3.1415” or “i +
In the case of an operation result value such as "1", the address cannot be defined because it is not a variable. When passing such a value to the lower hierarchy, the processing system first secures a temporary memory area and stores the value. Next, a running code is generated to pass the address of the stored area to the lower and lower layers.

メッセージ中のデータ メッセージに含まれるデータのアクセスについて述べ
る。メッセージは生成と消滅が頻繁に行われるので、ス
タックフレームとは異なった独自の記憶領域管理を行
う。メッセージが入力された時点から、その中に含まれ
ているデータを、内部変数と同じようにアクセスするこ
とができる。
Data in message The access of the data contained in the message is described. Since a message is frequently generated and deleted, a unique storage area management different from a stack frame is performed. From the time the message is entered, the data contained therein can be accessed in the same way as internal variables.

データ構造 char型・int型・lont型・float型のメモリ上に配置さ
れる基本データ型は、配列及び構造体と呼ばれる、より
複雑なデータ構造を構成する。連続したメモリ領域に一
まとまりになって配置されるので、様々なアルゴリズム
に適用し、様々な問題の表現がしやすくなっている。以
下に配列と構造体について述べていく。データ構造の取
扱いは、Cに準拠している。
Data Structure The basic data types arranged on the memory of the char type, int type, lont type and float type constitute more complicated data structures called arrays and structures. Since they are arranged as a unit in a continuous memory area, they can be applied to various algorithms and can easily express various problems. The arrangement and structure are described below. The handling of the data structure conforms to C.

配列 配列はchar型・int型・long型・float型、更に直後で
述べる構造体のデータが指定された個数だけ連続した領
域が確保されて配置されているものである。プラネット
では、多次元配列を使用することもできる。配列データ
はデータ名の直後にデータの要素数(正の定数)
を「〔〕」でくくって宣言することで行う。各要素が0
から100までの属性値」をもつ集合で、10刻みの度数分
布を求めることを例にとって説明する。この時、「int
histgram[11]」とヒストグラムを表現する配列を宣言
する。配列中の要素は先頭からの数えた要素数で指定す
る。配列の先頭要素は0です。「histgram[i]」は度
数のi番目の要素を指定していて、iのとる値は0から
10の11種類である。このようにデータ構造を決定して配
列の全ての要素0の初期化する。その後、属性値atrの
要素が与えられると、histgram中「art/10」番目の要素
を1増加させる。これを規定された集合の全ての要素に
ついて行うと、0かせ9の値をとる要素数がhistgram
[0]に、10から19の値をとる要素数がhistgram[1]
に....、100をとる要素数がhistgram[10]に得られ
る。また多次元配列の場合には、「char b[10]
[5]」のように[]でくくった要素数を並べることで
宣言する。この例ではchar型のデータが10×5の二次元
に束ねられていることを宣言している。
Array An array is an array in which a specified number of contiguous areas are allocated for the data of the structure described below, such as char, int, long, and float. Planets can also use multidimensional arrays. For array data, the number of data elements immediately after the data name (positive constant)
Is declared by enclosing it with "[]". Each element is 0
An example will be described in which a set having attribute values from “to 100” and a frequency distribution in increments of 10 are obtained. At this time, "int
histgram [11] "and an array expressing the histogram are declared. The elements in the array are specified by the number of elements counted from the top. The first element of the array is 0. "Histgram [i]" specifies the i-th element of the frequency, and the value of i is 0 to
There are 10 11 types. Thus, the data structure is determined and all the elements 0 of the array are initialized. Thereafter, when an element having the attribute value atr is given, the “art / 10” th element in the histgram is incremented by one. When this is performed for all the elements of the specified set, the number of elements that take the value of 0
In [0], the number of elements taking values from 10 to 19 is histgram [1]
..., The number of elements taking 100 is obtained in histgram [10]. In the case of a multidimensional array, "char b [10]
Declare by arranging the number of elements enclosed in [] as in [5]. In this example, it is declared that the char type data is bundled in 10 × 5 two dimensions.

構造体 構造体は、プログラム上で表形式をとるデータを扱い
たいときに用いる。ある計測装置で測定した電流値をれ
いにとる。測定データには測定箇所が複数あると測定項
目、連続して測定を続けると測定日時、そして電流値な
ど複数のデータが含まれていることがある。「電流値」
と一言で表現しても、それが複数の項目で構成されてい
る。この事柄を第18図のように構造体として宣言して、
使用することができる。構造体にはその型を指定する名
前がつけられている。この場合、「CurrentData」がそ
れにあたるものである。プログラム上で構造体データを
扱うときには、変数・引数の宣言時に構造体の共に名前
を宣言して使用する。
Structure A structure is used when you want to handle tabular data in a program. The current value measured by a certain measuring device is taken. The measurement data may include a plurality of data such as a measurement item when there are a plurality of measurement locations, a measurement date and time when measurement is continuously performed, and a current value. "Current value"
It is composed of a plurality of items. Declare this matter as a structure as shown in Fig. 18,
Can be used. Structures are named to specify their type. In this case, “CurrentData” corresponds to this. When handling structure data in a program, declare the name of the structure and use it when declaring variables and arguments.

構造体の中で宣言された項目をメンバと呼んでいる。
構造体として宣言されたデータは項目単位で、演算をす
ることができる。構造体中の特定のメンバを指定するに
は第18図のように、「.」を用いて行う。構造体のメン
バには、別に宣言された構造体を用いることができる。
またメンバに配列することもできる。
Items declared in the structure are called members.
Data declared as a structure can be operated on an item-by-item basis. To specify a specific member in the structure, use "." As shown in FIG. A structure declared separately can be used as a member of the structure.
They can also be arranged in members.

定数 1とか3.1415あるいは‘a'等の即値を定数と呼ぶ。定
数には、文字定数・整定数・浮動小数点定数が設けられ
ています。
An immediate such as the constant 1, 3.1415 or 'a' is called a constant. Constants are provided with character constants, integer constants, and floating-point constants.

演算子 以上に述べてきた基本データについて様々な演算をす
ることができる。Cの演算子と同じ記述法をしている。
演算子には単項演算子、二項演算子、三項演算子、代入
演算子がある。
Operators Various operations can be performed on the basic data described above. It has the same notation as the C operator.
Operators include unary, binary, ternary and assignment operators.

プラネット開発環境 次に、プラネットを用いてプログラムの作成を行うプ
ログラム作成装置の構成を説明する。
Planet Development Environment Next, the configuration of a program creation device that creates a program using a planet will be described.

全体のシステム(ハードウエア)は、例えば、以下の
各部分から構成できる。
The entire system (hardware) can be composed of, for example, the following components.

制御本体側 マイクロプロセッサ (エディタ、コンパイラ) 主記憶装置(容量:640キロバイト以上) ディスプレイ(アナログRGBディスプレイ) コンソール(マウス) ターゲット側 駆動系 プロセッサ 通信装置 記憶装置 I/O また、プラネット環境として用意される主要ソフトウ
エアを以下に列記する。
Main unit microprocessor (editor, compiler) Main storage device (capacity: 640 KB or more) Display (analog RGB display) Console (mouse) Target drive system processor communication device storage device I / O Prepared as a planet environment The main software is listed below.

xed.exe エディタ xp1.exe パーサ xp2.exe 中間コードジェネレータ xp3.exe Z80コードジェネレータ xp3cc.exe C言語テンプレート用データジェネレ
ータ xp4.exe ネットワークリンカ commdrv.exe HDLC通信ドライバ xnet.exe HDLCネットワークコンフィギュレータ xdb.exe デバッグモニタ xio.exe I/Oチェッカ xhex.exe ROM化ユーティリティ プラネットを用いたプログラム開発の流れを第19図を
参照して説明する。
xed.exe Editor xp1.exe Parser xp2.exe Intermediate code generator xp3.exe Z80 code generator xp3cc.exe Data generator for C language template xp4.exe Network linker commdrv.exe HDLC communication driver xnet.exe HDLC network configurator xdb.exe Debug Monitor xio.exe I / O checker xhex.exe ROMization utility The flow of program development using Planet will be described with reference to FIG.

プラネットプログラムはエディタxedで編集される。
編集されたプログラム情報は、パーサxp1で構文のチェ
ックが行われる。パーサは一枚の図式毎の中間コードを
生成する。パーサxp1で生成されたこれらの中間コード
は、ソータxp12によって宣言されたプロセサ(制御主
体)毎に、必要とされる中間コードが取り込まれて、大
きなひとまとまりの中間コードファイルに変換される。
この中間コードファイルをコードジェネレータxp3にか
けて、z80のマシンコードを生成する。なお、PC9801、P
C286/386で動作させる場合には8086のマシンコードジェ
ネレータが作成されないので、同様な動作を行うプログ
ラムをC言語で記述する必要がある。実行時に必要とな
る通信パケットの情報は、Cのヘッダファイルとして出
力されるので、これを取り込んで使用する。このヘッダ
ファイルを生成するのに必要なデータを生成させるため
に、PC9801の場合はxp3ccをかける必要がある。
Planet programs are edited with the editor xed.
The syntax of the edited program information is checked by the parser xp1. The parser generates an intermediate code for each diagram. These intermediate codes generated by the parser xp1 are converted into a large group of intermediate code files by taking in required intermediate codes for each processor (control subject) declared by the sorter xp12.
This intermediate code file is applied to a code generator xp3 to generate a z80 machine code. PC9801, P
When operating on C286 / 386, the 8086 machine code generator is not created, so it is necessary to write a program that performs the same operation in C language. Since the information of the communication packet required at the time of execution is output as a header file of C, the information is fetched and used. In order to generate the data necessary to generate this header file, it is necessary to apply xp3cc for PC9801.

このようにして生成されたz80マシンコードあるいは
C用のヘッダ情報は、リンカxp4によって、ネットワー
ク上を飛び交うパケットに含まれるコマンドフィールド
が整えられて実際に動作するコードに変換される。更
に、リンカxp4はz80のアセンブラで記述された「.re1」
ファイルを取り込む。すなわち、プラネットとアセンブ
ラのリンクが必要な場合には、リンカxp4をかける段階
でそのリンク作業が行われる。
The z80 machine code or the header information for C generated in this manner is converted into a code that actually operates by adjusting the command field included in the packet that flies over the network by the linker xp4. Furthermore, the linker xp4 is ".re1" written in the z80 assembler.
Import a file. That is, when a link between the planet and the assembler is required, the link operation is performed at the stage of applying the linker xp4.

ここで、プラネット開発環境が使用するファイルを以
下に列記する。
Here, the files used by the planet development environment are listed below.

●.src ソースファイルである。このファイル中に、プログラ
ムの図形情報が全て格納されている。ソースファィルを
複数個作成して、リンクすることも可能である。
● It is a .src source file. In this file, all the graphic information of the program is stored. It is also possible to create multiple source files and link them.

dtstruc.def データ構造体の構成を格納したものである。ソースフ
ァイルを構文解析する際に必要である。
dtstruc.def Stores the structure of the data structure. Required when parsing source files.

●.p1 ●.srcを構文解析した後に生成される中間コードファ
イルである。一枚の図式毎に中間コードファイルが生成
され、ソースファイル●.srcに含まれる全ての図式の解
析結果が含まれている。
● .p1 ● Intermediate code file generated after parsing .src. An intermediate code file is generated for each diagram, and the analysis results of all the diagrams included in the source file ● .src are included.

hardware.def ネットワークのトボロジー(形状)と、ネットワーク
上の各プロセサ(制御主体)名およびネットワークアド
レス、並びに各プロセッサが使用しているI/Oポートお
よびI/Oビットの名前とアドレスを格納している。中間
コードファイル●.p1を寄せ集めてプロセサ毎の走行コ
ードを生成するために使用される。
hardware.def Stores the network topology (shape), the name of each processor (control body) and network address on the network, and the names and addresses of I / O ports and I / O bits used by each processor. I have. Intermediate code file ● .p1 is used to generate running code for each processor by collecting it.

srcs.tab ソータxp2の入力ファイルであり、このファイル内に
は、使用する全てのソースファイル●.srcの名前が記入
されている。このファイルはASCIIファイルであり、市
販のASCIIエディタでユーザーにより作成されるもので
ある。
srcs.tab This is the input file for the sorter xp2, in which the names of all the source files ● .src to be used are entered. This file is an ASCII file and is created by the user using a commercially available ASCII editor.

◎.p1 ソータxp2によって、プロセサ毎に作成されるファイ
ルである。このファイルは各プロセサが必要する全ての
図式の中間コードがまとめられて格納されている。I/O
ポートのアドレス等のハードウエアに密接した情報は、
中間コードファイル●.p1には含まれていないが、ソー
タxp2によってファイル◎.p2に付与される。ここに、
「◎」はプロセサ名を指している。
◎ .p1 A file created for each processor by the sorter xp2. This file stores all the schematic intermediate codes required by each processor. I / O
Information close to the hardware, such as port addresses,
Although not included in the intermediate code file ● .p1, it is added to the file ◎ .p2 by the sorter xp2. here,
"◎" indicates the processor name.

◎.tr デバッガに入力されるデバッグ情報ファイルである。
ソースファイルの所在、プログラムの階層構造等が格納
されている。
◎ .tr Debug information file input to the debugger.
The location of the source file, the hierarchical structure of the program, and the like are stored.

cpus.tab プログラム上に出現するプロセサのリストを格納した
ファイルである。このファイル中には、プロセサ名、プ
ロセサのタイプ、そのネットワーク上のアドレスが含ま
れている。このファイルはASCIIファイルである。
cpus.tab This file contains a list of processors that appear in the program. This file contains the processor name, processor type, and its network address. This file is an ASCII file.

◎.cod z80コードジェネレータxp3が出力する実走行コードの
バイナリファイルである。
◎ .cod This is a binary file of the actual running code output by the z80 code generator xp3.

◎.p3 ネットワーク上でのリンクを必要とするプログラムの
ために、パケットのフォーマットの定義、その定義のた
めの参照テーブルの実アドレス等のネットワーク情報が
格納されている。更に、外部ライブラリの参照のための
アセンブラとのリンク情報も含まれている。
◎ .p3 For a program that requires a link on the network, the definition of the packet format and network information such as the real address of a reference table for the definition are stored. Further, link information with an assembler for referring to an external library is also included.

◎.dpx コードジェネレータが生成するデバッグ情報ファイル
である。ソースファイル上で記述されているものが、実
コードのどのアドレスに対応しているのか等の情報が格
納されている。
◎ .dpx This is a debug information file generated by the code generator. Information such as which address of the actual code corresponds to what is described in the source file is stored.

◎.bin リンカxp4が生成する走行可能なバイナリファイルで
ある。デバッガxdbからダウンロードしたり、ROMに焼い
たりして、実機を動かすことのできる最終的な出力ファ
イルである。
◎ .bin This is a runnable binary file generated by the linker xp4. This is the final output file that can be downloaded from the debugger xdb or burned to ROM and run on a real machine.

◎.cm プロセサのタイプがz80でないときに、リンカxp4が生
成するCプログラム用ヘッダファイルである。
◎ .cm This is a C program header file generated by the linker xp4 when the processor type is not z80.

プラネット処理系であるコンパイラにおける各部分の
入出力ファイルの関係を以下に列記する。
The relationship between the input and output files of each part in the compiler that is a planet processing system is listed below.

次に、エディタの動作およびコンパイラを構成してい
る各処理部の動作を説明する。
Next, the operation of the editor and the operation of each processing unit constituting the compiler will be described.

(エディタxed) エディタxedは、プラネットプログラムの図形情報を
編集し、その図形情報を蓄積するソースファイルを生成
する。プログラム情報には、プログラマが作成したプラ
ネットの手続きを蓄積する●.srcファイル、ハードウエ
アの入出力ポート情報を蓄積するhardware.defファイ
ル、およびデータ構造体宣言の情報を蓄積するdtstruc.
defファイルがある。これら三種類のファイルがエディ
タxedでエディットされる。
(Editor xed) The editor xed edits the graphic information of the planet program and generates a source file for storing the graphic information. In the program information, a .src file that stores planet procedures created by the programmer, a hardware.def file that stores hardware input / output port information, and dtstruc that stores information of data structure declarations.
There is a def file. These three files are edited by the editor xed.

プラネットプログラムは一枚の画面毎に形成されてお
り、画面単位のエディットが必要である。従って、予め
一枚の画面中に許容できる最大の領域長を設定し、その
最大長だけの連続した記憶領域を一単位として記憶の管
理を行うようになっている。この単位記憶領域をメモリ
ブロックと呼ぶ。また、エディタでは複数の画面を一度
に表示、編集できるようにするために、複数のメモリブ
ロックを主記憶あるいは補助記憶中に保持できるように
なっている。ここに、プラネットプログラムはその言語
仕様から画面が階層的木構造をもっている。従ってブロ
ック管理情報を表わすものとして、第20図に示すような
ブロックタッグ(Block Tag)が設定される。
The planet program is formed for each screen, and it is necessary to edit each screen. Therefore, the maximum allowable area length in one screen is set in advance, and storage management is performed using a continuous storage area of the maximum length as one unit. This unit storage area is called a memory block. In the editor, a plurality of memory blocks can be held in main storage or auxiliary storage so that a plurality of screens can be displayed and edited at once. Here, the screen of the planet program has a hierarchical tree structure from its language specification. Accordingly, a block tag (Block Tag) as shown in FIG. 20 is set to represent the block management information.

エディット作業は、例えばマウスとキーボードによっ
て行われる。またこの作業はマルチウインドウ方式で行
われる。上記したようにプラネットプログラムは一枚の
図式毎に作成される。図式を表示した一枚のシートが一
つのウインドウに対応する。ウインドウには、プログラ
ム図式の他にハードウエアのアドレス宣言、データ構造
体宣言も含まれている。これらのウインドウを重ねて表
示しながら幾つものウインドウを同時にエディット可能
である。すなわち、プラネットプログラム管理情報はウ
インドウシステムと連結されており、第21図に示すリス
ト構造となっている。従って、以下の手順によりマウス
のイベントからプラネットプログラム画面情報が得られ
る。
The editing operation is performed using, for example, a mouse and a keyboard. This operation is performed in a multi-window system. As described above, a planet program is created for each diagram. One sheet displaying the diagram corresponds to one window. The window includes a hardware address declaration and a data structure declaration in addition to the program schema. While displaying these windows in a superimposed manner, it is possible to edit a number of windows at the same time. That is, the planet program management information is linked to the window system, and has a list structure shown in FIG. Therefore, planet program screen information can be obtained from a mouse event by the following procedure.

マウスのイベントのx,y座標からウインドウシステム
が該当ウインドウの識別子を得る。
The window system obtains the identifier of the corresponding window from the x and y coordinates of the mouse event.

表示ブロックリスト中、このウインドウ識別子の一致
する要素を探索し、ブロック管理情報「Block Tag」を
得る。
The display block list is searched for an element that matches this window identifier, and block management information “Block Tag” is obtained.

この「Block Tag」中のブロック本体の内容に基づ
き、記憶媒体内から画面情報を得る。
Screen information is obtained from the storage medium based on the contents of the block body in the “Block Tag”.

ここで、プラネットコンパイラは、ネットワーク上に
複数のプロセサが存在する場合には、それぞれのプロセ
サ上で動作するそれぞれの走行コードを一度に作成す
る。このために、コンパイラは、ネットワーク上にどの
ようなプロセサが存在するのか、各プロセサがどのよう
な構造で結合されているのか、プロセサ上にどのような
I/Oポートが組み込まれ、どのポートアドレスにどのよ
うなハードウエアが接続されているのかといった情報が
必要である。かかる情報を規定することをハードウエア
宣言という。この宣言はプログラムの手続きと同様に必
ず必要なものである。この宣言を、第22図に示すような
ネットワーク構造のシステムを例に挙げて説明する。
Here, when there are a plurality of processors on the network, the planet compiler creates the respective running codes operating on the respective processors at one time. To do this, the compiler needs to know what processors are present on the network, how each processor is connected, and what
Information such as which I / O ports are built in and what hardware is connected to which port address is required. Specifying such information is called a hardware declaration. This declaration is necessary as well as the procedure of the program. This declaration will be described using a system having a network structure as shown in FIG. 22 as an example.

まず、この宣言における各プロセサの宣言について説
明する。ネットワーク上のプロセサはそれ自体が制御実
体であるので名前が必要となる。図示の例では、プロセ
サ「host」に「measurement」と「assembly」の二つの
プロセサが結合されている。更に、「measurement」に
は「subm」が接続されている。この図において左肩に記
述されている数字がネットワークアドレスを表してい
る。各プロセサの宣言は、プロセサ名、プロセサのタイ
プおよびネットワーク形状をそれぞれ特定することによ
り行われる。プロセサ名はキーボードから制御実体名と
して記述できる文字列を入力することによって特定され
る。プロセサのタイプは例えば以下のキーワードのうち
の一つを入力することによって特定される。コンパイラ
はプロセサのタイプ毎に異なる出力を生成する Jupiter STD−バスシステムJupiterの駆動系に
合わせた走行コードを生成する。
First, the declaration of each processor in this declaration will be described. A processor on a network needs a name because it is a control entity itself. In the illustrated example, two processors “measurement” and “assembly” are connected to the processor “host”. Furthermore, “subm” is connected to “measurement”. In this figure, the numbers described at the left shoulder represent network addresses. The declaration of each processor is performed by specifying the processor name, the processor type, and the network shape, respectively. The processor name is specified by inputting a character string that can be described as a control entity name from the keyboard. The processor type is specified, for example, by inputting one of the following keywords. The compiler generates running code according to the drive system of the Jupiter STD-Bus system Jupiter, which generates different outputs for each processor type.

IO IOシステムIO用の駆動系に合わせた走
行コードを生成する。
IO Generates a running code that matches the drive system for the IO system IO.

パーソナルコンピュータ パーソナルコンピュータ上で動作する
Cプログラムのために、通信パケットの形状を宣言した
ヘッダファイルを生成する。プログラム実体は、ユーザ
がCによりプログラムする。
Personal Computer Generates a header file that declares the shape of a communication packet for a C program running on a personal computer. The program entity is programmed by the user with C.

次に、ネットワーク形状の宣言を説明する。この宣言
は木構造におけるネットワークにおいて、一階層中に存
在するプロセサの宣言を行うことである。図示のネット
ワークでは、measurementとassemblyが結合されている
ので、プロセサhostに対してこれらのプロセサmeasurem
entとassemblyが宣言される。第23図(A)には、一階
層中に存在する三つのプロセサを宣言した例を示してあ
る。この図において、左から順に、ネットワークアドレ
ス、プロセサタイプ、プロセサ名が宣言されている。ま
た、これらのプロセサのネットワーク関係が上下の配置
関係で示されている。このようにして、ネットワーク一
階層文のプロセサ接続関係が宣言される。ここに、図示
のネットワークにおいては、プロセサsubmも宣言しなけ
ればならない。このプロセサはmeasurementの下位層に
接続されている。これを宣言するためにはmeasurement
に対して第23図(B)に示すようにsubmを宣言する。プ
ラネットコンパイラは、このようなネットワーク宣言の
情報をもとに、プログラム中に含まれているプロセサを
検出し、そのプロセサに割り振るべき走行コードを作成
する。
Next, the declaration of the network shape will be described. This declaration is to declare the processors that exist in one hierarchy in the tree network. In the illustrated network, measurement and assembly are combined, so that processor processor
ent and assembly are declared. FIG. 23 (A) shows an example in which three processors existing in one hierarchy are declared. In this figure, a network address, a processor type, and a processor name are declared in order from the left. In addition, the network relationship of these processors is shown in the vertical arrangement relationship. In this way, the processor connection relation of the one-layer network statement is declared. Here, in the network shown, the processor subm must also be declared. This processor is connected to the lower layer of measurement. Measurement to declare this
Subm is declared as shown in FIG. 23 (B). The planet compiler detects a processor included in the program based on the information of such a network declaration, and creates a running code to be allocated to the processor.

(コンパイラ) ユーザが入力したプラネットプログラムの図形情報
を、制御機器上で直接実行可能なプログラムに変換する
処理系であり、ペトリネットの実行制御規則をプログラ
ム解析時に導入し、グラフ理論におけるDFS、BFS、DAG
等のような手法を用いて、コントロールフロー、データ
フローを解析し、図形で得られるプラネットプログラム
構造を並列に動作する複数の逐次プロセスに展開する。
このようにして生成された各プロセスに対して、マイク
ロプロセサのコード選択、生成コードの最適化を適用し
て実走行コードを生成している。以下に、コンパイラの
各処理系について説明する。
(Compiler) This is a processing system that converts the graphic information of the planet program input by the user into a program that can be directly executed on the control device. It introduces the execution control rules of Petri net at the time of program analysis, and uses DFS and BFS in graph theory. , DAG
The control flow and the data flow are analyzed by using a method such as that described above, and the planet program structure obtained by the graphic is developed into a plurality of sequential processes operating in parallel.
The actual running code is generated by applying code selection of the microprocessor and optimization of the generated code to each of the processes generated as described above. Hereinafter, each processing system of the compiler will be described.

パーサxp1 パーサxp1は、エディタxedで作成されたプラネットプ
ログラムの図形情報ファイル●.srcを解析して、仮想機
械の走行コードである三番地コードを生成する。プログ
ラムの三番地コードは●.p1という中間コードファイル
に格納される。パーサxp1は一枚のプログラム枠毎に解
析を行う。生成された一枚毎のプログラム情報は、以降
の操作で一つにまとめられて、大きなプログラムを構成
することになる。
Parser xp1 The parser xp1 analyzes the graphic information file ● .src of the planet program created by the editor xed, and generates a three-address code which is a running code of the virtual machine. The third address code of the program is stored in an intermediate code file called ● .p1. The parser xp1 performs analysis for each program frame. The generated program information for each sheet is combined into one by the following operations to form a large program.

ソータxp2 ソータxp2は、パーサxp1が出力するブロック毎の解析
結果を、中間コードレベルでリンクする。リンクされた
中間コードは、プロセサ毎にファイルに格納される。こ
のファイルを次に述べるコードジェネレータにかけて、
実際に走行可能なマシンコードをプロセサ毎に得ること
ができる。
Sorter xp2 The sorter xp2 links, at the intermediate code level, the analysis result for each block output by the parser xp1. The linked intermediate code is stored in a file for each processor. Apply this file to the code generator described below,
A machine code that can be actually run can be obtained for each processor.

ソータxp2の動作を述べると次のようになる。 The operation of the sorter xp2 is as follows.

まず、エディタxedで作成されたhardware.defファイ
ルに格納されているプロセサ「◎」を求める。
First, the processor "◎" stored in the hardware.def file created by the editor xed is obtained.

プロセサの名前と一致するブロックを、指定された入
力ファイル群の中から検索して、そのブロックの中間コ
ードを、◎.p2というファイルに格納する。
A block that matches the processor name is searched from the specified input file group, and the intermediate code of the block is stored in the file ◎ .p2.

更にプロセサの名前と同一のブロックが下位階層ブロ
ックを呼び出している場合には、その下位階層ブロック
を検索して、◎.p2に追加する。また、それらのブロッ
クが起動している全ての制御実体のブロックも同じよう
に検索して、◎.p2ファイルに追加する。
Further, when a block having the same name as the processor calls a lower hierarchical block, the lower hierarchical block is searched and added to ◎ .p2. In addition, all control entity blocks in which those blocks are activated are similarly searched and added to the ◎ .p2 file.

必要される全てのブロック◎.p2ファイルに格納する
ときに、そのプロセサ◎が漏っているI/Oポートとビッ
トのアドレス、名前の情報を検索して、ブロック中にお
いて、I/Oポート、ビットを使用している場合にはそれ
らのアドレスを◎.p2ファイルに書き込む。
When storing all necessary blocks ◎ .p2 files, the processor ◎ searches for leaked I / O ports, bit address and name information, and finds I / O ports, If bits are used, write those addresses to the ◎ .p2 file.

下位階層ブロックがアクセスしているグローバル変数
をリンクする。
Links global variables accessed by lower-level blocks.

ここで、このソータxp2を起動させる前に、入力ファ
イルリストを定義するsrcs.tabというファイルを作成し
ておく必要がある。このファイルは、市販のASCIIファ
イルエディタで編集可能である。このsrcs.tabファイル
の中にプログラムが必要とする全てのソースファイルの
名前を記入しておく。ソータxp2はこのファイルを読む
ことにより入力ファイルを検知し、前述の動作を行う。
Here, before starting this sorter xp2, it is necessary to create a file called srcs.tab that defines the input file list. This file can be edited with a commercially available ASCII file editor. In the srcs.tab file, enter the names of all source files needed by the program. The sorter xp2 detects the input file by reading this file, and performs the above-described operation.

コードジェネレータxp3 コードジェネレータxp3は、ソータxp2が出力する仮想
機械の中間コードを入力として、それと等価なz80が走
行可能なマシンコードを生成する。生成されるマシンコ
ードは、後述するプラネット駆動系に依存している。上
記のソータxp2が出力する◎.p2ファイルには、プロセサ
が単体で走行可能な全ての情報が含まれている。ジェネ
レータxp3はその情報をもとに、マシンコードばかりで
なく、ネットワーク上のリンク情報、他言語とのリンク
情報を生成する。
Code Generator xp3 The code generator xp3 receives the intermediate code of the virtual machine output by the sorter xp2 as input, and generates a machine code that can run z80 equivalent to the intermediate code. The generated machine code depends on a planet driving system described later. The ◎ .p2 file output by the sorter xp2 contains all information that the processor can run alone. Based on the information, the generator xp3 generates not only machine code but also link information on a network and link information with other languages.

リンカxp4 リンカxp4は、コードジェネレータxp3が生成するネッ
トワーク上のリンク情報と、アセンブラとのリンク情報
をもとに、それらの要件をすべてリンクして、プラネッ
ト駆動系上で実際に動作可能なマシンコードを生成す
る。またCで記述されたプロセサに対して、ネットワー
ク上でリンクするためのC用ヘッダファイルを作成す
る。リンカxp4は、コードジェネレータの出力を受けて
動作する。まず、コードジェネレータが出力するネット
ワーク上のリンク情報の整合性を検出して、ネットワー
ク上を飛び交う通信パケットの形状を決定する。次に、
アセンブラで記述されたモジュールをリンクするための
情報をもとに、指定されたライブラリファイルからその
モジュールを検索して、走行コードを追加する。このよ
うにして得られた走行コードを、実走行コードファイル
として出力する。プラネットプログラム中に複数のプロ
セサが記述されていると、全てのプロセサの実走行コー
ドファイルを一度に生成する。
Linker xp4 Linker xp4 links all of those requirements based on the link information on the network generated by the code generator xp3 and the link information with the assembler, and the machine code that can actually operate on the planet drive system Generate In addition, a C header file is created for linking the processor described in C on the network. The linker xp4 operates by receiving the output of the code generator. First, the consistency of link information on the network output by the code generator is detected, and the shape of a communication packet flying over the network is determined. next,
Based on the information for linking the module described by the assembler, the module is searched from the specified library file, and the running code is added. The traveling code thus obtained is output as an actual traveling code file. When a plurality of processors are described in the planet program, the actual running code files of all the processors are generated at once.

(デバッガxdb) プラネットのコンパイラを介して得られた実行可能な
マシンコードが正しく動作するか否かは、デバッグモニ
タを用いて検証できる。デバッグモニタプログラムは例
えば、PC9801、PC286/386上で実行可能である。このデ
バッガの内容は、プログラムのダウンロード、プログラ
ムのトレース、I/Oポートのモニタリング、変数の参照
および更新などの機能がある。このデバッガにより、タ
ーゲトプロセサの動作をソースレベルで監視することが
可能である。ソースレベルでデバッグ可能であるので、
デバッグ作業を効率良く行うことができ。なお、このデ
バッグ作業は、エディタによるプログラム作成と同様に
マウスとキーボードを使用して、マルチウンドウ上で行
うことができる。
(Debugger xdb) Whether or not the executable machine code obtained through the Planet compiler operates correctly can be verified using a debug monitor. The debug monitor program can be executed on, for example, PC9801, PC286 / 386. The contents of this debugger include functions such as downloading programs, tracing programs, monitoring I / O ports, and referencing and updating variables. With this debugger, the operation of the target processor can be monitored at the source level. Since it can be debugged at the source level,
Debugging work can be performed efficiently. This debugging work can be performed on a multi-window using a mouse and a keyboard as in the case of creating a program using an editor.

ターゲットプロセサのモニタリングは、デバッガxdb
が走行する処理系とターゲットプロセサが専用のHDLC通
信改選で結合されたネットワークを介して行う。ターゲ
ットプロセサに通信路を介して問い合わせコマンドを発
行し、その応答に基づきターゲットプロセサの状態を監
視する。
The monitoring of the target processor is done by the debugger xdb
It is performed via a network in which the processing system on which is running and the target processor are connected by a dedicated HDLC communication reselection. An inquiry command is issued to the target processor via a communication path, and the status of the target processor is monitored based on the response.

ここで、プラネットプログラムを動作させるターゲッ
トプロセサ駆動系の実行時の負荷を軽減するために、エ
ットワークコンフィギュレーションという作業が行われ
る。この作業は、通信の制御を行う基板にネットワーク
の様々な情報を予め付与することであり、これによって
通信基板と駆動系とを並列に動作させて、機能分散を図
るためのものである。このコンフィギュレーションが行
われた駆動系では、この情報が例えばバックアップ用の
RAMなどの記憶装置内に保持される。
Here, in order to reduce the load at the time of execution of the target processor driving system for operating the planet program, an operation called an network configuration is performed. This operation is to add various information of the network to the board for controlling the communication in advance, and thereby the communication board and the drive system are operated in parallel to distribute the functions. In the drive system where this configuration is performed, this information is used, for example, for backup.
It is held in a storage device such as a RAM.

デバッグ動作を説明する。まず、画面上にプラネット
駆動系のネットワーク情報を表示する。すなわち、エデ
ィタxedで編集したファイルhardware.defのネットワー
ク情報を表示する。この表示画面をプロセサウインドウ
と呼び、第24図に示すように表示される。この図におい
て、各プロセサの左肩の数字がネットワークアドレスで
あり、左下の数字がプロセサの識別子である。これらの
情報は、ファイルhardware.def内の情報からコンバイラ
が自動的に生成したものである。
The debugging operation will be described. First, the network information of the planet driving system is displayed on the screen. That is, the network information of the file hardware.def edited by the editor xed is displayed. This display screen is called a processor window, and is displayed as shown in FIG. In this figure, the number on the left of each processor is the network address, and the number on the lower left is the identifier of the processor. These pieces of information are automatically generated by the combiner from the information in the file hardware.def.

次に、モニターすべきターゲットプロセサを指定し
て、そのプロセサの走行コードに含まれている全ての手
続きの階層情報を表示させる。この手続きはソータxp2
とリンカxp4によって寄せ集められた手続きである。第2
5図には、プロセサ「host」の階層図を示してある。こ
の階層情報のうちの目標とするブロックにおけるソース
プログラムを呼び出す。指定されたソースプログラムは
ソースファイルから検索される。第26図には呼び出され
た「main」というブロックのソースプログラムを表示し
てある。このようにしてソースプログラムを呼び出した
後は、このプログラムが指定したターゲットプロセサに
ダウンロードされる。
Next, a target processor to be monitored is specified, and hierarchical information of all procedures included in the running code of the processor is displayed. This procedure is sorter xp2
And the procedure gathered by the linker xp4. No. 2
FIG. 5 shows a hierarchical diagram of the processor “host”. A source program in a target block of the hierarchical information is called. The specified source program is searched from the source file. FIG. 26 shows the source program of the called “main” block. After calling the source program in this way, the program is downloaded to the specified target processor.

次に、ブレークポイントの設定が行われる。或る処理
要件の所にブレークポイントが設定されると、その設定
が行われた旨の表示がこの処理要件の枠の部分に表示さ
れる。ブレークポイントの設定後は、ターゲットプロセ
サの実行を開始する。
Next, a breakpoint is set. When a breakpoint is set at a certain processing requirement, an indication that the setting has been made is displayed in the frame of the processing requirement. After setting the breakpoint, execution of the target processor is started.

ターゲットプロセサの実行中においては、作成した状
態の図形情報からなるソースプログラムが継続して表示
されており、ブレークポイントが設定されている節の部
分に制御が到達すると、その節の部分に例えば赤色の円
が点滅して、その旨が表示され、ここの部分で制御が停
止する。
During the execution of the target processor, the source program consisting of the graphic information in the created state is continuously displayed. When control reaches the section where the breakpoint is set, for example, a red Flashes to indicate that, and the control stops at this point.

ブレークポイントに到達しているプロセスをトレース
して一ステップづつ制御を実行させる場合には、処理位
置を示す赤色の円が動作中の処理要件の中に順次表示さ
れる。
When the process reaching the breakpoint is traced and the control is executed step by step, a red circle indicating the processing position is sequentially displayed in the active processing requirements.

このようにしてデバッグされた後のプログラムは、EP
ROMなどの記憶媒体内に格納される。
After being debugged in this way, the program
It is stored in a storage medium such as a ROM.

プラネットの駆動系 次に、上記のように作成されたプラネットプログラム
を実行するための駆動系を説明する。
Next, a drive system for executing the planet program created as described above will be described.

第27図に駆動系(カーネル)の全体構成を示す。図に
おいて矢印はプロセスの流れを示す。ここに、プロセス
とはカーネル内で活性化されているプログラムコントロ
ールを指している。
FIG. 27 shows the overall configuration of the drive system (kernel). In the figure, arrows indicate the flow of the process. Here, the process refers to the program control activated in the kernel.

図において、Initial Controlは、カーネルが立ち上
がった時点で、初期に実行すべきプロセスを(もしあれ
ば)Process Executionに送る。CP/inは、他プロセスか
らのパケットを受理する通信ポートである。バケット自
身もプロセスである。Rx packet Manangementは、受理
したパケットに評価して、パケットで表現された処理を
行う。必要に応じてプロセスをProcess Exencutionへ送
る。Process Executionは、Initial Control或いはRx P
acket Managementから送られてきたプロセスを順繰りに
実行する。実行しているプロセサが時間待ち要求を発行
すれば、該プロセスをDelay Controlへ送る。また、実
行プロセスが他プロセサ実行要求を発行すれば、該要求
をプロセスに整形してTx Packet Managementへ送る。De
lay Controlは、Process Executiontから送られたプロ
セスを待ち時間をパラメータとして受理し、該プロセス
を指定された時間だけ保持してその後再びProcess Exec
utionに送出する。Tx Packet Managementは、受理した
プロセスをCP/outを介して、他プロセサに送出する。
In the figure, Initial Control sends the process to be executed initially (if any) to Process Execution when the kernel starts up. CP / in is a communication port that receives packets from other processes. The bucket itself is also a process. The Rx packet management evaluates the received packet and performs processing represented by the packet. Send the process to Process Exencution as needed. Process Execution is Initial Control or RxP
Execute the process sent from acket Management in order. If the executing processor issues a time wait request, the process is sent to Delay Control. When the execution process issues another processor execution request, the request is shaped into a process and sent to Tx Packet Management. De
The lay control receives the process sent from Process Executiont with the waiting time as a parameter, holds the process for the specified time, and then returns to Process Exec
ution. Tx Packet Management sends the received process to another processor via CP / out.

(プロセスの並列駆動制御) プラネットプログラムの実行中においては、プロセサ
内にプロセスが一つ以上存在する。複数のプロセスを同
時的に動作させるための手法としては、TSS(Time Shea
ring System)が一般的に採用されている。しかし、こ
の手法では、共有変数を複数のプロセスがアクセスする
ことに起因して必ず副作用が発生する。この副作用がプ
ログラム検証時に大きなネックになり、デバッグを困難
にしている原因と考えられるので、代替手法の必要性が
ある。以下に、この点を詳細に説明する。
(Parallel Driving Control of Processes) During the execution of the planet program, one or more processes exist in the processor. As a method for operating multiple processes simultaneously, TSS (Time Shea
ring System) is generally adopted. However, in this method, side effects always occur due to the fact that multiple processes access the shared variable. Since this side effect is considered to be a major bottleneck in program verification and makes debugging difficult, there is a need for an alternative method. Hereinafter, this point will be described in detail.

機器組み込み型ソフトウエアの特質に鑑みると、対象
となる制御機器の動作は、CPUの処理能力に比べて充分
に遅いものであると見なすことができる。例えば、機械
体を制御するI/Oボードのホトカプラの応答速度でさえ
も10ミリ秒のオーダーであり、この程度の時間があれ
ば、z80であってもかなりの処理を実行することが可能
である。この点に鑑みれば、並行して動作する複数のプ
ロセスは、どこかの事象待ちに「引っ掛かり引っ掛か
り」実行されている。そして、事象が生起すれば一瞬の
うちに応答処理をこなすことになる。このように、一般
的には事象生起の時間間隔に比べて、応答処理に要する
時間は極めて少ない。この点を考慮して、本プラネット
駆動系においては並行駆動処理の原理として以下の内容
のものを採用している。
In view of the characteristics of the device embedded software, the operation of the target control device can be considered to be sufficiently slow in comparison with the processing capability of the CPU. For example, the response speed of the photocoupler of the I / O board that controls the machine is even on the order of 10 milliseconds, and with this time, it is possible to perform considerable processing even at z80. is there. In view of this point, a plurality of processes that operate in parallel are executed “waiting and catching” while waiting for some event. Then, if an event occurs, a response process is performed in an instant. As described above, generally, the time required for the response processing is extremely shorter than the time interval of the occurrence of the event. In consideration of this point, the planet driving system adopts the following principle as the principle of the parallel driving process.

複数のプロセスがそれぞれ事象待ち状態にある場合を
考慮する。この場合には、各プロセスは事象の生起を検
知する。事象が生起していなければ、他のプロセスを実
行するように、システムコール(SWAP)を行う。このよ
うにして、複数の事象待ちを順繰りに検知して、事象が
生起したときにはプロセスは応答処理を直ちに行い、し
かる後にシーケンス中の次に事象待ち処理まで走行す
る。
Consider a case where a plurality of processes are each in an event waiting state. In this case, each process detects the occurrence of an event. If no event has occurred, make a system call (SWAP) to execute another process. In this way, a plurality of event waits are sequentially detected, and when an event occurs, the process immediately performs a response process, and thereafter runs to the next event wait process in the sequence.

すなわち、Process Executionは、Initial Control、
Rx Packet Management或いはDelay Controlから送られ
てくるプロセスを蓄積する。これらのプロセスは第28図
に示すように、リングキューに結合することで蓄積す
る。更に、Rungなるプロセスへのポインタを設定する。
Process Excecutionの並行動作形態は次のようになる。
That is, Process Execution is Initial Control,
It accumulates processes sent from Rx Packet Management or Delay Control. These processes accumulate by coupling to a ring queue, as shown in FIG. Further, a pointer to a process called Rung is set.
The parallel operation form of Process Excecution is as follows.

Rungの指示するプロセスのProgram Code addressタグ
が示すコードアドレスに制御を渡す。
The control is passed to the code address indicated by the Program Code address tag of the process specified by Rung.

制御を渡されたプロセスは、与えられたコードを走行
し、Program Excecutionに制御を戻す。
The process given control runs the given code and returns control to the program execution.

Rungの指示するプロセスを一つ進める。Step through the process directed by Rung.

上記のないしまでの動作を繰り返す。The above operations are repeated.

プロセスの走行コード詳細について説明する。 The details of the running code of the process will be described.

第29図には、「event1を検出した後に、action1を実
行し、更にevent2を検知する」という逐次手続きと、
「event3を検知した後、action2を実行する」という逐
次手続きの例が示されている。この図において、(b)
と(d)とに現れているUPDATEPCというコードはシステ
ムコールである。これは上記のSWAPでプロセス駆動が行
われるときに、走行コードアドレスを、UPDATEPCの直後
に設定する機能を果たす。プロセスの実行を走行コード
を追って述べる。手続き列(b)を走行するプロセスが
(ア)に到達すると、UPDATAPCによってそのプロセスを
表すPCB(Process Control Block)には(イ)のアドレ
スが登録される。次に(イ)の事象検知を行い、これが
生起していなければ(ウ)のSWAPによってプロセスの実
行が中断される。再び、そのプロセスが実行されるとき
には、このUPDATAPCで設定された(イ)のアドレスから
実行される。event1が生起していなければ再びSWAPによ
って実行が中断される。しかし、このevent1が生起して
いれば、(エ)のaction1の実行コードを走行して、次
に事象待ちのための(オ)のUPDATEPCを行って、事象待
ちevent2を検知する。同様にして、event3を検知する手
続きが行われる。
FIG. 29 shows a sequential procedure of “executing action1 after detecting event1, and further detecting event2”;
An example of a sequential procedure "execute action2 after detecting event3" is shown. In this figure, (b)
The code UPDATEPC appearing in (d) is a system call. This functions to set the running code address immediately after UPDATEPC when the process drive is performed by the above SWAP. The execution of the process will be described following the running code. When the process running in the procedure sequence (b) reaches (a), the address (b) is registered in the PCB (Process Control Block) representing the process by UPDATAPC. Next, the event detection of (a) is performed, and if this does not occur, the execution of the process is interrupted by the SWAP of (c). When the process is executed again, the process is executed from the address (a) set by UPDATAPC. If event1 has not occurred, execution is interrupted again by SWAP. However, if event1 has occurred, the execution code of action1 of (d) is run, and then UPDATEPC of (e) for event waiting is performed, and event waiting event2 is detected. Similarly, a procedure for detecting event3 is performed.

(プロセスの駆動制御) プロセスへの順繰りなCPUタイムのサービスを行わせ
るためには、それぞれのプロセスに対応しているPCB
は、上述したように駆動系内でリングキュー(駆動キュ
ー)に結合されている。駆動キューに結合されているPC
Bがその時点で実行される。この駆動キューに対してPCB
を挿入し、あるいは削除するシステムコールが用意され
ている。
(Process drive control) In order to provide services with repetitive CPU time to processes, PCBs that correspond to each process
Are connected to a ring queue (drive queue) in the drive system as described above. PC coupled to drive queue
B is executed at that time. PCB for this drive queue
There is a system call to insert or delete a file.

このうち、システムコールFORKは、プラネットプログ
ラムの実行時に、駆動キューに新たなPCBを挿入するこ
とで、新しいプロセスを生成して並列に動作させるため
のものである。このFORKには起動したい手続きの先頭ア
ドレスがパラメータとして設定されている。プロセスの
実行の側面から述べると、あるプロセスがFORKシステム
コールに到達したときには、駆動系は新たなプロセスを
一つ得てそれを駆動キューに挿入する。この新たに挿入
されたプロセスの処理後に、FORKを発行したプロセスが
実行を継続する。FORKは処理を終了した後には、生成し
たプロセスの識別子を発生する。
Of these, the system call FORK is for inserting a new PCB into the drive queue when a planet program is executed, thereby generating a new process and operating it in parallel. In this FORK, the start address of the procedure to be invoked is set as a parameter. In terms of process execution, when a process reaches the FORK system call, the driving system obtains a new process and inserts it into the driving queue. After processing the newly inserted process, the process that issued the FORK continues execution. After FORK finishes processing, it generates an identifier of the created process.

この手続きを第30図に示してある。図に示すように、
Process Exwcution下で実行状態にあるプロセスの走行
コードがProcess Excecutionに対してFORKを発行するこ
とにより、他コードがプロセスを得て、並行駆動状態に
参加する。この手続きの入力パラメータとして被駆動コ
ードアドレスをあたえ、FORK手続きを呼び出すことによ
り、プロセス識別子が出力パラメータとして得られる。
This procedure is shown in FIG. As shown in the figure,
When the running code of the process in the execution state under the process execution issues a FORK to the process execution, another code acquires the process and participates in the parallel driving state. By giving the driven code address as an input parameter of this procedure and calling the FORK procedure, a process identifier is obtained as an output parameter.

次にABORTシステムコールは、一連の逐次的手続き列
を実行し終えたプロセスを放棄するときに発行される。
これが発行されると、駆動系はそのプロセスに対応する
PCBを駆動キューから削除して棄却する。すなわち、第3
1図に示すように、実行状態にあるプロセスが走行終了
し、プロセス駆動を放棄する場合、このプロセスがProc
ess Executionに対してABORTを発行することで、このプ
ロセスは並行駆動系から除外されることになる。
The ABORT system call is then issued when abandoning a process that has executed a series of sequential procedures.
When this is issued, the drivetrain responds to the process
Remove PCB from drive queue and reject. That is, the third
As shown in Fig. 1, when a running process terminates running and abandons process driving, this process
Issuing an ABORT for ess Execution removes this process from the parallel drive.

KILLシステムコールは、実行中のプロセスを別のプロ
セスから破棄したい場合に発行される。入力パラメータ
として、プロセスの識別子が必要となる。KILLが発行さ
れたときに、駆動系は指定されたプロセスに対応するPC
Bを駆動キューから削除して破棄する。この後に、KILL
を発行したプロセスが実行を継続する。すなわち、第32
図に示すように、実行状態にあるプロセスの走行コード
がProcess Executionに対して他プロセスの中止要求KIL
Lを発行することにより、他プロセスを並列駆動系から
除外する。KILL手続きの入力パラメータとして、手続き
FORKによって返されたプロセス識別子を用いる。即ち、
関連し合って並列駆動しているプロセス群は、中止すべ
きプロセスの識別子を認識する手段を有している必要が
ある。
The KILL system call is issued when you want to destroy a running process from another process. A process identifier is required as an input parameter. When KILL is issued, the drive system is the PC corresponding to the specified process.
Delete B from the drive queue and discard it. After this, KILL
Process continues to execute. That is, the 32nd
As shown in the figure, the running code of the process in the execution state is a process execution request
By issuing L, other processes are excluded from the parallel drive system. Procedure as an input parameter of the KILL procedure
Use the process identifier returned by FORK. That is,
The group of processes that are driven in parallel in association with each other need to have means for recognizing the identifier of the process to be stopped.

DELAYシステムコールは、入力パラメータで指定され
た時間だけプロセス駆動を中断させるときに発行され
る。このコールを発行したプロセスに対応するPCBが、
駆動キューから削除され、指定された時間の後に再び駆
動キューに挿入される。挿入された後に、DELAYを発行
した次にアドレスから実行が行われる。このように、指
定時間だけ待つ処理が実現される。
The DELAY system call is issued when suspending the process drive for the time specified by the input parameter. The PCB corresponding to the process that issued this call
It is deleted from the driving queue and re-inserted into the driving queue after a specified time. After insertion, execution is performed from the address after issuing DELAY. In this way, the process of waiting for the designated time is realized.

(プロセス同期処理) 第33図に示すような接続構造を持つプラネットプログ
ラムを例にして説明する。このプログラムにはプロセス
の並行駆動とそれらの同期が記述されている。ここにお
いては、二つのプロセスが必要となる。処理系列が二つ
に別れているからである。これらのプロセスの同期は図
に示すように、一般的にはカウンタによって実現され
る。ここでは、mvalueがその変数である。まず、最初に
同期カウンタを0に初期化する(ア)。次に、「ml」を
実行するようにコードを生成する(イ)。この後に、矢
印が二つに別れているので、左側の処理系列を現時点の
プロセスで実行し、右側を新しいプロセスで実行するよ
うに、FORKシステムコールを実行する(ウ)。このFORK
は処理を終了すると次のアドレスから実行を開始するの
で、(エ)の位置に左側の走行モジュールm2を配置す
る。ここに、同期は(キ)、(ク)のように実現される
ので、そのコードのところに飛び込むようになる
(オ)。次に並行動作すべきモジュールm3を配置する
(カ)。同期を実現するコードは二つのプロセスが走行
する。最初に到達したプロセスはmvalueを増加させて1
にする。mvalueは2ではないので、最初に到達したプロ
セスは破棄される。次に到達したプロセスがmvalueを2
にする。この結果、プロセスは破棄されずにモジュール
m4を走行する。ここにおける例では、2であるが、mval
ueとの比較値は入力する矢印の本数と一致する。
(ア)、(キ)、(ク)の機構により、同期を取る処理
が実現される。最後の同期機構に到達したプロセスは処
理を継続して、それ以外は破棄される動作を行うことに
なる。
(Process Synchronous Processing) A description will be given by taking a planet program having a connection structure as shown in FIG. 33 as an example. This program describes the parallel driving of processes and their synchronization. Here, two processes are required. This is because the processing sequence is divided into two. Synchronization of these processes is generally realized by a counter as shown in the figure. Here, mvalue is that variable. First, the synchronization counter is initialized to 0 (A). Next, code is generated to execute "ml" (a). After this, since the arrow is divided into two, the FORK system call is executed so that the processing sequence on the left is executed by the current process and the right is executed by the new process (c). This FORK
When the processing is completed, the execution is started from the next address, so the left traveling module m2 is arranged at the position (d). Here, since the synchronization is realized as shown in (g) and (h), the user jumps into the code (e). Next, a module m3 to be operated in parallel is arranged (f). The code that achieves synchronization runs in two processes. The process reached first increases mvalue by 1
To Since mvalue is not 2, the process that arrived first is discarded. The next process arrives at mvalue 2
To As a result, the process is not
Drive on m4. In the example here, it is 2, but mval
The comparison value with ue matches the number of arrows to be input.
By the mechanisms (a), (g), and (h), a process for achieving synchronization is realized. The process that has reached the last synchronization mechanism will continue processing, and will perform the operation that is otherwise discarded.

(階層管理) 階層管理はスタックを用いて実現している。各プロセ
スに現階層のスタックフレームを表現するefp、erpとス
タックポインタspを付与する。各プロセスは、それ自身
のフレームポインタとオフセットによって、内部データ
をアクセスする。第34図を参照して下位階層をインボー
クするときの手続きを以下に示す。
(Hierarchy management) Hierarchy management is realized using a stack. Each process is provided with efp and erp representing the stack frame of the current hierarchy and a stack pointer sp. Each process accesses internal data by its own frame pointer and offset. Referring to FIG. 34, the procedure for invoking the lower hierarchy will be described below.

出力データを格納する記憶領域を得るために、スタッ
クポインタSPを領域長だけ減じる(SP1)。
In order to obtain a storage area for storing output data, the stack pointer SP is reduced by the area length (SP1).

入力データをプッシュする(SP2)。Push input data (SP2).

現在のフレームポインタ(eprとefp)をプッシュする
(SP3)。
Push the current frame pointer (epr and efp) (SP3).

戻りアドレスをプッシュする(SP4)。Push the return address (SP4).

現時点のスタックポインタ値を新しいフレームポイン
タとする。すなわち、eprを自分のプロセスIDに設定
し、efpをSP4に設定する。
Let the current stack pointer value be the new frame pointer. That is, epr is set to its own process ID, and efp is set to SP4.

下位階層コードアドレスにジャンプする。Jump to the lower layer code address.

下位階層が処理を終了して制御を上位階層に渡すとき
に手続きは次のようになる。
When the lower layer finishes processing and passes control to the upper layer, the procedure is as follows.

スタックポインタをフレームポインタの値にする(SP
4)。
Set the stack pointer to the value of the frame pointer (SP
Four).

戻りアドレスをポップする(SP3)。Pop return address (SP3).

フレームポインタをポップする(SP2)。Pop the frame pointer (SP2).

現時点のフレームポインタ値をでポップした値に更
新する。
Updates the current frame pointer value to the value popped by.

でポップしたアドレスにジャンプする。To jump to the popped address.

更に、制御が上位階層に渡った時の手続きを以下に示
す。
Further, the procedure when the control is transferred to the upper hierarchy is shown below.

入力データ領域を破棄するために、スタックポインタ
SPを領域長だけ増加させる。
Stack pointer to destroy the input data area
Increase SP by region length.

出力データをポップする。Pop output data.

以下に、下位階層ブロックを呼び出すときにプラネッ
トコンパイラが生成する実走行コードを説明する。プラ
ネットプラグラムでは、上位階層ブロック中に出現する
処理要件の種類によって、ことなる呼出し方を行う。下
位階層ブロックで使用される入力引数、戻り番地、内部
変数は、スタック上に確保され、LIFO管理がなされる。
これにより、再帰呼出しも実現可能となっている。
The actual running code generated by the planet compiler when calling the lower hierarchical block will be described below. In the planet program, different calling methods are performed depending on the types of processing requirements appearing in the upper hierarchical block. Input arguments, return addresses, and internal variables used in the lower hierarchical block are secured on the stack, and LIFO management is performed.
As a result, recursive calls can be realized.

まず、活動処理節が下位階層をもっている場合には、
次のような走行コードでその呼出しを実現する。
First, if the activity processing clause has a lower hierarchy,
The call is realized by the following running code.

GETSTACK push parameter(n)'s pointer ・・・・・・・・・・・・ push parameter(1)'pointer call subargument add sp,pushed size ABORTSTACK プログラムを実行しているプロセスのスタックは通常
は、プロセスと駆動系共用の汎用的なメモリ領域に設定
されている。下位階層を呼び出す時にはスタックを必要
とするが、このときスタックは上述した独自の記憶管理
機構を導入したLIFOにより実現される。その記憶管理機
構にスタックを要求するものが、前述したGETSTACKシス
テムコールである。このシステムコールを行うと、発行
したプロセスに固有のスタックが割り当てられて、その
プロセスが下位階層を呼び出すことが可能となる。
GETSTACK push parameter (n) 's pointer ··· push parameter (1)' pointer call subargument add sp, pushed size ABORTSTACK The stack of the process executing the program is usually a process. And a general-purpose memory area shared by the drive system. When calling the lower hierarchy, a stack is required. At this time, the stack is realized by the LIFO incorporating the unique storage management mechanism described above. The above-mentioned GETSTACK system call requests a stack from the storage management mechanism. When this system call is performed, a unique stack is allocated to the issuing process, and the process can call a lower hierarchy.

プラネットでは、下位階層の引数としてパラメータの
ポインタを渡す。これにより名前呼出しを実現してい
る。このため、入力引数が存在する場合には、変数のア
ドレス、I/Oポートあるいはビットのアドレスを、引数
並びの右から順にプッシュする。このようにして呼び出
した下位階層では、スタックフレームポインタからの正
のオフセットで入力引数をアクセスする。下位階層で入
力引数が存在する場合には、下位階層を呼び出す場合
に、その引数のアドレスをプッシュする。次に、subarg
umentを呼び出して、下位階層から制御が戻ってくる
と、呼び出す前にプッシュした入力引数の領域長だけス
タックポインタを増加させて、以前にGETSTACKで得られ
たスタックポインタ値に復帰させる。さらに、記憶管理
機構に割り当れられていたスタックを返すシステムコー
ルであるABORTSTACKを発行する。
In Planet, a parameter pointer is passed as an argument of a lower hierarchy. This implements a name call. Therefore, if there is an input argument, the address of the variable, the I / O port or the address of the bit is pushed in order from the right of the argument list. In the lower hierarchy called in this way, the input argument is accessed with a positive offset from the stack frame pointer. When an input argument exists in a lower hierarchy, when calling the lower hierarchy, the address of the argument is pushed. Then, subarg
When ument is called and control returns from the lower hierarchy, the stack pointer is increased by the area length of the input argument pushed before calling, and returned to the stack pointer value previously obtained by GETSTACK. Further, it issues ABORTSTACK, a system call that returns the stack allocated to the storage management mechanism.

事象待ち節に下位階層が有する場合には、次にように
してその呼出しが行われる。
If the lower layer has the event waiting node, the call is made as follows.

GETSTACK push parameter(n)'s pointer push parameter(n−1)'spointer ・・・・・・・・・・ push parameter(1)'spointer UPDATEPC call subargument Test HL register pair and SWAP is zero add sp,pushed size ABORTSTACK スタックを得て入力引数のポインタをプッシュすると
ころまでは、上記の活動処理節の場合と同一であるが、
それ以降が異なっている。すなわち、下位階層が条件判
断句の場合、条件判断結果が、HLレジスタペアに返って
くるように、コンパイラは走行コードを形成する。事象
持ち節の場合では、下位階層を呼び出した後にHLレジス
タペアを判断し、このHLレジスタが0でなくなるまで、
下位階層の呼出しをつづけるというコードを生成する。
この際、スタックをその都度確保していると、スタック
確保の時間を無視できなくなる。このために、スタック
に入力引数をプッシュした後に、UPDATEPCシステムコー
ルを発行する。並行して動作する他のプロセスに制御が
渡ったときにも、入力引数の領域が破壊されないような
実行制御方式を採用しているので、呼出し続ける下位階
層をUPDATEPCとSWAPで挟むことも可能である。下位階層
が0ではない値を返してくると、スタックは開放され
る。選択的事象待ち節の場合にも、これと同様な走行コ
ードが生成される。
GETSTACK push parameter (n) 's pointer push parameter (n-1)' spointer ... push-button (1) 'spointer size ABORTSTACK Same as for the active clause above, up to the point where the stack is obtained and the input argument pointer is pushed.
The rest is different. In other words, when the lower hierarchy is a condition judgment phrase, the compiler forms the running code so that the result of the condition judgment is returned to the HL register pair. In the case of event holding clause, after calling the lower hierarchy, the HL register pair is determined, and until this HL register is no longer 0.
Generates code to continue calling lower layers.
At this time, if a stack is secured each time, the time for securing the stack cannot be ignored. To do this, issue an UPDATEPC system call after pushing the input arguments onto the stack. Even when control is passed to another process that runs in parallel, the execution control method is adopted so that the area of the input argument is not destroyed, so it is possible to sandwich the lower hierarchy that continues to be called between UPDATEPC and SWAP. is there. When the lower layer returns a value other than 0, the stack is released. A similar running code is generated for the selective event waiting node.

次に、条件分岐節の呼出し機構は、前述した事象待ち
節のそれを簡単にしたものであり、以下の通りとなる。
Next, the call mechanism of the conditional branch clause is a simplified version of that of the above-described event wait clause, and is as follows.

GETSTACK push parameter(n)'s pointer push parameter(n−1)'pointer ・・・・・・・・・・・・ push parameter(1)'s pointer call subargument add sp,pushed size ABORTSTACK Test HL register pair and jump true address if n
on−zero すなわち、呼び出された下位階層は、条件判断結果を
HLレジスタペアに返すので、その値を評価して条件分岐
構造を実現するように、走行コードを生成する。
GETSTACK push parameter (n) 's pointer push parameter (n-1)' pointer ... push parameter (1) 's pointer call subargument add sp, pushed size ABORTSTACK Test HL register pair and jump true address if n
on-zero In other words, the called lower hierarchy
Since it is returned to the HL register pair, its value is evaluated to generate a running code so as to realize a conditional branch structure.

(プロセサ間のメッセージ通信制御) 複数のプロセサを結合するメッセージは、専用のHDLC
シリアル通信回線上で行われる。プラネットコンパイラ
は、プログラム中の制御実体の入出力端子に対応した有
限長のメッセージバッファを生成する。プロセスがメッ
セージ交信を必要とするとき、メッセージバッファに対
して、read/writeオペレーションを行う。
(Message communication control between processors) The message that connects multiple processors is a dedicated HDLC
Performed on a serial communication line. The planet compiler generates a finite-length message buffer corresponding to the input / output terminal of the control entity in the program. When a process needs message communication, it performs read / write operations on the message buffer.

メッセージバッファは、メッセージにデータが含まれ
ている場合には、データ長が固定で、有限長のリングバ
ッファとして構成され、バッファ中に存在する有効なメ
ッセージの個数、メッセージデータの読出ポインタ、書
込みポインタ、データプールから構成されている。メッ
セージにデータが含まれていない場合には、メッセージ
数だけで構成される。
The message buffer is configured as a finite-length ring buffer having a fixed data length when the message contains data, the number of valid messages existing in the buffer, a message data read pointer, and a message data write pointer. , Consists of a data pool. If the message contains no data, it consists only of the number of messages.

まず、制御実体間のメッセージ通信を説明する。第35
図に示すように、制御実体Aが出力するメッセージを制
御実体Bが受け取る操作を例に説明する。プラネットコ
ンパイラは、出力端子に制御が到達するものについて、
制御実体Aのメッセージバッファoutputに対してwrite
オペレーションを行うように走行コードを生成する。ま
た、サブシステムのメッセージ端子から矢印が出力され
ているものでは、制御実体Aのメッセージバッファoutp
utにreadオペレーションを行うコードを生成する。read
オペレーション後に制御実体Bのメッセージバッファin
poutにwriteオペレーションを行うコードを配置する。
一方、制御実体Bの内部処理では、メッセージバッファ
inputにreadオペレーションを行うような走行コードを
生成する。このようにして、制御実体Aの内部処理が出
力したメッセージが制御実体Bの内部処理で使用される
ことになる。
First, message communication between control entities will be described. No. 35
As shown in the figure, an example in which the control entity B receives a message output by the control entity A will be described. The Planet Compiler uses
Write to message buffer output of control entity A
Generate running code to perform the operation. If an arrow is output from the message terminal of the subsystem, the message buffer outp of the control entity A is output.
Generate code to perform read operation on ut. read
Message buffer in of control entity B after operation
Place the code that performs the write operation in pout.
On the other hand, in the internal processing of the control entity B, the message buffer
Generate running code that performs read operation on input. Thus, the message output by the internal processing of the control entity A is used in the internal processing of the control entity B.

ここに、プラネットプログラムではプロセサ自身も制
御実体であるので、プロセサ間のメッセージ通信も、上
述した制御実体間のメッセージ通信と同一の機構で実現
される。この場合、メッセージバッファのread/writeオ
ペレーション、およびそれらを行うための事象検知は、
通信路を介して外部プロセサに対する遠隔プロシージャ
コールで行われる。或るメッセージバッファのread/wri
teオペレーションは、ネットワーク中のどのプロセサか
らも要求を発行可能となっている。かかる発行操作には
各種のパラメータが必要である。以下に、これらのパラ
メータを説明すると共に、プロシージャコールの機能を
説明する。
Here, in the planet program, since the processors themselves are control entities, message communication between the processors is realized by the same mechanism as the message communication between the control entities described above. In this case, the message buffer read / write operations, and the event detection to perform them,
This is performed by a remote procedure call to an external processor via a communication path. Read / wri of a certain message buffer
The te operation can issue a request from any processor in the network. Various parameters are required for such an issuing operation. Hereinafter, these parameters will be described, and the function of the procedure call will be described.

プロセサ識別子 遠隔プロシージャコールを行うためにはネットワーク
のパラメータが必要である。すなわち、特定にプロセサ
に対して処理要求(プロシージャコール)を発行するた
めには、どのプロセサに送るのかといった宛先が必要と
なる。これを表現しているのがプロセサ識別子である。
プラネットプログラム中に宣言されている全てのプロセ
サには、ネットワーク上での位置番号が付されている。
この識別子は、ファイルhardware.defで宣言されるネッ
トワークの木構造を、深さ優先でトラバースしながらイ
ンクリメンタルに設定される。これは、前述したように
コンパイラによって自動的に行われる。一方、ネットワ
ークのコンフィギュレーション時に、ネットワークの接
続形状、プロセサ識別子の情報が全てのプロセサに配布
される。したがって、ネットワークの稼働時には、プロ
セサ識別子を指定するのみで、ネットワーク形状を意識
することなく宛先を指定することが可能である。
Processor identifier Network parameters are required to make a remote procedure call. That is, in order to specifically issue a processing request (procedure call) to a processor, a destination such as to which processor is to be sent is required. This is represented by the processor identifier.
All processors declared in the Planet program have network location numbers.
This identifier is set incrementally while traversing the tree structure of the network declared in the file hardware.def in a depth-first manner. This is done automatically by the compiler as described above. On the other hand, at the time of network configuration, information on the network connection shape and the processor identifier is distributed to all processors. Therefore, when the network is in operation, it is possible to specify the destination only by specifying the processor identifier, without being aware of the network shape.

メッセージバッファ識別子 プロセサの走行コード中には、複数のメッセージバッ
ファが存在することが考えられる。これらのメッセージ
バッファのうち、それに対して操作を行うのかを指定す
るために、メッセージバッファ識別子が必要である。こ
の識別子もコンパイラによって自動的に生成される。プ
ロセサ識別子と、このメッセージバッファ識別子によっ
て、どのプロセサのどのメッセージバッファに、オペレ
ーションを行うのかを特定する。
Message Buffer Identifier It is possible that there are multiple message buffers in the processor running code. A message buffer identifier is required to specify which of these message buffers to operate on. This identifier is also generated automatically by the compiler. Based on the processor identifier and the message buffer identifier, it is specified which message buffer of which processor is to be operated.

遠隔プロシージャコール 遠隔プロシージャーコールにより、以下の4つのステ
ップからなるメッセージ通信機能が実現される。
Remote Procedure Call A remote procedure call implements a message communication function consisting of the following four steps.

メッセージバッファが満杯であるか否かの検知 メッセージバッファのwriteオペレーション メッセージバッファが空である否かの検知 メッセージバッファのreadオペレーション 一例として、外部のプロセサXの中のメッセージバッ
ファxにwriteオペレーションを行う操作を述べる。プ
ロセサXにバッファxが満杯であるか否かの検知要求を
発行する。バッファが満杯であるときには、xが満杯で
ないという報告が返ってくるまでプロセサXに対してあ
る周期で検知要求を発行しつづける。そして、プロセサ
Xに対して、メッセージ中のデータを付与して、バッフ
ァへのwrite要求を発行する。以上の操作でメッセージ
がプロセサXに渡ることになる。
Detection of whether or not the message buffer is full Write operation of the message buffer Detection of whether or not the message buffer is empty Read operation of the message buffer As an example, operation of performing a write operation to the message buffer x in the external processor X State. A detection request is issued to processor X to determine whether buffer x is full. When the buffer is full, a detection request is issued to the processor X at a certain period until a report that x is not full is returned. Then, the data in the message is given to the processor X, and a write request to the buffer is issued. With the above operation, the message is passed to the processor X.

次に、プロセサXの中のメッセージバッファにreadオ
ペレーションを行う操作を述べる。バッファが空である
という返事が返ってくと、バッファが空でなくなるで、
ある周期でプロセサに検知要求を出力しつづける。バッ
ファが空でなくなると、プロセサに対してバッファのre
ad要求を発行する。read要求を受け取ったプロセサはre
adオペレーションを行い、メッセージに付与されている
データを伴って返事を送る。以上の操作により、メッセ
ージがプロセサから渡ってくる。
Next, an operation of performing a read operation on a message buffer in the processor X will be described. When you get a reply that the buffer is empty, the buffer is no longer empty,
The detection request is continuously output to the processor in a certain cycle. When the buffer is no longer empty, the processor
Issue an ad request. The processor that received the read request re
Performs an ad operation and sends a reply with the data attached to the message. With the above operation, the message is passed from the processor.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明のプログラム作成装置に
おいては、画面表示手段によってプログラム作成用の画
面が表示され、この画面上で、図形パターン発生手段か
ら発生されるプログラム言語要素を選択してプログラム
が作成可能である。そして、プログラム言語要素として
は、有向枝および分岐有向枝が含まれており、特に分岐
有向枝によって分岐された複数の処理列は、翻訳手段に
よって自動的に並列処理されるプログラムに変換される
ようになっている。従って、本発明によれば、複数の制
御主体が存在するネットワークなどにおける並行駆動用
プログラムなどを効率良く簡単に作成することが可能と
なる。特に、作成されたプログラムを機械語に翻訳する
翻訳手段が、ハードウエア情報保持手段から得られる情
報に基づき、第1の分岐有向枝に後続する複数の処理要
素列のそれぞれを、複数の制御主体のそれぞれにより並
列処理されるプログラムとして分類して割り当てる並列
処理プログラム割当手段を有しているため、制御主体毎
のオブジェクトコードを自動的に生成し、制御主体毎に
ダウンロードして動作させることができ、ネットワーク
上の複数の制御主体によって並列処理されるプログラム
の作成が格段に簡単になる。
As described above, in the program creating apparatus of the present invention, a screen for creating a program is displayed by the screen display means, and on this screen, a program language element generated by the graphic pattern generating means is selected to execute the program. Can be created. The program language elements include a directional branch and a directional branch. In particular, a plurality of processing sequences branched by the directional branch are converted into a program that is automatically processed in parallel by the translation unit. It is supposed to be. Therefore, according to the present invention, it is possible to efficiently and easily create a parallel drive program or the like in a network or the like in which a plurality of control entities exist. In particular, a translating means for translating the created program into a machine language, based on information obtained from the hardware information holding means, controls each of a plurality of processing element sequences following the first directional branch to a plurality of control elements. Since there is a parallel processing program allocating means for classifying and allocating as a program to be processed in parallel by each of the subjects, it is possible to automatically generate an object code for each of the control subjects and download and operate each of the control subjects. This makes it much easier to create a program to be processed in parallel by a plurality of control entities on the network.

また、上記のプログラム作成用画面を複数枚表示可能
の場合には、同一画面上に作成したプログラムの各処理
要素の下位階層側プログラムを、その処理要素の下位階
層として規定された別の一枚の画面上に作成することが
できる。よって、大きなプログラムの作成を、トップダ
ウンあるいはボトムアップに効率良く作成することが可
能である。
When a plurality of screens for program creation can be displayed, the lower layer side program of each processing element of the program created on the same screen is replaced with another one layer defined as a lower layer of the processing element. Can be created on the screen. Therefore, it is possible to efficiently create a large program from the top down or the bottom up.

一方、本発明によるデバッグ手段は、作成時と同一の
画面を再生表示し、この画面上においてデバッグを行う
ことが可能である。したがって、プログラムの検証位置
を直観的に認識することができ、かかるデバッグ作業が
簡単にできるという利点もある。
On the other hand, the debugging means according to the present invention can reproduce and display the same screen as at the time of creation, and perform debugging on this screen. Therefore, there is also an advantage that the verification position of the program can be intuitively recognized, and the debugging work can be easily performed.

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

第1図はプログラミング言語であるプラネットにおける
制御実体のモデルを示すブロック図である。 第2図はプラネットを用いて制御実体相互間の関係を記
述した例を示す説明図である。 第3図はプラネットによる制御実体の内部処理の記述例
を示す説明図である。 第4図はプラネットによる手続きの階層性を示す説明図
である。 第5図は第4図と同じくプラネットによる手続きの階層
性を示す説明図である。 第6図はプラネットのプログラム枠を示す説明図であ
る。 第7図はプラネットのサブシステムの記述例を示す説明
図である。 第8図はプラネットによる下位階層呼出しの記述例を示
す説明図である。 第9図はプラネットによるメッセージ送受信操作の記述
例を示す説明図である。 第10図はプラネットによるデータを含みメッセージ送受
の記述例を示す説明図である。 第11図はプラネットによる事象待つ節の記述例を示す説
明図である。 第12図はプラネットによる活動処理節の記述例を示す説
明図である。 第13図はプラネットによる条件分岐節の記述例を示す説
明図である。 第14図はプラネットによる選択事象待ち節の記述形式を
示す説明図である。 第15図は手続きを中断させるプラネットプログラム例を
示す説明図である。 第16図はプラネットによる繰り返し制御構造の記述例を
示す説明図である。 第17図は浮動小数点型データのフォーマットを示す図で
ある。 第18図はプラネットにおけるデータ構造体の記述例を示
す説明図である。 第19図はプラネットを用いたプログラム開発の流れを示
す説明図である。 第20図はブロック管理状態を示す説明図である。 第21図は表示ブロックリストを示す説明図である。 第22図はハードウエア宣言を説明するためのブロック図
である。 第23図はネットワーク宣言の手順を説明するための説明
図である。 第24図はプロセサウインドウを示す図である。 第25図は或るプロセサの階層構造を表示する画面を示す
図である。 第26図は第25図の画面に表示されている「main」という
ブロックのソースプログラムを表示した画面を示す図で
ある。 第27図はプラネット駆動系(カーネル)の全体構成のブ
ロック図である。 第28図はプロセスのリングキューを示す図である。 第29図は事象検知と応答処理の展開例を示す説明図であ
る。 第30図は「FORK」手続きを示す説明図である。 第31図は「ABORT」手続きを示す説明図である。 第32図は「KILL」手続きを示す説明図である。 第33図は複数のプロセスの同期を取る例を示す説明図で
ある。 第34図は階層管理を示す説明図である。 第35図はメッセージ通信の例を示す説明図である。 〔符号の説明〕 xed……エディタ xp1……パーサ xp2……ソータ xp3……コードジェネレータ xp4……リンカ xdb……デバッガ。
FIG. 1 is a block diagram showing a model of a control entity in a planet which is a programming language. FIG. 2 is an explanatory diagram showing an example in which the relationship between control entities is described using a planet. FIG. 3 is an explanatory diagram showing a description example of internal processing of a control entity by a planet. FIG. 4 is an explanatory diagram showing the hierarchy of procedures by a planet. FIG. 5 is an explanatory diagram showing the hierarchy of procedures by a planet, similarly to FIG. FIG. 6 is an explanatory diagram showing a program frame of the planet. FIG. 7 is an explanatory diagram showing a description example of a subsystem of the planet. FIG. 8 is an explanatory diagram showing an example of description of a lower layer call by a planet. FIG. 9 is an explanatory diagram showing a description example of a message transmission / reception operation by a planet. FIG. 10 is an explanatory diagram showing a description example of message transmission / reception including data by the planet. FIG. 11 is an explanatory diagram showing a description example of a node waiting for an event by a planet. FIG. 12 is an explanatory diagram showing a description example of an activity processing section by a planet. FIG. 13 is an explanatory diagram showing an example of description of a conditional branch clause by a planet. FIG. 14 is an explanatory diagram showing a description format of a selection event waiting node by a planet. FIG. 15 is an explanatory diagram showing an example of a planet program for interrupting a procedure. FIG. 16 is an explanatory diagram showing a description example of a repetition control structure using a planet. FIG. 17 is a diagram showing the format of floating-point data. FIG. 18 is an explanatory diagram showing a description example of a data structure in a planet. FIG. 19 is an explanatory diagram showing a flow of program development using a planet. FIG. 20 is an explanatory diagram showing a block management state. FIG. 21 is an explanatory diagram showing a display block list. FIG. 22 is a block diagram for explaining a hardware declaration. FIG. 23 is an explanatory diagram for explaining the procedure of a network declaration. FIG. 24 is a diagram showing a processor window. FIG. 25 is a diagram showing a screen displaying a hierarchical structure of a certain processor. FIG. 26 is a view showing a screen on which the source program of the block “main” displayed on the screen of FIG. 25 is displayed. FIG. 27 is a block diagram of the entire configuration of the planet driving system (kernel). FIG. 28 is a diagram showing a ring queue of a process. FIG. 29 is an explanatory diagram showing a development example of event detection and response processing. FIG. 30 is an explanatory diagram showing the "FORK" procedure. FIG. 31 is an explanatory diagram showing the “ABORT” procedure. FIG. 32 is an explanatory diagram showing the “KILL” procedure. FIG. 33 is an explanatory diagram showing an example of synchronizing a plurality of processes. FIG. 34 is an explanatory diagram showing hierarchical management. FIG. 35 is an explanatory diagram showing an example of message communication. [Explanation of symbols] xed ... editor xp1 ... parser xp2 ... sorter xp3 ... code generator xp4 ... linker xdb ... debugger.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平2−236624(JP,A) 特開 昭63−167932(JP,A) 特開 昭62−242280(JP,A) 特開 平4−130958(JP,A) 特開 平4−18605(JP,A) 内平 他1名,”階層的ペトリネット による平行プログラムの設計法”,情報 処理学会研究報告(89−SE−69), (1989.11.24),pp.7.1−7. 8 岩渕 他3名,”機器組込み型ソフト ウエア開発装置”,情報処理学会第39回 (平成元年後期)全国大会講演論文集 (▲II▼),(1988.10.16),p p.1578−1579 (58)調査した分野(Int.Cl.7,DB名) G06F 9/06 - 9/44 G05B 15/00 - 19/46 G06F 11/28 - 11/36 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-2-236624 (JP, A) JP-A-63-167932 (JP, A) JP-A-62-2242280 (JP, A) JP-A-4- 130958 (JP, A) JP-A-4-18605 (JP, A) Uchihira et al., "Design method of parallel program using hierarchical Petri net", Information Processing Society of Japan research report (89-SE-69), ( 1989.11.24); 7.1-7.8 Iwabuchi et al., “Embedded Software Development Device”, Proc. Of the 39th Annual Conference of Information Processing Society of Japan (late 1989) (▲ II ▼), (1988.10. 16), p. 1578-1579 (58) Field surveyed (Int.Cl. 7 , DB name) G06F 9/06-9/44 G05B 15/00-19/46 G06F 11/28-11/36

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ネットワーク上の複数の制御主体によって
並列処理されるプログラムを作成するためのプログラム
作成装置において、 前記複数の制御主体を含むネットワークのハードウエア
情報を保持したハードウエア情報保持手段と、プログラ
ム作成領域を表示画面上に表示する画面表示手段と、前
記表示画面上においてプログラムを作成するプログラム
作成手段と、作成されたプログラムを機械語に翻訳する
翻訳手段と、翻訳された機械語からなるプログラムを記
憶する記憶手段とを有し、 前記プログラム作成手段は、前記プログラムの時系列的
に処理される各処理の内容を表示する複数種類の図面パ
ターンを発生可能なプログラム作成用図形パターン発生
手段と、前記ハードウエア情報を前記表示画面上に入力
可能なハードウエア情報入力手段と、前記図形パターン
を順次に選択して前記プログラム表示画面上に表示する
パターン選択手段とを備え、前記図形パターンは、処理
内容を示す複数種類の図形パターンと、処理要件の時系
列的な流れ方向を示す有向枝と、少なくとも二股に分岐
し、時系列的に後続する処理要件が並列処理されるべき
ものであることを示す第1の分岐有向枝と、少なくとも
二股に分岐した分岐枝が纏まって後続の処理要件が複数
の先行する処理要件終了の同期をとって処理される処理
動作であることを示す第2の分岐有向枝とを有してお
り、 前記翻訳手段は、前記ハードウエア情報保持手段から得
られる情報に基づき、前記第1の分岐有向枝に後続する
複数の処理要素列のそれぞれを、前記複数の制御主体の
それぞれにより並列処理されるプログラムとして分類し
て割り当てる並列処理プログラム割当手段を有してお
り、 前記パターン選択手段により、処理要件を示す図形パタ
ーンと前記有向枝あるいは分岐有向枝とを交互に選択し
て、前記複数の制御主体によって実行される並列処理プ
ログラムを、同一画面上で作成するようになっているこ
とを特徴とするプログラム作成装置。
1. A program creating apparatus for creating a program to be processed in parallel by a plurality of control entities on a network, comprising: hardware information holding means for holding hardware information of a network including the plurality of control entities; Screen display means for displaying a program creation area on a display screen, program creation means for creating a program on the display screen, translation means for translating the created program into machine language, and translated machine language Storage means for storing a program, wherein the program creation means is capable of generating a plurality of types of drawing patterns for displaying the contents of each processing performed in time series of the program; Hardware information capable of inputting the hardware information on the display screen And a pattern selecting means for sequentially selecting the graphic patterns and displaying them on the program display screen, wherein the graphic patterns include a plurality of types of graphic patterns indicating processing contents and a time-series of processing requirements. Directional branch indicating a flow direction, a first branch directional branch indicating that at least two branches are to be performed, and a subsequent processing requirement in a time series should be processed in parallel, and a branched branch having at least two branches. A second branch-oriented branch indicating that the branching branch is a processing operation in which the subsequent processing requirement is processed in synchronization with the end of a plurality of preceding processing requirements, and the translation means comprises: Based on information obtained from the hardware information holding means, a plurality of processing element sequences following the first branch directed branch are each processed by the plurality of control entities in parallel. A parallel processing program allocating means for classifying and allocating the plurality of control patterns by alternately selecting a graphic pattern indicating a processing requirement and the directional branch or the directional branch by the pattern selecting means. A program creation device wherein a parallel processing program executed by a subject is created on the same screen.
【請求項2】請求項第1項において、前記画面表示手段
は、複数枚のプログラム作成用画面を表示可能であり、
一つの画面上に作成されたプログラムの各図形パターン
によって表示される処理要素の下位プログラムは、別の
前記画面上に作成可能であり、前記処理要素と、別の画
面に形成された前記下位プログラムとの階層関係を規定
する階層管理手段を有していることを特徴とするプログ
ラム作成装置。
2. The program according to claim 1, wherein said screen display means is capable of displaying a plurality of program creation screens.
The lower-level program of the processing element displayed by each graphic pattern of the program created on one screen can be created on another screen, and the processing element and the lower-level program formed on another screen can be created. A program management device having a hierarchy management means for defining a hierarchy relationship with the program.
【請求項3】請求項第1項または第2項において、作成
されたプログラムをデバッグするためのデバッグ手段を
有しており、このデバッグ手段は、デバッグ時に、作成
されたプログラムを、その作成時と同一の図形パターン
によって再生表示する再生表示手段と、再生表示された
プログラム上において、デバッグ中におけるプログラム
実行位置を表示する表示手段とを有していることを特徴
とするプログラム作成装置。
3. The apparatus according to claim 1, further comprising a debugging unit for debugging the created program, wherein the debugging unit is configured to execute the created program at the time of debugging. A program creating apparatus, comprising: reproduction display means for reproducing and displaying the same graphic pattern as above; and display means for displaying a program execution position during debugging on the reproduced and displayed program.
【請求項4】請求項第3項において、前記表示手段は、
並列処理される処理要素の部分においては並列処理され
ている複数の処理部分を同時的に表示可能となっている
ことを特徴とするプログラム作成装置。
4. The apparatus according to claim 3, wherein said display means comprises:
A program creating apparatus, wherein a plurality of processing parts that are processed in parallel can be displayed simultaneously in a part of processing elements that are processed in parallel.
JP02337781A 1990-11-30 1990-11-30 Program creation device Expired - Fee Related JP3102030B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02337781A JP3102030B2 (en) 1990-11-30 1990-11-30 Program creation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02337781A JP3102030B2 (en) 1990-11-30 1990-11-30 Program creation device

Publications (2)

Publication Number Publication Date
JPH04205423A JPH04205423A (en) 1992-07-27
JP3102030B2 true JP3102030B2 (en) 2000-10-23

Family

ID=18311905

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02337781A Expired - Fee Related JP3102030B2 (en) 1990-11-30 1990-11-30 Program creation device

Country Status (1)

Country Link
JP (1) JP3102030B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6496872B1 (en) * 1994-05-16 2002-12-17 Apple Computer, Inc. Computer system for automatically instantiating tasks designated by a user
JPH08278957A (en) * 1995-04-04 1996-10-22 Fujitsu Ltd Analysis support device for unexecutable solution and infinite solution
JPH10320187A (en) * 1997-05-19 1998-12-04 Mitsubishi Electric Corp System modeling system and data communication system
JP2000112737A (en) * 1998-10-01 2000-04-21 Seiko Epson Corp Program generating device
JP2000112736A (en) * 1998-10-01 2000-04-21 Seiko Epson Corp Program generating device
EP1729213A1 (en) * 2005-05-30 2006-12-06 Honda Research Institute Europe GmbH Development of parallel/distributed applications
EP2333628B1 (en) 2009-12-04 2013-12-04 Umicore AG & Co. KG A system and method for system automation based on interpreting a tree sequence of operations
JP2013235381A (en) * 2012-05-08 2013-11-21 Sumitomo Heavy Ind Ltd Data editing apparatus and data editing method
CN110083351B (en) * 2019-04-22 2023-06-27 北京百度网讯科技有限公司 Method and device for generating code

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
内平 他1名,"階層的ペトリネットによる平行プログラムの設計法",情報処理学会研究報告(89−SE−69),(1989.11.24),pp.7.1−7.8
岩渕 他3名,"機器組込み型ソフトウエア開発装置",情報処理学会第39回(平成元年後期)全国大会講演論文集(▲II▼),(1988.10.16),pp.1578−1579

Also Published As

Publication number Publication date
JPH04205423A (en) 1992-07-27

Similar Documents

Publication Publication Date Title
EP2062136B1 (en) System and method for using stream objects to perform stream processing in a text-based computing environment
US5075847A (en) Method and apparatus for computer program encapsulation
JP4669788B2 (en) Restriction condition solving method, restriction condition solving apparatus, and restriction condition solving system
US8108839B2 (en) Method and apparatus for tracing execution of computer programming code using dynamic trace enablement
CN107704382B (en) Python-oriented function call path generation method and system
US6634019B1 (en) Toggling software characteristics in a fault tolerant and combinatorial software environment system, method and medium
JP3102030B2 (en) Program creation device
Lumetta et al. The mantis parallel debugger
Bic A process-oriented model for efficient execution of dataflow programs
Wismüller et al. Interactive debugging and performance analysis of massively parallel applications
Haber et al. A distributed environment for run-time visualization and application steering in computational mechanics
Beynon et al. Parallel computation in definitive models
JP3318051B2 (en) Translation processing method
Oberhuber et al. DETOP-an interactive debugger for PowerPC based multicomputers
JP2007122187A (en) Program code generation device
JP4633203B2 (en) Method and apparatus for detecting execution error of simulated program
Essel et al. Goosy, the new gsi acquisition and analysis system for experiment data
Berthold Explicit and implicit parallel functional programming: Concepts and implementation
Fernandez et al. Ddbx-lpp: A dynamic software tool for debugging asynchronous distributed algorithms on loosely coupled parallel processors
JPH02176938A (en) Machine language instruction optimizing system
Nagamatsu Runtime software reorganization by traditional OS features
Del Fabbro Developing a distributed image processing and management framework
Aspnäs et al. A programming environment for a transputer-based multiprocessor system
Grechanik et al. Reengineering large-scale polylingual systems
Bangsow et al. SimTalk and Dialogs

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070825

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20080825

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080825

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090825

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees