JP2740352B2 - Program analyzer - Google Patents

Program analyzer

Info

Publication number
JP2740352B2
JP2740352B2 JP2334876A JP33487690A JP2740352B2 JP 2740352 B2 JP2740352 B2 JP 2740352B2 JP 2334876 A JP2334876 A JP 2334876A JP 33487690 A JP33487690 A JP 33487690A JP 2740352 B2 JP2740352 B2 JP 2740352B2
Authority
JP
Japan
Prior art keywords
program
processing
analysis
subroutine
execution
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 - Fee Related
Application number
JP2334876A
Other languages
Japanese (ja)
Other versions
JPH04199435A (en
Inventor
ひろみ 内丸
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2334876A priority Critical patent/JP2740352B2/en
Publication of JPH04199435A publication Critical patent/JPH04199435A/en
Application granted granted Critical
Publication of JP2740352B2 publication Critical patent/JP2740352B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 概要 ある技術分野で用いられている複数のプログラムの中
には、共通なサブルーチンプログラムが用いられている
場合がある。また同一のサブルーチンプログラムが、一
つのプログラム中の複数箇所で呼出される場合もある。
このようなサブルーチンプログラムを含むプログラムの
構造を解析し、自動的にフローチヤートなどとして表示
しようとする場合、プログラムの解析をたとえば命令毎
に順次的に行うに際して、複数回呼出されるようなサブ
ルーチンプログラムに対して、その度にサブルーチンプ
ログラムの命令を読取つてその内容を解析することは多
大な手間を要することになる。
DETAILED DESCRIPTION Overview A common subroutine program may be used among a plurality of programs used in a certain technical field. Further, the same subroutine program may be called at a plurality of locations in one program.
When analyzing the structure of a program including such a subroutine program and automatically displaying the program as a flow chart or the like, a subroutine program which is called a plurality of times when sequentially analyzing the program for each instruction, for example. On the other hand, reading the instructions of the subroutine program each time and analyzing the contents thereof requires a lot of trouble.

したがつて本発明では、同一のプログラム中の複数箇
所で呼出されるサブルーチンプログラムなど、予め定め
るサブルーチンプログラムの処理内容、すなわち当該サ
ブルーチンプログラムにおける処理終了時における実行
内容を、これらの実行内容を示すアキユムレータや各種
レジスタあるいは各種コンデイシヨンフラグなどの処理
内容データとして別途登録しておく。プログラムの実行
内容を解析するに当たり、登録されたサブルーチンプロ
グラムをコールする命令があれば、登録された処理内容
データを呼出すだけで、サブルーチンプログラムの解析
の実行と同一の結果を得ることができる。これによりプ
ログラムの解析処理が大幅に簡略化され、またこのよう
なプログラム解析装置に用いられる各種メモリ類の容量
を削減すことができる。
Therefore, according to the present invention, the processing contents of a predetermined subroutine program such as a subroutine program called at a plurality of locations in the same program, that is, the execution contents at the end of the processing in the subroutine program are converted into an accumulator indicating these execution contents. And processing content data such as various registers or various condition flags are separately registered. In analyzing the execution contents of the program, if there is an instruction to call the registered subroutine program, the same result as the execution of the analysis of the subroutine program can be obtained only by calling the registered processing content data. This greatly simplifies the program analysis process and reduces the capacity of various memories used in such a program analysis device.

産業上の利用分野 本発明は、アセンブラ語などで記述されたプログラム
の内容を解析してプログラムの構造を表示するプログラ
ム解析装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program analysis device that analyzes the contents of a program described in assembler language or the like and displays the structure of the program.

従来の技術 たとえば科学技術計算や自動車の走行状態の制御な
ど、種々の技術分野で用いられているプログラムの中に
は、共通なサブルーチンプログラムが用いられている場
合がある。また同一のサブルーチンプログラムが、一つ
のプログラム中の複数箇所で呼出される場合もある。こ
のようなサブルーチンプログラムを含むプログラムの構
造を解析し、自動的にこのようなプログラムをフローチ
ヤートなどとして表示すれば、たとえば作成されたプロ
グラムの検査や訂正などを行う際にプログラムの構造や
処理の流れの把握が容易である。
2. Description of the Related Art A common subroutine program may be used in programs used in various technical fields such as scientific calculation and control of a running state of an automobile. Further, the same subroutine program may be called at a plurality of locations in one program. By analyzing the structure of a program including such a subroutine program and automatically displaying such a program as a flowchart, for example, when inspecting or correcting a created program, the structure and processing of the program can be checked. It is easy to grasp the flow.

このとき、プログラムの解析をたとえば命令毎に順次
的に行うに際して、従来では複数回呼出されるようなサ
ブルーチンプログラムに対しても、その度にサブルーチ
ンプログラムの内容を命令毎に解析するようにしてお
り、多大な手間を要している。
At this time, when analyzing the program sequentially for each instruction, for example, the contents of the subroutine program are analyzed for each instruction each time even for a subroutine program that is conventionally called a plurality of times. It takes a lot of trouble.

発明が解決しようとする課題 このように従来例では、プログラムの解析処理に多大
な時間を要すると共に、サブルーチンプログラムの実行
内容をその度に記憶する必要があり、プログラム解析装
置に用いられるメモリ類の容量が増大してしまうという
課題を有している。
As described above, in the conventional example, it takes a lot of time to analyze the program, and it is necessary to store the execution contents of the subroutine program each time. There is a problem that the capacity increases.

本発明の目的は、上述の技術的課題を解消し、プログ
ラム解析処理に要する時間を短縮できると共に、用いら
れるメモリの容量を削減すころができるプログラム解析
装置を提供することである。
SUMMARY OF THE INVENTION An object of the present invention is to provide a program analysis apparatus which can solve the above-mentioned technical problems, can shorten the time required for the program analysis processing, and can reduce the capacity of a memory used.

課題を解決するための手段 本発明は、複数の命令から構成されるプログラムを読
取る読取り手段と、 読取り手段で読取られたプログラムにおける処理経路
を判定する判定手段と、 判定手段で判定された処理経路毎に、各命令毎の実行
内容を解析する実行内容解析手段と、 プログラムに含まれる予め定めるサブルーチンプログ
ラムにおける処理内容データが予め登録されて記憶され
る登録記憶手段と、 実行内容解析手段の解析対象を識別し、解析対象が前
記処理内容が予め登録されて記憶されているサブルーチ
ンプログラムのとき、登録記憶手段に登録されている処
理内容データを呼出して実行内容解析手段に与える識別
呼出手段とを含むことを特徴とするプログラム解析装置
である。
Means for Solving the Problems The present invention relates to reading means for reading a program composed of a plurality of instructions, determining means for determining a processing path in the program read by the reading means, and processing path determined by the determining means Execution content analysis means for analyzing the execution content of each instruction for each instruction; registration storage means for pre-registering and storing processing content data in a predetermined subroutine program included in the program; analysis target of the execution content analysis means When the analysis target is a subroutine program in which the processing content is pre-registered and stored, the processing content data registered in the registration storage means is called and given to the execution content analysis means. A program analysis device characterized by the following.

作用 本発明に従えば、プログラムを構成する複数の命令
は、読取り手段で読出られ、判定手段により当該プログ
ラムにおける処理経路が判定される。この処理経路毎に
実行内容解析手段により、各命令毎の実行内容が解析さ
れる。一方、プログラムに含まれる予め定められるサブ
ルーチンプログラムにおける処理内容データが、登録記
憶手段に予め登録されて記憶される。識別呼出し手段
は、実行内容解析手段の解析対象を識別しており、解析
対象が前記処理内容が予め登録されて記憶されているサ
ブルーチンプログラムのとき、登録記憶手段に登録され
ている処理内容データを呼出して実行内容解析手段に与
えるようにしている。
According to the present invention, a plurality of instructions constituting a program are read by the reading means, and the processing path in the program is determined by the determining means. The execution contents of each instruction are analyzed by the execution contents analysis means for each processing path. On the other hand, processing content data in a predetermined subroutine program included in the program is registered and stored in the registration storage unit in advance. The identification calling means identifies an analysis target of the execution content analysis means. When the analysis target is a subroutine program in which the processing content is registered and stored in advance, the processing content data registered in the registration storage means is referred to. It is called and given to the execution content analysis means.

したがつて本発明では、同一のプログラム中の複数箇
所で呼出されるサブルーチンプログラムなど、予め定め
るサブルーチンプログラムの処理内容、すなわち当該サ
ブルーチンプログラムにおける処理終了時における実行
内容を、これらの実行内容を示すアキユムレータや各種
レジスタあるいは各種コンデイシヨンフラグなどの処理
内容データとして別途登録しておく。プログラムの実行
内容を解析するに当たり、登録されたサブルーチンプロ
グラムをコールする命令があれば、登録された処理内容
データを呼出すだけで、サブルーチンプログラムの命令
毎の解析の実行と同一の結果を得ることができる。これ
によりプログラムの解析処理が大幅に簡略化され、また
このようなプログラム解析装置に用いられる各種メモリ
類の容量を削減すことができる。
Therefore, according to the present invention, the processing contents of a predetermined subroutine program such as a subroutine program called at a plurality of locations in the same program, that is, the execution contents at the end of the processing in the subroutine program are converted into an accumulator indicating these execution contents. And processing content data such as various registers or various condition flags are separately registered. When analyzing the execution contents of a program, if there is an instruction to call a registered subroutine program, it is possible to obtain the same result as executing the analysis for each instruction of the subroutine program simply by calling the registered processing content data. it can. This greatly simplifies the program analysis process and reduces the capacity of various memories used in such a program analysis device.

実施例 第1図は本発明の一実施例のプログラム解析装置1の
構成を示すブロツク図である。プログラム解析装置1
は、フローチヤートとして表示されるプログラムを含む
各種のソースプログラムを記憶する、たとえばフロツピ
ーデスク記憶装置などとして実現される外部記憶装置2
と、外部記憶装置2に記憶されたソースプログラムを読
出してフローチヤートに変換して表示するための各種デ
ータ処理を行う処理部3と、たとえば陰極線管(CRT)
や液晶表示装置などで実現される表示装置4と、たとえ
ば各種シリアルプリンタまたはラインプリンタやいわゆ
るプロツタなどフローチヤートの印画表示出力を行う印
画装置5とを含んで構成される。
Embodiment FIG. 1 is a block diagram showing a configuration of a program analysis device 1 according to an embodiment of the present invention. Program analysis device 1
Is an external storage device 2 that stores various source programs including a program displayed as a flow chart, for example, is realized as a floppy disk storage device or the like.
A processing unit 3 for reading out a source program stored in the external storage device 2 and performing various data processing for converting the source program into a flow chart and displaying the same; for example, a cathode ray tube (CRT)
And a printing device 5 for outputting a print of a flow chart such as a serial printer or a line printer or a so-called plotter.

処理部3は、前記外部記憶装置2から読取られるプロ
グラムの構造を解析するプログラム解析部6と、フロー
チヤート図を作成して出力する図形処理部7とを含んで
構成される。
The processing unit 3 includes a program analysis unit 6 that analyzes the structure of a program read from the external storage device 2 and a graphic processing unit 7 that creates and outputs a flowchart.

前記プログラム解析部6は、たとえばマイクロコンピ
ユータなどを含んで構成され、解析されるプログラムに
おける各種判断命令やサブルーチンプログラムのコール
命令などに基づく処理経路(以下、「流れ」と称する場
合がある)の構造を解析する流れ構造解析部9と、プロ
グラムにおけるストア命令で集約される当該プログラム
における個々の命令での処理内容を解析して、当該処理
内容を分岐命令などの存在による場合分けに沿つて、各
場合毎の処理内容などを解析して整理して記憶するスト
ア内容解析部10と、前記プログラムにおける各種分岐命
令やサブルーチンプログラムのコール命令などの各種分
岐条件を解析する分岐条件解析部11とが備えられる。
The program analysis unit 6 is configured to include, for example, a microcomputer, and has a structure of a processing path (hereinafter, may be referred to as a “flow”) based on various determination instructions in a program to be analyzed and a call instruction of a subroutine program. And the processing contents of individual instructions in the program, which are aggregated by store instructions in the program, and analyze the processing contents according to the case depending on the presence of a branch instruction. A store content analysis unit 10 for analyzing, organizing, and storing processing contents for each case, and a branch condition analysis unit 11 for analyzing various branch conditions such as various branch instructions in the program and call instructions of a subroutine program are provided. Can be

図形処理部7は、表示制御部7aを備え、プログラム解
析部6からのデータに基づいてフローチヤートを図形デ
ータとして作成し、表示装置4に表示制御し、または印
画装置5に印画表示制御する。
The graphic processing unit 7 includes a display control unit 7a, creates a flowchart as graphic data based on the data from the program analysis unit 6, and controls the display on the display device 4 or the print display on the printing device 5.

第2図は、前記外部記憶装置2から読取りられたプロ
グラム12の構成例を示す図である。このプログラム12
は、メインプログラム13と、メインプログラム13のステ
ツプn1のコール命令16でコールされる、たとえば識別デ
ータSUB1を有するサブルーチンプログラム14と、ステツ
プn2でコールされる識別データSUB2を有するサブルーチ
ンプログラム15とを含んで構成されている。
FIG. 2 is a diagram showing a configuration example of the program 12 read from the external storage device 2. This program 12
Includes a main program 13, a subroutine program 14 having, for example, identification data SUB1 called by a call instruction 16 of step n1 of the main program 13, and a subroutine program 15 having identification data SUB2 called at step n2. It is composed of

第3図は本実施例のプログラム解析装置1の動作の全
体を説明するフローチヤートである。読取手段としての
第3図ステツプa1では、プログラム解析装置1は、外部
記憶装置2に記憶されている所定のソースプログラムを
読取り、処理部3に備えられるメモリ(図示せず)に記
憶する。ステツプa2では検査対象のプログラムの全体の
読取りが終了したか否かを判断し、終了するまでステツ
プa1,a2の処理を繰返し、終了したときにステツプa3に
移る。
FIG. 3 is a flowchart for explaining the entire operation of the program analysis device 1 of the present embodiment. In step a1 of FIG. 3 as reading means, the program analysis device 1 reads a predetermined source program stored in the external storage device 2 and stores it in a memory (not shown) provided in the processing unit 3. At step a2, it is determined whether or not the reading of the entire program to be inspected has been completed, and the processing of steps a1 and a2 is repeated until the reading is completed. When the reading is completed, the process proceeds to step a3.

判定手段としてのステツプa3では、読取られたプログ
ラムにおける前述した各種分岐命令による処理経路、す
なわち命令実行の流れの構造を解析し処理経路毎に記憶
する。実行内容解析手段としてのステツプa4では、アセ
ンブラプログラムにおけるストア命令による記憶内容と
して実現される、1つの処理経路における処理結果(以
下、ストア内容と記す)の解析を行う。ステツプa5では
プログラムの処理経路、すなわち流れの構造を規定する
各種分岐命令の分岐条件を解析し、ステツプa4で解析さ
れたストア内容に関する変数などを用いて分岐条件を、
分岐命令毎にあるいは複数の分岐命令を整理して解析す
る。
In step a3 as a judging means, a processing path of the above-described various branch instructions in the read program, that is, a structure of an instruction execution flow is analyzed and stored for each processing path. In step a4 as an execution content analysis means, a processing result (hereinafter, referred to as storage content) in one processing path, which is realized as storage content by a store instruction in the assembler program, is analyzed. In step a5, the processing conditions of the program, that is, the branch conditions of various branch instructions that define the structure of the flow are analyzed, and the branch conditions are determined using variables related to the contents of the store analyzed in step a4.
Each branch instruction or a plurality of branch instructions are arranged and analyzed.

ステツプa6では、図形処理部7の表示制御部7aは、ス
テツプa3〜a5の解析結果に基づいて、表示すべきフロー
チヤートを解析して表示装置4や印画装置5における2
次元の図形データとして蓄積する。ステツプa7はこのよ
うなプログラム解析装置1の操作者の判断により、この
ような解析処理が終了したプログラムをフローチヤート
の形式で表示装置4や印画装置5で表示または印画表示
出力するかどうかを選択する。肯定ならば表示手段4で
表示され、または印画装置5で印画表示される。否定な
らば処理は終了する。
In step a6, the display control unit 7a of the graphic processing unit 7 analyzes the flow chart to be displayed based on the analysis results of steps a3 to a5, and executes the processing in the display device 4 and the printing device 5.
It is stored as dimensional graphic data. In step a7, the operator of the program analysis device 1 determines whether the program having undergone such analysis processing is to be displayed on the display device 4 or the printing device 5 in the form of a flowchart or to be printed and output. I do. If affirmative, the image is displayed on the display means 4 or printed on the printing apparatus 5. If not, the process ends.

前記サブルーチンプログラム14,15がメインプログラ
ム13の複数箇所で呼出される場合や、これらのサブルー
チンプログラム14,15が周知のプログラムである場合な
ど、当該サブルーチンプログラム14,15の処理内容、す
なわち各サブルーチンプログラム14,15における最終処
理結果を、プログラム解析部6の登録記憶手段としての
メモリ17に予め登録し、記憶させる。このようなサブル
ーチンプログラの処理内容は、第4図に示されるような
処理内容データ25としてのアキユムレータ(A,B)18
や、Xレジスタ19、Yレジスタ20や、コンデイシヨンコ
ード26として記憶される。コンデイシヨンコード26は、
前段の演算結果が負であればセツトされ、正であればリ
セツトされるマイスフラグ21、前段の演算結果が0であ
ればセツトされ、0でなければリセツトされるゼロフラ
グ22、前段の演算結果が最上位ビツトが1で、残余のビ
ツトが全て0であるときセツトされ、その他の場合には
全てリセツトされるオーバフローフラグ23および前段の
演算で桁上がりが生じたときにセツトされ、それ以外の
場合にはリセツトされるキヤリフラグ24などが登録され
る。
When the subroutine programs 14 and 15 are called at a plurality of locations in the main program 13 or when these subroutine programs 14 and 15 are well-known programs, the processing contents of the subroutine programs 14 and 15 The final processing results in 14 and 15 are previously registered and stored in the memory 17 as the registration storage means of the program analysis unit 6. The processing contents of such a subroutine program are stored in an accumulator (A, B) 18 as processing contents data 25 as shown in FIG.
And an X register 19, a Y register 20, and a condition code 26. Condition code 26
If the result of the preceding stage is negative, it is set; if it is positive, the reset flag 21 is set; if the result of the preceding stage is 0, it is set; This flag is set when the high-order bit is 1 and the remaining bits are all 0s. In all other cases, the overflow flag 23 is reset, and is set when a carry occurs in the operation at the preceding stage. Is registered with the reset flag 24 to be reset.

第5図は、第3図ステツプa4のストア内容解析処理の
詳細を示すフローチヤートである。本実施例のストア内
容解析処理では、解析対象のプログラム12を当該プログ
ラム12の末尾から逆上つて解析を行う。ステツプb1で
は、このような逆上り処理が終了したかどうか、すなわ
ち被解析プログラムの先頭ラインに到達したかどうかを
判定し、終了していなければステツプb2で1命令さかの
ぼり、対応する命令を解析の対象とする。
FIG. 5 is a flowchart showing the details of the store contents analysis process in step a4 in FIG. In the store content analysis processing of the present embodiment, the analysis is performed by reversing the analysis target program 12 from the end of the program 12. At step b1, it is determined whether or not such reverse processing has been completed, that is, whether or not the head line of the program to be analyzed has been reached. If not, one instruction is traced back at step b2 and the corresponding instruction is analyzed. set to target.

識別呼出手段としてのステツプb3では、現在の解析対
象の命令が前述したように、処理内容データが既に登録
されたサブルーチンプログラムへのコール命令であるか
どうかを判断する。否定の場合には、コールされている
サブルーチンプログラムへ処理を分岐し、ステツプb5で
当該サブルーチンプログラムの実行内容の解析を行う。
このような処理の状態は第6図に示される。
In step b3 as the identification calling means, it is determined whether or not the current instruction to be analyzed is a call instruction to a subroutine program whose processing content data has already been registered, as described above. If not, the process branches to the called subroutine program, and the execution contents of the subroutine program are analyzed in step b5.
The state of such processing is shown in FIG.

第6図(2)は、解析対象のプログラム例であり、第
6図(4)はプログラム例のコール命令「CALL SUB1」1
6によつてコールされるサブルーチンプログラム14の例
である。このサブルーチンプログラム14の第1命令〜第
3命令までは、オペランドの複数ビツトからなるデータ
Dの内容を1ビツトづつ下位ビツト側へシフトする命令
であり、D/2の演算処理になる。したがつて第1命令〜
第3命令までで、D/23の演算を行うものである。第4命
令「RET」でメインプログラム13に復帰する。前記ステ
ツプb3〜b5の処理は、第6図(3)に矢符で示す解析経
路27を行つているものである。
FIG. 6 (2) shows an example of a program to be analyzed, and FIG. 6 (4) shows a call instruction “CALL SUB1” 1 of the example of the program.
6 is an example of a subroutine program 14 called by 6. The first to third instructions of the subroutine program 14 are instructions for shifting the contents of the data D consisting of a plurality of bits of the operand one bit at a time to the lower bit side, which is an operation process of D / 2. Therefore, the first instruction ~
In the first three instructions, and performs the calculation of the D / 2 3. The program returns to the main program 13 with the fourth command “RET”. The processing in steps b3 to b5 is performed along the analysis path 27 indicated by an arrow in FIG. 6 (3).

前記ステツプb1に判断が肯定であれば、内容解析処理
は終了する。ステツプb3の判断が肯定であれば、ステツ
プb6でプログラム解析部6のメモリ17に記憶されている
第4図示のサブルーチンプログラム14に関する実行内容
データ25を呼出し、第6図(2)の第2命令に基づい
て、実際のサブルーチンプログラム14の実行内容を解析
する処理に代えて、サブルーチンプログラム14の実行内
容が得られたものとする。この後、処理はステツプb1に
戻り、前述の処理を繰返す。
If the determination in step b1 is affirmative, the content analysis processing ends. If the determination at step b3 is affirmative, at step b6, the execution content data 25 relating to the subroutine program 14 shown in FIG. 4 stored in the memory 17 of the program analysis unit 6 is called, and the second instruction shown in FIG. It is assumed that the execution content of the subroutine program 14 is obtained instead of the process of analyzing the actual execution content of the subroutine program 14 based on Thereafter, the processing returns to step b1, and the above-described processing is repeated.

このようなプログラム解析経路は、第6図(1)の矢
符で示す解析経路28に示されるように、サブルーチンプ
ログラム14に分岐せず、極めて短い経路で解析を行つて
いる。
Such a program analysis path does not branch to the subroutine program 14, but performs analysis in an extremely short path, as indicated by an analysis path 28 indicated by an arrow in FIG. 6 (1).

以上のように本実施例では、プログラム12の実行内容
を解析するに際して、プログラム12に含まれる複数のサ
ブルーチンプログラム14,15の個々の実行内容を解析す
るに代えて、そのサブルーチンプログラム14,15の実行
内容に対応する処理内容データを予め記憶し、必要に応
じて呼出して解析を行うようにしている。これによりプ
ログラム解析処理に要する時間が格段に短縮され、また
データ処理部7における必要なメモリの容量を削減する
ことができる。
As described above, in the present embodiment, when analyzing the execution contents of the program 12, instead of analyzing the individual execution contents of the plurality of subroutine programs 14 and 15 included in the program 12, the subroutine programs 14 and 15 are analyzed. The processing content data corresponding to the execution content is stored in advance, and is called and analyzed as needed. As a result, the time required for the program analysis processing is significantly reduced, and the required memory capacity of the data processing unit 7 can be reduced.

発明の効果 以上のように本発明に従えば、同一のプログラム中の
複数箇所で呼出されるなど、予め定めるサブルーチンプ
ログラムの処理内容、すなわち当該サブルーチンプログ
ラムにおける処理終了時における実行内容を、これらの
実行内容を示すアキユムレータや各種レジスタあるいは
各種コンデイシヨンフラグなどの処理内容データとして
別途登録しておく。プログラムの実行内容を解析するに
当たり、登録されたサブルーチンプログラムをコールす
る命令があれば、登録された処理内容データを呼出すだ
けでサブルーチンプログラムの解析の実行と同一の結果
を得ることができる。これによりプログラムの解析処理
が大幅に簡略化され、またこのようなプログラム解析装
置に用いられる各種メモリ類の容量を削減すことができ
る。
As described above, according to the present invention, the processing content of a predetermined subroutine program, such as being called at a plurality of locations in the same program, that is, the execution content at the end of the processing in the subroutine program, It is separately registered as processing content data such as an accumulator, various registers, or various condition flags indicating the content. In analyzing the execution contents of the program, if there is an instruction for calling the registered subroutine program, the same result as the execution of the analysis of the subroutine program can be obtained only by calling the registered processing content data. This greatly simplifies the program analysis process and reduces the capacity of various memories used in such a program analysis device.

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

第1図は本発明の一実施例のプログラム解析装置1のブ
ロツク図、第2図は解析対象となるプログラム12の構成
例を示す図、第3図はプログラム解析処理の全体を示す
フローチヤート、第4図は実行内容データ25の構成例を
示す図、第5図は本実施例の実行内容解析処理を説明す
るフローチヤート、第6図は本実施例と従来例との実行
内容解析処理の相異を説明する図である。 1……プログラム解析装置、6……プログラム解析部、
9……流れ構造解析部、10……ストア内容解析部、11…
…分岐条件解析部、12……プログラム、13……メインプ
ログラム、14,15……サブルーチンプログラム、17……
メモリ、18……アキユムレータ、19……Xレジスタ、20
……Yレジスタ、26……コンデイシヨンコード
FIG. 1 is a block diagram of a program analyzing apparatus 1 according to one embodiment of the present invention, FIG. 2 is a diagram showing a configuration example of a program 12 to be analyzed, FIG. 3 is a flowchart showing an entire program analyzing process, FIG. 4 is a diagram showing a configuration example of the execution content data 25, FIG. 5 is a flowchart for explaining the execution content analysis processing of this embodiment, and FIG. 6 is a flowchart of the execution content analysis processing of this embodiment and the conventional example. It is a figure explaining a difference. 1 ... Program analysis device, 6 ... Program analysis unit,
9: Flow structure analysis unit, 10: Store content analysis unit, 11 ...
… Branch condition analysis part, 12 …… Program, 13 …… Main program, 14,15 …… Subroutine program, 17 ……
Memory, 18 ... Akimulator, 19 ... X register, 20
…… Y register, 26 …… Condition code

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数の命令から構成されるプログラムを読
取る読取り手段と、 読取り手段で読取られたプログラムにおける処理経路を
判定する判定手段と、 判定手段で判定された処理経路毎に、各命令毎の実行内
容を解析する実行内容解析手段と、 プログラムに含まれる予め定めるサブルーチンプログラ
ムにおける処理内容データが予め登録されて記憶される
登録記憶手段と、 実行内容解析手段の解析対象を識別し、解析対象が前記
処理内容が予め登録されて記憶されているサブルーチン
プログラムのとき、登録記憶手段に登録されている処理
内容データを呼出して実行内容解析手段に与える識別呼
出手段とを含むことを特徴とするプログラム解析装置。
1. A reading means for reading a program composed of a plurality of instructions, a judging means for judging a processing path in a program read by the reading means, and a command for each processing path judged by the judging means. Execution content analysis means for analyzing the execution content of the program; registration storage means for pre-registering and storing processing content data in a predetermined subroutine program included in the program; identifying the analysis target of the execution content analysis means; Is a subroutine program in which the processing contents are registered and stored in advance, and identification calling means for calling the processing contents data registered in the registration storage means and giving the data to the execution contents analyzing means. Analysis device.
JP2334876A 1990-11-29 1990-11-29 Program analyzer Expired - Fee Related JP2740352B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2334876A JP2740352B2 (en) 1990-11-29 1990-11-29 Program analyzer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2334876A JP2740352B2 (en) 1990-11-29 1990-11-29 Program analyzer

Publications (2)

Publication Number Publication Date
JPH04199435A JPH04199435A (en) 1992-07-20
JP2740352B2 true JP2740352B2 (en) 1998-04-15

Family

ID=18282212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2334876A Expired - Fee Related JP2740352B2 (en) 1990-11-29 1990-11-29 Program analyzer

Country Status (1)

Country Link
JP (1) JP2740352B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3961787B2 (en) * 2000-06-12 2007-08-22 富士通株式会社 Object-oriented program performance improvement support device, recording medium, and program

Also Published As

Publication number Publication date
JPH04199435A (en) 1992-07-20

Similar Documents

Publication Publication Date Title
US5038348A (en) Apparatus for debugging a data flow program
JP2740352B2 (en) Program analyzer
JPH0749799A (en) Apparatus and method for automation
JPH096628A (en) Method and device for parallel processing procedure selection
JPH0981415A (en) Testing method for graphic user interface program
JPH0423102A (en) Programming device for programmable controller
JP2653880B2 (en) Program content analyzer
JPH064331A (en) Decimal check circuit
JPH06332749A (en) Register analysis processor
JPH056208A (en) Controller and control method therefor
JPH08286950A (en) Information processor and trace information storage method
JP2629359B2 (en) Logic simulator
JPH0743431A (en) Displaying method for signal name of device pin of sample ic
JPS6274130A (en) Data generating system for program structure
JPH01142949A (en) Register tracing device
JPH04199424A (en) Flow chart display device
JPH0823829B2 (en) Testing device for computer body
JP2000020557A (en) Design support system
JPS6081647A (en) Program control system
JPS62231344A (en) Program executing condition display system
JPH0535529A (en) Trace information output system
JPH05189279A (en) Performance analyzing device for data driven type program
JPH0721765B2 (en) Flow chart display
JPH04168524A (en) Information processing system
JPH04229343A (en) Memory contents display system in interactive debugger

Legal Events

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

Free format text: PAYMENT UNTIL: 20080123

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090123

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100123

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees