JP2002342078A - Program development system and method - Google Patents
Program development system and methodInfo
- Publication number
- JP2002342078A JP2002342078A JP2001147210A JP2001147210A JP2002342078A JP 2002342078 A JP2002342078 A JP 2002342078A JP 2001147210 A JP2001147210 A JP 2001147210A JP 2001147210 A JP2001147210 A JP 2001147210A JP 2002342078 A JP2002342078 A JP 2002342078A
- Authority
- JP
- Japan
- Prior art keywords
- program
- data
- processing
- type
- data type
- 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
Links
Landscapes
- Stored Programmes (AREA)
Abstract
(57)【要約】
【課題】クライアントプログラム又はサーバプログラム
をCOBOLなどの手続き型言語で実装する場合には,
プログラム言語で記述したデータと、動的データとの間
の変換処理を記述する必要があった。
【解決手段】プログラム記述言語で定義されているデー
タ型と,実際にプログラム間で通信する際に使用するデ
ータ型とを比較し、アプリケーションプログラムと通信
基盤との仲介を行うプログラム中に適切な変換処理を自
動生成するプログラム開発システム。
(57) [Summary] To implement a client program or a server program in a procedural language such as COBOL,
It was necessary to describe a conversion process between data described in a programming language and dynamic data. Kind Code: A1 A data type defined in a program description language is compared with a data type used when actually communicating between programs, and an appropriate conversion is performed in a program that mediates between an application program and a communication infrastructure. A program development system that automatically generates processing.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、既存のプログラム
をその一部として利用するソフトウェアシステムの構築
を支援するプログラム開発システム、特に、分散オブジ
ェクト技術を利用してソフトウェアシステムを構築する
ためのプログラム開発システムに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program development system for supporting the construction of a software system using an existing program as a part thereof, and more particularly, to the development of a program for constructing a software system using distributed object technology. About the system.
【0002】[0002]
【従来の技術】ネットワークを介して複数のコンピュー
タを接続した並行分散システム上で動作するユーザプロ
グラムをコンパイルする際に用いられるプログラム変換
方法に関して、プログラマの負担を軽減するものとして
特開2000−99345号公報に開示された技術があ
る。ここでは、プログラムに含まれるネットワークを介
した通信に係わる記述を、予め決められた識別用字句を
キーとして検索して特定し、この特定した記述を予め決
められた記述に翻訳し、先のプログラムに含まれるネッ
トワークを介した通信に係わる記述以外の記述と、翻訳
された記述とをコンパイルすることが開示されている。2. Description of the Related Art Japanese Patent Application Laid-Open No. 2000-99345 discloses a program conversion method used for compiling a user program operating on a parallel distributed system in which a plurality of computers are connected via a network. There is a technique disclosed in a gazette. Here, a description related to communication via the network included in the program is searched for and specified using a predetermined identification phrase as a key, and the specified description is translated into a predetermined description. Compiles a description other than a description related to communication via a network, and a translated description.
【0003】[0003]
【発明が解決しようとする課題】オブジェクトマネジメ
ントグループによるソフトウェアの共通仕様であるCO
RBA(Common Object Request Broker Architectur)
を使用して、既存のプログラム資産を再利用すること
で、ソフトウェアの生産効率を改善することができ、品
質の確保されたプログラムをCORBAの仕様に則った
形で実装することにより、当該プログラムを部品として
利用することができる。SUMMARY OF THE INVENTION CO which is a common specification of software by the object management group
RBA (Common Object Request Broker Architectur)
Can be used to reuse existing program assets to improve software production efficiency, and to implement quality-guaranteed programs in a manner consistent with CORBA specifications. It can be used as a part.
【0004】実際に提供されるプログラム部品は、その
汎用性を指向するあまり、プログラムの実行時に動的に
型が決定されるデータ型(動的データ型)を使用するこ
とがある。例えば、上記CORBAの仕様で定められて
いるany型は、CORBAで定義されている任意のデ
ータ型として使用することができる。前述のCORBA
仕様でも述べられているように,any型はデータ、及
びそのデータの型情報(TypeCode)をあわせ持
つオブジェクトとして実装される。このようなデータ型
を使用することで,さまざまなデータ型を使用するプロ
グラムから利用可能なプログラム部品を作成することが
出来る。[0004] The program components actually provided may use a data type (dynamic data type) whose type is dynamically determined at the time of execution of the program, because of its versatility. For example, the any type defined in the CORBA specification can be used as an arbitrary data type defined in CORBA. CORBA mentioned above
As described in the specification, the any type is implemented as an object having both data and type information (TypeCode) of the data. By using such data types, it is possible to create program parts that can be used from programs that use various data types.
【0005】演算子の再定義の機能を言語仕様として備
えた、C++などのオブジェクト指向言語で新規にアプ
リケーションを実装する場合には、動的データ型を操作
することは比較的容易である。しかし、プログラム言語
COBOL(JIS X 3002−1992 電子計算
機プログラム言語COBOL)など、演算子の再定義を
言語仕様として持たないプログラム言語で、動的データ
型を扱うプログラム部品を使用するアプリケーションを
開発する場合は、言語仕様で使用しているデータ型と、
プログラム部品で使用する動的データ型との間のデータ
型の変換処理を新たに作成する必要がある。 多くの場合、ラッパープログラムと呼ばれる変換専用ル
ーチンを新たに作成し、アプリケーションプログラム中
からラッパープログラムを呼び出すことにより、データ
型の変換を行う。あるいは、アプリケーションプログラ
ムを呼び出す前後で、変換処理を施す場合もある。いず
れの場合も、アプリケーションプログラムのプログラマ
にはなじみがないデータ型を扱うプログラムを新たに作
成するため、学習及びプログラム品質の確保には困難が
ともなう。When a new application is implemented in an object-oriented language such as C ++ having a function of redefining operators as a language specification, it is relatively easy to operate a dynamic data type. However, when developing an application that uses a program component that handles dynamic data types in a programming language such as the programming language COBOL (JIS X 3002-1998 computer programming language COBOL) that does not have operator redefinition as a language specification. Is the data type used in the language specification,
It is necessary to newly create data type conversion processing between dynamic data types used in program components. In many cases, a conversion-only routine called a wrapper program is newly created, and the data type is converted by calling the wrapper program from an application program. Alternatively, a conversion process may be performed before and after calling the application program. In any case, since a program handling a data type that is unfamiliar to the programmer of the application program is newly created, it is difficult to secure learning and program quality.
【0006】本発明の目的は、アプリケーションプログ
ラムで使用するデータ型と,プログラム部品で使用する
データ型との変換処理を自動生成することにより,プロ
グラマの負担を軽減することにある。An object of the present invention is to reduce the load on a programmer by automatically generating a conversion process between a data type used in an application program and a data type used in a program component.
【0007】[0007]
【課題を解決するための手段】上記目的を達成するため
に、本発明によるプログラム開発環境は、アプリケーシ
ョンプログラムで使用するデータ型と、プログラム部品
のインタフェース情報との差分を解析する機能を備える
ことにより、必要に応じてアプリケーションプログラム
で使用するデータ型と、プログラム部品で使用するデー
タ型との変換プログラムを自動生成するようにしたもの
である。In order to achieve the above object, a program development environment according to the present invention has a function of analyzing a difference between a data type used in an application program and interface information of a program component. If necessary, a conversion program between a data type used in an application program and a data type used in a program component is automatically generated.
【0008】[0008]
【発明の実施の形態】本発明の実施形態のプログラム開
発システムは、COBOL言語で作成したプログラム
と、CORBAの仕様に則って実装されたC++などの
他言語により実装されたプログラム部品とを使用してシ
ステムを構築する場合に適用するものである。 図1は、本発明を適用したプログラム開発システムの構
成図である。以下では,プログラマが作成したアプリケ
ーションプログラムから,プログラム部品を呼び出すケ
ースについて説明するが,プログラム部品から呼ばれる
プログラムをプログラマが作成する場合も同様な手順で
本発明を適用できる。DESCRIPTION OF THE PREFERRED EMBODIMENTS A program development system according to an embodiment of the present invention uses a program created in the COBOL language and program components implemented in another language such as C ++ implemented in accordance with the CORBA specification. This is applied when a system is constructed by using FIG. 1 is a configuration diagram of a program development system to which the present invention is applied. Hereinafter, a case will be described in which a program component is called from an application program created by a programmer. However, the present invention can be applied in a similar procedure when a program called by a program component is created by a programmer.
【0009】プログラム部品の呼び出し名、引数、戻り
値などの情報(以下,インタフェースと総称する)は、
CORBAの仕様に則したIDLの形式で与えられる
(101)。このプログラム部品を利用するために,プ
ログラマが作成するアプリケーションソースプログラム
には、プログラム部品を呼び出すための外部プログラム
の呼び出し処理が記述される。Information such as a call name, an argument, and a return value of a program component (hereinafter, collectively referred to as an interface)
It is given in the form of IDL according to the CORBA specification (101). In order to use this program component, an application source program created by the programmer describes a process of calling an external program for calling the program component.
【0010】アプリケーションソースプログラムから
は,適当なアプリケーションプログラム開発ツールを使
用することにより,そのアプリケーションプログラム自
身のインタフェース情報と,アプリケーションプログラ
ムが呼び出す外部プログラムの呼び出しインタフェース
(以下、APインタフェース情報と総称する)を抽出す
ることができる。この抽出過程は公知の技術で実現可能
である。1例として,アプリケーションプログラム記述
言語の言語処理系の1部を使用して、APインタフェー
ス情報を取得する手順を図14に示す。APインタフェ
ース情報作成部1402は、APソースプログラム14
01を読み込んで,構文解析部1403により、プログ
ラム言語の文法に従って構文を解析して,トークン列1
404を抽出する。意味解析部1405は、プログラム
言語の文法に従ってトークン列1404の意味解析を行
い,辞書テーブル1406を作成する。インタフェース
情報生成部1407は、辞書1406より、インタフェ
ースに関連する情報のみを抽出し,APインタフェース
情報ファイル1408を出力する。 本発明を適用するプログラム開発システムは、プログラ
ム部品が提供するIDL(101)を読み込むIDL読
み込み部(103)と、読み込んだIDLの構文を解析
するIDL構文解析部(104)とにより、IDLに定
義された情報を一旦プログラム間インタフェース内部情
報として蓄積する(105)。また、APインタフェー
ス情報読み込み部(106)、APインタフェース解析
部(107)とにより、APインタフェース内部情報を
も蓄積する(108)。インタフェースマッチング判定
部(109)は、105、108のそれぞれの内部情報
を解析、比較し、拡張スタブ・スケルトン出力部(11
0)は、内部情報の差分についての変換処理を含んだス
タブ・スケルトンを出力する。From an application source program, by using an appropriate application program development tool, interface information of the application program itself and a call interface of an external program called by the application program (hereinafter collectively referred to as AP interface information) are obtained. Can be extracted. This extraction process can be realized by a known technique. As an example, FIG. 14 shows a procedure for acquiring AP interface information using a part of a language processing system of an application program description language. The AP interface information creation unit 1402 stores the AP source program 14
01 is read, the syntax analysis unit 1403 analyzes the syntax according to the grammar of the programming language, and
Extract 404. The semantic analysis unit 1405 performs semantic analysis of the token sequence 1404 according to the grammar of the programming language, and creates a dictionary table 1406. The interface information generation unit 1407 extracts only information related to the interface from the dictionary 1406 and outputs an AP interface information file 1408. A program development system to which the present invention is applied defines an IDL by an IDL reading unit (103) for reading an IDL (101) provided by a program component and an IDL syntax analysis unit (104) for analyzing a syntax of the read IDL. The obtained information is temporarily stored as inter-program interface internal information (105). The AP interface information reading unit (106) and the AP interface analyzing unit (107) also accumulate AP interface internal information (108). An interface matching determination unit (109) analyzes and compares the internal information of each of 105 and 108, and outputs an extended stub / skeleton output unit (11
0) outputs a stub skeleton including a conversion process for the difference between the internal information.
【0011】スタブ・スケルトンの位置付けについて、
図2、図3、図4を使用して説明する。Regarding the positioning of the stub skeleton,
This will be described with reference to FIGS.
【0012】図2は、CORBAの仕様に則して作成さ
れたクライアント―サーバシステムの論理的な構成図で
ある。CORBAのクライアントプログラムは,プログ
ラマが作成し、クライアントコンピュータ(201)で
実行されるクライアントプログラム(202)と、クラ
イアントコンピュータ(201)の通信処理インタフェ
ースに対応した,クライアント側通信基盤(204)
と、クライアントプログラム(202)のデータをクラ
イアント側通信基盤(204)が定める形式に変換した
り、逆にクライアント側通信基盤(204)が定める形
式のデータからクライアントプログラムで操作可能なデ
ータに変換する処理を行う,スタブ(203)と呼ばれ
るプログラムから構成される。CORBAのサーバプロ
グラムは,プログラマが作成し,サーバコンピュータ
(205)で実行されるサーバプログラム(206)
と、サーバコンピュータ(205)の通信処理インタフ
ェースに対応した,サーバ側通信基盤(208)と、サ
ーバプログラム(206)のデータをサーバ側通信基盤
(208)が定めるデータ型に変換したり,逆にサーバ
側通信基盤(208)が定める形式のデータからサーバ
プログラムで操作が可能なデータに変換する処理を行
う,スケルトン(207)と呼ばれるプログラムから構
成される。FIG. 2 is a logical configuration diagram of a client-server system created in accordance with the CORBA specification. The CORBA client program is created by a programmer and executed by the client computer (201), and the client side communication infrastructure (204) corresponding to the communication processing interface of the client computer (201).
To convert the data of the client program (202) into a format defined by the client-side communication infrastructure (204), or conversely, from the data defined by the client-side communication infrastructure (204) to data operable by the client program. It is composed of a program called a stub (203) that performs processing. The CORBA server program is created by a programmer and executed by the server computer (205).
And the server-side communication infrastructure (208) corresponding to the communication processing interface of the server computer (205) and the data of the server program (206) are converted into a data type defined by the server-side communication infrastructure (208). It is composed of a program called a skeleton (207) that performs a process of converting data in a format defined by the server-side communication infrastructure (208) into data that can be operated by a server program.
【0013】スタブ及びスケルトンは,サーバプログラ
ム(205)のインタフェースを記述したIDLから、
IDLコンパイラと呼ばれるプログラムを使用して生成
する。The stub and skeleton are obtained from IDL describing the interface of the server program (205).
Generated using a program called an IDL compiler.
【0014】スタブは,クライアント側通信基盤と、ク
ライアントプログラムとの仲立ちを行うプログラムとし
て,クライアントプログラムの記述言語で記述されたプ
ログラムとして生成される。スタブは,引数として受け
取ったデータを通信基盤が定める形式で通信バッファに
格納し,サーバへの送信処理を行う。また、通信基盤を
介して戻されたサーバの戻り値、及び出力引数のデータ
を通信バッファから取り出し,あたかもスタブプログラ
ム自身の戻り値、及び出力引数として設定する。このよ
うな処理により,クライアントプログラムは,スタブの
プログラムを、あたかもサブプログラムを呼び出すかの
ように呼び出すことで、サーバプログラムの処理の呼び
出しを実現できる。The stub is generated as a program that mediates between the client-side communication infrastructure and the client program, as a program described in a description language of the client program. The stub stores data received as an argument in a communication buffer in a format determined by the communication infrastructure, and performs transmission processing to the server. Also, the return value of the server and the data of the output argument returned via the communication infrastructure are extracted from the communication buffer and set as if they were the return value of the stub program itself and the output argument. With such processing, the client program can call the processing of the server program by calling the stub program as if calling a subprogram.
【0015】また,スケルトンは,サーバ側通信基盤
と、サーバプログラムとの仲立ちを行うプログラムとし
て,サーバプログラムの記述言語で記述されたプログラ
ムとして生成される。スケルトンは,通信基盤から受け
取った通信バッファからデータを取り出し,サーバプロ
グラムの引数に設定してサーバプログラムを呼び出す。
また、サーバプログラム実行後,その戻り値、及び出力
引数を通信バッファに設定し、通信基盤に送り返す。こ
のような処理により、サーバプログラムはあたかも1つ
のサブプログラムであるかのように記述することで,別
のコンピュータから発行されたリクエストを処理するこ
とが出来る。The skeleton is generated as a program for mediating between the server-side communication infrastructure and the server program as a program described in a description language of the server program. The skeleton retrieves data from the communication buffer received from the communication infrastructure, sets it as an argument of the server program, and calls the server program.
After executing the server program, the return value and the output argument are set in the communication buffer and sent back to the communication infrastructure. By such processing, the server program can process a request issued from another computer by describing it as if it were one subprogram.
【0016】なお、図2では、クライアントコンピュー
タ(201)と、サーバコンピュータ(205)とが、
インターネットなどの通信回線を介して接続している例
を示しているが,CORBAのクライアント―サーバシ
ステムはこのような例にとどまるものではなく,特にク
ライアントコンピュータとサーバコンピュータは同一ハ
ードウェアであってもよい。In FIG. 2, the client computer (201) and the server computer (205)
Although an example is shown in which connection is made via a communication line such as the Internet, the CORBA client-server system is not limited to this example. In particular, even if the client computer and the server computer have the same hardware, Good.
【0017】図3は、本発明により作成されるスタブの
処理の流れを示したものである。スタブは,必要ならば
通信バッファの確保や呼び出し先メソッドの設定などの
初期化処理(301)を行った後,クライアントプログ
ラムから渡された引数データを入力パラメタとして通信
バッファに格納し(302)、通信基盤に介して通信バ
ッファの内容をサーバに送信する(303)。ここで、
クライアントのデータ型とIDLのデータ型が一致して
いない場合は、入力パラメータの変換処理311が、初
期化処理301と通信バッファへの格納処理302との
間で行われる。サーバの処理後,通信基盤はサーバの処
理結果を通信バッファ内に格納して、再びスタブに処理
を戻す。スタブは,通信バッファの内容が例外情報であ
ればクライアントプログラムに例外を通知する(30
4、305)。ここで、IDLの例外データ型がクライ
アントのデータ型と一致していない場合は、データ型の
変換処理313が、処理305の前に行われる。通信バ
ッファの内容が正常ケースのサーバの戻り値の場合は通
信バッファの内容を出力パラメタと戻り値に設定してク
ライアントプログラムに処理を戻す(306)。ここ
で、IDLの例外データ型とクライアントの例外データ
型が一致していない場合は、本発明の効果により挿入さ
れるところの,データ型の変換処理312が処理306
の前に行われる。図4は、スケルトンの処理の流れを示
したものである。スケルトンは,通信バッファの情報か
ら呼び出し先のメソッドを判定するなどの初期処理(4
01)を行った後、バッファから入力パラメタを取り出
してサーバプログラムのパラメタに設定し(402)、
サーバメソッドを呼び出す(403)。ここで、サーバ
のデータ型とIDLのデータ型が一致していない場合
は、初期化処理401と、パラメタへのデータ設定処理
402との間に,データ変換処理411が挿入される。
サーバメソッド呼び出し中に例外が発生した場合は例外
情報を通信バッファに格納する(406)。ここで、サ
ーバの例外データ型とIDLの例外データ型とが一致し
ていない場合は、データ型の変換処理413が行われ
る。サーバメソッドが正常に終了した場合は、サーバの
出力パラメタと戻り値を通信バッファに設定して(40
5)通信基盤に処理を戻す。通信基盤はそのバッファを
クライアント側の通信基盤に送信する。ここで、IDL
のデータ型とサーバのデータ型が一致していない場合
は、データ変換処理412が行われる。 なお、引数や戻り値がないインタフェースが指定された
場合は、図3、図4の説明の対応する処理は省略され
る。FIG. 3 shows a processing flow of a stub created by the present invention. The stub performs initialization processing (301) such as securing a communication buffer and setting a callee method if necessary, and stores the argument data passed from the client program as an input parameter in the communication buffer (302). The contents of the communication buffer are transmitted to the server via the communication infrastructure (303). here,
If the data type of the client and the data type of the IDL do not match, the input parameter conversion processing 311 is performed between the initialization processing 301 and the storage processing 302 in the communication buffer. After the processing of the server, the communication infrastructure stores the processing result of the server in the communication buffer, and returns the processing to the stub again. If the content of the communication buffer is exception information, the stub notifies the client program of the exception (30).
4, 305). Here, when the exception data type of the IDL does not match the data type of the client, the data type conversion processing 313 is performed before the processing 305. If the content of the communication buffer is the return value of the server in the normal case, the content of the communication buffer is set to the output parameter and the return value, and the process is returned to the client program (306). Here, if the exception data type of the IDL does not match the exception data type of the client, the data type conversion processing 312 inserted by the effect of the present invention performs the processing 306.
Done before. FIG. 4 shows the flow of skeleton processing. The skeleton performs initial processing such as determining the method to be called from the information in the communication buffer (4
01), the input parameters are extracted from the buffer and set as parameters of the server program (402),
Call the server method (403). If the data type of the server does not match the data type of the IDL, a data conversion process 411 is inserted between the initialization process 401 and the data setting process 402 for parameters.
If an exception occurs during the invocation of the server method, the exception information is stored in the communication buffer (406). If the exception data type of the server does not match the exception data type of the IDL, a data type conversion process 413 is performed. If the server method ends normally, set the output parameters and return value of the server in the communication buffer (40
5) Return the processing to the communication infrastructure. The communication infrastructure sends the buffer to the communication infrastructure on the client side. Where IDL
If the data type does not match the data type of the server, a data conversion process 412 is performed. When an interface having no argument or return value is specified, the corresponding processing described in FIGS. 3 and 4 is omitted.
【0018】本発明は、IDLに記載されたデータ構造
と、クライアント又はサーバで使用しているデータ構造
との相違を分析し,データ変換処理をスタブ中に出力す
ることで,プログラマがデータの変換処理を記述する労
力を軽減する事を目的とする。The present invention analyzes a difference between a data structure described in IDL and a data structure used in a client or a server, and outputs data conversion processing in a stub, so that a programmer can convert data. The purpose is to reduce the effort to describe the process.
【0019】なお、CORBAでは、引数・戻り値のほ
かに付加情報(コンテキストなど)を送受信することも
でき、本発明はこれらの付加情報に対しても同様に適用
できるが、発明の実現方式,実施形態として本質的な相
違はないため,以後,引数及び戻り値を例として説明す
る。In CORBA, additional information (context and the like) can be transmitted and received in addition to arguments and return values. The present invention can be applied to such additional information as well. Since there is no essential difference in the embodiment, an explanation will be given below using an argument and a return value as examples.
【0020】図5は、図1のIDL(101)の例であ
る。ここでは,プログラム部品のインタフェースを定義
するIDLとして説明する。501では、IDLの「a
ny型」を使用している。any型は,IDLの任意の
データ型に対応可能なデータ型である。any型に対応
するデータは、オブジェクト指向言語で実装されたプロ
グラムにおいては、型の情報と値の情報をもつオブジェ
クトとして実装され,実行時に型の情報を参照してそれ
ぞれの型に応じて適切な処理を行う。COBOL言語な
どの手続き型言語では、any型に含まれるデータ構造
は処理系によって隠蔽され,プログラマが作成するアプ
リケーションプログラムでは、any型のデータを指す
ポインタを介して,処理系が提供する関数群を使用して
操作する必要がある。この場合、プログラマは,処理系
が提供する関数群を使用して,データの変換処理を記述
する必要がある。FIG. 5 is an example of the IDL (101) of FIG. Here, the description will be made as IDL that defines the interface of the program component. In 501, the IDL “a
ny type ”is used. The any type is a data type that can correspond to any IDL data type. Any data corresponding to the any type is implemented as an object having type information and value information in a program implemented in an object-oriented language, and the type information is referred to at the time of execution by referring to the type information. Perform processing. In a procedural language such as the COBOL language, a data structure included in the any type is hidden by the processing system. In an application program created by a programmer, a function group provided by the processing system is provided through a pointer pointing to any type data. Need to be manipulated. In this case, the programmer needs to describe the data conversion process using a function group provided by the processing system.
【0021】図6は、COBOLで作成したアプリケー
ションプログラムが使用するデータ型の例である。ここ
で,データ601は、数値データ602と、文字列デー
タ603とからなる構造型データであることを示してい
る。図5に示したインタフェースを持つプログラム部品
を使用する場合,601で示したデータを、501の動
的データであるany型に変換する必要がある。FIG. 6 shows an example of a data type used by an application program created in COBOL. Here, the data 601 indicates that it is structured data including numeric data 602 and character string data 603. When using the program component having the interface shown in FIG. 5, it is necessary to convert the data shown by 601 into any type which is the dynamic data of 501.
【0022】図7は、図5のIDLデータ型に,図6の
データを対応付けるために記述した,データ変換処理の
例である。any型へのデータの格納のためには,デー
タの型の情報を示す「TypeCode」と呼ばれるオ
ブジェクトを作成する必要があるため,処理系が提供す
る関数群を使用して701から705に示すような処理
を記述しなければならない。701では、構造型に対応
するTypeCodeオブジェクトを確保するための関
数を呼び出す。702、703では、それぞれ602、
603に対応するTypeCodeオブジェクトを取得
するための関数を呼び出す。704、705では、70
1で確保した601に対応するTypeCodeオブジ
ェクトに,602、603に対応するTypeCode
オブジェクト、すなわち,704、705の関数呼び出
しの戻り値を格納するための関数を呼び出す。701か
ら705の処理により、601に対応するTypeCo
deオブジェクトが作成できたので,706では、Ty
peCodeオブジェクトとともに601の値をany
型のオブジェクトに格納する。 図8は図5に示すIDLのデータ型に対応するCOBO
Lのデータの例である。アプリケーションプログラムで
実際に使用するデータ型が図6に示すものであっても,
図5のIDLで定義されたデータ型に合致するために,
プログラマは図7の処理を記述して,図6のデータから
図8のデータへのデータ変換を行わなければならない。
本発明により、従来プログラマが記述してきたデータ変
換処理をスタブ・スケルトン中で行うことが可能となる
ため,プログラマは変換処理を記述することなく、業務
処理の実装に専念できる。以下,本発明の詳細な処理手
順を説明する。FIG. 7 shows an example of a data conversion process described for associating the data of FIG. 6 with the IDL data type of FIG. In order to store data in the any type, it is necessary to create an object called "TypeCode" indicating information on the type of data. Therefore, as shown in 701 to 705, a function group provided by the processing system is used. Process must be described. In 701, a function for securing a TypeCode object corresponding to the structural type is called. In 702 and 703, respectively, 602,
A function for acquiring a TypeCode object corresponding to 603 is called. In 704 and 705, 70
In the TypeCode object corresponding to 601 secured in 1 and the TypeCode corresponding to 602 and 603
An object, that is, a function for storing a return value of the function call of 704 or 705 is called. By the processing of 701 to 705, TypeCo corresponding to 601
Since a de object has been created, in 706, Ty
Any value of 601 along with the peCode object
Store in type object. FIG. 8 shows a COBO corresponding to the IDL data type shown in FIG.
It is an example of L data. Even if the data type actually used in the application program is as shown in FIG.
In order to match the data type defined by IDL in FIG. 5,
The programmer must describe the processing in FIG. 7 and perform data conversion from the data in FIG. 6 to the data in FIG.
According to the present invention, since the data conversion processing conventionally described by the programmer can be performed in the stub skeleton, the programmer can concentrate on the implementation of the business processing without describing the conversion processing. Hereinafter, a detailed processing procedure of the present invention will be described.
【0023】まず、本発明では,前述した図1の10
3、104の処理により,IDLなどの形で示されるプ
ログラム部品のインタフェース情報から,プログラム部
品で使用するデータの構造を取得する。例えば,図5に
示すIDLからは、IDLのデータ構造は概念的に図9
に示す木構造として表すことができる。First, according to the present invention, 10 shown in FIG.
Through the processing of steps 3 and 104, the data structure used by the program component is acquired from the interface information of the program component indicated in the form of IDL or the like. For example, from the IDL shown in FIG. 5, the data structure of the IDL is conceptually shown in FIG.
Can be represented as a tree structure shown in FIG.
【0024】また、所与のAPインタフェース情報か
ら,前述した図1の106、107に示す処理により、
アプリケーションプログラムで使用するデータの構造を
取得する。例えば,図6に示すアプリケーションプログ
ラムのデータ構造は、概念的に図10に示す木構造とし
て表すことができる。インタフェースマッチング判定部
(109)は,これらの構造を比較し,データ型の変換
処理を出力する。Further, from the given AP interface information, by the processing shown in 106 and 107 in FIG.
Get the structure of the data used in the application program. For example, the data structure of the application program shown in FIG. 6 can be conceptually represented as a tree structure shown in FIG. The interface matching determination unit (109) compares these structures and outputs data type conversion processing.
【0025】図11は、インタフェースマッチング判定
部(109)の処理の流れを示したものである。FIG. 11 shows the flow of the processing of the interface matching judgment section (109).
【0026】インタフェースマッチング判定部は,必要
な作業領域の確保などの初期処理(1101)を行った
後,プログラム間インタフェース内部情報(105)、
すなわち,図9に示すようなデータと、APインタフェ
ース内部情報(108)、すなわち,図10に示すよう
なデータを順に走査し、比較する。以下,プログラム間
インタフェース内部情報をIDLデータ、APインタフ
ェース内部情報をAPデータと呼ぶ。After performing an initial process (1101) such as securing a necessary work area, the interface matching determination unit performs an internal program interface information (105),
That is, the data as shown in FIG. 9 and the AP interface internal information (108), that is, the data as shown in FIG. 10 are sequentially scanned and compared. Hereinafter, the inter-program interface internal information is referred to as IDL data, and the AP interface internal information is referred to as AP data.
【0027】まず、IDLデータ、APデータを1つづ
つ読み込む(1102)。IDLデータがany型か否
かを判定し(1104)、any型でなければ,単純デ
ータ型として、IDLデータとAPデータとの間の転記
処理を出力する(1106)。First, IDL data and AP data are read one by one (1102). It is determined whether or not the IDL data is of any type (1104), and if not, the process of transferring between the IDL data and the AP data is output as a simple data type (1106).
【0028】any型の場合は,図12のany型転記
処理出力処理を行う。In the case of the any type, the any type transfer processing output processing of FIG. 12 is performed.
【0029】図12は、インタフェースマッチング判定
部の処理の一部の流れであり,動的データ型であるan
y型に対応する処理の流れを示したものである。FIG. 12 is a flow chart showing a part of the processing of the interface matching judging unit.
It shows a flow of processing corresponding to the y-type.
【0030】any型のデータをやり取りするために
は,前述のとおり,値とともにTypeCodeと呼ば
れる型の情報を作成する必要がある。TypeCode
は、any型に格納するデータがさらに従属したデータ
を持っている場合、すなわち、データが構造をもってい
る場合とそうでない場合とで作成方法が異なる。このた
め、any型転記処理では、APデータが構造をもって
いるかどうかを判定する(1201)。構造をもってい
る場合には,構造を持ったデータに対応するTypeC
odeを格納するためのTypeCode(構造型Ty
peCode)を生成する処理を出力する(120
2)。In order to exchange any type data, as described above, it is necessary to create type information called TypeCode along with the value. TypeCode
Is different when data stored in the any type has more dependent data, that is, when the data has a structure and when it does not. Therefore, in the any-type transcription process, it is determined whether the AP data has a structure (1201). If it has a structure, the TypeC corresponding to the structured data
Type for storing the mode (structural type Ty
(peCode) is output (120).
2).
【0031】図13は、構造型TypeCode生成処
理出力の流れである。ステップ1301で、構造型Ty
peCodeオブジェクト「STRTC」を確保する処
理を生成する。なお、「STRTC」及び以下で使用す
る変数名は、説明の便宜上命名したものであり,実際の
生成過程では,名称の衝突が発生しないよう重複しない
名称が付与される。この処理により、例えば701に示
す関数呼び出しが出力される。APデータの従属データ
をAPデータとして代入し(1302)、APデータが
さらに下位の構造を持つか否か判定する。 APデータが下位の構造をもたない場合,APデータに
対応するTypeCode「APTC」を生成する処理
を出力し(1304)、「APTC」を「STRTC」
に代入する処理を出力する(1305)。1304、1
305によって生成される処理は、それぞれ処理系が提
供する関数呼び出しの形で生成される。例えば1304
によって702が、1305によって703がそれぞれ
出力される。 APデータが下位の構造を持つ場合は,構造型Type
Code生成処理出力を再帰的に呼び出し、下位の構造
についてのTypeCode生成処理を出力した後(1
306),再帰呼び出しによって生成されたTypeC
ode生成処理の最後の生成処理の結果を「STRT
C」に代入する処理を出力する(1307)。構造型T
ypeCode出力処理に渡されたAPデータが複数の
データを含む場合、全てのデータについてTypeCo
deを生成しなければならない。1309で、次のAP
データが存在するか否かを判定し,存在する場合はAP
データに次のAPデータを代入して1303以降の処理
を繰り返す。この繰り返し処理によって、例えば,図7
の704、705の処理が生成される。 以上の処理により、図12における構造型TypeCo
de生成処理が出力された。 構造型TypeCode生成処理を出力した後、any
型オブジェクトにTypeCodeと値を代入する処理
を出力する(1203)。FIG. 13 shows the flow of the output of the structural type TypeCode generation processing. In step 1301, the structural type Ty
A process for securing the peCode object “STRTC” is generated. Note that “STRTC” and the variable names used below are named for convenience of explanation, and in the actual generation process, unique names are given so that no name collision occurs. By this processing, for example, a function call 701 is output. Subordinate data of the AP data is substituted as the AP data (1302), and it is determined whether or not the AP data has a lower-order structure. If the AP data has no lower-level structure, a process of generating a TypeCode “APTC” corresponding to the AP data is output (1304), and “APTC” is changed to “STRTC”.
Is output (1305). 1304, 1
The processing generated by the processing 305 is generated in the form of a function call provided by the processing system. For example, 1304
Output 702 and 1305 output 703, respectively. If the AP data has a lower-level structure, the structural type
After the code generation processing output is recursively called and the TypeCode generation processing for the lower structure is output (1
306), TypeC generated by recursive call
The result of the last generation process of the
The processing to be assigned to "C" is output (1307). Structural type T
When the AP data passed to the typeCode output process includes a plurality of data, the type code is used for all the data.
de must be generated. At 1309, the next AP
Determines whether data exists, and if so, determines
The next AP data is substituted for the data, and the processing after 1303 is repeated. By this repetition processing, for example, FIG.
704 and 705 are generated. By the above processing, the structural type TypeCo in FIG.
The de generation processing has been output. After outputting the structured type TypeCode generation processing, any
A process of assigning TypeCode and a value to the type object is output (1203).
【0032】anyオブジェクトに対して、一時領域に
退避していたAPデータと、構造型TypeCodeを
代入する処理を出力する(1209)。例えば,706
の処理がこれにあたる。The process of assigning the AP data saved in the temporary area and the structure type TypeCode to the any object is output (1209). For example, 706
This corresponds to this processing.
【0033】一方、APデータが単独のデータであった
場合には,APデータに対応するTypeCodeの生
成処理を出力し(1204)TypeCodeとAPデ
ータをanyオブジェクトに代入する処理を出力する
(1205)。最後に、anyオブジェクトを通信バッ
ファに格納する処理を出力する(1206)。On the other hand, if the AP data is single data, a process of generating TypeCode corresponding to the AP data is output (1204), and a process of substituting the TypeCode and the AP data into the any object is output (1205). . Finally, processing for storing the any object in the communication buffer is output (1206).
【0034】図11、図12、及び図13に示した処理
により,IDLとAPデータとでデータ型が異なる場合
に適当な変換処理を行うスタブ・スケルトンを生成する
ことが可能となる。With the processing shown in FIGS. 11, 12, and 13, it is possible to generate a stub skeleton that performs appropriate conversion processing when the data types are different between IDL and AP data.
【0035】なお、処理系によっては、IDLのstr
ing型や、sequence型など、他のデータ型に
ついてもデータ変換処理が必要な場合がある。これらの
データ型についてデータ変換処理をスタブ、スケルトン
中に生成するためには,以下に述べる処理の変更によ
り、容易に実現可能である。 すなわち、図11の1104における判定処理におい
て、該当するデータ型の判定処理を追加するとともに、
1105を各データ型に対応するデータ変換処理を出力
する処理の呼び出しに置き換える。また、図12におい
て,1203、1205、及び1206を該当するデー
タ型に対応する出力処理に置き換える。さらに、変換処
理においてTypeCodeが不要なデータ型について
は1202、1204の処理を削除する。Note that, depending on the processing system, the IDL str
Data conversion processing may be required for other data types such as the ing type and the sequence type. Generating a data conversion process in these stubs and skeletons for these data types can be easily realized by modifying the processes described below. That is, in the determination process in 1104 in FIG. 11, a determination process of a corresponding data type is added, and
1105 is replaced with a call to a process for outputting a data conversion process corresponding to each data type. In FIG. 12, 1203, 1205, and 1206 are replaced with output processing corresponding to the corresponding data type. Furthermore, for data types that do not require TypeCode in the conversion process, the processes 1202 and 1204 are deleted.
【0036】本実施例によれば、アプリケーションプロ
グラム中での変換処理の記述を行うことなく,汎用的な
プログラム部品を使用したシステムを構築することが出
来るため,プログラマの負担を軽減する効果がある。According to the present embodiment, it is possible to construct a system using general-purpose program parts without describing the conversion processing in the application program, which has the effect of reducing the load on the programmer. .
【0037】[0037]
【発明の効果】本発明によれば,プログラミングの負担
を減らすことが出来るとともに、プログラム不良を作り
込む機会を少なくすることができる。According to the present invention, the burden of programming can be reduced and the chance of creating a program defect can be reduced.
【図1】プログラム開発システムの構成を示すブロック
図である。FIG. 1 is a block diagram illustrating a configuration of a program development system.
【図2】クライアント―サーバプログラムの構成を示す
ブロック図である。FIG. 2 is a block diagram illustrating a configuration of a client-server program.
【図3】スタブが行う処理を示したフローチャートであ
る。FIG. 3 is a flowchart illustrating a process performed by a stub.
【図4】スケルトンが行う処理を示したフローチャート
である。FIG. 4 is a flowchart illustrating a process performed by a skeleton.
【図5】IDLの例である。FIG. 5 is an example of IDL.
【図6】COBOLで作成したアプリケーションプログ
ラムが使用するデータ型の例である。FIG. 6 is an example of a data type used by an application program created in COBOL.
【図7】データ変換処理の例である。FIG. 7 is an example of a data conversion process.
【図8】IDLのデータ型に対応するCOBOLのデー
タの例である。FIG. 8 is an example of COBOL data corresponding to the IDL data type;
【図9】IDLのデータ構造を概念的に表した木構造で
ある。FIG. 9 is a tree structure conceptually showing the data structure of IDL.
【図10】アプリケーションプログラムのデータ構造を
概念的に表した木構造である。FIG. 10 is a tree structure conceptually showing a data structure of an application program.
【図11】インタフェースマッチング判定部の処理の流
れを示したものである。FIG. 11 illustrates a flow of a process performed by an interface matching determination unit.
【図12】any型転記処理出力の処理の流れを示した
ものである。FIG. 12 shows a flow of an any-type transcription process output process.
【図13】構造型TypeCode出力処理の処理の流
れを示したものである。FIG. 13 shows a flow of a process of outputting a structured type Code.
【図14】ソースファイルからインタフェース情報を取
り出す処理の流れを示したものである。FIG. 14 shows a flow of processing for extracting interface information from a source file.
101 IDL 102 インタフェース情報 103 IDLの読み込み部 104 IDL構文解析部 105 プログラム間インタフェース内部情報 106 アプリケーションプログラムインタフェース読
み込み部 107 アプリケーションプログラムインタフェース解
析部 108 アプリケーションプログラムインタフェース内
部情報 109 インタフェースマッチング判定部 110拡張スタブ・スケルトン出力部 112 プログラム開発システム 111 拡張スタブ・スケルトンReference Signs List 101 IDL 102 Interface information 103 IDL reading unit 104 IDL parsing unit 105 Inter-program interface internal information 106 Application program interface reading unit 107 Application program interface analyzing unit 108 Application program interface internal information 109 Interface matching determining unit 110 Extended stub / skeleton output Part 112 Program development system 111 Extended stub skeleton
───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐原 宏史 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 Fターム(参考) 5B076 DD04 DD08 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Hiroshi Sahara 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture F-term in Hitachi Software Corporation Software Division (reference) 5B076 DD04 DD08
Claims (3)
結果と、該プログラムを呼び出すプログラムで使用する
データ型を解析した結果との比較を行う手段と、該比較
の結果、差分が存在する場合には該差分について、デー
タ型変換処理を自動的に生成する手段とを有するプログ
ラム開発システム。A means for comparing a result of analyzing a data type used in a program with a result of analyzing a data type used in a program which calls the program; Means for automatically generating a data type conversion process for the difference.
結果と、該プログラムを呼び出すプログラムで使用する
データ型を解析した結果との比較を行う手段と、該比較
の結果、差分が存在する場合には該差分について、デー
タ型変換処理を自動的に生成する手段とを有するプログ
ラム開発方法。Means for comparing a result of analyzing a data type used in a program with a result of analyzing a data type used in a program for calling the program; Means for automatically generating data type conversion processing for the difference.
結果と、該プログラムを呼び出すプログラムで使用する
データ型を解析した結果との比較を行う手段と、該比較
の結果、差分が存在する場合には該差分について、デー
タ型変換処理を自動的に生成する手段とを有するプログ
ラム。3. A means for comparing a result of analyzing a data type used in a program with a result of analyzing a data type used in a program that calls the program, and means for comparing the result of the comparison when there is a difference. Means for automatically generating a data type conversion process for the difference.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001147210A JP2002342078A (en) | 2001-05-17 | 2001-05-17 | Program development system and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001147210A JP2002342078A (en) | 2001-05-17 | 2001-05-17 | Program development system and method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2002342078A true JP2002342078A (en) | 2002-11-29 |
Family
ID=18992729
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001147210A Pending JP2002342078A (en) | 2001-05-17 | 2001-05-17 | Program development system and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2002342078A (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006215872A (en) * | 2005-02-04 | 2006-08-17 | Mitsubishi Electric Corp | Home appliance adapter control software development method and development apparatus |
| JP2007511807A (en) * | 2003-08-14 | 2007-05-10 | オラクル・インターナショナル・コーポレイション | Transparent session transport between servers |
| JP2007226431A (en) * | 2006-02-22 | 2007-09-06 | Fujitsu Ltd | Mediation program development support program, mediation program development support method, and mediation program development support device |
| US7930344B2 (en) | 2003-08-14 | 2011-04-19 | Oracle International Corporation | Incremental run-time session balancing in a multi-node system |
| CN102053828A (en) * | 2009-10-30 | 2011-05-11 | 株式会社东芝 | Information processing device, information processing system and information processing method |
| CN102207874A (en) * | 2011-06-23 | 2011-10-05 | 王艳 | Web element dynamic packaging system based on element description grammar |
| US9176772B2 (en) | 2005-02-11 | 2015-11-03 | Oracle International Corporation | Suspending and resuming of sessions |
| JP2019160243A (en) * | 2018-03-16 | 2019-09-19 | 富士通株式会社 | Control program, control method, and information processing apparatus |
-
2001
- 2001-05-17 JP JP2001147210A patent/JP2002342078A/en active Pending
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007511807A (en) * | 2003-08-14 | 2007-05-10 | オラクル・インターナショナル・コーポレイション | Transparent session transport between servers |
| US7930344B2 (en) | 2003-08-14 | 2011-04-19 | Oracle International Corporation | Incremental run-time session balancing in a multi-node system |
| JP2006215872A (en) * | 2005-02-04 | 2006-08-17 | Mitsubishi Electric Corp | Home appliance adapter control software development method and development apparatus |
| US9176772B2 (en) | 2005-02-11 | 2015-11-03 | Oracle International Corporation | Suspending and resuming of sessions |
| JP2007226431A (en) * | 2006-02-22 | 2007-09-06 | Fujitsu Ltd | Mediation program development support program, mediation program development support method, and mediation program development support device |
| US8347323B2 (en) | 2006-02-22 | 2013-01-01 | Fujitsu Limited | Method and apparatus for supporting development of broker program, and computer product |
| CN102053828A (en) * | 2009-10-30 | 2011-05-11 | 株式会社东芝 | Information processing device, information processing system and information processing method |
| JP2011096112A (en) * | 2009-10-30 | 2011-05-12 | Toshiba Corp | Framework and information processor |
| CN102207874A (en) * | 2011-06-23 | 2011-10-05 | 王艳 | Web element dynamic packaging system based on element description grammar |
| JP2019160243A (en) * | 2018-03-16 | 2019-09-19 | 富士通株式会社 | Control program, control method, and information processing apparatus |
| JP7073813B2 (en) | 2018-03-16 | 2022-05-24 | 富士通株式会社 | Control programs, control methods and information processing equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2514152B2 (en) | How to build an information processing system | |
| JP3736308B2 (en) | Software component automatic generation system | |
| US5940075A (en) | Method for extending the hypertext markup language (HTML) to support enterprise application data binding | |
| JP2001502823A (en) | Method and apparatus for transporting data structures defined by an interface definition language between heterogeneous systems | |
| JPH11119986A (en) | Communication cooperation information generation device, three-layer client / server system, and medium recording communication cooperation information generation program | |
| JP2000504868A (en) | Management interworking unit and method of forming such a unit | |
| JP2000515281A (en) | Method and apparatus for describing interfaces, operations and data types defined by an interface definition language | |
| US20020029297A1 (en) | Method and apparatus for efficient representation of variable length identifiers in a distributed object system | |
| CN111221841A (en) | Real-time processing method and device based on big data | |
| JP2002342078A (en) | Program development system and method | |
| US6321347B1 (en) | Network testing system and method | |
| Young et al. | Evaluation of middleware architectures in achieving system interoperability | |
| US20020013936A1 (en) | Source code transformation process and recording medium | |
| US20050192929A1 (en) | Generation and conversion of object that provide for efficient object modification | |
| CN110633162A (en) | Remote call implementation method and device, computer equipment and storage medium | |
| JP2001265747A (en) | Distributed object cooperation device | |
| US7447787B2 (en) | Protocol executing system and protocol PDU common data structure converting method for processing protocol PDUS | |
| CN112540813A (en) | Application generation method based on workflow engine | |
| JP2833612B2 (en) | Service primitive generation system | |
| JP2004265164A (en) | Service cooperation system and service cooperation method between client and server using data transfer protocol | |
| US20060010423A1 (en) | Variable namespaces and scoping for variables in an object model | |
| JPH11249919A (en) | Procedure call processing method and stub generation method | |
| JPH09245003A (en) | Parallel distributed processing system and method | |
| JP2003015891A (en) | Network system, server, client, inter-object communication method, profile object registration method, program, and storage medium | |
| CN1997965A (en) | A method and system for dynamically creating parsers in a message broker |