JPS63289656A - Program processor - Google Patents
Program processorInfo
- Publication number
- JPS63289656A JPS63289656A JP62124609A JP12460987A JPS63289656A JP S63289656 A JPS63289656 A JP S63289656A JP 62124609 A JP62124609 A JP 62124609A JP 12460987 A JP12460987 A JP 12460987A JP S63289656 A JPS63289656 A JP S63289656A
- Authority
- JP
- Japan
- Prior art keywords
- program
- unit
- display
- information
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 claims abstract description 10
- 230000003213 activating effect Effects 0.000 claims 2
- 238000004088 simulation Methods 0.000 abstract description 10
- 230000008569 process Effects 0.000 abstract description 5
- 238000012545 processing Methods 0.000 abstract description 5
- 230000015572 biosynthetic process Effects 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- BBRBUTFBTUFFBU-LHACABTQSA-N Ornoprostil Chemical compound CCCC[C@H](C)C[C@H](O)\C=C\[C@H]1[C@H](O)CC(=O)[C@@H]1CC(=O)CCCCC(=O)OC BBRBUTFBTUFFBU-LHACABTQSA-N 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
本発明は、ソース・プログラムを読込んで所定のオブジ
ェクト・プログラムを生成するプログラム処理装置に係
わり、特に生成されたオブジェクト・プログラムに基づ
いて計算機プログラムの実行状況をモニタリングする機
能を付加したプログラム処理装置に関する。[Detailed Description of the Invention] [Object of the Invention] (Industrial Application Field) The present invention relates to a program processing device that reads a source program and generates a predetermined object program, and particularly relates to a program processing device that reads a source program and generates a predetermined object program. The present invention relates to a program processing device with an added function of monitoring the execution status of a computer program based on the following.
(従来の技術)
従来より、プログラムのデバッグや学習を支援する方法
として、ソース・プログラムにトレース情報を挿入した
り、インクブリタシミュレータなどのデバッグツールを
利用することがなされている。しかしながら、前者につ
いてはプログラム中に特別な情報を挿入する繁雑な作業
が必要であり、後者は特別なデバッグ手段が必要になる
という欠点がある。しかも、これらの方法はソース・プ
ログラムの動作単位でインタプリタからシミュレート用
の情報を出力するものであるため、例えば実行中に予想
し得ないエラーが発生してソース・プログラムの1動作
内で永久ループに陥るなどの状態が発生した場合には、
インタプリタ装置からの応答が全く得られなくなってし
まう。このような状況になると、現在の状態が実行終了
待ち状態なのか、エラーによる暴走なのかが判別できな
くなってしまい、エラー発見に手間を要するという問題
があった。(Prior Art) Conventionally, methods for supporting debugging and learning of programs include inserting trace information into source programs and using debugging tools such as inkblitter simulators. However, the former method requires complicated work to insert special information into the program, and the latter method requires special debugging means. Moreover, since these methods output simulation information from the interpreter for each source program operation, for example, if an unexpected error occurs during execution, it may be permanently lost within one source program operation. If a situation such as falling into a loop occurs,
No response can be obtained from the interpreter device at all. In such a situation, it becomes impossible to determine whether the current state is a wait state for execution completion or a runaway state due to an error, and there is a problem in that it takes time and effort to discover the error.
(発明が解決しようとする問題点)
このように、プログラムの実行状況を表示する従来の方
式にあっては、プログラムの実行状況の監視のために特
別の情報やデバッグ・ツールを必要とし、しかも計算機
がソース・プログラムの1動作内で永久ループに陥った
場合に、エラーの発見が困難になるという問題があった
。(Problems to be Solved by the Invention) As described above, the conventional method of displaying the program execution status requires special information and debugging tools to monitor the program execution status. There is a problem in that when a computer falls into an endless loop within one operation of a source program, it becomes difficult to detect an error.
本発明は、このような串情を考慮してなされたもので、
その目的とするところは、プログラムに特別な情報を付
加したりデバッグ・ツールを用いることなくプログラム
の実行中にその実行状況を容易に把握できるプログラム
処理装置を提供することにある。The present invention was made in consideration of such a situation.
The purpose is to provide a program processing device that can easily grasp the execution status of a program while it is being executed without adding special information to the program or using a debugging tool.
[発明の構成コ
(問題点を解決するための手段)
本発明に係るプログラム処理装置は、複数のユニットか
らなるシステムを駆動するソース・プログラムを与えら
れ、このソース・プログラムからオブジェクト・プログ
ラムを生成する手段と、この手段で生成されたオブジェ
クト・プログラムの実行によって得られる各ユニットの
動作状況を各ユニット毎に生成するとともに、指定され
たユニットの前記動作状況のみを上記オブジェクト・プ
ログラムの動作レベルで表示する手段とを備えている。[Configuration of the Invention (Means for Solving Problems) A program processing device according to the present invention is provided with a source program that drives a system consisting of a plurality of units, and generates an object program from this source program. means for generating the operational status of each unit obtained by executing the object program generated by this means, and generating only the operational status of the specified unit at the operational level of the object program. and display means.
(作用)
本発明によれば、ソース・プログラムからオブジェクト
・プログラムを生成するプログラム処理装置に、オブジ
ェクト・プログラムの実行状況を表示する手段を付加し
ているので、プログラムに特別の情報を付加したり、特
別のデパック、ツールを用いることなしに、プログラム
実行中にその実行状態を常に監視することができる。し
かも、この発明によれば、プログラムの実行状況は、オ
ブジェクト・プログラムの動作レベルで表示されること
から、特に永久ループなどの致命的なプログラムのエラ
ーを実行途中で発見することができる。このため、プロ
グラムの実行を中断させる等の適切な対処ができる。(Operation) According to the present invention, a means for displaying the execution status of an object program is added to the program processing device that generates an object program from a source program, so that it is possible to add special information to the program. ,The execution status of a program can be constantly ,monitored while the program is being executed without using ,special depacking and tools. Furthermore, according to the present invention, since the program execution status is displayed at the object program operation level, fatal program errors such as endless loops can be discovered during execution. Therefore, appropriate measures such as interrupting program execution can be taken.
また、本発明によれば、プログラムに関わるユニットの
うち、実行状態を監視する必要のあるユニットを選択す
ることにより、被選択ユニットの状態のみを表示するこ
とができるので、必要以上の情報が表示されることがな
く、特定のユニットの動作に注目でき、作業効率が向上
する。Furthermore, according to the present invention, by selecting the unit whose execution status needs to be monitored from among the units involved in the program, it is possible to display only the status of the selected unit, so more information than necessary is displayed. This allows you to focus on the operation of a specific unit, improving work efficiency.
(実施例)
以下、図面を参照して本発明の一実施例につき説明する
。(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.
第1図は一実施例に係るインタプリタ方式のプログラム
処理装置の構成を示す図である。FIG. 1 is a diagram showing the configuration of an interpreter-type program processing device according to an embodiment.
制御装置1は装置全体の制御を司るものである。A control device 1 is in charge of controlling the entire device.
インタプリタ装置2は、この制御装置1の制御下で、ソ
ース・プログラムを記憶しているプログラム記憶装置3
からソース・プログラムを読込み、オブジェクト・プロ
グラムを生成する。ユニットオブジェクト管理装置4は
、プログラムに関わる全ての計算機ユニットについての
情報を管理し、インタプリタ装置2により生成されたオ
ブジェクト・プログラムによって起動され、プログラム
実行処理を行なうとともに、インタプリタ装置2がらの
オブジェクト・コードに基づいてプログラムの実行過程
をシミュレーション表示する為の情報を表示装置5に出
力する。表示装置5は、ユニット・オブジェクト管理装
置4からの情報に基づいて実行状態をシミュレーション
表示する。The interpreter device 2, under the control of the control device 1, stores a program storage device 3 that stores a source program.
Reads a source program from and generates an object program. The unit object management device 4 manages information about all the computer units involved in the program, is started by the object program generated by the interpreter device 2, performs program execution processing, and also manages the object code from the interpreter device 2. Information for displaying a simulation of the program execution process based on the information is output to the display device 5. The display device 5 displays a simulation of the execution state based on information from the unit/object management device 4.
第2図は、オブジェクト・プログラムとユニット・オブ
ジェクト管理装置4の更に詳細を説明するだめの図であ
る。インタプリタ装置2から与えられるオブジェクト・
プログラム6を構成している各メツセージ列61は、ユ
ニット・オブジェクト管理装置4(ユニット・オブジェ
クトの集合体)の各ユニット・オブジェクト71の起動
単位命令となっている。例えばユニット“メモリ”に対
しては、“ALLOCA” (変数Aを割当てる)、“
LOAD B” (変数Bの値を取出す)、“SET
X 1” (変数Xの値を1にする)などの命令
が与えられる。各ユニット・オブジェクト71は、例え
ば図示のように、そのユニットが実行するうえでの動作
処理についての情報(実行形式のコード)を保持する動
作情報81と、動作状態を表示するための情報(実行形
式のコード)を保持する表示情報82と、動作状態の表
示/非表示状態を選択する表示選択情報83とから構成
される。例えば、ユニット0メモリ”に対応したユニッ
トオブジェクト71には、“メモリ”の動作を規定する
ALLOC,LOAD、SET命令等に対してどのよう
に動作を行なうかについての動作情報を持つ。この動作
情報81は、一つの動作が終了したら、次に表示情報の
実行を開始し、これを交互に繰返す。また、表示情報は
、ユニットの表示形態や各動作表示形態等の表示処理情
報を持つ。更に、表示選択情報83は、プログラムの実
行途中においても外部から自由に書換え可能なフラグで
ある。FIG. 2 is a diagram for explaining the object program and unit object management device 4 in further detail. Object given from interpreter device 2
Each message string 61 constituting the program 6 is an activation unit command for each unit object 71 of the unit object management device 4 (aggregation of unit objects). For example, for the unit “memory”, “ALLOCA” (assign variable A), “
LOAD B” (takes out the value of variable B), “SET
X 1'' (set the value of the variable It consists of operation information 81 that holds information (code) for displaying the operation status, display information 82 that holds information (code in executable format) for displaying the operation status, and display selection information 83 that selects display/non-display status of the operation status. For example, the unit object 71 corresponding to "unit 0 memory" has operation information about how to perform operations in response to ALLOC, LOAD, SET commands, etc. that define the operations of "memory". When one operation is completed, the operation information 81 starts executing the next display information, and this process is repeated alternately. Further, the display information includes display processing information such as the unit display format and each operation display format. Furthermore, the display selection information 83 is a flag that can be freely rewritten from the outside even during program execution.
以下、このように構成されたプログラム処理装置の動作
について説明する。The operation of the program processing device configured as described above will be explained below.
第3図はプログラム処理方式制御の概略的な流れを示す
ものである。先ず、インタプリタ装置2はプログラム記
憶装置3よりソース・プログラムを1行文読込み、オブ
ジェクト・プログラムを生成する(ステップA)。プロ
グラムが終了していなかったら(ステップB)、生成さ
れたオブジェクト・プログラムの1つのメツセージで指
示されるユニット・オブジェクト71が起動される(ス
テップC)。ユニットオブジェクト71は、メツセージ
の指示に従い、指定された動作処理を行なう(ステップ
D)。次にユニット・オブジェクト71内の表示選択情
報83を検査し、表示状態が選択されていれば(ステッ
プE)、表示情報82に基づいて生成されたユニットの
動作状態を説明するシミュレーション情報を表示装置5
に表示する(ステップF)。FIG. 3 shows a schematic flow of program processing method control. First, the interpreter device 2 reads one line of the source program from the program storage device 3 and generates an object program (step A). If the program has not finished (step B), the unit object 71 indicated by one message of the generated object program is activated (step C). The unit object 71 performs the specified operation process according to the message instruction (step D). Next, the display selection information 83 in the unit object 71 is checked, and if the display state is selected (step E), simulation information explaining the operating state of the unit generated based on the display information 82 is transmitted to the display device. 5
(Step F).
第4図はBAS I Cプログラムを実行するプログラ
ム処理装置の一表示例である。ここに表示された模式図
は、計算機ユニットを示すもので、21はプログラム記
憶装置、22はインタプリタ装置、23は演算器、24
は出力装置、25は入力装置、26はメモリ、33はプ
ログラム・カウンタをそれぞれ表わしている。この模式
図は、前記プログラム記憶装置3に、
10 INPUT A
20 INPUT B
30 LET C−A+B
40 PRINT C
50END
なるBAS I Cプログラムが格納されており、現在
第30行を実行しているときのシミュレーション図であ
る。BAS I Cプログラム27や現在処理中のセン
テンス28や演算式29、メモリに割当てられた変数名
30とその値31の割付は構造を示す図32などの状態
図が各々表示されている。FIG. 4 is a display example of a program processing device that executes a BASIC program. The schematic diagram displayed here shows a computer unit, in which 21 is a program storage device, 22 is an interpreter device, 23 is an arithmetic unit, and 24 is a computer unit.
25 represents an output device, 25 represents an input device, 26 represents a memory, and 33 represents a program counter. This schematic diagram is a simulation when the program storage device 3 stores a BASIC program of 10 INPUT A 20 INPUT B 30 LET C-A+B 40 PRINT C 50 END and the 30th line is currently being executed. It is a diagram. A state diagram such as FIG. 32 showing the structure of the BASIC program 27, the sentence 28 currently being processed, the arithmetic expression 29, and the allocation of variable names 30 and their values 31 allocated to the memory are displayed.
プログラムの実行に伴って各ユニットの動作状態がどの
ように変化するか、その実行過程は上記シミュレーショ
ン図によって監視することができる。How the operating state of each unit changes as the program is executed can be monitored using the above simulation diagram.
第4図(a)は、全てのユニット・オブジェクト71の
表示選択情報83を“1”、即ち、全てのユニットにつ
いて表示状態を選択した場合、第4図(b)は、プログ
ラム記憶装置21、プログラム・カウンタ33及びメモ
リ26のユニットのみについて表示状態を選択した場合
の表示例である。このように、第4図(b)では特定の
ユニットに注目して動作状態を監視できる。FIG. 4(a) shows that when the display selection information 83 of all unit objects 71 is set to "1", that is, the display state is selected for all units, FIG. 4(b) shows that the program storage device 21, This is a display example when the display state is selected only for the program counter 33 and memory 26 units. In this way, in FIG. 4(b), it is possible to focus on a specific unit and monitor its operating state.
以上のように本実施例の装置によれば、プログラムに特
別な情報や特別なデバッグ・ツールを用いることなくプ
ログラムの実行中に計算機内部の状態をシミュレートで
きる。そして、このようにオブジェクト・プログラムに
基づいて実行状態をシミュレートしているので、ソース
・プログラムの1動作内での暴走状態も容易に発見でき
る。As described above, according to the apparatus of this embodiment, the internal state of a computer can be simulated during program execution without using special information or special debugging tools for the program. Since the execution state is simulated based on the object program in this way, a runaway state within one operation of the source program can be easily discovered.
また、本実施例ではオブジェクト争プログラムをユニッ
ト・オブジェクトを起動するメツセージ列で構成し、各
ユニット・オブジェクト毎に動作情報と表示情報とを持
たせることにより、実処理を行なうと同時に、ユニット
単位のシミュレーション表示の有無を選択できる。しか
も、ユニット表示の選択は予め特定しておく必要がなく
、例えば処理を行なっている最中に、特定のユニットが
繰返し処理に入った場合等は、このユニットの表示指定
を途中で解除することにより実行時間を速めることも可
能である。In addition, in this embodiment, the object contention program is composed of a message string that activates unit objects, and each unit object has operation information and display information. You can choose whether or not to display the simulation. Moreover, there is no need to specify the unit display selection in advance; for example, if a specific unit enters repeated processing while processing is in progress, the display designation of this unit can be canceled midway through. It is also possible to speed up the execution time.
なお、シミュレーション結果を表示するための模式図(
第4図)の表示形態は特に上述した実施例に限定される
ものではない。さらには使用される言語もBAS I
Cに限らず、LISPやPASCALなどの他の言語に
適用することは可能である。要するに、本発明はその要
旨を逸脱しない範囲で種々変形して実施することができ
る。In addition, a schematic diagram for displaying simulation results (
The display format shown in FIG. 4) is not particularly limited to the embodiment described above. Furthermore, the language used is also BAS I.
It is possible to apply not only to C but also other languages such as LISP and PASCAL. In short, the present invention can be implemented with various modifications without departing from the gist thereof.
[発明の効果]
以上説明したように、本発明によれば、プログラムのオ
ブジェクト・コードを生成すると同時に、実行過程を分
り易くシミュレート表示し、プログラム機能についての
説明を行うことができ、プログラムの作成作業や学習を
大いに支援することができる。[Effects of the Invention] As explained above, according to the present invention, it is possible to generate the object code of a program, simultaneously display a simulation of the execution process in an easy-to-understand manner, and explain the program functions. It can greatly support creation work and learning.
第1図は本発明の一実施例に係るプログラム処理装置の
構成を示すブロック図、第2図は同装置におけるオブジ
ェクト・プログラムとユニット・オブジェクト管理装置
の構成を示す図、第3図は同装置の動作を説明するため
の流れ図、第4図は同装置における実行過程表示模式図
である。
1・・・制御装置、2・・・インタプリタ装置、3・・
・プログラム記憶装置、4・・・ユニット争オブジェク
ト管理装置、5・・・表示装置、6・・・メツセージ列
、61・・・メツセージ、71・・・ユニット・オブジ
ェクト、81・・・動作情報、82・・・表示情報、8
3990表示選択情報。
出願人代理人 弁理士 鈴江武彦
第1図
第2図FIG. 1 is a block diagram showing the configuration of a program processing device according to an embodiment of the present invention, FIG. 2 is a diagram showing the configuration of an object program and a unit object management device in the same device, and FIG. 3 is a block diagram showing the configuration of a program processing device in the same device. FIG. 4 is a flowchart for explaining the operation of the system. 1...control device, 2...interpreter device, 3...
- Program storage device, 4... Unit conflict object management device, 5... Display device, 6... Message string, 61... Message, 71... Unit object, 81... Operation information, 82...display information, 8
3990 display selection information. Applicant's agent Patent attorney Takehiko Suzue Figure 1 Figure 2
Claims (3)
ス・プログラムを与えられ、このソース・プログラムか
らオブジェクト・プログラムを生成する手段と、この手
段で生成されたオブジェクト・プログラムの実行によっ
て得られる各ユニットの動作状況を各ユニット毎に生成
するとともに、指定されたユニットの前記動作状況のみ
を上記オブジェクト・プログラムの動作レベルで表示す
る手段とを具備したことを特徴とするプログラム処理装
置。(1) Given a source program that drives a system consisting of multiple units, a means to generate an object program from this source program, and a method for each unit obtained by executing the object program generated by this means. A program processing device comprising means for generating an operating status for each unit and displaying only the operating status of a designated unit at the operating level of the object program.
ニット毎にその動作状況を示す動作情報と、上記動作状
況を図形化するための表示情報と、表示の有無を指定す
る表示選択情報とを保持するユニット・オブジェクトの
集合を備え、前記オブジェクト・プログラムは、前記各
ユニット・オブジェクトを起動するメッセージ列から構
成されることを特徴とする特許請求の範囲第1項記載の
プログラム処理装置。(2) The displaying means holds operation information indicating the operation status of each unit involved in program execution, display information for graphically representing the operation status, and display selection information specifying whether to display or not. 2. The program processing apparatus according to claim 1, further comprising a set of unit objects for activating each unit object, and wherein said object program is composed of a message sequence for activating each of said unit objects.
定・解除を前記オブジェクト・プログラムの実行の最中
に受付けるものであることを特徴とする特許請求の範囲
第1項記載のプログラム処理装置。(3) The program processing apparatus according to claim 1, wherein the displaying means accepts designation/cancellation of the unit to be displayed during execution of the object program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62124609A JPS63289656A (en) | 1987-05-21 | 1987-05-21 | Program processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62124609A JPS63289656A (en) | 1987-05-21 | 1987-05-21 | Program processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS63289656A true JPS63289656A (en) | 1988-11-28 |
Family
ID=14889665
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP62124609A Pending JPS63289656A (en) | 1987-05-21 | 1987-05-21 | Program processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS63289656A (en) |
-
1987
- 1987-05-21 JP JP62124609A patent/JPS63289656A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7331037B2 (en) | Static memory allocation in a graphical programming system | |
JPS62229343A (en) | Program counter display system | |
JPS63289656A (en) | Program processor | |
JPH08328905A (en) | Simulation method and device | |
CN114518734B (en) | Control model integration method, device and medium thereof | |
JP4192380B2 (en) | PLC simulator apparatus, simulation program, and recording medium on which the program is recorded | |
JPH0277902A (en) | Sampling trace system for programmable controller | |
JPH01188956A (en) | Program exception processing system | |
JPS62162107A (en) | Program changing method for programmable controller | |
JPH05297913A (en) | Programmable controller | |
JP6009283B2 (en) | Test apparatus, test system, and test method | |
JP2013235381A (en) | Data editing apparatus and data editing method | |
JPH01188957A (en) | Program exception processing system | |
JPH04117573A (en) | Analytic simulation system | |
JPS63182752A (en) | System for supporting single unit test capable of preserving result | |
JPS63170767A (en) | Module type dynamic characteristic simulator | |
JPH01259435A (en) | Inserting method for maintenance program | |
JPH06161734A (en) | Software execution display device | |
JPS6383842A (en) | Program processor | |
JPH01177137A (en) | Computer execution diagnostic device | |
Estell | A Simulation Project for an Operating Systems Course | |
JPH04295930A (en) | Execution controller for plural processes | |
JPH02306301A (en) | Method for holding data in computer simulation | |
JPH0520051A (en) | Software conversion operation controller | |
JPH02285414A (en) | Key display processing system |