JPH0764798A - Program translation system - Google Patents

Program translation system

Info

Publication number
JPH0764798A
JPH0764798A JP22964993A JP22964993A JPH0764798A JP H0764798 A JPH0764798 A JP H0764798A JP 22964993 A JP22964993 A JP 22964993A JP 22964993 A JP22964993 A JP 22964993A JP H0764798 A JPH0764798 A JP H0764798A
Authority
JP
Japan
Prior art keywords
program
compression
translation
information
conversion
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
JP22964993A
Other languages
Japanese (ja)
Other versions
JP2806468B2 (en
Inventor
Masanori Kato
雅典 加藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP5229649A priority Critical patent/JP2806468B2/en
Publication of JPH0764798A publication Critical patent/JPH0764798A/en
Application granted granted Critical
Publication of JP2806468B2 publication Critical patent/JP2806468B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To reduce a translation time by providing compression/conversion program information and updating only header information but not regenerating an object code with respect to the changing of a program which does not influence to the execution of the program. CONSTITUTION:A translation processing is continued based on compression/ conversion program information 2-2 and if there is no translation error, an object is updated. Then, header information 2-1 is updated so as to leave a fact that translation is instructed whether an object code 2-3 changes or not. After this, a comparing processing means 1-4 compare-processes compression/ conversion program information prepared by the present translation processing and compression/conversion program information 2-2 in the object 1-6. Then, when they are the same, the object code is not generated and the translation processing is finished and when both pieces of compression/conversion program information are different, object generation is instructed to an object generation means 1-5.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はプログラム翻訳方式に関
し、特にプログラム実行に影響を与えない変更の際のオ
ブジェクトコードの生成方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program translation method, and more particularly to a method of generating an object code when making a change that does not affect the program execution.

【0002】[0002]

【従来の技術】従来、この種の翻訳方式は、翻訳指示に
もとづき、無条件にオブジェクト生成を行うか、翻訳の
ための条件(コンパイラの版、オプション等)を管理し
て原始プログラムが修正されておらず、条件が同一の時
のみ翻訳処理を中止する方式となっていた。
2. Description of the Related Art Conventionally, in this type of translation method, an object is unconditionally generated based on a translation instruction, or a source program is modified by managing a translation condition (compiler version, option, etc.). However, the translation process was stopped only when the conditions were the same.

【0003】特開平3−142630号公報では、プロ
グラム変更要因情報を比較することにより、生成される
オブジェクトプログラムがすでに存在するものと同一で
あると予想されるものに関しては、コンパイル処理を終
了させることによりコンパイル時間の短縮を図るとい
う、コンパイル時間の短縮方式が記載されている。
In Japanese Laid-Open Patent Publication No. 3-142630, by comparing program change factor information, the compilation process is terminated for the object program that is expected to be the same as one that already exists. Describes a method of shortening the compilation time, which aims to shorten the compilation time.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の処理方
式は、翻訳指示により無条件にオブジェクトを置換する
ことによる翻訳処理が長時間化するという欠点がある。
The above-mentioned conventional processing method has a drawback in that the translation processing by unconditionally replacing an object by a translation instruction takes a long time.

【0005】また、オブジェクト変更要因にもとづく差
分の比較では翻訳条件の管理しか行えず、原始プログラ
ムの一部(たとえばプログラム実行に関係のない部分、
例えばコメントのみの修正等)が変更されるとオブジェ
クトの再生成が行われてしまうという欠点があった。
In comparison of differences based on object change factors, only translation conditions can be managed, and a part of a source program (for example, a part not related to program execution,
For example, there is a drawback that the object is regenerated when the comment only is modified).

【0006】[0006]

【課題を解決するための手段】高級プログラミング言語
で記述されたプログラムを機械語に翻訳する処理におい
て、原始プログラムを読み込んで、マクロ等を原始プロ
グラム中に展開するプログラム展開処理手段と、展開後
の原始プログラムから空白行やコメント文字等のプログ
ラムの実行に影響を与えない部分を削除しながら原始プ
ログラム中の名標を一定の規則にもとづく内部生成名に
置換し、圧縮・変換プログラム情報を作成する名標変換
処理手段と、圧縮・変換プログラム情報を翻訳し、エラ
ーがなければ、オブジェクト中の翻訳日付や版数等で構
成されるヘッダー情報を更新するヘッダー情報更新手段
と、オブジェクト中に存在する旧圧縮・変換プログラム
情報と、現在作成中の圧縮・変換プログラム情報を比較
し、同一ならオブジェクトコードの再生成を行わず翻訳
処理を終了し、異なる場合オブジェクトコードの再生成
を指示する比較処理手段と、オブジェクトの再生成が指
示された時に、オブジェクトコードを置き換えるオブジ
ェクト生成手段を有している。
In the process of translating a program written in a high-level programming language into a machine language, a program expansion processing unit that reads a source program and expands a macro or the like into the source program, and a program expansion processing unit after expansion. While deleting blank lines and comment characters that do not affect the execution of the program from the source program, replace the name tag in the source program with an internally generated name based on certain rules to create compression / conversion program information. The name conversion processing means, the header information updating means for translating the compression / conversion program information, and if there is no error, updating the header information composed of the translation date and version number in the object, and the header information updating means existing in the object. The old compression / conversion program information is compared with the compression / conversion program information currently being created. It has a comparison processing unit that terminates the translation process without regenerating the object code, and instructs the regeneration of the object code if different, and an object generation unit that replaces the object code when the regeneration of the object is instructed. There is.

【0007】[0007]

【実施例】次に本発明の一実施例について図面を参照し
て説明する。
An embodiment of the present invention will be described with reference to the drawings.

【0008】図1は本発明の構成を表わす図である。ま
た図2は本発明によって生成されるオブジェクトの構成
を表わす図である。
FIG. 1 is a diagram showing the configuration of the present invention. FIG. 2 is a diagram showing the structure of an object generated by the present invention.

【0009】高級言語で記述されたプログラムを翻訳す
る際に、プログラム展開処理手段1−1は、マクロや登
録集という形で別に作成された処理本体やデータ定義部
分をプログラム中に取り込む。
When translating a program written in a high-level language, the program development processing means 1-1 incorporates into the program a processing body and a data definition portion which are separately created in the form of a macro or a registry.

【0010】このようにして展開されたプログラムは、
最終のオブジェクトを作るために必要な情報と不必要な
情報とから構成されている。
The program developed in this way is
It is composed of necessary information and unnecessary information for creating the final object.

【0011】名標変換処理手段1−2は、プログラムの
圧縮を行うとともに、プログラム中の名標を一定の規則
(例えば、出現順に通番を付与する等)にもとづき変換
を実施していく。つまり、プログラム中に存在するプロ
グラム実行に影響を与えない空白行や、空白文字、コメ
ント文を削除して、原始プログラムを圧縮し、さらにプ
ログラム中の名標(データ名やラベル)を内部生成名に
置きかえる。この結果作成される情報は圧縮・変換プロ
グラム情報2−2と呼ばれ、オブジェクト1−6を構成
する一部となる。
The name conversion processing means 1-2 compresses the program and also converts the name in the program according to a certain rule (for example, assigning serial numbers in the order of appearance). In other words, blank lines, blank characters, and comment statements that do not affect the program execution existing in the program are deleted, the source program is compressed, and the name tag (data name or label) in the program is generated internally. To replace. The information created as a result is called compression / conversion program information 2-2 and is a part of the object 1-6.

【0012】この圧縮と変換により、プログラム中の空
白やコメントの変更及び名標の変更のみであれば、オブ
ジェクトコード2−3への影響を吸収することが可能と
なる。
By this compression and conversion, it is possible to absorb the influence on the object code 2-3 by only changing the blanks and comments in the program and changing the name tag.

【0013】また、オブジェクトコード2−3を変更す
る要因は、プログラムの変更のみでなく、コンパイラの
変更、翻訳オプションの変更も考えられるので、これら
の情報も以下の比較処理の対象とするために、圧縮・変
換プログラム情報2−2の先頭部分に配置しておく必要
がある。
Further, the cause of changing the object code 2-3 may be not only the change of the program but also the change of the compiler and the change of the translation option. Therefore, in order to make this information also the target of the following comparison processing. , The compression / conversion program information 2-2 needs to be placed at the beginning.

【0014】このようにして作られた圧縮・変換プログ
ラム情報2−2をもとに翻訳処理が継続され、翻訳エラ
ーがなければオブジェクト1−6の更新を行う。この
時、従来の翻訳方式であれば、オブジェクト全体の置き
換えとなるが、ここではまず、ヘッダー情報更新手段1
−3により、オブジェクト1−6中の翻訳日付、プログ
ラムの版数等から構成されるヘッダー情報2−1を更新
する。ヘッダー情報2−1についてはオブジェクトコー
ド2−3が変わる、変わらないにかかわらず、翻訳の指
示があった事実を残すために更新を実行する。
The translation process is continued based on the compression / conversion program information 2-2 created in this way, and if there is no translation error, the object 1-6 is updated. At this time, if the conventional translation method is used, the entire object is replaced, but here, first, the header information updating means 1
-3, the header information 2-1 including the translation date in the object 1-6, the version number of the program, etc. is updated. The header information 2-1 is updated to leave the fact that the translation instruction is given regardless of whether the object code 2-3 changes or not.

【0015】その後、比較処理手段1−4にて現在の翻
訳処理で作成された圧縮・変換プログラム情報とオブジ
ェクト1−6中の圧縮・変換プログラム情報2−2の比
較処理を行い、同一であれば、オブジェクトコードの生
成は行わず、翻訳処理を終了する。この時オブジェクト
1−6中に該当のオブジェクトが存在しなければ、オブ
ジェクトコードの生成、登録(圧縮・変換プログラム情
報も)を実行する。
Thereafter, the comparison processing means 1-4 compares the compression / conversion program information created in the current translation processing with the compression / conversion program information 2-2 in the object 1-6, and if they are the same, In this case, the object code is not generated and the translation process ends. At this time, if the corresponding object does not exist in the objects 1-6, the generation and registration of the object code (including the compression / conversion program information) is executed.

【0016】比較処理手段1−4での比較の結果、圧縮
・変換プログラム情報が異っていれば、オブジェクト生
成手段1−5にオブジェクト生成を指示する。
As a result of the comparison in the comparison processing means 1-4, if the compression / conversion program information is different, the object generation means 1-5 is instructed to generate an object.

【0017】オブジェクト生成手段1−5は、従来と同
様の翻訳処理を行い、オブジェクトコードの生成を行
い、オブジェクト1−6の内容を更新する。
The object generating means 1-5 performs the same translation processing as in the conventional case, generates an object code, and updates the contents of the object 1-6.

【0018】オブジェクト1−6の内容は、ヘッダー情
報2−1、圧縮・変換プログラム情報2−2、オブジェ
クトコード2−3から構成されている。
The contents of the object 1-6 are composed of header information 2-1, compression / conversion program information 2-2, and object code 2-3.

【0019】[0019]

【発明の効果】以上説明したように、本発明は圧縮・変
換プログラム情報を持つことにより、プログラムの実行
に影響を与えないプログラムの変更に対しては、ヘッダ
ー情報のみの更新を行い、オブジェクトコードの再生成
を行わないため、翻訳時間を短縮できるという効果があ
る。
As described above, according to the present invention, by having the compression / conversion program information, only the header information is updated and the object code is updated when the program is changed without affecting the execution of the program. Since it is not regenerated, the translation time can be shortened.

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

【図1】本発明の全体構成図。FIG. 1 is an overall configuration diagram of the present invention.

【図2】本発明の生成されるオブジェクトの構成図。FIG. 2 is a configuration diagram of a generated object according to the present invention.

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

1−1 プログラム展開処理手段 1−2 名標変換処理手段 1−3 ヘッダー情報更新手段 1−4 比較処理手段 1−5 オブジェクト生成手段 1−6 オブジェクト 2−1 ヘッダー情報 2−2 圧縮・変換プログラム情報 2−3 オブジェクトコード 1-1 Program development processing means 1-2 Name conversion processing means 1-3 Header information updating means 1-4 Comparison processing means 1-5 Object generation means 1-6 Object 2-1 Header information 2-2 Compression / conversion program Information 2-3 Object code

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 高級プログラミング言語で記述されたプ
ログラムを機械語に翻訳する処理において、 原始プログラムを読み込んで、少なくともマクロを含む
情報を該原始プログラム中に展開するプログラム展開処
理手段と、 前記展開後の原始プログラムからプログラムの実行に影
響を与えない少なくとも空白行とコメント文字を含む部
分を削除しながら該原始プログラム中の名標を一定の規
則にもとづく内部生成名に置換し、圧縮・変換プログラ
ム情報を作成する名標変換処理手段と、 前記圧縮・変換プログラム情報を翻訳してエラーがなけ
れば、オブジェクト中の少なくとも翻訳日付と版数を含
んで構成されるヘッダー情報を更新するヘッダー情報更
新手段と、 オブジェクト中に存在する旧圧縮・変換プログラム情報
と、現在作成中の前記圧縮・変換プログラム情報を比較
し、同一の場合は、オブジェクトコードの再生成を行わ
ずに前記ヘッダ情報のみ更新して翻訳処理を終了し、異
なる場合は、オブジェクトコードの再生成を指示する比
較処理手段と、 前記オブジェクトの再生成が指示された時に、オブジェ
クトコードを置き換えるオブジェクト生成手段と、を含
むことを特徴とするプログラム翻訳方式。
1. In a process of translating a program written in a high-level programming language into a machine language, program expansion processing means for reading a source program and expanding information including at least a macro in the source program, and after the expansion. While deleting at least the blank line and the part including the comment character that does not affect the execution of the program from the source program, the name in the source program is replaced with the internally generated name based on a certain rule, and the compression / conversion program information And a header information updating unit for translating the compression / conversion program information and updating the header information including at least the translation date and the version number in the object if there is no error. , Old compression / conversion program information existing in the object, and the current creation Comparing the compression / conversion program information, if they are the same, only the header information is updated without regenerating the object code and the translation process is terminated, and if they are different, a comparison process instructing to regenerate the object code. A program translation method comprising: a means and an object generation means for replacing an object code when an instruction to regenerate the object is given.
【請求項2】 前記名標変換処理手段は、前記一定の規
則として、名標の出現順に通番を付与することにより、
変換を行うことを特徴とする請求項1に記載のプログラ
ム翻訳方式。
2. The name conversion processing means assigns serial numbers in the order of appearance of names as the fixed rule,
The program translation method according to claim 1, wherein conversion is performed.
JP5229649A 1993-08-24 1993-08-24 Program translation method Expired - Fee Related JP2806468B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5229649A JP2806468B2 (en) 1993-08-24 1993-08-24 Program translation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5229649A JP2806468B2 (en) 1993-08-24 1993-08-24 Program translation method

Publications (2)

Publication Number Publication Date
JPH0764798A true JPH0764798A (en) 1995-03-10
JP2806468B2 JP2806468B2 (en) 1998-09-30

Family

ID=16895511

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5229649A Expired - Fee Related JP2806468B2 (en) 1993-08-24 1993-08-24 Program translation method

Country Status (1)

Country Link
JP (1) JP2806468B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001028585A (en) * 1999-07-13 2001-01-30 Sony Corp Distribution content generating method, method and device for distributing content, and code converting method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61204741A (en) * 1985-03-06 1986-09-10 Nec Corp Compressing method for source program
JPS6410335A (en) * 1987-07-03 1989-01-13 Nec Corp System for shortening compiling time
JPH0412852A (en) * 1990-05-02 1992-01-17 Toppan Printing Co Ltd Multicolor cylinder press

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61204741A (en) * 1985-03-06 1986-09-10 Nec Corp Compressing method for source program
JPS6410335A (en) * 1987-07-03 1989-01-13 Nec Corp System for shortening compiling time
JPH0412852A (en) * 1990-05-02 1992-01-17 Toppan Printing Co Ltd Multicolor cylinder press

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001028585A (en) * 1999-07-13 2001-01-30 Sony Corp Distribution content generating method, method and device for distributing content, and code converting method
US7653752B2 (en) 1999-07-13 2010-01-26 Sony Corporation Distribution contents forming method, contents distributing method and apparatus, and code converting method

Also Published As

Publication number Publication date
JP2806468B2 (en) 1998-09-30

Similar Documents

Publication Publication Date Title
US5353371A (en) Apparatus and methods for generating a program by synthesizing an object described in an object-oriented language
JP2007531946A (en) Data integrity in data processing equipment
JP3562435B2 (en) Automatic component generator
JPH0764798A (en) Program translation system
JP2000284815A (en) Program generating device
Barnard et al. Hierarchic syntax error repair for LR grammars
JP2609820B2 (en) Program management method
JP4311327B2 (en) Source code automatic generation device, source code automatic generation method, program, and recording medium
JPH0667871A (en) Automatic program updating system
JPH11259288A (en) Degrade check device
JP5181788B2 (en) Source program language conversion apparatus, method and program
JPH0385639A (en) Program language translator
JP2002082811A (en) Compiling method and recording medium
JPH05334052A (en) Module management system
JP2607975B2 (en) Debug method
JPH04256026A (en) Divided compilation processing system for source module
JPH03156641A (en) Compiling process system
JPH08328830A (en) Sg re-translation system
JPH06119203A (en) Debugging line deleting device
JP2007128343A (en) Information processing apparatus, information processing method, program, and computer readable recording medium
JPH03100730A (en) Method for emergency correction data generation processing with high grade language
JP2007114892A (en) Program code generating device, program code generation method, and program
JP2001290656A (en) Differential compiling system
JPH0561687A (en) Processing system for compiler
JPH0769830B2 (en) Program translation device with expansion control function

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070724

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080724

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees