JP4319706B2 - Program development support tool - Google Patents

Program development support tool Download PDF

Info

Publication number
JP4319706B2
JP4319706B2 JP09919898A JP9919898A JP4319706B2 JP 4319706 B2 JP4319706 B2 JP 4319706B2 JP 09919898 A JP09919898 A JP 09919898A JP 9919898 A JP9919898 A JP 9919898A JP 4319706 B2 JP4319706 B2 JP 4319706B2
Authority
JP
Japan
Prior art keywords
type
idl
information
program
language
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP09919898A
Other languages
Japanese (ja)
Other versions
JPH11296359A (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.)
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 JP09919898A priority Critical patent/JP4319706B2/en
Publication of JPH11296359A publication Critical patent/JPH11296359A/en
Application granted granted Critical
Publication of JP4319706B2 publication Critical patent/JP4319706B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、IDL(インターフェース定義言語)を使用するプログラム開発における支援ツールに関する。
【0002】
【従来の技術】
計算機のプログラム開発では、プログラム(またはデータ)を機能ブロックの単位に作成することがある。この手法によれば、プログラムの開発効率を向上させ、プログラムの再利用を可能とすることができる。ただし、目的の処理を複数のプログラム処理を連携させて実現する場合には、各プログラム間の呼出し規則などのインターフェースを予め定義する必要がある。このインターフェースの定義には、IDL(インターフェース定義言語)が用いられることがある。
【0003】
IDLとしては、OMG(Object Management Group)が提案しているCORBA(共通オブジェクト・リクエスト・ブローカー・アーキテクチャ)で用いられるIDLが知られている。なお、CORBAの言語マッピング仕様についての参考文献としては、OMG発行の「The Common Object Request Broker: Architecture and Specification Revision 2.0, July 1995 Updated July 1996」がある。また、CORBAに関する一般的な背景についての参考文献として、小野沢 博文著 ソフト・リサーチ・センター発行の「分散オブジェクト指向技術 CORBA」がある。
【0004】
CORBAでは、IDLと、各種プログラム言語およびIDLの間のマッピング仕様と、プログラム間の通信を管理するためのORB(オブジェクト・リクエスト・ブローカ)とを規定している。開発者は、マッピング仕様に従って、各プログラムのインターフェースをIDLで記述する。このIDLソースを専用のコンパイラ(IDLコンパイラ)でコンパイルすることにより、クライアントプログラム用のスタブや、サーバプログラム用のスケルトンが生成される。ここで、スタブおよびスケルトンは、クライアントプログラムおよびサーバプログラムと、ORBとの仲介を行うためのサブプログラムである。
【0005】
このようなIDLを用いたプログラム開発には、さらに、異なる言語で記述されたプログラムの利用や、異なるアーキテクチャを持つ計算機で実行されるプログラムの利用が容易となるという利点がある。
【0006】
以下では、CORBAのIDLコンパイラのように、IDLソースからスタブやスケルトンを生成する処理系を総称してIDL言語処理系と呼ぶ。また、既成のプログラムからIDLソースを生成する処理系を総称してIDL生成系と呼ぶ。IDL生成系は、既成のプログラムを流用して、他のプログラムと連携した処理を行わせる場合に有効である。
【0007】
図8に、従来のIDL言語処理系の機能構成の一例を示す。
【0008】
IDL構文解析部102は、IDLソース101を入力とし、IDLの構文解析を行なって、解析情報103を出力する。ここで、解析情報103には、手続きやメソッドの名称、引数のデータ型、並びなど、プログラム間の呼び出し規則を規定するIDLの情報が含まれる。
【0009】
コード生成部104は、インターフェース情報解析部105、プログラムコード生成部106、および、型変換テーブル109から構成される。型変換テーブル109には、解析情報103に含まれるIDLのデータ型の情報と、プログラムコード108に組み込まれるデータ型とが予め対応付けて格納されている。インターフェース情報解析部105は、型変換テーブル109を参照して、解析情報103内のIDLのデータ型の情報を、スタブやスケルトンで使用するデータ型へ変換する。この変換結果を用いて、プログラムコード生成部106は、スタブ107やスケルトン108を生成する。
【0010】
図9に、従来のIDL生成系の機能構成の一例を示す。
【0011】
構文解析部202は、原始プログラム201を解析し、解析情報203を生成する。インターフェース情報抽出部204は、解析情報203から、手続やメソッドの名称、引数のデータ型、並びなどのインターフェース情報を抽出し、中間語205として出力する。IDL生成系における型変換テーブル206には、中間語205に含まれるデータ型の情報と、IDLで使用されるデータ型の情報とが予め対応付けて格納されている。コード生成部207は、型変換テーブル206を参照して、中間語205内のデータ型の情報を、IDLソースで使用されるデータ型の情報に変換する。この変換結果を用いて、IDL出力部211は、IDLの文法を満たすようにIDLソース212を生成する。
【0012】
一般に、異なる言語で記述されたプログラム間で、データの受け渡しを行う場合には、そのデータ型は、双方のプログラム言語で共通に利用できる型とする必要がある。このため、上述のIDL言語処理系およびIDL生成系でも、対象としている複数のプログラム言語(例えばC言語、C++言語など)で共通に利用できるデータ型のみを処理できるようにしている。
【0013】
【発明が解決しようとする課題】
上述の従来のIDL言語処理系およびIDL生成系では、対象としている複数のプログラム言語で共通に利用できないデータ型を処理できないため、アプリケーションプログラムによっては、スタブやスケルトン、IDLソースを正常に生成できないことがある。
【0014】
このため、例えば、流用しようとする既成のアプリケーションプログラムで、IDL生成系の処理できないデータ型の指定がなされる場合には、開発者は、流用するプログラムのインターフェース仕様を修正するか、呼び出し方法の変更を行なう働きをするラッパー(Wrapper)関数を作成するなどの、人手による煩雑な作業を行う必要があった。
【0015】
そこで、本発明の目的は、対象とするプログラム言語で記述されたプログラムで使用されるデータ型の制限なしに、そのプログラムのインタフェース機能を実現するサブプログラムを生成することのできるプログラム開発支援ツールを提供することにある。
【0016】
また、本発明の他の目的は、対象とするプログラム言語で記述された任意のプログラムについて、上記プログラム開発支援ツールで処理可能なIDLのソース情報を生成することのできるプログラム開発支援ツールを提供することにある。
【0017】
【課題を解決するための手段】
上記課題を解決するため、本発明は、複数のプログラム間の呼び出し規則を記述したものであるIDLのソース情報を基に、前記プログラムのインターフェース機能を実現するサブプログラム(例えばスタブやスケルトン)を生成するプログラム開発支援ツールにおいて、前記プログラムを記述するプログラム言語で用いるデータ型の型情報、および、該データ型を予め定めた規則に従って記述したものである型定義情報が、予め対応付けて登録される特殊テーブルを有する型変換テーブルと、前記IDLのソース情報から、前記予め定めた規則に従って記述されている型定義情報を抽出する手段と、抽出した型定義情報を、前記型変換テーブルを用いて、前記プログラム言語の型情報に変換し、該型情報をコード生成情報として登録する手段と、コード生成情報を用いて、前記サブプログラムを生成する手段とを備えることを特徴とするプログラム開発支援ツールを提供する。
【0018】
また、本発明は、プログラムの原始コードを基に、該プログラムの呼び出し規則を記述した、IDLのソース情報を生成するプログラム開発支援ツールにおいて、前記プログラムを記述するプログラム言語で用いるデータ型の型情報、および、該データ型を予め定めた規則に従って記述したものである型定義情報が、予め対応付けて登録される特殊テーブルを有する型変換テーブルと、前記プログラムが受渡しするデータの型情報の内の、前記特殊テーブルに登録されている型情報を、前記型変換テーブルを用いて、型定義情報に変換し、該型定義情報をコード生成情報として登録する手段と、コード生成情報から前記IDLのソース情報を生成する手段とを備えることを特徴とするプログラム開発支援ツールを提供する。
【0019】
【発明の実施の形態】
以下、本発明の実施形態に係るプログラム開発支援ツールについて、図面を用いて説明する。
【0020】
本実施形態のプログラム開発支援ツールは、複数のアプリケーションプログラム(クライアントプログラムやサーバプログラム)が連携して動作する環境のプログラム開発を支援するためのものである。プログラム開発支援ツールの機能は、IDLソースからスタブやスケルトンを生成するIDL言語処理系と、既成のプログラムからIDLソースを生成するIDL生成系とに分けられる。
【0021】
図1に、プログラム開発支援ツールの実装される計算機1の構成を示す。図示のように、この計算機1は、プロセッサ2、RAM3、ROM4、ディスプレイ5、キーボード6、マウス7、内部ディスク装置8、外部ディスク装置9、および、各種インターフェース回路(I/F)10〜15を有する。ここで、内部ディスク装置としては例えばハードディスク装置、外部ディスク装置としては例えばCD−ROMリーダやフロッピーディスク装置がそれぞれ用いられる。通信インターフェース回路15は、ネットワーク16に接続され、他の計算機との間でファイル(プログラム等)の受け渡しを行う。
【0022】
プログラム開発支援ツールの機能は、外部ディスク装置8の記録媒体にプログラムとして格納され、このプログラムをプロセッサ2が実行することにより実現される。
【0023】
本実施形態では、アプリケーションプログラムの作成言語としてCOBOL言語を対象としている。COBOL言語では、外部プログラムの引数のデータ型の定義を、その数値を10進数で表現した時の桁数と、小数点位置と、用途とを使用して記述することができる。例えば、図2における宣言文501は、整数部4桁、小数部3桁のPACKED10進数形式の数値を定義するものである。このようなデータ型は、外部プログラムから呼び出される時の引数の定義で用いられることがある。ただし、このデータ型は、CORBAのIDLで記述することはできない。このため、従来は、開発者がインターフェース仕様の修正等の面倒な作業を行う必要があった。
【0024】
本実施形態では、CORBAのIDLがサポートしているデータ型に一致するCOBOL言語のデータ型は従来通り記述し、サポートしていないCOBOL言語のデータ型はIDLの構文要素の一つであるTYPEDEF構文を使用して記述する、新たな記述規則(以下、新記述規則)を用いる。なお、CORBAのIDLの文法では、TYPEDEF構文内の型定義名称は、開発者が自由に設定することができるようになっている。
【0025】
新記述規則では、CORBAのIDLで規定していないCOBOL言語のデータ型を、TYPEDEF構文内の、予め定めたIDLの型情報と、型定義名称とにより定義する。例えば図2の宣言文501の変数「ARG」は、図3(a)に示すように、IDLの型情報「unsigned long」600と、型定義名称「CBL_PACK_9_4V9_3」605とにより定義する。
【0026】
型定義名称605の記述も、新記述規則に従ってなされる。具体的には、まず、記述言語がCOBOL言語であることを示す文字列「CBL_」601を記述する。続いて、用途に対応する文字列602を記述する。図3(a)の例では、「PACKED−DECIMAL」に対応する「PACK_」602を記述している。用途である「BINARY」に対しては「BIN_」、「DISPLAY」に対しては「DISP」をそれぞれ記述するようにする。続いて、必要ならば符号付きを示す「S」(図示せず)を記述し、続けて数値であることを示す「9_」603を記述する。続いて、10進数の整数部の桁数(図の例では「4」)を記述し、必要ならば、小数部の桁数(「3」)を「V9_」に続けて記述する(604)。
【0027】
このようにして、CORBAのIDLがサポートしていないデータ型が記述される。以下で説明する本実施形態のIDL言語処理系およびIDL生成系は、上述の新記述規則に対応するための機能を備えている。
【0028】
図4に、本実施形態のIDL言語処理系(以下、IDLコンパイラ)の機能構成を示す。
【0029】
図示するIDLコンパイラ700は、構文解析部702およびコード生成部704を有する。構文解析部702およびコード生成部704は、計算機1のディスク装置8,9の記憶領域内のプログラムの実行により実現される機能である。
【0030】
IDLコンパイラ700は、IDLソース701を入力として、COBOL言語で記述されたスタブ707およびスケルトン708を出力する。また、この処理過程において解析情報703およびコード生成情報712を生成する。
【0031】
ここで、IDLソース701は、対象のサーバプログラムのインターフェースを、新記述規則に従いIDLで記述した情報である。なお、IDLソース701、解析情報703、コード生成情報712、スタブ707、および、スケルトン708は、計算機1のディスク装置にファイルとして格納される。
【0032】
IDLコンパイラ700は、新記述規則に対応するため、構文解析部702に組み込まれるCOBOL依存情報解析部751と、コード生成部704に組み込まれるCOBOL型情報変換部752と、型変換テーブル709に組み込まれる特殊テーブル711とを有する。
【0033】
図5に示すように、型変換テーブル709の特殊テーブル711には、新記述規則により記述された型定義名称(605)と、COBOL言語の型情報とが予め対応付けて登録されている。型変換テーブル709の標準テーブル710には、IDLの型情報と、COBOL言語の型情報とが予め対応付けて登録されている。これにより、型変換テーブル709には、COBOL言語の全ての型情報が登録される。
【0034】
なお、型変換テーブル709は、アクセスの高速化のため、IDLコンパイラ700のプログラム中に配置される。もちろん、計算機1のディスク装置にファイルとして格納するようにしてもよい。
【0035】
次に、IDLコンパイラ700の処理について、図5を用いて説明する。
【0036】
IDLソース701のコンパイルを指示するコマンドが、計算機1に入力されると、IDLコンパイラ700の処理が開始される。まず、構文解析部702が、IDLソース701の構文解析を行なって、解析情報703を生成する。IDLのサポートするデータ型の定義は、従来と同様に処理され、解析情報703内に組み込まれる。
【0037】
この時、COBOL依存情報解析部751は、図5に示すように、IDLソース701に記述されているTYPEDEF構文を調べ、先頭に「CBL_」を有する型定義名称(605)がある場合には、その型定義名称を、COBOL向け型情報として抽出し、解析情報703内に組み込む処理を行なう(S101,S102)。例えば図3(a)に示すTYPEDEF構文がある場合には、「CBL_PACK_9_4V9_3」605が抽出され、COBOL向け型情報として、解析情報703内に組込まれる。
【0038】
COBOL依存情報解析部751により、新記述規則で記述された型定義情報のみが抽出されるため、TYPEDEF構文に、新記述規則とは関係ない他の情報が含まれる場合にも、以降の処理でエラーが発生することはない。
【0039】
また、構文解析部702では、IDLソース701の文法チェックを行う。本実施形態では、IDLのサポートしないデータ型を、TYPEDEF構文を用いて定義するため、文法チェックでエラーが発生することはない。
【0040】
続いて、コード生成部704が、解析情報703を読み取り、IDLの型情報を、COBOLの型情報へ変換する処理を行なって、スタブ707およびスケルトン708を生成する。
【0041】
この際、インターフェース情報解析部705は、型変換テーブル709の標準テーブル710を参照して、解析情報に703に含まれるIDLの型情報を、COBOL言語の型情報に変換する。この変換結果は、コード生成情報712として登録される。これと並行して、COBOL型情報変換部752は、型変換テーブル709の特殊テーブル711を参照して、解析情報に703に含まれるCOBOL向け型情報を、COBOL言語の型情報に変換する。
【0042】
具体的には、COBOL型情報変換部752は、解析情報703に含まれるCOBOL向け型情報を読み出し(S103)、その型情報に対応して型変換テーブル709の特殊テーブル711に登録されているCOBOLの型情報を取得する(S104)。そして、取得した型情報にパラメータを設定して、その結果をコード生成情報712として登録する(S105)。
【0043】
例えば、解析情報703から読み出した情報が「CBL_PACK_9_4V9_3」である場合には、非対応型変換テーブル711に、「CBL_PACK_9_xV9_y」に対応して登録されている「pic 9(x)v9(y) PACKED−DECIMAL」を取得し、そのパラメータx,yにそれぞれ‘3’,‘4’を設定する。
【0044】
プログラムコード生成部706は、コード生成情報712を用いて、COBOL言語で記述したスタブ707およびスケルトン708を生成する。
【0045】
スタブ707およびスケルトン708は、自らに設定されたメソッド名称の定義されたPROGRAM−ID文と、呼び出すプログラム(メソッド)の名称の定義されたCALL文とを有する。スタブ707のCALL文はORBの機能を呼出し、スケルトン708のCALL文はサーバプログラムを呼出すためのものである。
【0046】
スタブ707および別途作成されたクライアントプログラムは、実行される計算機において、COBOLのコンパイルおよびリンクをなされて、実行形式のプログラムとなる。同様に、スケルトン708およびサーバプログラムも、実行される計算機において、COBOLのコンパイルおよびリンクをなされて、実行形式のプログラムとなる。
【0047】
なお、IDLコンパイラ700は、スタブ707およびスケルトン708の一方のみを生成するモードを有する。また、スタブ707やスケルトン708の生成時に、続けて計算機1においてCOBOLのコンパイルを行い、スタブ707やスケルトン708を実行形式のプログラムとして出力するモードを有する。IDLコンパイラ700は、これらのモードを、IDLのコンパイルを指示するコマンドのパラメータに従い選択する。
【0048】
スタブ707は、クライアントプログラム内の、サーバプログラムを呼び出すCALL文により起動される。起動されたスタブ707は、CALL文により、ORBの機能を、メソッドの名称や引数の情報の指定を伴い呼び出す。これを受けて、ORBは、対応するサーバプログラムおよびスケルトン708の配置された計算機を特定するための処理を行い、配置先の計算機のスケルトン708を、メソッドの名称や引数の情報の指定を伴い呼び出す。これにより起動されたスケルトン708は、サーバプログラムを引数の指定を伴い呼び出す。これにより、サーバプログラムが実行される。実行結果は、逆の経路で転送され、クライアントプログラムに渡される。
【0049】
以上で説明したように、本実施形態のIDLコンパイラ700によれば、新記述規則により記述されたIDLから、IDLのサポートしていないデータ型の指定を含むCOBOL言語のプログラムのスタブ707およびスケルトン708を生成することができる。
【0050】
図6に、本実施形態のIDL生成系の機能構成を示す。
【0051】
図示するIDL生成系800は、構文解析部802、インターフェース情報抽出部804、変換テーブル806、および、コード生成部807を有する。各部802、804、806および807は、計算機のディスク装置8,9の記憶領域内のプログラムの実行により実現される機能である。
【0052】
IDL生成系800は、原始ファイル801を入力として、IDLソース809を出力する。この処理の過程では、解析情報803、中間言語805、および、コード生成情報823が生成される。
【0053】
ここで、原始ファイル801は、COBOL言語で記述されたサーバプログラムからなる。なお、原始ファイル801、解析情報803、中間語805、コード生成情報823およびIDLソース809は、計算機1のディスク装置にファイルとして格納される。原始ファイル801は、例えば、開発の行われた他の計算機からネットワーク16を介して転送される。
【0054】
IDL生成系800は、新記述規則に対応するための機能として、コード生成部807内のTYPEDEF生成部808に組込まれるCOBOL型TYPEDEF生成部811と、型変換テーブル806に組込まれる特殊テーブル821とを有する。
【0055】
図7に示すように、型変換テーブル806の特殊テーブル821には、COBOLの型情報と、TYPEDEF情報とが予め対応付けて登録されている。ここで、TYPEDEF情報は、新記述規則により記述された型定義名称(605)である。一方、型変換テーブル806の標準テーブル820には、COBOL言語の型情報と、IDLの型情報とが予め対応付けて登録されている。これにより、型変換テーブル806には、COBOL言語の全ての型情報が登録される。
【0056】
なお、型変換テーブル806は、アクセスの高速化のため、IDL生成系800のプログラム中に配置される。もちろん、計算機1のディスク装置にファイルとして格納するようにしてもよい。
【0057】
次に、IDL生成系800の処理について、図7を用いて説明する。
【0058】
IDLソースの生成を指示するメッセージが計算機に入力されると、まず、構文解析部802が、原始プログラム801の構文解析を行ない、解析情報803を生成する。
【0059】
この解析情報803から、インターフェース情報抽出部804が、インターフェース情報を抽出して、中間語805を生成する。ここで、中間語805には、原始ファイル801を構成する各プログラムのプログラム名と、引数情報(引数の名称や型情報)とが含まれる。
【0060】
続いて、コード生成部807が、中間語805を読み取り、引数情報内の型情報を、IDLの型情報またはTYPEDEF情報に変換する処理を行って、IDLソース809を生成する。
【0061】
この際、コード生成部807は、まず、中間語805に含まれるCOBOL言語の型情報を型変換テーブル806の標準テーブル820で検索する。その型情報が標準テーブル820に登録されているもの(例えば「PIC S9(9)」)である場合、コード生成部807は、対応するIDLの型情報(「long」)を抽出し、コード生成情報823として登録する。これを、全てのプログラムおよび引数情報について行う。
【0062】
COBOL型TYPEDEF生成部811では、標準テーブル820に登録の無いCOBOL言語の型情報について、TYPEDEF構文の生成を行う。まず、TYPEDEF生成部811は、中間語805から、プログラム名を読み出し(S201)、標準テーブル820に登録の無い引数情報を読み出す(S202)。そして、読み出した引数情報内の型情報を、型変換テーブル806の特殊テーブル821で検索する(S203,S205)。対象の型情報の登録がない場合は、型変換エラー処理を行って、エラーメッセージを表示する(S206)。
【0063】
対象の型情報が登録されている場合は、その型情報に対応付けられているTYPEDEF情報を取得する(S207)。そして、取得したTYPEDEF情報と一致する型定義名称が、既に追加出力しているTYPEDEFチェーン(TYPEDEF情報群)にあるかどうかをコード生成情報823で検索し(S208,S210)、ない場合(S29でNO)は、そのTYPEDEF情報を用いたTYPEDEF構文を生成し、コード生成情報823内のTYPEDEFチェーンに追加出力する(S211)。この追加出力により、図3(a)の形式をとるTYPEDEF構文の文字データが追加される。
【0064】
図3(a)に示すように、TYPEDEF構文の生成では、まず、「typedef long」600の文字データを構文に設定し、続いて、TYPEDEF情報にパラメータを設定して型定義名称(605)を生成し、その型定義名称の文字データを構文に設定する。そして、構文の次の行に型定義名称(605)および引数名称606を設定する。
【0065】
一方、取得したTYPEDEF情報と一致する型定義名称が既にTYPEDEFチェーンに存在する時(S209でYES)は、TYPEDEFチェーン内の一致する型定義名称の個所に、型定義名称および引数情報を追加する(S212)。例えば、TYPEDEFチェーン内に図3(a)の型定義名称605が存在し、他の引数名称「ARG2」についての型定義名称が図3(a)のものに一致する場合には、既に設定されている型定義名称605および引数名称606の行の次の行に「CBL_PACK_9_4V9_3 ARG2」が追加される。これにより、同じ情報600および605を繰り返し設定しなくても済むため、TYPEDEF構文の情報量を小さく抑えることができる。
【0066】
続いて、TYPEDEF生成部808では、同じプログラムの他の引数情報について以上の処理を繰り返し(S213)、さらに、他のプログラムについて以上の処理を繰り返す(S214)。
【0067】
以上により作成されたコード生成情報823はコード出力部810に渡される。コード出力部810は、IDLソース809に対し、コード生成情報823内のIDLの型情報を用いてIDLの変数・数値の定義文を設定し、さらに、TYPEDEFチェーン内の各情報を、IDLソース809のTYPEDEF構文として設定する。
【0068】
以上で説明したように、本実施形態のIDL生成系800によれば、IDLのサポートしていないデータ型の指定を含むCOBOL言語のプログラムから、新記述規則により記述したIDLソース809を生成することができる。開発者は、このIDLソース809を、上述のIDLコンパイラ700でコンパイルすることにより、スタブ707およびスケルトン708を得ることができる。
【0069】
すなわち、IDLコンパイラ700およびIDL生成系800を用いることにより、開発者は、既成のクライアントプログラムやサーバプログラムを流用する場合にも、インタフェース仕様の修正等を行わなわずに済み、そのスタブ707およびスケルトン708を容易に取得できるようになる。また、COBOL言語のデータ型を自由に使って、クライアントプログラムやサーバプログラムを作成できるようになる。
【0070】
ところで、以上ではIDLのサポートしていないデータ型をTYPEDEF構文を使用して定義する例を説明したが、この定義は、同じくIDLにおいて開発者が自由に記述することができるIDLの変数・定数の名称や、IDLのコメント文を用いて行うようにしてもよい。
【0071】
変数や定数の名称を用いる場合には、図3(b)に示すように、IDLのデータ型定義文において、定義対象の変数や定数の名称606の前に、仕切記号「_」を挿んで上述の型定義名称605を付加する。この場合、IDLコンパイラは、データ型定義文より、「CBL_」の付加された名称606を抽出し、上述の図4のものと同様の処理を行う。IDL生成系も、原始ファイルの引数情報を、図3(b)の形式で記述し、上述の図6のものと同様の処理を行う。
【0072】
コメントを用いる場合には、図3(c)に示すように、IDLのデータ型定義文において、定義対象の変数や定数の名称606の後に、コメント記号「//」を挿んで上述の型定義名称605を付加する。この場合も、IDLコンパイラおよびIDL生成系は、図4および図6のものと同様の処理を行う。
【0073】
また、以上では、COBOL言語で作成するプログラムの開発を支援する場合について説明したが、本発明は、他のプログラム言語(例えばC言語、C++言語、Java言語など)を用いる開発にも、容易に適用することができる。この場合、IDL言語処理系は、COBOL依存情報解析部751とCOBOL型情報変換部752との代りに、それぞれ、対象のプログラム言語の依存情報解析部と型変換部とを設けるようにする。また、IDL生成系は、COBOL型TYPEDEF生成部811の代りに、対象のプログラム言語のTYPEDEF生成部を設けるようにする。そして、型変換テーブル709および806には、対象のプログラム言語のデータ型を登録するようにする。さらに、新記述規則は、対象のプログラム言語のデータ型を一意に識別できるように型定義名称を記述するものとする。
【0074】
【発明の効果】
以上で説明したように、本発明によれば、対象とするプログラム言語で記述されたプログラムで使用されるデータ型の制限なしに、そのプログラムのインタフェース機能を実現するサブプログラムを生成することのできるプログラム開発支援ツールを提供することができる。
【0075】
また、本発明によれば、対象とするプログラム言語で記述された任意のプログラムについて、上記プログラム開発支援ツールで処理可能なIDLのソース情報を生成することのできるプログラム開発支援ツールを提供することができる。
【図面の簡単な説明】
【図1】本発明のプログラム開発支援ツールが実装される計算機の構成例を示すブロック図である。
【図2】COBOLプログラムにおける型宣言の一例を示す図である。
【図3】本発明の新記述規則を適用したIDLの記述例を示す図である。
【図4】COBOLに対応するIDL言語処理系の機能構成を示す図である。
【図5】依存情報解析部および型情報変換部の機能を示す図である。
【図6】COBOLに対応するIDL生成系の機能構成を示す図である。
【図7】TYPEDEF生成部の機能を示す図である。
【図8】従来のIDL言語処理系の機能構成を示す図である。
【図9】従来のIDL生成系の機能構成を示す図である。
【符号の説明】
501 COBOLの型宣言文
600〜606 TYPEDEF構文を用いた型宣言
605 型定義名称
700 IDL言語処理系
701 IDLソース
702 IDL言語処理系の構文解析部
751 構文解析部内のCOBOL依存情報解析部
703 IDL言語処理系の構文解析によって得られた解析情報
704 IDL言語処理系のコード生成部
705 IDL言語処理系のインターフェース情報解析部
706 IDL言語処理系のプログラムコード生成部
707 コード生成部により得られるスタブ
708 コード生成部により得られるスケルトン
709 IDL言語処理系の型変換テーブル
710 型変換テーブル内の標準テーブル
711 型変換テーブル内の特殊テーブル
712 コード生成情報
752 COBOL型情報変換部
800 IDL生成系
801 原始プログラムファイル
802 IDL生成系の構文解析部
803 IDL生成系の解析情報
804 IDL生成系のインターフェース情報抽出部
805 IDL生成系の中間語情報
806 IDL生成系の型変換テーブル
807 IDL生成系のコード生成部
808 コード生成部内のTYPEDEF生成部
810 IDL生成系のIDL出力部
811 TYPEDEF生成部内のCOBOL型TYPEDEF生成部
809 IDLソース
820 型変換テーブル内の標準テーブル
821 型変換テーブル内の特殊テーブル
823 コード生成情報
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a support tool in program development using IDL (interface definition language).
[0002]
[Prior art]
In computer program development, a program (or data) may be created in units of functional blocks. According to this method, the program development efficiency can be improved and the program can be reused. However, when the target process is realized by linking a plurality of program processes, it is necessary to previously define an interface such as a calling rule between the programs. IDL (interface definition language) may be used for the definition of this interface.
[0003]
As IDL, IDL used in CORBA (Common Object Request Broker Architecture) proposed by OMG (Object Management Group) is known. As a reference for the language mapping specification of CORBA, there is “The Common Object Request Broker: Architecture and Specification Revision 2.0, Julie 1995 Updated Jul 1996” published by OMG. Also, as a reference for general background on CORBA, there is “Distributed Object Oriented Technology CORBA” published by Hirofumi Onozawa, Soft Research Center.
[0004]
CORBA defines IDL, mapping specifications between various program languages and IDL, and ORB (object request broker) for managing communication between programs. The developer describes the interface of each program in IDL according to the mapping specification. By compiling this IDL source with a dedicated compiler (IDL compiler), a stub for a client program and a skeleton for a server program are generated. Here, the stub and the skeleton are subprograms for mediating between the client program and the server program and the ORB.
[0005]
Such program development using IDL further has the advantage that it is easy to use programs written in different languages and programs executed on computers having different architectures.
[0006]
Hereinafter, processing systems that generate stubs and skeletons from an IDL source, such as a CORBA IDL compiler, are collectively referred to as an IDL language processing system. A processing system that generates an IDL source from an existing program is generically called an IDL generation system. The IDL generation system is effective when an existing program is diverted and processing linked to another program is performed.
[0007]
FIG. 8 shows an example of a functional configuration of a conventional IDL language processing system.
[0008]
The IDL syntax analysis unit 102 receives the IDL source 101 as input, performs IDL syntax analysis, and outputs analysis information 103. Here, the analysis information 103 includes IDL information that defines calling rules between programs, such as procedure and method names, argument data types, and sequences.
[0009]
The code generation unit 104 includes an interface information analysis unit 105, a program code generation unit 106, and a type conversion table 109. In the type conversion table 109, the data type information of IDL included in the analysis information 103 and the data type incorporated in the program code 108 are stored in association with each other. The interface information analysis unit 105 refers to the type conversion table 109 and converts the IDL data type information in the analysis information 103 into a data type used in a stub or skeleton. Using this conversion result, the program code generation unit 106 generates a stub 107 and a skeleton 108.
[0010]
FIG. 9 shows an example of a functional configuration of a conventional IDL generation system.
[0011]
The syntax analysis unit 202 analyzes the source program 201 and generates analysis information 203. The interface information extraction unit 204 extracts interface information such as procedure and method names, argument data types, and arrangements from the analysis information 203 and outputs them as an intermediate language 205. In the type conversion table 206 in the IDL generation system, data type information included in the intermediate language 205 and data type information used in IDL are stored in association with each other. The code generation unit 207 refers to the type conversion table 206 and converts the data type information in the intermediate language 205 into data type information used in the IDL source. Using this conversion result, the IDL output unit 211 generates the IDL source 212 so as to satisfy the IDL grammar.
[0012]
In general, when data is exchanged between programs written in different languages, the data type needs to be a type that can be used in common in both program languages. For this reason, the above-described IDL language processing system and IDL generation system can process only data types that can be commonly used in a plurality of target program languages (for example, C language, C ++ language, etc.).
[0013]
[Problems to be solved by the invention]
The above-described conventional IDL language processing system and IDL generation system cannot process data types that cannot be used in common in a plurality of target programming languages, and therefore cannot properly generate stubs, skeletons, and IDL sources depending on application programs. There is.
[0014]
For this reason, for example, when a data type that cannot be processed by the IDL generation system is specified in an existing application program to be diverted, the developer may modify the interface specification of the diverted program or It has been necessary to perform complicated manual work such as creating a wrapper function that performs the function of making changes.
[0015]
Therefore, an object of the present invention is to provide a program development support tool capable of generating a subprogram that realizes an interface function of a program without limitation of a data type used in the program described in the target programming language. It is to provide.
[0016]
Another object of the present invention is to provide a program development support tool capable of generating IDL source information that can be processed by the program development support tool for an arbitrary program described in a target program language. There is.
[0017]
[Means for Solving the Problems]
In order to solve the above problems, the present invention generates a subprogram (for example, a stub or a skeleton) that realizes an interface function of the program based on IDL source information that describes a calling rule between a plurality of programs. In the program development support tool, the type information of the data type used in the programming language describing the program and the type definition information that describes the data type according to a predetermined rule are registered in association with each other. A type conversion table having a special table, means for extracting type definition information described according to the predetermined rule from the IDL source information, and using the type conversion table, the extracted type definition information, Converting into type information of the programming language and registering the type information as code generation information When, using the code generation information, to provide a program development support tool, characterized in that it comprises means for generating the subprograms.
[0018]
The present invention also provides data type information used in a program language for describing the program in a program development support tool for generating IDL source information describing the calling rules of the program based on the source code of the program. And type definition information in which the data type is described according to a predetermined rule, a type conversion table having a special table registered in advance, and type information of data passed by the program , Means for converting type information registered in the special table into type definition information using the type conversion table, and registering the type definition information as code generation information; and a source of the IDL from the code generation information A program development support tool comprising means for generating information is provided.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a program development support tool according to an embodiment of the present invention will be described with reference to the drawings.
[0020]
The program development support tool of this embodiment is for supporting program development in an environment in which a plurality of application programs (client program and server program) operate in cooperation. The function of the program development support tool is divided into an IDL language processing system that generates stubs and skeletons from IDL sources, and an IDL generation system that generates IDL sources from existing programs.
[0021]
FIG. 1 shows a configuration of a computer 1 on which a program development support tool is mounted. As shown, the computer 1 includes a processor 2, a RAM 3, a ROM 4, a display 5, a keyboard 6, a mouse 7, an internal disk device 8, an external disk device 9, and various interface circuits (I / F) 10-15. Have. Here, for example, a hard disk device is used as the internal disk device, and for example, a CD-ROM reader or a floppy disk device is used as the external disk device. The communication interface circuit 15 is connected to the network 16 and exchanges files (programs, etc.) with other computers.
[0022]
The function of the program development support tool is realized as a program stored in a recording medium of the external disk device 8 and executed by the processor 2.
[0023]
In the present embodiment, the COBOL language is targeted as the application program creation language. In the COBOL language, the definition of the data type of an argument of an external program can be described using the number of digits when the numerical value is expressed in decimal, the decimal point position, and the usage. For example, the declaration statement 501 in FIG. 2 defines a numerical value in the PACKED decimal format having an integer part of 4 digits and a decimal part of 3 digits. Such a data type may be used in the definition of an argument when called from an external program. However, this data type cannot be described by CORBA IDL. For this reason, conventionally, it has been necessary for a developer to perform troublesome work such as correction of interface specifications.
[0024]
In this embodiment, the COBOL language data type that matches the data type supported by the CORBA IDL is described as before, and the unsupported COBOL language data type is one of the IDL syntax elements. A new description rule (hereinafter referred to as a new description rule) is used. In the CORBA IDL grammar, the type definition name in the TYPEDEF syntax can be freely set by the developer.
[0025]
In the new description rule, a COBOL language data type that is not defined by the CORBA IDL is defined by the predetermined IDL type information and the type definition name in the TYPEDEF syntax. For example, the variable “ARG” of the declaration statement 501 in FIG. 2 is defined by IDL type information “unsigned long” 600 and a type definition name “CBL_PACK_9_4V9_3” 605 as shown in FIG.
[0026]
The type definition name 605 is also described according to the new description rule. Specifically, first, a character string “CBL_” 601 indicating that the description language is the COBOL language is described. Subsequently, a character string 602 corresponding to the application is described. In the example of FIG. 3A, “PACK_” 602 corresponding to “PACKED-DECIMAL” is described. “BIN_” is described for the usage “BINARY”, and “DISP” is described for “DISPLAY”. Subsequently, if necessary, “S” (not shown) indicating a sign is described, and subsequently “9_” 603 indicating a numerical value is described. Subsequently, the number of digits of the integer part of the decimal number (“4” in the example in the figure) is described, and if necessary, the number of digits of the decimal part (“3”) is described following “V9_” (604). .
[0027]
In this way, data types that are not supported by CORBA IDL are described. The IDL language processing system and IDL generation system of the present embodiment described below have a function for dealing with the above-described new description rule.
[0028]
FIG. 4 shows a functional configuration of the IDL language processing system (hereinafter referred to as IDL compiler) of the present embodiment.
[0029]
The illustrated IDL compiler 700 includes a syntax analysis unit 702 and a code generation unit 704. The syntax analysis unit 702 and the code generation unit 704 are functions realized by executing a program in the storage area of the disk devices 8 and 9 of the computer 1.
[0030]
The IDL compiler 700 receives the IDL source 701 and outputs a stub 707 and a skeleton 708 described in the COBOL language. Also, analysis information 703 and code generation information 712 are generated in this processing process.
[0031]
Here, the IDL source 701 is information in which the interface of the target server program is described in IDL according to the new description rule. The IDL source 701, analysis information 703, code generation information 712, stub 707, and skeleton 708 are stored as files in the disk device of the computer 1.
[0032]
The IDL compiler 700 is incorporated in the COBOL dependency information analysis unit 751 incorporated in the syntax analysis unit 702, the COBOL type information conversion unit 752 incorporated in the code generation unit 704, and the type conversion table 709 in order to cope with the new description rule. And a special table 711.
[0033]
As shown in FIG. 5, in the special table 711 of the type conversion table 709, the type definition name (605) described by the new description rule and the COBOL language type information are registered in advance in association with each other. In the standard table 710 of the type conversion table 709, IDL type information and COBOL language type information are registered in advance in association with each other. As a result, all type information in the COBOL language is registered in the type conversion table 709.
[0034]
Note that the type conversion table 709 is arranged in the program of the IDL compiler 700 in order to speed up access. Of course, it may be stored as a file in the disk device of the computer 1.
[0035]
Next, the processing of the IDL compiler 700 will be described with reference to FIG.
[0036]
When a command for instructing compilation of the IDL source 701 is input to the computer 1, the processing of the IDL compiler 700 is started. First, the syntax analysis unit 702 performs syntax analysis of the IDL source 701 to generate analysis information 703. The definition of the data type supported by IDL is processed in the same manner as in the past and is incorporated in the analysis information 703.
[0037]
At this time, as shown in FIG. 5, the COBOL dependency information analysis unit 751 checks the TYPEDEF syntax described in the IDL source 701 and if there is a type definition name (605) having “CBL_” at the head, The type definition name is extracted as type information for COBOL and incorporated into the analysis information 703 (S101, S102). For example, when there is a TYPEDEF syntax shown in FIG. 3A, “CBL_PACK_9_4V9_3” 605 is extracted and incorporated into the analysis information 703 as COBOL type information.
[0038]
Since only the type definition information described in the new description rule is extracted by the COBOL dependency information analysis unit 751, even if other information not related to the new description rule is included in the TYPEDEF syntax, There is no error.
[0039]
The syntax analysis unit 702 performs a grammar check of the IDL source 701. In this embodiment, data types that are not supported by IDL are defined using the TYPEDEF syntax, so that no error occurs in the grammar check.
[0040]
Subsequently, the code generation unit 704 reads the analysis information 703, performs processing for converting IDL type information into COBOL type information, and generates a stub 707 and a skeleton 708.
[0041]
At this time, the interface information analysis unit 705 refers to the standard table 710 of the type conversion table 709 and converts the IDL type information included in the analysis information 703 into the COBOL language type information. This conversion result is registered as code generation information 712. In parallel with this, the COBOL type information conversion unit 752 refers to the special table 711 of the type conversion table 709 and converts the COBOL type information included in the analysis information 703 into COBOL language type information.
[0042]
Specifically, the COBOL type information conversion unit 752 reads the COBOL type information included in the analysis information 703 (S103), and corresponds to the type information in the special table 711 of the type conversion table 709. Is acquired (S104). Then, a parameter is set in the acquired type information, and the result is registered as code generation information 712 (S105).
[0043]
For example, when the information read from the analysis information 703 is “CBL_PACK_9_4V9_3”, “pic 9 (x) v9 (y) PACKED− registered in the non-corresponding conversion table 711 corresponding to“ CBL_PACK_9_xV9_y ”. “DECIMAL” is acquired, and “3” and “4” are set in the parameters x and y, respectively.
[0044]
The program code generation unit 706 uses the code generation information 712 to generate a stub 707 and a skeleton 708 described in the COBOL language.
[0045]
The stub 707 and the skeleton 708 have a PROGRAM-ID statement in which a method name set for itself is defined, and a CALL statement in which the name of a program (method) to be called is defined. The CALL statement in the stub 707 calls an ORB function, and the CALL statement in the skeleton 708 is for calling a server program.
[0046]
The stub 707 and the separately created client program are compiled and linked to COBOL in the computer to be executed to become an executable program. Similarly, the skeleton 708 and the server program are compiled into COBOL and linked in the computer to be executed to become executable programs.
[0047]
The IDL compiler 700 has a mode for generating only one of the stub 707 and the skeleton 708. Further, when the stub 707 and the skeleton 708 are generated, the computer 1 continuously compiles COBOL and outputs the stub 707 and the skeleton 708 as an executable program. The IDL compiler 700 selects these modes according to parameters of a command that instructs IDL compilation.
[0048]
The stub 707 is activated by a CALL statement that calls a server program in the client program. The activated stub 707 calls the ORB function with the designation of the method name and argument information by the CALL statement. In response to this, the ORB performs processing for specifying the corresponding server program and the computer on which the skeleton 708 is arranged, and calls the skeleton 708 of the arrangement destination computer with designation of method name and argument information. . The skeleton 708 activated in this way calls the server program with an argument specified. Thereby, the server program is executed. The execution result is transferred through the reverse route and passed to the client program.
[0049]
As described above, according to the IDL compiler 700 of the present embodiment, the stub 707 and the skeleton 708 of the COBOL language program including the specification of the data type not supported by IDL is changed from the IDL described by the new description rule. Can be generated.
[0050]
FIG. 6 shows a functional configuration of the IDL generation system of this embodiment.
[0051]
The illustrated IDL generation system 800 includes a syntax analysis unit 802, an interface information extraction unit 804, a conversion table 806, and a code generation unit 807. Each unit 802, 804, 806, and 807 is a function realized by executing a program in the storage area of the disk devices 8 and 9 of the computer.
[0052]
The IDL generation system 800 receives the source file 801 and outputs an IDL source 809. In the course of this process, analysis information 803, intermediate language 805, and code generation information 823 are generated.
[0053]
Here, the source file 801 is composed of a server program described in the COBOL language. The source file 801, analysis information 803, intermediate language 805, code generation information 823, and IDL source 809 are stored as files on the disk device of the computer 1. The source file 801 is transferred via the network 16 from another computer that has been developed, for example.
[0054]
The IDL generation system 800 includes a COBOL type TYPEDEF generation unit 811 incorporated in the TYPEDEF generation unit 808 in the code generation unit 807 and a special table 821 incorporated in the type conversion table 806 as functions for dealing with the new description rule. Have.
[0055]
As shown in FIG. 7, in the special table 821 of the type conversion table 806, COBOL type information and TYPEDEF information are registered in advance in association with each other. Here, the TYPEDEF information is a type definition name (605) described by the new description rule. On the other hand, in the standard table 820 of the type conversion table 806, COBOL type information and IDL type information are registered in advance in association with each other. As a result, all type information in the COBOL language is registered in the type conversion table 806.
[0056]
Note that the type conversion table 806 is placed in the IDL generation system 800 program in order to speed up access. Of course, it may be stored as a file in the disk device of the computer 1.
[0057]
Next, processing of the IDL generation system 800 will be described with reference to FIG.
[0058]
When a message instructing generation of an IDL source is input to the computer, first, the syntax analysis unit 802 performs syntax analysis of the source program 801 and generates analysis information 803.
[0059]
From this analysis information 803, the interface information extraction unit 804 extracts interface information and generates an intermediate language 805. Here, the intermediate language 805 includes the program name of each program constituting the source file 801 and argument information (argument name and type information).
[0060]
Subsequently, the code generation unit 807 reads the intermediate language 805 and performs processing for converting the type information in the argument information into IDL type information or TYPEDEF information, thereby generating an IDL source 809.
[0061]
At this time, the code generation unit 807 first searches the standard table 820 of the type conversion table 806 for the COBOL language type information included in the intermediate language 805. If the type information is registered in the standard table 820 (for example, “PIC S9 (9)”), the code generation unit 807 extracts the corresponding IDL type information (“long”) and generates the code. Register as information 823. This is done for all programs and argument information.
[0062]
The COBOL type TYPEDEF generation unit 811 generates TYPEDEF syntax for COBOL language type information not registered in the standard table 820. First, the TYPEDEF generation unit 811 reads a program name from the intermediate language 805 (S201), and reads argument information that is not registered in the standard table 820 (S202). Then, the type information in the read argument information is searched in the special table 821 of the type conversion table 806 (S203, S205). If the target type information is not registered, type conversion error processing is performed and an error message is displayed (S206).
[0063]
If the target type information is registered, the TYPEDEF information associated with the type information is acquired (S207). Then, the code generation information 823 is searched for whether or not the type definition name that matches the acquired TYPEDEF information is in the TYPEDEF chain (TYPEDEF information group) that has already been output (S208, S210). NO) generates a TYPEDEF syntax using the TYPEDEF information, and additionally outputs it to the TYPEDEF chain in the code generation information 823 (S211). This additional output adds TYPEDEF syntax character data in the form of FIG.
[0064]
As shown in FIG. 3A, in the generation of the TYPEDEF syntax, first, the character data of “typedef long” 600 is set in the syntax, and then the parameter is set in the TYPEDEF information, and the type definition name (605) is set. Generate and set the character data of the type definition name in the syntax. Then, the type definition name (605) and the argument name 606 are set in the next line of the syntax.
[0065]
On the other hand, when a type definition name that matches the acquired TYPEDEF information already exists in the TYPEDEF chain (YES in S209), the type definition name and argument information are added to the location of the matching type definition name in the TYPEDEF chain ( S212). For example, if the type definition name 605 in FIG. 3A exists in the TYPEDEF chain and the type definition name for the other argument name “ARG2” matches that in FIG. 3A, it is already set. "CBL_PACK_9_4V9_3 ARG2" is added to the next row of the type definition name 605 and the argument name 606. Thereby, since it is not necessary to repeatedly set the same information 600 and 605, the information amount of the TYPEDEF syntax can be kept small.
[0066]
Subsequently, the TYPEDEF generation unit 808 repeats the above processing for other argument information of the same program (S213), and further repeats the above processing for other programs (S214).
[0067]
The code generation information 823 created as described above is passed to the code output unit 810. The code output unit 810 sets IDL variable / numerical definition statements using IDL type information in the code generation information 823 for the IDL source 809, and further sets each piece of information in the TYPEDEF chain to the IDL source 809. TYPEDEF syntax.
[0068]
As described above, according to the IDL generation system 800 of the present embodiment, the IDL source 809 described by the new description rule is generated from the COBOL language program including the specification of the data type not supported by IDL. Can do. The developer can obtain the stub 707 and the skeleton 708 by compiling the IDL source 809 with the IDL compiler 700 described above.
[0069]
In other words, by using the IDL compiler 700 and the IDL generation system 800, the developer does not have to modify the interface specification even when diverting an existing client program or server program. The stub 707 and the skeleton 708 can be easily acquired. In addition, a client program and a server program can be created by freely using the COBOL language data type.
[0070]
By the way, although the example which defines the data type which IDL does not support using the TYPEDEF syntax was explained above, this definition is also the IDL variable / constant that the developer can freely describe in IDL. You may make it carry out using a name and the comment sentence of IDL.
[0071]
When the names of variables and constants are used, as shown in FIG. 3B, in the IDL data type definition statement, a partition symbol “_” is inserted in front of the variable or constant name 606 to be defined. The above type definition name 605 is added. In this case, the IDL compiler extracts the name 606 to which “CBL_” is added from the data type definition statement, and performs the same processing as in FIG. The IDL generation system also describes the argument information of the source file in the format of FIG. 3B, and performs the same processing as that of FIG.
[0072]
When using a comment, as shown in FIG. 3C, in the IDL data type definition statement, the comment symbol “//” is inserted after the name 606 of the variable or constant to be defined and the above type definition is inserted. A name 605 is added. Also in this case, the IDL compiler and the IDL generation system perform the same processing as that in FIG. 4 and FIG.
[0073]
Further, the case where development of a program created in the COBOL language is supported has been described above, but the present invention can be easily applied to development using other program languages (for example, C language, C ++ language, Java language, etc.). Can be applied. In this case, in the IDL language processing system, instead of the COBOL dependency information analysis unit 751 and the COBOL type information conversion unit 752, a dependency information analysis unit and a type conversion unit of the target program language are provided, respectively. Further, the IDL generation system is provided with a TYPEDEF generation unit of the target program language instead of the COBOL type TYPEDEF generation unit 811. In the type conversion tables 709 and 806, the data type of the target programming language is registered. Furthermore, the new description rule shall describe the type definition name so that the data type of the target programming language can be uniquely identified.
[0074]
【The invention's effect】
As described above, according to the present invention, it is possible to generate a subprogram that realizes the interface function of the program without restriction on the data type used in the program described in the target programming language. Program development support tools can be provided.
[0075]
Further, according to the present invention, it is possible to provide a program development support tool capable of generating IDL source information that can be processed by the program development support tool for an arbitrary program described in a target program language it can.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration example of a computer on which a program development support tool of the present invention is mounted.
FIG. 2 is a diagram illustrating an example of a type declaration in a COBOL program.
FIG. 3 is a diagram showing a description example of IDL to which the new description rule of the present invention is applied.
FIG. 4 is a diagram illustrating a functional configuration of an IDL language processing system corresponding to COBOL.
FIG. 5 is a diagram illustrating functions of a dependency information analysis unit and a type information conversion unit.
FIG. 6 is a diagram illustrating a functional configuration of an IDL generation system corresponding to COBOL.
FIG. 7 is a diagram illustrating functions of a TYPEDEF generation unit.
FIG. 8 is a diagram showing a functional configuration of a conventional IDL language processing system.
FIG. 9 is a diagram illustrating a functional configuration of a conventional IDL generation system.
[Explanation of symbols]
501 COBOL type declaration statement
600-606 Type declaration using TYPEDEF syntax
605 Type definition name
700 IDL language processing system
701 IDL source
702 Parser of IDL language processor
751 COBOL dependency information analysis section in the syntax analysis section
703 Analysis information obtained by syntax analysis of IDL language processor
704 Code generation unit of IDL language processing system
705 Interface information analysis unit of IDL language processing system
706 Program code generator of IDL language processing system
707 Stub obtained by the code generator
708 Skeleton obtained by the code generator
709 Type conversion table of IDL language processor
Standard table in 710 type conversion table
Special table in 711 type conversion table
712 Code generation information
752 COBOL type information converter
800 IDL generator
801 Primitive program file
802 Syntax analysis part of IDL generator
803 Analysis information of IDL generation system
804 IDL generation interface information extraction unit
805 Intermediate language information of IDL generator
806 IDL generation type conversion table
807 IDL generation code generator
808 TYPEDEF generator in the code generator
810 IDL output part of IDL generation system
811 TYPEDEF generation unit in TYPEDEF generation unit
809 IDL source
Standard table in 820 type conversion table
Special table in type 821 conversion table
823 Code generation information

Claims (6)

ディスク装置に予め記憶されている、複数のプログラム間の呼び出し規則を記述したものであるIDL(インターフェース定義言語)のソース情報を基に、前記プログラムのインターフェース機能を実現するサブプログラムを生成するプログラム開発支援装置において、
前記プログラムを記述するプログラム言語であるCOBOL言語で用いるデータ型、および、該データ型を予め定めた規則に従って記述したものである型定義名称が、予め対応付けて登録される特殊テーブルと、IDLの型情報とCOBOL言語の型情報とが予め対応付けて登録されている標準テーブルと、を有する型変換テーブルを記憶した記憶部と、
前記ディスク装置に記憶されている前記IDLのソース情報から、前記予め定めた規則に従って記述されている型定義名称を抽出し、前記抽出した型定義名称を、前記型変換テーブルの特殊テーブルを用いて、前記COBOL言語のデータ型に変換し、該データ型をコード生成情報として前記ディスク装置に登録し、前記登録されたコード生成情報を用いて、前記サブプログラムを生成するサブプログラム生成部と、
を備えたことを特徴とするプログラム開発支援装置。
Program development for generating a subprogram that realizes the interface function of the program based on IDL (interface definition language) source information that describes the calling rules between a plurality of programs stored in advance in the disk device In the support device,
A special table in which a data type used in the COBOL language, which is a programming language describing the program, and a type definition name in which the data type is described according to a predetermined rule are registered in association with each other , an IDL A storage unit storing a type conversion table having a standard table in which type information and COBOL language type information are registered in advance in association with each other ;
From the source information of the IDL stored in the disk device, the extracted type definitions name that is described according to a predetermined rule, the type definition name and the extracted, using special table of the type conversion table Converting to the COBOL language data type, registering the data type as code generation information in the disk device, and using the registered code generation information to generate the subprogram,
A program development support apparatus characterized by comprising:
請求項1記載のプログラム開発支援装置において、
前記予め定めた規則に従って記述された型定義名称は、前記IDLのソース情報内の型定義宣言文中から抽出される
ことを特徴とするプログラム開発支援装置。
The program development support apparatus according to claim 1,
The type development name described according to the predetermined rule is extracted from a type definition declaration sentence in the IDL source information.
請求項1記載のプログラム開発支援装置において、
前記予め定めた規則に従って記述された型定義名称は、データの表示型、長さ、および、用途を示す情報を有する
ことを特徴とするプログラム開発支援装置。
The program development support apparatus according to claim 1,
The program definition support apparatus, wherein the type definition name described according to the predetermined rule includes information indicating a display type, a length, and a use of data.
ディスク装置に予め記憶されている、COBOL言語により記述されたプログラムの原始コードを基に、該プログラムの呼び出し規則を記述した、IDL(インターフェース定義言語)のソース情報を生成するプログラム開発支援装置において、
前記プログラムを記述するプログラム言語であるCOBOL言語で用いるデータ型、および、該データ型を予め定めた規則に従って記述したものである型定義名称が、予め対応付けて登録される特殊テーブルと、IDLの型情報とCOBOL言語の型情報とが予め対応付けて登録されている標準テーブルと、を有する型変換テーブルを記憶した記憶部と、
前記プログラムが受渡しするデータ型の内の、前記特殊テーブルに登録されているデータ型を、前記特殊テーブルを用いて、型定義名称に変換し、該型定義名称をコード生成情報として前記ディスク装置に登録し、前記登録されたコード生成情報から前記IDLのソース情報を生成するIDLソース生成部と、
を備えたことを特徴とするプログラム開発支援装置。
In a program development support device for generating IDL (interface definition language) source information, which describes the calling rules of the program, based on the source code of the program described in the COBOL language stored in advance in the disk device ,
A special table in which a data type used in the COBOL language, which is a programming language describing the program, and a type definition name in which the data type is described according to a predetermined rule are registered in association with each other , an IDL A storage unit storing a type conversion table having a standard table in which type information and COBOL language type information are registered in advance in association with each other ;
Of the data types delivered by the program, the data type registered in the special table is converted into a type definition name using the special table, and the type definition name is converted into code generation information to the disk device. An IDL source generator for registering and generating the IDL source information from the registered code generation information;
A program development support apparatus characterized by comprising:
請求項4記載のIDLプログラム開発支援装置において、
前記変換のなされた型定義名称は、前記IDLのソース情報内の型定義宣言文中に設定されることを特徴とするプログラム開発支援装置。
In the IDL program development support device according to claim 4,
The converted type definition name is set in a type definition declaration statement in the IDL source information.
請求項4記載のプログラム開発支援装置において、
前記予め定めた規則に従って記述された型定義名称は、データの表示型、長さ、および、用途を示す情報を有する
ことを特徴とするプログラム開発支援装置。
The program development support device according to claim 4,
The program definition support apparatus, wherein the type definition name described according to the predetermined rule includes information indicating a display type, a length, and a use of data.
JP09919898A 1998-04-10 1998-04-10 Program development support tool Expired - Fee Related JP4319706B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09919898A JP4319706B2 (en) 1998-04-10 1998-04-10 Program development support tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09919898A JP4319706B2 (en) 1998-04-10 1998-04-10 Program development support tool

Publications (2)

Publication Number Publication Date
JPH11296359A JPH11296359A (en) 1999-10-29
JP4319706B2 true JP4319706B2 (en) 2009-08-26

Family

ID=14240960

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09919898A Expired - Fee Related JP4319706B2 (en) 1998-04-10 1998-04-10 Program development support tool

Country Status (1)

Country Link
JP (1) JP4319706B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4157016B2 (en) 2003-11-05 2008-09-24 株式会社東芝 Compiler apparatus and compiling method
JP2005321954A (en) * 2004-05-07 2005-11-17 Sony Corp Robot device, information processing system, information processing method, and computer program
JP4388427B2 (en) 2004-07-02 2009-12-24 オークマ株式会社 Numerical control device that can call programs written in script language
US7533373B2 (en) * 2005-01-25 2009-05-12 Taiwan Semiconductor Manufacturing Co., Ltd Method for prevention of system execution malfunction
JP5292670B2 (en) * 2006-02-22 2013-09-18 富士通株式会社 Development support program, development support method, and development support apparatus
JP2007226743A (en) * 2006-02-27 2007-09-06 Fujitsu Ltd Program, method and apparatus for supporting development of mediation program
JP7073813B2 (en) * 2018-03-16 2022-05-24 富士通株式会社 Control programs, control methods and information processing equipment

Also Published As

Publication number Publication date
JPH11296359A (en) 1999-10-29

Similar Documents

Publication Publication Date Title
US6041180A (en) System and method for optimizing template object files
KR101150003B1 (en) Software development infrastructure
US7162709B2 (en) System and method for common code generation
US8225276B1 (en) Shared code management
Hartmann Big practical guide to computer simulations
Smith Extending SUIF for machine-dependent optimizations
JP2007079844A (en) Compiling device
JPH0769834B2 (en) Method and apparatus for compiling source program
CN111880777A (en) Program information issuing method and device and electronic equipment
JP2018028777A (en) Emulation device, emulation method, and emulation program
JP4319706B2 (en) Program development support tool
US7694283B2 (en) Method and apparatus for generating specification data
Kastens Attribute grammars in a compiler construction environment
Soroker et al. Extension mechanisms in Montana
JP2001325100A (en) Program-analyzing device
CN110737431B (en) Software development method, development platform, terminal device and storage medium
JPH07182179A (en) Object oriented data base managing device
US6817012B1 (en) Method of translating a source operation to a target operation, computer program, storage medium, computer and translation
JPH09218789A (en) Division compiling system
Guyon et al. An integrated development environment for pattern matching programming
JP2002132502A (en) Automatic creating system and method of distributed object with interpretation of language function
Barnes Compiling CSP.
Chisolm et al. ATLAS compiler development
JP2003177923A (en) Reserved word converting method for porting support system
Rus et al. TICS: A component based language processing environment

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060509

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060809

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060926

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070124

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070130

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070302

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090529

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

Free format text: PAYMENT UNTIL: 20120605

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees