JPH06250828A - Module managing system for library - Google Patents

Module managing system for library

Info

Publication number
JPH06250828A
JPH06250828A JP3228293A JP3228293A JPH06250828A JP H06250828 A JPH06250828 A JP H06250828A JP 3228293 A JP3228293 A JP 3228293A JP 3228293 A JP3228293 A JP 3228293A JP H06250828 A JPH06250828 A JP H06250828A
Authority
JP
Japan
Prior art keywords
program
module
library
time
modules
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP3228293A
Other languages
Japanese (ja)
Other versions
JP3481268B2 (en
Inventor
Norio Tamura
典男 田村
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 JP3228293A priority Critical patent/JP3481268B2/en
Publication of JPH06250828A publication Critical patent/JPH06250828A/en
Application granted granted Critical
Publication of JP3481268B2 publication Critical patent/JP3481268B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/54Link editing before load time

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To prevent memory occupation and overhead from being increased at the time of execution by efficiently connecting a library to an application program at the time of compiling. CONSTITUTION:This module managing system is constituted of a compiler 2 for converting a program 1 into an executable object code 5, a library 3 for sorting and storing modules to be connected to the program 1 as the 1st and 2nd module groups F1, F2 in accordance with a difference in using frequency to be forecasted and a connection control part 4 for connecting a module to the program 1 at the time of compiling or executing the program 1. The control part 4 loads only the 1st module group F1 supposed to have high using frequency from the library 3 at the time of initial compiling and connects the module group F1 to the program 1. When a connection request for a module included in the 2nd module group F2 is outputted from the program 1 at the time of executing the program 1, the necessary module is loaded from the 2nd module group F2 in the library 3 and connected to the program 1.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、コンパイル時における
応用プログラムにライブラリを結合する技術に適用して
有効な技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique effectively applied to a technique of combining a library with an application program at the time of compilation.

【0002】[0002]

【従来の技術】応用プログラムにおいて、コンパイル時
に関数ライブラリモジュールを結合する方式としては、
以下のものが知られている。 (1).スタティックリンク(実行前結合)方式 実行される可能性のあるモジュールを全て実行前に結合
しておく方式である。この方式によれば、実行時にあら
かじめ必要なモジュールが既に前もって結合されている
ため、実行処理を高速に行える利点がある (2).ダイナミックリンク(実行要求時結合)方式 それぞれのモジュールを実行時に必要になった時点で
(要求にしたがって)メモリにローディングして結合す
る方式である。この方式によれば、実行時の必要な時点
で随時モジュールをロードするため、高価なメモリ資源
を希にしか必要とならないモジュールのために占有され
てしまうことがなく、応用プログラムの記述時における
自由度を向上させることができる。
2. Description of the Related Art In an application program, as a method of combining function library modules at the time of compilation,
The following are known: (1). Static link (combination before execution) This is a method in which all modules that may be executed are combined before execution. According to this method, the necessary modules are already combined in advance at the time of execution, so there is an advantage that the execution processing can be performed at high speed. (2) Dynamic link (execution request combination) method Each module is required at execution time. When it becomes, it is a method to load and combine it in the memory (as requested). According to this method, modules are loaded as needed at the time of execution, so expensive memory resources are not occupied by the modules that are rarely needed, and there is no freedom when writing application programs. The degree can be improved.

【0003】[0003]

【発明が解決しようとする課題】しかし、スタティック
リンク方式、ダイナミックリンク方式ともに前記の利点
に対して下記のような技術的課題を残している。
However, both the static link system and the dynamic link system have the following technical problems with respect to the above advantages.

【0004】すなわち、スタティックリンク方式では、
全てのモジュールをあらかじめ応用プログラムに結合し
ておくため、メモリ量が増大しプログラム設計の柔軟性
が損なわれるという問題があった。
That is, in the static link system,
Since all modules are combined with the application program in advance, there is a problem that the amount of memory increases and the flexibility of program design is impaired.

【0005】一方、ダイナミックリンク方式では、必要
に応じてモジュールをロードするため、スタティックリ
ンク方式に較べてメモリ量は抑制できるものの、実行時
のモジュールのローディングのオーバヘッドが増大し、
実行速度が低下する可能性があった。
On the other hand, in the dynamic link method, the module is loaded as needed, so that the memory amount can be suppressed as compared with the static link method, but the overhead of loading the module at the time of execution increases,
Execution speed could be reduced.

【0006】前記ダイナミックリンク方式の一形態であ
る特開平2−271430号公報では、LISP等のプ
ログラムとデータとが同一の構文形式を採るシステムに
おいて、プログラムをコンパイルして実行する際に、あ
らかじめ原始プログラムからコンパイラによって実行可
能なプログラムコードに関する情報を得ておき、プログ
ラムコードの実行中に新たに生成したプログラムを実行
する際に、前記情報中に新たに必要となるモジュールが
存在しない場合には必要なモジュールをライブラリから
探し出して実行中のプログラムコードに連結する技術が
開示されている。
In Japanese Patent Laid-Open No. 2-2714030, which is one form of the dynamic link method, when a program is compiled and executed in a system in which a program and data, such as LISP, have the same syntax format, the source code is preliminarily set. It is necessary when the information about the program code that can be executed by the compiler is obtained from the program and the newly generated module is executed during the execution of the program code, and there is no newly required module in the information. There is disclosed a technique for locating such a module from a library and connecting it to the program code being executed.

【0007】前記公報によれば、LISP等のプログラ
ムとデータとが同一の構文形式である言語に限定されて
おり、本来はインタープリタの配下で実行されるシステ
ムを想定し、これを動的に生成されるプログラムに対応
できるようにしたものである。
According to the above-mentioned publication, a program such as LISP is limited to a language having the same syntax format as data, and a system which is originally executed under the interpreter is assumed and dynamically generated. It is designed to be compatible with the programs that are used.

【0008】そのため、FORTRANやC言語等のよ
うに、インタプリタによる制御が存在せずにOS配下で
直接オブジェクトが動作する通常のコンパイラ言語には
適用できなかった。
Therefore, it cannot be applied to a normal compiler language such as FORTRAN or C language in which an object operates directly under the OS without control by an interpreter.

【0009】本発明は、前記課題に鑑みてなされたもの
であり、その目的はコンパイラ形式における汎用的な応
用プログラムに対してライブラリモジュールの結合を効
率的に行うことにある。
The present invention has been made in view of the above problems, and an object thereof is to efficiently combine library modules with a general-purpose application program in a compiler format.

【0010】[0010]

【課題を解決するための手段】本発明は、図1の原理図
に示すように、プログラム1を実行可能なオブジェクト
コードに変換するコンパイラ2と、プログラム1の実行
時にこのプログラム1に結合するためのモジュールを、
予想される使用頻度の差によって第1のモジュール群と
第2のモジュール群に分類して格納したライブラリ3
と、前記プログラム1のコンパイル時または実行時に前
記プログラム1に前記モジュールを結合させる結合制御
部4とを有するシステム構成とし、前記結合制御部4に
おいて、初期コンパイル時には前記ライブラリ3から高
い使用頻度が予想される第1のモジュール群(F1)の
みをロードしてプログラム1に結合しておくとともに、
その後のプログラム実行時において当該プログラム1よ
り前記第2のモジュール群(F2)に含まれるモジュー
ルの結合要求があった場合に前記ライブラリ3の第2の
モジュール群から必要なモジュールをロードしてプログ
ラム1に結合するようにした。
According to the present invention, as shown in the principle diagram of FIG. 1, a compiler 2 for converting a program 1 into an executable object code and a compiler 2 for connecting to the program 1 when the program 1 is executed. The module of
A library 3 that is classified and stored into a first module group and a second module group according to the expected difference in usage frequency.
And a coupling control unit 4 for coupling the module to the program 1 at the time of compiling or executing the program 1, and the coupling control unit 4 expects a high usage frequency from the library 3 at the time of initial compilation. Loaded only the first module group (F1) to be linked to the program 1, and
When a program included in the second module group (F2) is requested to be combined by the program 1 at the time of executing the program thereafter, a necessary module is loaded from the second module group of the library 3 to execute the program 1 To be combined with.

【0011】[0011]

【作用】前記のように、ライブラリ3を予め使用頻度が
高いと予想される第1のモジュール群(F1)と、比較
的使用頻度が低いと予想される第2のモジュール群(F
2)とに分類分けしておき、初期コンパイル時には前記
第1のモジュール群(F1)のみをプログラム1に結合
しておき、プログラム実行時において結合されていない
モジュール(第2のモジュール群(F2)に属するモジ
ュール)の結合要求が発生したときに適宜第2のモジュ
ール群(F2)から必要なモジュールをロードしてプロ
グラム1に結合することにより、実行時のメモリ量の増
大を防止でき、プログラム設計の柔軟性を確保できる。
As described above, the library 3 is preliminarily expected to be frequently used in the first module group (F1) and the second module group (F1) is expected to be relatively infrequently used.
2), and only the first module group (F1) is connected to the program 1 at the time of initial compilation, and the modules not connected at the time of program execution (second module group (F2)). (Modules belonging to the same), a necessary module is appropriately loaded from the second module group (F2) and coupled to the program 1 to prevent an increase in the amount of memory at the time of execution. The flexibility of can be secured.

【0012】また、使用頻度の高いモジュール(F1)
は初期コンパイル時に予めプログラム1に結合しておく
ため、プログラム実行時に頻繁にモジュールをロードす
るというオーバヘッドの増大を抑制できる。
Further, a frequently used module (F1)
Is linked to the program 1 at the time of initial compilation, it is possible to suppress an increase in the overhead of frequently loading the module when the program is executed.

【0013】さらに本発明では、ライブラリ3に格納さ
れたモジュールの各エントリを登録するアドレステーブ
ルを設けてモジュール群を区別することによって、一つ
のライブラリファイルでありながら、このファイルに格
納されている使用頻度の異なるモジュール群(F1,F
2)を区別することができる。
Further, according to the present invention, an address table for registering each entry of the module stored in the library 3 is provided to distinguish the module group, so that the usage stored in this file can be used even though it is one library file. Modules with different frequencies (F1, F
2) can be distinguished.

【0014】なお、本発明では、モジュールの結合に際
して予め下記のモードを用意しておき、結合モードを初
期コンパイル時に選択するようにしてもよい。 第1モード:前記プログラム1の初期コンパイル時に前
記ライブラリ3の全てのモジュールをロードして前記プ
ログラム1に結合しておく、 第2モード:前記プログラム1の初期コンパイル時には
モジュールの結合を行わずに、プログラム実行時におい
て当該プログラム1より前記ライブラリ3に含まれるモ
ジュールの結合要求があった場合にその都度前記ライブ
ラリ3より必要なモジュールをロードしてプログラム1
に結合する、 第3モード:前記コンパイラ2による初期コンパイル時
には前記ライブラリ3から高い使用頻度が予想される第
1のモジュール群(F1)のみをロードしてプログラム
1に結合しておくとともに、プログラム実行時において
当該プログラム1より前記第2のモジュール群(F2)
に含まれるモジュールの結合要求があった場合にのみ前
記ライブラリ3の第2のモジュール群(F2)から必要
なモジュールをロードしてプログラム1に結合する。
In the present invention, the following modes may be prepared in advance when modules are combined, and the combination mode may be selected at the time of initial compilation. First mode: all modules of the library 3 are loaded and linked to the program 1 at the initial compilation of the program 1, second mode: modules are not linked at the initial compilation of the program 1, When there is a request from the program 1 to combine the modules included in the library 3 when the program is executed, the necessary modules are loaded from the library 3 each time the program 1 is executed.
Third mode: At the time of initial compilation by the compiler 2, only the first module group (F1), which is expected to be frequently used, is loaded from the library 3 and coupled to the program 1, and the program is executed. The second module group (F2) from the program 1
Only when there is a request to combine the modules included in the above, the necessary modules are loaded from the second module group (F2) of the library 3 and combined with the program 1.

【0015】このようにコンパイル処理に際して、前記
3つのモードのいずれかを選択することにより、プログ
ラムの特性に応じたモジュールのロードおよび結合が実
現でき、コンパイル処理およびプログラムの実行処理を
効率化できる。
As described above, by selecting one of the three modes in the compiling process, the modules can be loaded and combined according to the characteristics of the program, and the compiling process and the program execution process can be made efficient.

【0016】[0016]

【実施例】以下、本実施例を図に基づいて説明する。本
実施例の機能構成をブロック図で示したものが図2であ
る。
EXAMPLE This example will be described below with reference to the drawings. FIG. 2 is a block diagram showing the functional configuration of this embodiment.

【0017】同図において、コンパイラ2および結合制
御部4は、通常の場合コンピュータシステムにおいて、
所定のコンパイルソフトウエアによって作動されるマイ
クロプロセッサ等の主制御部6内に設定されている。
In the figure, the compiler 2 and the connection control unit 4 are normally used in a computer system.
It is set in the main control unit 6 such as a microprocessor operated by predetermined compilation software.

【0018】応用プログラム1は、磁気記憶装置、光記
憶装置等の外部記憶部を通じて順次図示しない主記憶部
にロードされる。ライブラリ3およびアドレステーブル
5も必要に応じて結合制御部4によって(後述)主記憶
部にロードされ前記応用プログラム1と結合処理され
る。
The application program 1 is sequentially loaded into a main storage unit (not shown) through an external storage unit such as a magnetic storage unit or an optical storage unit. The library 3 and the address table 5 are also loaded into the main storage unit (described later) by the binding control unit 4 as necessary and are linked with the application program 1.

【0019】応用プログラム1を開発する際に、応用プ
ログラム1(本体)に対して所定の関数ライブラリ3を
モジュール化して結合する処理が行われるが、この応用
プログラム1とモジュールとの関係を図3に簡単に示
す。
When the application program 1 is developed, a process of modularizing a predetermined function library 3 into the application program 1 (main body) and combining them is performed. The relationship between the application program 1 and the modules is shown in FIG. Here is a brief description.

【0020】同図では応用プログラム1(本体)に対し
て、便宜上、f1〜f4のモジュールが存在しており、
このうち第1のモジュール群(F1:f2,f3)は実
行される可能性(頻度)の比較的高いモジュールで構成
されている。ここで、実行可能性(頻度)が比較的高い
モジュールとしては、たとえば入出力機能モジュール、
実行領域管理機能モジュール等が挙げられる。
In the figure, for convenience, there are modules f1 to f4 for the application program 1 (main body).
Of these, the first module group (F1: f2, f3) is composed of modules having a relatively high possibility of being executed (frequency). Here, as the module having relatively high executability (frequency), for example, an input / output function module,
An execution area management function module and the like are included.

【0021】また、第2のモジュール群(F2:f1,
f4)は実行される可能性(頻度)の比較的低いモジュ
ールで構成されている。たとえば例外処理機能モジュー
ル、特殊機能モジュール等である。
The second module group (F2: f1,
f4) is composed of modules having a relatively low possibility of being executed (frequency). For example, it is an exception processing function module, a special function module, or the like.

【0022】以上に説明したモジュール(f1〜f4)
は、後述のアドレステーブル5を用いることにより、単
一のモジュールファイルとして扱うことができる。モジ
ュールを応用プログラム1のコンパイル時にどのように
扱うかについて、本実施例では以下の3つのモードを用
意している。 (1).第1モード(図4) 実行可能性(頻度)の高低に拘らず、可能性のある全て
のモジュール(f1,f2,f3,f4)を実行前に全
て結合しておくモードであり、比較的小さなステップで
構成された応用プログラム1、あるいは実行時に高速処
理が要求される応用プログラム1に適している。コンパ
イル後の実行可能(オブジェクト)プログラム1の概念
は図4に示すようになる。 (2).第2モード(図5) 実行前には一切のモジュールを結合せずに、応用プログ
ラム1の実行段階で必要に応じてモジュールを応用プロ
グラム1に結合するモードである。比較的ステップ数が
大規模で、実行時にさほど処理速度が要求されない応用
プログラム1に適している。コンパイル後の実行可能
(オブジェクト)プログラム1の概念は図5に示すよう
になる。 (3).第3モード(図6) 本発明において特徴的なモードである。すなわち、コン
パイル時には、実行可能性(頻度)の高い第1モジュー
ル群(F1)に属するモジュール(f2,f3)のみを
応用プログラム1結合しておく。このモードは、一般的
な応用プログラム1に適しており、比較的実行される可
能性の低いモジュール(f1,f4)はコンパイル時に
は結合されていないため、貴重なメモリ資源を使用頻度
の低いモジュールで占拠されてしまうことを防止でき
る。また、実行可能性の高いモジュール(f2,f3)
はコンパイル時に応用プログラムに既に結合されている
ため、プログラム実行時のオーバヘッドの増大は抑止で
きる。
The modules (f1 to f4) described above
Can be treated as a single module file by using the address table 5 described later. In this embodiment, the following three modes are prepared as to how to handle the module when compiling the application program 1. (1). First mode (Fig. 4) This is a mode in which all possible modules (f1, f2, f3, f4) are combined before execution, regardless of the possibility of execution (frequency). Therefore, it is suitable for the application program 1 configured with relatively small steps or the application program 1 requiring high-speed processing at the time of execution. The concept of the executable (object) program 1 after compilation is as shown in FIG. (2). Second mode (FIG. 5) In this mode, the modules are combined with the application program 1 as needed at the execution stage of the application program 1 without combining any modules before execution. It is suitable for the application program 1 which has a relatively large number of steps and does not require a high processing speed at the time of execution. The concept of the executable (object) program 1 after compilation is as shown in FIG. (3). Third Mode (FIG. 6) This is a characteristic mode in the present invention. That is, at the time of compilation, only the modules (f2, f3) belonging to the first module group (F1) having a high executability (frequency) are combined with the application program 1 in advance. This mode is suitable for general application programs 1, and the modules (f1, f4) that are relatively unlikely to be executed are not combined at compile time, so valuable memory resources are used by modules that are rarely used. It can prevent being occupied. In addition, modules with high feasibility (f2, f3)
Since is already bound to the application program at compile time, it is possible to suppress the increase in overhead at the time of program execution.

【0023】本実施例において、モード選択が特にオプ
ション指定されていない場合には本モードによってコン
パイル処理が行われる。本モードのコンパイル後の実行
可能(オブジェクト)プログラム1の概念は図6に示す
ようになる。
In the present embodiment, when the mode selection is not designated as an option, the compile processing is performed in this mode. The concept of the executable (object) program 1 after compilation in this mode is as shown in FIG.

【0024】以上の3つのモードのいずれを選択するか
は、たとえばコンパイル命令に引数(パラメータ)を付
加することによって決定することもできるが、前記結合
制御部4が応用プログラム1の特性、たとえば全体のス
テップ数、関数呼出命令の数、当該応用プログラム1の
メモリ占有率等を統計的に処理して決定してもよい。こ
のような統計処理を行うために図11に示すように、結
合制御部4に統計処理部7を設けてもよい。
Which of the above three modes should be selected can be determined, for example, by adding an argument (parameter) to the compile instruction. The number of steps, the number of function call instructions, the memory occupation rate of the application program 1 and the like may be statistically processed and determined. In order to perform such statistical processing, a statistical processing section 7 may be provided in the connection control section 4 as shown in FIG.

【0025】前記各モードの差異は、具体的には図8に
示すようなアドレステーブル5の各モジュール(f1〜
fn)のエントリをどのように書き換えるかという点に
現れる。
The difference between the above-mentioned modes is specifically that each module (f1 to f1) of the address table 5 as shown in FIG.
It appears in how to rewrite the entry of fn).

【0026】これを図7のコンパイル時のアドレステー
ブル5の書換処理フローを用いて説明する。まず、結合
制御部4は、アドレステーブル5のf1〜fnの全エン
トリの登録値を”0”に更新(リセット)する(ステッ
プ701)。
This will be described with reference to the rewriting processing flow of the address table 5 at the time of compilation in FIG. First, the combination controller 4 updates (resets) the registered values of all the entries of f1 to fn in the address table 5 to "0" (step 701).

【0027】次に、結合処理部4は、前述のいずれのモ
ードが選択されているかを判断する。このモード選択は
前述のようにコンパイル命令に続く引数(パラメータ)
を読み取って処理を分岐させても良いし、図11に示し
た統計処理部7からの出力値に基づいて処理を分岐させ
てもよい。
Next, the combination processing unit 4 determines which of the above-mentioned modes is selected. This mode selection is the argument (parameter) following the compile instruction as described above.
May be read to branch the process, or the process may be branched based on the output value from the statistical processing unit 7 shown in FIG.

【0028】ここで、第1モードが選択されている場合
(702)、このときはアドレステーブル5のf1〜f
nの全てのエントリにそれぞれのモジュールのアドレス
を書き込み(703)、実行可能(オブジェクト)プロ
グラム1を出力する(704)。このようにエントリに
アドレスが登録されているモジュールは、応用プログラ
ム1の実行時に当該モジュールについて「参照あり」を
意味することになる。
Here, when the first mode is selected (702), at this time, f1 to f of the address table 5 are selected.
The address of each module is written in all the entries of n (703), and the executable (object) program 1 is output (704). The module whose address is registered in the entry in this manner means “with reference” for the module when the application program 1 is executed.

【0029】次に、第2モードが選択されている場合
(705)、このときはコンパイル時にモジュールの結
合を一切行わないため、ステップ701で更新されたま
ま、すなわちf1〜fnの全エントリが”0”の状態の
まま実行可能(オブジェクト)プログラム1を出力す
る。
Next, when the second mode is selected (705), at this time, no module combination is performed at the time of compilation, so that the module remains updated in step 701, that is, all entries of f1 to fn are ". The executable (object) program 1 is output in the state of "0".

【0030】最後に、前記第1および第2モードのいず
れも選択されていない場合は、第3モードが選択された
ものとして、アドレステーブル5の第1モジュール群
(F1)に属するモジュール(f2,f3)のエントリ
にのみそれぞれのアドレスを書き込む(706)。これ
によって使用可能性(頻度)の高いモジュール(f2,
f3)のみが「参照あり」の状態となる。
Finally, if neither the first mode nor the second mode is selected, it is determined that the third mode is selected, and the modules (f2, f2) belonging to the first module group (F1) of the address table 5 are selected. Each address is written only in the entry of f3) (706). As a result, the module (f2,
Only f3) is in the “referenced” state.

【0031】次に、応用プログラム実行時の処理につい
て図9および図10を用いて説明する。応用プログラム
1の実行時において、ライブラリ3の参照命令が検出さ
れると、主制御部6は結合制御部4を起動する。そして
所定の結合処理を完了すると再度応用プログラム1の実
行状態に復帰する(図9)。
Next, the processing when the application program is executed will be described with reference to FIGS. 9 and 10. When the reference instruction of the library 3 is detected during execution of the application program 1, the main control unit 6 activates the coupling control unit 4. When the predetermined combining process is completed, the execution state of the application program 1 is restored again (FIG. 9).

【0032】応用プログラム1の実行時における前記結
合制御部4の処理の流れを示したものが図10である。
この処理をわかりやすくするために、コンパイル時に第
3モードが選択されモジュール(f2,f3)が結合さ
れた応用プログラム1が実行されているものと仮定す
る。
FIG. 10 shows the processing flow of the connection control section 4 when the application program 1 is executed.
In order to make this processing easy to understand, it is assumed that the application program 1 in which the third mode is selected at the time of compilation and the modules (f2, f3) are combined is being executed.

【0033】まず、結合制御部は、応用プログラム1中
で参照命令がなされたモジュールのアドレステーブル5
のエントリを検出する。そしてこの登録値に当該モジュ
ールのアドレスが登録されているかあるいは”0”が登
録されているかを判定する。
First, the connection control unit uses the address table 5 of the module to which the reference instruction is given in the application program 1.
Find an entry for. Then, it is determined whether the address of the module is registered or "0" is registered in this registration value.

【0034】ここで、エントリに”0”が登録されてい
る場合には、コンパイル時における当該モジュールの参
照は「無し」であることを意味しているので、当該ライ
ブラリ3のモジュールをロードする(102)。
Here, when "0" is registered in the entry, it means that the reference of the relevant module at the time of compilation is "none", so the module of the relevant library 3 is loaded ( 102).

【0035】前記仮定のように、たとえば参照命令がな
されたモジュールがコンパイル時(プログラム実行前)
に結合されていないモジュール(f1)である場合に
は、このモジュール(f1)が新たにライブラリ3より
ロードされ(102)、アドレステーブル5の該当エン
トリ(f1)にそのアドレスが登録されるとともに、こ
のアドレスに分岐し、当該モジュールが実行される(1
03)。
As in the above assumption, for example, the module to which the reference instruction is applied is compiled (before the program is executed).
If the module (f1) is not coupled to the module (f1), this module (f1) is newly loaded from the library 3 (102), and its address is registered in the corresponding entry (f1) of the address table 5. Branch to this address and execute the module (1
03).

【0036】一方、ステップ101において、エントリ
に当該モジュール(たとえばf2)のアドレスが既に登
録されている場合(「参照あり」の場合)には、ステッ
プ103にジャンプしてコンパイル時に登録された(図
7:ステップ706)アドレスに分岐し、応用プログラ
ム1に既に結合されている当該モジュールが実行される
(103)。
On the other hand, in step 101, when the address of the module (for example, f2) is already registered in the entry (in the case of "with reference"), the process jumps to step 103 and is registered at the time of compilation (Fig. 7: Step 706) Branch to the address and the relevant module already linked to the application program 1 is executed (103).

【0037】本実施例によれば、リンカ等の具体的な結
合手段(OS)は変更することなく、アドレステーブル
の登録の仕方を変更するのみで、多彩な結合態様を実現
することができる。
According to the present embodiment, various coupling modes can be realized by changing the registration method of the address table without changing the concrete coupling means (OS) such as the linker.

【0038】またOSとは独立した結合制御手段とアド
レステーブルとによって結合処理が管理されているた
め、インタープリタ配下の管理機構で結合処理が制御さ
れる場合に比べて自由度が高い。
Further, since the binding process is managed by the binding control means and the address table independent of the OS, the degree of freedom is higher than that when the binding process is controlled by the management mechanism under the interpreter.

【0039】[0039]

【発明の効果】本発明によれば、コンパイラ形式におけ
る応用プログラムのライブラリモジュールの結合をプロ
グラムの特性に合わせて効率的に行うことができる。
According to the present invention, the library modules of the application program in the compiler format can be efficiently combined according to the characteristics of the program.

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

【図1】本発明の原理図FIG. 1 is a principle diagram of the present invention.

【図2】実施例の機能構成を示すブロック図FIG. 2 is a block diagram showing a functional configuration of an embodiment.

【図3】実施例において応用プログラムとモジュールと
の関係を示す説明図
FIG. 3 is an explanatory diagram showing a relationship between an application program and modules in the embodiment.

【図4】実施例の第1モードにおける実行可能(オブジ
ェクト)プログラムの概念を示す説明図
FIG. 4 is an explanatory diagram showing the concept of an executable (object) program in the first mode of the embodiment.

【図5】実施例の第2モードにおける実行可能(オブジ
ェクト)プログラムの概念を示す説明図
FIG. 5 is an explanatory diagram showing the concept of an executable (object) program in the second mode of the embodiment.

【図6】実施例の第3モードにおける実行可能(オブジ
ェクト)プログラムの概念を示す説明図
FIG. 6 is an explanatory diagram showing the concept of an executable (object) program in the third mode of the embodiment.

【図7】実施例におけるコンパイル時のアドレステーブ
ルの書き換え処理を示すフロー図
FIG. 7 is a flowchart showing an address table rewriting process at the time of compilation in the embodiment.

【図8】実施例におけるアドレステーブルを示す説明図FIG. 8 is an explanatory diagram showing an address table in the embodiment.

【図9】実施例における応用プログラムと結合制御部と
の処理関係を示す説明図
FIG. 9 is an explanatory diagram showing a processing relationship between the application program and the connection control unit in the embodiment.

【図10】実施例における結合処理部の処理を示すフロ
ー図
FIG. 10 is a flowchart showing the processing of the join processing unit in the embodiment.

【図11】実施例の機能構成の変形例を示すブロック図FIG. 11 is a block diagram showing a modification of the functional configuration of the embodiment.

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

1・・プログラム 2・・コンパイラ 3・・ライブラリ 4・・結合制御部 5・・アドレステーブル 6・・主制御部 7・・統計処理部 1-Program 2-Compiler 3-Library 4-Coupling control unit 5-Address table 6-Main control unit 7-Statistical processing unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 プログラム(1)を実行可能なオブジェ
クトコードに変換するコンパイラ(2)と、 プログラム(1)の実行時にこのプログラム1に結合す
るためのモジュールを予想される使用頻度の差によって
第1のモジュール群(F1)と第2のモジュール群(F
2)に分類して格納したライブラリ(3)と、 前記プログラム(1)のコンパイル時または実行時に前
記プログラム(1)に前記モジュールを結合させる結合
制御部(4)とを有し、 前記結合制御部(4)は、前記コンパイラ(2)による
コンパイル時には前記ライブラリ(3)から高い使用頻
度が予想される第1のモジュール群(F1)のみをロー
ドしてプログラム(1)に結合しておくとともに、その
後のプログラム実行時において当該プログラム(1)よ
り前記第2のモジュール群(F2)に含まれるモジュー
ルの結合要求があった場合に前記ライブラリ(3)の第
2のモジュール群(F2)から必要なモジュールをロー
ドしてプログラム(1)に結合するライブラリ(3)の
モジュール管理方式。
1. A compiler (2) for converting a program (1) into an executable object code, and a module for coupling the program (1) at the time of execution of the program (1) with a difference in expected frequency of use. The first module group (F1) and the second module group (F
A library (3) classified and stored in 2), and a coupling control unit (4) for coupling the module to the program (1) when the program (1) is compiled or executed. The section (4) loads only the first module group (F1) which is expected to be frequently used from the library (3) at the time of compilation by the compiler (2) and combines it with the program (1). , Required from the second module group (F2) of the library (3) when the program (1) requests the combination of the modules included in the second module group (F2) during the subsequent program execution. Module management method of library (3) that loads various modules and combines them with program (1).
【請求項2】 前記結合制御部(4)は、以下の結合モ
ード、すなわち、 第1モード:前記プログラム(1)のコンパイル時に前
記ライブラリ(3)の全てのモジュールをロードして前
記プログラム(1)に結合しておく、 第2モード:前記プログラム(1)のコンパイル時には
モジュールの結合を行わずに、プログラム実行時におい
て当該プログラム(1)より前記ライブラリ(3)に含
まれるモジュールの結合要求があった場合にその都度前
記ライブラリ(3)より必要なモジュールをロードして
プログラム(1)に結合する、 第3モード:前記コンパイラ(2)によるコンパイル時
には前記ライブラリ(3)から高い使用頻度が予想され
る第1のモジュール群(F1)のみをロードしてプログ
ラム(1)に結合しておくとともに、プログラム実行時
において当該プログラム(1)より前記第2のモジュー
ル群(F2)に含まれるモジュールの結合要求があった
場合にのみ前記ライブラリ(3)の第2のモジュール群
から必要なモジュールをロードしてプログラム(1)に
結合する、 このいずれかのモードによる結合処理を実行する請求項
1記載のライブラリのモジュール管理方式。
2. The combination control unit (4) loads the all modules of the library (3) at the time of compiling the program (1) in the following combination mode, that is, the first mode: 2nd mode: The module (1) is not linked at the time of compiling the program (1), and a request to link the modules included in the library (3) is issued from the program (1) when the program is executed. Whenever there is, a necessary module is loaded from the library (3) and combined with the program (1). Third mode: a high usage frequency is expected from the library (3) when compiling by the compiler (2). Only the first module group (F1) to be loaded and linked to the program (1), Only when there is a request from the program (1) to combine the modules included in the second module group (F2) during execution of the program, the necessary modules are loaded from the second module group of the library (3). 2. The library module management method according to claim 1, wherein the connection processing is executed in any one of the modes by executing the connection processing according to any one of the modes.
【請求項3】 前記結合制御部(4)は、ライブラリ
(3)に格納されたモジュールの各エントリを登録する
アドレステーブル(5)を備えており、プログラムの実
行時に前記エントリの登録値によって当該モジュールを
ロードするか否かを判定する請求項1または2記載のラ
イブラリのモジュール管理方式。
3. The combination control unit (4) comprises an address table (5) for registering each entry of a module stored in the library (3), and the address table (5) registers the entry value of the entry at the time of execution of a program. 3. The library module management method according to claim 1, wherein it is determined whether or not to load the module.
【請求項4】 前記結合制御部(4)は、プログラム
(1)の特性を監視する統計処理部(7)を備えてお
り、この統計処理部(7)の出力結果によって前記アド
レステーブル(5)のエントリの登録値を変更する請求
項3記載のライブラリのモジュール管理方式。
4. The connection control unit (4) comprises a statistical processing unit (7) for monitoring the characteristics of the program (1), and the address table (5) is output according to the output result of the statistical processing unit (7). 4. The module management method of the library according to claim 3, wherein the registered value of the entry of [1] is changed.
JP3228293A 1993-02-22 1993-02-22 Library module management method Expired - Fee Related JP3481268B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3228293A JP3481268B2 (en) 1993-02-22 1993-02-22 Library module management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3228293A JP3481268B2 (en) 1993-02-22 1993-02-22 Library module management method

Publications (2)

Publication Number Publication Date
JPH06250828A true JPH06250828A (en) 1994-09-09
JP3481268B2 JP3481268B2 (en) 2003-12-22

Family

ID=12354621

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3228293A Expired - Fee Related JP3481268B2 (en) 1993-02-22 1993-02-22 Library module management method

Country Status (1)

Country Link
JP (1) JP3481268B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1293895A2 (en) 2001-09-14 2003-03-19 Ricoh Company Program execution apparatus, method for creating an executable program and address solution method
JP2008021249A (en) * 2006-07-14 2008-01-31 Fuji Xerox Co Ltd Image processing device and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1293895A2 (en) 2001-09-14 2003-03-19 Ricoh Company Program execution apparatus, method for creating an executable program and address solution method
JP2008021249A (en) * 2006-07-14 2008-01-31 Fuji Xerox Co Ltd Image processing device and program
US8203733B2 (en) 2006-07-14 2012-06-19 Fuji Xerox Co., Ltd. Image processing apparatus, storage medium in which image processing program is stored, and image processing method

Also Published As

Publication number Publication date
JP3481268B2 (en) 2003-12-22

Similar Documents

Publication Publication Date Title
US6651080B1 (en) Techniques for implementing pluggable virtual machines
JP5897816B2 (en) Dependency graph parameter scoping
CA2358010C (en) Data processing system and operating system
KR950001416B1 (en) Program processing system and method
US20060095483A1 (en) Modified computer architecture with finalization of objects
US6983458B1 (en) System for optimizing data type definition in program language processing, method and computer readable recording medium therefor
JPH02272627A (en) Digital computer system and method of invocation of procedure of the same
JPH01154267A (en) Incorporating system for input/output device control program of operating system
WO2005103924A1 (en) Modified computer architecture with initialization of objects
US20040268301A1 (en) Adding new compiler methods to an integrated development environment
JPH11110194A (en) Connection method to external library function and recording medium in which the connection method is recorded and programmed
JP2002525707A (en) An accurate method for virtual call inlining
US20170147299A1 (en) System and method for optimizing multiple invocations of graphics processing unit programs in java
US7401335B2 (en) Single stack kernel
US6101326A (en) Method and apparatus for frame elimination for simple procedures with tail calls
US20060107258A1 (en) Program, program code optimization method, program code compile method, program code, and information processing system
JP2005129001A (en) Apparatus and method for program execution, and microprocessor
JPH06250828A (en) Module managing system for library
US11435989B2 (en) Thread-local return structure for asynchronous state machine
US6748503B1 (en) System and method facilitating unmanaged code participation in garbage collection
JP3241214B2 (en) Distributed processing apparatus and process execution method
US7065760B2 (en) Reducing the memory footprint of applications executed in a virtual machine
US5765148A (en) Database processing apparatus and database processing method for variable length objects, and computer-readable memory medium for storing database processing program
US6311227B1 (en) Procedure calling method
US7039905B1 (en) Compiler device and computer-readable recording medium recorded with compiler program

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020423

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

Free format text: PAYMENT UNTIL: 20071010

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081010

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees