JPH09204299A - Program development device - Google Patents

Program development device

Info

Publication number
JPH09204299A
JPH09204299A JP981796A JP981796A JPH09204299A JP H09204299 A JPH09204299 A JP H09204299A JP 981796 A JP981796 A JP 981796A JP 981796 A JP981796 A JP 981796A JP H09204299 A JPH09204299 A JP H09204299A
Authority
JP
Japan
Prior art keywords
program
processing
programs
state
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP981796A
Other languages
Japanese (ja)
Inventor
Yoji Fujiwara
要治 藤原
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP981796A priority Critical patent/JPH09204299A/en
Publication of JPH09204299A publication Critical patent/JPH09204299A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To describe the operations of the entire system altogether and to perform system development of not being conscious of the operations of respective programs by generating source codes for executing a communication processing in the respective programs from the source code described with the specification of a linkage processing between the programs in a distributed processing system. SOLUTION: A language program 4 for generating program codes 5 and 6 for executing mutually linked processings for the respective programs A and B from a linkage definition source code 1 for defining linkage between the respective programs A and B for constituting the distributed processing system is provided. From the program codes 5 and 6 generated in the language processor 4 and respective intrinsic processing source programs 2 and 3 for describing the processings intrinsic to the respective programs A and B, object programs 9 and 10 for the respective programs A and B are generated by compiler-linkers 7 and 8.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ソフトウェアの開
発技術に係り、特に、分散処理システムのソフトウェア
開発の生産性を向上するのに好適なプログラム開発装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a software development technique, and more particularly to a program development apparatus suitable for improving the software development productivity of a distributed processing system.

【0002】[0002]

【従来の技術】近年のネットワークの進歩やコンピュー
タの低価格化に伴い、クライアント・サーバーモデルに
代表される分散処理システムが多く開発されている。こ
の分散処理システムにおいては、システムを構成する各
情報処理装置は、それぞれのプログラム間での通信を行
ないながら動作する。この通信に係る設計の難しさによ
り、分散処理システムのソフトウェアは、他のソフトウ
ェアに比べてプログラム難易度が高くなり、その生産性
の向上を阻害している。
2. Description of the Related Art With the recent progress of networks and the cost reduction of computers, many distributed processing systems represented by a client / server model have been developed. In this distributed processing system, each information processing apparatus that constitutes the system operates while communicating between the programs. Due to the difficulty of the design related to the communication, the software of the distributed processing system has a higher degree of program difficulty than other software, which hinders the improvement of its productivity.

【0003】このような通信に係るプログラムの開発を
効率化する従来技術として、例えば、特開平4−352
029号公報に記載のものがある。この技術では、通信
ソフトウェア開発向けのプログラミング言語が提案され
ており、プログラムの動作を一つの状態遷移表で記述す
ることにより、プログラムの記述を容易なものにしてい
る。すなわち、プログラムに通信状態を示す状態変数を
割り当て、言語プロセッサが生成したオブジェクトコー
ドが、これを用いて自動的に通信状態を管理する。この
技術によれば、言語プロセッサにより生成したオブジェ
クトコードが自動的に通信状態を管理するため、プログ
ラム開発者はプログラム状態の管理を明示的に記述する
必要がなくなり、プログラムの開発が容易となる。
As a conventional technique for improving the efficiency of the development of such a communication program, for example, Japanese Patent Laid-Open No. 4-352 is known.
There is one described in Japanese Patent No. 029. In this technology, a programming language for communication software development has been proposed, and the description of a program is facilitated by describing the operation of the program in one state transition table. That is, a state variable indicating the communication state is assigned to the program, and the object code generated by the language processor automatically manages the communication state using this. According to this technique, since the object code generated by the language processor automatically manages the communication state, the program developer does not need to explicitly describe the management of the program state, and the program development becomes easy.

【0004】しかし、このプログラミング言語は、個々
のプログラムの状態を自動的に管理するものであり、複
数のプログラムが連携して動作する分散処理システムの
全体の状態を管理するものではない。従って、このプロ
グラミング言語を用いても、分散処理システム全体の設
計は、従来通りの設計手順で行なう必要がある。そのた
め、プログラム間の同期やプロトコルを設計する際の困
難さが残り、ソフトウェア設計者は、細心の注意を払っ
てプログラム毎の機能分担を適切に定め、プログラム間
で整合性(同期)を取って矛盾のないプロトコルを設計
しなければならない。これは、設計者に取って非常に大
きな負荷となる。また、何等かの理由により、一方のプ
ログラムを修正した場合には、これに合わせて、他方の
プログラムも修正する必要が生じてくる。このような作
業負荷が、分散処理システムのソフトウェア生産性の向
上を阻害している。
However, this programming language automatically manages the states of individual programs, and does not manage the overall state of a distributed processing system in which a plurality of programs operate in cooperation. Therefore, even if this programming language is used, it is necessary to design the entire distributed processing system according to the conventional design procedure. Therefore, the difficulty in designing synchronization and protocols between programs remains, and the software designer pays close attention to appropriately define the function allocation for each program and maintain consistency (synchronization) between the programs. A consistent protocol must be designed. This puts a huge load on the designer. Further, when one of the programs is modified for some reason, it is necessary to modify the other program in accordance with the modification. Such workload impedes the improvement of software productivity of the distributed processing system.

【0005】[0005]

【発明が解決しようとする課題】解決しようとする問題
点は、従来の技術では、分散処理システムを構成する各
プログラム間の同期やプロトコルを含む、個々のプログ
ラム毎の仕様をそれぞれ独立して記述しなければならな
い点である。本発明の目的は、これら従来技術の課題を
解決し、分散処理システムにおけるプログラム間の連携
処理の仕様を記述したソースコードから、個々のプログ
ラムでの通信処理を実行するソースコードを生成するこ
とにより、システム全体の動作を一括して記述すること
を可能とし、個々のプログラムの動作を意識しないシス
テム開発を可能するプログラム開発装置を提供すること
である。
The problem to be solved by the prior art is that in the prior art, the specifications of each individual program, including the synchronization and protocols between the programs that make up the distributed processing system, are described independently. This is a point that must be done. An object of the present invention is to solve these problems of the prior art and to generate source code for executing communication processing in individual programs from source code in which specifications of cooperative processing between programs in a distributed processing system are described. The purpose of the present invention is to provide a program development device that enables the description of the operation of the entire system as a whole and enables the system development without being aware of the operation of individual programs.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するた
め、本発明のプログラム開発装置は、複数の情報処理装
置を連携させて一つの処理を行なう分散処理システムの
プログラムの開発装置であって、分散処理システムで発
生し得る、各情報処理装置のそれぞれのプログラム間で
の連携を必要とする各事象に対応して、この事象の発生
時における各プログラムの活性状態別に、実行されるべ
き処理、この処理を実行すべきプログラム、処理実行後
のプログラムの活性状態の変更指示を少なくとも含む処
理指示情報が記述されたソースコード1に基づき、個々
のプログラム別かつ事象およびプログラムの活性状態別
に、まず、処理を実行すべきプログラムが自プログラム
であれば、実行されるべき処理を実行するプログラムコ
ードを、また、処理を実行すべきプログラムが他プログ
ラムであれば、この処理を実行すべき他プログラムに、
実行されるべき処理の実行を要求するプログラムコード
を生成すると共に、処理実行後のプログラムの活性状態
の変更指示があれば、自プログラムの活性状態、およ
び、他プログラムのプログラム状態を変更させるプログ
ラムコードを生成し、次に、個々のプログラム別に、自
プログラムで実行すべき処理に対する他プログラムから
の処理要求を受信し、この受信した処理要求に対応した
処理を実行するプログラムコードを生成することによ
り、プログラムA,B別の各通信処理ルーチンのソース
プログラム5,6を生成する第1の言語プロセッサ(言
語プロセッサ4)と、この言語プロセッサ4で生成した
プログラム別の各通信処理ルーチンのソースプログラム
5,6と、個々のプログラムに固有の処理を記述した各
ソースプログラム2,3から、個々のプログラム別のオ
ブジェクトプログラム9,10を生成する第2の言語プ
ロセッサ(コンパイラ・リンカ8)とを設けることを特
徴とする。
In order to achieve the above object, a program development device of the present invention is a program development device for a distributed processing system that performs a single process by linking a plurality of information processing devices, Corresponding to each event that may occur in the distributed processing system and requires cooperation between each program of each information processing device, processing to be executed for each active state of each program at the time of occurrence of this event, Based on the source code 1 in which processing instruction information including at least a program to execute this processing and an instruction to change the active state of the program after execution of the processing is described, first for each program and for each event and active state of the program, If the program that should execute the process is its own program, the program code that executes the process that should be executed If the program to be executed is another program, the other program to be executed this processing,
A program code that generates a program code that requests execution of a process to be executed, and changes the active state of its own program and the program state of another program if there is an instruction to change the active state of the program after execution of the process Then, by receiving, for each individual program, a processing request from another program for the processing to be executed by the own program, and by generating a program code for executing the processing corresponding to the received processing request, A first language processor (language processor 4) that generates source programs 5 and 6 for each communication processing routine for each of programs A and B, and source programs 5 for each communication processing routine for each program that is generated by this language processor 4. 6 and each source program 2, which describes the processing unique to each program From and providing a second language processor to generate individual programs Another object program 9,10 (compiler linker 8).

【0007】[0007]

【発明の実施の形態】本発明においては、分散処理シス
テムを構成する個々のプログラムの動作を意識すること
なく、システム全体の動作を一括して記述できれば、上
述の従来の問題点は解決されることに着目し、プログラ
ム間の連携を必要とする処理の仕様を定義し、その仕様
定義情報から個々のプログラムの通信処理ルーチンを生
成する第1の言語プロセッサ(言語プロセッサ4)を設
けることにより、個々のプログラムの動作を意識しない
システム設計を可能としている。この言語プロセッサ4
に入力する仕様定義情報の記述内容は、以下のものとす
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In the present invention, if the operation of the entire system can be described collectively without paying attention to the operation of each program constituting the distributed processing system, the above-mentioned conventional problems can be solved. Focusing on this, by defining a specification of processing that requires cooperation between programs, and providing a first language processor (language processor 4) that generates a communication processing routine of each program from the specification definition information, It enables system design that does not consider the operation of individual programs. This language processor 4
The description contents of the specification definition information to be input to are as follows.

【0008】すなわち、仕様定義情報には、(a)プロ
グラム間の連携動作に伴い変化するシステム全体の状
態、(b)システム上に発生し得るプログラム間の連携
を必要とする事象、(c)システムの状態と事象に対応
させて、システムの状態遷移とその際に個々のプログラ
ムで行うべき処理のそれぞれを記述する。これは、上述
の特開平4−352029号公報に記載された仕様定義
情報のプログラム状態を、分散処理システム全体の状態
に拡張し、さらに、各事象および状態に対応して行うべ
き処理に、プログラムを識別する情報を付加したものと
論理的に同等である。
That is, the specification definition information includes (a) the state of the entire system that changes in association with the cooperation between programs, (b) an event that requires cooperation between programs that may occur on the system, and (c). The state transition of the system and the processing to be performed by each program at that time are described in correspondence with the state and event of the system. This is to extend the program state of the specification definition information described in JP-A-4-352029 to the state of the distributed processing system as a whole, and further to execute the process to be performed corresponding to each event and state. Is logically equivalent to the one to which information for identifying is added.

【0009】次に、言語プロセッサ4が、仕様定義情報
を元に生成するプログラムコードの構成を説明する。言
語プロセッサ4が生成するプログラムコードは、システ
ムを構成するプログラム毎に複数生成する。個々のプロ
グラムコードは、上述の仕様定義情報で定義した事象に
対応するサブルーチンと、メッセージ受信用の一つのサ
ブルーチンからなる。仕様定義情報で定義した事象に対
応するサブルーチンは、現在のシステムの状態を判定し
た結果に応じたシステム状態の変更と、定義された処理
の実行を行なう。この時、システム状態の変更は、ブロ
ートキャストにより、全てのプログラムで一斉に同期し
て実施する。また、定義された処理の実行は、その処理
を実際に実行すべきプログラムに対し、処理要求メッセ
ージを送信することにより実現する。一方、受信用のサ
ブルーチンは、他プログラムからの処理要求メッセージ
を受信し、要求された処理を実際に実行する。
Next, the structure of the program code generated by the language processor 4 based on the specification definition information will be described. A plurality of program codes generated by the language processor 4 are generated for each program constituting the system. Each program code is composed of a subroutine corresponding to the event defined by the specification definition information described above and one subroutine for message reception. The subroutine corresponding to the event defined by the specification definition information changes the system state according to the result of judging the current system state and executes the defined process. At this time, the system state is changed by bloatcasting in synchronization with all programs at once. The execution of the defined process is realized by transmitting a process request message to the program that should actually execute the process. On the other hand, the receiving subroutine receives a process request message from another program and actually executes the requested process.

【0010】尚、このようなプログラムコードは、特開
平4−352029に記載された技術に、以下の手順を
追加することで生成できる。 (A)状態変数の変更処理を行うコードを生成する際
に、状態変更を他のプログラムにも通知するコードを追
加する。 (B)状態遷移時に実行する処理のコードを生成する際
に、その処理を直接コード生成するのではなく、その処
理を実行すべきプログラムへの「処理要求の通知手順」
をコード生成する。 (C)プログラムコードに、上述の受信用サブルーチン
のコードを追加する。
Incidentally, such a program code can be generated by adding the following procedure to the technique described in Japanese Patent Laid-Open No. 4-352029. (A) When generating a code for changing the state variable, a code for notifying other programs of the state change is added. (B) When generating the code of the process to be executed at the time of state transition, instead of directly generating the code, the "procedure for notifying the process request" to the program that should execute the process
Generate code. (C) The code of the above-mentioned receiving subroutine is added to the program code.

【0011】このようにして、言語プロセッサ4が生成
したプログラムコードを組み込んだプログラムでは、そ
のプログラム内で何らかの事象が発生すると、プログラ
ムコード中のその事象に対応するサブルーチンを呼び出
す。このサブルーチンが呼び出されると、各プログラム
でシステム状態の変更が一斉に行われ、処理を実行すべ
きプログラムに対して処理要求メッセージが送信され
る。また、受信用のサブルーチンは、プログラムの受信
割り込み出口に登録され、他プログラムからの処理要求
メッセージを受けて、要求された処理を実際に実行す
る。このように、言語プロセッサ4で生成したプログラ
ムコードは、仕様定義情報に記載された論理仕様を問題
なく満たすものになっている。
In this way, in the program incorporating the program code generated by the language processor 4, when any event occurs in the program, a subroutine corresponding to the event in the program code is called. When this subroutine is called, the system state is changed in each program all at once, and a process request message is sent to the program to execute the process. The reception subroutine is registered in the reception interrupt exit of the program, receives a processing request message from another program, and actually executes the requested processing. In this way, the program code generated by the language processor 4 satisfies the logical specifications described in the specification definition information without any problem.

【0012】以下、本発明の実施例を、図面を用いて、
より詳細に説明する。図1は、本発明のプログラム開発
装置の本発明に係る構成の一実施例を示すブロック図で
ある。本図1において、1は分散処理システムにおける
各プログラム間の連携関係を定義した本発明に係る連携
定義ソースコード、2,3は分散処理システムを構成す
るプログラムA,Bに固有な処理を記述した固有処理ソ
ースコード、4は連携定義ソースコード1に基づきプロ
グラムコードを生成する本発明に係る第1の言語プロセ
ッサとしての言語プロセッサ、5,6はそれぞれ言語プ
ロセッサ4で生成されるプログラムA,B用のプログラ
ムコード、7,8はそれぞれプログラムコード5,6と
固有処理ソースコード2,3のコンパイルとリンケージ
を行なう本発明に係る第2の言語プロセッサとしてのコ
ンパイラ・リンカ、9,10はそれぞれコンパイラ・リ
ンカ7,8により生成されたプログラムA,Bのロード
モジュール(オブジェクトプログラム)である。
Embodiments of the present invention will be described below with reference to the drawings.
This will be described in more detail. FIG. 1 is a block diagram showing an embodiment of the configuration of the program development apparatus of the present invention according to the present invention. In FIG. 1, 1 is a cooperation definition source code according to the present invention that defines a cooperation relationship between programs in the distributed processing system, and 2 and 3 are processes unique to the programs A and B constituting the distributed processing system. Specific processing source code, 4 is a language processor as a first language processor according to the present invention that generates a program code based on the cooperation definition source code 1, and 5 and 6 are for programs A and B generated by the language processor 4, respectively. , 7 and 8 are the compiler / linker as the second language processor according to the present invention for compiling and linking the program codes 5 and 6 and the intrinsic processing source codes 2 and 3, respectively, and 9 and 10 are the compiler and linker, respectively. Load modules (objects) of programs A and B generated by linkers 7 and 8 Is a program).

【0013】連携定義ソースコード1と、個々のプログ
ラムに固有な処理を記述した固有処理ソースコード2,
3は、プログラム開発者が直接作成するものである。言
語プロセッサ4は、連携定義ソースコード1を入力し、
個々のプログラムA,Bで行うべき連携処理を実現する
プログラムコード5,6を出力する。本実施例では、こ
のプログラムコード5,6は、コンパイラ・リンカ7,
8のソースコードとして生成される。プログラム開発者
は、例えば自ら作成した固有処理ソースコード2,3
と、言語プロセッサ4が生成したプログラムコード5,
6を、既存のコンパイラ・リンカ7,8によりコンパイ
ル及びリンクし、各プログラムA,Bのロードモジュー
ル9,10を生成する。
Cooperation definition source code 1 and unique processing source code 2 in which processing unique to each program is described
3 is created directly by the program developer. The language processor 4 inputs the cooperation definition source code 1,
The program codes 5 and 6 for realizing the cooperative processing to be performed by the individual programs A and B are output. In this embodiment, the program codes 5 and 6 are the compiler / linker 7,
8 source code. The program developer, for example, creates the unique processing source code 2, 3 created by himself.
And the program code 5, generated by the language processor 4,
6 is compiled and linked by existing compilers / linkers 7 and 8 to generate load modules 9 and 10 of the programs A and B, respectively.

【0014】以下、連携定義ソースコード1の構成に関
して、図2および図3を用いて説明する。図2は、プロ
グラム開発対象の分散処理システム全体の動作を表す状
態遷移表の一構成例を示す説明図である。分散処理シス
テムを構成する各々のプログラムの状態が、他のプログ
ラムと同時に変化することを仮定すれば、各プログラム
間の連携処理は、本図2に示すようなシステム全体の動
作を表す状態遷移表20で簡潔に表記することができ
る。この状態遷移表20では、各行に、プログラム間の
連携を必要とするいくつかの事象21を、そして、各列
に、プログラムが取りうる状態22を示している。状態
遷移表20の行と列が交差する各マス目には、それぞれ
の事象21と状態22に対応して実行すべき処理23を
記述する。
The structure of the cooperation definition source code 1 will be described below with reference to FIGS. 2 and 3. FIG. 2 is an explanatory diagram showing a configuration example of a state transition table showing the operation of the entire distributed processing system of the program development target. Assuming that the state of each program constituting the distributed processing system changes at the same time as other programs, the cooperative processing between the programs is a state transition table showing the operation of the entire system as shown in FIG. It can be simply written as 20. In this state transition table 20, each row shows some events 21 that require cooperation between programs, and each column shows possible states 22 of the program. In each cell where the rows and columns of the state transition table 20 intersect, a process 23 to be executed is described corresponding to each event 21 and state 22.

【0015】図1における言語プロセッサ4は、この状
態遷移表20と論理的に同等な記述をした図1の連携定
義ソースコード1を入力ソースとする。この入力ソース
の記述例を図3に示す。図3は、図1におけるソースコ
ード例を示す説明図である。本図3において示すよう
に、連携定義ソースコード1は、宣言部1aと、通信に
係る処理の定義部1bからなる。宣言部1aには、生成
するコード(図1におけるプログラムコード5,6)を
識別する為のプログラム名(図中の「PROC prA, pr
B」)、プログラムが取りうる状態を表す状態変数と状
態名(図中の「STATUS st=ST0,ST1」)、連携を必要と
する事象名(図中の「METHOD ev1,ev2」)、実行すべ
き処理(図中の「ACTION ac1,ac2,ac3」)を宣言す
る。また、定義部1bでは、宣言部1aにおける事象名
(ev1,ev2)と状態名(ST0,ST1)の組み合わせ毎に、プ
ログラム状態の変更と、実行すべき処理を記述する。
The language processor 4 in FIG. 1 uses, as an input source, the cooperation definition source code 1 in FIG. 1 which is logically equivalent to the state transition table 20. A description example of this input source is shown in FIG. FIG. 3 is an explanatory diagram showing an example of the source code in FIG. As shown in FIG. 3, the cooperation definition source code 1 includes a declaration unit 1a and a definition unit 1b for processing related to communication. In the declaration section 1a, the program name (“PROC prA, pr in the figure” for identifying the generated code (program code 5, 6 in FIG. 1)
B ”), status variables and status names (“ STATUS st = ST0, ST1 ”in the figure) that represent the possible states of the program, event names that require cooperation (“ METHOD ev1, ev2 ”in the figure), and execution Declare the processing to be performed (“ACTION ac1, ac2, ac3” in the figure). Further, the definition unit 1b describes the change of the program state and the process to be executed for each combination of the event name (ev1, ev2) and the state name (ST0, ST1) in the declaration unit 1a.

【0016】図1における言語プロセッサ4は、このよ
うな連携定義ソースコード1から、図1における各プロ
グラム用のプログラムコード5,6を次の図4で示すよ
うにして生成する。図4は、図1における言語プロセッ
サによるソースコードからのプログラムコードの生成手
順例を示す説明図である。例えば、図3に示す記述内容
の連携定義ソースコード1を入力すると、図1の言語プ
ロセッサ4は、まず、本図4に示す階層構造のテーブル
を作成する。この時、階層のルートテーブル41には、
図3の連携定義ソースコード1で定義したプログラム名
(prA,prB)のリストを保持する。
The language processor 4 in FIG. 1 generates the program codes 5 and 6 for each program in FIG. 1 from the cooperation definition source code 1 as shown in FIG. FIG. 4 is an explanatory diagram showing an example of a procedure for generating a program code from a source code by the language processor in FIG. For example, when the cooperation definition source code 1 of the description content shown in FIG. 3 is input, the language processor 4 of FIG. 1 first creates the table having the hierarchical structure shown in FIG. At this time, in the route table 41 of the hierarchy,
It holds a list of program names (prA, prB) defined in the linkage definition source code 1 in FIG.

【0017】このルートテーブル41の各エントリは、
図3の事象名(ev1,ev2)を格納したイベントリストテ
ーブル42a,42b(図中、ev1,ev2と記載)と、そ
のプログラム(prA,prB)で実行する図3の処理(ac
1,ac2)を格納したアクションリストテール45a,4
5b(図中、ac1,ac2と記載)を指す。但し、このアク
ションリストテーブル45a,45bには、他のプログ
ラムから要求される処理のみを登録する。イベントリス
トテーブル42a,42bの各エントリは、それぞれ、
図3のプログラムの状態名(ST0,ST1)を格納したステ
ータスリストテーブル43a〜43d(図中、ST0,ST1
と記載)を指し、さらに、ステータスリストテーブル4
3a〜43dは、状態(ST0,ST1)の変更や、行うべき
処理(ac1〜ac3)と、その処理を実行すべきプログラム
名(prA,prB)を格納した処理定義テーブル44a〜4
4hを指す。尚、この処理定義テーブル44a〜44h
は、二つのフラグ(図中、NE,EQと記載)を持ち、格納
した状態名やプログラム名が上位のテーブルエントリの
名称と異なる場合に「NE」を設定する。
Each entry of this route table 41 is
Event list tables 42a and 42b (described as ev1 and ev2 in the figure) that store the event names (ev1 and ev2) in FIG. 3 and the processing (ac in FIG. 3) executed by the program (prA and prB)
Action list tails 45a, 4 storing (1, ac2)
5b (indicated as ac1 and ac2 in the figure). However, only the processes requested by other programs are registered in the action list tables 45a and 45b. Each entry of the event list tables 42a and 42b is
Status list tables 43a to 43d (ST0, ST1 in the figure) storing the state names (ST0, ST1) of the program of FIG.
And the status list table 4
3a to 43d are processing definition tables 44a to 4 which store statuses (ST0, ST1), processes (ac1 to ac3) to be executed, and program names (prA, prB) to execute the processes.
4h. The process definition tables 44a to 44h
Has two flags (indicated as NE and EQ in the figure) and sets "NE" when the stored status name or program name is different from the name of the upper table entry.

【0018】このようにして作成したテーブルを元に、
図1の言語プロセッサ4は、ルートテーブル41のエン
トリ毎に、個々のプログラム(prA,prB)のプログラム
コード(図1におけるプログラムコード5,6)を生成
する。次に、このようにして生成されるプログラムコー
ドに関して図5と図6を用いて説明する。
Based on the table created in this way,
The language processor 4 of FIG. 1 generates a program code (program code 5, 6 in FIG. 1) of each program (prA, prB) for each entry of the route table 41. Next, the program code thus generated will be described with reference to FIGS. 5 and 6.

【0019】図5は、図1における言語プロセッサによ
り生成される関数の構造例を示す説明図である。図1に
おけるプログラムコード5,6は、図5(a)に示すよ
うに、図4のイベントリストテーブル42a,42bの
各事象名に対応して生成する複数の関数51と、図5
(b)に示すように、一つの受信処理関数57により構
成される。まず、図5(a)に示すように、事象名に対
応した関数51は、他プログラムによる状態変数の変更
を抑止する処理(ステップ52)、この抑止を解除する
処理(ステップ56)、状態を判定して分岐する処理
(ステップ53)、そして、状態を変更する処理(ステ
ップ54)と、対応する処理を実行する処理(ステップ
55からなる分岐ブロックにより構成されている。
FIG. 5 is an explanatory diagram showing a structural example of a function generated by the language processor in FIG. As shown in FIG. 5A, the program codes 5 and 6 in FIG. 1 include a plurality of functions 51 generated corresponding to the event names in the event list tables 42a and 42b in FIG.
As shown in (b), it is composed of one reception processing function 57. First, as shown in FIG. 5A, the function 51 corresponding to the event name has a process of suppressing the change of the state variable by another program (step 52), a process of releasing this suppression (step 56), and a state change. It is composed of a process of judging and branching (step 53), a process of changing the state (step 54) and a process of executing the corresponding process (branching block consisting of step 55).

【0020】ここで、状態の判定に基づき分岐するステ
ップ53は、図4のステータスリストテーブル43a〜
43dに登録された状態名毎の分岐先を持つように生成
され、現在のプログラム状態に対応する分岐先へ分岐す
る。分岐先のブロックには、図4の処理定義テーブル4
4a〜44hの内容に基づいて、状態変更するステップ
54や処理実行するステップ55が展開される。但し、
状態変更が発生しなければ、状態変更のステップ54は
展開しない。また、処理実行のステップ55では、図4
の処理定義テーブル44a〜44hに登録されている処
理を実行するプログラムが自プログラムであればそのま
ま処理を展開し、他のプログラムであればそのプログラ
ムへの処理要求メッセージ送信を展開する。
Here, the step 53 of branching based on the judgment of the state is the status list table 43a-43a of FIG.
It is generated so as to have a branch destination for each state name registered in 43d, and branches to the branch destination corresponding to the current program state. The block at the branch destination includes the process definition table 4 of FIG.
Based on the contents of 4a to 44h, step 54 for changing the state and step 55 for executing the process are expanded. However,
If no state change has occurred, the state change step 54 is not expanded. Further, in step 55 of the process execution, as shown in FIG.
If the program executing the process registered in the process definition tables 44a to 44h is the own program, the process is expanded as it is, and if it is another program, the process request message transmission to the program is expanded.

【0021】次に、図5(b)において、受信処理関数
57は、メッセージを受信する処理(ステップ58)、
要求を判定して分岐する処理(ステップ59)、そし
て、処理を実行する処理(ステップ60)を含む分岐ブ
ロックにより構成されている。要求を判定して分岐する
ステップ59は、図4のアクションリストテーブル45
a,45bに登録された処理毎の分岐を持つように生成
され、要求された処理コード(ac1〜ac3)によって、対
応する分岐先へ分岐する。処理を実行するステップ60
には、図4のアクションリストテーブル45a,45b
に登録された処理(ac1〜ac3)を展開する。このような
手順で、実際に展開した図1におけるプログラムコード
5,6の例を、図6に示す。
Next, in FIG. 5B, the reception processing function 57 receives the message (step 58),
It is composed of a branch block including a process of judging a request and branching (step 59) and a process of executing the process (step 60). The step 59 of judging the request and branching is the action list table 45 of FIG.
It is generated so as to have a branch for each processing registered in a and 45b, and branches to the corresponding branch destination according to the requested processing code (ac1 to ac3). Step 60 for executing processing
Includes action list tables 45a and 45b in FIG.
Expand the processing (ac1 to ac3) registered in. FIG. 6 shows an example of the program codes 5 and 6 in FIG. 1 which are actually developed by such a procedure.

【0022】図6は、図1における言語プロセッサによ
り生成されたプログラムコード例を示す説明図である。
本図6に示す例では、図5のステップ52におけるプロ
グラム状態の変更抑止、ステップ56における変更の抑
止解除、ステップ54におけるプログラム状態の変更、
ステップ55における処理要求、ステップ58における
メッセージの受信は、ライブラリとして提供することを
仮定している。この図6を用いて、図1における言語プ
ロセッサ4が生成した図5における関数51および受信
処理関数57の動作を説明する。
FIG. 6 is an explanatory diagram showing an example of program code generated by the language processor in FIG.
In the example shown in FIG. 6, the program state change inhibition in step 52, the change inhibition release in step 56, the program state change in step 54,
It is assumed that the processing request in step 55 and the message reception in step 58 are provided as a library. Operations of the function 51 and the reception processing function 57 in FIG. 5 generated by the language processor 4 in FIG. 1 will be described with reference to FIG.

【0023】図5における事象に対応付けられた関数5
1は、プログラム間連携を要する事象が発生した際の処
理ルーチン(図6における「事象1発生時に呼び出され
るメソッド」、「事象2発生時に呼び出されるメソッ
ド」)として、また、受信処理関数57は、他プログラ
ムから処理要求が発生した際の割り込みルーチン(図6
における「相手プログラムからの要求処理を実行」)と
してプログラムに組み込まれる。図5の事象に対応付け
られた関数51は、まず、図6中の「LOCK( )」で、他
プログラムによるプロラム状態の変更を抑止する(図5
のステップ52)。つまり、複数のプログラムで同時に
状態変更抑止の要求があった場合、一方のプログラムの
処理を、他方のプログラムが状態変更抑止を解除するま
で中断させる。
Function 5 associated with the event in FIG.
1 is a processing routine when an event requiring inter-program cooperation occurs (“method called when event 1 occurs”, “method called when event 2 occurs” in FIG. 6), and the reception processing function 57: An interrupt routine when a processing request is issued from another program (see FIG. 6).
"Execute the request process from the partner program" in)) is incorporated into the program. The function 51 associated with the event of FIG. 5 first uses “LOCK ()” in FIG. 6 to prevent the program state from being changed by another program (FIG. 5).
Step 52). That is, when a plurality of programs request state change inhibition at the same time, the processing of one program is suspended until the other program releases the state change inhibition.

【0024】次に、図6中の「switch(st)」で、現在の
プログラム状態を判定し(図5のステップ53)、図6
中の「case ST0」、「case ST1」、「default」で、こ
れに合致した分岐先へ分岐する。分岐後、自プログラム
および他プログラムの状態を変更するために、図6中の
「st=ST1」と「SET(prB,ST1)」で、プログラム状態変更
の要求メッセージを送信する(図5のステップ54)。
このメッセージを受け取ったプログラムは、自プログラ
ムの状態を指定された値に変更する。
Next, the "switch (st)" in FIG. 6 is used to judge the current program state (step 53 in FIG. 5).
Branch to the branch destination that matches this with "case ST0", "case ST1", and "default". After branching, send a program status change request message with "st = ST1" and "SET (prB, ST1)" in FIG. 6 to change the status of the own program and other programs (step in FIG. 5). 54).
The program that receives this message changes the status of its own program to the specified value.

【0025】この後、図6中の「ac1(arg)」で、定義さ
れた処理を実行する(図5のステップ55)。もし、指
定された処理が他プログラムで実行すべきものであれ
ば、図6中の「SEND(prB,AC1,arg)」で、該当するプロ
グラムに対して処理要求のメッセージを送信する。その
処理が終了すると、図6中の「UNLOCK( )」で、プログ
ラム状態の変更抑止を解除して(図5のステップ56)
して、関数を終了する。
Thereafter, the defined processing is executed by "ac1 (arg)" in FIG. 6 (step 55 in FIG. 5). If the designated processing is to be executed by another program, a processing request message is transmitted to the corresponding program by "SEND (prB, AC1, arg)" in FIG. When the processing is completed, the program state change suppression is canceled by "UNLOCK ()" in FIG. 6 (step 56 in FIG. 5).
Then, the function ends.

【0026】一方、図5の受信処理関数57(図6中の
「void d_receive(void){・・・}」)は、他プログラ
ムからのメッセージを受け取った際に、割り込んで呼び
出される。そして、この図5の受信処理関数57は、図
6中の「RECEIVE(&ev, argb)」で、送られてきたメッセ
ージを受信し(図5のステップ58)、図6中の「swit
ch(ev)」および「case AC2」で、その要求種別に対応し
た分岐先に分岐する(図5のステップ59)。この分岐
先では、図6中の「ac2(argb)」で定められた処理を実
行する(図5のステップ60)。このようにして、複数
プログラム間の状態の同値性は保証され、図1の言語プ
ロセッサ4が入力した図1の連携定義ソースコード1
と、生成したプログラムA,B毎のプログラムコード
5,6の論理的同値性が保証される。
On the other hand, the reception processing function 57 of FIG. 5 ("void d_receive (void) {...}" in FIG. 6) is interrupted and called when a message from another program is received. Then, the reception processing function 57 of FIG. 5 receives the message sent by “RECEIVE (& ev, argb)” of FIG. 6 (step 58 of FIG. 5), and “swit
With “ch (ev)” and “case AC2”, branch to the branch destination corresponding to the request type (step 59 in FIG. 5). At this branch destination, the process defined by "ac2 (argb)" in FIG. 6 is executed (step 60 in FIG. 5). In this way, the equivalence of states between a plurality of programs is guaranteed, and the cooperation definition source code 1 of FIG. 1 input by the language processor 4 of FIG.
Then, the logical equivalence of the generated program codes 5 and 6 for each of the programs A and B is guaranteed.

【0027】以上、図1〜図6を用いて説明したよう
に、本実施例の言語プロセッサでは、言語プロセッサ4
を使用することにより、プログラム間で連携を行う際の
複雑な処理を簡潔に記述することが可能になる。すなわ
ち、言語プロセッサ4を使用してプログラム開発を行う
ことにより、分散処理システムの難解なプログラム通信
処理を意識することなく、システムの状態遷移にのみ基
づいて、その設計及び開発が可能になる。これに伴い、
プログラム開発作業の効率向上、プログラムへのバグの
作り込み減少が望める。また、複数のプログラム間の関
連する処理を一つのソースコードとして記述が可能にな
るため、ソースコードの保守管理も効率的に行うことが
できる。
As described above with reference to FIGS. 1 to 6, in the language processor of this embodiment, the language processor 4
By using, it becomes possible to describe the complicated processing when linking between programs simply. That is, by using the language processor 4 to develop a program, it is possible to design and develop the program based on only the state transitions of the system without being aware of the difficult program communication processing of the distributed processing system. Along with this,
It is expected that the efficiency of program development work will be improved and the number of bugs created in the program will be reduced. Further, since the related processing between a plurality of programs can be described as one source code, the source code can be efficiently maintained and managed.

【0028】尚、本発明は、図1〜図6を用いて説明し
た実施例に限定されるものではなく、その要旨を逸脱し
ない範囲において種々変更可能である。例えば、本実施
例では、2つのプログラムA,Bからなる分散処理シス
テムを例に説明したが、2以上のプログラムからなるシ
ステムにも適用することができる。
The present invention is not limited to the embodiment described with reference to FIGS. 1 to 6, and can be variously modified without departing from the gist thereof. For example, although the distributed processing system including the two programs A and B has been described as an example in the present embodiment, the present invention can be applied to a system including two or more programs.

【0029】[0029]

【発明の効果】本発明によれば、分散処理システムにお
けるプログラム間の連携処理の仕様を記述したソースコ
ードから、個々のプログラムでの通信処理を実行するソ
ースコードを生成することができるので、分散処理シス
テムを構成する各プログラム間の同期やプロトコルを含
む、個々のプログラム毎の仕様をそれぞれ独立して記述
する必要がなくなり、分散処理システムのソフトウェア
生産性を向上させることが可能である。
According to the present invention, the source code for executing the communication process in each program can be generated from the source code in which the specifications of the cooperative process between the programs in the distributed processing system are described. It is not necessary to describe the specifications of each program independently, including the synchronization between the programs forming the processing system and the protocol, and it is possible to improve the software productivity of the distributed processing system.

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

【図1】本発明のプログラム開発装置の本発明に係る構
成の一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a configuration according to the present invention of a program development device of the present invention.

【図2】プログラム開発対象の分散処理システム全体の
動作を表す状態遷移表の一構成例を示す説明図である。
FIG. 2 is an explanatory diagram showing a configuration example of a state transition table showing the operation of the entire distributed processing system for which a program is developed.

【図3】図1におけるソースコード例を示す説明図であ
る。
FIG. 3 is an explanatory diagram showing an example of a source code in FIG.

【図4】図1における言語プロセッサによるソースコー
ドからのプログラムコードの生成手順例を示す説明図で
ある。
FIG. 4 is an explanatory diagram showing an example of a procedure for generating a program code from a source code by the language processor in FIG.

【図5】図1における言語プロセッサにより生成される
関数の構造例を示す説明図である。
5 is an explanatory diagram showing a structural example of a function generated by the language processor in FIG.

【図6】図1における言語プロセッサにより生成された
プログラムコード例を示す説明図である。
6 is an explanatory diagram showing an example of program code generated by a language processor in FIG. 1. FIG.

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

1:連携定義ソースコード、1a:宣言部、1b:定義
部、2,3:固有処理ソースコード、4:言語プロセッ
サ、5,6:プログラムコード、7,8:コンパイラ・
リンカ、9:プログラムAのロードモジュール、10:
プログラムBのロードモジュール、20:状態遷移表、
21:事象、22:状態、23:実行すべき処理、4
1:ルートテーブル、42a,42b:イベントリスト
テーブル、43a〜43d:ステータスリストテーブ
ル、44a〜44h:処理定義テーブル、45a,45
b:アクションリストテーブル。
1: Coordination definition source code, 1a: Declaration part, 1b: Definition part, 2, 3: Unique processing source code, 4: Language processor, 5, 6: Program code, 7, 8: Compiler
Linker, 9: Program A load module, 10:
Load module of program B, 20: state transition table,
21: event, 22: state, 23: processing to be executed, 4
1: route table, 42a, 42b: event list table, 43a-43d: status list table, 44a-44h: process definition table, 45a, 45
b: Action list table.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の情報処理装置を連携させて一つの
処理を行なう分散処理システムのプログラムの開発装置
であって、上記分散処理システムで発生し得る、上記各
情報処理装置のそれぞれのプログラム間での連携を必要
とする各事象に対応して、該事象の発生時における上記
各プログラムの活性状態別に、実行されるべき処理、該
処理を実行すべきプログラム、処理実行後の上記プログ
ラムの活性状態の変更指示を少なくとも含む処理指示情
報が記述されたソースコードに基づき、上記個々のプロ
グラム別かつ上記事象およびプログラムの活性状態別
に、上記処理を実行すべきプログラムが自プログラムで
あれば、上記実行されるべき処理を実行するプログラム
コードを、上記処理を実行すべきプログラムが他プログ
ラムであれば、該処理を実行すべき他プログラムに、上
記実行されるべき処理の実行を要求するプログラムコー
ドを生成すると共に、上記処理実行後のプログラムの活
性状態の変更指示があれば、自プログラムの活性状態、
および、他プログラムのプログラム状態を変更させるプ
ログラムコードを生成し、上記個々のプログラム別に、
自プログラムで実行すべき処理に対する他プログラムか
らの処理要求を受信し、該受信した処理要求に対応した
処理を実行するプログラムコードを生成し、上記プログ
ラム別の各通信処理ルーチンのソースプログラムを生成
する第1の言語プロセッサと、該第1の言語プロセッサ
で生成したプログラム別の各通信処理ルーチンのソース
プログラムと、上記個々のプログラムに固有の処理を記
述した各ソースプログラムから、上記個々のプログラム
別のオブジェクトプログラムを生成する第2の言語プロ
セッサとを設けることを特徴とするプログラム開発装
置。
1. A development device for a program of a distributed processing system, wherein a plurality of information processing devices cooperate with each other to perform a single process, and between the programs of each of the information processing devices that can occur in the distributed processing system. Corresponding to each event that requires cooperation with each other, according to the activation state of each program when the event occurs, the process to be executed, the program to execute the process, and the activity of the program after the process is executed. Based on the source code in which the processing instruction information including at least the state change instruction is described, if the program for executing the above processing is the own program for each individual program and each event and active state of the program, the execution is performed. If the program that executes the above process is another program, the program code that executes the process In another program to be executed, generate a program code requesting the execution of the process to be executed, and if there is an instruction to change the active state of the program after executing the process, the active state of the own program,
And, generate a program code to change the program state of other programs, for each of the above programs,
It receives a processing request from another program for processing to be executed by its own program, generates a program code for executing the processing corresponding to the received processing request, and generates a source program of each communication processing routine for each program. From the first language processor, the source program of each communication processing routine for each program generated by the first language processor, and each source program describing the processing unique to each of the programs, A program development device, comprising: a second language processor for generating an object program.
JP981796A 1996-01-24 1996-01-24 Program development device Pending JPH09204299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP981796A JPH09204299A (en) 1996-01-24 1996-01-24 Program development device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP981796A JPH09204299A (en) 1996-01-24 1996-01-24 Program development device

Publications (1)

Publication Number Publication Date
JPH09204299A true JPH09204299A (en) 1997-08-05

Family

ID=11730712

Family Applications (1)

Application Number Title Priority Date Filing Date
JP981796A Pending JPH09204299A (en) 1996-01-24 1996-01-24 Program development device

Country Status (1)

Country Link
JP (1) JPH09204299A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11345180A (en) * 1998-06-03 1999-12-14 Nec Corp Distributed processing system and processing method therefor
JP2007133620A (en) * 2005-11-10 2007-05-31 Fujitsu Ltd Task distribution program and task distribution apparatus for processor apparatus having multiprocessor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11345180A (en) * 1998-06-03 1999-12-14 Nec Corp Distributed processing system and processing method therefor
JP2007133620A (en) * 2005-11-10 2007-05-31 Fujitsu Ltd Task distribution program and task distribution apparatus for processor apparatus having multiprocessor

Similar Documents

Publication Publication Date Title
US6529934B1 (en) Information processing system and method for same
US8112751B2 (en) Executing tasks through multiple processors that process different portions of a replicable task
CN1050916C (en) System for implementation-independent interface specification
Crainic et al. Parallel Branch‐and‐Bound Algorithms
Clarke et al. An efficient component model for the construction of adaptive middleware
US5442791A (en) Integrated remote execution system for a heterogenous computer network environment
US20030005407A1 (en) System and method for coordination-centric design of software systems
US5319782A (en) Method for synchronizing the dispatching of tasks among multitasking operating systems
US6128315A (en) Distributed control network system
US6470346B2 (en) Remote computation framework
Saksena et al. Guidelines for automated implementation of executable object oriented models for real-time embedded control systems
Vanneschi et al. Dynamicity in distributed applications: issues, problems and the assist approach
JPH09204299A (en) Program development device
El Fallah Seghrouchni et al. Claim and sympa: A programming environment for intelligent and mobile agents
Zorzo et al. Using Co-ordinated Atomic Actions to Design Dependable Distributed Object Systems
Nickschas et al. CARISMA-A Service-Oriented, Real-Time Organic Middleware Architecture.
JPH09160847A (en) Client server-type distribution processing system
Cordeiro et al. Exploiting multithreaded programming on cluster architectures
Demeure et al. A scheduling framework for the automatic support of temporal QoS constraints
Lo et al. Architectural considerations in the design of real-time kernels
Pirklbauer et al. Object-oriented and conventional process automation systems
Biskup et al. Administration rights in the sdsd-system
Briot et al. Object-oriented concurrent programming
Huang et al. Constructive protocol specification using Cicero
Hopkins et al. Writing concurrent object-oriented programs using Smalltalk-80