JPH05241818A - Program source converter - Google Patents

Program source converter

Info

Publication number
JPH05241818A
JPH05241818A JP4041494A JP4149492A JPH05241818A JP H05241818 A JPH05241818 A JP H05241818A JP 4041494 A JP4041494 A JP 4041494A JP 4149492 A JP4149492 A JP 4149492A JP H05241818 A JPH05241818 A JP H05241818A
Authority
JP
Japan
Prior art keywords
program
output
conversion
program source
file
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
Application number
JP4041494A
Other languages
Japanese (ja)
Inventor
Yoshio Nakatsuka
恵生 中塚
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 JP4041494A priority Critical patent/JPH05241818A/en
Publication of JPH05241818A publication Critical patent/JPH05241818A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To save the labor of holding the connection of output data with a program processing by an operator at the time of the operation of a software transition. CONSTITUTION:A file declaration term group preparing part 15 analyzes a program source before conversion, and prepares a file declaration description for output for inputting an output file on an original system. A data input/ comparison/judgement processing term unit preparing part 16 prepares a series of description, that is, 'the preliminarily prepared output data on the original system are inputted, and compared with the output data of the pertinent program, and when they are not equal, the result is communicated' just after the output command of the program. A conversion part retrieving and conversion information outputting part 12 insets a series term unit prepared by the data input/comparison/judgement processing part 16 just after the output command sentence of the program source of a unit storage device 30.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、電子計算機上で利用さ
れるプログラムソース変換装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program source conversion device used on an electronic computer.

【0002】[0002]

【従来の技術】一般に、電子計算機上で利用されるプロ
グラムソース変換装置は、起点システムと目標システム
の差異に影響される箇所を、当該プログラムが起点シス
テム上での動作の仕方を再現できるように変換補填する
目的を持っている。
2. Description of the Related Art Generally, a program source conversion device used on an electronic computer is designed to reproduce the way the program operates on a starting point system at a position affected by the difference between the starting system and the target system. It has the purpose of conversion compensation.

【0003】しかし、当該プログラムソース変換装置が
変換補填したプログラムソースは、後の工程であるとこ
ろの品質保証工程で、目標システム上でも起点システム
上で動作していたと同等であるかが検査されなければな
らない。
However, the program source converted and supplemented by the program source conversion apparatus must be inspected in a quality assurance process, which is a later process, in the same way as if it was operating on the target system even on the target system. I have to.

【0004】従来、この種の品質保証工程は、当該プロ
グラムが起点システム上で入力していたデータを再度変
換後プログラムに入力し、当該変換後プログラムが目標
システム上で処理した結果としての出力データを保存
し、起点システム上で当該プログラムが出力していたデ
ータと比較し、同等の結果を出力しているか否かを検査
している。このとき、比較用ソフトウェアによる起点シ
ステム上出力データと目標システム上出力データの自動
比較を行い、比較結果を人間系が判断している。当該の
検査時、誤った結果が出た場合に当該プログラムのどの
箇所で誤差が生じ始めたのかを解明する必要がある。こ
のときの最初の糸口は、誤った結果がプログラムのどこ
で出力されたかを調べることである。通常、この種のプ
ログラム移行作業での人間系は当該プログラムを作成し
た要員と異なるため、問題の究明に非常な困難を極めて
いる。
Conventionally, in this type of quality assurance process, the data input by the program on the starting system is input again to the post-conversion program, and the output data as a result of the post-conversion program processing on the target system. Is stored and compared with the data output by the program on the starting system to check whether the same result is output. At this time, the comparison software automatically compares the output data on the starting system and the output data on the target system, and the human system judges the comparison result. At the time of the inspection, it is necessary to clarify where in the program the error began to occur if an incorrect result was obtained. The first clue here is to find out where in the program the incorrect result was output. Usually, the human system in this kind of program migration work is different from the personnel who created the program, so it is extremely difficult to investigate the problem.

【0005】[0005]

【発明が解決しようとする課題】上述した従来技術は、
プログラムソース変換装置が出力した変換後プログラム
の処理した出力データと保存されていた当該目標システ
ム上での出力データを比較用ソフトウェアに比較させる
ために、当該プログラムの移行作業が時間的に区切ら
れ、出力データと当該プログラムの処理の結合性が失わ
れてしまうという欠点があった。
SUMMARY OF THE INVENTION The above-mentioned prior art is
In order to allow the comparison software to compare the output data processed by the converted program output by the program source conversion device and the output data on the target system that was saved, the migration work of the program is divided in time, There is a drawback that the connection between the output data and the processing of the program is lost.

【0006】本発明の目的は、出力データと当該プログ
ラムの処理の結合性が失われることなくソフトウェア移
行作業を行なうことができるプログラムソース変換装置
を提供することである。
An object of the present invention is to provide a program source conversion device capable of performing software migration work without losing the coupling between output data and the processing of the program.

【0007】[0007]

【課題を解決するための手段】本発明のプログラムソー
ス変換装置は、プログラムソース中の出力命令箇所に、
起点システム上で当該プログラムが出力したデータと移
行後プログラムが出力するデータを比較する処理を追加
する手段を備えている。
According to the program source conversion apparatus of the present invention, an output instruction portion in a program source is
It is provided with means for adding processing for comparing the data output by the program with the data output by the post-migration program on the origin system.

【0008】[0008]

【作用】変換後プログラム中に起点システム上の出力デ
ータと目標システム上の出力データの比較手段があらか
じめ組み込まれているため、作業者は出力データとプロ
グラム処理の結合性を保つことに尽力しなくて済む。
Since the means for comparing the output data on the starting point system with the output data on the target system is incorporated in the converted program in advance, the worker does not make an effort to maintain the connection between the output data and the program processing. Complete.

【0009】[0009]

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

【0010】図1は本発明の一実施例のプログラムソー
ス変換装置の構成図、図2は変換前プログラムソースの
構造を示す図、図3は本発明の特徴であるプログラムソ
ース中の出力命令箇所に、起点システム上で当該プログ
ラムが出力したデータと移行後プログラムが出力するデ
ータを比較する処理が追加された移行後プログラムソー
スの構造を示す図である。
FIG. 1 is a block diagram of a program source conversion apparatus according to an embodiment of the present invention, FIG. 2 is a view showing the structure of a program source before conversion, and FIG. 3 is an output instruction point in the program source which is a feature of the present invention. FIG. 8 is a diagram showing a structure of a post-migration program source in which a process of comparing data output by the program with data output by the post-migration program on the starting system is added.

【0011】本実施例のプログラムソース変換装置10
は、図1に示すように、プログラムソース字句解析・構
文解析部11と、ファイル・レコード情報メモリ14
と、変換箇所検索・変換情報出力部12と、ファイル宣
言字句群生成部15と、データ入力・比較・判断処理字
句生成部16と、プログラムソーステキスト生成部13
と、変換前プログラムソース記憶装置20と、字句記憶
装置30と、変換後プログラムソース記憶装置40で構
成されている。
Program source conversion apparatus 10 of the present embodiment
Is a program source lexical analyzer / syntactic analyzer 11 and a file / record information memory 14 as shown in FIG.
A conversion location search / conversion information output unit 12, a file declaration lexical group generation unit 15, a data input / comparison / determination processing lexical generation unit 16, and a program source text generation unit 13
The pre-conversion program source storage device 20, the lexical storage device 30, and the post-conversion program source storage device 40.

【0012】字句解析・構文解析部11は、変換指示R
によって動作を開始し、変換前プログラムソース記憶装
置20から入力した変換プログラムソースに対し字句・
構文解析を実施し、結果を字句記憶装置30に出力し、
またファイル名やレコード長およびレコードレイアウト
を決定する記述の字句をファイル・レコード情報メモリ
14に格納する。変換箇所検索・変換情報出力部12
は、字句記憶装置30からファイルの宣言の終了地点を
検出したり、出力命令の存在箇所を検出したり、さら
に、ファイル宣言字句群生成部15から渡されるファイ
ル宣言を構成する字句を字句記憶装置30に挿入した
り、データ入力・比較・判断処理字句生成部16から渡
される字句群を字句記憶装置30に挿入する。プログラ
ムソーステキスト生成部13は、字句記憶装置30から
プログラムを構成する字句を取り出してプログラムソー
ステキストを形成し、変換後プログラムソース記憶装置
40に格納する。ファイル宣言字句群生成部15は、フ
ァイル・レコード情報メモリ14をもとに、当該プログ
ラムが持つ出力ファイルの宣言から起点システム上出力
データを入力ファイルとする宣言字句を生成する。デー
タ入力・比較・判断処理字句生成部16は、「起点シス
テム上出力データを入力し、当該の入力されたデータと
移行後プログラムの出力データを比較し、等しいか否か
の判断を実施し、等しくない場合は当該出力データが起
点システム上と異なる結果を出力していることを通知す
る」一連の処理を示す命令文を構成する字句群を生成す
る。
The lexical analysis / syntax analysis unit 11 converts the conversion instruction R
The operation is started by the lexical command for the conversion program source input from the pre-conversion program source storage device 20.
Parsing is performed, the result is output to the lexical storage device 30,
The file / record information memory 14 also stores a lexical description that determines the file name, record length, and record layout. Conversion location search / conversion information output unit 12
Detects the end point of the file declaration from the lexical storage device 30, detects the location of the output instruction, and further stores the lexical elements constituting the file declaration passed from the file declaration lexical group generation unit 15 in the lexical storage device. 30 or the lexical group passed from the data input / comparison / judgment lexical generation unit 16 is inserted into the lexical storage device 30. The program source text generation unit 13 takes out the tokens that make up the program from the token storage device 30, forms a program source text, and stores it in the converted program source storage device 40. Based on the file / record information memory 14, the file declaration token group generation unit 15 generates a declaration token having output data on the origin system as an input file from the declaration of the output file of the program. The data input / comparison / judgment process The lexical generation unit 16 inputs “output data on the starting system, compares the input data with the output data of the post-migration program, and judges whether they are equal, If they are not equal, the output data is notified that the output result is different from that on the origin system. "A lexical group forming a command statement showing a series of processes is generated.

【0013】次に、本実施例の動作を、プログラムソー
ス中の出力命令箇所に、起点システム上で当該プログラ
ムが出力したデータと移行後プログラムが出力するデー
タを比較する処理を追加するプログラムソース変換装置
10と、処理動作を説明するために、変換前プログラム
ソースの構造を示す図2と変換後プログラムソースの構
造を示す図3を用いながら説明する。
Next, the operation of this embodiment is performed by adding a process of comparing the data output by the program on the starting system with the data output by the post-migration program at the output command location in the program source. The apparatus 10 and the processing operation will be described with reference to FIG. 2 showing the structure of the pre-conversion program source and FIG. 3 showing the structure of the post-conversion program source.

【0014】まず、プログラムソース変換装置10の字
句解析・構文解析部11は、変換指示Rによって動作を
開始し、変換前プログラム記憶装置20から渡された図
2で示すようなプログラムソース60を字句分割し、分
割された字句をそれぞれ構文としての意味付けを実施し
ていくと同時に、字句記憶装置30に記憶させる。この
とき、プログラムソース字句解析・構文解析部11は、
プログラム60中のファイル宣言の記述部分61から、
ファイル名とレコード長およびレコードを構成する要素
をファイル・レコード情報メモリ14に格納する。この
ようにしてプログラムソース60の字句解析および構文
解析が終了すると、プログラム字句解析・構文解析部1
1は、変換箇所検索・変換情報出力部12に制御を渡
す。制御を受け取った変換箇所検索・変換情報出力部1
2は、字句記憶装置30の字句分割されたプログラムソ
ース60の字句群を走査し、まず、ファイル宣言群の終
了点に位置づける。この位置づけが終了した後、変換箇
所検索・変換情報出力部12は、ファイル宣言字句群生
成部15に制御を渡す。制御を受け取ったファイル宣言
字句群生成部15は、ファイル・レコード情報メモリ1
4を走査し、出力ファイルに関する情報61を入力ファ
イルとするファイル宣言を記述するための字句群に変換
しながら当該字句群71と制御を変換箇所検索・変換情
報出力部12に渡す。ファイル宣言字句群生成部15か
ら当該プログラムソースが持つ出力ファイルと同等のフ
ァイルを入力ファイルとするファイル宣言を記述するた
めの字句群71を受け取るとともに制御を受け取った変
換箇所検索・変換情報出力部12は、位置づけていた字
句記憶装置30のプログラムソース60のファイル宣言
の終了点の直後に当該プログラムソース60が持つ出力
ファイルと同等のファイルを入力ファイルとするファイ
ル宣言を記述するための字句群71を挿入する。
First, the lexical analysis / syntax analysis unit 11 of the program source conversion device 10 starts operation according to the conversion instruction R, and lexically converts the program source 60 passed from the pre-conversion program storage device 20 as shown in FIG. The lexical storage device 30 is divided, and each divided lexical item is stored in the lexical storage device 30 while being semantically added as a syntax. At this time, the program source lexical analysis / syntax analysis unit 11
From the description part 61 of the file declaration in the program 60,
The file name, the record length, and the elements constituting the record are stored in the file / record information memory 14. When the lexical analysis and the syntax analysis of the program source 60 are completed in this way, the program lexical analysis / syntax analysis unit 1
1 passes control to the conversion location search / conversion information output unit 12. Conversion location search / conversion information output unit 1 that received control
2 scans the lexical group of the lexically divided program source 60 of the lexical storage device 30, and first locates it at the end point of the file declaration group. After this positioning is completed, the conversion location search / conversion information output unit 12 transfers control to the file declaration lexical group generation unit 15. Upon receiving the control, the file declaration lexical group generation unit 15 uses the file / record information memory 1
4 is scanned, and while the information 61 related to the output file is converted into a lexical group for describing a file declaration in which the input file is described, the lexical group 71 and control are passed to the conversion location search / conversion information output unit 12. The conversion location search / conversion information output unit 12 that has received a control from the file declaration token group generation unit 15 and has received a control while receiving a token group 71 for describing a file declaration in which a file equivalent to the output file of the program source is an input file. Immediately after the end point of the file declaration of the program source 60 of the lexical storage device 30 that has been positioned, a lexical group 71 for describing a file declaration in which a file equivalent to the output file of the program source 60 is an input file is written. insert.

【0015】次に、変換箇所検索・変換情報出力部12
は、字句記憶装置30のプログラムソース60を走査
し、出力命令文の終了点に位置づける。このとき変換箇
所検索・変換情報出力部12は、当該出力命令文が出力
しようとするファイル名“OUTFILE”と制御をデ
ータ入力・比較・判断処理字句生成部16に渡す。制御
を受け取ったデータ入力・比較・判断処理字句生成部1
6は、ファイル名“OUTFILE”に該当する情報を
走査し、「ファイル名“OUTFILE”の出力するデ
ータに関係づけられた新しく生成したファイルからデー
タを入力し、当該データとファイル名“OUTFIL
E”が出力したデータを比較し、等しいか否かの判断を
実施し、等しくない場合は当該出力データが起点システ
ム上と異なる結果を出力していることを通知する」一連
の処理を構成する字句群72と制御を変換箇所検索・変
換情報出力部12に渡す。データ入力・比較・判断処理
字句生成部16から「新しく宣言した入力ファイルであ
る起点システム上出力ファイルからデータを入力し、当
該の入力したデータと移行後プログラムの出力データを
比較し、等しいか否かの判断を実施し、等しくない場合
は当該出力データが起点システム上と異なる結果を出力
していることを通知する」一連の処理を構成する字句群
72と制御を受け取った変換箇所検索・変換情報出力部
12は、位置づけていた字句記憶装置30のプログラム
ソース60の出力命令文の終了点の直後に「新しく宣言
した入力ファイルである起点システム上出力ファイルか
らデータを入力し、当該の入力したデータと移行後プロ
グラムの出力データを比較し、等しいか否かの判断を実
施し、等しくない場合は当該出力データが起点システム
上と異なる結果を出力していることを通知する」一連の
処理を構成する字句群72を挿入する。変換箇所検索・
変換情報出力部12は、前述の処理を繰り返し、出力命
令文が検索できなくなった時点で、制御をプログラムソ
ーステキスト生成部13に渡す。
Next, the conversion location search / conversion information output unit 12
Scans the program source 60 of the lexical storage device 30 and positions it at the end of the output statement. At this time, the conversion location search / conversion information output unit 12 passes the file name “OUTFILE” and the control to be output by the output command statement to the data input / comparison / determination processing lexical generation unit 16. Data input / comparison / judgment process lexical generator 1 that received control
6 scans the information corresponding to the file name "OUTFILE", inputs data from a newly created file related to the data output by "file name" OUTFILE ", and outputs the data and the file name" OUTFILE ".
E "compares the data output, judges whether or not they are equal, and when they are not equal, notifies that the output data is different from that on the origin system." The lexical group 72 and control are passed to the conversion location search / conversion information output unit 12. Data input / comparison / judgment process From the lexical generator 16, "Data is input from the output file on the origin system, which is a newly declared input file, and the input data is compared with the output data of the post-migration program. Or not, and if they are not the same, it notifies that the output data is outputting a result different from that on the starting point system. The information output unit 12 immediately after the end point of the output command statement of the program source 60 of the lexical storage device 30 that has been positioned, “input data from the output file on the origin system which is a newly declared input file, The data is compared with the output data of the program after migration, and it is judged whether they are equal. If they are not equal, the output data is generated. Inserting a lexical group 72 constituting the notification to "series of processing that outputs different results on the system. Conversion location search
The conversion information output unit 12 repeats the above-described processing, and when the output command cannot be retrieved, passes the control to the program source text generation unit 13.

【0016】最後に、変換箇所検索・変換情報出力部1
2から制御を受け取ったプログラムソーステキスト生成
部13は、字句記憶装置30に格納されている変換後プ
ログラムソース70を構成する字句群を取り出し、プロ
グラムとしてソーステキストを形成させ、変換後プログ
ラムソース記憶装置40に格納する。
Finally, the conversion location search / conversion information output unit 1
The program source text generation unit 13, which has received the control from 2, takes out the lexical group forming the converted program source 70 stored in the lexical storage device 30, forms the source text as a program, and converts the converted program source storage device. Store in 40.

【0017】[0017]

【発明の効果】以上説明したように本発明は、変換後プ
ログラム中に起点システム上の出力データと目標システ
ム上の出力データの比較手段をあらかじめ組み込むこと
により、作業者は出力データとプログラム処理の結合性
を保つことに尽力しなくて済む効果がある。
As described above, according to the present invention, by incorporating in advance the means for comparing the output data on the origin system and the output data on the target system in the converted program, the operator can check the output data and the program processing. This has the effect that you do not have to put effort into maintaining cohesion.

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

【図1】本発明の一実施例のプログラムソース変換装置
の構成図である。
FIG. 1 is a configuration diagram of a program source conversion apparatus according to an embodiment of the present invention.

【図2】変換前プログラムソースの構造例を示す図であ
る。
FIG. 2 is a diagram showing a structural example of a pre-conversion program source.

【図3】プログラムソース中の出力命令箇所に、起点シ
ステム上で当該プログラムが出力したデータと移行後プ
ログラムが出力するデータを比較する処理を追加された
移行後プログラムソースの構造を示す図である。
FIG. 3 is a diagram showing a structure of a post-migration program source in which a process of comparing data output by the program on the origin system with data output by the post-migration program is added to an output command location in the program source. ..

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

10 プログラムソース変換装置 11 プログラムソース字句解析・構文解析部 12 変換箇所検索・変換情報出力部 13 プログラムソーステキスト生成部 14 ファイル・レコード情報メモリ 15 ファイル宣言字句群生成部 16 データ入力・比較・判断処理字句生成部 20 変換前プログラムソース記憶装置 30 字句記憶装置 40 変換後プログラムソース記憶装置 10 Program Source Converter 11 Program Source Lexical Analysis / Syntax Analysis Section 12 Conversion Location Search / Conversion Information Output Section 13 Program Source Text Generation Section 14 File / Record Information Memory 15 File Declaration Lexical Group Generation Section 16 Data Input / Comparison / Judgment Processing Lexical generation unit 20 Pre-conversion program source storage device 30 Lexical storage device 40 Post-conversion program source storage device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 プログラムソース変換装置において、プ
ログラムソース中の出力命令箇所に、起点システム上で
当該プログラムが出力したデータと、移行後プログラム
が出力するデータを比較する処理を追加する手段を備え
たことを特徴とするプログラムソース変換装置。
1. The program source conversion device further comprises means for adding, at an output command location in the program source, processing for comparing data output by the program on the origin system and data output by the post-migration program. A program source conversion device characterized by the above.
JP4041494A 1992-02-27 1992-02-27 Program source converter Pending JPH05241818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4041494A JPH05241818A (en) 1992-02-27 1992-02-27 Program source converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4041494A JPH05241818A (en) 1992-02-27 1992-02-27 Program source converter

Publications (1)

Publication Number Publication Date
JPH05241818A true JPH05241818A (en) 1993-09-21

Family

ID=12609913

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4041494A Pending JPH05241818A (en) 1992-02-27 1992-02-27 Program source converter

Country Status (1)

Country Link
JP (1) JPH05241818A (en)

Similar Documents

Publication Publication Date Title
US4949253A (en) Method and apparatus for automatically generating program
US20010013043A1 (en) System and method for determining browser package and version compatibility of a web document
EP0785510A1 (en) Program debugging system for debugging a program having a graphical user interface
CN107015813A (en) Method, device and electronic equipment that code is repaired
US4992971A (en) Method and apparatus for an automatic check of whether or not calling parameters correspond to called parameters during linkage operation
Carroll et al. A development environment for large natural language grammars
JPH11249875A (en) Method for supporting programming and device therefor
JPH11306046A (en) Test case generation system and method
US5805888A (en) Identifier dictionary-generating device
JP3196675B2 (en) Language processing method
JPH05241818A (en) Program source converter
CN112559359A (en) Based on S2ML safety critical system analysis and verification method
JPH06195216A (en) Automatic generation device for verification program
JPH07121379A (en) Plural languages mixing compiler
JPH11154093A (en) Program compiler and storage medium recording compiler program
JPH06290039A (en) Method for changing program
JP3248433B2 (en) Program linkage verification method
JPH01177165A (en) Definition-quotation relation checking system for array
Malshakov Interoperability Application Package
JPS63273132A (en) Program development aid system
JP3210203B2 (en) Program test method and SQL simulator
JPH1031584A (en) Automatic device for verification of software
JP2001125793A (en) Compiler system, compile method and recording medium
JPS6170641A (en) Automatic generating method of test program
Resnick et al. Inscan: A syntax-directed language processor