JP2000339175A - Dynamic assigning method for type information in data structure definition using abstract syntax description method - Google Patents

Dynamic assigning method for type information in data structure definition using abstract syntax description method

Info

Publication number
JP2000339175A
JP2000339175A JP11150700A JP15070099A JP2000339175A JP 2000339175 A JP2000339175 A JP 2000339175A JP 11150700 A JP11150700 A JP 11150700A JP 15070099 A JP15070099 A JP 15070099A JP 2000339175 A JP2000339175 A JP 2000339175A
Authority
JP
Japan
Prior art keywords
instance
value
type
data structure
dictionary
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.)
Granted
Application number
JP11150700A
Other languages
Japanese (ja)
Other versions
JP3531536B2 (en
Inventor
Shingo Fukui
眞吾 福井
Kiyoshi Hiura
潔 日浦
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP15070099A priority Critical patent/JP3531536B2/en
Publication of JP2000339175A publication Critical patent/JP2000339175A/en
Application granted granted Critical
Publication of JP3531536B2 publication Critical patent/JP3531536B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To dynamically assign type information by applying data structure definition described according to an ASN.1 specification at the time of executing a program described in an object-oriented language at the time of executing the operation of a data structure based on the data structure definition by the program. SOLUTION: A function jump table 5 is prepared for each basic classification of an ASN.1 type, and a dictionary item instance 2 is prepared for a type which can be referred to by the other without necessitating the inner modification of a type based on the data structure definition and the integrated type of the ASN.1, and a dictionary instance 1 for holding the dictionary item instances is prepared. At the time of operating the data structure, the pointer of the dictionary item instance 2 is set at a value handle instance 4 so that the type information can be assigned, and processing corresponding to the type can be called by referring to the function jump table 5.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データ構造定義が
ISO8824「ASN.1仕様」に準拠して記述され
る抽象構文記法を用いたデータ構造定義における型情報
の動的割り当て方法に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a method for dynamically allocating type information in a data structure definition using an abstract syntax notation in which the data structure definition is described in accordance with ISO8824 "ASN.1 Specification".

【0002】[0002]

【従来の技術】データの抽象構文を定義するための記述
に、ISO8824で規定された「ASN.1仕様(A
bstract Syntax Notation On
e:抽象構文記法)」がある。ASN.1は、整数値、
文字列やビット列等基本的なデータ要素を順序列や集合
として組み合わせることによりデータの論理的構造(抽
象構文)を表現できる。
2. Description of the Related Art A description for defining an abstract syntax of data includes "ASN.1 specification (A
bstract Syntax Notation On
e: abstract syntax notation) ". ASN. 1 is an integer value,
The logical structure (abstract syntax) of data can be expressed by combining basic data elements such as character strings and bit strings as ordered sequences and sets.

【0003】ところで、従来、データ構造定義が上述し
たASN.1仕様に準拠して記述され、そのデータ構造
定義に基づくデータ構造の操作を、例えば、C++等オ
ブジェクト指向言語で記述されたコンピュータプログラ
ム(応用プログラム)で行う際の手順が図17に示され
ている。勿論ここで記述される応用プログラムは、AS
N.1仕様に準拠して記述された構造定義を表すクラス
記述に依存する。図17を参照してこの応用プログラム
の作成手順について簡単に説明する。プログラマは、デ
ータ構造定義に基づく型の各々と、ASN.1の組み込
み型の内ASN.1記述に於いて修飾を必要とせず他か
ら参照できる型の各々に対応するクラス定義を予め作成
する。そして、それらのインスタンスを作成して値操作
を行う応用プログラム記述を行う(ステップS171〜
SS174)。次に、その応用プログラム記述からオブ
ジェクト指向言語コンパイラおよびリンカによって、実
行可能なコンピュータプログラムを得、その実行可能な
応用プログラムを実行(ステップS175〜S177)
していた。
[0003] Conventionally, the data structure definition is based on the ASN. FIG. 17 shows a procedure for performing a data structure operation based on the data structure definition, which is described in conformity with one specification, using a computer program (application program) described in an object-oriented language such as C ++. I have. Of course, the application program described here is AS
N. 1 depends on a class description representing a structure definition described in conformity with the specifications. Referring to FIG. 17, a procedure for creating the application program will be briefly described. The programmer can add each of the types based on the data structure definition to the ASN. 1 of the ASN. In one description, a class definition corresponding to each type that requires no modification and can be referred to from others is created in advance. Then, an application program for creating those instances and performing a value operation is described (steps S171 to S171).
SS174). Next, an executable computer program is obtained from the application program description by an object-oriented language compiler and a linker, and the executable application program is executed (steps S175 to S177).
Was.

【0004】[0004]

【発明が解決しようとする課題】上述したように従来技
術によれば、データ構造定義がASN.1仕様に準拠し
て記述され、そのデータ構造定義に基づくデータ構造の
操作をオブジェクト指向言語で記述された応用プログラ
ムにより実行するコンピュータシステムでは、その応用
プログラム作成時にASN.1仕様に基づくデータ構造
定義を与える必要があった。従って、まず、データ構造
定義に基づく型の各々と、ASN.1の組み込み型の内
ASN.1記述に於いて修飾を必要とせず他から参照で
きる型の各々に対応するクラス定義を予め生成し、それ
らのインスタンスを作成して値操作を行う応用プログラ
ム記述を行い、次に、その応用プログラム記述からコン
パイラおよびリンカによって、実行可能な応用プログラ
ムを得、その実行可能な応用プログラムを実行してい
た。このため、ISO8824「ASN.1仕様」に準
拠して定義されたデータ構造の完全な記述を予め得るこ
とのできない対象を取り扱うことはできなかった。
According to the prior art as described above, the data structure definition is ASN. A computer system which is described in conformity with the specification and executes an operation of a data structure based on the data structure definition by an application program described in an object-oriented language. It was necessary to provide a data structure definition based on one specification. Therefore, first, each of the types based on the data structure definition and the ASN. 1 of the ASN. In one description, a class definition corresponding to each type that does not require qualification and that can be referred to from others is generated in advance, an application program description for creating instances thereof and performing value operations is performed, and then the application program An executable application program was obtained from the description by a compiler and a linker, and the executable application program was executed. For this reason, it was not possible to handle a target for which a complete description of the data structure defined in accordance with ISO8824 “ASN.1 specification” cannot be obtained in advance.

【0005】本発明は上記事情に基づいてなされたもの
であり、データ構造定義がASN.1仕様に準拠して記
述され、そのデータ構造定義に基づくデータ構造の操作
をオブジェクト指向言語で記述された応用プログラムで
行う際に、予めASN.1仕様に準拠したデータ構造の
完全な記述を得ない状態で応用プログラムの作成を可能
とし、ASN.1仕様に準拠したデータ構造定義 を予
め作成された応用プログラム実行中に読み込んでAS
N.1の型辞書インスタンスを作成し、応用プログラム
実行中にASN.1の型辞書インスタンスを検索し、こ
のことによりデータ構造を特定して値の操作を行うこと
のできる、抽象構文記法を用いたデータ構造定義におけ
る型情報の動的割り当て方法を提供することを目的とす
る。
[0005] The present invention has been made based on the above circumstances, and the data structure definition is ASN. When the operation of the data structure based on the data structure definition is performed by an application program described in an object-oriented language, the ASN. Application programs can be created without obtaining a complete description of the data structure conforming to the ASN.1 specification. Reads the data structure definition conforming to the specification 1 during execution of the application program created in advance and
N. 1 is created, and ASN.1 is created during execution of the application program. The object of the present invention is to provide a method of dynamically allocating type information in a data structure definition using an abstract syntax notation, which searches for a type dictionary instance of the first type, thereby specifying a data structure and performing a value operation. And

【0006】[0006]

【課題を解決するための手段】上述した課題を解決する
ために請求項1に記載の抽象構文記法を用いたデータ構
造定義における型情報の動的割り当て方法は、データ構
造定義がASN.1仕様に準拠して記述され、そのデー
タ構造定義に基づくデータ構造の操作をオブジェクト指
向言語で記述されたプログラムにより実行するコンピュ
ータシステムにおいて、前記ASN.1データ構造定義
に基づく型の基本種別ごとに関数ジャンプテーブルを用
意し、コンパイル後の前記プログラム実行時に、前記デ
ータ構造定義を読み込んで、そのデータ構造定義に基く
それぞれの型と ASN.1の組込み型の内修飾を必要
とせず他から参照できるそれぞれの型に対し、前記関数
ジャンプテーブルへのポインタと少なくとも型基本情報
とを含む辞書項目インスタンスを作成すると共に、これ
ら辞書項目インスタンスへのポインタを保持する型辞書
インスタンスを作成し、前記データ構造を操作する際、
前記型辞書インスタンスから操作する値の型に対応する
前記辞書項目インスタンスを指すポインタを得て値ハン
ドルインスタンスに設定することによって型情報を特定
し、必要に応じて前記関数ジャンプテーブルを参照する
ことによって、その型情報に対応して用意される関数を
呼び出し値の操作を行うことを特徴とする。
According to a first aspect of the present invention, there is provided a method for dynamically allocating type information in a data structure definition using an abstract syntax notation according to the present invention. 1. A computer system which is described in conformity with the specification and executes a data structure operation based on the data structure definition by a program described in an object-oriented language. 1. A function jump table is prepared for each basic type of a type based on the data structure definition, and when the program is executed after compiling, the data structure definition is read, and each type based on the data structure definition and the ASN. For each type of the built-in type that can be referred to without requiring internal qualification, a dictionary entry instance including a pointer to the function jump table and at least type basic information is created. When creating a type dictionary instance holding a pointer and manipulating the data structure,
By obtaining a pointer to the dictionary item instance corresponding to the value type to be operated from the type dictionary instance and setting it in a value handle instance, specifying type information, and referring to the function jump table as necessary The method is characterized in that a function prepared in accordance with the type information is operated on a call value.

【0007】請求項2に記載の抽象構文記法を用いたデ
ータ構造定義における型情報の動的割り当て方法は、請
求項1に記載の同方法において、前記辞書項目インスタ
ンスを作成する際、データ構造定義により宣言された型
が構造型の場合、型補助情報としてその構造型の構成要
素のおのおのを値ハンドルインスタンスに対応づけ、そ
の値ハンドルインスタンスの並びを保持する構造要素補
助情報を設定することを特徴とする。請求項3に記載の
抽象構文記法を用いたデータ構造定義における型情報の
動的割り当て方法は、請求項2に記載の同方法におい
て、前記関数ジャンプテーブルに用意される関数は、必
要に応じて型に応じた値内部表現保持部を用意し、この
値内部表現保持部へ前記構造要素補助情報にある値ハン
ドルインスタンスの並びを複製し、前記値ハンドルイン
スタンスがその値内部表現保持部へのポインタを保持す
るように設定し、操作に対応する値を前記値内部表現保
持部に設定することを特徴とする。請求項4に記載の抽
象構文記法を用いたデータ構造定義における型情報の動
的割り当て方法は、請求項1に記載の同方法において、
前記値ハンドルインスタンスによる値操作において、そ
の操作の性質に従い、値ハンドルインスタンスへのアク
セスのみ行うか、値ハンドルインスタンスが持つ辞書項
目インスタンスへのポインタを辿り、辞書項目インスタ
ンスの参照のみ行うか、あるいは辞書項目インスタンス
が持つ関数ジャンプテーブルへのポインタを辿り、その
関数ジャンプテーブルに用意されているその操作に対応
する関数を呼び出すことを特徴とする。
According to a second aspect of the present invention, there is provided a method for dynamically allocating type information in a data structure definition using an abstract syntax notation according to the first aspect. When the type declared by is a structured type, each component of the structured type is associated with a value handle instance as type auxiliary information, and the structure element auxiliary information that holds the sequence of the value handle instances is set. And A dynamic allocation method of type information in a data structure definition using an abstract syntax notation according to claim 3 is a method according to claim 2, wherein the function prepared in the function jump table is, if necessary, A value internal representation holding unit corresponding to the type is prepared, and the array of value handle instances in the structure element auxiliary information is copied to the value internal expression holding unit, and the value handle instance is a pointer to the value internal expression holding unit. , And a value corresponding to the operation is set in the value internal expression holding unit. A method for dynamically allocating type information in a data structure definition using the abstract syntax notation according to claim 4 is a method according to claim 1, wherein
In the value operation by the value handle instance, depending on the nature of the operation, whether to only access the value handle instance, follow the pointer to the dictionary item instance of the value handle instance, and only refer to the dictionary item instance, or A pointer to a function jump table of an item instance is traced, and a function corresponding to the operation prepared in the function jump table is called.

【0008】請求項5に記載の抽象構文記法を用いたデ
ータ構造定義における型情報の動的割り当て方法は、デ
ータ構造定義がASN.1仕様に準拠して記述され、そ
のデータ構造定義に基づくデータ構造の操作をオブジェ
クト指向言語で記述されたプログラムにより実行するコ
ンピュータシステムにおいて、前記プログラムをコンパ
イルして実行プログラムを作成するステップと、前記プ
ログラムの実行においてデータ構造を操作する際、前記
ASN.1仕様に準拠して記述されたデータ構造定義を
読み込み、前記データ構造定義で宣言された型の各々
と、ASN.1の組み込み型の内ASN.1記述におい
て修飾を必要とせず他から参照できる型の各々に対応す
る辞書項目インスタンスを作成すると共に、これら辞書
項目インスタンスへのポインタを保持する型辞書インス
タンスを作成するステップと、これら辞書項目インスタ
ンスの全てを保持する辞書インスタンスを作成するステ
ップと、値ハンドルインスタンスを生成し、この値ハン
ドルインスタンスで生成し、操作する値の型に対応する
辞書項目インスタンスを指すポインタを前記型情報辞書
インスタンスから得て前記値ハンドルインスタンスに設
定するステップと、前記値ハンドルインスタンスによる
値操作において、その操作の性質に従い、値ハンドルイ
ンスタンスへのアクセスのみ行うか、値ハンドルインス
タンスが持つ辞書項目インスタンスへのポインタを辿
り、辞書項目インスタンスの参照のみ行うか、あるいは
辞書項目インスタンスが持つ関数ジャンプテーブルへの
ポインタを辿り、その関数ジャンプテーブルに用意され
ているその操作に対応する関数を呼び出すそれぞれのス
テップと、前記関数を呼び出すに際し、その関数に値内
部表現保持部が存在するか否かを調べるステップと、存
在しない場合、値内部表現保持部を用意して前記値ハン
ドルインスタンスがこの値内部表現保持部へのポインタ
を保持するように設定し、この値内部表現保持部をアク
セスするステップとから成ることを特徴とする。請求項
6に記載の抽象構文記法を用いたデータ構造定義におけ
る型情報の動的割り当て方法は、さらに、既にある値ハ
ンドルインスタンスに対して値操作を行うか否かを調
べ、前記値操作を行うか、あるいは新たな値ハンドルイ
ンスタンスを作成するステップから成ることを特徴とす
る。
According to a fifth aspect of the present invention, there is provided a method for dynamically allocating type information in a data structure definition using an abstract syntax notation. (1) a computer system which is described in conformity with a specification and executes an operation of a data structure based on a data structure definition by a program described in an object-oriented language, compiling the program and creating an execution program; When manipulating a data structure in the execution of a program, the ASN. 1 is read, and each of the types declared in the data structure definition is read from the ASN. 1 of the ASN. Creating a dictionary item instance corresponding to each of the types that can be referenced from others without requiring modification in one description, and creating a type dictionary instance holding a pointer to the dictionary item instance; Creating a dictionary instance that holds everything; generating a value handle instance; generating the value handle instance; obtaining a pointer from the type information dictionary instance to a dictionary item instance corresponding to the type of the value to be operated; Setting the value handle instance; and performing a value operation by the value handle instance, depending on the nature of the operation, either accessing only the value handle instance or tracing a pointer to a dictionary item instance of the value handle instance, Each step of referencing an item instance or tracing a pointer to a function jump table of a dictionary item instance and calling a function corresponding to the operation prepared in the function jump table; and Checking whether the function has a value internal expression holding unit. If not, preparing a value internal expression holding unit, and the value handle instance holds a pointer to the value internal expression holding unit. And accessing the value internal expression holding unit. 7. The method of dynamically allocating type information in a data structure definition using an abstract syntax notation according to claim 6, further comprising checking whether or not to perform a value operation on an existing value handle instance, and performing the value operation. Or creating a new value handle instance.

【0009】本発明の抽象構文記法を用いたデータ構造
定義における型情報の動的割り当て方法は、プログラム
作成時にASN.1仕様に基づくデータ構造定義を与え
ることなく、プログラム実行時にそのデータ構造定義を
与えて動的に型を割り当てることを可能とするものであ
る。そのために、ASN.1型の基本種別の各々に対応
する関数ジャンプテーブルを持ち、プログラム実行時に
データ構造定義を読み込んで、そのデータ構造定義に基
づく型の各々と、ASN.1の組込み型の内ASN.1
記述に於いて修飾を必要とせず他から参照できる型の各
々に対応する辞書項目インスタンスを作成し、かつ、そ
れぞれにおける辞書項目インスタンスの型に応じた型補
助情報を作成する。
A method for dynamically allocating type information in a data structure definition using an abstract syntax notation according to the present invention is described in ASN. The present invention provides a data structure definition at the time of program execution without dynamically providing a data structure definition based on one specification, thereby enabling dynamic assignment of types. Therefore, ASN. 1 has a function jump table corresponding to each of the basic types, reads a data structure definition at the time of executing a program, and stores each of the types based on the data structure definition and the ASN. 1 of the ASN. 1
In the description, a dictionary item instance corresponding to each type that does not require modification and can be referred to from others is created, and type auxiliary information corresponding to the type of the dictionary item instance in each is created.

【0010】特に、構造型の場合、型補助情報として、
その構造型の構成要素の各々を値ハンドルインスタンス
に対応付けて、その値ハンドルインスタンスの並びを保
持する構造要素を示す情報を設定すると共に、各辞書項
目インスタンスが対応する型補助情報をポインタで指す
ように設定する。そして、それら辞書項目インスタンス
へのポインタを保持する型辞書インスタンスを作成し、
データ構造定義に基づくデータ型あるいはASN.1組
み込み型の内 ASN.1記述において修飾を必要とせ
ず他から参照できる型の値を操作する際に、前準備とし
て、値ハンドルインスタンスを作成する。次に、この値
ハンドルインスタンスで操作する値の型に対応する辞書
項目インスタンスを指すポインタを、型辞書インスタン
スから得、この値ハンドルインスタンスに設定する。実
際にデータ型の値の操作を行う場合には、操作の性質に
より、値ハンドルインスタンスへのアクセスのみを行う
場合と、値ハンドルインスタンスが持つ辞書項目インス
タンスへのポインタを辿り、辞書項目インスタンスの参
照のみ行う場合と、辞書項目インスタンスが持つ関数ジ
ャンプテーブルへのポインタを辿り、その関数ジャンプ
テーブルに用意されているその操作に対応する関数を呼
び出す場合があり、関数ジャンプテーブルに用意されて
いる関数は、必要に応じ、型に応じた値内部表現保持部
を用意し、特に、構造型の場合は、値内部表現保持部へ
型補助情報にある値ハンドルインスタンス の並びを複
製し、値ハンドルインスタンスがその値内部表現保持部
へのポインタを保持するように設定し、操作に対応する
値を値内部表現保持部に設定する。
In particular, in the case of a structural type, as type auxiliary information,
Each component of the structural type is associated with a value handle instance, information indicating a structural element holding the sequence of the value handle instances is set, and each dictionary item instance points to a corresponding type auxiliary information by a pointer. Set as follows. Then, create a type dictionary instance that holds pointers to those dictionary item instances,
A data type or ASN. ASN.1 of the built-in type When manipulating a value of a type that does not require qualification in one description and can be referenced by others, a value handle instance is created as preparation. Next, a pointer to a dictionary item instance corresponding to the value type operated by the value handle instance is obtained from the type dictionary instance, and is set in the value handle instance. Depending on the nature of the operation, when actually operating on the value of the data type, access to only the value handle instance may be performed, or the pointer to the dictionary item instance of the value handle instance may be traced to refer to the dictionary item instance. In some cases, the pointer to the function jump table of the dictionary item instance may be followed, and the function corresponding to the operation prepared in the function jump table may be called. If necessary, prepare a value internal representation holding unit corresponding to the type, especially for structured types, copy the value handle instance list in the type auxiliary information to the value internal expression holding unit, and It is set to hold the pointer to the value internal representation storage unit, and the value corresponding to the operation is stored in the value internal representation storage. Set to the holding part.

【0011】このことにより、プログラム実行時にデー
タ構造定義を与えて動的に型を割り当てることができ、
プログラム作成時にASN.1型を特定しない汎用的な
処理を記述することによって応用プログラムの作成がで
き、プログラマの負担が軽減される。また、型が何であ
るかをキーとして型情報が辞書化されて保持されるた
め、割り当てる型をデータとして取り扱うことができ
る。
[0011] Thereby, a type can be dynamically assigned by giving a data structure definition at the time of program execution,
ASN. By describing general-purpose processing that does not specify type 1, an application program can be created, and the burden on the programmer is reduced. Further, since the type information is dictionary-stored using the type as a key, the type to be assigned can be handled as data.

【0012】[0012]

【発明の実施の形態】図1は本発明の実施形態を示すブ
ロック図である。本発明の抽象構文記法を用いたデータ
構造定義における型情報の動的割り当て方法は、図に示
すように、型辞書インスタンス1、辞書項目インスタン
ス2、型補助情報3、値ハンドルインスタンス4、関数
ジャンプテーブル5、値内部表現保持部6および「AS
N.1仕様」に準拠して記述された データ構造定義7
により実現される。ここでは、プログラムの記述にC+
+言語を用いるものとし、C++は、クラスインスタン
スモデルに基づいたオブジェクト指向言語であることか
ら、クラス定義として、型辞書クラス11、辞書項目ク
ラス12、値ハンドルクラス13を持つものとする。
FIG. 1 is a block diagram showing an embodiment of the present invention. The method for dynamically allocating type information in a data structure definition using the abstract syntax notation according to the present invention is, as shown in the figure, a type dictionary instance 1, a dictionary item instance 2, a type auxiliary information 3, a value handle instance 4, a function jump. Table 5, value internal expression holding unit 6, and "AS
N. Data Structure Definition 7 described in conformance with “1 Specification”
Is realized by: Here, C +
+++ language is used. Since C ++ is an object-oriented language based on a class instance model, it is assumed that it has a type dictionary class 11, a dictionary item class 12, and a value handle class 13 as class definitions.

【0013】前記ASN.1仕様に準拠して記述された
データ構造定義7は、コンピュータプログラム実行中に
読み込まれ、型辞書インスタンス1と辞書項目インスタ
ンス2が作成される。辞書項目インスタンス2は、デー
タ構造定義7に基づく型のおのおのと、ASN.1組み
込み型の内ASN.1記述に於いて修飾を必要とせず他
から参照できる型のおのおのに対応して作成される。辞
書項目インスタンス2は、データ構造定義読み込み時に
割り当て可能なデータ型毎に生成され、内容として、関
数ジャンプテーブル5へのポインタと型補助情報3への
ポインタ、そして型基本情報21を持つ。型辞書インス
タンス1は、辞書項目インスタンス2へのポインタを保
持し、名称他により、辞書項目インスタンス2を検索す
る機能を提供するものである。型辞書インスタンス1
は、辞書項目インスタンス同様、データ構造定義読み込
み時に生成される。値ハンドルインスタンス4は、AS
N.1値をコンピュータプログラム上で取り扱うための
値ハンドルクラス13のインスタンスである。コンピュ
ータプログラム上では必要に応じこのインスタンスを作
成する。値ハンドルインスタンス4は、作成されただけ
では、データ型は与えられていない。値操作の前に、辞
書インスタンス(辞書項目インスタンス2の集合)の検
索を行い、辞書項目インスタンス2へのポインタが設定
されなければならない。この辞書項目インスタンス2へ
のポインタ設定がASN.1型の割り当てに相当する。
値ハンドルインスタンス4には、値を操作するための値
操作関数が、特定の型によらず網羅的に用意されてい
る。値ハンドルインスタンス4に用意された値操作関数
の幾つかは、最終的に関数ジャンプテーブル5に用意さ
れたそれぞれの関数を呼び出す。
The ASN. The data structure definition 7 described according to the specification 1 is read during execution of the computer program, and a type dictionary instance 1 and a dictionary item instance 2 are created. The dictionary entry instance 2 is composed of each of the types based on the data structure definition 7 and the ASN. 1 built-in type ASN. In one description, it is created corresponding to each of the types that can be referenced from others without requiring modification. The dictionary item instance 2 is generated for each data type that can be assigned at the time of reading the data structure definition, and has as its contents a pointer to the function jump table 5, a pointer to the type auxiliary information 3, and type basic information 21. The type dictionary instance 1 holds a pointer to the dictionary item instance 2 and provides a function of searching the dictionary item instance 2 by name or the like. Type dictionary instance 1
Is generated when the data structure definition is read, like the dictionary item instance. Value handle instance 4 is AS
N. 1 is an instance of the value handle class 13 for handling a value on a computer program. This instance is created as needed on the computer program. The value handle instance 4 is simply created and has no data type. Prior to value manipulation, a search for a dictionary instance (a set of dictionary item instances 2) must be performed, and a pointer to dictionary item instance 2 must be set. The pointer setting to this dictionary item instance 2 is ASN. This corresponds to a type 1 assignment.
In the value handle instance 4, a value manipulation function for manipulating a value is comprehensively prepared regardless of a specific type. Some of the value manipulation functions prepared in the value handle instance 4 call the respective functions prepared in the function jump table 5 finally.

【0014】関数ジャンプテーブル5は、ASN.1型
の基本種別毎に用意される。ASN.1型の基本種別の
選択は実装にまかされる。この実装による選択の例を、
図14に(リスト1)として掲示してある。各関数ジャ
ンプテーブル5の関数種別の並びは共通である。各関数
は、データ構造定義とは無関係にあらかじめASN.1
型基本種別に応じて用意される。用意される関数種別は
実装にまかされる。用意される関数種別の例を図15に
(リスト2)として掲示してある。値内部表現保持部6
は、ASN.1型基本種別に応じ形態が異なる。取り扱
いは関数ジャンプテーブル5に連結された関数が行う。
The function jump table 5 stores the ASN. It is prepared for each type 1 basic type. ASN. The choice of type 1 basic type is left to the implementation. An example of the choice made by this implementation is:
This is shown as (List 1) in FIG. The order of the function types in each function jump table 5 is common. Each function is set in advance in the ASN. 1
It is prepared according to the type basic type. The prepared function type is left to the implementation. An example of the prepared function type is shown in FIG. 15 as (List 2). Value internal expression holding unit 6
Is ASN. The form differs depending on the type 1 basic type. The handling is performed by the function linked to the function jump table 5.

【0015】図2、図3は、本発明の抽象構文記法を用
いたデータ構造定義における型情報の動的割り当て方法
を実現するための手順をフローチャートで示したもので
ある。以下、図2、図3に示すフローチャートを参照し
ながら図1に示す本発明実施形態の動作手順につき説明
する。まず、ASN.1仕様に準拠して記述されたデー
タ構造の操作を行うオブジェクト指向言語、例えば、C
++によりプログラミングを行う(ステップS21)。
そして、そのプログラムをコンパイルして実行プログラ
ムを作成する(ステップS22、S23)。次に作成し
た実行プログラムを実行する(ステップS24)。実行
プログラムは、ASN.1仕様に準拠して記述されたデ
ータ構造定義を読み込み(ステップS25)、データ構
造定義に基づく型の各々と、ASN.1の組込み型の内
ASN.1記述において修飾を必要とせず、他から参照
できる型の各々に対応する辞書項目インスタンス2を作
成し、おのおのの辞書項目インスタンス2の型に応じた
型補助情報3を作成し、特に、構造型の場合、型補助情
報として、その構造型の構成要素の各々を値ハンドルイ
ンスタンス4に対応付けて、その値ハンドルインスタン
ス4の並びを保 持する構造要素を示す情報を設定する
(ステップS26)。それら辞書項目インスタンス4の
全てを保持する型辞書インスタンス1を作成する(ステ
ップS27)。
FIG. 2 and FIG. 3 are flowcharts showing procedures for realizing a method for dynamically allocating type information in a data structure definition using the abstract syntax notation according to the present invention. Hereinafter, the operation procedure of the embodiment of the present invention shown in FIG. 1 will be described with reference to the flowcharts shown in FIGS. First, ASN. An object-oriented language that operates on a data structure described in conformance with the 1 specification, for example, C
++ is programmed (step S21).
Then, the program is compiled to create an execution program (steps S22 and S23). Next, the created execution program is executed (step S24). The execution program is ASN. 1 is read (step S25), and each of the types based on the data structure definition is read from the ASN. 1 of the ASN. 1. A dictionary item instance 2 corresponding to each type that does not require modification in one description and can be referred to from others is created, and type auxiliary information 3 corresponding to the type of each dictionary item instance 2 is created. In this case, as the type auxiliary information, each component of the structural type is associated with the value handle instance 4, and information indicating a structural element that holds the arrangement of the value handle instances 4 is set (step S26). A type dictionary instance 1 holding all of the dictionary item instances 4 is created (step S27).

【0016】データ構造定義に基づくデータ型あるいは
ASN.1組み込み型の内 ASN.1記述において修
飾を必要とせず他から参照できる型の値を操作する前準
備として、値ハンドルインスタンス4を作成し、次に、
この値ハンドルインスタンス4で操作する値の型に対応
する辞書項目インスタンス2を指すポインタを、型辞書
インスタンス1から得、この値ハンドルインスタンス4
に設定する(ステップS31)。そして、この値ハンド
ルインスタンス4に対し値操作を行う。値の操作に対す
る処理手順には、値ハンドルインスタンス4にアクセス
するだけのもの(ステップS35)、値ハンドルインス
タンス4が持つ辞書項目インスタンス2へのポインタを
辿り、辞書項目インスタンス2にアクセスするもの(ス
テップS34)、値ハンドルインスタンス2が持つ辞書
項目インスタンス2へのポインタを辿り、更に、関数ジ
ャンプテーブル5へのポインタを辿り、その関数ジャン
プテーブル5に用意されている、操作に対応する関数を
呼び出すもの(ステップS33)がある。
A data type or ASN. ASN.1 of the built-in type In preparation for manipulating a value of a type that does not require qualification in one description and can be referenced from another, create a value handle instance 4 and then
A pointer to the dictionary item instance 2 corresponding to the value type operated by the value handle instance 4 is obtained from the type dictionary instance 1, and the value handle instance 4
Is set (step S31). Then, a value operation is performed on the value handle instance 4. The processing procedure for the value operation includes accessing only the value handle instance 4 (step S35) and tracing the pointer to the dictionary item instance 2 of the value handle instance 4 to access the dictionary item instance 2 (step S35). S34) tracing a pointer to the dictionary item instance 2 of the value handle instance 2, further tracing a pointer to the function jump table 5, and calling a function corresponding to the operation prepared in the function jump table 5 (Step S33).

【0017】関数ジャンプテーブル5に用意された関数
は、値内部表現保持部6があるか否かを調べ(ステップ
S36)、無い場合は、値内部表現保持部6を用意し、
値ハンドルインスタンス4が、値内部表現保持部6への
ポインタを保持するように設定する(ステップS3
7)。関数ジャンプテーブル5に用意された関数は、そ
の後、値内部表現保持部6へアクセスする(ステップS
38)。既にある値ハンドルインスタンス4に対して値
操作を行う場合(ステップS39)は、上述したステッ
プS32〜S38に至る各処理を繰り返し、新たな値ハ
ンドルインスタンス4を作成する場合(ステップS4
0)は、上述したステップS31〜S39に従う値ハン
ドルインスタンス4の作成を繰り返す。
The function prepared in the function jump table 5 checks whether or not there is a value internal expression holding unit 6 (step S36). If not, the value internal expression holding unit 6 is prepared.
The value handle instance 4 is set so as to hold a pointer to the value internal expression holding unit 6 (step S3).
7). The function prepared in the function jump table 5 then accesses the value internal expression holding unit 6 (step S
38). When a value operation is performed on an existing value handle instance 4 (step S39), the above-described processes from steps S32 to S38 are repeated to create a new value handle instance 4 (step S4).
0) repeats the creation of the value handle instance 4 according to steps S31 to S39 described above.

【0018】図4〜図13は、本発明実施形態の具体的
な動作を説明するために引用した図であり、これらを参
照しながら具体的なASN.1記述と本発明により用意
される応用プログラムでの手順を追って詳細に説明す
る。なお、以下の説明で出現するC++のクラス名、関
数名、型名等の名称は単に一例であり、本発明の要旨を
制限するものではない。
FIGS. 4 to 13 are drawings cited for describing a specific operation of the embodiment of the present invention, and a specific ASN. One description and a procedure in an application program prepared by the present invention will be described in detail. It should be noted that names such as C ++ class names, function names, and type names that appear in the following description are merely examples, and do not limit the gist of the present invention.

【0019】図4は辞書作成例を示す図であり、辞書項
目インスタンス(図1に示す2)として、ASN.1仕
様に準拠して記述されたデータ構造記述7の内容が設定
された状態を示している。図中、図1と同一番号の付さ
れたブロックは図1のそれと同じとする。応用プログラ
ム10上のAdg_dictは、辞書機能を持った型辞書クラス
である。dicは型辞書インスタンスである。dic.Read("E
x1.ats")は、型辞書インスタンス1に辞書情報の読み込
みを命じている。本発明実施形態において、データ構造
定義記述は、一旦辞書ファイルに変換される。"Ex1.at
s"は、辞書ファイル名である。辞書ファイル生成手続き
および 辞書ファイル形式は本発明の主旨とは直接関係
しないためここでは詳細を述べない。
FIG. 4 is a diagram showing an example of creating a dictionary. As a dictionary item instance (2 shown in FIG. 1), ASN. 1 shows a state in which the contents of the data structure description 7 described according to the specification 1 are set. In the figure, blocks denoted by the same reference numerals as those in FIG. 1 are the same as those in FIG. Adg_dict on the application program 10 is a type dictionary class having a dictionary function. dic is a type dictionary instance. dic.Read ("E
x1.ats ") instructs the type dictionary instance 1 to read dictionary information. In the embodiment of the present invention, the data structure definition description is once converted into a dictionary file." Ex1.at
"s" is a dictionary file name. The dictionary file generation procedure and the dictionary file format are not directly related to the gist of the present invention, and thus will not be described in detail here.

【0020】図4では、辞書項目インスタンス2とし
て、Ex1.PersonalRecord(241)とEx1.YEAR(24
2)およびASN.1組み込み型のINTEGER(243)
を表示している。この他にEx1.WhenAndWhereの定義、お
よびASN.1組み込み型の内ASN.1記述におい
て、修飾の必要がなく他から参照可能なBOOLEANやEXTER
NALなどの型の辞書項目インスタンス2が生成されてい
る。Ex1.PersonalRecordの辞書項目インスタンス241
は、Ex1.PersonalRecordがSequenceTypeの派生なので、
SequenceType用の関数ジャンプテーブル5(544)へ
のポインタを持つ。 また、構造内部の要素情報を型補
助情報345として持っている。Ex1.YEARの辞書項目イ
ンスタンス242はIntegerTypeの派生であるので、 In
tegerType用の関数ジャンプテーブル5(546)への
ポインタを持つ。ASN.1組み込み型のINTEGERの辞
書項目インスタンス243もまた、IntegerType用の関
数ジャンプテーブル5(546)へのポインタを持つ。
In FIG. 4, Ex1.PersonalRecord (241) and Ex1.YEAR (24)
2) and ASN. 1 Built-in type INTEGER (243)
Is displayed. In addition to this, the definition of Ex1.WhenAndWhere and ASN. 1 built-in type ASN. In one description, BOOLEAN or EXTER that can be referenced from other without the need for qualification
A dictionary item instance 2 of a type such as NAL has been generated. Ex1.PersonalRecord dictionary item instance 241
Since Ex1.PersonalRecord is derived from SequenceType,
It has a pointer to the function jump table 5 (544) for SequenceType. Further, it has element information inside the structure as type auxiliary information 345. Since the dictionary item instance 242 of Ex1.YEAR is a derivative of IntegerType,
It has a pointer to the function jump table 5 (546) for tegerType. ASN. The dictionary item instance 243 of 1 built-in type INTEGER also has a pointer to the function jump table 5 (546) for IntegerType.

【0021】SequenceType用関数ジャンプテーブル5
(544)には、領域確保関数としてSequenceType用の
領域確保関数が設定されているが、int値設定関数や文
字列値設定関数としてはエラー処置関数が設定されてい
る。SequenceTypeが割り当てられた値ハンドルインスタ
ンス(図1における4)に対してint値設定操作(SetInt
Val(int)呼び出し) を行うと最終的にこのエラー処置関
数が動作する。IntegerType用関数ジャンプテーブル5
(546)には領域確保関数としてIntegerType用の領
域確保関数が設定されている。これは、SequenceType用
の領域確保関数とは異なる動作を行うものである。ま
た、int値設定関数としてint値 IntegerTypeの値として
設定する関数が設定されている。IntegerTypeが割り当
てられた値ハンドルインスタンス(図1における4)に
対してint値設定操作(SetIntVal(int)呼び出し) を行
うと最終的にint値設定関数が動作する。
SequenceType function jump table 5
In (544), an area allocation function for SequenceType is set as an area allocation function, but an error handling function is set as an int value setting function or a character string value setting function. Int value setting operation (SetInt) for the value handle instance (4 in FIG. 1) to which SequenceType is assigned
Val (int) call), this error handling function will eventually work. Function jump table 5 for IntegerType
In (546), an area securing function for IntegerType is set as the area securing function. This performs an operation different from that of the area securing function for SequenceType. In addition, a function to set an int value IntegerType is set as an int value setting function. When an int value setting operation (SetIntVal (int) call) is performed on the value handle instance (4 in FIG. 1) to which the IntegerType is assigned, the int value setting function finally operates.

【0022】図5は、型割り当ての例を示す図であり、
値ハンドルインスタンス(図1における4)にASN.
1型を割り当てた状態、即ち、辞書項目インスタンス
(図1における2)のポインタが設定された状態を示し
ている。図中、図1、図4と同一番号の付されたブロッ
クは、それぞれ図1、図4のそれと同じとする。応用プ
ログラム10上のAdg_dataは、ASN.1値を表す値ハ
ンドルクラス13であり、dataはそのインスタンスであ
る。Adg_data data;を宣言した時点では、辞書項目イン
スタンス2への結び付きはなく、ASN.1型が未割り
当ての状態である。dict.Assign(data,"Ex1.YEAR")は、
ASN.1型を割り当てる手続きである。ここでは、型
辞書インスタンスdict に対し、値ハンドルインスタン
スdataにASN.1型Ex1.YEARを割り当てるように要求
している。型辞書クラス11は、この要求に対して辞書
項目インスタンス2を検索し、指定ASN.1型の情報
を発見すると、辞書項目インスタンス2へのポインタを
値ハンドルインスタンス4に設定する。
FIG. 5 is a diagram showing an example of type assignment.
The value handle instance (4 in FIG. 1) has the ASN.
This shows a state where type 1 is assigned, that is, a state where the pointer of the dictionary item instance (2 in FIG. 1) is set. In the drawing, blocks denoted by the same reference numerals as those in FIGS. 1 and 4 are the same as those in FIGS. 1 and 4, respectively. Adg_data on the application program 10 is ASN. A value handle class 13 representing one value, and data is an instance thereof. At the time of declaring Adg_data data ;, there is no connection to dictionary item instance 2 and ASN. Type 1 is unassigned. dict.Assign (data, "Ex1.YEAR")
ASN. This is the procedure for assigning type 1. Here, for the type dictionary instance dict, ASN. Requests that Type 1 Ex1.YEAR be allocated. The type dictionary class 11 searches the dictionary item instance 2 in response to the request, and specifies the designated ASN. When the type 1 information is found, the pointer to the dictionary item instance 2 is set to the value handle instance 4.

【0023】図6は値操作の例として型特定の値を設定
する例を示す図であり、型の割り当てられた値ハンドル
インスタンス4に対し、割り当てられたASN.1型に
特定される値を設定する仕組みが示されている。なお、
ここではEx1.YEAR以外の型については省略してある。図
中、図1、図4に示すブロックと同一番号の付されたブ
ロックは、それぞれ、図1、図4に示すそれと同じとす
る。応用プログラム10上のdata.SetIntVal(5)は、値
ハンドルインスタンスに対し int値“5”を設定する要
求である。値ハンドルインスタンス4に対するSetIntVa
l()関数は、まず、値ハンドルインスタンス4上にある
辞書項目インスタンス2へのポインタ61を調べ、次に
辞書項目インスタンス2上の関数ジャンプテーブル5の
ポインタ62を調べ、関数ジャンプテーブル5内のint
値設定関数5462へのポインタ63が指す関数を呼び
出す。呼び出されたIntegerType用int値設定関数546
2は、値ハンドルインスタンス4に IntegerType用の値
内部表現保持部6(63)へのポインタ65が設定され
ているか否かを調べ、ここでポインタが設定されていな
ければ、IntegerType用領域確保関数5461を呼び出
す。
FIG. 6 is a diagram showing an example of setting a type-specific value as an example of a value operation. In FIG. 6, an ASN. A mechanism for setting a value specified for type 1 is shown. In addition,
Here, types other than Ex1.YEAR are omitted. In the figure, blocks denoted by the same numbers as the blocks shown in FIGS. 1 and 4 are the same as those shown in FIGS. 1 and 4, respectively. Data.SetIntVal (5) on the application program 10 is a request for setting an int value “5” to the value handle instance. SetIntVa for value handle instance 4
The l () function first checks the pointer 61 to the dictionary item instance 2 on the value handle instance 4, then checks the pointer 62 of the function jump table 5 on the dictionary item instance 2, int
The function indicated by the pointer 63 to the value setting function 5462 is called. Called IntegerType int value setting function 546
2 checks whether the pointer 65 to the value internal representation holding unit 6 (63) for IntegerType is set in the value handle instance 4, and if the pointer is not set here, the area reservation function 5461 for IntegerType. Call.

【0024】IntegerType用領域確保関数5461は、I
ntegerType用値内部表現保持部63で必要とする領域を
確保し、値ハンドルインスタンス4の値内部表現保持部
ポインタ65を設定する。予め値内部表現保持部6がポ
イントされていた場合は、IntegerType用領域確保関数
5461の呼び出しはない。その後、IntegerType用int
値設定関数5462は、内部表現保持部ポインタ65が
示す値内部表現保持部6が持つInteger用内部表現保持
領域にSetIntValの引数、即ち、ここでは“5”をセッ
トする。IntegerType以外の型が割り当てられていても
各型用int値設定関数へのポインタが指す関数を呼び出
すまでの手続き(上述した61,62,63)は同じで
ある。但し、型毎のint値設定関数の動作は異なってお
り、BOOLEAN用であれば“0”なら“偽”を、“0”以
外なら“真”をセットし、REAL用であれば、内部表現で
あるdoubleに変換した上で値をセットする。構造型や文
字列型はエラーの処置(エラー処置関数5463の呼び
出し)を行う。
The area allocation function 5461 for IntegerType
The necessary area is secured in the value internal expression holding unit 63 for ntegerType, and the value internal expression holding unit pointer 65 of the value handle instance 4 is set. If the value internal expression holding unit 6 is pointed in advance, there is no call of the IntegerType area securing function 5461. Then int for IntegerType
The value setting function 5462 sets the argument of SetIntVal, that is, “5” in this case, to the internal representation storage area for Integer that the value internal representation storage unit 6 indicated by the internal representation storage pointer 65 has. Even if a type other than IntegerType is assigned, the procedure (61, 62, 63 described above) up to the invocation of the function indicated by the pointer to the int value setting function for each type is the same. However, the operation of the int value setting function differs for each type. For BOOLEAN, set “false” if “0”, set “true” for other than “0”, and for REAL, set the internal representation Set to a value after converting to double. The structured type and the character string type perform error handling (calling the error handling function 5463).

【0025】図7は、値設定以外の値操作例として、値
をエンコードする例を示す図であり、既にASN.1値
の設定されている値ハンドルインスタンスの値を利用者
領域にエンコードする仕組みが示されている。図中、図
1、図4に示すブロックと同一番号の付されたブロック
は、それぞれ、図1、図4に示すそれと同じとする。応
用プログラム10上のdata.EncodeTo(buf,buf_len)は、
dataの値を利用者指定のバッファbuf(70)上にエン
コードする要求である。buf_lenはバッファの容量を示
す。値ハンドルインスタンス4に対するEncodeTo()関数
は、まず、値ハンドルインスタンス4上にある 辞書項
目インスタンス2へのポインタ71を調べ、次に、辞書
項目インスタンス2上の関数ジャンプテーブル5のポイ
ンタ72を調べ、 関数ジャンプテーブル5内のencode
関数5464へのポインタ73が指す関数を呼び出す。
呼び出されたIntegerType用encode関数5464は、値
ハンドルインスタンス4に IntegerType用の値内部表現
保持部6(63)へのポインタ75が設定されているか
否かを調べ、ポインタが設定されていれば、値内部表現
保持部6(63)にある値をASN.1のエンコード方
式に従い利用者バッファ70上にエンコードする。Inte
gerType以外の型が割り当てられていても各型用encode
関数へのポインタ が指す関数を呼び出すまでの手続き
(上述した71,72,73)は同じである。 但し、
エンコード作業自体は型毎に異なっている。
FIG. 7 is a diagram showing an example of encoding a value as an example of a value operation other than the value setting. A mechanism for encoding a value of a value handle instance in which one value is set in a user area is shown. In the figure, blocks denoted by the same numbers as the blocks shown in FIGS. 1 and 4 are the same as those shown in FIGS. 1 and 4, respectively. Data.EncodeTo (buf, buf_len) on the application program 10 is
This is a request to encode the value of data into the buffer buf (70) specified by the user. buf_len indicates the capacity of the buffer. The EncodeTo () function for the value handle instance 4 first checks the pointer 71 to the dictionary item instance 2 on the value handle instance 4, and then checks the pointer 72 of the function jump table 5 on the dictionary item instance 2. Encode in function jump table 5
The function indicated by the pointer 73 to the function 5464 is called.
The called IntegerType encode function 5364 checks whether or not the pointer 75 to the value internal representation holding unit 6 (63) for IntegerType is set in the value handle instance 4, and if the pointer is set, the value The value in the internal expression holding unit 6 (63) is stored in the ASN. The encoding is performed on the user buffer 70 in accordance with the encoding method 1. Inte
Encode for each type even if a type other than gerType is assigned
The procedure (71, 72, 73 described above) up to the invocation of the function indicated by the pointer to the function is the same. However,
The encoding process itself differs for each type.

【0026】尚、全ての操作がASN.1基本型毎用意
される関数ジャンプテーブル5経由で行われるわけでは
ない。図8は、辞書項目インスタンスをアクセスするだ
けで終了する操作例を示す図である。図中、図1、図4
に示すブロックと同一番号の付されたブロックは、それ
ぞれ、図1、図4に示すそれと同じとする。図8におい
て、応用プログラム10上のdata.IsString()は、data
に文字列型が割り当てられているか否かを問い合わせる
手続きである。値ハンドルインスタンス4に対するIsSt
rig()関数は、まず、値ハンドルインスタンス4上にあ
る辞書項目インスタンス2へのポインタ81を調べ、次
に、辞書項目インスタンス2上の型基本情報211を調
べて、文字列型であれば“真”を、そうでなければ
“偽”を返して終了する。ここで関数ジャンプテーブル
5は使用しない。
Note that all operations are ASN. It is not performed via the function jump table 5 prepared for each basic type. FIG. 8 is a diagram illustrating an operation example in which the processing is terminated only by accessing the dictionary item instance. In the figures, FIGS. 1 and 4
Blocks given the same numbers as the blocks shown in FIG. 4 are the same as those shown in FIGS. In FIG. 8, data.IsString () on the application program 10 is data
This is a procedure for inquiring whether or not a character string type is assigned to. IsSt for value handle instance 4
The rig () function first checks the pointer 81 to the dictionary item instance 2 on the value handle instance 4, then checks the type basic information 211 on the dictionary item instance 2. Return "true", otherwise return "false" and exit. Here, the function jump table 5 is not used.

【0027】次に本発明を実装する際における構造型デ
ータの取り扱いにつき、図9〜図13を参照しながら説
明する。図9は、構造型定義と対応する辞書項目インス
タンスと型補助情報の内部情報構造を示している。図
中、図1、図4に示すブロックと同一番号の付されたブ
ロックは、それぞれ、図1、図4に示すそれと同じとす
る。図9において、構造型に関する型補助情報3は、構
造要素に関する情報、即ち、構造型用型補助情報311
(312)を持つ。構造型用型補助情報311(31
2)は、各構造要素の型に対応したASN.1型が割り
当てられた値ハンドルインスタンス4と同型ものが並ん
だものであり、構造型の値内部表現保持部6の雛型とな
る。ここでは、図面が繁雑になるのを避けるために関数
ジャンプテーブル5の記載を省略してあるが、これまで
の説明と同じく辞書項目インスタンス2からそれらはポ
イントされているものとする。
Next, handling of structured data when implementing the present invention will be described with reference to FIGS. FIG. 9 shows an internal information structure of the dictionary item instance corresponding to the structure type definition and the type auxiliary information. In the figure, blocks denoted by the same numbers as the blocks shown in FIGS. 1 and 4 are the same as those shown in FIGS. 1 and 4, respectively. In FIG. 9, the type auxiliary information 3 on the structural type is information on the structural element, that is, the type auxiliary information 311 for the structural type.
(312). Mold type auxiliary information 311 (31
2) is an ASN. Corresponding to the type of each structural element. The same type as the value handle instance 4 to which the type 1 is assigned is arranged, and serves as a template of the value type internal expression holding unit 6 of the structured type. Here, the description of the function jump table 5 is omitted to avoid complicating the drawing, but it is assumed that they are pointed to from the dictionary item instance 2 as in the description so far.

【0028】図9において、Ex1.PersonalRecordの型情
報からポイントされる構造型用型補助情報311は、Ex
1.PersonalRecordの要素の並びに沿って、name用の値ハ
ンドルインスタンス41、born用の値ハンドルインスタ
ンス42、 num-of-children用の値ハンドルインスタン
ス43を持っている。データ構造定義に示されるよう
に、nameはIA5Stringなのでname用値ハンドルインスタ
ンス41にはIA5String型が割り当てられており、IA5St
ringの辞書項目インスタンス244をポイントしてい
る。bornは、Ex1.WhenAndWhereなのでborn用値ハンドル
インスタンス42には Ex1.WhenAndWhere型が割り当て
られており、WhenAndWhereの 辞書項目インスタンス2
45をポイントしている。要素そのものも構造型である
が、他の2つの単純型と取り扱いは何ら変わらない。単
にポイントしている辞書項目インスタンス2が構造型の
ものとなっているだけである。num-of-childrenはINTEG
ERなのでnum-of-children用の値ハンドルインスタンス
43にはINTEGER型が割り当てられており、INTEGERの辞
書項目インスタンス243をポイントしている。これら
3つのいずれの値ハンドルインスタンス(41,42,
43)も値内部表現保持部6はポイントしておらず、最
終的にも値内部表現保持部6をポイントすることはな
い。これらは、Ex1.PersonalRecordの値内部表現保持部
6の内容の雛型となるものである。Ex1.WhenAndWhereの
型情報には、year用とplace用の値ハンドルインスタン
ス(それぞれ44,45)を持つ構造型用型補助情報3
12へのポインタが設定されている。
In FIG. 9, the structural type auxiliary information 311 pointed out from the type information of Ex1.PersonalRecord is Ex.
1. Along with the elements of the PersonalRecord, there is a value handle instance 41 for name, a value handle instance 42 for born, and a value handle instance 43 for num-of-children. As shown in the data structure definition, since the name is IA5String, the IA5String type is assigned to the value handle instance 41 for name, and IA5St
Points to the dictionary item instance 244 of the ring. Since born is Ex1.WhenAndWhere, the value handle instance 42 for born is assigned the Ex1.WhenAndWhere type, and the dictionary entry instance 2 of WhenAndWhere
It points to 45. The element itself is a structured type, but its handling is no different from the other two simple types. The only point is that the dictionary item instance 2 that is pointed to is of a structured type. num-of-children is INTEG
Since it is ER, the INTEGER type is assigned to the value handle instance 43 for num-of-children, and points to the dictionary item instance 243 of INTEGER. Any of these three value handle instances (41, 42,
Also in 43), the value internal expression holding unit 6 does not point, and the value internal expression holding unit 6 does not eventually point. These serve as a template for the contents of the value internal expression holding unit 6 of Ex1.PersonalRecord. In the type information of Ex1.WhenAndWhere, type auxiliary information for structural type 3 having value handle instances for year and place (44 and 45, respectively)
Pointer 12 is set.

【0029】図10〜図12を参照しながら構造型の要
素に値を設定する仕組みについて説明する。図10は、
Ex1.PersonalRecordが割り当てられた値ハンドルインス
タンスの構造要素"name"にアクセスするまでの過程を示
す図である。図中、図1、図4、図9に示すブロックと
同一番号の付されたブロックは、それぞれ、図1、図
4、図9に示すそれと同じとする。また、応用プログラ
ム10上のdata["name"]は要素名指定で要素にアクセス
するための記述である。関数としてはAg_data& Adg_dat
a::operator[](const char*) となっている。値ハンド
ルインスタンス4に対する[]オペレータ関数は、まず、
値ハンドルインスタンス4上にある辞書項目インスタン
ス2へのポインタ101を調べ、次に、型基本情報21
1から型が構造型であることを確認する。続いて、値ハ
ンドルインスタンス4の値内部表現保持部6へのポイン
タ102が設定されているか否かを調べる。設定されて
いない場合、辞書項目インスタンス2からポイント(1
03)される関数ジャンプテーブル5上の領域確保関数
へのポインタ104によってポイントされる構造型用の
領域確保関数5441を呼び出す。構造型用の領域確保
関数5441は、必要サイズの領域(図中、破線で囲ま
れた楕円A)を確保した上で、構造型用型補助情報31
1の値ハンドルインスタンス並びをコピーする(10
7)。 そして、この領域Aを値ハンドルインスタンス
4の内部表現保持部6(構造体用内部表現保持部61)
へのポインタ102が指すように設定する。構造型の内
部表現は、要素値の値ハンドルインスタンス4を並べた
ものになる。この時点で、各要素である値ハンドルイン
スタンス4は、それぞれASN.1型が割り当てられて
いるが、それぞれの値内部表現保持部6へのポインタは
設定されていない。即ち、値は設定されていない。その
後、[]オペレータは指定の要素名から、指定要素が何番
目の要素であるかを辞書項目インスタンス2の型補助情
報3上にある要素名テーブルを参照して決定し、指定要
素108を関数戻りとして戻る。即ち、data["name"]
は、値ハンドルインスタンスdata内のname要素そのもの
(108)を表す。
A mechanism for setting a value to a structural type element will be described with reference to FIGS. FIG.
It is a figure which shows the process until Ex1.PersonalRecord accesses the structural element "name" of the assigned value handle instance. In the figure, blocks denoted by the same reference numerals as those shown in FIGS. 1, 4, and 9 are the same as those shown in FIGS. 1, 4, and 9, respectively. Further, data ["name"] on the application program 10 is a description for accessing an element by designating the element name. Ag_data & Adg_dat as function
a :: operator [] (const char *) The [] operator function for value handle instance 4
The pointer 101 to the dictionary item instance 2 on the value handle instance 4 is checked.
From 1 confirm that the type is a structural type. Subsequently, it is determined whether or not the pointer 102 to the value internal expression holding unit 6 of the value handle instance 4 is set. If not set, point (1) from dictionary item instance 2
03) Call the area allocation function 5441 for the structural type pointed to by the pointer 104 to the area allocation function on the function jump table 5 to be executed. The structural type area securing function 5441 secures an area of a required size (an ellipse A surrounded by a broken line in the figure),
Copy the value handle instance list of 1 (10
7). Then, this area A is stored in the internal representation storage unit 6 of the value handle instance 4 (the internal representation storage unit 61 for the structure).
Is set so as to point to the pointer 102. The internal representation of the structured type is one in which the value handle instances 4 of the element values are arranged. At this point, the value handle instance 4, which is each element, has the ASN. Type 1 is assigned, but the pointer to each value internal expression holding unit 6 is not set. That is, no value is set. After that, the [] operator determines the order of the specified element from the specified element name by referring to the element name table on the type auxiliary information 3 of the dictionary item instance 2, and determines the specified element 108 as a function Return as return. That is, data ["name"]
Represents the name element itself (108) in the value handle instance data.

【0030】図11は、選択された構造型要素に対し値
を設定する仕組みを説明するために引用した図である。
図中、図1、図4、図9に示すブロックと同一番号の付
されたブロックは、それぞれ、図1、図4、図9に示す
それと同じとする。応用プログラム10上のSetStrVal
は文字列値を設定する関数である。また、値内部表現保
持部6の形態は異なるが、基本的な動作の流れはSetInt
Valと同じである。図10で説明したようにして得られ
る値ハンドルインスタンス4に対するSetStrVal()関数
は、まず、値ハンドルンスタンス4上にある辞書項目イ
ンスタンス2へのポインタ(111)を調べ、次に、型
情報上の関数ジャンプテーブル5のポインタ112を調
べ、関数ジャンプテーブル5内の文字列値設定関数への
ポインタ113が指す関数を呼び出す。呼び出されたIA
5String用文字列値設定関数5471は、値ハンドルイ
ンスタンス4に IA5String用の値内部表現保持部6(文
字列用内部表現保持部62)へのポインタ115が設定
されているかを調べ、ポインタが設定されていなけれ
ば、IA5String用領域確保関数5472を呼び出す。 I
A5String用領域確保関数5472は、IA5String用値内
部表現保持部6としての領域62を確保し、値ハンドル
インスタンス4の値内部表現保持部6へのポインタ11
5を設定する。予めこの値内部表現保持部6がポイント
されていた場合は、IA5String用領域確保関数5471
の呼び出しはない。その後、IA5String用文字列値設定
関数5471は、値内部表現保持部ポインタ115が示
す文字列用表現保持領域62が持つポインタに文字列デ
ータ用に可変長領域621を確保し、SetStrValの引数
をセットする。これら一連の動作は、対象となっている
値ハンドルインスタンス4が、単独のインスタンスであ
るか、構造型の要素であるかは無関係である。
FIG. 11 is a diagram cited for explaining a mechanism for setting a value for a selected structural element.
In the figure, blocks denoted by the same reference numerals as those shown in FIGS. 1, 4, and 9 are the same as those shown in FIGS. 1, 4, and 9, respectively. SetStrVal on application program 10
Is a function that sets a string value. Although the form of the value internal expression holding unit 6 is different, the basic operation flow is SetInt
Same as Val. The SetStrVal () function for the value handle instance 4 obtained as described with reference to FIG. 10 first checks the pointer (111) to the dictionary item instance 2 on the value handle instance 4, and then checks the type information The function checks the pointer 112 of the function jump table 5 and calls the function indicated by the pointer 113 to the character string value setting function in the function jump table 5. Called IA
The 5String character string value setting function 5471 checks whether the pointer 115 to the IA5String value internal expression holding unit 6 (character string internal expression holding unit 62) is set in the value handle instance 4 and the pointer is set. If not, the IA5String area reservation function 5472 is called. I
The A5String area allocation function 5472 allocates the area 62 as the IA5String value internal expression holding unit 6 and stores the pointer 11 to the value internal expression holding unit 6 of the value handle instance 4.
Set 5. If the value internal representation holding unit 6 has been pointed in advance, the IA5String area securing function 5471
There is no call. After that, the IA5String character string value setting function 5471 secures the variable length area 621 for character string data in the pointer of the character string expression holding area 62 indicated by the value internal expression holding pointer 115 and sets the argument of SetStrVal. I do. These series of operations are independent of whether the target value handle instance 4 is a single instance or a structural type element.

【0031】図12は、図11と同様に他の要素にも値
をセットした状態を説明するために引用した図である。
説明の重複を避ける意味で説明を省略するが、要素born
は構造型が割り当てられているものの動作の基本は全く
同じである。尚、図中、63、631はIntegerType内
部表現保持部、611は構造型内部表現保持部、621
は文字列用内部表現保持部である。
FIG. 12 is a diagram cited for explaining a state in which values are set in other elements as in FIG.
The explanation is omitted to avoid duplication of the explanation, but the element born
Although the structure type is assigned, the basic operation is exactly the same. In the figure, 63 and 631 are IntegerType internal expression holding units, 611 is a structural type internal expression holding unit, and 621
Is a character string internal expression holding unit.

【0032】次に、構造型要素アクセスのための補助機
構について図13を参照しながら説明する。図13は、
構造型要素に順次アクセスするための機構を示す概念図
である。応用プログラム10上のAdg_probeは、構造型
の要素に順次アクセスするためのクラスである。ここで
は、Ex1.PersonalRecord型が割り当てられ た値ハンド
ルインスタンスdataの要素を順次アクセスする。構造要
素順次アクセスインスタンス8は、構造型用値内部表現
保持部61へのポインタを持ち、別途、構造型用値内部
表現保持部61上に並んだ値ハンドルインスタンス4へ
の位置付けのためのインデックス値nilを持っている。
このインデックス値を順次変更することにより、構造型
用値内部表現保持部61上にならんだ値ハンドルインス
タンス4(41,42,43,44,45)を並びに沿
って順次アクセスできる。応用プログラム上のpb.Stand
by()は、先頭の一つ前の仮想的な位置に位置付けする関
数である。pb.Next()は位置を次の要素に移動するもの
である。Next()関数は最後の要素の次は“偽”を返すの
で、for文等の 判断に用いることができる。
Next, an auxiliary mechanism for accessing a structural element will be described with reference to FIG. FIG.
It is a conceptual diagram which shows the mechanism for accessing a structural type element sequentially. Adg_probe on the application program 10 is a class for sequentially accessing structural type elements. Here, the elements of the value handle instance data to which the Ex1.PersonalRecord type is assigned are sequentially accessed. The structure element sequential access instance 8 has a pointer to the structured type value internal expression holding unit 61, and separately has an index value for positioning the value handle instance 4 arranged on the structured type value internal expression holding unit 61. have nil.
By sequentially changing the index value, it is possible to sequentially access the value handle instances 4 (41, 42, 43, 44, 45) arranged on the structural type value internal expression holding unit 61 along the line. Pb.Stand on application program
by () is a function that positions the virtual position immediately before the head. pb.Next () moves the position to the next element. The Next () function returns “false” after the last element, so it can be used for judgments such as for statements.

【0033】参考のために図16にリスト3として掲示
した応用プログラムは、上述した機構の応用として、構
造型が割り当てられたASN.1値C++クラスインス
タンスを受け、内容が数値型の要素に対して整数値を、
文字列型の要素に対して文字列をインタラクティブに設
定することをネストした構造に対してリカーシブに行う
例である。
For reference, the application program shown as List 3 in FIG. 16 is an application of the above-described mechanism, and is an ASN. Receiving a one-valued C ++ class instance, and giving an integer value to an element whose content
This is an example of interactively setting a character string for a string type element, recursively for a nested structure.

【0034】以上説明のように本発明によれば、データ
構造定義がASN.1仕様に準拠して記述され、そのデ
ータ構造定義に基づくデータ構造の操作をオブジェクト
指向言語で記述された応用プログラムで行う際に、予め
ASN.1仕様に準拠したデータ構造の完全な記述を得
ない状態で応用プログラムの作成が可能となり、AS
N.1仕様に準拠したデータ構造定義 を予め作成され
た応用プログラム実行中に読み込んでASN.1の型辞
書インスタンスを作成し、応用プログラム実行中にAS
N.1の型辞書インスタンスを検索し、このことによ
り、データ構造を特定して値の操作を行うことのできる
抽象構文記法を用いたデータ構造定義における型情報の
動的割り当て方法を提供できる。
As described above, according to the present invention, the data structure definition is ASN. When the operation of the data structure based on the data structure definition is performed by an application program described in an object-oriented language, the ASN. Application programs can be created without obtaining a complete description of the data structure conforming to
N. The data structure definition conforming to the ASN.1 specification is read during execution of an application program created in advance, and the ASN. Create a type dictionary instance of AS1 and execute AS during application program execution.
N. A type dictionary instance can be searched for, and thereby, a method of dynamically allocating type information in a data structure definition using an abstract syntax notation that can specify a data structure and perform a value operation can be provided.

【0035】[0035]

【発明の効果】以上説明のように本発明によれば、プロ
グラム実行の過程に動的にデータ構造の特定が実現され
るため、プログラム作成時にASN.1の型情報を特定
せずにコンピュータプログラムが作成でき、プログラマ
の負担軽減がはかれる。また、型情報につき、型が何で
あるかをキーとして辞書化して保持しているため、割り
当てるべき型が何であるかをデータとして取り扱うこと
ができる。このことは、特に、OSI(開放型システム
間相互接続:Open System Interfac
e)のオブジェクト管理機能におけるオブジェクト識別
子によって型を指定する仕組みにおいて、コンピュータ
プログラムで動的に型を割り当てる必要がある際に用い
て顕著な効果が得られる。更に、コンピュータプログラ
ム作成において、ASN.1型を特定しない汎用の処理
を記述することによりコンピュータプログラムをコンパ
クトにできる。また、ASN.1の型情報をデータとし
て取り扱うことが出来る。その理由は、本発明における
辞書項目インスタンスおよび 値ハンドルインスタンス
はASN.1型情報を保持しているからである。これに
より、本発明をISO8824「ASN.1仕様」に準
拠した記述のパーザとして利用が可能となる。
As described above, according to the present invention, the data structure can be dynamically specified during the execution of a program. A computer program can be created without specifying the type information of the first type, and the burden on the programmer can be reduced. In addition, since the type information is stored as a dictionary of what the type is as a key, the type to be assigned can be handled as data. This is especially true for OSI (Open System Interconnection).
In the mechanism for specifying a type by an object identifier in the object management function of e), a remarkable effect can be obtained when the type needs to be dynamically assigned by a computer program. Further, in creating a computer program, ASN. A computer program can be made compact by describing general-purpose processing that does not specify type 1. Also, ASN. 1 type information can be handled as data. The reason is that the dictionary item instance and the value handle instance in the present invention are ASN. This is because type 1 information is held. As a result, the present invention can be used as a parser for description conforming to ISO8824 “ASN.1 specification”.

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

【図1】 本発明の実施形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】 本発明実施形態の動作手順をフローチャート
で示した図である。
FIG. 2 is a flowchart showing an operation procedure of the embodiment of the present invention.

【図3】 本発明実施形態の動作手順をフローチャート
で示した図である。
FIG. 3 is a flowchart showing an operation procedure of the embodiment of the present invention.

【図4】 本発明実施形態の動作を説明するために引用
した図であり、辞書項目インスタンスおよび型辞書イン
スタンスが構築された状態を示す図である。
FIG. 4 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a state in which a dictionary item instance and a type dictionary instance are constructed.

【図5】 本発明実施形態の動作を説明するために引用
した図であり、値ハンドルインスタンスにASN.1型
が割り当てられた状態を示す図である。
FIG. 5 is a diagram cited for explaining the operation of the embodiment of the present invention, in which an ASN. It is a figure showing the state where type 1 was allocated.

【図6】 本発明実施形態の動作を説明するために引用
した図であり、値ハンドルインスタンスに値が設定され
る仕組みを示す図である。
FIG. 6 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a mechanism for setting a value in a value handle instance.

【図7】 本発明実施形態の動作を説明するために引用
した図であり、値設定以外の操作例として、値ハンドル
インスタンスの値をエンコードする場合の動作概念を示
す図である。
FIG. 7 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram illustrating an operation concept when encoding the value of a value handle instance as an operation example other than the value setting.

【図8】 本発明実施形態の動作を説明するために引用
した図であり、関数ジャンプテーブルを介さない操作例
を示す図である。
FIG. 8 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing an operation example without interposing a function jump table.

【図9】 本発明実施形態の動作を説明するために引用
した図であり、構造型の辞書項目インスタンス形式を示
す図である。
FIG. 9 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a structured dictionary item instance format.

【図10】 本発明実施形態の動作を説明するために引
用した図であり、構造型の要素にアクセスする仕組みを
示す図である。
FIG. 10 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a mechanism for accessing a structural type element.

【図11】 本発明実施形態の動作を説明するために引
用した図であり、構造型の要素に値を設定する仕組みを
示す図である。
FIG. 11 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a mechanism for setting a value to a structural type element.

【図12】 本発明実施形態の動作を説明するために引
用した図であり、階層化した構造に値が設定された状態
を示す図である。
FIG. 12 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a state where values are set in a hierarchical structure.

【図13】 本発明実施形態の動作を説明するために引
用した図であり、構造型の要素に順次アクセスする機構
を示す図である。
FIG. 13 is a diagram cited for explaining the operation of the embodiment of the present invention, and is a diagram showing a mechanism for sequentially accessing structural type elements.

【図14】 本発明実施形態の動作を説明するために引
用した図であり、ASN.1型の基本種別をリスト1と
して掲示した図である。
FIG. 14 is a diagram cited for explaining the operation of the embodiment of the present invention; FIG. 2 is a diagram showing a basic type 1 as a list 1.

【図15】 本発明実施形態の動作を説明するために引
用した図であり、関数ジャンプテーブルに連結される関
数の例をリスト2として掲示した図である。
FIG. 15 is a diagram cited for describing the operation of the embodiment of the present invention, and is a diagram showing an example of a function connected to the function jump table as a list 2;

【図16】 本発明実施形態の動作を説明するために引
用した図であり、ASN.1構造型の数値/文字列要素
に値を設定する関数例のプログラム記述をリスト3とし
て掲示した図である。
FIG. 16 is a diagram cited for explaining the operation of the embodiment of the present invention; FIG. 9 is a diagram showing a program description of an example of a function for setting a value to a numeric / character string element of one structure type as a list 3.

【図17】 従来の手法による手順をフローチャートで
示す図である。
FIG. 17 is a flowchart showing a procedure according to a conventional technique.

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

1…型辞書インスタンス 2(241,242,243,244,245)…辞書
項目インスタンス 3(311,312)…型補助情報 4(41,42,43,44,45)…値ハンドルイン
スタンス 5(544,546,547)…関数ジャンプテーブル 6(61,62,63,611,621,631)…値
内部表現保持部 7…「ASN.1仕様」準拠のデータ構造定義 8…構造要素順次アクセスインスタンス 10…応用プログラム 11…型辞書クラス 12…辞書項目クラス 13…値ハンドルクラス 21(211)…型基本情報 61(62,71,72,81,82,101,10
2,103,111,113,115)…ポインタ 5461(5462,5463,5464)…関数
1 Type dictionary instance 2 (241, 242, 243, 244, 245) Dictionary item instance 3 (311, 312) Type auxiliary information 4 (41, 42, 43, 44, 45) Value handle instance 5 (544) , 546, 547) Function jump table 6 (61, 62, 63, 611, 621, 631) Value internal representation storage unit 7 Data structure definition based on "ASN.1 specification" 8 Structure element sequential access instance 10 ... Application program 11 ... Type dictionary class 12 ... Dictionary item class 13 ... Value handle class 21 (211) ... Type basic information 61 (62,71,72,81,82,101,10)
2, 103, 111, 113, 115) pointer 5461 (5462, 5463, 5464) function

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 データ構造定義がASN.1仕様に準拠
して記述され、そのデータ構造定義に基づくデータ構造
の操作をオブジェクト指向言語で記述されたプログラム
により実行するコンピュータシステムにおいて、前記デ
ータ構造定義に基づく型の基本種別ごとに関数ジャンプ
テーブルを用意し、コンパイル後のプログラム実行時に
前記データ構造定義を読み込んで、そのデータ構造定義
に基くそれぞれの型とASN.1の組込み型の内修飾を
必要とせず他から参照できるそれぞれの型に対し、前記
関数ジャンプテーブルへのポインタと少なくとも型基本
情報とを含む辞書項目インスタンスを作成すると共に、
これら辞書項目インスタンスへのポインタを保持する型
辞書インスタンスを作成し、前記データ構造を操作する
際、前記型辞書インスタンスから操作する値の型に対応
する前記辞書項目インスタンスを指すポインタを得、値
ハンドルインスタンスに設定することによって型情報を
特定し、必要に応じて前記関数ジャンプテーブルを参照
することによって、その型情報に対応して用意される関
数を呼び出し値の操作を行うことを特徴とする抽象構文
記法を用いたデータ構造定義における型情報の動的割り
当て方法。
The data structure definition is ASN. In a computer system which is described in conformity with one specification and executes a data structure operation based on the data structure definition by a program described in an object-oriented language, a function jump table is provided for each basic type of a type based on the data structure definition. Is prepared, the above-mentioned data structure definition is read at the time of execution of the program after compiling, and each type and ASN. A dictionary entry instance including a pointer to the function jump table and at least type basic information is created for each type of the built-in type that can be referred to by others without requiring internal modification,
When a type dictionary instance that holds pointers to these dictionary item instances is created and the data structure is operated, a pointer to the dictionary item instance corresponding to the value type to be operated is obtained from the type dictionary instance, and a value handle is obtained. Abstract: The method is characterized in that type information is specified by setting an instance, and a function prepared in accordance with the type information is operated on a call value by referring to the function jump table as necessary. A method for dynamically assigning type information in a data structure definition using syntax notation.
【請求項2】 前記辞書項目インスタンスを作成する
際、データ構造定義により宣言された型が構造型の場
合、型補助情報としてその構造型の構成要素のおのおの
を前記値ハンドルインスタンスに対応づけ、その値ハン
ドルインスタンスの並びを保持する構造要素補助情報を
設定することを特徴とする請求項1に記載の抽象構文記
法を用いたデータ構造定義における型情報の動的割り当
て方法。
2. When the dictionary item instance is created, if a type declared by a data structure definition is a structured type, each component of the structured type is associated with the value handle instance as type auxiliary information. 2. The method of dynamically assigning type information in a data structure definition using an abstract syntax notation according to claim 1, wherein structure element auxiliary information that holds a sequence of value handle instances is set.
【請求項3】 前記関数ジャンプテーブルに用意される
関数は、必要に応じて型に応じた値内部表現保持部を用
意し、この値内部表現保持部へ前記構造要素補助情報に
ある値ハンドルインスタンスの並びを複製し、前記値ハ
ンドルインスタンスがその値内部表現保持部へのポイン
タを保持するように設定し、操作に対応する値を前記値
内部表現保持部に設定することを特徴とする請求項2に
記載の抽象構文記法を用いたデータ構造定義における型
情報の動的割り当て方法。
3. The function prepared in the function jump table prepares a value internal expression holding unit corresponding to the type as needed, and stores the value handle instance in the structure element auxiliary information into the value internal expression holding unit. And setting the value handle instance to hold a pointer to the value internal expression holding unit, and setting a value corresponding to an operation in the value internal expression holding unit. 2. A method for dynamically assigning type information in a data structure definition using the abstract syntax notation described in 2.
【請求項4】 前記値ハンドルインスタンスによる値操
作において、その操作の性質に従い、値ハンドルインス
タンスへのアクセスのみ行うか、値ハンドルインスタン
スが持つ辞書項目インスタンスへのポインタを辿り、辞
書項目インスタンスの参照のみ行うか、あるいは辞書項
目インスタンスが持つ関数ジャンプテーブルへのポイン
タを辿り、その関数ジャンプテーブルに用意されている
その操作に対応する関数を呼び出すことを特徴とする請
求項1に記載の抽象構文記法を用いたデータ構造定義に
おける型情報の動的割り当て方法。
4. In a value operation using the value handle instance, only access to the value handle instance is performed or a pointer to a dictionary item instance of the value handle instance is traced, and only reference to the dictionary item instance is performed according to the nature of the operation. 2. The abstract syntax notation according to claim 1, wherein a function corresponding to the operation prepared in the function jump table is called by tracing a pointer to a function jump table of the dictionary item instance. Dynamic allocation method of type information in the used data structure definition.
【請求項5】 データ構造定義がASN.1仕様に準拠
して記述され、そのデータ構造定義に基づくデータ構造
の操作をオブジェクト指向言語で記述されたプログラム
により実行するコンピュータシステムにおいて、前記プ
ログラムをコンパイルして実行プログラムを作成するス
テップと、前記プログラムの実行においてデータ構造を
操作する際、前記ASN.1仕様に準拠して記述された
データ構造定義を読み込み、前記データ構造定義で宣言
された型の各々と、ASN.1の組み込み型の内AS
N.1記述において修飾を必要とせず他から参照できる
型の各々に対応する辞書項目インスタンスを作成すると
共に、これら辞書項目インスタンスへのポインタを保持
する型辞書インスタンスを作成するステップと、これら
辞書項目インスタンスの全てを保持する辞書インスタン
スを作成するステップと、値ハンドルインスタンスを生
成し、この値ハンドルインスタンスで生成され、操作す
る値の型に対応する辞書項目インスタンスを指すポイン
タを前記型情報辞書インスタンスから得て前記値ハンド
ルインスタンスに設定するステップと、前記値ハンドル
インスタンスによる値操作において、その操作の性質に
従い、値ハンドルインスタンスへのアクセスのみ行う
か、値ハンドルインスタンスが持つ辞書項目インスタン
スへのポインタを辿り、辞書項目インスタンスの参照の
み行うか、あるいは辞書項目インスタンスが持つ関数ジ
ャンプテーブルへのポインタを辿り、その関数ジャンプ
テーブルに用意されているその操作に対応する関数を呼
び出すそれぞれのステップと、前記関数を呼び出すに際
し、その関数に値内部表現保持部が存在するか否かを調
べるステップと、存在しない場合、値内部表現保持部を
用意して前記値ハンドルインスタンスがこの値内部表現
保持部へのポインタを保持するように設定し、この値内
部表現保持部をアクセスするステップとからなることを
特徴とする抽象構文記法を用いたデータ構造定義におけ
る型情報の動的割り当て方法。
5. The data structure definition is ASN. (1) a computer system which is described in conformity with a specification and executes an operation of a data structure based on a data structure definition by a program described in an object-oriented language, compiling the program and creating an execution program; When manipulating a data structure in the execution of a program, the ASN. 1 is read, and each of the types declared in the data structure definition is read from the ASN. AS of 1 built-in type
N. Creating a dictionary item instance corresponding to each of the types that can be referenced from others without requiring modification in one description, and creating a type dictionary instance holding a pointer to the dictionary item instance; Creating a dictionary instance that holds everything; generating a value handle instance; obtaining from the type information dictionary instance a pointer generated by the value handle instance and pointing to a dictionary item instance corresponding to the type of the value to be operated on Setting the value handle instance and, in the value operation by the value handle instance, performing only access to the value handle instance or tracing a pointer to a dictionary item instance of the value handle instance according to the nature of the operation; Each step of only referencing a book item instance or tracing a pointer to a function jump table of a dictionary item instance to call a function corresponding to the operation prepared in the function jump table, and calling the function A step of checking whether or not the function has a value internal expression holding unit. If not, preparing a value internal expression holding unit, and the value handle instance holds a pointer to the value internal expression holding unit. And a step of accessing the value internal representation holding unit. The method of dynamically assigning type information in a data structure definition using an abstract syntax notation.
【請求項6】 既にある値ハンドルインスタンスに対し
て値操作を行うか否かを調べ、前記値操作を行うか、あ
るいは新たな値ハンドルインスタンスを作成するステッ
プをさらに有することを特徴とする請求項5に記載の抽
象構文記法を用いたデータ構造定義における型情報の動
的割り当て方法。
6. The method according to claim 1, further comprising the step of checking whether or not to perform a value operation on an existing value handle instance, and performing the value operation or creating a new value handle instance. 5. A method of dynamically allocating type information in a data structure definition using the abstract syntax notation described in 5.
JP15070099A 1999-05-28 1999-05-28 Dynamic Assignment of Type Information in Data Structure Definition Using Abstract Syntax Notation Expired - Fee Related JP3531536B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15070099A JP3531536B2 (en) 1999-05-28 1999-05-28 Dynamic Assignment of Type Information in Data Structure Definition Using Abstract Syntax Notation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15070099A JP3531536B2 (en) 1999-05-28 1999-05-28 Dynamic Assignment of Type Information in Data Structure Definition Using Abstract Syntax Notation

Publications (2)

Publication Number Publication Date
JP2000339175A true JP2000339175A (en) 2000-12-08
JP3531536B2 JP3531536B2 (en) 2004-05-31

Family

ID=15502518

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15070099A Expired - Fee Related JP3531536B2 (en) 1999-05-28 1999-05-28 Dynamic Assignment of Type Information in Data Structure Definition Using Abstract Syntax Notation

Country Status (1)

Country Link
JP (1) JP3531536B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100488805B1 (en) * 2002-12-10 2005-05-12 한국전자통신연구원 System for data processing of ASN.1 editor and method thereof
CN101316241B (en) * 2008-07-02 2013-05-01 中兴通讯股份有限公司 TLV format processing method for communication data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0520081A (en) * 1991-07-11 1993-01-29 Nec Corp Individual description system for operation to be controlled
JPH05260129A (en) * 1992-03-12 1993-10-08 Nec Corp System for generating structure body for interface
JPH08263292A (en) * 1995-02-17 1996-10-11 Internatl Business Mach Corp <Ibm> Object-oriented programming interface and mapping method
JPH10198570A (en) * 1996-05-30 1998-07-31 Sun Microsyst Inc Method and system for loading class in read only memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0520081A (en) * 1991-07-11 1993-01-29 Nec Corp Individual description system for operation to be controlled
JPH05260129A (en) * 1992-03-12 1993-10-08 Nec Corp System for generating structure body for interface
JPH08263292A (en) * 1995-02-17 1996-10-11 Internatl Business Mach Corp <Ibm> Object-oriented programming interface and mapping method
JPH10198570A (en) * 1996-05-30 1998-07-31 Sun Microsyst Inc Method and system for loading class in read only memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100488805B1 (en) * 2002-12-10 2005-05-12 한국전자통신연구원 System for data processing of ASN.1 editor and method thereof
CN101316241B (en) * 2008-07-02 2013-05-01 中兴通讯股份有限公司 TLV format processing method for communication data

Also Published As

Publication number Publication date
JP3531536B2 (en) 2004-05-31

Similar Documents

Publication Publication Date Title
US5339435A (en) Heterogenous software configuration management apparatus
US5911074A (en) Process for manipulating data models used in software engineering
US6526455B1 (en) Object management method, apparatus and data structure
JP3437849B2 (en) Database management system and method for supporting object-oriented programming
US5832498A (en) Device for generating object-oriented interfaces for relational data bases and a process implemented by this device
US6226789B1 (en) Method and apparatus for data flow analysis
JP3138171B2 (en) How to download system features
US20030093420A1 (en) Method and system for retrieving sharable information using a hierarchically dependent directory structure
US5761672A (en) Distributed data base system
Dennis Modularity
JPH06266563A (en) Efficient router for support of plurality of simultaneous object versions
JPH08171482A (en) System for generating version of program
JP2001273347A (en) System and method for synthesizing semiconductor circuit and recording medium with synthesizing program recorded therein
JP2927180B2 (en) Debugging method of information processing program and debugger therefor
US5062039A (en) Sharing of workspaces in interactive processing using workspace name tables for linking of workspaces
US20060212881A1 (en) System and method for extending a programming language to include multiple dissimilar object systems
US5404531A (en) Method and apparatus for compiler processing on program related to data transfer and calculation, and method of managing memory
US6105073A (en) Method for packing/unpacking C operations to/from RPC compatible format using the RPC protocol to operate remotely with an object-oriented repository
JP2000339175A (en) Dynamic assigning method for type information in data structure definition using abstract syntax description method
JPH0340155A (en) Editing/analyzing device for protocol data unit
JP3019915B2 (en) Procedure call method
CA1200015A (en) Dynamic data base representation
Tenma et al. A system for generating language-oriented editors
KR0123247B1 (en) Real-time processing method of dbms
JPH0390933A (en) Automatic generating system for software program

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040210

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040223

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080312

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090312

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090312

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100312

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100312

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110312

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees