Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0644232B2 - Multiple data storage area allocation method with forward and backward nesting structure - Google Patents
[go: Go Back, main page]

JPH0644232B2 - Multiple data storage area allocation method with forward and backward nesting structure - Google Patents

Multiple data storage area allocation method with forward and backward nesting structure

Info

Publication number
JPH0644232B2
JPH0644232B2 JP59106208A JP10620884A JPH0644232B2 JP H0644232 B2 JPH0644232 B2 JP H0644232B2 JP 59106208 A JP59106208 A JP 59106208A JP 10620884 A JP10620884 A JP 10620884A JP H0644232 B2 JPH0644232 B2 JP H0644232B2
Authority
JP
Japan
Prior art keywords
data
storage area
backward
length
nesting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP59106208A
Other languages
Japanese (ja)
Other versions
JPS60250437A (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 JP59106208A priority Critical patent/JPH0644232B2/en
Publication of JPS60250437A publication Critical patent/JPS60250437A/en
Publication of JPH0644232B2 publication Critical patent/JPH0644232B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理システムに関するものであり、特に
前方および後方への入れ子構造をもつ複数データの記憶
領域割り付け処理方式に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing system, and more particularly to a storage area allocation processing method for a plurality of data having a front and rear nested structure.

〔従来技術〕[Prior art]

たとえばプログラムでは、使用するデータとして他の所
定範囲のロケーション(記憶位置)にあるデータを参照
する、いわゆる入れ子(ネスト)構造をとっている場合
が少なくない。この場合順次のデータを記憶領域へ割り
付けて行く際に、それらの入れ子を解決して実際に参照
するロケーションの範囲の長さを求め代入する処理が必
要となる。
For example, in many cases, a program has a so-called nested structure, which refers to data at a location (storage position) in another predetermined range as data to be used. In this case, when allocating the sequential data to the storage area, it is necessary to solve the nesting of the data and calculate and substitute the length of the range of the location actually referred to.

第2図は、このような入れ子構造をもつデータを参照す
るプログラムの例を示す。ただし、この例ではロケーシ
ョンが割当てられているが、このロケーションは最終的
な値であり、このロケーションを解決するために、本方
法が用いられる。この例では、ロケーション100の要
素がAからBまでのロケーションの範囲を参照してお
り、ロケーションの長さは(B−A)で算出される。し
かし、(B−A)内にはロケーション300の要素にそ
の段階で不確定な入れ子(D−C)があるため、最初の
段階では長さ(B−A)を決定することができない。そ
こでロケーション300の要素の入れ子の長さ(D−
C)を算出し、これに基づいて(B−A)の全体の長さ
を決定している。このようにして入れ子を含むデータ長
さが確定すれば、データを先頭から順次記憶領域へ割り
付けることができる。
FIG. 2 shows an example of a program that refers to data having such a nested structure. However, although the location is assigned in this example, this location is the final value and the method is used to resolve this location. In this example, the element of the location 100 refers to the location range from A to B, and the length of the location is calculated by (BA). However, the length (BA) cannot be determined in the first stage because the elements of location 300 have an uncertain nesting (DC) in that stage in (BA). So the nesting length of the element at location 300 (D-
C) is calculated and the total length of (B-A) is determined based on this. When the data length including the nest is determined in this way, the data can be sequentially allocated from the beginning to the storage area.

第3図は,さらに複雑な前方および後方への入れ子構造
をもつデータ列の例を示し、第4図は従来におけるその
記憶領域割り付け処理とを示したものである。
FIG. 3 shows an example of a data string having a more complicated forward and backward nested structure, and FIG. 4 shows the conventional storage area allocation processing.

第3図において、実線はデータ列に対応する1本のロケ
ーション列を説明の便宜上分割して示したもので、
i),ii),iii)はそれぞれ実線の接続部を表してい
る。また△印は入れ子をもつことにより長さが未決定な
ロケーションを示し、そして△印のロケーションから発
する2本の点線は入れ子となる他のロケーションの範囲
を示している。なお△印のロケーションには標識として
乃至の番号を付してある。
In FIG. 3, the solid line shows one location sequence corresponding to the data sequence, divided for convenience of explanation.
i), ii), and iii) respectively represent solid line connecting portions. Further, the triangle mark indicates a location whose length is undetermined due to the nesting, and the two dotted lines emanating from the triangle mark location indicate the range of other nesting locations. It should be noted that the locations marked with Δ are marked with the numbers 1 to 3 as markers.

第4図は、第3図のデータ列を矢印で示す順方向に繰り
返し走査して、1回の走査ごとに入れ子が解決される未
決定ロケーションの番号を表している。すなわち、第1
回目の走査ではロケーションの入れ子しか解決できな
い。2回目にはロケーションの入れ子が解決できる。
これはロケーションが参照する範囲に含まれるロケー
ションが既に第1回目の走査で長さが決定済であるか
らである。しかし、他の未決定ロケーション,,
,,はいずれも入れ子の長さが不確定のままであ
る。次の第3回目の走査では、ロケーションとの入
れ子が解決し、第4回目にはロケーションが解決し、
第5回目にはロケーションが解決し、そして第6回目
には最後のロケーションが解決する。
FIG. 4 shows the numbers of the undetermined locations where nesting is resolved for each scan by repeatedly scanning the data string of FIG. 3 in the forward direction indicated by the arrow. That is, the first
The second scan can only resolve location nesting. The second time, nesting of locations can be resolved.
This is because the location included in the range referred to by the location has already been determined in length in the first scan. But other pending locations ...
The nesting length of both, and remains indeterminate. In the next third scan, nesting with locations is resolved, and in the fourth, locations are resolved,
The fifth time the location resolves, and the sixth time the last location resolves.

このように従来方式によれば、入れ子が前方および後方
に存在する場合を含む第3図の例では、全ロケーション
が確定し、記憶領域が割り付け可能となるまで6回の走
査が必要であった。
As described above, according to the conventional method, in the example of FIG. 3 including the case where the nests are present in the front and the rear, it is necessary to perform six scans until all the locations are determined and the storage areas can be allocated. .

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

従来方式ではデータの入れ子が前方および後方に存在す
るような複雑な構造になる程そのようなデータ列を記憶
領域に割り付ける処理に手間がかかり、処理効率が低下
するという問題点があった。本発明はこの問題点を解決
することを目的とする。
In the conventional method, the more complicated the structure in which data nests exist in the front and the rear, the more time and effort it takes to allocate such a data string to the storage area, resulting in a problem of reduced processing efficiency. The present invention aims to solve this problem.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、前方および後方への入れ子構造をもつ複数デ
ータの記憶領域割り付け処理の高速化を図るため、ある
ロケーションの入れ子となるロケーションがその前方に
あれば順方向走査が有効であり、他方入れ子となるロケ
ーションが後方にあれば逆方向走査が有効であることに
着目して、入れ子解決のための走査を逆方向と順方向と
で交互に繰り返すことにより、1回の走査で解決可能な
入れ子に遭遇する可能性を高めるものであり、その構成
として、データ処理システムにおいて、前方および後方
への入れ子構造を含み要素順に配列された複数のデータ
とその決定されたデータ長とを記憶するための第1の手
段と、該第1の手段に保持されているデータ配列を指示
により配列の逆方向あるいは順方向に走査し、入れ子構
造をもつデータのうち可能なものについてのみ入れ子を
解決してその未決定のデータ長を決定し、当該データの
データ長として第1の手段に書き込む第2の手段と、上
記第2の手段に対して指示を行い、データの入れ子構造
が全て解決し、全てのデータのデータ長が決定されるま
で逆方向と順方向の走査を交互に実行させる第3の手段
とをそなえ、データ長が決定されたデータ配列について
ロケーションの順に記憶領域を割り付けることを特徴と
している。
According to the present invention, in order to speed up the process of allocating a storage area for a plurality of data having forward and backward nested structures, forward scanning is effective if a location to be nested at a certain location is located in front of it, while the other is nested. Focusing on the fact that the backward scan is effective if the location that becomes the backward position is effective, the nest can be solved by one scan by alternately repeating the backward scan and the forward scan for the backward resolution. The data processing system is configured to store a plurality of data arranged in element order including a forward and backward nesting structure and the determined data length in the data processing system. The first means and the data array held by the first means are scanned in the reverse direction or the forward direction of the array according to the instruction, and the data having the nested structure The second means for writing the data as the data length of the data into the first means and the second means are instructed by solving nesting only for possible data to determine the undecided data length. , A third means for alternately executing the backward scan and the forward scan until the data nesting structures are all resolved and the data lengths of all the data are determined. It is characterized by allocating storage areas in order of location.

〔実施例〕〔Example〕

以下に、本発明の詳細を実施例にしたがって説明する。 Hereinafter, details of the present invention will be described according to examples.

はじめに第3図に例示されたデータ列に本発明方式を適
用した場合の記憶領域割り付け処理を第5図に示す。
First, FIG. 5 shows a storage area allocation process when the method of the present invention is applied to the data string illustrated in FIG.

第5図において、第1回目は逆方向走査であり、ロケー
ション、,の入れ子を解決することができる。第
2回目は順方向走査であり、ロケーションの入れ子が
解決できる。第3回目は再び逆方向走査であり、ロケー
ション,,の入れ子が解決し、これで全てのロケ
ーションが確定する。次の第4回目は順方向走査である
がこのとき先頭のロケーションから順に記憶領域を割り
付ける。
In FIG. 5, the first scan is a backward scan, and nesting of locations ,, can be resolved. The second time is a forward scan, where location nesting can be resolved. The third time is the backward scan again, and the nesting of locations ,, is resolved, and all the locations are fixed. The next fourth time is forward scanning, but at this time, storage areas are allocated in order from the beginning location.

このように本発明方式によれば、第4図に示した従来方
式の場合にくらべて走査回数を大幅に削減することがで
きる。
As described above, according to the method of the present invention, the number of scans can be significantly reduced as compared with the case of the conventional method shown in FIG.

第1図は本発明の1実施例システムの構成図であり、第
6図はその処理フロー図である。第1図において1は処
理データ記憶部、2は長さ決定処理部、3は制御部、4
は記憶漁期割り当て処理部、5は結果データ記憶部を表
す。次に、第6図の処理フロー図を参照しつつ、第1図
の実施例システムの動作機能を説明する。
FIG. 1 is a block diagram of a system according to an embodiment of the present invention, and FIG. 6 is a processing flow chart thereof. In FIG. 1, 1 is a processing data storage unit, 2 is a length determination processing unit, 3 is a control unit, 4
Is a memory fishing season assignment processing unit, and 5 is a result data storage unit. Next, the operation function of the embodiment system of FIG. 1 will be described with reference to the processing flow chart of FIG.

処理データ記憶部1には、要素名と、データの“長さ”
が決定済みであるか否かを表すフラグ(“0”=決定と
する)と、“長さ”と、データの各領域が設けられてい
る。図示の例では要素A、Bがそれぞれ他のロケーショ
ン(B1−A1)、(D1−C1)を参照する入れ子構
造をとっていて長さが未決定であり、他の要素A1,B
1,B2は4バイトの長さをもつものとして決定済みで
ある。
The processed data storage unit 1 stores the element name and the "length" of the data.
A flag ("0" = determined) indicating whether or not has been determined, "length", and each data area are provided. In the illustrated example, the elements A and B have a nested structure that refers to other locations (B1-A1) and (D1-C1), respectively, and the length is undecided.
1 and B2 have already been determined as having a length of 4 bytes.

長さ決定処理部2は処理データ記憶部1を逆あるいは順
方向に走査し、入れ子構造のデータ要素であるためにロ
ケーションが不確定であるような要素を順次取り出し
て、解決可能であればその入れ子のロケーション間差で
ある“長さ”を求めて処理データ記憶部1の長さ領域に
書き込み、そして同時にフラグを“1”にセットして決
定済みを表示させる。走査を逆方向に行うか順方向に行
うかは制御部3からの指示にしたがう。また長さ決定処
理部2は走査を1回終了するたびに制御部3へ通知す
る。
The length determination processing unit 2 scans the processed data storage unit 1 in the reverse direction or in the forward direction, and sequentially takes out elements whose locations are uncertain because they are data elements having a nested structure. The "length", which is the difference between the nesting locations, is calculated and written in the length area of the processing data storage unit 1, and at the same time, the flag is set to "1" to display the determined. Whether the scanning is performed in the reverse direction or the forward direction depends on the instruction from the control unit 3. Further, the length determination processing unit 2 notifies the control unit 3 every time the scanning is completed once.

制御部3は、長さ決定処理部2からの通知にしたがっ
て、逆方向走査終了時に記憶領域割り当て処理部4に処
理を要求して、可能なものについて記憶領域割り当てを
行わせる(第6図参照)。
In response to the notification from the length determination processing unit 2, the control unit 3 requests the storage area allocation processing unit 4 to perform processing at the end of the backward scanning, and causes the storage area allocation to be performed for possible storage areas (see FIG. 6). ).

記憶領域割り当て処理部4は、処理データ記憶部1から
要素ごとに“長さ”とデータとを読み出し、各要素ごと
のデータに“長さ”によって示される大きさの記憶領域
すなわちロケーションを割り付けて、結果データ記憶部
5に格納する。しかし、処理データ記憶部1中に要素に
解決未済の要素があれば制御部3にその旨を通知する
(第6図参照)。
The storage area allocation processing unit 4 reads "length" and data for each element from the processed data storage unit 1, and allocates a storage area or location of a size indicated by "length" to the data for each element. , In the result data storage unit 5. However, if there is an unsolved element in the processed data storage unit 1, the control unit 3 is notified to that effect (see FIG. 6).

これにより制御部3は、走査方向を順方向に反転して、
走査実行を長さ決定処理部2へ指示する。長さ決定処理
部2は処理データ記憶部1を順方向に走査して不確定要
素の解決処理を行い、走査終了時に制御部3へ終了を通
知する(第6図参照)。
As a result, the control unit 3 reverses the scanning direction to the forward direction,
Instruct the length determination processing unit 2 to execute scanning. The length determination processing unit 2 scans the processed data storage unit 1 in the forward direction to solve the uncertain elements, and notifies the control unit 3 of the end when the scanning is completed (see FIG. 6).

制御部3はこれに応答して走査方向を逆方向にした走査
実行を長さ決定処理部2へ指示する(第6図参照)。
長さ決定処理部2は逆方向走査を行い、不確定要素があ
れば解決し、前回と同様に走査終了時に制御部3へ通知
し、記憶領域割り当て処理部4の処理を要求する。
In response to this, the control unit 3 instructs the length determination processing unit 2 to execute scanning with the scanning direction reversed (see FIG. 6).
The length determination processing unit 2 performs backward scanning, resolves any uncertain elements, notifies the control unit 3 at the end of scanning as in the previous time, and requests the processing of the storage area allocation processing unit 4.

このようにして、全ての不確定要素について解決と記憶
領域割り当てが完了したとき、動作は終了する。
In this way, when the solution and storage area allocation have been completed for all the uncertain elements, the operation ends.

〔発明の効果〕〔The invention's effect〕

以上のように、本発明によれば前方および後方への入れ
子構造をもつ複数データの記憶領域割り当てが従来より
も著しく高速化され、たとえば入れ子の複雑さにもよる
が数倍程度の高速化が得られる場合があり、処理効率の
改善に役立てることができる。
As described above, according to the present invention, the storage area allocation of a plurality of data having a forward and backward nested structure is significantly speeded up as compared with the conventional one, and for example, the speed can be increased several times depending on the complexity of nesting. In some cases, it can be obtained, which can be useful for improving the processing efficiency.

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

第1図は本発明の1実施例システムの構成図、第2図は
入れ子構造のデータをもつプログラムの説明図、第3図
は前方および後方への入れ子構造をもつデータの1例の
説明図、第4図は従来方式による記憶領域割り当て処理
の説明図、第5図は本発明方式に基づく記憶領域割り当
て処理の説明図、第6図は第1図に示した実施例システ
ムの処理フロー図である。 図中、1は処理データ記憶部、2は長さ決定処理部、3
は制御部、4は記憶領域割り当て処理部、5は結果デー
タ記憶部を示す。
FIG. 1 is a block diagram of a system according to an embodiment of the present invention, FIG. 2 is an explanatory diagram of a program having nested data, and FIG. 3 is an explanatory diagram of an example of data having a forward and backward nested structure. FIG. 4 is an explanatory diagram of a storage area allocation process according to the conventional method, FIG. 5 is an explanatory diagram of the storage area allocation process according to the present invention method, and FIG. 6 is a process flow diagram of the embodiment system shown in FIG. Is. In the figure, 1 is a processing data storage unit, 2 is a length determination processing unit, 3
Is a control unit, 4 is a storage area allocation processing unit, and 5 is a result data storage unit.

フロントページの続き (72)発明者 林 登喜雄 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 昭58−178453(JP,A)Front page continuation (72) Inventor Tokio Hayashi 1015 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Fujitsu Limited (56) Reference JP-A-58-178453 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】データ処理システムにおいて,前方および
後方への入れ子構造を含み要素順に配列された複数のデ
ータとその決定されたデータ長とを記憶するための第1
の手段と,該第1の手段に保持されているデータ配列を
指示により配列の逆方向あるいは順方向に走査し,入れ
子構造をもつデータのうち可能なものについてのみ入れ
子を解決してその未決定のデータ長を決定し,当該デー
タのデータ長として第1の手段に書き込む第2の手段
と,上記第2の手段に対して指示を行い,データの入れ
子構造が全て解決し,全てのデータのデータ長が決定さ
れるまで逆方向と順方向の走査を交互に実行させる第3
の手段とをそなえ,データ長が決定されたデータ配列に
ついてロケーションの順に記憶領域を割り付けることを
特徴とする前方および後方への入れ子構造をもつ複数デ
ータの記憶領域割り付け処理方式。
1. A first data storage system for storing a plurality of data arranged in element order including a forward and backward nesting structure and a determined data length thereof.
Means and the data array held by the first means are scanned in the reverse direction or the forward direction of the array according to the instruction, and nesting is resolved only for possible data having a nested structure, and its undecided The second means for writing the data length of the data to the first means as the data length of the data and the second means are instructed to solve all the nested structures of the data, Third, alternating reverse and forward scanning until the data length is determined
The method of allocating a storage area for a plurality of data having a forward and backward nesting structure, characterized by allocating a storage area in the order of location for a data array whose data length is determined.
JP59106208A 1984-05-25 1984-05-25 Multiple data storage area allocation method with forward and backward nesting structure Expired - Lifetime JPH0644232B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59106208A JPH0644232B2 (en) 1984-05-25 1984-05-25 Multiple data storage area allocation method with forward and backward nesting structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59106208A JPH0644232B2 (en) 1984-05-25 1984-05-25 Multiple data storage area allocation method with forward and backward nesting structure

Publications (2)

Publication Number Publication Date
JPS60250437A JPS60250437A (en) 1985-12-11
JPH0644232B2 true JPH0644232B2 (en) 1994-06-08

Family

ID=14427738

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59106208A Expired - Lifetime JPH0644232B2 (en) 1984-05-25 1984-05-25 Multiple data storage area allocation method with forward and backward nesting structure

Country Status (1)

Country Link
JP (1) JPH0644232B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58178453A (en) * 1982-04-13 1983-10-19 Fujitsu Ltd Calculation system of data size of group item

Also Published As

Publication number Publication date
JPS60250437A (en) 1985-12-11

Similar Documents

Publication Publication Date Title
EP0166525A2 (en) Method of pixel to vector conversion in an automatic picture coding system
EP0147701B1 (en) Image rotation method
JPS5850589A (en) Display processor
KR930003413B1 (en) Image processing system that performs local processing of images at high speed
JPH0644232B2 (en) Multiple data storage area allocation method with forward and backward nesting structure
US5283840A (en) Method and apparatus for extracting image data
US5311307A (en) Image processing method
US6480231B1 (en) Efficiently de-interlacing a buffer of image data
JPH021421B2 (en)
JPS6048776B2 (en) Combined calling method for programs in storage devices
JPH0522629A (en) Video signal processor
JPS6348054A (en) Picture information inputting device
JP3115701B2 (en) Image processing device
JPH07192130A (en) Temporary labeling method
JPS63155366A (en) Forming system for cubic form
JPH0251783A (en) parallel image processing device
JPH0793529A (en) Scan format converter
JP2647377B2 (en) Image processing device
JPS6348052A (en) Image information input device
JP3098473B2 (en) Information processing apparatus and information processing system
JP2945028B2 (en) Image processing designated area information calculation device
JPS58163078A (en) Line thinning processing system
JP2008217515A (en) Image data access method
JPH0877338A (en) Method and device for storing image data
JPS61251364A (en) Image sampling device