JP3544607B2 - Data structure-hypertext converter - Google Patents

Data structure-hypertext converter Download PDF

Info

Publication number
JP3544607B2
JP3544607B2 JP20889897A JP20889897A JP3544607B2 JP 3544607 B2 JP3544607 B2 JP 3544607B2 JP 20889897 A JP20889897 A JP 20889897A JP 20889897 A JP20889897 A JP 20889897A JP 3544607 B2 JP3544607 B2 JP 3544607B2
Authority
JP
Japan
Prior art keywords
data
hypertext
type
character string
html
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
JP20889897A
Other languages
Japanese (ja)
Other versions
JPH10116214A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP20889897A priority Critical patent/JP3544607B2/en
Publication of JPH10116214A publication Critical patent/JPH10116214A/en
Application granted granted Critical
Publication of JP3544607B2 publication Critical patent/JP3544607B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、任意のアプリケーション内の実行時内部データ構造を、例えば修正が容易な形式に変換する変換方式に係り、更に詳しくは内部データ構造をハイパーテキストに変換し、ハイパーテキストに対して用意されている一般的なツールを用いて修正などを容易に行うことができるようにする、データ構造−ハイパーテキスト変換装置に関する。
【0002】
【従来の技術と発明が解決しようとする課題】
従来において任意のアプリケーション内の実行時データ構造を修正する場合には、修正専用のツールが用いられていた。しかしこのようなツールはアプリケーション毎に開発する必要があり、汎用的でなく、またツールの開発には非常に大きなコストがかかっていた。アプリケーションに対応して保持されているデータを、何らかの方法で通常のテキストファイルの形式に変換して、ディスクなどに保存する方法は従来から存在していたが、このような保存方法においては、元のデータ構造は直接的には反映されておらず、保存されたテキストに対してデータ構造の修正などの直接的な操作を行うことは困難であるという問題点があった。
【0003】
一方本発明で用いられるハイパーテキストは、文書中の語句やそれにつけた見出し、更に見出しを集めた目次などが相互に関連づけられた文字データのファイルがその例であり、語句や見出しなどをたどる形でデータを引き出すことができ、効率的な情報検索に適している。文字以外にグラフィックスや音声、画像のデータも同じように扱うことができる。
【0004】
ハイパーテキストとして最も有名なものがHTML(ハイパーテキストマークアップランゲージ)である。このHTMLは、インターネット上での文書情報システムWWW(ワールドワイドウェブ)に用いられているテキストデータ形式である。
【0005】
このHTMLに代表されるハイパーテキストを対象としてその表示、修正、および配布などを行う一般的なツールは多数存在し、市販されている。一般にデータを表示する方法として、そのデータをハイパーテキストに変換して、ハイパーテキスト用のビュアを用いてデータを可視化するという簡単なインタフェースを構築する手段を用いることが行われているが、その場合にはもっぱら表示のみが行われ、データを復元することはできないという問題点があった。
【0006】
本発明は、データをハイパーテキストに変換するにあたって、その変換結果からデータが復元されることをあらかじめ想定して変換を行い、任意のアプリケーション内の実行時内部データ構造をデータと共にハイパーテキストとして表示すること、そのデータを他のシステムに転送することによって実行時内部データ構造を共有すること、そのデータに対する修正などの操作を行うことを可能とさせるデータ構造−ハイパーテキスト変換装置を提供することを目的とする。
【0007】
【課題を解決するための手段】
図1は本発明の原理構成ブロック図である。同図は、任意のアプリケーション内のデータを含む実行時内部データ構造をハイパーテキストに変換する、データ構造−ハイパーテキスト変換装置の原理構成を示すブロック図である。
【0008】
図1において、ハイパーテキスト変換手段1は例えばハイパーテキスト変換装置であり、例えばコンピュータシステムのCPU側に保持されている実行時内部データ構造を、そのデータと共にハイパーテキストに変換するものである。
【0009】
ハイパーテキスト記憶手段2は例えばハイパーテキスト保存装置としての外部記憶装置であり、実行時内部データ構造のハイパーテキストへの変換結果を記憶するものである。
【0010】
本発明のデータ構造−ハイパーテキスト変換装置においては、ハイパーテキスト記憶手段2に記憶されている任意のアプリケーション内のデータを含む実行時内部データ構造を復元可能とするために、例えばデータ構造復元手段とデータ生成手段とが更に備えられる。
【0011】
データ構造復元手段は例えばデータ構造復元装置であり、ハイパーテキスト記憶手段2に記憶されているハイパーテキストから実行時内部データ構造を復元するものである。またデータ生成手段は例えばデータ生成装置であり、データ構造復元手段の復元動作に際して、実行時内部データ構造において必要となるデータを生成するものである。
【0012】
更に本発明においては、例えばデータの出力形式や出力データの選択方法などのデータの解析方法を、あらかじめ例えばサブルーチンなどの形式で定義し、その定義に従ってハイパーテキストへの変換、および内部データ構造の復元などを行うためのデータ−ハイパーテキスト変換定義が格納されるデータ−ハイパーテキスト変換定義格納手段が更に備えられ、例えばデータの型に対応して特殊処理を行うためのサブルーチンが指定される。
【0013】
以上のように本発明によれば、アプリケーション内の実行時内部データ構造が、その表示および編集などが容易なハイパーテキストに変換され、データの修正などが容易となる。
【0014】
【発明の実施の形態】
図2は、本発明のデータ構造−ハイパーテキスト変換装置の実施例としての、コンピュータシステムの構成を示すブロック図である。同図においてシステムは中央処理装置(CPU)11、CPU側のメモリ12、例えばディスクなどの外部記憶装置としてのハイパーテキスト保存装置13、例えばハイパーテキストを対象とする市販の装置としてのハイパーテキスト表示装置14、ハイパーテキスト編集装置15、およびハイパーテキスト転送装置16から構成されている。
【0015】
CPU側のメモリ12の内部には、任意のアプリケーションの実行時内部データ構造をそのデータと共に格納する実行時内部データ構造格納メモリ21、実行時内部データ構造格納メモリ21の内容を用いてハイパーテキストへの変換を行うハイパーテキスト変換装置22、ハイパーテキスト保存装置13に格納されているハイパーテキストへの変換結果から実行時内部データ構造を復元するためのデータ構造復元装置23、データ構造復元装置23による内部データ構造復元にあたり必要なデータを生成するデータ生成装置24、データの出力形式や出力データの選択方法などの特殊処理を、例えばサブルーチンの形式で格納し、ハイパーテキスト変換装置22、およびデータ構造復元装置23などに与えるデータ−ハイパーテキスト変換定義格納メモリ25が備えられている。
【0016】
図2において、ハイパーテキスト変換装置22は変換対象となる実行時内部データ構造の解析を行い、そのデータ構造に対応するハイパーテキストを生成する装置である。すなわちハイパーテキスト変換装置22は実行時内部データ構造の走査を行い、データを解析し、その出力方法を決定して内部データをハイパーテキストとして出力する。着目しているデータが他のデータへの参照を行うようなものであった場合には、新たなハイパーテキストを生成し、そのハイパーテキストへのリンクをハイパーテキスト内部に埋め込むことによってデータ参照関係の保存を行う。
【0017】
生成されたハイパーテキストはハイパーテキスト保存装置13に蓄えられ、汎用のハイパーテキスト表示装置14によってその表示が行われる。またハイパーテキスト編集装置15によって保存されているハイパーテキスト内のデータなどについて容易にその編集、修正などの操作を行うことができる。更に汎用のハイパーテキスト転送装置16を用いて、例えばインターネットなどのネットワークを介して実行時内部データ構造の表現としてのハイパーテキストを他のシステムに転送することにより、アプリケーションの間での実行時内部データ構造の共有を行うことができる。
【0018】
データ構造復元装置23は、ハイパーテキスト保存装置13に格納されているハイパーテキスト、すなわち任意のアプリケーション内のデータを含む内部データ構造を復元するものであり、ハイパーテキスト保存装置13に保存されているハイパーテキストの先頭から順に文字列を読み込み、読み込んだ文字列に対して処理を行うことを繰り返してデータ構造の復元を行う。このデータ構造復元に際して、そのデータ構造において必要とされるデータがデータ生成装置24によって生成され、復元された実行時内部データ構造は、そのデータと共に実行時内部データ構造格納メモリ21に格納される。
【0019】
次に図2のシステムの動作について、処理のフローチャートを用いて詳細に説明する。図3は。ハイパーテキスト変換装置22によって実行される、実行時内部データ構造からハイパーテキストへの変換処理としてのハイパーテキスト変換アルゴリズムのフローチャートである。
このアルゴリズムでは、実行時内部データ構造に含まれる各種のデータが3種類に分類されて処理が行われるので、その分類についてまず説明する。第1の種類は基本データ型であり、これは、整数、浮動、少数、文字、文字列などのように特別な構造を持たない単純なデータ型である。第2の種類は、ある構造データにネストする形式で存在するデータ型としての埋め込み複合データ型である。第3の種類は参照データ型である。これは他の関連するデータの格納場所を示すデータ型である。全てのデータをこのような3種類のデータに分類した後に、そのデータ型に対応してハイパーテキストの生成が行われる。
【0020】
図3において処理が開始されると、まずステップS1でデータ型が調べられ、ステップS2でそのデータ型が前述の3種類のいずれであるかが判定される。第1の種類としての基本データ型の場合には、ステップS3でデータ型の詳細、例えば整数であるか、文字列であるかなどが調べられ、ステップS4でその詳細なデータ型に対応する文字列変換サブルーチンが呼び出される。この文字列変換サブルーチンについては特に図示しないが、例えば文字列であれば「文字列の長さとその内容、例えば“ABC”をプリントせよ。」というような極めて簡単な内容のサブルーチンである。その後ステップS5で全てのデータに対する処理、すなわちハイパーテキストへの変換処理が終了したか否かが判定され、終了していない場合にはステップS1からの処理が繰り返される。
【0021】
ステップS2でデータ型が(埋め込み)複合データ型であった場合には、ステップS6で複合データ出力サブルーチンが呼ばれ、このサブルーチンの処理が実行される。このサブルーチンについては図5で説明する。複合データ出力サブルーチンの処理が終了すると、ステップS5で全てのデータに対する処理が終了したかが判定され、終了していない場合には再びステップS1からの処理が繰り返される。
【0022】
ステップS2でデータ型が参照データ型であった場合には、ステップS7でハイパーリンクテーブルが検索される。このハイパーリンクテーブルは、新たなハイパーテキストが生成された場合に、そのハイパーテキストに対するリンクが登録されるテーブルである。
【0023】
図4はハイパーリンクテーブルの例である。このハイパーリンクテーブルの内容としては、例えばデータaに対して生成されるハイパーテキストdeta−a.html がメモリ上でどのアドレスに格納されているかを示すポインターがハイパーリンクに対応して格納されている。このテーブルはハイパーリンクをキーとして、そのハイパーリンクに対応するデータのメモリ上の位置を示すポインターを取り出すために使用される。
【0024】
図3のステップS7でハイパーリンクテーブルが検索され、ステップS8でその参照データが登録されているか否かが判定される。登録されている場合には、ステップS9で現在のハイパーテキストに対して登録されていたハイパーリンクが出力され、ステップS5の処理に移行する。
【0025】
ステップS8で参照データが登録されていないと判定された場合には、ステップS10で新たなハイパーテキストが生成され、ステップS11でこの新たなハイパーテキストに対するリンクがハイパーリンクテーブルに登録され、ステップS12で図3のハイパーテキスト変換アルゴリズムが再帰的に呼び出される。
【0026】
この再帰的な呼び出しという処理は、C言語やLISP言語で用いられるサブルーチン呼び出しの一般的な形式であり、次のような順序で特殊処理が行われる。
【0027】
▲1▼作業変数をスタックに積む。
▲2▼サブルーチン専用の作業領域を新たに確保する。
▲3▼サブルーチンを呼び出す。
【0028】
▲4▼サブルーチン専用の作業領域を解放する。
▲5▼スタックに積まれた作業変数を元に戻す。
▲6▼処理を続行する。
【0029】
このような再帰呼び出しを用いることによって、アルゴリズム上同じサブルーチンが重複して呼び出されても、前回の呼び出しに影響を与えることなく処理を実行することができる。
【0030】
ステップS12で呼び出されたハイパーテキスト変換アルゴリズムの処理が終了すると、ステップS13で新たに生成されたハイパーテキスト(ステップS10)のファイルがとじられた後に、ステップS5の処理が行われ、ステップS5で全てのデータに対する処理が終了したと判定された時点でハイパーテキスト変換アルゴリズムの処理が終了する。
【0031】
図5は図3のステップS6、すなわち複合データ出力サブルーチンの詳細処理フローチャートである。このサブルーチンは、いくつかの部分データが集まって構成されるデータとしての複合データを出力するためのものである。これらの部分データにはそれぞれ属性名、またはメンバ名と呼ばれる名前がつけられている。
【0032】
図5において処理が開始されると、まずステップS15で複合データ開始文字列が出力される。この複合データ開始文字列とは複合データの始まりを意味する文字列である。その後ステップS16でこの複合データ全体のデータ型の型名が出力され、この複合データを構成する部分データのそれぞれに対してステップS17〜S19の処理が繰り返される。
【0033】
すなわちそれぞれの部分データについてステップS17でその属性名が出力され、ステップS18で図3のハイパーテキスト変換アルゴリズムが再帰的に呼ばれ、ハイパーテキストへの部分データの出力が行われる。
【0034】
そしてステップS19で全ての部分データの出力が行われたと判定された時点で、ステップS20で複合データの終わりを意味する文字列としての複合データ終了文字列が出力され、処理を終了する。
【0035】
図3のハイパーテキスト変換アルゴリズムでは、データが3つの種類に分類されて出力方法が決定され、データ出力が行われる。この方式はアルゴリズムとしては単純ではあるが、図2のハイパーテキスト保存装置13に保存されたハイパーテキストを参照したり、変更したりする場合に、そのデータ構造を直感的に把握することは難しい。また全てのデータを無条件で出力するために、出力データの選択や、その制御を行うことができない。そこでデータの出力方式や、出力データの選択方法を外部から定義として与え、この定義に基づいてデータの解析と出力を行うことができる。このような定義をデータ−ハイパーテキスト変換定義と呼ぶことにする。このデータ−ハイパーテキスト変換定義は図2のデータ−ハイパーテキスト変換定義格納メモリ25に格納されている。
【0036】
図6はこのようなデータ−ハイパーテキスト変換定義テーブルの例である。ここではデータの型名がLISTであり、この変換定義を用いる条件としてポインターがNULLであることと、この条件が満足された場合に適用されるサブルーチンの名称がList Output であることが示されている。このサブルーチンの内容は例えば“NULL”という文字列を出力するというような特殊処理である。このようにデータ−ハイパーテキスト変換定義としては、データの型名と条件に対応して、実行されるサブルーチンの名称が格納されている。
【0037】
図7はこのようなデータ−ハイパーテキスト変換定義を用いる場合のハイパーテキスト変換アルゴリズムの処理フローチャートである。同図を図3の場合と比較すると、まず処理が開始された後にステップS25でデータ型が調べられ、データ−ハイパーテキスト変換定義テーブルの内容が検索され、ステップS26でそのデータの型名が登録され、かつ条件が満足されているか否かが判定される。登録され、条件も満足されている場合には、ステップS27で登録されているサブルーチンが呼び出され、そのサブルーチンの処理が行われた後に、図3と同様にステップS5の処理に移行する。またステップS26でデータの型名が登録されていないか、登録されていても条件が満足されていない場合には、図3と同様にステップS2でデータ型の分類が調べられ、その後図3と全く同じ処理が行われる。
【0038】
続いてハイパーテキストに変換され、図2のハイパーテキスト保存装置13に格納されているハイパーテキストを読み込み、それに対応する実行時内部データ構造を復元する処理のアルゴリズムを詳細に説明する。この実行時内部データ構造復元処理は、データ構造復元装置23、およびデータ生成装置24によって実行される。
【0039】
図8はデータ構造復元装置によって実行されるデータ復元アルゴリズムのフローチャートである。データ構造復元装置は、前述のハイパーリンクテーブルと、後述する型情報テーブルとを持っている。ハイパーリンクテーブルの形式は図4と同様であるが、アドレスとしてのポインターは例えば図3で説明したもの、すなわちハイパーテキスト保存装置13内で新しく生成されたハイパーテキストのアドレスを示すものではなく、ハイパーリンクに対応して復元された対応するデータのアドレス、すなわち実行時内部データ構造格納メモリ21内のアドレスを示すことになる。
【0040】
データ構造復元装置23は、まず前処理として復元されたデータを格納するための実行時データ領域を確保し、その先頭を現在復元位置ポインターにセットする。次にハイパーテキストの先頭から順に文字列を読み込み、読み込んだ文字列に対して図8の処理を行うことを繰り返す。
【0041】
図8において処理が開始されると、まずステップS31で文字列が読み込まれて、ステップS32で文字列の種類が判定される。この種類としては、その文字列が基本データ型のデータを表すか、複合データ開始文字列を表すか、あるいは他のハイパーテキストへのリンクを表すのかを判断する。
【0042】
基本データ型を表す場合には、その文字列からステップS33でデータ型の詳細が調べられ、ステップS34で基本データが復元されて、その文字列に対応する処理を終了する。
【0043】
ステップS32で文字列の種類が複合データ開始文字列であると判定された場合には、ステップS35で図9で説明する複合データ復元サブルーチンが再帰的に呼び出され、この処理が行われた後に、その文字列に対応する処理を終了する。
【0044】
ステップS32で文字列の種類が他のハイパーテキストへのリンクを表すと判定された場合には、ステップS36でハイパーリンクテーブルが検索され、そのハイパーリンクが登録されているか否かがステップS37で判定される。登録されている場合には、そのハイパーリンクに対応するデータのアドレスを示すポインター、すなわち登録されているポインターの内容が実行時データ領域に書き込まれて、この文字列に対応する処理を終了する。
【0045】
ステップS37でこのハイパーリンクが登録されていないと判定された場合には、ステップS39で図11で説明するデータ生成アルゴリズムが再帰的に呼び出され、そのアルゴリズムの処理が実行された後に、ステップS40で実行時データ領域へのポインターの書き込みが行われ、その文字列に対応する処理を終了する。なおステップS40で書き込まれるポインターは、ステップS39で行われるデータ生成アルゴリズムの結果として返されるポインターであり、これについては具体例を用いて後述(データ構造復元の具体例における手順の50と86)する。
【0046】
図9は図8のステップS35、すなわち複合データ復元サブルーチンの詳細処理フローチャートである。このサブルーチンに対しては、引数としてハイパーテキストの読み込み開始位置と、現在復元位置ポインターの値が渡される。複合データ復元サブルーチンは、図10に示す型情報テーブルに登録されている情報に基づいて、複合データの復元処理を実行する。
【0047】
図10の型情報テーブルには、データの型名をキーとしてデータの大きさとしてのデータサイズと、データの属性に応じたそのデータの書き込み位置などが格納されている。例えば型名としてLISTとデータのデータサイズは12バイトであり、そのうち属性名CARのデータが位置として0バイト目から書き込まれ、CDRのデータが位置として4バイト目から書き込まれることが型情報テーブルに格納されている。
【0048】
図9において処理が開始されると、まずステップS41で引数として渡されたハイパーテキスト読み込み開始位置から文字列が読み込まれ、そのデータの型名が得られる。そしてステップS42で型情報テーブルが検索され、その内容に従って複合データ終了文字列が表れるまでステップS43〜S47の処理が実行される。
【0049】
まずステップS43で部分データの属性名が取り出され、それがステップS44で複合データ終了文字列でないと判定されると、ステップS45で型情報テーブル内のその属性名のデータが書き込まれるべき位置を示す相対位置情報が取り出され、ステップS46でその相対位置からデータの復元位置が計算され、この位置が現在復元位置ポインターの値としてセットされ、ステップS47で図8のデータ復元アルゴリズムが再帰的に呼び出され、データ復元アルゴリズムの処理が終了した後にステップS43からの処理が繰り返され、ステップS44で属性名が複合データ終了文字列であると判定された場合に、このサブルーチンの処理を終了する。
【0050】
図11は図8のステップS39、すなわちデータ生成アルゴリズムのフローチャートである。このアルゴリズムは図2のデータ生成装置24によって実行されるものである。データ生成装置24に対しては、図8のステップS32で種類が判別された文字列としてのハイパーリンクが渡され、そのハイパーリンクに対応して復元されるデータの位置を示すポインターの値などが、ハイパーテキスト保存装置13の中には格納されていない新規データ(データ構造復元のために必要なデータ)として作成される。
【0051】
図11において処理が開始されると、ステップS51で渡されたハイパーリンクによって指定されるファイルがオープンされ、ステップS52で複合データ開始文字列が読み込まれ、ステップS53でデータの型名が読み込まれ、ステップS54で型情報テーブルが検索されてデータサイズが得られ、ステップS55でそのデータサイズ分の大きさを持つ新規データ格納領域が実行時内部データ構造格納メモリ21上に確保され、ステップS56で渡されたハイパーリンクと新規データ格納領域の先頭位置を示すポインターがハイパーリンクテーブルに登録され、ステップS57で現在の読み込み位置がハイパーテキストの先頭まで戻され、ステップS58でデータ復元アルゴリズムが再帰的に呼び出され、このアルゴリズムの処理が終了した時点でデータ生成アルゴリズムによる処理を終了する。
【0052】
なおステップS57で現在の読み込み位置をハイパーテキストの先頭まで戻すのは、ステップS56までの処理がデータ格納領域の確保とハイパーリンクテーブルへの登録という実際のデータ出力とは異なる処理であるためであり、図8のデータ復元アルゴリズムがステップS58で呼び出された後に、最初の文字列が複合データ開始文字列と判定され、ステップS35で複合データ復元サブルーチンの処理が実行されて、実際のデータ出力が行われるようにするためである。
【0053】
次に図2のハイパーテキスト保存装置13に保存されている実行時内部データ構造の他のシステムとの共有について説明する。ハイパーテキスト転送装置16として、インターネットに接続されるWWWサーバを用いる場合を接続する。WWWサーバはこのサーバに送られてきたURL(ユニフォームリソースロケータ)と呼ばれるアドレスに対応するhtmlファイルを要求先に送るシステムであり、このシステムを用いるために本実施例では、ハイパーテキスト保存装置13として、通常のオペレーティングシステムのファイルシステムにおけるディレィクトリを用いることにする。このディレクトリ中に、任意のアプリケーションの内部データ構造から変換されたハイパーテキストとしてのhtmlファイルを保存しておくことにする。
【0054】
更に図11で説明したデータ生成アルゴリズムのステップS51でハイパーリンクによって指定されたファイルをオープンするにあたり、自システム内のハイパーテキスト保存装置13に保存されているファイルを開く代わりに、WWWサーバから他のシステムに対してファイル転送を依頼し、他のシステムから転送されるファイルを用いることによって、直接ハイパーテキストとしてのhtmlファイルの共有ができない遠隔地の間でも、実行的データ構造の共有を行うことができる。
【0055】
最後にこれまで詳細に説明したアルゴリズムに従って、実行時内部データ構造をハイパーテキストに変換する変換処理と、ハイパーテキストに変換された実行時内部データ構造の復元処理について、その手順を詳細に説明する。図12はハイパーテキストに変換されるべき実行時内部データ構造の具体例である。ここでは出力データとしてデータaがリスト型へのポインターによって指定されているものとする。
【0056】
図12の内部データ構造には、次のような5つのデータ型がある。
▲1▼整数型 整数型は基本型のデータであり、型名はINTである。整数型のデータはその値を文字列として出力する。
【0057】
▲2▼文字列型 文字列型は基本型は基本型のデータであり、型名はSTRINGである。文字列型のデータはその長さと文字列の内容を出力する。
▲3▼リスト型 リスト型は複合データ型である。型名がLISTである。部分データの属性名としては、CARとCDRの2つがある。
【0058】
▲4▼リスト型へのポインター リスト型へのポインターは参照型である。
▲5▼NULL方 リストの終わりを表すデータで特別な基本型である。型名はNULLである。値を持たない基本型のデータである。
【0059】
図13は図12の実行時内部データ構造から変換されたハイパーテキストを示す。この変換にあたっては、前処理として新たなhtmlテキストが生成される。このテキストの名前を data.htmlとする。変換は次の手順に従って実行される。なお図14に作成される画面のイメージを、また図15に画面上でのクリック動作の説明を示す。
1.出力するデータの型情報を調べる。ここでは、「リスト型へのポインター」であり、これは参照データ型である(ステップS1,S2)。
2.参照データの参照先がハイパーリンクテーブルに登録されているかどうかを調べる(ステップS7)。現在、ハイパーリンクテーブルには、何も登録されていないので、データ参照先は登録されていない(ステップS8)。
3.新たなハイパーテキスト“data−a.html” を生成する(ステップS10)。
4.“data−a.html” へのハイパーリンクを登録し、“data.html” に出力する(ステップS11)。
5.出力先を“data−a.html” として、ハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS12)。
6.出力するデータの型情報を調べる。データaは「リスト型の複合データ」であり、これは複合データ型である(ステップS1,S2)。
7.複合データ出力サブルーチンを再帰的に呼び出す(ステップS6)。
8.複合データ開始文字列“begin structure” を“data−a.html” に出力する(ステップS15)。
9.型名“LIST”を出力する(ステップS16)。
10. まず、属性“CAR” について、出力することにする。属性名“CAR” を出力する(ステップS17)。
11.ハイパーテキスト変換アルゴリズムを再帰的に呼ぶ(ステップS18)。
12.属性“CAR” に格納されているデータの型情報を調べる。属性“CAR” に格納されているデータは「リスト型へのポインター」であり、これは、参照データである(ステップS1,S2)。
13.参照データの参照先が、ハイパーリンクテーブルに登録されているかどうかを調べる(ステップS7)。現在まだテーブルにはデータbは登録されていない(ステップS8)。
14.新たなハイパーテキスト“data−b.html” を生成する(ステップS10)。
15.“data−b.html” をハイパーリンクテーブルに登録し、“data−a.html” に出力する(ステップS11)。
16.出力先をハイパーテキスト“data−b.html” として、このハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS12)。
17.格納されているデータの型を調べる(ステップS1)。データbは、複合データ型である(ステップS2)。
18.複合データ出力サブルーチンを呼び出す(ステップS6)。
19.複合データ開始文字列“begin structure” を“data−b.html” に出力する(ステップS15)。
20.型名“LIST”を出力する(ステップS16)。
21. まず、属性“CAR” について、出力することにする。属性名“CAR” を出力する(ステップS17)。
22.ハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS18)。
23.属性“CAR” に格納されているデータの型情報を調べる(ステップS1)。属性“CAR” に格納されているデータは基本型である(ステップS2)。
24.データの型情報の詳細を調べる。この場合、整数型である(ステップS3)。
25.属性“CAR” の型名“INT” を出力する。
26.格納されている整数値”10”を文字列として出力する(ステップS4)。
27.出力が終了したので、ハイパーテキスト変換アルゴリズムの呼び出し元(22の呼び出し)に復帰する(ステップS5)。
28.次に属性“CDR” について、出力する(ステップS19)。
29.属性名“CDR” を出力する(ステップS17)。
30.ハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS18)。
31.属性“CDR” に格納されているデータの型情報を調べる(ステップS1)。属性“CDR” に格納されているデータは基本データ型である(ステップS2)。
32.データの型情報の詳細を調べる。この場合、NULL型である(ステップS3)。
33. 属性“CDR” の型名“NULL”とデータ“NULL”を出力する(ステップS4)。
34.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(30の呼び出し)に復帰する(ステップS5)。
35.出力すべき属性名がないので(ステップS19)、複合データ終了文字列“end structure” を出力する(ステップS20)。以上で、データbの出力は終了である。複合データ出力サブルーチンから呼び出し元(18の呼び出し)に復帰する。この時の、ハイパーテキスト“data−b.html” の状態を、図14に示す。
36.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(16の呼び出し)に復帰する。
37.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(11の呼び出し)に復帰する。
38.次に、データaの属性“CDR” について、出力する(ステップS19)。
39.属性名“CDR” を出力する(ステップS17)。
40.ハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS18)。
41.属性“CDR” に格納されているデータの型情報を調べる(ステップS1)。属性“CDR” に格納されているデータは“LIST へのポインター” であり、これは参照データ型である(ステップS2)。
42.参照データの参照先が、ハイパーリンクテーブルに登録されているかどうかを調べる(ステップS7)。この時はまだテーブルには、データcへの登録はされていない(ステップS8)。
43.新たなハイパーテキスト“data−c.html” を生成し(ステップS10)、これをハイパーリンクテーブルに登録し、出力する(ステップS11)。
44.出力先を、ハイパーテキスト“data−c.html” として、再帰的にハイパーテキスト変換アルゴリズムを呼び出す(ステップS12)。
45.出力するデータの型を調べる(ステップS1)。データcは、複合データ構造なので(ステップS2)、複合データ出力サブルーチンを呼び出す(ステップS6)。
46.複合データ開始文字列“begin structure” を“data−c.html” に出力する(ステップS15)。
47.型名“LIST”を出力する(ステップS16)。
48. まず、属性“CAR” について、出力することにする。属性名“CAR” を出力する(ステップS17)。
49.ハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS18)。
50.属性“CAR” に格納されているデータの型情報を調べる(ステップS1)。属性“CAR” に格納されているデータは基本型である(ステップS2)。
51.データの型情報の詳細を調べる。この場合、文字列型である(ステップS3)。
52.属性“CAR” の型名“STRING”を出力する。
53.文字列の長さ3と、文字列の内容“ABC” を出力する(ステップS4)。
54.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(49の呼び出し)に復帰する(ステップS5)。
55.次に、属性“CDR” について、出力する(ステップS19)。属性名“CDR” を出力する(ステップS17)。
56.ハイパーテキスト変換アルゴリズムを再帰的に呼び出す(ステップS18)。
57.属性“CDR” に格納されているデータの型情報を調べる(ステップS1)。属性“CDR” に格納されているデータは参照データ型である(ステップS2)。
58.参照データの参照先が、ハイパーリンクテーブルに登録されているかどうかを調べる(ステップS7)。既にデータaは、ハイパーリンクテーブルに登録されている(ステップS8)。
59. 登録されていた“data−a.html” へのハイパーリンクを“data−c.html” に出力する(ステップS9)。
60.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(56の呼び出し)に復帰する(ステップS5)。
61.すべての属性の出力が終了したので(ステップS19)、複合データの終了文字列“end structure” を“data−c.html” 出力する(ステップS20)。
62.複合データ出力サブルーチンが終了したので、呼び出し元(45の呼び出し)に復帰する。この時の、“data−c.html” の状態を図14に示す。
63.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(44の呼び出し)に復帰する。
64.ハイパーテキスト変換アルゴリズムが終了したので、呼び出し元(40の呼び出し)に復帰する。
65.データaのすべてのアトリビュートに対する出力が終わったので(ステップS19)、複合データの終了文字列“end structure” を“data−a.html” に出力する(ステップS20)。以上で、データaの変換は終了なので、呼び出し元(7を経由した5の呼び出し)に復帰する。
66.以上で、すべての実行時データ構造が出力されたので、このアルゴリズムを終了する(ステップS5)。
【0060】
このようにして、実行時データ構造を格納することができる。図16にハイパーテキストへの変換過程におけるアルゴリズムとサブルーチンの呼び出し、復帰関係を示す。
【0061】
次にハイパーテキストから内部データ構造を復元する処理について説明する。ここでは図13のハイパーテキストから図12の実行時内部データ構造を復元する場合を説明する。この復元処理においては、前処理として型情報テーブルが作成され、また格納データの復元先が前もって実行時内部データ構造格納メモリ21の内部に確保された後、次の手順に従って処理が実行される。
1.“data.html” の先頭行を読み込み、文字列を読み込み(ステップS31)。この時、先頭行は、“data−a.html” へのハイパーリンクである(ステップS32)。
2.ハイパーリンクテーブルを検索し、“data−a.html” に対応する実行時データのポインターが登録されているかを検索する(ステップS36)。この時は、まだ登録されていないので(ステップS37)、このハイパーリンクを、データ生成装置に渡し、データの生成を依頼する(ステップS39)。
3.データ生成装置は、“data−a.html” を開く(ステップS51)。
4.複合データ開始文字列を読み込む(ステップS52)。
5.型名を読み込む(ステップS53)。
6.型情報テーブルを検索し、データサイズを得る(ステップS54)。
7.新規に、「リスト型」の大きさをもつデータ領域を確保する(ステップS55)。
8.“data−a.html” へのハイパーリンクと、確保されたデータ領域の先頭位置をハイパーリンクテーブルに登録する(ステップS56)。
9.現在の読み込み位置をいったん“data−a.html” の先頭位置まで戻す(ステップS57)。
10.データ復元アルゴリズムを再帰的に呼び出す(ステップS58)。
11.文字列を読み込み、解析を行う(ステップS31)。
12.文字列は、複合データ開始文字列を表すので(ステップS32)、複合データ復元サブルーチンを再帰的に呼び出す(ステップS35)。
13.型名を読み込む(ステップS41)。型名から、型情報テーブルを検索する(ステップS42)。
14.属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、“CAR” である。
15.相対位置情報を取り出し(ステップS45)、復元位置を計算し、現在復元位置にセットする(ステップS46)。
16.データ復元アルゴリズムを再帰的に呼び出す(ステップS47)。
17.文字列を読み込む(ステップS31)。ここで読み込まれる文字列は、“data−b.html” へのハイパーリンクである(ステップS32)。
18.ハイパーリンクテーブルを検索し(ステップS36)、“data−b.html” に対応する実行時データのポインターが登録されているかを検索する。この時は、まだ登録されていない(ステップS37)。
19.このハイパーリンクを、データ生成装置に渡し、データ生成アルゴリズムを再帰的に呼び出す(ステップS39)。
20.データ生成装置は、“data−b.html” を開く(ステップS51)。
21.“data−b.html” から複合データ開始文字列を読み込む(ステップS52)。
22.“data−b.html” から型名を読み込む。ここで読み込まれる型名は“LIST”である(ステップS53)。
23.型情報テーブルから、“LIST”に相当する型の情報を取り出す(ステップS54)。
24.新規に、「リスト型」の大きさをもつデータ領域を確保する(ステップS55)。
25.“data−b.html” へのハイパーリンクと、確保されたデータ領域の先頭位置をハイパーリンクテーブルに登録する(ステップS56)。
26.現在の読み込み位置をいったん“data−b.html” の先頭位置まで戻す(ステップS57)。
27.データ復元アルゴリズムを再帰的に呼び出す(ステップS58)。
28.“data−b.html” から文字列を読み込み、解析を行う(ステップS31)。
29.文字列は、複合データ開始文字列を表すので(ステップS32)、複合データ復元サブルーチンを呼び出す(ステップS35)。
30.文字列を読み込み型名を得る(ステップS41)。
31.型情報テーブルを検索する(ステップS42)。
32.属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、“CAR” である(ステップS44)。
33.相対位置情報を取り出し(ステップS45)、復元位置を計算し、現在復元位置にセットする(ステップS46)。
34.データ復元アルゴリズムを再帰的に呼び出す(ステップS47)。
35.“data−b.html” の文字列を読み込み(ステップS31)。ここで入力される文字列は、型名“INT” である(ステップS32)。
36.データ型の詳細を調べる(ステップS33)。
37.“data−b.html” から文字列を読み込み、これを整数値に変換し、現在のメモリ位置に書き込む(ステップS34)。
38.データ復元アルゴリズムから、呼び出し元(34の呼び出し)に復帰する。
39.“data−b.html” から属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、“CDR” である(ステップS44)。
40.相対位置情報を取り出し(ステップS45)、復元位置を計算し、現在復元位置にセットする(ステップS46)。
41.データ復元アルゴリズムを再帰的に呼び出す(ステップS47)。
42.“data−b.html” の文字列を読み込み(ステップS31)。ここで入力される文字列は、型名“NULL”である(ステップS32)。
43.データ型の詳細を調べる(ステップS33)。
44.現在のメモリ位置に、値NULLを書き込む(ステップS34)。
45.データ復元アルゴリズムから、呼び出し元(41の呼び出し)に復帰する。
46.“data−b.html” から属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、複合データ終了文字列である(ステップS44)。
47.以上で、複合データ復元サブルーチンは終了したので、呼び出し元(29の呼び出し)に復帰する。
48.以上で、データ復元アルゴリズムは終了したので、呼び出し元(27の呼び出し)に復帰する。
49.データbの生成は終了したので、呼び出し元(19の呼び出し)にデータ生成装置は新しく生成されたデータbの位置を返し、復帰する。
50.データbへのポインターを、データaに書き込む(ステップS40)。
51.データ復元アルゴリズムが終了したので、呼び出し元(16の呼び出し)に復帰する。
52.“data−a.html” から属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、“CDR” である(ステップS44)。
53.相対位置情報を取り出し(ステップS45)、復元位置を計算し、現在復元位置にセットする(ステップS46)。
54.データ復元アルゴリズムを再帰的に呼び出す(ステップS47)。
55.文字列を読み込む(ステップS31)。ここで読み込まれる文字列は、“data−c.html” へのハイパーリンクである(ステップS32)。
56.ハイパーリンクテーブルを検索し(ステップS36)、“data−c.html” に対応する実行時データのポインターが登録されているかを検索する。この時は、まだ登録されていないので(ステップS37)、このハイパーリンクを、データ生成装置に渡し、データの生成を依頼する(ステップS39)。
57.データ生成装置は、“data−c.html” を開く(ステップS51)。
58.“data−c.html” から複合データ開始文字列を読み込む(ステップS52)。
59.“data−c.html” から型名を読み込む(ステップS53)。ここで読み込まれる型名は“LIST”である。
60.型情報テーブルから、“LIST”に相当する型の情報を取り出す(ステップS54)。
61.新規に、「リスト型」の大きさをもつデータ領域を確保する(ステップS55)。
62.“data−c.html” へのハイパーリンクと、確保されたデータ領域の先頭位置をハイパーリンクテーブルに登録する(ステップS56)。
63.現在の読み込み位置をいったん“data−c.html” の先頭位置まで戻す(ステップS57)。
64.データ復元アルゴリズムを再帰的に呼び出す(ステップS58)。
65.“data−c.html” から文字列を読み込み、解析を行う(ステップS31)。
66.文字列は、複合データ開始文字列を表すので(ステップS32)、複合データ復元サブルーチンを呼び出す(ステップS35)。
67.文字列を読み込み型名を得る(ステップS41)。
68.型情報テーブルを検索する(ステップS42)。
69.属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、“CAR” である(ステップS44)。
70.相対位置情報を取り出し(ステップS45)、復元位置を計算し、現在復元位置にセットする(ステップS46)。
71.データ復元アルゴリズムを再帰的に呼び出す(ステップS47)。
72.“data−c.html” から文字列を読み込む(ステップS31)。ここで入力される文字列は、型名“STRING”である(ステップS32)。
73.データ型の詳細を調べる(ステップS33)。
74.“data−c.html” から、文字列の長さと文字列の内容を読み込み、これを現在のメモリ位置に書き込む(ステップS34)。
75.データ復元アルゴリズムが終了したので、呼び出し元(71の呼び出し)へ復帰する。
76.“data−c.html” から属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、“CDR” である(ステップS44)。
77.相対位置情報を取り出し(ステップS45)、復元位置を計算し、現在復元位置にセットする(ステップS46)。
78.データ復元アルゴリズムを再帰的に呼び出す(ステップS47)。
79.“data−c.html” から文字列を読み込み(ステップS31)。ここで入力される文字列は、“data−a.html” へのハイパーリンクである(ステップS32)。
80.ハイパーリンクテーブルを検索し、“data−c.html” に対応する実行時データのポインターが登録されているかを検索する(ステップS36)。この時は、すでに“data−a.html” へのハイパーリンクに対応するデータが登録されているので(ステップS37)、このポインターを現在のメモリ位置に書き込む(ステップS38)。
81.データ復元アルゴリズムが終了したので、呼び出し元(78の呼び出し)へ復帰する。
82.“data−c.html” から属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、複合データ終了文字列である(ステップS44)。
83.以上で、データcに対する複合データ復元サブルーチンは終了したので、呼び出し元(呼び出し66)へ復帰する。
84.以上で、データcに対するデータ復元アルゴリズムは終了したので、呼び出し元(呼び出し64)へ復帰する。
85.データcの生成は終了したので、データ生成装置は新しく生成されたデータcの位置を返し、呼び出し元(56の呼び出し)に復帰する。
86.データcへのポインターを、データaに書き込む(ステップS40)。
87.以上で、データcに対するデータ復元アルゴリズムは終了したので、呼び出し元(呼び出し54)に復帰する。
88.“data−a.html” から属性名を読み込む(ステップS43)。ここで読み込まれる属性名は、複合データ終了文字列である(ステップS44)。
89.データaに対する複合データ復元サブルーチンが終了したので、呼び出し元(呼び出し12)へ復帰する。
90.データaに対するデータ復元アルゴリズムが終了したので、呼び出し元(呼び出し10)に復帰する。
91.データaに対するデータ生成装置のアルゴリズムが終了したので、呼び出し元(呼び出し2)に復帰する。
92.以上で、データaの復元は終了する。
【0062】
最後に実行時内部データ構造からハイパーテキストへの変換、および逆にハイパーテキストから実行時内部データ構造の復元を行うためのプログラムのコンピュータへのローディングについて、図17を用いて説明する。同図において、コンピュータ51は本体54とメモリ55とから構成されており、本体54に対しては可搬型記憶媒体52からプログラムなどをローディングすることも、またプログラム提供者側からネットワーク53を介してプログラムなどをローディングすることも可能である。
【0063】
本発明の特許請求の範囲の請求項11、および請求項12に記載されているプログラムや、図3、図7、および図8のフローチャートに示されているプログラムなどは例えば図17におけるメモリ55に格納され、そのプログラムが本体54によって実行される。ここでメモリ55としては例えばランダムアクセスメモリ(RAM)、またはハードディスクなどが用いられる。
【0064】
また実行時内部データ構造をハイパーテキストに変換したり、逆にハイパーテキストへの変換結果から実行時内部データ構造を復元したりするためのプログラムなどが可搬型記憶媒体52に記録され、コンピュータ51にそのプログラムをロードすることによって、データ構造とハイパーテキストとの間の変換を行うことも可能である。この可搬型記憶媒体52としてはメモリカード、フロッピーディスク、CD−ROM(コンパクトディスク リードオンリーメモリ)、光ディスク、光磁気ディスクなど市販され、流通可能な任意の記憶媒体を用いることができる。さらに実行時内部データ構造とハイパーテキストとの間の変換のためのプログラムなどが、プログラム提供者側からネットワーク53を介してコンピュータ51側に送られ、そのプログラムがロードされることによって変換を実現することも可能である。
【0065】
【発明の効果】
以上詳細に説明したように、本発明によれば任意のアプリケーションの実行時内部データ構造をハイパーテキストに変換することにより、既存のハイパーテキスト表示装置やハイパーテキスト編集装置を利用して実行時内部データ構造を容易に認識することが可能になり、またデータ構造の変更などのデータの修正や編集が容易に行えるようになる。さらに既存のハイパーテキスト転送装置を用いることにより、ネットワークによって相互に接続された他のシステムとの間で、実行時データ構造の共有を行うことが可能となり、ソフトウェア資産の作成や修正作業の能率化に寄与するところが大きい。
【図面の簡単な説明】
【図1】本発明の原理構成を示すブロック図である。
【図2】本発明のデータ構造−ハイパーテキスト変換装置の実施例としてのコンピュータシステムの構成を示すブロック図である。
【図3】ハイパーテキスト変換アルゴリズムのフローチャートである。
【図4】ハイパーリンクテーブルの例を示す図である。
【図5】複合データ出力サブルーチンのフローチャートである。
【図6】データ−ハイパーテキスト変換定義テーブルの例を示す図である。
【図7】データ−ハイパーテキスト変換定義を用いるハイパーテキスト変換アルゴリズムのフローチャートである。
【図8】データ復元アルゴリズムのフローチャートである。
【図9】複合データ復元サブルーチンのフローチャートである。
【図10】型情報テーブルの例を示す図である。
【図11】データ生成アルゴリズムのフローチャートである。
【図12】実行時内部データ構造の例を示す図である。
【図13】図12のデータ構造のハイパーテキストへの変換結果を示す図である。
【図14】図12のデータ構造のハイパーテキストへの変換によって表示される画面のイメージを示す図である。
【図15】図14の画面におけるクリック動作の説明図である。
【図16】ハイパーテキストへの変換の具体例におけるアルゴリズムの呼び出し、および復帰関係を示す図である。
【図17】データ構造−ハイパーテキスト変換を実現するためのプログラムのコンピュータへのローディングを説明する図である。
【符号の説明】
1 ハイパーテキスト変換手段
2 ハイパーテキスト記憶手段
3 中央処理装置(CPU)
12 メモリ
13 ハイパーテキスト保持装置
14 ハイパーテキスト表示装置
15 ハイパーテキスト編集装置
16 ハイパーテキスト転送装置
21 実行時内部データ構造格納メモリ
22 ハイパーテキスト変換装置
23 データ構造復元装置
24 データ生成装置
25 データ−ハイパーテキスト変換定義格納メモリ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a conversion method for converting a runtime internal data structure in an arbitrary application into, for example, a format that can be easily modified. More specifically, the present invention relates to a method for converting an internal data structure into hypertext, and preparing for hypertext. The present invention relates to a data structure-to-hypertext conversion device that enables easy modification and the like using a general tool.
[0002]
[Prior Art and Problems to be Solved by the Invention]
Conventionally, when modifying a runtime data structure in an arbitrary application, a tool dedicated to modification has been used. However, such a tool had to be developed for each application, was not versatile, and was extremely expensive to develop. Conventionally, there has been a method of converting data stored in correspondence with an application into a normal text file format by some method and storing the converted data in a disk or the like. However, the data structure is not directly reflected, and there is a problem that it is difficult to perform a direct operation such as modifying the data structure on the stored text.
[0003]
On the other hand, the hypertext used in the present invention is, for example, a file of character data in which a word in a document, a headline attached to the word, and a table of contents of the headline are associated with each other. It can be used to retrieve data and is suitable for efficient information retrieval. In addition to text, graphics, audio, and image data can be handled in the same way.
[0004]
The most famous hypertext is HTML (Hypertext Markup Language). The HTML is a text data format used for a document information system WWW (World Wide Web) on the Internet.
[0005]
There are many general tools for displaying, modifying, and distributing hypertext represented by HTML, and the tools are commercially available. Generally, as a method of displaying data, a method of converting the data into hypertext and using a means for constructing a simple interface of visualizing the data using a viewer for hypertext is used. However, there is a problem that only display is performed and data cannot be restored.
[0006]
According to the present invention, when converting data into hypertext, the conversion is performed by assuming that the data is restored from the conversion result, and the internal data structure at the time of execution in any application is displayed as hypertext together with the data. To provide a data structure-hypertext conversion device that enables an operation such as sharing of a runtime internal data structure by transferring the data to another system and modifying the data. And
[0007]
[Means for Solving the Problems]
FIG. 1 is a block diagram showing the principle configuration of the present invention. FIG. 1 is a block diagram showing a principle configuration of a data structure-hypertext conversion device for converting a runtime internal data structure including data in an arbitrary application into hypertext.
[0008]
In FIG. 1, a hypertext conversion means 1 is, for example, a hypertext conversion device, and converts, for example, a runtime internal data structure held on a CPU side of a computer system into hypertext together with the data.
[0009]
The hypertext storage means 2 is, for example, an external storage device as a hypertext storage device, and stores a conversion result of the internal data structure at the time of execution into hypertext.
[0010]
In the data structure-hypertext conversion apparatus of the present invention, for example, a data structure restoring means is provided so as to be able to restore a runtime internal data structure including data in an arbitrary application stored in the hypertext storage means 2. Data generating means is further provided.
[0011]
The data structure restoring means is, for example, a data structure restoring device for restoring the internal data structure at the time of execution from the hypertext stored in the hypertext storage means 2. The data generating means is, for example, a data generating device, and generates data required in the internal data structure at the time of execution of the data structure restoring means.
[0012]
Further, in the present invention, for example, a data analysis method such as a data output format and a method for selecting output data is defined in advance in a format such as a subroutine, and converted to hypertext according to the definition, and the internal data structure is restored. Further, data-hypertext conversion definition storing means for storing data-hypertext conversion definition for performing the above-mentioned operations is further provided. For example, a subroutine for performing a special process corresponding to a data type is designated.
[0013]
As described above, according to the present invention, a runtime internal data structure in an application is converted into a hypertext that can be easily displayed and edited, and data can be easily modified.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 2 is a block diagram showing the configuration of a computer system as an embodiment of the data structure-hypertext conversion device of the present invention. In FIG. 1, the system includes a central processing unit (CPU) 11, a memory 12 on the CPU side, a hypertext storage device 13 as an external storage device such as a disk, and a hypertext display device as a commercially available device for hypertext, for example. 14, a hypertext editing device 15, and a hypertext transfer device 16.
[0015]
In the memory 12 on the CPU side, a runtime internal data structure storage memory 21 for storing the runtime internal data structure of an arbitrary application together with the data, and a hypertext using the contents of the runtime internal data structure storage memory 21 are stored. , A data structure restoring device 23 for restoring an internal data structure at the time of execution from a result of conversion into a hypertext stored in the hypertext storage device 13, and an internal A data generation device 24 for generating data necessary for data structure restoration, a special process such as a data output format and an output data selection method are stored in, for example, a subroutine format, a hypertext conversion device 22, and a data structure restoration device. Data to be given to 23 etc.-hypertext conversion Definition storage memory 25 is provided.
[0016]
In FIG. 2, a hypertext converter 22 is a device that analyzes a runtime internal data structure to be converted and generates a hypertext corresponding to the data structure. That is, the hypertext converter 22 scans the internal data structure at the time of execution, analyzes the data, determines the output method, and outputs the internal data as hypertext. If the data of interest is a reference to other data, a new hypertext is generated, and a link to the hypertext is embedded in the hypertext to create a data reference relationship. Save.
[0017]
The generated hypertext is stored in the hypertext storage device 13 and displayed by the general-purpose hypertext display device 14. Further, it is possible to easily perform operations such as editing and correction on data in the hypertext stored by the hypertext editing device 15. Further, by using a general-purpose hypertext transfer device 16 to transfer hypertext as a representation of the runtime internal data structure to another system via a network such as the Internet, the runtime internal data can be exchanged between applications. Structure sharing can be performed.
[0018]
The data structure restoring device 23 restores a hypertext stored in the hypertext storage device 13, that is, an internal data structure including data in an arbitrary application, and stores the hypertext stored in the hypertext storage device 13. The data structure is restored by repeatedly reading a character string from the beginning of the text and performing processing on the read character string. When the data structure is restored, data required in the data structure is generated by the data generating device 24, and the restored runtime internal data structure is stored in the runtime internal data structure storage memory 21 together with the data.
[0019]
Next, the operation of the system shown in FIG. 2 will be described in detail with reference to a processing flowchart. FIG. 5 is a flowchart of a hypertext conversion algorithm executed by the hypertext conversion device 22 as a conversion process from a runtime internal data structure to hypertext.
In this algorithm, various types of data included in the internal data structure at the time of execution are classified into three types and the processing is performed. The classification will be described first. The first type is the basic data type, which is a simple data type that has no special structure, such as integers, floats, decimals, characters, strings, and the like. The second type is an embedded composite data type as a data type existing in a form nested in certain structural data. The third type is a reference data type. This is a data type indicating the storage location of other related data. After classifying all data into these three types of data, hypertext is generated in accordance with the data type.
[0020]
When the process is started in FIG. 3, the data type is checked in step S1, and it is determined in step S2 whether the data type is one of the above three types. In the case of the basic data type as the first type, the details of the data type, for example, whether it is an integer or a character string, are checked in step S3, and the character corresponding to the detailed data type is checked in step S4. The column conversion subroutine is called. Although this character string conversion subroutine is not particularly shown, it is a subroutine having extremely simple contents such as "print character string length and its contents, for example," ABC ". Thereafter, in step S5, it is determined whether or not the processing for all data, that is, the processing for converting to hypertext has been completed. If not, the processing from step S1 is repeated.
[0021]
If the data type is the (embedded) composite data type in step S2, a composite data output subroutine is called in step S6, and the processing of this subroutine is executed. This subroutine will be described with reference to FIG. When the processing of the composite data output subroutine is completed, it is determined in step S5 whether or not the processing for all data has been completed. If not, the processing from step S1 is repeated again.
[0022]
If the data type is the reference data type in step S2, the hyperlink table is searched in step S7. This hyperlink table is a table in which when a new hypertext is generated, a link to the hypertext is registered.
[0023]
FIG. 4 is an example of a hyperlink table. The contents of the hyperlink table include, for example, a hypertext data-a. The pointer indicating which address html is stored in the memory is stored corresponding to the hyperlink. This table is used to retrieve a pointer indicating the location in the memory of the data corresponding to the hyperlink using the hyperlink as a key.
[0024]
In step S7 of FIG. 3, the hyperlink table is searched, and in step S8, it is determined whether or not the reference data is registered. If registered, the hyperlink registered for the current hypertext is output in step S9, and the process proceeds to step S5.
[0025]
If it is determined in step S8 that the reference data is not registered, a new hypertext is generated in step S10, a link to the new hypertext is registered in the hyperlink table in step S11, and a step S12 is performed. The hypertext conversion algorithm of FIG. 3 is called recursively.
[0026]
This process of recursive call is a general form of subroutine call used in C language and LISP language, and special processing is performed in the following order.
[0027]
{Circle around (1)} Work variables are put on the stack.
(2) A new work area dedicated to the subroutine is newly secured.
(3) Call the subroutine.
[0028]
(4) Release the work area dedicated to the subroutine.
{Circle around (5)} Return the work variables stacked on the stack to their original values.
(6) The process is continued.
[0029]
By using such a recursive call, even if the same subroutine is called repeatedly in terms of the algorithm, processing can be executed without affecting the previous call.
[0030]
When the processing of the hypertext conversion algorithm called in step S12 ends, the file of the newly generated hypertext (step S10) is closed in step S13, and then the processing of step S5 is performed. When it is determined that the processing for the data has been completed, the processing of the hypertext conversion algorithm ends.
[0031]
FIG. 5 is a detailed processing flowchart of step S6 in FIG. 3, that is, the composite data output subroutine. This subroutine is for outputting composite data as data constituted by collecting some partial data. Each of these partial data is given a name called an attribute name or a member name.
[0032]
When the process is started in FIG. 5, first, a composite data start character string is output in step S15. This composite data start character string is a character string that means the start of composite data. Thereafter, in step S16, the type name of the data type of the entire composite data is output, and the processing of steps S17 to S19 is repeated for each of the partial data constituting the composite data.
[0033]
That is, the attribute name of each partial data is output in step S17, and the hypertext conversion algorithm in FIG. 3 is recursively called in step S18, and the partial data is output to the hypertext.
[0034]
When it is determined in step S19 that all the partial data has been output, a composite data end character string as a character string indicating the end of the composite data is output in step S20, and the process ends.
[0035]
In the hypertext conversion algorithm of FIG. 3, data is classified into three types, an output method is determined, and data output is performed. Although this method is simple as an algorithm, it is difficult to intuitively grasp the data structure when referring to or changing the hypertext stored in the hypertext storage device 13 in FIG. Further, since all data is output unconditionally, selection of output data and control thereof cannot be performed. Therefore, a data output method and a method of selecting output data are given as definitions from the outside, and data analysis and output can be performed based on the definitions. Such a definition is called a data-hypertext conversion definition. This data-hypertext conversion definition is stored in the data-hypertext conversion definition storage memory 25 of FIG.
[0036]
FIG. 6 is an example of such a data-hypertext conversion definition table. Here, the data type name is LIST, the pointer is NULL as a condition using this conversion definition, and the name of the subroutine applied when this condition is satisfied is List Output. I have. The contents of this subroutine are special processing such as outputting a character string "NULL". As described above, as the data-hypertext conversion definition, the name of the subroutine to be executed is stored corresponding to the type name and condition of the data.
[0037]
FIG. 7 is a processing flowchart of a hypertext conversion algorithm when such a data-hypertext conversion definition is used. Compared to the case of FIG. 3, first, after the processing is started, the data type is checked in step S25, the contents of the data-hypertext conversion definition table are searched, and the type name of the data is registered in step S26. It is determined whether or not the condition is satisfied. If registered and the conditions are satisfied, the registered subroutine is called in step S27, and after the processing of the subroutine is performed, the process proceeds to step S5 as in FIG. If the data type name is not registered in step S26 or the condition is not satisfied even if it is registered, the classification of the data type is checked in step S2 as in FIG. Exactly the same processing is performed.
[0038]
Next, an algorithm of processing for reading the hypertext converted into the hypertext and stored in the hypertext storage device 13 of FIG. 2 and restoring the corresponding internal data structure at the time of execution will be described in detail. This execution-time internal data structure restoration processing is executed by the data structure restoration device 23 and the data generation device 24.
[0039]
FIG. 8 is a flowchart of a data restoration algorithm executed by the data structure restoration device. The data structure restoration device has the above-described hyperlink table and the type information table described later. The format of the hyperlink table is the same as that of FIG. 4, but the pointer as the address is not the one described in FIG. 3, that is, does not indicate the address of the hypertext newly generated in the hypertext storage device 13, This indicates the address of the corresponding data restored corresponding to the link, that is, the address in the execution time internal data structure storage memory 21.
[0040]
The data structure restoring device 23 first secures a runtime data area for storing data restored as preprocessing, and sets the head of the data area to a current restoration position pointer. Next, a character string is read in order from the beginning of the hypertext, and the processing of FIG. 8 is repeatedly performed on the read character string.
[0041]
When the process is started in FIG. 8, a character string is read in step S31, and the type of the character string is determined in step S32. As this type, it is determined whether the character string represents data of the basic data type, a composite data start character string, or a link to another hypertext.
[0042]
If it represents the basic data type, the details of the data type are checked from the character string in step S33, the basic data is restored in step S34, and the processing corresponding to the character string ends.
[0043]
If it is determined in step S32 that the type of the character string is the composite data start character string, the composite data restoration subroutine described with reference to FIG. 9 is recursively called in step S35. The processing corresponding to the character string ends.
[0044]
If it is determined in step S32 that the type of the character string represents a link to another hypertext, the hyperlink table is searched in step S36, and it is determined in step S37 whether the hyperlink is registered. Is done. If registered, the pointer indicating the address of the data corresponding to the hyperlink, that is, the contents of the registered pointer is written in the runtime data area, and the processing corresponding to this character string ends.
[0045]
If it is determined in step S37 that the hyperlink is not registered, the data generation algorithm described in FIG. 11 is recursively called in step S39, and after the processing of the algorithm is executed, in step S40 The pointer is written into the runtime data area, and the processing corresponding to the character string ends. The pointer written in step S40 is a pointer returned as a result of the data generation algorithm performed in step S39, which will be described later using a specific example (procedures 50 and 86 in the specific example of data structure restoration). .
[0046]
FIG. 9 is a detailed processing flowchart of step S35 of FIG. 8, that is, the composite data restoration subroutine. To this subroutine, the reading start position of the hypertext and the value of the current restoration position pointer are passed as arguments. The composite data restoration subroutine executes a composite data restoration process based on the information registered in the type information table shown in FIG.
[0047]
The type information table of FIG. 10 stores a data size as a data size using a data type name as a key, a write position of the data according to an attribute of the data, and the like. For example, the type information table indicates that the data size of LIST and data is 12 bytes, of which the data of the attribute name CAR is written from the 0th byte and the data of the CDR is written from the 4th byte as the position. Is stored.
[0048]
When the process is started in FIG. 9, first, a character string is read from the hypertext reading start position passed as an argument in step S41, and the type name of the data is obtained. Then, in step S42, the type information table is searched, and the processes of steps S43 to S47 are executed until a complex data end character string appears according to the contents.
[0049]
First, in step S43, the attribute name of the partial data is extracted, and if it is determined in step S44 that it is not the composite data end character string, in step S45, the position in the type information table where the data of the attribute name is to be written is indicated. The relative position information is extracted, the data restoration position is calculated from the relative position in step S46, this position is set as the value of the current restoration position pointer, and the data restoration algorithm in FIG. 8 is recursively called in step S47. After the processing of the data restoration algorithm is completed, the processing from step S43 is repeated. If it is determined in step S44 that the attribute name is the composite data end character string, the processing of this subroutine is terminated.
[0050]
FIG. 11 is a flowchart of step S39 in FIG. 8, that is, the data generation algorithm. This algorithm is executed by the data generator 24 of FIG. The hyperlink as the character string whose type is determined in step S32 of FIG. 8 is passed to the data generation device 24, and the value of the pointer indicating the position of the data to be restored corresponding to the hyperlink, and the like are provided. Is created as new data not stored in the hypertext storage device 13 (data necessary for restoring the data structure).
[0051]
When the processing is started in FIG. 11, the file specified by the hyperlink passed in step S51 is opened, the composite data start character string is read in step S52, and the data type name is read in step S53. In step S54, the type information table is searched to obtain the data size. In step S55, a new data storage area having a size corresponding to the data size is secured in the internal data structure storage memory 21 at the time of execution. The hyperlink and the pointer indicating the start position of the new data storage area are registered in the hyperlink table, the current read position is returned to the start of the hypertext in step S57, and the data restoration algorithm is recursively called in step S58. Processing of this algorithm ends. And it ends the process of data generation algorithm at the time.
[0052]
The reason why the current reading position is returned to the beginning of the hypertext in step S57 is that the processing up to step S56 is different from the actual data output of securing the data storage area and registering it in the hyperlink table. After the data restoration algorithm of FIG. 8 is called in step S58, the first character string is determined to be the composite data start character string, and the processing of the composite data restoration subroutine is executed in step S35, and the actual data output is executed. It is to be done.
[0053]
Next, sharing of the internal data structure of the runtime stored in the hypertext storage device 13 of FIG. 2 with another system will be described. The case where a WWW server connected to the Internet is used as the hypertext transfer device 16 is connected. The WWW server is a system that sends an html file corresponding to an address called a URL (uniform resource locator) sent to the server to a request destination. In order to use this system, in this embodiment, the hypertext storage device 13 is used. The directory in the file system of a normal operating system will be used. In this directory, an html file as a hypertext converted from the internal data structure of an arbitrary application is stored.
[0054]
Further, when opening the file specified by the hyperlink in step S51 of the data generation algorithm described with reference to FIG. 11, instead of opening the file stored in the hypertext storage device 13 in the own system, another file is sent from the WWW server. By requesting a file transfer from a system and using a file transferred from another system, it is possible to share an executable data structure even in a remote place where sharing of an html file as a hypertext is not possible directly. it can.
[0055]
Finally, the procedures of the conversion process for converting the runtime internal data structure into hypertext and the restoration process of the runtime internal data structure converted to hypertext in accordance with the algorithm described in detail up to now will be described in detail. FIG. 12 is a specific example of a runtime internal data structure to be converted to hypertext. Here, it is assumed that data a is designated as output data by a pointer to a list type.
[0056]
The internal data structure in FIG. 12 has the following five data types.
(1) Integer type The integer type is basic type data, and the type name is INT. For integer data, the value is output as a character string.
[0057]
{Circle around (2)} Character string type In the character string type, the basic type is data of the basic type, and the type name is STRING. String type data outputs its length and the contents of the string.
(3) List type The list type is a complex data type. The type name is LIST. There are two attribute names of partial data, CAR and CDR.
[0058]
(4) Pointer to list type A pointer to a list type is a reference type.
(5) NULL method This is a special basic type with data indicating the end of the list. The type name is NULL. Basic type data that has no value.
[0059]
FIG. 13 shows the hypertext converted from the runtime internal data structure of FIG. In this conversion, a new html text is generated as preprocessing. Name this text data. html. The conversion is performed according to the following procedure. FIG. 14 shows an image of the created screen, and FIG. 15 shows a description of a click operation on the screen.
1. Check the type information of the output data. Here, "pointer to list type" is a reference data type (steps S1 and S2).
2. It is checked whether the reference destination of the reference data is registered in the hyperlink table (step S7). At present, nothing is registered in the hyperlink table, so no data reference destination is registered (step S8).
3. A new hypertext "data-a.html" is generated (step S10).
4. A hyperlink to “data-a.html” is registered and output to “data.html” (step S11).
5. The output destination is "data-a.html", and the hypertext conversion algorithm is recursively called (step S12).
6. Check the type information of the output data. The data a is “list type composite data”, which is a composite data type (steps S1 and S2).
7. The composite data output subroutine is recursively called (step S6).
8. The composite data start character string "begin structure" is output to "data-a.html" (step S15).
9. The model name "LIST" is output (step S16).
10. First, the attribute “CAR” is output. The attribute name "CAR" is output (step S17).
11. The hypertext conversion algorithm is called recursively (step S18).
12. The type information of the data stored in the attribute “CAR” is checked. The data stored in the attribute “CAR” is “pointer to list type”, which is reference data (steps S1 and S2).
13. It is checked whether or not the reference destination of the reference data is registered in the hyperlink table (step S7). At present, data b is not registered in the table yet (step S8).
14. A new hypertext "data-b.html" is generated (step S10).
15. “Data-b.html” is registered in the hyperlink table, and output to “data-a.html” (step S11).
16. The output destination is hypertext "data-b.html", and the hypertext conversion algorithm is recursively called (step S12).
17. The type of the stored data is checked (step S1). The data b is a composite data type (step S2).
18. A composite data output subroutine is called (step S6).
19. The composite data start character string "begin structure" is output to "data-b.html" (step S15).
20. The model name "LIST" is output (step S16).
21. First, the attribute “CAR” is output. The attribute name "CAR" is output (step S17).
22. The hypertext conversion algorithm is recursively called (step S18).
23. The type information of the data stored in the attribute "CAR" is checked (step S1). The data stored in the attribute "CAR" is of a basic type (step S2).
24. Check the details of the data type information. In this case, it is an integer type (step S3).
25. The type name “INT” of the attribute “CAR” is output.
26. The stored integer value "10" is output as a character string (step S4).
27. Since the output is completed, the process returns to the caller of the hypertext conversion algorithm (call of 22) (step S5).
28. Next, the attribute “CDR” is output (step S19).
29. The attribute name "CDR" is output (step S17).
30. The hypertext conversion algorithm is recursively called (step S18).
31. The type information of the data stored in the attribute "CDR" is checked (step S1). The data stored in the attribute “CDR” is a basic data type (step S2).
32. Check the details of the data type information. In this case, it is a NULL type (step S3).
33. The type name "NULL" of the attribute "CDR" and the data "NULL" are output (step S4).
34. Since the hypertext conversion algorithm has been completed, the process returns to the caller (call of 30) (step S5).
35. Since there is no attribute name to be output (step S19), a composite data end character string "end structure" is output (step S20). This is the end of the output of the data b. The process returns from the composite data output subroutine to the caller (call 18). FIG. 14 shows the state of the hypertext “data-b.html” at this time.
36. Since the hypertext conversion algorithm has been completed, the process returns to the caller (call 16).
37. Since the hypertext conversion algorithm has been completed, the process returns to the caller (call 11).
38. Next, the attribute “CDR” of the data a is output (step S19).
39. The attribute name "CDR" is output (step S17).
40. The hypertext conversion algorithm is recursively called (step S18).
41. The type information of the data stored in the attribute "CDR" is checked (step S1). The data stored in the attribute “CDR” is “pointer to LIST”, which is a reference data type (step S2).
42. It is checked whether or not the reference destination of the reference data is registered in the hyperlink table (step S7). At this time, the data c has not yet been registered in the table (step S8).
43. A new hypertext "data-c.html" is generated (step S10), registered in the hyperlink table, and output (step S11).
44. The output destination is hypertext "data-c.html", and the hypertext conversion algorithm is recursively called (step S12).
45. The type of data to be output is checked (step S1). Since the data c has a complex data structure (step S2), a complex data output subroutine is called (step S6).
46. The composite data start character string "begin structure" is output to "data-c.html" (step S15).
47. The model name "LIST" is output (step S16).
48. First, the attribute “CAR” is output. The attribute name "CAR" is output (step S17).
49. The hypertext conversion algorithm is recursively called (step S18).
50. The type information of the data stored in the attribute "CAR" is checked (step S1). The data stored in the attribute "CAR" is of a basic type (step S2).
51. Check the details of the data type information. In this case, it is a character string type (step S3).
52. The type name “STRING” of the attribute “CAR” is output.
53. The character string length 3 and the contents of the character string "ABC" are output (step S4).
54. Since the hypertext conversion algorithm has been completed, the process returns to the calling source (call of 49) (step S5).
55. Next, the attribute “CDR” is output (step S19). The attribute name "CDR" is output (step S17).
56. The hypertext conversion algorithm is recursively called (step S18).
57. The type information of the data stored in the attribute "CDR" is checked (step S1). The data stored in the attribute “CDR” is a reference data type (step S2).
58. It is checked whether or not the reference destination of the reference data is registered in the hyperlink table (step S7). The data a has already been registered in the hyperlink table (step S8).
59. A hyperlink to the registered “data-a.html” is output to “data-c.html” (step S9).
60. Since the hypertext conversion algorithm has been completed, the process returns to the calling source (call of 56) (step S5).
61. Since the output of all the attributes has been completed (step S19), the end character string “end structure” of the composite data is output as “data-c.html” (step S20).
62. Since the composite data output subroutine has been completed, the process returns to the caller (call of 45). FIG. 14 shows the state of “data-c.html” at this time.
63. Since the hypertext conversion algorithm has been completed, the process returns to the caller (call of 44).
64. Since the hypertext conversion algorithm has been completed, the processing returns to the caller (call 40).
65. Since the output for all the attributes of the data a is completed (step S19), the end character string “end structure” of the composite data is output to “data-a.html” (step S20). As described above, since the conversion of the data a is completed, the process returns to the call source (call of 5 via 7).
66. As described above, since all the runtime data structures have been output, the algorithm ends (step S5).
[0060]
In this way, a runtime data structure can be stored. FIG. 16 shows an algorithm, a subroutine call, and a return relationship in the process of conversion to hypertext.
[0061]
Next, a process of restoring the internal data structure from the hypertext will be described. Here, a case where the internal data structure at the time of execution of FIG. 12 is restored from the hypertext of FIG. 13 will be described. In this restoration processing, a type information table is created as a pre-processing, and after the restoration destination of the stored data is previously secured inside the runtime internal data structure storage memory 21, the processing is executed according to the following procedure.
1. The first line of “data.html” is read, and a character string is read (step S31). At this time, the first line is a hyperlink to "data-a.html" (step S32).
2. The hyperlink table is searched to determine whether the pointer of the runtime data corresponding to "data-a.html" is registered (step S36). At this time, since it has not been registered yet (step S37), this hyperlink is passed to the data generation device, and a request for data generation is made (step S39).
3. The data generation device opens “data-a.html” (step S51).
4. The composite data start character string is read (step S52).
5. The type name is read (step S53).
6. The data size is obtained by searching the type information table (step S54).
7. A data area having a size of "list type" is newly secured (step S55).
8. The hyperlink to “data-a.html” and the head position of the secured data area are registered in the hyperlink table (step S56).
9. The current read position is once returned to the head position of "data-a.html" (step S57).
10. The data restoration algorithm is recursively called (step S58).
11. The character string is read and analyzed (step S31).
12. Since the character string represents the composite data start character string (step S32), the composite data restoration subroutine is recursively called (step S35).
13. The type name is read (step S41). The type information table is searched from the type name (step S42).
14. The attribute name is read (step S43). The attribute name read here is “CAR”.
15. The relative position information is taken out (step S45), the restoration position is calculated, and set to the current restoration position (step S46).
16. The data restoration algorithm is recursively called (step S47).
17. The character string is read (step S31). The character string read here is a hyperlink to “data-b.html” (step S32).
18. The hyperlink table is searched (step S36), and it is searched whether the pointer of the runtime data corresponding to "data-b.html" is registered. At this time, it has not been registered yet (step S37).
19. This hyperlink is passed to the data generation device, and the data generation algorithm is recursively called (step S39).
20. The data generation device opens “data-b.html” (step S51).
21. The complex data start character string is read from "data-b.html" (step S52).
22. Read the type name from “data-b.html”. The type name read here is "LIST" (step S53).
23. The type information corresponding to "LIST" is extracted from the type information table (step S54).
24. A data area having a size of "list type" is newly secured (step S55).
25. The hyperlink to “data-b.html” and the head position of the secured data area are registered in the hyperlink table (step S56).
26. The current read position is once returned to the head position of “data-b.html” (step S57).
27. The data restoration algorithm is recursively called (step S58).
28. A character string is read from "data-b.html" and analyzed (step S31).
29. Since the character string represents a composite data start character string (step S32), a composite data restoration subroutine is called (step S35).
30. The character string is read to obtain a type name (step S41).
31. The type information table is searched (step S42).
32. The attribute name is read (step S43). The attribute name read here is "CAR" (step S44).
33. The relative position information is taken out (step S45), the restoration position is calculated, and set to the current restoration position (step S46).
34. The data restoration algorithm is recursively called (step S47).
35. The character string of "data-b.html" is read (step S31). The character string input here is the type name "INT" (step S32).
36. The details of the data type are checked (step S33).
37. A character string is read from "data-b.html", converted to an integer value, and written to the current memory location (step S34).
38. The process returns from the data restoration algorithm to the caller (call of 34).
39. The attribute name is read from “data-b.html” (step S43). The attribute name read here is "CDR" (step S44).
40. The relative position information is taken out (step S45), the restoration position is calculated, and set to the current restoration position (step S46).
41. The data restoration algorithm is recursively called (step S47).
42. The character string of "data-b.html" is read (step S31). The character string input here is the type name "NULL" (step S32).
43. The details of the data type are checked (step S33).
44. The value NULL is written to the current memory location (step S34).
45. It returns from the data restoration algorithm to the caller (call 41).
46. The attribute name is read from “data-b.html” (step S43). The attribute name read here is the composite data end character string (step S44).
47. As described above, the composite data restoration subroutine is completed, and the process returns to the caller (call of 29).
48. As described above, since the data restoration algorithm has been completed, the process returns to the calling source (calling 27).
49. Since the generation of the data b has been completed, the data generation device returns the position of the newly generated data b to the caller (call 19) and returns.
50. The pointer to data b is written to data a (step S40).
51. Since the data restoration algorithm has been completed, the processing returns to the caller (call 16).
52. The attribute name is read from “data-a.html” (step S43). The attribute name read here is "CDR" (step S44).
53. The relative position information is taken out (step S45), the restoration position is calculated, and set to the current restoration position (step S46).
54. The data restoration algorithm is recursively called (step S47).
55. The character string is read (step S31). The character string read here is a hyperlink to "data-c.html" (step S32).
56. The hyperlink table is searched (step S36), and it is searched whether the pointer of the runtime data corresponding to "data-c.html" is registered. At this time, since it has not been registered yet (step S37), this hyperlink is passed to the data generation device, and a request for data generation is made (step S39).
57. The data generation device opens “data-c.html” (step S51).
58. The complex data start character string is read from "data-c.html" (step S52).
59. The type name is read from "data-c.html" (step S53). The type name read here is “LIST”.
60. The type information corresponding to "LIST" is extracted from the type information table (step S54).
61. A data area having a size of "list type" is newly secured (step S55).
62. The hyperlink to “data-c.html” and the head position of the secured data area are registered in the hyperlink table (step S56).
63. The current read position is once returned to the head position of "data-c.html" (step S57).
64. The data restoration algorithm is recursively called (step S58).
65. A character string is read from "data-c.html" and analyzed (step S31).
66. Since the character string represents a composite data start character string (step S32), a composite data restoration subroutine is called (step S35).
67. The character string is read to obtain a type name (step S41).
68. The type information table is searched (step S42).
69. The attribute name is read (step S43). The attribute name read here is "CAR" (step S44).
70. The relative position information is taken out (step S45), the restoration position is calculated, and set to the current restoration position (step S46).
71. The data restoration algorithm is recursively called (step S47).
72. A character string is read from "data-c.html" (step S31). The character string input here is the type name "STRING" (step S32).
73. The details of the data type are checked (step S33).
74. The length of the character string and the contents of the character string are read from "data-c.html", and written into the current memory location (step S34).
75. Since the data restoration algorithm has been completed, the process returns to the caller (call of 71).
76. The attribute name is read from "data-c.html" (step S43). The attribute name read here is "CDR" (step S44).
77. The relative position information is taken out (step S45), the restoration position is calculated, and set to the current restoration position (step S46).
78. The data restoration algorithm is recursively called (step S47).
79. A character string is read from "data-c.html" (step S31). The character string input here is a hyperlink to “data-a.html” (step S32).
80. The hyperlink table is searched to determine whether or not the pointer of the runtime data corresponding to "data-c.html" is registered (step S36). At this time, since the data corresponding to the hyperlink to “data-a.html” has already been registered (step S37), this pointer is written to the current memory location (step S38).
81. Since the data restoration algorithm has been completed, the process returns to the caller (call 78).
82. The attribute name is read from "data-c.html" (step S43). The attribute name read here is the composite data end character string (step S44).
83. As described above, the composite data restoring subroutine for the data c is completed, and the process returns to the calling source (calling 66).
84. As described above, the data restoration algorithm for the data c is completed, and the process returns to the calling source (calling 64).
85. Since the generation of the data c has been completed, the data generator returns the position of the newly generated data c, and returns to the caller (call of 56).
86. The pointer to data c is written to data a (step S40).
87. As described above, the data restoration algorithm for the data c is completed, and the process returns to the calling source (calling 54).
88. The attribute name is read from “data-a.html” (step S43). The attribute name read here is the composite data end character string (step S44).
89. Since the composite data restoration subroutine for the data a has been completed, the process returns to the caller (caller 12).
90. Since the data restoration algorithm for the data a has been completed, the process returns to the caller (caller 10).
91. Since the algorithm of the data generation device for the data a has been completed, the process returns to the caller (caller 2).
92. Thus, the restoration of the data a is completed.
[0062]
Finally, the conversion of the runtime internal data structure into hypertext, and conversely, the loading of a program for restoring the runtime internal data structure from hypertext into a computer will be described with reference to FIG. In the figure, a computer 51 is composed of a main body 54 and a memory 55. A program or the like can be loaded into the main body 54 from a portable storage medium 52, or can be supplied from a program provider via a network 53. It is also possible to load programs and the like.
[0063]
The programs described in claims 11 and 12 of the present invention and the programs shown in the flowcharts of FIGS. 3, 7, and 8 are stored in the memory 55 in FIG. 17, for example. The program is stored, and the program is executed by the main unit 54. Here, as the memory 55, for example, a random access memory (RAM) or a hard disk is used.
[0064]
In addition, a program for converting the internal data structure at the time of execution into hypertext and, on the contrary, restoring the internal data structure at the time of execution from the result of the conversion into the hypertext are recorded in the portable storage medium 52 and stored in the computer 51. By loading the program, it is also possible to convert between data structures and hypertext. As the portable storage medium 52, any commercially available and circulable storage medium such as a memory card, a floppy disk, a CD-ROM (compact disk read only memory), an optical disk, and a magneto-optical disk can be used. Further, a program for converting between the internal data structure at the time of execution and the hypertext is sent from the program provider to the computer 51 via the network 53, and the conversion is realized by loading the program. It is also possible.
[0065]
【The invention's effect】
As described in detail above, according to the present invention, the runtime internal data structure of an arbitrary application is converted into hypertext, so that the runtime internal data can be converted using an existing hypertext display device or hypertext editing device. The structure can be easily recognized, and the data can be easily modified or edited such as a change in the data structure. In addition, the use of existing hypertext transfer devices makes it possible to share run-time data structures with other systems interconnected by a network, thus streamlining the creation and modification of software assets. It greatly contributes to
[Brief description of the drawings]
FIG. 1 is a block diagram showing the principle configuration of the present invention.
FIG. 2 is a block diagram showing a configuration of a computer system as an embodiment of the data structure-hypertext conversion device of the present invention.
FIG. 3 is a flowchart of a hypertext conversion algorithm.
FIG. 4 is a diagram illustrating an example of a hyperlink table.
FIG. 5 is a flowchart of a composite data output subroutine.
FIG. 6 is a diagram illustrating an example of a data-hypertext conversion definition table.
FIG. 7 is a flowchart of a hypertext conversion algorithm using a data-hypertext conversion definition.
FIG. 8 is a flowchart of a data restoration algorithm.
FIG. 9 is a flowchart of a composite data restoration subroutine.
FIG. 10 is a diagram showing an example of a type information table.
FIG. 11 is a flowchart of a data generation algorithm.
FIG. 12 is a diagram showing an example of a runtime internal data structure.
FIG. 13 is a diagram showing a result of converting the data structure of FIG. 12 into hypertext.
14 is a diagram showing an image of a screen displayed by converting the data structure of FIG. 12 into hypertext.
15 is an explanatory diagram of a click operation on the screen in FIG.
FIG. 16 is a diagram showing a call-out and return relationship of an algorithm in a specific example of conversion to hypertext.
FIG. 17 is a diagram illustrating loading of a program for implementing a data structure-hypertext conversion into a computer.
[Explanation of symbols]
1 Hypertext conversion means
2 Hypertext storage means
3 Central processing unit (CPU)
12 memory
13 Hyper Text Holder
14 Hyper Text Display
15 Hyper Text Editing Device
16 Hypertext transfer device
21 Runtime internal data structure storage memory
22 Hyper Text Converter
23 Data structure restoration device
24 Data generator
25 Data-Hypertext Conversion Definition Storage Memory

Claims (1)

任意のアプリケーションのデータを含む実行時内部データ構造をハイパーテキストに変換するデータ構造−ハイパーテキスト変換装置であって、
前記データを含む実行時内部データ構造をハイパーテキストに変換するハイパーテキスト変換手段と、
ハイパーリンク情報とアドレス情報とを対応付けて管理するハイパーリンクテーブルとを有し、
前記ハイパーテキスト変換手段は、基本データ変換手段と複合データ変換手段と参照データ変換手段からなり、
前記基本データ変換手段は、作成中のハイパーテキストに対し変換対象の基本データの情報を出力し、
前記複合データ変換手段は、前記ハイパーテキスト変換手段を再帰的に呼び出すことで作成中のハイパーテキストに対して変換対象の複合データの全項目に関する情報を出力し、
前記参照データ変換手段は、前記ハイパーリンクテーブルを参照して、参照先のアドレスが登録されているか否かを判定し、登録されている場合には登録されていたハイパーリンクを作成中のハイパーテキストに対して出力し、登録されていなかった場合新たなハイパーテキストを作成し、前記ハイパーテキスト変換手段を再帰的に呼び出すことで参照先のアドレスのデータに関する情報を新たに作成したハイパーテキストに出力する、とともに、前記ハイパーリンクテーブルに新たに作成したハイパーテキストと参照先のアドレスとを対応付けて登録する、
ことを特徴とするデータ構造−ハイパーテキスト変換装置。
A data structure-hypertext conversion device for converting a runtime internal data structure containing data of an arbitrary application into hypertext,
Hypertext conversion means for converting a runtime internal data structure containing the data into hypertext,
A hyperlink table for managing the hyperlink information and the address information in association with each other,
The hypertext conversion means comprises basic data conversion means, composite data conversion means, and reference data conversion means,
The basic data conversion means outputs information of the basic data to be converted to the hypertext being created,
The composite data conversion unit outputs information on all items of the composite data to be converted to the hypertext being created by recursively calling the hypertext conversion unit,
The reference data conversion unit refers to the hyperlink table to determine whether or not a reference destination address is registered. If the address is registered, the registered hyperlink is being created. And if it is not registered, creates a new hypertext and recursively calls the hypertext conversion means to output information on the data of the address of the reference destination to the newly created hypertext. And registering the newly created hypertext and the address of the reference destination in the hyperlink table in association with each other,
A data structure-hypertext converter.
JP20889897A 1996-08-05 1997-08-04 Data structure-hypertext converter Expired - Fee Related JP3544607B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20889897A JP3544607B2 (en) 1996-08-05 1997-08-04 Data structure-hypertext converter

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP20594396 1996-08-05
JP8-205943 1996-08-05
JP20889897A JP3544607B2 (en) 1996-08-05 1997-08-04 Data structure-hypertext converter

Publications (2)

Publication Number Publication Date
JPH10116214A JPH10116214A (en) 1998-05-06
JP3544607B2 true JP3544607B2 (en) 2004-07-21

Family

ID=26515345

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20889897A Expired - Fee Related JP3544607B2 (en) 1996-08-05 1997-08-04 Data structure-hypertext converter

Country Status (1)

Country Link
JP (1) JP3544607B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03174636A (en) * 1989-12-01 1991-07-29 Matsushita Electric Ind Co Ltd Method and device for converting file
JPH08194597A (en) * 1995-01-12 1996-07-30 Nec Corp Storing system for information on embodyment of hypertext interface
US5781914A (en) * 1995-06-30 1998-07-14 Ricoh Company, Ltd. Converting documents, with links to other electronic information, between hardcopy and electronic formats

Also Published As

Publication number Publication date
JPH10116214A (en) 1998-05-06

Similar Documents

Publication Publication Date Title
Finnigan et al. The software bookshelf
US6279015B1 (en) Method and apparatus for providing a graphical user interface for creating and editing a mapping of a first structural description to a second structural description
RU2365978C2 (en) Programming interface for computing platform
US8086560B2 (en) Schema mapping specification framework
US6986101B2 (en) Method and apparatus for converting programs and source code files written in a programming language to equivalent markup language files
US6169547B1 (en) Method for displaying an icon of media data
US6550054B1 (en) Method for representing terminal-based applications in the unified modeling language
US20050210000A1 (en) Semantic web portal graphic interface
US20020178290A1 (en) Method and system for converting user interface source code of a legacy application to web pages
US20040015834A1 (en) Method and apparatus for generating serialization code for representing a model in different type systems
US20040015840A1 (en) Mechanism for converting between JAVA classes and XML
US20070079299A1 (en) Method, apparatus and program storage device for representing eclipse modeling framework (EMF) ecore models in textual form
JP2004503841A (en) Method and system for reporting XML data from legacy computer systems
JPH1091447A (en) Catalogue device for promoting reusage of distributed object in distribution object system
US6973655B2 (en) System and method of integrating software components
JPH11175329A (en) Application linking method and device therefor
JP4282312B2 (en) Web server, Web server having Java servlet function, and computer program
Zhu 5SGraph: A modeling tool for digital libraries
KR19990038731A (en) Metadata Model and Modeling Method for Electronic Documents, Metadata Management System and Management Method
JP3544607B2 (en) Data structure-hypertext converter
JP2001125855A (en) Dynamic web page generation program
Gaedke et al. A repository to facilitate reuse in component-based web engineering
JP3964259B2 (en) PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, AND PROGRAM GENERATION PROGRAM
US7934193B2 (en) Processing a module specification to produce a module definition
EP1862924A1 (en) Object-oriented system for mapping structered information to different structured information

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040305

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: 20040330

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040405

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: 20080416

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100416

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140416

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees