JPH0782433B2 - How to confirm the comparison instruction when converting the program - Google Patents
How to confirm the comparison instruction when converting the programInfo
- Publication number
- JPH0782433B2 JPH0782433B2 JP60025610A JP2561085A JPH0782433B2 JP H0782433 B2 JPH0782433 B2 JP H0782433B2 JP 60025610 A JP60025610 A JP 60025610A JP 2561085 A JP2561085 A JP 2561085A JP H0782433 B2 JPH0782433 B2 JP H0782433B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- conversion
- data
- command
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Debugging And Monitoring (AREA)
Description
【発明の詳細な説明】 [産業上の利用分野] 本発明は、電子計算機のプログラムの変換時における確
認方法に関する。The present invention relates to a confirmation method when converting a program of an electronic computer.
情報処理システムにおいて、中央処理装置をアーキテク
チュアの異なる他の機械に置き換える場合には、いまま
で使用していたプログラムは、実証ずみの貴重なソフト
ウェア資産として、これを新しい機械で処理できるよ
う、総て変換しなければならない。When replacing the central processing unit with another machine with a different architecture in an information processing system, the programs used up to now are all valuable software assets that have been proven so that they can be processed by a new machine. I have to convert.
本発明は、この変換が正しく行われたかどうか確認する
方法が係わるものである。The present invention relates to a method for verifying whether this conversion was done correctly.
[従来の技術] アーキテクチュアの異なる電子計算機への置き換えのた
めのプログラムの変換は、現在種々の変換プログラムか
開発されている。[Prior Art] Conversion of programs for replacement of architectures with different computers is currently being developed by various conversion programs.
しかし特に、ワード系の機械(例えば2バイトを一単位
として扱う機械)からバイト系の機械への変換のよう
な、領域変動型の変換の場合には、データ定義部の内容
が大幅に変ってしまい、このような変化に伴う手続部
(原始プログラムを構成する4つの部の1つであって、
計算手順が記述される)での比較命令の変換は極めて困
難である。従って、正しく変換されない変換洩れが多く
あった。However, especially in the case of area-variable conversion, such as conversion from a word machine (for example, a machine that handles 2 bytes as one unit) to a byte machine, the contents of the data definition part will change significantly. Due to such changes, the procedure section (one of the four sections that make up the source program,
It is extremely difficult to convert the comparison instruction in (the calculation procedure is described). Therefore, there were many conversion omissions that could not be converted correctly.
これは、例えばコンパイラ言語COBOLにおいて「もしA
が1桁の文字であるならば」のような条件命令に基づく
比較命令では、データ定義部でA=A‘A'と記述する
が、ワード系からバイト系にプログラム変換するとデー
タ項目長が変わり、A=‘AΔ’(Δはスペースを示
す)と変えなければ変換エラーとなるからである。For example, in the compiler language COBOL, if "A
If the comparison command is based on a conditional command such as "If is a 1-digit character," it is written as A = A'A 'in the data definition part, but the data item length changes when the program is converted from word system to byte system. , A = 'AΔ' (Δ indicates a space), a conversion error occurs.
従来は、プログラム変換の確認のため、変換後のプログ
ラムをプログラム解析ツールにかけて、データ定義部と
手続部をそれぞれ解析していたが、比較命令に関して
は、データ定義部の変換と、手続部の変換の同期をとる
ことが困難なため、普遍的な確認は不可能であって、実
際にデータを入れでデバックするより方法はなかった。In the past, in order to confirm the program conversion, the converted program was applied to a program analysis tool to analyze the data definition part and the procedure part respectively. However, regarding the comparison instruction, the conversion of the data definition part and the conversion of the procedure part were performed. Since it was difficult to synchronize the, it was impossible to confirm universally, and there was no way to actually debug it by inserting data.
[発明が解決しようとする問題点] 上記に説明したように、領域変動型のプログラム変換に
対しての従来の確認方法によっては、比較命令に関し
て、普遍的な確認方法はなく、そのためデバックに多く
の時間を要するものであった。[Problems to be Solved by the Invention] As described above, according to the conventional confirmation method for the program conversion of the area variable type, there is no universal confirmation method for the comparison instruction, and therefore, it is often used for debugging. It took a long time.
本発明は、このプログラム変換時の比較命令を確認する
新規な方法を提供しようとするものである。The present invention is intended to provide a novel method for confirming the comparison instruction at the time of this program conversion.
[問題点を解決するための手段] 上記問題点は、変換前のプログラムと変換後のプログラ
ムを、別個にプログラム解析ツールにかけて、それぞれ
データ定義部および手続部ごとに解析し、変換前のプロ
グラムの命令およびこの命令が対象とするデータと、そ
の命令に対応する前記変換後のプログラムの命令および
この命令が対象とするデータとデータ項目をキーとして
検索しマッチングさせた上変換前後の比較命令が対象と
するデータのデータ長を比較照合して、予め定めた規則
に基づいて検査するよう構成した、本発明のプログラム
変換時の比較命令確認方法によって解決される。[Means for Solving Problems] Regarding the above problems, the program before conversion and the program after conversion are separately applied to a program analysis tool to analyze each data definition section and procedure section, and The instruction and the data targeted by this instruction, the instruction of the converted program corresponding to the instruction, and the comparison instruction before and after the conversion, in which the data and the data item targeted by this instruction are searched and matched This is solved by the comparison instruction confirmation method at the time of program conversion of the present invention configured to compare and verify the data lengths of the data to be verified and to inspect based on a predetermined rule.
[作用] 即ち、この方法は変換前のプログラムと変換後のプログ
ラムの両者をプログラム解析ツールにかけ、変換前のプ
ログラムにおける命令と、これが対象とするデータと、
その命令に対応する変換後の命令と、これが対象とする
データの4者を比較照合して、この4者間の条件によっ
て、エラーとするか、OKとするかの規則を定め、これに
よって検査・確認するものである。[Operation] That is, in this method, both the program before conversion and the program after conversion are applied to the program analysis tool, and the command in the program before conversion and the data targeted by this are
The converted instruction corresponding to the instruction is compared and collated with the four parties of the data that is the target of this instruction, and depending on the conditions between these four parties, a rule is determined as to whether it is an error or OK, and the inspection is performed.・ To confirm.
[実施例] 以下第1図および第2図に示す実施例により、本発明の
要旨を具体的に説明する。[Examples] The gist of the present invention will be specifically described below with reference to Examples shown in Figs. 1 and 2.
第1図は、本発明の一実施例の機能構成ブロック図であ
る。FIG. 1 is a functional configuration block diagram of an embodiment of the present invention.
図において、1は変換前のプログラムであり、既に以前
の計算機において実運用によって実証済みのものであ
る。2は変換時のプログラムであり、自動変換プログラ
ムによって変換を行ったが、特に比較命令については確
認検査する必要のあるものである。In the figure, 1 is a program before conversion, which has already been verified by actual operation on a previous computer. Reference numeral 2 is a program at the time of conversion, which has been converted by an automatic conversion program, but it is necessary to confirm and check especially the comparison instruction.
3,4は、プログラム解析用ツールであって、それぞれ変
換前プログラム1についは、データ定義部はデータ部解
析5によって、手続部は手続部解析6によって解析され
てデータ項目各、データ項目長、データ項目属性の情報
が抽出され、手続部は手続部解析6によって解析されて
命令種別、データ項目別(定義項目指示)の情報が抽出
される。変換後のプログラム2についても、データ定義
部はデータ部解析7によって解析されてデータ項目名、
データ項目長、データ項目属性の情報が抽出され、手続
部は手続部解析8によって解析されて命令種別、データ
項目名(定義項目指示)の情報が抽出される。Reference numerals 3 and 4 are program analysis tools. For the pre-conversion program 1, the data definition part is analyzed by the data part analysis 5, and the procedure part is analyzed by the procedure part analysis 6, and each data item, data item length, Data item attribute information is extracted, and the procedure division is analyzed by the procedure division analysis 6 to extract instruction type and data item (definition item instruction) information. Also in the converted program 2, the data definition part is analyzed by the data part analysis 7 and the data item name,
The information of the data item length and the data item attribute is extracted, and the procedure division is analyzed by the procedure division analysis 8 to extract the information of the instruction type and the data item name (definition item instruction).
比較命令確認部9は、上記解析によって得られた情報
を、データ項目名をキーとして検索してマッチングさ
せ、変換前のプログラムにおける命令およびこの命令が
対象とするデータと、その命令に対応する変換後のプロ
グラムにおける命令およびこの命令が対象とするデータ
の4者を比較照合して、一定の規則によって検査・確認
する。The comparison command confirmation unit 9 searches the information obtained by the above-mentioned analysis using the data item name as a key and matches the command, the command in the program before conversion, the data targeted by this command, and the conversion corresponding to the command. The command in the later program and the four parties of the data targeted by this command are compared and collated, and checked and confirmed according to certain rules.
比較命令確認部9における検査・確認の結果は、確認リ
スト10として出力される。The result of the inspection / confirmation by the comparison command confirmation unit 9 is output as a confirmation list 10.
この検査・確認のための一定の規則の例を、第2図に示
す。第2図は、COBOLにおけるIF命令による比較の際の
検査・確認の規則の例である。An example of certain rules for this inspection / confirmation is shown in FIG. Fig. 2 shows an example of rules for inspection and confirmation when comparing by IF command in COBOL.
(a)は、命令がIF A=‘A'、即ち、「Aが1桁の文字
で値がAであるならば」という条件命令であって、対象
とする変換前のデータAが、X(1)であり、変換後に
X(2)となった場合、即ち、1桁の文字が変換後に領
域変動によって、2桁の文字となったときは、エラーと
する。これは、変換後の命令は、IF A=‘AΔ’(Δは
スペースを示す)と、修正しなければならないからであ
る。(A) is a conditional instruction that the instruction is IF A = 'A', that is, "if A is a one-digit character and the value is A", and the target data A before conversion is X. In the case of (1), if X (2) is obtained after the conversion, that is, if a one-digit character becomes a two-digit character due to the area change after the conversion, an error is generated. This is because the converted instruction must be modified as IF A = 'AΔ' (Δ indicates a space).
(b)は、命令がIF A=1、即ち、「Aが数値の1であ
るならば」という条件命令であって、対象とする変換前
のデータAが、9(1)であり、変換後に9(2)にな
った場合、即ち、1桁の数値が変換後に領域変動によ
り、2桁の数値になった場合は、確認はOKとする。(B) is a conditional instruction that the instruction is IF A = 1, that is, “if A is a numerical value 1”, and the target data A before conversion is 9 (1), If it becomes 9 (2) later, that is, if the 1-digit numerical value becomes the 2-digit numerical value due to the area change after conversion, the confirmation is OK.
これは、命令はIF A=1でも、IF A=01でもよいからで
ある。This is because the instruction may be IF A = 1 or IF A = 01.
[発明の効果] 以上説明したように本発明によれば、従来不可能であっ
た領域変動型のプログラム変換時の検査・確認が可能と
なり、プログラム変換の生産性を向上し、品質の向上が
期待でき、その実用上の効果は大なるものがある。[Effects of the Invention] As described above, according to the present invention, it is possible to perform inspection / confirmation at the time of area conversion type program conversion, which has been impossible in the past, thereby improving the productivity of program conversion and improving the quality. It can be expected, and its practical effect is great.
【図面の簡単な説明】 第1図は本発明の一実施例の機能構成ブロック図、 第2図は確認規則の一例を示す図である。 図面において、 1は変換前プログラム、2は変換後プログラム、 3,4はプログラム解析ツール、 5,7はデータ部解析、6,8は手続部解析、 9は比較命令確認部、10は確認リスト、 をそれぞれ示す。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a functional configuration block diagram of an embodiment of the present invention, and FIG. 2 is a diagram showing an example of confirmation rules. In the drawing, 1 is a program before conversion, 2 is a program after conversion, 3 and 4 are program analysis tools, 5 and 7 are data section analysis, 6 and 8 are procedure section analysis, 9 is a comparison command confirmation section, and 10 is a confirmation list. , Respectively.
Claims (1)
るためのプログラム変換の際の確認方法であって、 変換前のプログラムおよび変換後のプログラムを、それ
ぞれ別個にプログラム解析ツールにかけて、それぞれデ
ータ定義部および手続部ごとに解析し、 前記変換前のプログラムの命令および該命令が対象とす
るデータと、該命令に対応する変換後のプログラムの命
令および該命令が対象とするデータとをデータ項目名を
キーとして検索してマッチングさせた上変換前後の比較
命令が対象とするデータのデータ長を比較照合して、長
さが一致しないものについて、 予め定めたデータ項目属性に基づいて検査するよう構成
したことを特徴とするプログラム変換時の比較命令確認
方法。1. A confirmation method at the time of program conversion for use on a computer having a different architecture, wherein a program before conversion and a program after conversion are individually applied to a program analysis tool to respectively define a data definition section and a procedure. Each part is analyzed, and the command of the program before conversion and the data targeted by the command and the command of the program after conversion corresponding to the command and the data targeted by the command are data item names as keys. It is configured to search and match, and compare and collate the data length of the target data by the comparison command before and after conversion, and to inspect those that do not match the length based on the predetermined data item attribute. Characteristic method for confirming comparison instructions during program conversion.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60025610A JPH0782433B2 (en) | 1985-02-13 | 1985-02-13 | How to confirm the comparison instruction when converting the program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60025610A JPH0782433B2 (en) | 1985-02-13 | 1985-02-13 | How to confirm the comparison instruction when converting the program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS61216036A JPS61216036A (en) | 1986-09-25 |
| JPH0782433B2 true JPH0782433B2 (en) | 1995-09-06 |
Family
ID=12170658
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60025610A Expired - Lifetime JPH0782433B2 (en) | 1985-02-13 | 1985-02-13 | How to confirm the comparison instruction when converting the program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0782433B2 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59183441A (en) * | 1983-03-31 | 1984-10-18 | Fujitsu Ltd | Debug processing system of extended language |
-
1985
- 1985-02-13 JP JP60025610A patent/JPH0782433B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS61216036A (en) | 1986-09-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6219831B1 (en) | Device and method for converting computer programming languages | |
| US9122540B2 (en) | Transformation of computer programs and eliminating errors | |
| US6457176B1 (en) | System and method for source code processing | |
| JP2001522084A (en) | Method of generating ISA simulator and assembler from machine language description | |
| JPH11306046A (en) | Test case generation system and test case generation method | |
| JP2009223851A (en) | Method for migrating database system | |
| US20040010780A1 (en) | Method and apparatus for approximate generation of source code cross-reference information | |
| US20220156174A1 (en) | Automated identification of lines of code related to errors field | |
| JPH0782433B2 (en) | How to confirm the comparison instruction when converting the program | |
| Sargsyan et al. | Scalable and accurate clones detection based on metrics for dependence graph | |
| JP2610013B2 (en) | Area transfer confirmation method at program conversion | |
| JPH08194611A (en) | A device that analyzes the range of influence of program modification | |
| JPS6022373B2 (en) | Program conversion mechanism for programmable control equipment | |
| CN104239064A (en) | Method for extracting and organizing ARM (advanced RISC machine) program relocation information | |
| Huang et al. | Detecting and fixing violations of modification terms in open source licenses during forking | |
| Hunold et al. | Pattern-based refactoring of legacy software systems | |
| JPH07121379A (en) | Multilingual compiler | |
| JPH0830448A (en) | Program specification consistency inspecting device | |
| JP2868127B2 (en) | Blank reading device in lexical analysis | |
| JP2728504B2 (en) | Input statement checker | |
| JPH03141427A (en) | How to create standard record specification information | |
| JPH0695890A (en) | Name replacement system in compiler | |
| JPH05224944A (en) | Alignment matching method | |
| JP6011988B2 (en) | Impact range survey method and impact range survey device | |
| JPH01173135A (en) | Conversion processing system applying source converter |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EXPY | Cancellation because of completion of term |