JPH04178728A - Program structure display and output system - Google Patents

Program structure display and output system

Info

Publication number
JPH04178728A
JPH04178728A JP30413690A JP30413690A JPH04178728A JP H04178728 A JPH04178728 A JP H04178728A JP 30413690 A JP30413690 A JP 30413690A JP 30413690 A JP30413690 A JP 30413690A JP H04178728 A JPH04178728 A JP H04178728A
Authority
JP
Japan
Prior art keywords
program
instruction
output
storage part
output symbol
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
JP30413690A
Other languages
Japanese (ja)
Inventor
Tomomi Fujita
藤田 智巳
Shigeki Kajiwara
梶原 茂喜
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP30413690A priority Critical patent/JPH04178728A/en
Publication of JPH04178728A publication Critical patent/JPH04178728A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce working man-hours to interpret a program by enabling the mutual reference relation of a symbol, etc., used in the program to be referred. CONSTITUTION:The program targeted to process is read in from an external memory device 4, and is stored in a program storage part 7, and one text of the program is taken out from the program storage part 7, and an instruction is analyzed by referring to the table of an instruction specification storage part 8. When it is decided that the instruction is the one other than a branch instruction as a result of analysis, an output symbol is stored in an output symbol storage part 9, and when it is decided that the instruction is the branch instruction, the analysis of a branch destination is performed. When the branch destination is outside the program targeted to process, the output symbol of an external call is stored in the output symbol storage part 9, and when the branch destination is not outside the program targeted to process, branch destination information and the output symbol are stored in the output symbol storage part 9. When processing for all texts are completed, the information in the program storage part 7 and that in the output symbol storage part 9 are edited by using a character set, and are outputted to an output device 5. Thereby, the working man-hours for the interpretation of the program can be reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプログラムの処理手順を示すドキュメント及び
リストの表示出力方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for displaying and outputting documents and lists indicating program processing procedures.

〔従来の技術〕[Conventional technology]

従来の方式は、命令の通常の処理には長方形の図形を、
判断処理には菱形の図形を用いるという具合に、各種の
図形でプログラムのソーステキストを囲んで、プリンタ
装置等の表示装置にフローチャート及びPAD等として
出力していた。しかし、用紙サイズ等の物理的制限があ
る為、不要な余白が生じ、ドキュメント量の増大を招く
という欠点があった。また、従来の方式は、プログラム
のリスト(アセンブルリスト、コンパイルリスト等)と
は別のドキュメントとして8力していた為、プログラム
を理解する時には、プログラムのリストと前記ドキュメ
ントとを並用し、かつ対応を取りながら作業を行う必要
があった。なお、この種の方式として関連するものには
例えば特開昭63−253472号公報、同63721
1068号公報、同60−100226号公報、同60
−176178号公報、同60−45845号公報等が
挙げられる。
In the conventional method, a rectangular figure is used for normal processing of instructions.
The source text of a program is surrounded by various shapes, such as a diamond shape, and outputted to a display device such as a printer as a flowchart, PAD, etc. for the judgment process. However, due to physical limitations such as paper size, unnecessary margins are created, resulting in an increase in the amount of documents. In addition, in the conventional method, the program list (assembly list, compile list, etc.) was written as a separate document, so when understanding a program, the program list and the document were used together, and the corresponding It was necessary to carry out the work while taking the Related methods of this type include, for example, Japanese Unexamined Patent Publication Nos. 63-253472 and 63721.
No. 1068, No. 60-100226, No. 60
-176178 gazette, 60-45845 gazette, etc. are mentioned.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記従来技術は、プログラムの詳細な処理手順を理解す
ることだけを支援するドキュメントである。しかし、プ
ログラムを理解するには処理手順以外にも、プログラム
内で使用している変数を定義した位置や参照している位
置の相互関係の情報等も必要不可欠な情報である。また
、アセンブラ等の機械語に近い言語で記述されたプログ
ラムを理解する時には、特にオブジェクトコード等の情
報は必要不可欠である。従って、従来プログラムを理解
する時には、前記ドキュメントとプログラムのリスト(
アセンブルリスト、コンパイルリスト等)とを手作業に
よって対応づけをしながら行わなければならないという
問題があった。
The above-mentioned prior art is a document that only supports understanding the detailed processing procedure of a program. However, in order to understand a program, in addition to the processing procedure, information on the mutual relationships between the positions where variables used in the program are defined and the positions where they are referenced is essential. Further, when understanding a program written in a language similar to machine language such as assembler, information such as object code is especially essential. Therefore, when understanding a conventional program, the list of documents and programs (
There was a problem in that the process had to be performed while manually associating the data (assemble list, compile list, etc.).

本発明は、1つのリストだけで、プログラム内で使用し
ている変数の相互参照関係情報や、ソーステキストに対
応したオブジェクトコード等の情報によりプログラムを
理解したり、フローチャートやPAD等により処理手順
を理解することを可能とすることを目的としており、さ
らに、リスト量を増大させずプログラムのリストと同等
の量で出力することを目的とする。
The present invention allows you to understand a program using information such as mutual reference relationships of variables used in the program and object code corresponding to the source text, and to explain processing procedures using flowcharts, PAD, etc. using just one list. The purpose is to make it possible to understand the program, and further, the purpose is to output the same amount as the program list without increasing the list size.

〔課題を解決するための手段〕 上記目的を達成するために、処理手順(フローチャート
、PAD等)出力用の文字セットを作成し、当該文字セ
ットを用いることにより、プログラムのリスト(アセン
ブルリスト、コンパイルリスト等)の持つ情報を減らさ
ないで、プログラムのリスト上に処理手順の出力領域を
設け、当該領域に処理手順を自動編集出力するようにし
たものである。
[Means for solving the problem] In order to achieve the above purpose, a character set for outputting processing procedures (flowcharts, PAD, etc.) is created, and by using the character set, a program list (assembly list, compilation list, etc.) is created. An output area for the processing procedure is provided on the program list, and the processing procedure is automatically edited and output to the area without reducing the information held in the list (such as a list).

また、リスト量を増大させないで、かつ限られた領域で
ある前記領域に処理手順を表す図を出力するために、命
令に対応した各種の図形でプログラムのソースステート
メントを囲んで表示するのではなく、命令に対応した文
字記号と同等の各種記号をソースステートメントに対応
した位置の前記領域中に自動的に編集し、表示出力する
ようにしたものである。
In addition, in order to output a diagram representing the processing procedure in the limited area without increasing the list size, instead of displaying the program source statement by surrounding it with various figures corresponding to the instruction. , various symbols equivalent to the character symbols corresponding to the commands are automatically edited in the area at the position corresponding to the source statement and are displayed and output.

〔作用〕[Effect]

あらかじめ、プログラムの各命令と各命令に対応する命
令種別とを、命令種別記憶部に記憶しておく。
Each instruction of the program and the instruction type corresponding to each instruction are stored in advance in an instruction type storage section.

まず、外部記憶装置からプログラムを入力し、プログラ
ムの1文ごとに命令を解析し、命令種別記憶部を参照し
て対応する命令種別を求め、結果をプログラムの1文ご
とと対応している出力記号記憶部に格納する。この時、
分岐命令の場合は、分岐先の情報についても解析を行い
、出力記号記憶部に格納する。上記処理をプログラムの
全文について行い、全文に対する処理が終了したら、次
に出力記号記憶部に格納された内容を処理手順(フロー
チャート、PAD等)として処理手順の出力領域に編集
し、ソーステキスト等のプログラムと一緒に配置し、プ
リンタ等の出力装置に出力する。
First, input a program from an external storage device, analyze the instructions for each statement in the program, refer to the instruction type storage unit to find the corresponding instruction type, and output the results corresponding to each statement in the program. Store in symbol storage. At this time,
In the case of a branch instruction, information on the branch destination is also analyzed and stored in the output symbol storage section. The above process is performed on the whole text of the program, and once the processing on the whole text is completed, the content stored in the output symbol storage unit is edited as a processing procedure (flowchart, PAD, etc.) in the output area of the processing procedure, and the source text etc. Place it together with the program and output it to an output device such as a printer.

このようにして、プログラムの1文ごとに対応した記号
を用いて、処理手順をプログラムのリストと一緒に出力
することができる。
In this way, the processing procedure can be output together with the program list using a symbol that corresponds to each sentence of the program.

〔実施例〕〔Example〕

以下1本発明の一実施例を図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は、本発明の一実施例を示す概略構成図である。FIG. 1 is a schematic diagram showing an embodiment of the present invention.

第1図において、1はキーボード等からなる入力装置、
2は処理装置、3はデイスプレィ等の表示装置、4は処
理対象プログラムが格納されている外部記憶装置、5は
プリンタ等からなる出力装置、6は内部メモリ、10は
文字セットが格納されている外部記憶装置である。内部
メモリ6には、外部記憶装W4から入力したプログラム
を記憶するプログラム記憶部7、プログラムの各命令と
各命令に対応する命令種別を配列したテーブルを記憶し
ている命令種別記憶部8、およびプログラムの1文ごと
の解析結果を格納する出力記号記憶部9が具備されてい
る。
In FIG. 1, 1 is an input device consisting of a keyboard, etc.;
2 is a processing device, 3 is a display device such as a display, 4 is an external storage device in which a program to be processed is stored, 5 is an output device such as a printer, 6 is an internal memory, and 10 is a character set stored therein. It is an external storage device. The internal memory 6 includes a program storage section 7 that stores the program input from the external storage device W4, an instruction type storage section 8 that stores a table in which each instruction of the program and the instruction type corresponding to each instruction are arranged, and An output symbol storage section 9 is provided to store analysis results for each sentence of the program.

第2図は、命令種別記憶部8のプログラムの各命令と各
命令に対応する種別を配列したテーブル20の詳細を示
す図で、命令欄にはA命令、B命令、L命令、SVC命
令等の各命令が配列され、種別欄には各命令に対応した
種別の処理命令1分岐命令、特権命令等が配列されてい
る。
FIG. 2 is a diagram showing details of a table 20 in which each instruction of the program in the instruction type storage unit 8 and the type corresponding to each instruction are arranged, and the instruction column includes A instruction, B instruction, L instruction, SVC instruction, etc. Each instruction is arranged, and in the type column, processing instructions 1 branch instruction, privileged instruction, etc. of the type corresponding to each instruction are arranged.

第1図において、入力装置1からの操作により。In FIG. 1, by operation from the input device 1.

処理装置2は処理プログラム用外部記憶装置4から処理
対象プログラムを読み込み、プログラム記憶部7に格納
する。次に、プログラム記憶部7からプログラムの1文
を取り出し、命令種別記憶部8を参照して解析し、命令
の解析結果を出力記号記憶部9に格納する。この処理を
プログラム記憶部7に格納した全ての文について繰り返
し、プログラム記憶部7と出力記号記憶部9の内容を外
部記憶装置10の文字セットを使用して編集し、それを
出力装置5に出力する。
The processing device 2 reads a processing target program from the processing program external storage device 4 and stores it in the program storage section 7. Next, one sentence of the program is taken out from the program storage section 7, analyzed with reference to the instruction type storage section 8, and the instruction analysis result is stored in the output symbol storage section 9. This process is repeated for all the sentences stored in the program storage section 7, the contents of the program storage section 7 and the output symbol storage section 9 are edited using the character set of the external storage device 10, and then outputted to the output device 5. do.

次に第3図のフローチャートを用いて、本発明の一実施
例を説明する。
Next, one embodiment of the present invention will be described using the flowchart shown in FIG.

まず、外部記憶装置4から処理対象のプログラムを読み
込み、プログラム記憶部7に格納する(301)。プロ
グラム記憶部7からプログラムの1文を取り出しく30
2) 、命令種別記憶部8のテーブルを参照して命令を
解析(303)する。命令の解析の結果、分岐命令以外
の場合は、出力記号記憶部9に出力記号を格納しく31
0)、分岐命令の場合は、分岐先の解析を行う(305
)。分岐先の解析の結果、分岐先が処理対象プログラム
の外部である場合は、外部呼び出しの出力記号を出力記
号記憶部に格納しく307)、分岐先が外部でない場合
は、出力記号記憶部9に分岐先情報の格納(308)、
出力記号の格納(309)をする。上記302から31
0までの処理をプログラムの全文に対して行ったかどう
かを調べ(311)、全文に対する処理が終了していな
い場合は終了するまでの間302から310の処理を繰
り返し、全文に対する処理が終了したら、プログラム記
憶部7の情報と出力記号記憶部9の情報を文字セットを
使用して編集して出力装置5に出力する(312)。
First, a program to be processed is read from the external storage device 4 and stored in the program storage section 7 (301). Retrieving one sentence of the program from the program storage unit 7 30
2) Analyze the instruction with reference to the table in the instruction type storage unit 8 (303). As a result of the analysis of the instruction, if the instruction is other than a branch instruction, the output symbol is stored in the output symbol storage section 9.
0), in the case of a branch instruction, the branch destination is analyzed (305
). As a result of branch destination analysis, if the branch destination is outside the processing target program, the output symbol of the external call is stored in the output symbol storage unit 307), and if the branch destination is not external, it is stored in the output symbol storage unit 9. Storing branch destination information (308);
The output symbol is stored (309). 302 to 31 above
It is checked whether the processing up to 0 has been performed on the whole text of the program (311), and if the processing on the whole text has not been completed, the processing from 302 to 310 is repeated until the processing on the whole text is completed, and when the processing on the whole text is completed, The information in the program storage section 7 and the information in the output symbol storage section 9 are edited using the character set and output to the output device 5 (312).

なお、上記実施例ではプリンタ等の出力装置5を例に説
明したが、CRTデイスプレィ等の表示装置3に表示す
ることも可能である。
In the above embodiment, the output device 5 such as a printer is used as an example, but it is also possible to display on the display device 3 such as a CRT display.

第4図は、アセンブルリストにフローチャート出力領域
を設けた場合の1出力例を示す図である。
FIG. 4 is a diagram showing an example of output when a flowchart output area is provided in the assemble list.

第4図において、ロケーションは命令の格納場所を相対
番地で示したもの、オブジェクト情報は機械語命令、ス
テートメント情報はステートメントに付されたシーケン
シャルな番号、ソース情報はアセンブラ言語によるステ
ートメントである。第5図は、第4図のフローチャート
に用いた各記号の意味を示す1例である。
In FIG. 4, location indicates a storage location of an instruction using a relative address, object information indicates a machine language instruction, statement information indicates a sequential number attached to a statement, and source information indicates a statement written in assembler language. FIG. 5 is an example showing the meaning of each symbol used in the flowchart of FIG. 4.

なお5第4図ではアセンブルリストにフローチャートの
出力領域を設けた場合の出力例であるがフローチャート
以外の処理手順を表すもの(PAD等)でも良いし、ア
センブルリストでなくてコンパイルリスト等でも良い。
Although FIG. 4 is an example of output when an output area for a flowchart is provided in the assemble list, it may be an output representing a processing procedure other than a flowchart (PAD, etc.), or it may be a compile list instead of an assemble list.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、1つのリストによりプログラムの処理
の流れを理解することと、プログラム内で使用している
記号の相互参照関係等を参照することが可能であり、プ
ログラムを理解するための作業工数を削減でき、保守性
の向上を図ることができる。特に、アセンブラ等、機械
語に近い言語で記述されたプログラムを理解する場合、
処理手順とソーステキストだけでなく、オブジェクトコ
ード等の情報も重要である為、効果が大である。
According to the present invention, it is possible to understand the flow of processing of a program using one list, and to refer to the mutual reference relationships of symbols used in the program, thereby making it possible to perform tasks for understanding the program. Man-hours can be reduced and maintainability can be improved. Especially when understanding programs written in languages similar to machine language, such as assembler,
It is very effective because not only the processing procedure and source text but also information such as object code is important.

また、プログラムのリスト(アセンブルリストやコンパ
イルリスト等)の各行の命令に対応した位置に処理手順
を表す記号を出力するため、プログラムのリストと同等
の出力量で済むため、経済的な効果もある。
In addition, because symbols representing processing steps are output at positions corresponding to the instructions on each line of the program list (assembly list, compile list, etc.), the amount of output required is equivalent to that of the program list, which is also economically effective. .

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示す概略構成図、第2図は
本発明の一実施例で命令を解析する時に使用する命令種
別記憶部内の命令と種別の対応をとるためのテーブルを
示す図、第3図は本発明の一実施例であるプログラムの
読み込み、命令の解析、編集・出力の一連の処理手順を
示すフローチャート、第4図は本発明の一実施例の出力
情報を示す図、第5図は本発明の一実施例の出方図で用
いる記号を説明する図である。 1・・・入力装置、        2・・・制御装置
。 3・・・表示装置、     4・・・外部記憶装置。 5・・・出力装置、       6・・・内部メモリ
。 7・・・プログラム記憶部、8・・・命令種別記憶部。 9・・・出力記号記憶部。
FIG. 1 is a schematic configuration diagram showing an embodiment of the present invention, and FIG. 2 is a table for associating instructions and types in an instruction type storage unit used when analyzing instructions in an embodiment of the present invention. FIG. 3 is a flowchart showing a series of processing steps of program loading, instruction analysis, editing/output, which is an embodiment of the present invention, and FIG. 4 shows output information of an embodiment of the present invention. FIG. 5 is a diagram for explaining symbols used in an exit diagram of an embodiment of the present invention. 1... Input device, 2... Control device. 3...Display device, 4...External storage device. 5... Output device, 6... Internal memory. 7...Program storage unit, 8...Instruction type storage unit. 9...Output symbol storage section.

Claims (1)

【特許請求の範囲】[Claims] 1、プログラムの処理手順(フローチャート、PAD等
)を自動作成するシステムにおいて、プログラムのリス
ト(アセンブルリスト、コンパイルリスト等)上に処理
手順(フローチャート、PAD等)の出力領域を設け、
当該領域にソースステートメントに対応した処理手順(
フローチャート、PAD等)を自動的に編集出力するこ
とを特徴とするプログラム構造表示出力方式。
1. In a system that automatically creates program processing procedures (flowcharts, PAD, etc.), an output area for processing procedures (flowcharts, PAD, etc.) is provided on the program list (assembly list, compile list, etc.),
The processing procedure corresponding to the source statement (
A program structure display output method characterized by automatically editing and outputting flowcharts, PAD, etc.
JP30413690A 1990-11-13 1990-11-13 Program structure display and output system Pending JPH04178728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30413690A JPH04178728A (en) 1990-11-13 1990-11-13 Program structure display and output system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30413690A JPH04178728A (en) 1990-11-13 1990-11-13 Program structure display and output system

Publications (1)

Publication Number Publication Date
JPH04178728A true JPH04178728A (en) 1992-06-25

Family

ID=17929477

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30413690A Pending JPH04178728A (en) 1990-11-13 1990-11-13 Program structure display and output system

Country Status (1)

Country Link
JP (1) JPH04178728A (en)

Similar Documents

Publication Publication Date Title
JP3038079B2 (en) Automatic translation device
US5261103A (en) Method of and system for compiling source program
US5189731A (en) Character processing system having editing function
JPH04178728A (en) Program structure display and output system
JPS6020284A (en) Electronic translation device
JP2766261B2 (en) Sentence summarization system
JPH02140828A (en) Program display system sorted by hierarchy in graphic program editor
JP3131432B2 (en) Machine translation method and machine translation device
JPS63288357A (en) Data editing system
JP2893239B2 (en) Translation support dictionary search and display system
JP2811804B2 (en) Variable output range specification method
JPH05298290A (en) Document processor with automatic layout function
JPH01236324A (en) Program design supporting system
JPH01280866A (en) Japanese word processing system
JPH05324289A (en) Device for automatically generating programming specification
JPH0423102A (en) Programming device for programmable controller
JPH01169672A (en) Character processor
JPH05108372A (en) System for outputting compiler optimization processing content
JPH0535455A (en) Scroll display system for program
JPH06187370A (en) Document read assisting device
JPH01129352A (en) Device for preparing presentation materials
JPS62166441A (en) Conversational type interruption information display system
JPS63174161A (en) Document processor
JPH0734193B2 (en) Text-separated learning system
JPH02289065A (en) Document generation supporting system