JP3067707B2 - Client / server program generation method - Google Patents

Client / server program generation method

Info

Publication number
JP3067707B2
JP3067707B2 JP9231889A JP23188997A JP3067707B2 JP 3067707 B2 JP3067707 B2 JP 3067707B2 JP 9231889 A JP9231889 A JP 9231889A JP 23188997 A JP23188997 A JP 23188997A JP 3067707 B2 JP3067707 B2 JP 3067707B2
Authority
JP
Japan
Prior art keywords
client
server
variable
script
logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP9231889A
Other languages
Japanese (ja)
Other versions
JPH1173306A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP9231889A priority Critical patent/JP3067707B2/en
Publication of JPH1173306A publication Critical patent/JPH1173306A/en
Application granted granted Critical
Publication of JP3067707B2 publication Critical patent/JP3067707B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、クライアント/
サーバ・プログラム開発時のソース・コードを一元化
し、そのソース・コードからクライアント/サーバ・プ
ログラムを自動生成する装置及び方法に関するものであ
る。
TECHNICAL FIELD The present invention relates to a client /
The present invention relates to an apparatus and method for unifying a source code at the time of developing a server program and automatically generating a client / server program from the source code.

【0002】[0002]

【従来の技術】一般に、クライアント/サーバ・プログ
ラムには、アプリケーションプログラムとインターフェ
ースプログラムとがあり、それぞれ別個に生成する必要
がある。従来、この種のクライアント/サーバ・プログ
ラムの自動生成に関する技術として、例えば特開平4−
111022号公報に示されたような「インタフェース
プログラム自動生成装置」がある。当公報においては、
図10に示すように、同機種または異機種の計算機がネ
ットワーク上に接続されたシステムで、計算機間で相互
にデータを交換する手段をインタフェースプログラムソ
ースコードとして自動生成するインタフェース自動生成
装置について述べている。この自動生成装置でのインプ
ットは、インタフェース定義707と言語仕様708と
一般化/特殊化ルーチン709と通信プロトコルルーチ
ン710であり、アウトプットは、クライアント変換デ
ータ・データ型定義711とサーバ変換データ・データ
型定義712とクライアントインタフェースプログラム
713とサーバインタフェースプログラム714であ
る。
2. Description of the Related Art Generally, a client / server program includes an application program and an interface program, which need to be generated separately. Conventionally, as a technique relating to automatic generation of this kind of client / server program, for example, Japanese Patent Application Laid-Open
There is an “interface program automatic generation device” as disclosed in JP-A-110122. In this publication,
As shown in FIG. 10, an interface automatic generation apparatus for automatically generating, as an interface program source code, means for mutually exchanging data between computers in a system in which computers of the same model or different models are connected on a network. I have. Inputs in this automatic generation device are an interface definition 707, a language specification 708, a generalization / specialization routine 709, and a communication protocol routine 710. Outputs are a client conversion data / data type definition 711 and a server conversion data / data. A type definition 712, a client interface program 713, and a server interface program 714.

【0003】ユーザは自らが記述したクライアントアプ
リケーションプログラムと、自動生成されたクライアン
ト変換データ・データ型定義711とクライアントイン
タフェースプログラム713を、クライアントマシン上
でコンパイルし、また自らが記述したサーバアプリケー
ションプログラムと、自動生成されたサーバ変換データ
・データ型定義712とサーバインタフェースプログラ
ム714を、サーバマシン上でコンパイルすることで異
機種計算機間でデータ交換を行うプログラムの実行が可
能になる。
A user compiles a client application program described by himself / herself, an automatically generated client conversion data / data type definition 711 and a client interface program 713 on a client machine, and writes a server application program written by himself / herself, By compiling the automatically generated server conversion data / data type definition 712 and the server interface program 714 on a server machine, it becomes possible to execute a program for exchanging data between heterogeneous computers.

【0004】また、別の例として、特開平6−2429
38号公報に示されたような「通信処理プログラムの自
動生成方式」がある。当公報においては、図11に示す
ように、ネットワークにより接続された分散処理システ
ムにおける計算機間の通信処理を行う通信処理プログラ
ムの自動生成方式について述べている。この自動生成方
式でのインプットは、データ定義ファイル801とイン
タフェース定義ファイル802とモード定義ファイル8
03であり、アウトプットは、通信処理プログラム80
9である。当然のことながら、アプリケーションプログ
ラムは別途生成する必要がある。
Another example is disclosed in Japanese Patent Application Laid-Open No. 6-2429.
There is an "automatic generation method of a communication processing program" as disclosed in JP-A-38. This publication describes an automatic generation method of a communication processing program for performing communication processing between computers in a distributed processing system connected by a network, as shown in FIG. Inputs in this automatic generation method include a data definition file 801, an interface definition file 802, and a mode definition file 8
03, and the output is the communication processing program 80
9 As a matter of course, the application program needs to be generated separately.

【0005】[0005]

【発明が解決しようとする課題】従来のクライアント/
サーバ・プログラム生成装置は上記のように構成されて
いるので、インタフェースプログラムとは別にアプリケ
ーションプログラムを生成する必要があり、ユーザが別
に作成したクライアントアプリケーションプログラムや
サーバアプリケーションプログラムと連携して動作する
ことにより、初めてクライアント/サーバ間のデータ交
換が可能になる。
SUMMARY OF THE INVENTION A conventional client /
Since the server program generation device is configured as described above, it is necessary to generate an application program separately from the interface program, and by operating in cooperation with a client application program or a server application program created separately by a user, For the first time, data exchange between client and server becomes possible.

【0006】この発明は、上記のような問題点を解消す
るためになされたもので、クライアント・ロジックとサ
ーバ・ロジックを同一のソース・コード内に記述するこ
とによりクライアント/サーバ・プログラム各実行プロ
グラムの自動生成を可能にすることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and a client / server program can be executed by writing client logic and server logic in the same source code. It is an object to enable automatic generation of

【0007】[0007]

【課題を解決するための手段】この発明に係るクライア
ント/サーバ・プログラム生成方法は、クライアント/
サーバを起動するソースコードをスクリプト形式でクラ
イアント/サーバをそれぞれ識別する識別子を付してク
ライアント側サーバ側交互に処理順にスクリプトソース
を記述するステップ、上記スクリプトソースをクライア
ント/サーバそれぞれのスクリプトソースに分解生成す
るステップ、分解生成されたスクリプトソースの1ステ
ップが「変数=変数」で与えられ右辺がサーバ側変数の
ときは右辺の変数をクライアントに送信し左辺の変数に
入力する通信プログラムのソースコードを生成し、右辺
がクライアント側変数のときは右辺の変数をサーバに送
信し左辺の変数に入力する通信プログラムのソースコー
ドを生成するものである。
According to the present invention, there is provided a method for generating a client / server program, comprising the steps of:
A step of writing the script source in the processing order by assigning an identifier for identifying the client / server to the source code for starting the server in a script format on the client side and the server side alternately; decomposing the script source into script sources for the client / server respectively Generating step, one step of the generated script source is given by “variable = variable”, and when the right side is a server side variable, the right side variable is transmitted to the client and the communication program source code to be input to the left side variable is When the right side is a client side variable, the right side variable is transmitted to the server, and the source code of the communication program to be input to the left side variable is generated.

【0008】[0008]

【0009】[0009]

【0010】[0010]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

実施の形態1.図1は本発明に係る実施の形態1のクラ
イアント/サーバ・プログラム生成装置の構成を示すブ
ロック図である。図1において、101はユーザが作成
するスクリプトソースであるスクリプト形式ソース・コ
ードであり、102はスクリプト形式ソース・コード1
01を入力して構文解析し、クライアント・ロジック・
セーブ領域105とサーバ・ロジック・セーブ領域10
6と外部変数テーブル107を出力する構文解析部であ
る。この構文解析部102には通信ロジック処理部10
3と外部変数処理部104が内包されている。
Embodiment 1 FIG. FIG. 1 is a block diagram showing the configuration of the client / server program generation device according to the first embodiment of the present invention. In FIG. 1, reference numeral 101 denotes a script source code which is a script source created by a user, and reference numeral 102 denotes a script source code.
01 and parse it to get the client logic
Save area 105 and server logic save area 10
6 and a syntax analysis unit that outputs the external variable table 107. The syntax analysis unit 102 includes a communication logic processing unit 10
3 and an external variable processing unit 104 are included.

【0011】111は構文解析部102から出力された
スクリプト形式ソース・コードをC言語による各Cソー
ス・コードに変換するクライアント/サーバ・ソース生
成部としてのクライアント/サーバCソース生成部であ
り、112は変換されたクライアント側Cソース、11
3は変換されたサーバ側Cソースである。114は予め
備えておいたコンパイラ/リンカを用いてクライアント
側Cソース112とサーバ側Cソース113から各実行
プログラムを生成する言語処理部である。115は生成
されたクライアント側実行プログラム、116は生成さ
れたサーバ側実行プログラムである。
Reference numeral 111 denotes a client / server C source generation unit as a client / server source generation unit for converting the script format source code output from the syntax analysis unit 102 into each C source code in C language. Is the converted client-side C source, 11
Reference numeral 3 denotes a converted server-side C source. A language processing unit 114 generates each execution program from the client-side C source 112 and the server-side C source 113 by using a compiler / linker provided in advance. Reference numeral 115 denotes a generated client-side execution program, and reference numeral 116 denotes a generated server-side execution program.

【0012】次に、図2は図1に示すスクリプト形式ソ
ース・コード101の一例を示す図である。このスクリ
プト形式は上から下へ順番に実行され、クライアント側
ロジックとサーバ側ロジックを混在させて記述すること
ができる。クライアント側ロジックは、“CLBegi
n”〜“CLEnd”の間に記述し、サーバ側ロジック
は、“SVBegin”〜“SVEnd”の間に記述す
る。この“xxBegin”〜“xxEnd”のセット
はスクリプト内にいくつあっても構わない。クライアン
ト/サーバ間の連携ロジックについては、“Ext”で
定義した変数、この例では“CA”、“CB”、“S
X”、“SY”の外部変数を用いて記述する。
FIG. 2 is a diagram showing an example of the script format source code 101 shown in FIG. This script format is executed in order from top to bottom, and client side logic and server side logic can be mixed and described. The client side logic is "CLBegi
n "to" CLEnd "and the server side logic is described between" SVBegin "and" SVEnd. "There may be any number of sets of" xxBegin "to" xxEnd "in the script. Regarding the cooperation logic between the client and the server, variables defined by “Ext”, in this example, “CA”, “CB”, “S”
It is described using external variables “X” and “SY”.

【0013】例に示したスクリプトのロジックの流れを
詳述すると、“Ext CA,CB”で連携ロジックに
使用するクライアント側外部変数を定義し、“INPU
TCA”でクライアント側でCAへのデータ入力待ちに
なり、ユーザがデータ入力することにより入力データが
CAに代入される。次の“Ext SX,SY”は連携
ロジックに使用するサーバ側外部変数を定義であり、
“SX=CA”でクライアント外部変数であるCAがS
Xに代入される。図1で示されたクライアント側Cソー
ス112及び、サーバ側Cソース113内にはCAがS
Xに代入される部分は通信ロジックとして変換される。
The flow of the logic of the script shown in the example will be described in detail. In “Ext CA, CB”, a client-side external variable used for the cooperation logic is defined and “INPU
The client waits for data input to the CA at "TCA", and the input data is substituted into the CA by the user inputting data. The next "Ext SX, SY" is a server-side external variable used for the cooperation logic. Definition
“SX = CA” and the client external variable CA is S
Substituted for X. In the client-side C source 112 and the server-side C source 113 shown in FIG.
The part substituted for X is converted as communication logic.

【0014】次の“SY=SX * 30 + 100“は
四則演算式であり、SYに計算結果が代入される。次
の”CB=SY“でサーバ外部変数であるSYがCBに
代入され、Cソース変換されるときは、通信ロジックと
して変換される。次の”OUTPUT CB“はクライ
アントが有している画面等にCBの値が出力される。
The next "SY = SX * 30 + 100" is an arithmetic expression, and the calculation result is substituted for SY. When the next “CB = SY” and SY, which is a server external variable, is substituted into CB and converted into C source, it is converted as communication logic. In the next “OUTPUT CB”, the value of the CB is output to a screen or the like of the client.

【0015】上記のように、クライアント/サーバ・プ
ログラムを表現し易いスクリプト形式で記述できるの
で、特定の言語の知識が不要である。また、実行する順
番に上から下にクライアントとサーバでの処理を交互に
記述できるので、クライアントとサーバ間のデータの送
受信及びクライアントとサーバでのそれぞれの処理を順
を追ってもれなく記述することができる。
As described above, since a client / server program can be described in a script format that can be easily expressed, knowledge of a specific language is not required. In addition, since the processes in the client and the server can be described alternately from top to bottom in the order of execution, data transmission / reception between the client and the server and each process in the client and the server can be described without fail. .

【0016】次に、図3は図2に示すスプリクト形式ソ
ース・コードの例を図1で示す構文解析部102で構文
解析し、分解されて出力される、クライアント側スクリ
プト形式ソース・コード109とサーバ側スクリプト形
式ソース・コード110の例である。ここで、“CLE
xt”は図2で示したクライアント側外部変数定義を表
し、“SVExt”はサーバ側外部変数定義を表す。
“SEND”、“RECV”は上記スプリクト形式ソー
ス・コードでの連携ロジックに対応して埋め込まれた通
信ロジックである。“SEND”はデータ送信を示し、
“RECV”はデータ受信待ちを示す。
Next, FIG. 3 shows a client-side script format source code 109 which is obtained by parsing the example of the split format source code shown in FIG. 2 by the syntax analyzer 102 shown in FIG. It is an example of a server-side script format source code 110. Here, "CLE
“xt” represents the client-side external variable definition shown in FIG. 2, and “SVExt” represents the server-side external variable definition.
“SEND” and “RECV” are communication logics embedded corresponding to the coordination logic in the above-described split format source code. “SEND” indicates data transmission,
“RECV” indicates waiting for data reception.

【0017】次に、図4は構文解析部102の処理フロ
ーを示す。はじめにスプリクト形式ソース・コード10
1をオープン(ステップ201)し、ファイルの先頭か
ら順次1レコードづつ入力する(ステップ202)。入
力レコードがなくなった(EOF)らステップ212の
処理へ、1レコード入力が成功したら次の処理に進む
(ステップ203)。ステップ204では、スクリプト
の構文が、“CLBegin”または“CLEnd”ま
たは“SVBegin”または“SVEnd”かどうか
を判定し、YESで“CLBegin”のときはCLフ
ラグをONにし、“ CLEnd”のときは CLフラグ
をOFFにし、“SVBegin”のときはSVフラグ
をONにし、“ SVEnd”のときは SVフラグをO
FFにしてステップ202の処理に戻る(ステップ20
5)。
FIG. 4 shows a processing flow of the syntax analyzer 102. Introduction source code 10
1 are opened (step 201), and records are sequentially input one by one from the beginning of the file (step 202). If there is no input record (EOF), the process proceeds to step 212. If one record is successfully input, the process proceeds to the next process (step 203). In step 204, it is determined whether or not the syntax of the script is “CLBegin” or “CLEnd” or “SVBegin” or “SVEnd”. When YES is “CLBegin”, the CL flag is turned on. Turn off the CL flag, turn on the SV flag when "SVBegin", and turn off the SV flag when "SVEnd".
FF is set and the process returns to step 202 (step 20).
5).

【0018】ステップ204でNOのときは、スクリプ
トの種類の判定をおこない、“変数=変数”のときは通
信ロジック処理部103へ進み(ステップ207)ステ
ップ202の処理に戻り、“Ext 変数,変数・・”
のときは外部変数処理部104へ進み(ステップ20
8)ステップ202の処理に戻り、それ以外のときはフ
ラグ・チェック(ステップ209)に進む(ステップ2
06)。ステップ209では、CLフラグとSVフラグ
のON/OFFチェックを行い、CLフラグONのとき
はクライアント・ロジック・セーブ領域105にステッ
プ202での入力レコードを追加出力(ステップ21
0)し、SVフラグONのときはサーバ・ロジック・セ
ーブ領域106にステップ202での入力レコードを追
加出力(ステップ211)する。ステップ210とステ
ップ211の処理後はステップ202に戻って次のレコ
ードを入力する。
If NO in step 204, the type of the script is determined, and if "variable = variable", the process proceeds to the communication logic processing unit 103 (step 207), and returns to the process in step 202, where "Ext variable, variable・ ・ ”
In the case of, the process proceeds to the external variable processing unit 104 (step 20).
8) Return to the process of step 202, otherwise proceed to flag check (step 209) (step 2)
06). In step 209, the CL flag and the SV flag are checked for ON / OFF. When the CL flag is ON, the input record in step 202 is additionally output to the client logic save area 105 (step 21).
0), and when the SV flag is ON, the input record in step 202 is additionally output to the server logic save area 106 (step 211). After the processing of step 210 and step 211, the process returns to step 202 to input the next record.

【0019】ステップ212では、外部変換テーブル1
07とクライアント・ロジック・セーブ領域105の内
容をマージして、クライアント側スクリプト形式ソース
・コード109に出力し、また、外部変数テーブル10
7とサーバ・ロジック・セーブ領域106の内容をマー
ジして、サーバ側スクリプト形式ソース・コード110
に出力して、処理を終了する。
At step 212, the external conversion table 1
07 and the contents of the client logic save area 105 are merged and output to the client side script format source code 109.
7 and the contents of the server logic save area 106 are merged into a server-side script format source code 110.
And the process ends.

【0020】次に、図5は通信ロジック処理部103の
処理フローを示す。はじめにCLフラグとSVフラグの
ON/OFFチェックを行いCLフラグONのときはス
テップ303の処理へ、SVフラグONのときはステッ
プ308の処理へ進む(ステップ301)。ステップ3
03では、図4のステップ202で入力したレコードの
内容で“変数=変数”の右辺変数がサーバ側変数だった
場合に、クライアント・ロジック・セーブ領域105に
“RECV 右辺変数”と202で入力したレコード内
容をそのまま追加出力し、サーバ・ロジック・セーブ領
域106に“SEND 右辺変数”を追加出力する(ス
テップ304、ステップ305、ステップ306)。ス
テップ303でNOだった場合は、通信処理の不要なレ
コードなのでクライアント・ロジック・セーブ領域10
5に202で入力したレコード内容をそのまま追加出力
する(ステップ307)のみである。
Next, FIG. 5 shows a processing flow of the communication logic processing unit 103. First, ON / OFF check of the CL flag and the SV flag is performed. When the CL flag is ON, the process proceeds to step 303, and when the SV flag is ON, the process proceeds to step 308 (step 301). Step 3
At 03, if the right-hand variable of “variable = variable” is a server-side variable in the contents of the record input at step 202 in FIG. 4, “RECV right-hand variable” is input to the client logic save area 105 as 202. The record contents are additionally output as they are, and “SEND right side variable” is additionally output to the server logic save area 106 (step 304, step 305, step 306). If NO in step 303, the record does not require communication processing, so the client logic save area 10
Only the contents of the record input at 202 in step 5 are additionally output as they are (step 307).

【0021】ステップ308では、202で入力したレ
コードの内容で“変数=変数”の右辺変数がクライアン
ト側変数だった場合に、サーバ・ロジック・セーブ領域
106に“RECV 右辺変数”と図4のステップ20
2で入力したレコード内容をそのまま追加出力し、クラ
イアント・ロジック・セーブ領域105に“SEND右
辺変数”を追加出力する(ステップ309、ステップ3
10、ステップ311)。ステップ308でNOだった
場合は、通信処理の不要なレコードなのでサーバ・ロジ
ック・セーブ領域106に202で入力したレコード内
容をそのまま追加出力する(ステップ312)のみであ
る。
In step 308, if the variable on the right side of "variable = variable" is a client-side variable in the contents of the record input in 202, "RECV right-side variable" is stored in the server logic save area 106 as shown in FIG. 20
The contents of the record input in step 2 are additionally output as they are, and “SEND right-side variable” is additionally output to the client logic save area 105 (step 309, step 3)
10, step 311). If NO in step 308, since the record does not require communication processing, the record content input in 202 in the server logic save area 106 is additionally output as it is (step 312).

【0022】次に、図6は外部変数処理部104の処理
フローを示す。はじめにCLフラグとSVフラグのON
/OFFチェックを行いCLフラグONのときはステッ
プ402の処理へ、SVフラグONのときはステップ4
03の処理へ進む(ステップ401)。ステップ402
では、図4のステップ202で入力したレコードの内容
で“Ext”の次に指定された変数をクライアント側外
部変数として外部変数テーブル107に追加出力する。
ステップ403では、図4のステップ202で入力した
レコードの内容で“Ext”の次に指定された変数をサ
ーバ側外部変数として外部変数テーブル107に追加出
力する。
FIG. 6 shows a processing flow of the external variable processing unit 104. First, turn on the CL flag and SV flag
/ OFF check, and if the CL flag is ON, the process proceeds to step 402. If the SV flag is ON, the process proceeds to step 4
03 (Step 401). Step 402
Then, the variable specified after “Ext” in the contents of the record input in step 202 of FIG. 4 is additionally output to the external variable table 107 as a client-side external variable.
In step 403, the variable specified next to "Ext" in the contents of the record input in step 202 of FIG. 4 is additionally output to the external variable table 107 as a server-side external variable.

【0023】次に、図7はクライアント/サーバCソー
ス生成部111の処理フローを示す。はじめに入力ファ
イルとしてクライアント側スクリプト形式ソース・コー
ド109をオープン(ステップ601)し、出力ファイ
ルとしてクライアント側Cソース112をオープン(ス
テップ602)し、入力ファイルの外部変数情報を出力
ファイルにC言語形式で出力し(ステップ603)、入
力ファイルのロジック部の先頭から順次1レコードづつ
入力する(ステップ604)。入力ファイルのロジック
部のレコードがなくなった(EOF)らステップ613
に進み、1レコード入力が成功したらステップ606に
進む(ステップ605)。
FIG. 7 shows a processing flow of the client / server C source generation unit 111. First, the client-side script format source code 109 is opened as an input file (Step 601), the client-side C source 112 is opened as an output file (Step 602), and the external variable information of the input file is output to the output file in C language format. The data is output (step 603), and records are sequentially input one by one from the top of the logic section of the input file (step 604). When there is no record in the logic part of the input file (EOF), step 613 is executed.
If one record is successfully input, the process proceeds to step 606 (step 605).

【0024】ステップ606では、ステップ604で入
力したレコードデータであるスクリプトの種類を判別
し、例えば“INPUT”の場合は出力ファイルに入力
ロジックをC言語で追加出力(ステップ607)し、
“OUTPUT”の場合は出力ファイルに出力ロジック
をC言語で追加出力(ステップ608)し、“SEN
D”の場合は出力ファイルに同期送信ロジックをC言語
で追加出力(ステップ609)し、“RECV”の場合
は出力ファイルに同期受信ロジックをC言語で追加出力
(ステップ610)し、四則計算式の場合は出力ファイ
ルに四則計算ロジックをC言語で追加出力(ステップ6
11)する等、スクリプトの種類に従ってC言語への変
換出力を別々のサブルーティンで行い、ステップ604
の入力ファイルのロジック部から新たなレコード入力へ
と戻る。
In step 606, the type of the script which is the record data input in step 604 is determined. For example, in the case of "INPUT", the input logic is additionally output to the output file in C language (step 607).
In the case of "OUTPUT", the output logic is additionally output to the output file in C language (step 608), and "SEN" is output.
In the case of "D", the synchronous transmission logic is additionally output to the output file in C language (step 609). In the case of "RECV", the synchronous reception logic is additionally output to the output file in C language (step 610). In the case of, additional arithmetic logic is added to the output file in C language (step 6
11) Perform conversion output to C language using different subroutines according to the type of script,
From the logic section of the input file to the new record input.

【0025】ステップ613では、クライアント側スク
リプト形式ソース・コード109とクライアント側Cソ
ース112がオープン中かどうかを判別し、YESなら
ばそれらのファイルをクローズ(ステップ614,ステ
ップ615)し、入力ファイルとして新たにサーバ側ス
クリプト形式ソース・コード110をオープンし(ステ
ップ616)、出力ファイルとしてサーバ側Cソース1
13をオープン(ステップ617)し、ステップ603
に戻る。NOならば現在オープンしているサーバ側スク
リプト形式ソース・コード110とサーバ側Cソース1
13とクローズして、当生成部の処理を終了する。
In step 613, it is determined whether or not the client-side script format source code 109 and the client-side C source 112 are open. If YES, the files are closed (step 614, step 615) and input files are set. The server-side script format source code 110 is newly opened (step 616), and the server-side C source 1 is output as an output file.
13 is opened (step 617), and step 603 is executed.
Return to If NO, the server-side script source code 110 and the server-side C source 1 that are currently open
13 and the process of the generating unit is terminated.

【0026】次に、図8及び図9は図7のステップ60
9とステップ610の処理で示したクライアント/サー
バ間の通信部分のスクリプトをC言語に変換した出力例
である。これらの例では通信プロトコルとしてはTCP
/IPを用いている。図8は“CA”を文字列データと
したときのスクリプト“SEND CA”の変換例であ
り、図9はCA”を文字列データとしたときのスクリプ
ト“RECV CA”の変換例である。
Next, FIGS. 8 and 9 show step 60 in FIG.
9 is an output example in which the script of the communication part between the client and the server shown in the processing of Step 9 and Step 610 is converted into C language. In these examples, the communication protocol is TCP
/ IP is used. FIG. 8 is a conversion example of the script “SEND CA” when “CA” is character string data, and FIG. 9 is a conversion example of the script “RECV CA” when “CA” is character string data.

【0027】次に、クライアント側実行プログラム11
5とサーバ側実行プログラム116の生成は、クライア
ント側Cソース112とサーバ側Cソース113をCソ
ースを言語処理部114が入力し、予め備えたCコンパ
イラ/リンカを利用してクライアント側実行プログラム
107とサーバ側実行プログラム108を出力する。
Next, the client-side execution program 11
5 and the server-side execution program 116 are generated by inputting the client-side C source 112 and the server-side C source 113 to the language processing unit 114 and using the C compiler / linker provided in advance. And the server-side execution program 108 is output.

【0028】このように、本実施例では、スクリプト形
式ソース・コード101に、クライアント部とサーバ部
を記述し、連携ロジック(データ通信部)を外部変数と
して定義することにより、各実行プログラムの自動生成
が可能になり、ソースが一元化でき通信ロジックを意識
する必要がないため、生産性を向上させることができ
る。また、言語処理部114が実行形式プログラムを生
成する前のクライアント側/サーバ側Cソースにユーザ
が修正を加えることにより、スクリプト形式ソース・コ
ード101では自動生成できないようなロジックをC言
語コードで追加することができ、生成される実行プログ
ラムについて木目細かなカスタマイズが可能になる。
As described above, in the present embodiment, the client unit and the server unit are described in the script format source code 101, and the coordination logic (data communication unit) is defined as an external variable. Generation is possible, the source can be unified, and there is no need to be aware of communication logic, so that productivity can be improved. In addition, the user modifies the client-side / server-side C source before the language processing unit 114 generates the executable format program, thereby adding logic that cannot be automatically generated by the script format source code 101 with the C language code. This allows fine-grained customization of the generated execution program.

【0029】なお、上記実施の形態1においては、生成
するクライアント側/サーバ側プログラム間の通信プロ
トコルを定義しておくための通信プロトコル定義を設け
て構成してもよい。これにより、その定義に従って生成
されるクライアント側/サーバ側プログラム間の通信プ
ロトコルが決まり、通信プロトコル定義を浮かせること
ができるため、生成される各プログラムを様々なネット
ワーク上で動作させることができ、動作環境に幅を持た
せることができる。
In the first embodiment, a communication protocol definition for defining a communication protocol between the client-side / server-side programs to be generated may be provided. Thereby, the communication protocol between the client-side / server-side program generated according to the definition is determined, and the communication protocol definition can be floated. Therefore, each generated program can be operated on various networks. The environment can be varied.

【0030】また、上記実施例においては、クライアン
ト/サーバCソース生成部111と言語処理部114を
C言語以外の別の言語対応に作り替えることにより、中
間ファイルとして生成するクライアント側Cソース11
2、サーバ側Cソース113がC言語にかかわらず他言
語のソースコードとして出力することができ、中間ファ
イルのカスタマイズはC言語によらず、他言語にも対応
することが可能になり、カスタマイズをする開発者層を
増やすことを可能にすることができる。
Further, in the above embodiment, the client / server C source 11 which is generated as an intermediate file by recreating the client / server C source generation unit 111 and the language processing unit 114 so as to correspond to another language other than C language.
2. The server-side C source 113 can output as a source code of another language regardless of the C language, and the customization of the intermediate file can be performed in another language regardless of the C language. It can make it possible to increase the number of developers to perform.

【0031】[0031]

【発明の効果】この発明は、以上説明したように構成さ
れているので、以下に示すような効果を奏する。
Since the present invention is configured as described above, it has the following effects.

【0032】[0032]

【0033】 変数=変数」で与えられるスクリプト
ソースにより通信プログラムのソースコードを生成する
ように構成したので、通信ロジックを意識することなし
に実行プログラムを自動生成することができ、生産性が
向上する。
Since the source code of the communication program is generated by the script source given by variable = variable”, the execution program can be automatically generated without considering the communication logic, and the productivity is improved. I do.

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

【図1】 この発明の実施の形態1のクライアント/サ
ーバ・プログラム生成装置を示す構成図である。
FIG. 1 is a configuration diagram illustrating a client / server program generation device according to a first embodiment of the present invention.

【図2】 この発明の実施の形態1のスクリプト形式ソ
ース・コードの一例を示す模式図である。
FIG. 2 is a schematic diagram showing an example of a script format source code according to the first embodiment of the present invention.

【図3】 この発明の実施の形態1の分解されたスクリ
プト形式ソース・コードの一例を示す模式図である。
FIG. 3 is a schematic diagram showing an example of a disassembled script format source code according to the first embodiment of the present invention.

【図4】 この発明の実施の形態1の構文解析部の処理
を示すフローチャートである。
FIG. 4 is a flowchart showing processing of a syntax analysis unit according to the first embodiment of the present invention.

【図5】 この発明の実施の形態1の通信ロジック部の
処理を示すフローチャートである。
FIG. 5 is a flowchart illustrating processing of a communication logic unit according to the first embodiment of the present invention.

【図6】 この発明の実施の形態1の外部変数処理部の
処理を示すフローチャートである。
FIG. 6 is a flowchart illustrating processing of an external variable processing unit according to the first embodiment of the present invention.

【図7】 この発明の実施の形態1のクライアント/サ
ーバ・ソース生成部の処理を示すフローチャートであ
る。
FIG. 7 is a flowchart showing processing of a client / server source generation unit according to the first embodiment of the present invention.

【図8】 この発明の実施の形態1のスクリプトからC
言語変換の例を示すCソースコードである。
FIG. 8 is a diagram illustrating a script from the first embodiment of the present invention to C
It is a C source code showing an example of language conversion.

【図9】 この発明の実施の形態1のスクリプトからC
言語変換の例を示すCソースコードである。
FIG. 9 is a diagram illustrating a script from the first embodiment of the present invention to C
It is a C source code showing an example of language conversion.

【図10】 従来例のクライアント/サーバ・プログラ
ム生成装置を示す構成図である。
FIG. 10 is a configuration diagram showing a conventional client / server program generation device.

【図11】 従来例の通信処理プログラム生成装置を示
す構成図である。
FIG. 11 is a configuration diagram showing a conventional communication processing program generation device.

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

101 スクリプト形式ソース・コード、102 構文
解析部、111 クライアント/サーバ・ソース生成
部。
101 script format source code, 102 syntax analyzer, 111 client / server source generator.

フロントページの続き (56)参考文献 特開 平7−141179(JP,A) 特開 平4−111022(JP,A) 特開 平6−242938(JP,A) 情報処理学会「第39回(平成元年後 期)全国大会講演論文集(▲II ▼)」、野村、外2名著”LOTOS実 行系における入力仕様からプログラムへ の変換”,p.1586−1587 (58)調査した分野(Int.Cl.7,DB名) G06F 9/06 530 G06F 9/44 320 G06F 15/16 Continuation of the front page (56) References JP-A-7-141179 (JP, A) JP-A-4-111022 (JP, A) JP-A-6-242938 (JP, A) IPSJ “39th ( 2nd 1989) National Convention Lecture Papers (▲ II ▼), Nomura and two other authors, "Conversion from Input Specifications to Programs in LOTOS Execution System", p. 1586-1587 (58) Field surveyed (Int.Cl. 7 , DB name) G06F 9/06 530 G06F 9/44 320 G06F 15/16

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 クライアント/サーバを起動するソース
コードをスクリプト形式でクライアント/サーバをそれ
ぞれ識別する識別子を付してクライアント側サーバ側交
互に処理順にスクリプトソースを記述するステップ、上
記スクリプトソースをクライアント/サーバそれぞれの
スクリプトソースに分解生成するステップ、分解生成さ
れたスクリプトソースの1ステップが「変数=変数」で
与えられ右辺がサーバ側変数のときは右辺の変数をクラ
イアントに送信し左辺の変数に入力する通信プログラム
のソースコードを生成し、右辺がクライアント側変数の
ときは右辺の変数をサーバに送信し左辺の変数に入力す
る通信プログラムのソースコードを生成することを特徴
とするクライアント/サーバ・プログラム生成方法。
1. A step of writing a script source in a processing order alternately with a client side and a server side by attaching an identifier for identifying a client / server in a script format to a source code for starting the client / server. The step of decomposing and generating the script source for each server. If one step of the decomposed script source is given by "variable = variable" and the right side is a server side variable, send the right side variable to the client and input it to the left side variable A source code of a communication program to generate a source code of a communication program to generate a source code of a communication program to be transmitted, and to transmit a variable of the right side to a server when the right side is a variable on the client side and to input the variable to a variable on the left side. Generation method.
JP9231889A 1997-08-28 1997-08-28 Client / server program generation method Expired - Lifetime JP3067707B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9231889A JP3067707B2 (en) 1997-08-28 1997-08-28 Client / server program generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9231889A JP3067707B2 (en) 1997-08-28 1997-08-28 Client / server program generation method

Publications (2)

Publication Number Publication Date
JPH1173306A JPH1173306A (en) 1999-03-16
JP3067707B2 true JP3067707B2 (en) 2000-07-24

Family

ID=16930628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9231889A Expired - Lifetime JP3067707B2 (en) 1997-08-28 1997-08-28 Client / server program generation method

Country Status (1)

Country Link
JP (1) JP3067707B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8863082B2 (en) * 2011-09-07 2014-10-14 Microsoft Corporation Transformational context-aware data source management
JP5492913B2 (en) * 2012-01-12 2014-05-14 株式会社日立システムズ Screen design review system, screen design review display method, and program
WO2015045108A1 (en) * 2013-09-27 2015-04-02 三菱電機株式会社 Client/server program generation device and client/server program generation program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
情報処理学会「第39回(平成元年後期)全国大会講演論文集(▲II▼)」、野村、外2名著"LOTOS実行系における入力仕様からプログラムへの変換",p.1586−1587

Also Published As

Publication number Publication date
JPH1173306A (en) 1999-03-16

Similar Documents

Publication Publication Date Title
US7197739B2 (en) Apparatus for automatically generating source code
US6868454B1 (en) Distributed-object development system and computer-readable recording medium recorded with program for making computer execute distributed-object development
US7120897B2 (en) User control objects for providing server-side code generation from a user-defined dynamic web page content file
US20040158820A1 (en) System for generating an application framework and components
EP1727041A2 (en) Pipeline architecture for use with net-centric application program architectures
US20030221184A1 (en) Template-based application development system
JPH08202545A (en) Object-oriented system and method for generation of target language code
JP2006526209A (en) Software development method and development system using metadata extended under component-based environment
AU2002319843A1 (en) General and reusable components for defining net-centric application program architectures
JP2006260390A (en) Test case generating program and method
CN112114890A (en) Method, device and equipment for processing small program and storage medium
JP2009238229A (en) Software development method using metadata expanded under component base environment and its development system
CN112083926A (en) Web user interface generation method and device
Daniel et al. From people to services to ui: Distributed orchestration of user interfaces
Aslam et al. Cross-platform real-time collaborative modeling: An architecture and a prototype implementation via emf. cloud
JP3067707B2 (en) Client / server program generation method
US7343391B2 (en) System and method for interprocess services client artifact download
Tai et al. Model-driven development of large-scale Web applications
Süß et al. Model-centric engineering with the evolution and validation environment
CN112394912B (en) Robot application data dynamic extraction method based on ROS (reactive oxygen species) calculation graph
Draheim et al. Specification and generation of model 2 web interfaces
JP2002132502A (en) Automatic creating system and method of distributed object with interpretation of language function
KR0152711B1 (en) Agent development tools
Liu et al. A SOA Approach for Domain-Specific Language Implementation
Grieshofer Cloud Foundry Config File Generation Using JetBrains MPS and DSLs

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees