JPH05346858A - Program editing method - Google Patents
Program editing methodInfo
- Publication number
- JPH05346858A JPH05346858A JP4179304A JP17930492A JPH05346858A JP H05346858 A JPH05346858 A JP H05346858A JP 4179304 A JP4179304 A JP 4179304A JP 17930492 A JP17930492 A JP 17930492A JP H05346858 A JPH05346858 A JP H05346858A
- Authority
- JP
- Japan
- Prior art keywords
- program
- computer
- source program
- programming language
- compiler
- 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.)
- Pending
Links
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、デジタル計算機におけ
るコンパイラに関するものであり、特に複数のプログラ
ム言語が同一の計算機システムで動作する場合における
コンパイラおよびプログラム編集方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a compiler in a digital computer, and more particularly to a compiler and a program editing method when a plurality of programming languages operate in the same computer system.
【0002】[0002]
【従来の技術】従来からFORTRAN等の高級プログ
ラム言語で記述されたソースプログラムを機械語等の下
位言語に変換するコンパイラといったプログラム編集方
法が知られ、使用されている。以下、コンパイラを使用
し、高級プログラム言語で記述されたソースプログラム
を下位言語に変換する、従来のプログラム編集方法につ
いて述べる。図9は従来のコンパイラでのデータの流れ
を示した図である。ソースプログラム12bはFORT
RANで記述されたプログラムである。コンパイラ13
bはFORTRANで記述されたソースプログラムの文
法チェック等を行い、機械語に翻訳する処理(コンパイ
ル)を行うプログラムである。オブジェクトプログラム
14bは、ソースプログラム12bをコンパイラ13b
により機械語に翻訳したプログラムである。以上の各プ
ログラムはいずれも同一の計算機上の記憶装置上にファ
イルの形で存在するものである。2. Description of the Related Art Conventionally, a program editing method such as a compiler for converting a source program written in a high-level programming language such as FORTRAN into a lower language such as a machine language has been known and used. The conventional program editing method for converting a source program written in a high-level programming language into a lower language using a compiler will be described below. FIG. 9 is a diagram showing a data flow in a conventional compiler. Source program 12b is FORT
It is a program written in RAN. Compiler 13
Reference numeral b is a program that performs a grammatical check of a source program described in FORTRAN and the like, and performs a process (compile) of translating it into a machine language. The object program 14b converts the source program 12b into the compiler 13b.
It is a program translated into machine language by. All of the above programs exist in the form of files in the storage device on the same computer.
【0003】計算機使用者は、エディタと呼ばれる文書
作成用プログラムを使用して先ずソースプログラム12
bをFORTRANで作成する。計算機使用者は、ソー
スプログラム12bの作成が終了した後、コンパイルを
行うソースプログラム12bを指定し、コンパイラ13
bを起動する。起動されたコンパイラ13bはソースプ
ログラム12bの文法チェック、変数チェック等を行っ
た後、ソースプログラム12bを機械語に翻訳しオブジ
ェクトプログラム14bを作成する。A computer user first uses a source program 12 by using a document creation program called an editor.
Create b in FORTRAN. After the creation of the source program 12b is completed, the computer user specifies the source program 12b to be compiled, and the compiler 13
Start b. The activated compiler 13b performs grammar check, variable check, etc. of the source program 12b, and then translates the source program 12b into a machine language to create an object program 14b.
【0004】従来のプログラム編集方法は以上のように
構成されているため、一種類のコンパイラは一種類の高
級プログラム言語しか取り扱うことができなかった。高
級プログラム言語を使用した場合、ほとんどの用途のプ
ログラムについて単一言語で対応することができる。一
方、各高級プログラム言語はそれぞれ用途に向き、不向
きがあり、例えば、FORTRANは数値演算に向いて
いるが、計算機のハードウェアに密着した入出力(I/
O)を取り扱うといった用途には向いていない。このた
め、例えば、FORTRANを使用して数値演算とI/
O操作の混在したプログラムを作成すると、数値計算処
理は高速だが、I/O操作処理は遅いオブジェクトプロ
グラムが生成されるという問題が生じる。Since the conventional program editing method is configured as described above, one type of compiler can handle only one type of high-level programming language. When a high-level programming language is used, a single language can be used for programs for most purposes. On the other hand, each high-level programming language is suitable for its purpose and unsuitable, and for example, FORTRAN is suitable for numerical operation, but input / output (I / I) closely related to computer hardware is used.
It is not suitable for applications such as handling O). For this reason, for example, using FORTRAN, numerical operation and I /
When a program having a mixture of O operations is created, a problem arises in which an object program is generated which has a high numerical calculation process but a slow I / O operation process.
【0005】上記問題を解決するためには、計算機使用
者がソースプログラムの仕様を分析し、数値演算部分を
FORTRANで記述し、I/O操作部分を、例えばC
で記述する方法がある。この方法を用いた場合、ソース
プログラム仕様を分析し、各部分について異なった高級
プログラム言語で記述するという高度な能力が計算機使
用者に要求され、ソースプログラム開発上の大きなネッ
クが生じるという問題点があった。本発明は、このよう
な従来技術の問題点に鑑みてなされたものであり、単一
のソースプログラムから、自動的にその部分ごとの処理
に最適な高級プログラム言語を選択し、その高級プログ
ラム言語で記述された次段階のプログラムに変換するこ
とができ、また、上記変換が複数の計算機からなる計算
機ネットワークにも適用でき、しかも上記変換処理を行
う際に、計算機ネットワーク全体の資源を有効利用する
ことができるプログラム編集方法を提供することを目的
とする。In order to solve the above problem, the computer user analyzes the specifications of the source program, describes the numerical operation part in FORTRAN, and writes the I / O operation part in C, for example.
There is a method to describe in. When this method is used, the computer user is required to have a high level of ability to analyze the source program specifications and write each part in a different high-level programming language, which causes a problem in developing the source program. there were. The present invention has been made in view of the above problems of the prior art, and automatically selects the optimum high-level programming language for the processing of each part from a single source program, and Can be converted into the program of the next stage described in, and the above conversion can be applied to a computer network composed of a plurality of computers, and moreover, the resources of the entire computer network can be effectively used when performing the conversion processing. An object of the present invention is to provide a program editing method capable of performing.
【0006】[0006]
【課題を解決するための手段】上記の問題を解決するた
め、本発明に係るプログラム編集方法は、一種類の高級
プログラミング言語で記述されたソースプログラムにつ
いて、複数の高級プログラム言語の編集機能を有し、上
記ソースプログラムの部分ごとの処理内容を分析し、そ
の処理内容に応じて、上記複数のプログラム言語の内、
その部分について最適な次段階のプログラム言語を選択
し、上記部分ごとに、上記ソースプログラムを選択され
たプログラム言語に変換することを特徴とする。また、
処理内容に応じた変換処理が、適用される計算機の種類
に応じて行われることを特徴とする。In order to solve the above problems, a program editing method according to the present invention has a plurality of high-level programming language editing functions for a source program written in one high-level programming language. Then, analyze the processing contents of each part of the source program, and according to the processing contents, among the plurality of programming languages,
An optimum next-stage programming language is selected for the part, and the source program is converted into the selected programming language for each part. Also,
The conversion processing according to the processing content is performed according to the type of computer to which the processing is applied.
【0007】また、複数の計算機から構成され、上記処
理内容ごとに異なった計算機を使用する計算機ネットワ
ークにおいて、上記各計算機に対応した、上記次段階の
プログラム言語で記述されたプログラムを作成すること
を特徴とする。また、一の計算機おいて、上記ソースプ
ログラムの部分ごとの処理内容を分析し、その処理内容
に応じて、上記複数のプログラム言語の内、その部分に
ついて最適な次段階のプログラム言語を選択し、上記部
分ごとに、上記ソースプログラムを選択されたプログラ
ム言語に変換し、他の計算機において、さらに、上記変
換されたプログラムを機械語に変換することを特徴とす
る。Further, in a computer network composed of a plurality of computers and using different computers for each processing content, it is possible to create a program written in the programming language of the next stage corresponding to each computer. Characterize. Further, in one computer, analyze the processing contents for each part of the source program, and select the optimum next-stage programming language for that part from among the plurality of programming languages according to the processing contents, It is characterized in that the source program is converted into a selected programming language for each of the parts, and the converted program is further converted into a machine language in another computer.
【0008】[0008]
【作用】一種類の高級プログラミング言語で記述された
ソースプログラムについて、複数の高級プログラム言語
の編集機能を有し、上記ソースプログラムの部分ごとの
処理内容を分析し、その処理内容に応じて、上記複数の
プログラム言語の内、その部分について最適な次段階の
プログラム言語を選択し、上記部分ごとに、上記ソース
プログラムを選択されたプログラム言語に変換すること
により、処理内容に応じて最適な高級プログラム言語を
選択することを可能とし、また、変換後のプログラムの
計算機間のポータビティを実現することを可能としてい
る。また、処理内容に応じた変換処理が、適用される計
算機の種類に応じて行われることにより、標準的な各高
級プログラム言語から機械語への変換用コンパイラより
高度な機能および性能を持つ、上記計算機専用に作成さ
れたコンパイラの使用を可能としている。With respect to a source program written in one kind of high-level programming language, it has a plurality of high-level programming language editing functions, analyzes the processing contents of each part of the source program, and according to the processing contents, An optimum high-level program according to the processing content is selected by selecting the optimum next-stage programming language for that part from among a plurality of programming languages and converting the above source program into the selected programming language for each part. It is possible to select the language and to realize portability between the computers of the converted program. In addition, since the conversion processing according to the processing content is performed according to the type of computer to be applied, it has higher functions and performance than the standard high-level programming language to machine language conversion compiler. It enables the use of a compiler created specifically for the computer.
【0009】また、複数の計算機から構成され、上記処
理内容ごとに異なった計算機を使用する計算機ネットワ
ークにおいて、上記各計算機に対応した、上記次段階の
プログラム言語で記述されたプログラムを作成すること
により、上記計算機ネットワーク全体として最適なオブ
ジェクトプログラムを得ることを可能としている。ま
た、一の計算機おいて、上記ソースプログラムの部分ご
との処理内容を分析し、その処理内容に応じて、上記複
数のプログラム言語の内、その部分について最適な次段
階のプログラム言語を選択し、上記部分ごとに、上記ソ
ースプログラムを選択されたプログラム言語に変換し、
他の計算機において、さらに、上記変換されたプログラ
ムを機械語に変換することにより、上記計算機ネットワ
ーク全体としての計算機資源の有効利用が可能となる。Further, in a computer network composed of a plurality of computers and using different computers depending on the processing contents, by creating a program written in the next-stage programming language corresponding to each computer, It is possible to obtain an optimum object program for the entire computer network. Further, in one computer, analyze the processing contents for each part of the source program, and select the optimum next-stage programming language for that part from among the plurality of programming languages according to the processing contents, For each of the above parts, convert the above source program into the selected programming language,
In another computer, further, by converting the converted program into a machine language, it is possible to effectively use the computer resources of the entire computer network.
【0010】[0010]
【実施例】図面を参照して本発明の第一の実施例につい
て説明する。図2は、図1(A)に示されたプロセッサ
エレメント(PE)の構成を示す図である。本発明は、
図2に示すような記号処理用計算機(図2におけるE
U)とマンマシンインターフェースおよび記憶等に使用
される計算機(図2におけるRM)からなる並列計算機
ネットワークのPEに適用される。エバリュエーター
(EU)とリソースマネージャー(RM)はRMインタ
フェース(RM I/F)で接続され、EUからRMに
機能データを送出する。また、EUからメインメモリイ
ンターフェース(MM I/F)を介して情報データが
送出され、メインメモリ(MM)とRMに送出される。
RM I/FおよびMM I/FはEU内の内部バス
(IBUS)を介してALUに接続される。また、RM
I/FはRM内のエバリュエータインターフェース
(EU I/F)を介してWSに接続される。EUはA
LU、マスカ、シフタ、ローカルメモリ、レジスタファ
イル、ユーザスタック、ディスパッチテーブル、インス
トラクションキャッシュ、システムコントローラ、コン
トロールメモリ、IBUS、ダイアグノスティクススタ
ティクス、RM I/FおよびMM I/Fから構成さ
れ、RMはWSR3000、ダイアグノスティクスイン
ターフェース、通信インターフェース、二次記憶、M
M、ポインタマニュピレータ、EU I/F、CRTデ
ィスプレイから構成されている。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the present invention will be described with reference to the drawings. FIG. 2 is a diagram showing the configuration of the processor element (PE) shown in FIG. The present invention is
A symbol processing computer as shown in FIG. 2 (E in FIG.
U) and a man-machine interface and a computer (RM in FIG. 2) used for storage etc. are applied to PE of a parallel computer network. The evaluator (EU) and the resource manager (RM) are connected by the RM interface (RM I / F), and send function data from the EU to the RM. Further, information data is sent from the EU through the main memory interface (MM I / F) and sent to the main memory (MM) and RM.
The RM I / F and MM I / F are connected to the ALU via an internal bus (IBUS) in the EU. Also, RM
The I / F is connected to the WS via an evaluator interface (EU I / F) in the RM. EU is A
LU, masker, shifter, local memory, register file, user stack, dispatch table, instruction cache, system controller, control memory, IBUS, diagnostic statics, RM I / F and MM I / F. WSR3000, diagnostics interface, communication interface, secondary storage, M
M, a pointer manipulator, an EU I / F, and a CRT display.
【0011】図3は本実施例を説明するための図2の計
算機ネットワークの本発明に関する部分を要約したもの
である。図3において、第一の計算機2は、図2のRM
に、CPU20はWSに、メモリ22は、図2のMMに
相当に、表示装置24は図2のCRTディスプレイに、
通信インターフェース25は図2のRM I/Fに相当
する。磁気記憶装置26は図2の二次記憶に相当する。
なお、図2においては、バス21およびI/O23は省
略されている。FIG. 3 is a summary of the part relating to the present invention of the computer network of FIG. 2 for explaining the present embodiment. In FIG. 3, the first computer 2 is the RM of FIG.
2, the CPU 20 corresponds to WS, the memory 22 corresponds to the MM in FIG. 2, the display device 24 corresponds to the CRT display in FIG.
The communication interface 25 corresponds to the RM I / F in FIG. The magnetic storage device 26 corresponds to the secondary storage of FIG.
Note that the bus 21 and the I / O 23 are omitted in FIG.
【0012】図3において、CPU20は、メモリ22
に蓄積されたプログラムの実行を行い、各種演算処理、
および、第一の計算機2の制御を行うCPUおよびその
周辺回路である。バス21は、第一の計算機2の各部分
間の情報を伝達するバスである。メモリ22は、プログ
ラムおよびデータの記憶を行うメモリである。I/O2
3は、表示装置24、通信インターフェース25および
磁気記憶装置26の操作を行うI/O制御装置である。
表示装置24は、第一の計算機2の出力データを表示す
るCRTディスプレイである。通信インターフェース2
5は他の計算機との通信を行うインターフェースであ
る。磁気記憶装置26は、データの記憶を行う記憶装置
である。In FIG. 3, the CPU 20 has a memory 22.
Executing the programs stored in
And a CPU that controls the first computer 2 and its peripheral circuits. The bus 21 is a bus for transmitting information between the respective parts of the first computer 2. The memory 22 is a memory that stores programs and data. I / O2
An I / O control device 3 operates the display device 24, the communication interface 25, and the magnetic storage device 26.
The display device 24 is a CRT display that displays the output data of the first computer 2. Communication interface 2
Reference numeral 5 is an interface for communicating with other computers. The magnetic storage device 26 is a storage device that stores data.
【0013】図4は本発明のプログラム編集方法のプロ
グラム変換方法を示す図である。ソースプログラム10
は、LISPで記述されたソースプログラムである。第
一のコンパイラ11は、ソースプログラム10をLIS
P、FORTRAN、C等の各高級プログラム言語に変
換するコンパイラである。次段階プログラム12a、
b、cは、ソースプログラム10の各部分部分につい
て、第一のコンパイラ11が生成した各高級プログラム
言語、LISP、FORTRANおよびCによるプログ
ラムである。第二のコンパイラ13a、b、cは、次段
階プログラム12a、b、cを機械語に変換するコンパ
イラである。機械語プログラム14a、b、cは、第一
のコンパイラ11および第二のコンパイラ13a、b、
cがソースプログラム10を変換することにより生成し
た機械語プログラムである。以上のソースプログラム1
0および各コンパイラは第一の計算機2の磁気記憶装置
26上に記憶され、必要に応じてメモリ22上に読みだ
される。次段階プログラム12a、b、cおよび機械語
プログラム14a、b、cは、第一のコンパイラ11お
よび第二のコンパイラ13a、b、cの動作に従い、順
次生成され、メモリ22または磁気記憶装置26に記憶
される。FIG. 4 is a diagram showing a program conversion method of the program editing method of the present invention. Source program 10
Is a source program written in LISP. The first compiler 11 converts the source program 10 into the LIS
It is a compiler that converts each high-level programming language such as P, FORTRAN, and C. Next-stage program 12a,
b and c are programs in each high-level programming language generated by the first compiler 11, LISP, FORTRAN, and C for each partial portion of the source program 10. The second compilers 13a, b, c are compilers for converting the next-stage programs 12a, b, c into machine language. The machine language programs 14a, b, c are the first compiler 11 and the second compilers 13a, b,
c is a machine language program generated by converting the source program 10. Source program 1 above
0 and each compiler are stored in the magnetic storage device 26 of the first computer 2 and read out in the memory 22 as needed. The next-stage programs 12a, b, c and machine language programs 14a, b, c are sequentially generated according to the operations of the first compiler 11 and the second compilers 13a, b, c, and are stored in the memory 22 or the magnetic storage device 26. Remembered.
【0014】以下、本発明のプログラム編集方法の動作
について説明する。図5は本発明のプログラム編集方法
のプログラム変換方法の処理のフローチャートである。
ステップ01(S01)において、第一のコンパイラ1
1はソースプログラム10の文法チェック等を行った
後、ソースプログラム10に含まれる各関数ごとに解析
を行う。ソースプログラム10は図6に示すような機能
を実現する関数10a〜dを含んでいるものとする。こ
こで、関数10aは、データAを通信インターフェース
25に接続される他の計算機から受信するための関数、
関数10bは、データAについて、記号処理を行うため
の関数、関数10cは、データAについて、数値演算処
理を行うための関数、関数10dは、以上の処理結果を
表示装置24に表示し、磁気記憶装置26に記憶するた
めの関数であるとする。第一のコンパイラ11はソース
プログラム10の各関数10a〜dに含まれる命令の種
類を分類し、各関数のリスト処理用命令数、数値計算用
の命令数およびI/O用の命令数をカウントする。ここ
で、関数10aはリスト処理用命令を3、数値計算用の
命令を10、I/O用の命令を50含み、関数10bは
リスト処理用命令を200、数値計算用の命令を40、
I/O用の命令を0含み、関数10cはリスト処理用命
令を20、数値計算用の命令を400、I/O用の命令
を0含み、関数10dはリスト処理用命令を10、数値
計算用の命令を10、I/O用の命令を500含んでい
るという結果が生じたものとする。The operation of the program editing method of the present invention will be described below. FIG. 5 is a flowchart of the processing of the program conversion method of the program editing method of the present invention.
In step 01 (S01), the first compiler 1
1 performs a grammatical check of the source program 10 and the like, and then analyzes each function included in the source program 10. The source program 10 is assumed to include the functions 10a to 10d that realize the functions shown in FIG. Here, the function 10a is a function for receiving the data A from another computer connected to the communication interface 25,
The function 10b is a function for performing symbol processing on the data A, the function 10c is a function for performing numerical operation processing on the data A, and the function 10d is for displaying the above processing results on the display device 24, and It is assumed that the function is for storing in the storage device 26. The first compiler 11 classifies the types of instructions included in each function 10a to 10d of the source program 10, and counts the number of list processing instructions, the number of numerical calculation instructions, and the number of I / O instructions of each function. To do. Here, the function 10a includes three list processing instructions, ten numerical calculation instructions, and 50 I / O instructions, and the function 10b includes list processing instructions 200, numerical calculation instructions 40,
The function 10c includes 0 I / O instructions, the function 10c includes 20 list processing instructions, the numerical calculation instruction 400, and the I / O instruction 0, and the function 10d includes 10 list processing instructions and the numerical calculation. It is assumed that the result of including 10 instructions for I / O and 500 instructions for I / O has occurred.
【0015】ステップ02(S02)において、第一の
コンパイラ11はS01の処理の結果求められた命令数
の結果に基づき順次、関数10aを、I/O操作に適し
たプログラム言語であるCに変換するためステップ03
に進む。関数10bを、リスト処理に適したプログラム
言語であるLISPに変換するためステップ04に進
む。関数10cを、数値演算処理に適したプログラム言
語であるFORTRANに変換するためステップ04に
進む。関数10dを、I/O操作に適したプログラム言
語であるCに変換するためステップ04に進む。という
処理を行う。In step 02 (S02), the first compiler 11 sequentially converts the function 10a into C, which is a programming language suitable for I / O operation, based on the result of the number of instructions obtained as a result of the processing of S01. Step 03 to do
Proceed to. The process proceeds to step 04 to convert the function 10b into LISP which is a programming language suitable for list processing. The process proceeds to step 04 to convert the function 10c into FORTRAN, which is a programming language suitable for numerical calculation processing. In order to convert the function 10d into C which is a programming language suitable for I / O operation, the process proceeds to step 04. Is performed.
【0016】ステップ03(S03)においては、第一
のコンパイラ11がソースプログラム10より関数10
bの部分を切り出し、次段階プログラム12aを得る。
ここでは、ソースプログラム10がLISPで記述され
ているため、関数を切り出し、他の関数とのインターフ
ェースに関する処理を行うのみで、変換は行わない。ス
テップ04(S04)においては、第一のコンパイラ1
1がソースプログラム10より関数10cの部分を切り
出し、FORTRANへの変換を行い、第二の次段階プ
ログラム12bを得る。ステップ05(S05)におい
ては、第一のコンパイラ11がソースプログラム10の
関数10aおよび関数10dの部分を切り出し、Cへの
変換を行い、次段階プログラム12cを得る。ステップ
05(S05)において、全関数について処理を終わっ
たかを判断する。In step 03 (S03), the first compiler 11 executes the function 10 from the source program 10.
The portion b is cut out to obtain the next-stage program 12a.
Here, since the source program 10 is described in LISP, only the function is cut out and the processing related to the interface with other functions is performed, but the conversion is not performed. In step 04 (S04), the first compiler 1
1 cuts out the portion of the function 10c from the source program 10 and converts it into FORTRAN to obtain the second next-stage program 12b. In step 05 (S05), the first compiler 11 cuts out the functions 10a and 10d of the source program 10 and converts them into C to obtain the next-stage program 12c. In step 05 (S05), it is determined whether the processing has been completed for all functions.
【0017】以上の動作によって得られた次段階プログ
ラム12a〜cは、それぞれLISP用コンパイラ13
a、FORTRAN用コンパイラ13b、C用コンパイ
ラ13cにより、機械語プログラム14a〜cに変換さ
れる。以上により、ソースプログラム10の各関数10
a〜dについて最適化された、第一の計算機2用の次段
階プログラム12a、b、cおよび機械語プログラム
a、b、cが得られる。ここで、本実施例で使用される
高級プログラム言語、LISP、FORTRANおよび
Cの仕様は、情報処理の分野の標準的な規格に完全準拠
したものである。必要な場合、他の計算機に本実施例の
プログラム編集方法で生成された次段階プログラムを容
易に移植可能である。The next-stage programs 12a to 12c obtained by the above operation are respectively LISP compiler 13
a, the FORTRAN compiler 13b, and the C compiler 13c are converted into machine language programs 14a to 14c. From the above, each function 10 of the source program 10
The next-stage programs 12a, b, c and machine language programs a, b, c for the first computer 2 optimized for a to d are obtained. Here, the specifications of the high-level programming languages, LISP, FORTRAN and C used in this embodiment are completely compliant with the standard specifications in the field of information processing. If necessary, the next-stage program generated by the program editing method of this embodiment can be easily ported to another computer.
【0018】以下、第二の実施例について述べる。図7
は本実施例が適用される、図2の計算機ネットワークの
要点を抜き出した図である。第二の計算機3は、図2の
EUに相当する。第二の計算機3は記号処理を高速に行
うための専用計算機として使用される。第二の計算機3
の構成は説明の簡略化のために、第一の計算機2と同様
のものであると仮定する。RM I/F30およびMM
I/F31は第一の計算機2と第二の計算機3を接続
し、各種情報を送受信するためのインターフェースであ
る。第一の計算機2と第二の計算機3は、このいずれか
を介して必要な情報の送受信を行う。The second embodiment will be described below. Figure 7
FIG. 3 is a diagram in which the essential points of the computer network of FIG. 2 to which this embodiment is applied are extracted. The second computer 3 corresponds to the EU in FIG. The second computer 3 is used as a dedicated computer for performing symbol processing at high speed. Second calculator 3
For simplification of description, it is assumed that the configuration of 1 is the same as that of the first computer 2. RM I / F30 and MM
The I / F 31 is an interface for connecting the first computer 2 and the second computer 3 and transmitting / receiving various information. The first computer 2 and the second computer 3 transmit and receive necessary information via either of them.
【0019】第一の計算機2および第二の計算機3は、
それぞれ第一の実施例に示した本発明に係るプログラム
編集方法を実施するための計算機環境を持っているもの
とする。ただし、第二の計算機3の第一のコンパイラ1
1、LISP用コンパイラ13aおよびFORTRAN
用コンパイラ13bは、第二の計算機3用に特化し、強
化された独特の命令に対応したものであるとする。上記
両計算機において、それぞれ第一の計算機2用に開発さ
れたソースプログラム10および第二の計算機3用に開
発されたソースプログラム10を第一の実施例と同様の
方法で機械語プログラム14a、b、cに変換する。以
上により、計算機の種類に応じて、最も最適化された機
械語プログラム14a、b、cを得ることができる。The first computer 2 and the second computer 3 are
It is assumed that each has a computer environment for carrying out the program editing method according to the present invention shown in the first embodiment. However, the first compiler 1 of the second computer 3
1. LISP compiler 13a and FORTRAN
The compiler 13b specialized for the second computer 3 corresponds to the enhanced and unique instruction. In each of the above computers, the source program 10 developed for the first computer 2 and the source program 10 developed for the second computer 3 are machine language programs 14a and 14b in the same manner as in the first embodiment. , C. As described above, the most optimized machine language programs 14a, 14b, 14c can be obtained according to the type of computer.
【0020】以下、第三の実施例について述べる。本実
施例はいわゆるクロスコンパイル環境を提供するもので
ある。図8は本実施例のプログラム編集方法のプログラ
ム変換方法を示す図である。本実施例のプログラム編集
方法の動作計算機環境は、図7の第一の計算機2に設け
られる。ソースプログラム10は、LISPで記述さ
れ、第一の計算機2および第二の計算機3上で動作する
関数が混在し、その関数ごとに、一定のフォーマットで
前記いずれの計算機で動作するかを設定してあるものと
する。第一のコンパイラ11aは、ソースプログラム1
0の上記設定に基づき、ソースプログラム10の各部分
を第一の計算機2用と第二の計算機3用に分割する。ソ
ースプログラム10a、bは、それぞれ第一の計算機2
用、第二の計算機3用に分割されたソースプログラム1
0である。第一のコンパイラ11a、bは、それぞれ第
一の計算機2用、第二の計算機3用に特化した第一のコ
ンパイラ11である。第一のコンパイラ11bは第二の
計算機3用に強化した各プログラム言語の命令に対応し
ているのとする。次段階プログラム12a、b、cは第
一の計算機2用の次段階プログラムである。次段階プロ
グラム12d、e、fは第二の計算機3用の次段階プロ
グラムである。第二のコンパイラ13a、b、cは、第
一の計算機2用のLISP用、FORTRAN用、C用
コンパイラである。第二のコンパイラ13d、e、f
は、第二の計算機3用のLISP用、FORTRAN
用、C用コンパイラである。これらは、第二の計算機3
用に強化された命令に対応しているものとする。The third embodiment will be described below. The present embodiment provides a so-called cross compilation environment. FIG. 8 is a diagram showing a program conversion method of the program editing method of this embodiment. The operating computer environment of the program editing method of this embodiment is provided in the first computer 2 of FIG. The source program 10 is written in LISP, and functions that operate on the first computer 2 and the second computer 3 coexist. For each of the functions, it is set which of the above computers operates in a fixed format. It is assumed that The first compiler 11a is the source program 1
Based on the above setting of 0, each part of the source program 10 is divided into the first computer 2 and the second computer 3. The source programs 10a and 10b are respectively the first computer 2
, A source program 1 divided for the second computer 3
It is 0. The first compilers 11a and 11b are first compilers 11 specialized for the first computer 2 and the second computer 3, respectively. It is assumed that the first compiler 11b corresponds to the instructions of each programming language reinforced for the second computer 3. The next-stage programs 12a, 12b, 12c are next-stage programs for the first computer 2. The next-stage programs 12d, e, f are the next-stage programs for the second computer 3. The second compilers 13a, 13b, 13c are compilers for LISP, FORTRAN, and C for the first computer 2. Second compiler 13d, e, f
For LISP for the second computer 3, FORTRAN
And C compilers. These are the second computer 3
Shall correspond to the enhanced instructions for.
【0021】次に動作を説明する。ソースプログラム1
0は、第一のコンパイラ11bにより、第一の計算機2
用および第二の計算機3用の各部分に分割される。この
際、第一のコンパイラ11bはソースプログラム10作
成時に挿入された上記区別に従い、関数ごとに分割する
ものとする。この結果、ソースプログラム10a、bが
生成される。このソースプログラム10a、bについ
て、第一の実施例と同様の手順により最終的な機械語プ
ログラム14a〜fが生成される。このうち機械語プロ
グラム14d〜fは第二の計算機3用のものである。機
械語プログラム14d〜fは第二の計算機3上に移さ
れ、動作する。本実施例では、予め上記区別をソースプ
ログラム10に挿入したが、第一のコンパイラ11aに
おいて、自動的に区別するように構成してもよい。ま
た、最初からソースプログラム10a、bを別々に開発
してもよい。Next, the operation will be described. Source program 1
0 is the first computer 2 by the first compiler 11b.
And the second computer 3 are divided into respective parts. At this time, the first compiler 11b divides each function according to the above-mentioned distinction inserted when the source program 10 is created. As a result, the source programs 10a and 10b are generated. With respect to the source programs 10a and 10b, final machine language programs 14a to 14f are generated by the same procedure as in the first embodiment. Of these, the machine language programs 14d to f are for the second computer 3. The machine language programs 14d to 14f are moved to the second computer 3 and operate. In the present embodiment, the above distinction is inserted into the source program 10 in advance, but the first compiler 11a may be configured to automatically distinguish. Alternatively, the source programs 10a and 10b may be separately developed from the beginning.
【0022】以下、第四の実施例を説明する。図8にお
いて、第一の計算機2には第二のコンパイラ13d〜f
を除いたプログラム編集方法計算機環境を、第二の計算
機3には第二のコンパイラ13d〜fのみを用意する。
第一の計算機2においては、第一の計算機2用の機械語
プログラム14a、b、cを第一の実施例と同様に作成
する。また、第三の実施例と同様の方法で第二の計算機
3用の次段階プログラム12d〜fを作成し、第二の計
算機3に移す。第二の計算機3上では、次段階プログラ
ム12d〜fを第二のコンパイラ13d〜fにかけ、最
終的な機械語プログラム14d〜fを作成する。The fourth embodiment will be described below. In FIG. 8, the first computer 2 includes the second compilers 13d to 13f.
The program editing method except for the computer environment is prepared, and only the second compilers 13d to 13f are prepared for the second computer 3.
In the first computer 2, machine language programs 14a, 14b, 14c for the first computer 2 are created in the same manner as in the first embodiment. Further, the next-stage programs 12d to 12f for the second computer 3 are created by the same method as in the third embodiment, and transferred to the second computer 3. On the second computer 3, the next-stage programs 12d-f are applied to the second compilers 13d-f to create final machine language programs 14d-f.
【0023】本発明のプログラム編集方法は、上記実施
例に限定位されず、他に種々の構成をとることができ
る。また、上記した計算機環境は例示である。特に、計
算機の数、種類、第一のコンパイラ11の生成する次段
階プログラム12に使用されるプログラム言語、ソース
プログラム10のプログラム言語はここで述べたものに
限らない。The program editing method of the present invention is not limited to the above-mentioned embodiment, and various other configurations can be adopted. Further, the above computer environment is an example. In particular, the number and types of computers, the programming language used in the next-stage program 12 generated by the first compiler 11, and the programming language of the source program 10 are not limited to those described here.
【0024】[0024]
【発明の効果】以上述べたように本発明のプログラム編
集方法によれば、一種類の高級プログラミング言語で記
述されたソースプログラムについて、複数の高級プログ
ラム言語の編集機能を有し、上記ソースプログラムの部
分ごとの処理内容を分析し、その処理内容に応じて、上
記複数のプログラム言語の内、その部分について最適な
次段階のプログラム言語を選択し、上記部分ごとに、上
記ソースプログラムを選択されたプログラム言語に変換
することにより、処理内容に応じて最適な高級プログラ
ム言語を選択することを可能とし、また、変換後のプロ
グラムの計算機間のポータビティを実現したプログラム
編集方法を提供する。また、処理内容に応じた変換処理
が、適用される計算機の種類に応じて行われることによ
り、標準的な各高級プログラム言語から機械語への変換
用コンパイラより高度な機能および性能を持つ、上記計
算機専用に作成されたコンパイラの使うことができるプ
ログラム編集方法を提供する。As described above, according to the program editing method of the present invention, a source program written in one kind of high-level programming language has an editing function of a plurality of high-level programming languages, The processing content of each part was analyzed, and the optimum next-stage programming language was selected for that part from among the above-mentioned programming languages according to the processing content, and the source program was selected for each part. By converting to a program language, it is possible to select an optimum high-level programming language according to the processing content, and to provide a program editing method that realizes portability between computers of the converted program. In addition, since the conversion processing according to the processing content is performed according to the type of computer to be applied, it has higher functions and performance than the standard high-level programming language to machine language conversion compiler. Provide a program editing method that can be used by a compiler created specifically for a computer.
【0025】また、複数の計算機から構成され、上記処
理内容ごとに異なった計算機を使用する計算機ネットワ
ークにおいて、上記各計算機に対応した、上記次段階の
プログラム言語で記述されたプログラムを作成すること
により、上記計算機ネットワーク全体として最適なオブ
ジェクトプログラムを得ることができるプログラム編集
方法を提供する。また、一の計算機おいて、上記ソース
プログラムの部分ごとの処理内容を分析し、その処理内
容に応じて、上記複数のプログラム言語の内、その部分
について最適な次段階のプログラム言語を選択し、上記
部分ごとに、上記ソースプログラムを選択されたプログ
ラム言語に変換し、他の計算機において、さらに、上記
変換されたプログラムを機械語に変換することにより、
上記計算機ネットワーク全体としての計算機環境の有効
利用を図ることができるプログラム編集方法を提供す
る。Further, in a computer network composed of a plurality of computers and using different computers for each processing content, by creating a program described in the programming language of the next stage corresponding to each computer, Provided is a program editing method capable of obtaining an optimum object program for the entire computer network. Further, in one computer, analyze the processing contents for each part of the source program, and select the optimum next-stage programming language for that part from among the plurality of programming languages according to the processing contents, For each of the parts, the source program is converted into a selected programming language, and in another computer, by further converting the converted program into a machine language,
There is provided a program editing method capable of effectively utilizing the computer environment of the entire computer network.
【図1】本発明が適用される計算機ネットワークの接続
形態を示す図である。FIG. 1 is a diagram showing a connection form of a computer network to which the present invention is applied.
【図2】本発明が適用される計算機ネットワークの構成
図である。FIG. 2 is a configuration diagram of a computer network to which the present invention is applied.
【図3】本発明が適用される計算機の構成図である。FIG. 3 is a configuration diagram of a computer to which the present invention is applied.
【図4】本発明のプログラム編集方法のプログラム変換
方法を示す図である。FIG. 4 is a diagram showing a program conversion method of the program editing method of the present invention.
【図5】本発明のプログラム編集方法のプログラム変換
方法の処理のフローチャートである。FIG. 5 is a flowchart of processing of a program conversion method of the program editing method of the present invention.
【図6】ソースプログラムの構成を示す図である。FIG. 6 is a diagram showing a configuration of a source program.
【図7】本発明の第三実施例の計算機ネットワークの構
成を示す図である。FIG. 7 is a diagram showing a configuration of a computer network according to a third embodiment of this invention.
【図8】本発明の第三の実施例のプログラム編集方法の
プログラム変換方法を示す図である。FIG. 8 is a diagram showing a program conversion method of a program editing method according to a third embodiment of the present invention.
【図9】従来のプログラム編集方法を示す図である。FIG. 9 is a diagram showing a conventional program editing method.
1・・・本発明のプログラム編集方法 2・・・本発明が適用される第一の計算機 3・・・本発明が適用される第二の計算機 10・・・ソースプログラム 11・・・第一のコンパイラ 12・・・次段階の高級プログラム言語によるプログラ
ム 13・・・第二のコンパイラ 14・・・最終的な機械語プログラム 20・・・CPU 21・・・バス 22・・・メモリ 23・・・I/O 24・・・表示装置 25・・・通信インターフェース 26・・・磁気記憶装置 30・・・RM I/F 31・・・MM I/F1 ... Program editing method of the present invention 2 ... First computer to which the present invention is applied 3 ... Second computer to which the present invention is applied 10 ... Source program 11 ... First Compiler 12 ... Next-stage high-level programming language program 13 ... Second compiler 14 ... Final machine language program 20 ... CPU 21 ... Bus 22 ... Memory 23 ... I / O 24 ... Display device 25 ... Communication interface 26 ... Magnetic storage device 30 ... RM I / F 31 ... MM I / F
Claims (4)
れたソースプログラムについて、 複数の高級プログラム言語の編集機能を有し、 上記ソースプログラムの部分ごとの処理内容を分析し、
その処理内容に応じて、上記複数のプログラム言語の
内、その部分について最適な次段階のプログラム言語を
選択し、 上記部分ごとに、上記ソースプログラムを選択されたプ
ログラム言語に変換し、 さらに、上記変換されたプログラムを機械語に変換する
ことを特徴としたプログラム編集方法。1. A source program written in one type of high-level programming language, having a plurality of high-level programming language editing functions, analyzing the processing contents of each part of the source program,
According to the processing content, the optimum next-stage programming language is selected for the part from the plurality of programming languages, and the source program is converted into the selected programming language for each part. A program editing method characterized by converting a converted program into a machine language.
種類に応じて行われることを特徴とするプログラム編集
方法。2. The program editing method according to claim 1, wherein the conversion processing according to the processing content is performed according to the type of computer to which the processing is applied.
た計算機を使用する計算機ネットワークにおいて、 上記各計算機に対応した、上記次段階のプログラム言語
で記述されたプログラムを作成することを特徴とするプ
ログラム編集方法。3. The program editing method according to claim 2, wherein the computer network is composed of a plurality of computers and uses different computers for each of the processing contents, in the programming language of the next stage corresponding to each computer. A program editing method characterized by creating a written program.
処理内容を分析し、その処理内容に応じて、上記複数の
プログラム言語の内、その部分について最適な次段階の
プログラム言語を選択し、 上記部分ごとに、上記ソースプログラムを選択されたプ
ログラム言語に変換し、 他の計算機において、さらに、上記変換されたプログラ
ムを機械語に変換することを特徴としたプログラム編集
方法。4. The program editing method according to claim 3, wherein the processing content of each part of the source program is analyzed in one computer, and the part of the plurality of programming languages is selected according to the processing content. For each part, the source program is converted into the selected programming language, and in another computer, the converted program is converted into a machine language. Characterized program editing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4179304A JPH05346858A (en) | 1992-06-12 | 1992-06-12 | Program editing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4179304A JPH05346858A (en) | 1992-06-12 | 1992-06-12 | Program editing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH05346858A true JPH05346858A (en) | 1993-12-27 |
Family
ID=16063492
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4179304A Pending JPH05346858A (en) | 1992-06-12 | 1992-06-12 | Program editing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH05346858A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007524875A (en) * | 2003-01-10 | 2007-08-30 | ネクサウェブ テクノロジーズ インコーポレイテッド | System and method for network-based processing |
JP2018169887A (en) * | 2017-03-30 | 2018-11-01 | 東芝産業機器システム株式会社 | Program manufacturing method and computer system updating method |
-
1992
- 1992-06-12 JP JP4179304A patent/JPH05346858A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007524875A (en) * | 2003-01-10 | 2007-08-30 | ネクサウェブ テクノロジーズ インコーポレイテッド | System and method for network-based processing |
JP2018169887A (en) * | 2017-03-30 | 2018-11-01 | 東芝産業機器システム株式会社 | Program manufacturing method and computer system updating method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0785510B1 (en) | Program debugging system for debugging a program having a graphical user interface | |
US5860008A (en) | Method and apparatus for decompiling a compiled interpretive code | |
CN108351764B (en) | Data processing method and system | |
WO2009098739A1 (en) | Program optimization device and program optimization method | |
JPH0721033A (en) | Device and method for processing language | |
CN115543290B (en) | Visual programming method and system | |
JPH05346858A (en) | Program editing method | |
JPH07141192A (en) | Translation processing method | |
JPH08329004A (en) | Method for improving terminal operability of application program use | |
JPH08147156A (en) | Program transporting system | |
JP5399601B2 (en) | Implementation code development system and implementation code development program | |
JPH1011271A (en) | Version down input method | |
JP4590907B2 (en) | Software development support device and software development support program | |
EP0348563A1 (en) | A system and method for generating program object modules | |
JP3305782B2 (en) | Software standardization method and software product analysis method | |
JP2007011728A (en) | Device, method, and program for preparation of operating procedure of general-purpose computer | |
JPH0844518A (en) | Input operation unifying method for plural application software | |
JP3279706B2 (en) | Online compilation method | |
JPH0430239A (en) | Command option specification processing device | |
KR970011897B1 (en) | Language interpretation processing device | |
JP2999654B2 (en) | Terminal device | |
JPH06282443A (en) | Method and device for editing program | |
JPH0561687A (en) | Processing system for compiler | |
JPH04289927A (en) | Extended command generating system for debugger | |
JPH06161723A (en) | Program development language editing device |