JP2001147832A - Display system corresponding to source program - Google Patents

Display system corresponding to source program

Info

Publication number
JP2001147832A
JP2001147832A JP32892599A JP32892599A JP2001147832A JP 2001147832 A JP2001147832 A JP 2001147832A JP 32892599 A JP32892599 A JP 32892599A JP 32892599 A JP32892599 A JP 32892599A JP 2001147832 A JP2001147832 A JP 2001147832A
Authority
JP
Japan
Prior art keywords
source
source program
position information
input
program
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
JP32892599A
Other languages
Japanese (ja)
Inventor
Sumio Yamada
純夫 山田
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 JP32892599A priority Critical patent/JP2001147832A/en
Publication of JP2001147832A publication Critical patent/JP2001147832A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a display system corresponding to source program capable of providing the position information of an input specification even when information obtained by an analyzing means is only the line number of a source program. SOLUTION: A source generating means 103 reads specification inputted from an inputting means 101, and applies a generation rule stored in a generation rule storage means 104 to the specification for generating a source program into which position information on the input specification is inserted as a comment sentence, and stores it in a source storing means 105. An analyzing means 106 analyzes the source program stored into the source storing means 105 according to an instruction from the inputting means 101, and when information to be outputted to an outputting means 107 is present, the position information of the corresponding input specification stored in the source storing means 105 is extracted from the comment sentence, and the position information and the analyzed result is outputted as a pair to the outputting means.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、入力された仕様
に生成規則を適用するジェネレータエンジンによって生
成されたソースプログラムと入力仕様の対応関係を出力
するソースプログラム表示方式において、ソースプログ
ラム中に入力仕様の位置情報をコメント文として挿入す
ることにより、ソースプログラムと入力位置との対応情
報を出力できる構成を得ることができるようにしたソー
スプログラム対応表示方式に関する。
BACKGROUND OF THE INVENTION The present invention relates to a source program display method for outputting the correspondence between a source program generated by a generator engine that applies a generation rule to an input specification and an input specification. The present invention relates to a source program correspondence display method capable of obtaining a structure capable of outputting correspondence information between a source program and an input position by inserting the position information as a comment sentence.

【0002】[0002]

【従来の技術】論理図記述のリストからソースを生成し
て、そのソースをコンパイルする方法に関して、たとえ
ば、特開平06−314193号公報には、仕様リスト
のデバッグ作業が著しく容易で、プログラムの開発をよ
り効率的に行うことが可能となるようにするために、論
理図を用いて内容が記述された仕様書リストからソース
プログラムのリストを生成し、仕様書リストから生成さ
れたソースリストをコンパイルし、コンパイルエラーが
発生したときに、仕様書リストとソースリストの対応部
分が左右の一方と他方とにそれぞれ配置されたエラーリ
ストを作成することが開示されている。すなわち、この
公報で述べているデバッグ作業とは、コンパイルエラー
に対処する作業のみであり、一般のデバッグ作業に関し
ての言及がなされていない。
2. Description of the Related Art A method of generating a source from a list of logic diagram descriptions and compiling the source is disclosed, for example, in Japanese Patent Application Laid-Open No. H06-314193. Generates a list of source programs from a specification list in which the contents are described using a logical diagram, and compiles the source list generated from the specification list so that it can be performed more efficiently It discloses that when a compile error occurs, an error list is created in which corresponding parts of a specification list and a source list are arranged on one of the left and right sides and the other. That is, the debugging operation described in this publication is only an operation for dealing with a compilation error, and does not refer to a general debugging operation.

【0003】また、特開平08−95762号公報に
は、複数のプロセッサからそれぞれ出力したエラーリス
トを参照し、プログラム仕様上のそれぞれのテキストに
対するすべてのプロセッサからのエラーをまとめて表示
することによって、どのテキストのどれだけのエラーが
発生しているかを、テキストごとにプログラム仕様エデ
ィタで1度に知ることができるようにして、どのように
修正すればよいかを容易に判断することができることが
開示されている。
Japanese Patent Application Laid-Open No. 08-95762 discloses an error list output from a plurality of processors, and collectively displays errors from all processors for each text in a program specification. It is disclosed that it is possible to know at once a program specification editor for each text and how many errors have occurred in each text, and it is easy to determine how to correct the text. Have been.

【0004】さらに、特開平05−257733号公報
には、プログラム仕様のデバッグの際、プログラム仕様
中の実行位置を正確にリアルタイムで知り、正確にプロ
グラム仕様をデバッグすることができるようにするため
に、端末でプログラム仕様を変換し、ソースプログラム
を作成する際、プログラム仕様を構成するレコードに与
えられたレコード番号とソースプログラムの行ごとに与
えられた行番号との対応関係を示す行番号テーブルを作
成し、任意の記憶装置に格納し、ホストデバッガの送信
する実行中のソースプログラムの行番号を端末デバッグ
で受信し、行番号テーブルを参照して実行中のソースプ
ログラムの行番号に対応するプログラム仕様のレコード
番号を抽出し、この抽出したレコード番号に対応するレ
コードから必要なデータを取得し、編集して表示装置に
表示することが開示されている。
Further, Japanese Patent Application Laid-Open No. 05-257733 discloses a method for debugging a program specification so that the execution position in the program specification can be accurately known in real time and the program specification can be debugged accurately. When converting a program specification on a terminal and creating a source program, a line number table indicating a correspondence relationship between a record number given to a record constituting the program specification and a line number given for each line of the source program. A program corresponding to the line number of the running source program, which is created, stored in an arbitrary storage device, receives the line number of the running source program transmitted by the host debugger in the terminal debugger, and refers to the line number table. Extract the record number of the specification, and from the record corresponding to the extracted record number, Acquires over data are disclosed to be displayed on the display device to edit.

【0005】ところで、一般のデバッグ作業に関して、
入力仕様に生成規則を適用して生成されたソースプログ
ラムを解析する従来のシステムにおいては、ソースプロ
グラム上の解析結果と入力仕様上の位置の関係を機械的
に求める方法はなく、目視によって探す方法しかなかっ
た。
By the way, regarding general debugging work,
In a conventional system that analyzes a source program generated by applying a generation rule to an input specification, there is no method for mechanically calculating the relationship between the analysis result on the source program and the position on the input specification, and a method for searching visually. There was only.

【0006】[0006]

【発明が解決しようとする課題】しかし、この従来技術
には、次のような課題があった。その第1の課題は、解
析の結果、仕様を修正する必要がある場合、修正に時間
がかかるということである。その理由は、一般的に入力
仕様とソースプログラムの形式は異なっており、ソース
プログラム上の位置から入力仕様上の位置を求めるのは
周辺部を含めた検索を行う必要があるためである。
However, this prior art has the following problems. The first problem is that if the specification needs to be corrected as a result of the analysis, the correction takes time. The reason is that the format of the input specification is generally different from the format of the source program, and the reason for obtaining the position on the input specification from the position on the source program is to perform a search including the peripheral part.

【0007】また、第2の課題は、入力仕様の位置を特
定してもそれが正しいという保証がないということであ
る。その理由は、ソースプログラム上の位置と入力仕様
上の位置との対応を機械的に求める手段がないためであ
る。
A second problem is that even if the position of the input specification is specified, there is no guarantee that it is correct. The reason is that there is no means for mechanically obtaining the correspondence between the position on the source program and the position on the input specification.

【0008】この発明は、上記従来の課題を解決するた
めになされたもので、解析手段から得られる情報がソー
スプログラムの行番号のみである場合でも入力仕様の位
置情報が取得できるとともに、生成されるプログラム種
別が同じ場合は、入力仕様の位置情報をコメントとして
変換する規則を用意するだけで、異なったプログラムパ
ターンに対応した生成規則を適用することによって生成
されるソースプログラムが異なっても、解析手段は同一
のロジックによって入力仕様の位置情報を取得すること
ができるソースプログラム対応表示方式を提供すること
を目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problem. Even when the information obtained from the analyzing means is only the line number of the source program, the position information of the input specification can be obtained and generated. If the program types are the same, simply prepare a rule to convert the position information of the input specification as a comment. Even if the source programs generated by applying the generation rules corresponding to different program patterns are different, It is an object of the present invention to provide a source program compatible display method capable of acquiring position information of an input specification by the same logic.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、この発明のソースプログラム対応表示方式は、仕様
の書き換える知識を規則の形で記述された生成規則を格
納する生成規則記憶手段と、入力手段から入力される仕
様を読み込んで上記生成規則記憶手段に記憶された生成
規則を適用することにより入力仕様上の位置情報をコメ
ント文として挿入したソースプログラムを生成してソー
ス記憶手段に記憶するソース生成手段と、上記入力手段
からの指示にしたがって上記ソース記憶手段に記憶され
ているソースプログラムを解析して出力手段に出力すべ
き情報が有る場合には、上記ソース記憶手段に記憶され
ている対応する入力仕様の位置情報をコメント文から抽
出して、位置情報と解析結果とを対にして上記出力手段
に出力する解析手段とを備えることを特徴とする。
In order to achieve the above object, a display method corresponding to a source program according to the present invention comprises: a generation rule storage means for storing a generation rule described in the form of a rule in which knowledge of specification rewriting is described; By reading the specification input from the input means and applying the generation rule stored in the generation rule storage means, a source program in which positional information on the input specification is inserted as a comment statement is generated and stored in the source storage means. When there is information to analyze a source program stored in the source storage unit according to an instruction from the source generation unit and the input unit and output the output to the output unit, the information is stored in the source storage unit. An analysis method that extracts the position information of the corresponding input specification from the comment sentence and outputs the position information and the analysis result as a pair to the output means. Characterized in that it comprises and.

【0010】そのため、ソース生成手段は、入力手段か
ら入力される仕様を読み込んで生成規則記憶手段に記憶
された生成規則を適用することにより入力仕様上の位置
情報をコメント文として挿入したソースプログラムを生
成してソース記憶手段に記憶し、解析手段は入力手段か
らの指示にしたがってソース記憶手段に記憶されている
ソースプログラムを解析して出力手段に出力すべき情報
が有る場合には、ソース記憶手段に記憶されている対応
する入力仕様の位置情報をコメント文から抽出して、位
置情報と解析結果とを対にして出力手段に出力するよう
にしたので、解析手段から得られる情報がソースプログ
ラムの行番号のみである場合でも入力仕様の位置情報が
取得できるとともに、生成されるプログラム種別が同じ
場合は、入力仕様の位置情報をコメントとして変換する
規則を用意するだけで、異なったプログラムパターンに
対応した生成規則を適用することによって生成されるソ
ースプログラムが異なっても、解析手段は同一のロジッ
クによって入力仕様の位置情報を取得することができ
る。
[0010] Therefore, the source generating means reads the specification input from the input means and applies the generation rule stored in the generation rule storage means to thereby insert the source program in which the position information on the input specification is inserted as a comment sentence. The analysis means analyzes the source program stored in the source storage means in accordance with an instruction from the input means, and if there is information to be output to the output means, the analysis means analyzes the source program. The position information of the corresponding input specification stored in the file is extracted from the comment sentence, and the position information and the analysis result are paired and output to the output means. If only the line number is used, the position information of the input specification can be obtained, and if the generated program type is the same, the input specification Only by preparing rules for converting position information as comments, even if source programs generated by applying generation rules corresponding to different program patterns are different, the analysis means uses the same logic to analyze the position information of the input specification. Can be obtained.

【0011】[0011]

【発明の実施の形態】次に、この発明によるソースプロ
グラム対応表示方式の実施の形態について図面に基づき
説明する。図1はこの発明によるソースプログラム対応
表示方式の第1実施の形態の構成を示すブロック図であ
る。この図1を参照してまずこの第1実施の形態の概略
から述べることにする。
Next, an embodiment of a display method corresponding to a source program according to the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of a first embodiment of a source program compatible display system according to the present invention. First, an outline of the first embodiment will be described with reference to FIG.

【0012】図1において、ソース生成手段103は入
力手段101から入力される入力仕様を読み込んで、生
成規則記憶手段104に記憶されている生成規則にした
がってソース記憶手段105にソースプログラムを出力
する。この際、ソース生成手段103は入力仕様上の位
置情報をコメント文としてソースプログラム中に挿入す
る。このソース生成手段103と生成規則記憶手段10
4とによりジェネレータ102(ジェネレータエンジ
ン)を構成している。
In FIG. 1, a source generation unit 103 reads an input specification input from an input unit 101 and outputs a source program to a source storage unit 105 in accordance with a generation rule stored in a generation rule storage unit 104. At this time, the source generation means 103 inserts the position information on the input specification as a comment sentence in the source program. The source generation means 103 and the generation rule storage means 10
4 constitute a generator 102 (generator engine).

【0013】解析手段106は入力手段101からの指
示にしたがってソース記憶手段105に記憶されている
ソースプログラムを解析し、その解析結果を出力手段1
07に出力する際に、ソース記憶手段105中のコメン
ト文から入力仕様位置情報を求め、解析結果とともに出
力手段107に渡す。これにより、利用者は解析結果に
対する対処を容易に入力仕様上で行うことができる。こ
のようにして、ソースプログラム上の位置を入力仕様上
の位置情報に変換することにより解析結果の仕様上にお
ける位置の同定を機械的に可能にする。
The analysis means 106 analyzes the source program stored in the source storage means 105 in accordance with an instruction from the input means 101, and outputs the analysis result to the output means 1.
At the time of output to 07, the input specification position information is obtained from the comment sentence in the source storage means 105 and passed to the output means 107 together with the analysis result. Thereby, the user can easily deal with the analysis result on the input specification. In this manner, by converting the position on the source program into the position information on the input specification, the position of the analysis result on the specification can be mechanically identified.

【0014】次に、この第1実施の形態の構成について
具体的に説明する。上記ジェネレータ102は、ソース
生成手段103と、生成規則記憶手段104とを含み、
これらのソース生成手段103、生成規則記憶手段10
4はそれぞれ概略次のように動作する。生成規則記憶手
段104は、仕様を書き換える知識を規則の形で記述し
た生成規則を格納する。また、ソース生成手段103は
入力手段101から入力された入力仕様に対し、生成規
則記憶手段104に格納された生成規則を適用すること
により、ソースプログラムを生成し、ソース記憶手段1
05に出力する。
Next, the configuration of the first embodiment will be specifically described. The generator 102 includes a source generation unit 103 and a generation rule storage unit 104,
These source generation means 103 and generation rule storage means 10
4 operate generally as follows. The generation rule storage unit 104 stores a generation rule in which the knowledge of rewriting specifications is described in the form of a rule. The source generation means 103 generates a source program by applying the generation rules stored in the generation rule storage means 104 to the input specification input from the input means 101, and generates the source program.
Output to 05.

【0015】解析手段106は、入力手段101から入
力された指示にしたがい、ソース記憶手段105に格納
されているソースプログラムを解析し、出力手段107
に出力すべき情報がある場合は、ソース記憶手段105
から対応する入力仕様の位置情報をコメント文から抽出
し、位置情報と解析結果とを対にして出力手段107に
出力する。
The analysis means 106 analyzes the source program stored in the source storage means 105 in accordance with the instruction input from the input means 101, and outputs the result.
If there is information to be output to the
, The position information of the corresponding input specification is extracted from the comment sentence, and the position information and the analysis result are output as a pair to the output unit 107.

【0016】次に、以上のように構成されているこの発
明による第1実施の形態の動作について図1と図2を併
用して説明する。図2は入力仕様とソースコードの対応
についての一例を示したものである。この図2における
入力仕様202は、この第1実施の形態ではSPD(Sturct
ured Programming Dialog)によって記述されている。入
力仕様202に対する仕様の位置情報201およびソー
スプログラム204に対する位置情報、すなわち行番号
203からもわかる通り、入力仕様202の位置情報2
01とソースプログラム204の行番号203は一致し
ていない。
Next, the operation of the first embodiment according to the present invention configured as described above will be described with reference to FIGS. FIG. 2 shows an example of correspondence between input specifications and source codes. The input specification 202 in FIG. 2 is the SPD (Sturct
ured Programming Dialog). As can be seen from the position information 201 of the specification for the input specification 202 and the position information for the source program 204, ie, the line number 203, the position information 2 of the input specification 202
01 and the line number 203 of the source program 204 do not match.

【0017】解析手段106はソースプログラム204
を対象として処理を行うため、ソースプログラム204
の行番号203のみしか位置情報である行番号203の
情報を持っておらず、入力仕様202の位置情報201
を求める手段がない。入力仕様202からソースプログ
ラムを生成するロジックが固定ならば、行番号203か
ら入力仕様の位置情報を求めることも可能である。しか
し、ソースプログラム生成のロジックは生成規則記憶手
段104に記憶されている生成規則によってソースプロ
グラム生成時に動的に決定されるため、行番号203か
ら入力仕様202の位置情報を求めることはできない。
The analysis means 106 includes a source program 204
The source program 204
Only the line number 203 of the input specification 202 has the information of the line number 203 which is the position information.
There is no way to ask. If the logic for generating the source program from the input specification 202 is fixed, the position information of the input specification can be obtained from the line number 203. However, since the logic for generating the source program is dynamically determined at the time of generating the source program according to the generation rules stored in the generation rule storage unit 104, the position information of the input specification 202 cannot be obtained from the line number 203.

【0018】そこで、この第1実施の形態では、次に述
べるような処理を行う。すなわち、ソースプログラム2
06は、この第1実施の形態によって入力仕様202か
らジェネレータ102が生成したソースプログラムであ
り、コメント文は「;」で始まる。位置情報201は入
力仕様202とともにソース生成手段103に入力され
る。生成規則記憶手段104中に記憶されている生成規
則は、入力仕様202の位置情報201をソースプログ
ラム206のコメントに変換する規則であり、この生成
規則にしたがって、ソース生成手段103はソース記憶
手段105に位置情報を埋め込んだコメントを含むソー
スプログラム206を出力する。
Therefore, in the first embodiment, the following processing is performed. That is, source program 2
Reference numeral 06 denotes a source program generated by the generator 102 from the input specification 202 according to the first embodiment, and a comment starts with “;”. The position information 201 is input to the source generation means 103 together with the input specification 202. The generation rule stored in the generation rule storage unit 104 is a rule for converting the position information 201 of the input specification 202 into a comment of the source program 206. According to this generation rule, the source generation unit 103 causes the source storage unit 105 And outputs a source program 206 including a comment in which position information is embedded.

【0019】ソースプログラム206中の「010」,
「030」,「050」などの行番号による位置情報2
05が入力仕様202に位置情報として含んだコメント
文である。このようにして、ソースプログラム206に
は位置情報205を含んだコメントと入力仕様202が
変換されたソースコードとが対となっている。したがっ
て、ソースプログラム206に対応した位置情報は、1
行前のコメントを解析することにより求めることができ
る。
"010" in the source program 206,
Position information 2 by line number such as “030” or “050”
05 is a comment sentence included in the input specification 202 as position information. In this manner, in the source program 206, the comment including the position information 205 and the source code obtained by converting the input specification 202 are paired. Therefore, the position information corresponding to the source program 206 is 1
It can be obtained by analyzing the comment before the line.

【0020】次に、具体例を用いて説明する。図3に示
すように、たとえば解析手段106が実際にプログラム
を動作させながらプログラムの状況をリアルタイムにモ
ニタリングするリアルタイムデバッガであったとする。
図3で示されるように、行番号「100」のソースコー
ドを解析していた場合、解析手段106はその1行前、
すなわち行番号「090」のコメントから入力仕様の位
置情報「C」を得る。解析手段106はこの位置情報
「C」を出力手段107に渡すことによって、現在解析
中のソースコードに対応する入力仕様の位置の同定が可
能になる。この図3では、位置情報「C」に図2で示し
た入力仕様202の「ELSEcall sub02」
に対応しており、図3では、この「call sub0
2」は行番号「100」のソースプログラム206の
「call sub02」に対応している。
Next, a specific example will be described. As shown in FIG. 3, for example, it is assumed that the analysis means 106 is a real-time debugger that monitors the status of the program in real time while actually operating the program.
As shown in FIG. 3, when the source code of the line number “100” has been analyzed, the analysis unit 106
That is, the position information “C” of the input specification is obtained from the comment of the line number “090”. By transmitting the position information "C" to the output unit 107, the analysis unit 106 can identify the position of the input specification corresponding to the source code currently being analyzed. In FIG. 3, “ELSEcall sub02” of the input specification 202 shown in FIG. 2 is added to the position information “C”.
In FIG. 3, this “call sub0”
“2” corresponds to “call sub02” of the source program 206 with the line number “100”.

【0021】このように、この発明による第1実施の形
態では、ソースプログラム206の行番号205から位
置情報を求めるのに、ソースプログラム206中にコメ
ントとして埋め込まれた位置情報205が使えるように
しているから、解析機能から得られる情報がソースプロ
グラムの行番号のみである場合でも入力仕様の位置情報
が取得できる。また、位置情報をコメントとして変換す
る規則が同一であり、コメント文から位置情報を求める
ロジックも同一であるから、生成されるプログラム種別
が同じ場合は入力仕様の位置情報をコメントとして変換
する規則を用意するだけで、異なったプログラムパター
ンに対応した生成規則を適用することによって生成され
るソースプログラムが異なっても、解析手段は同一のロ
ジックによって入力仕様の位置情報を取得できる。
As described above, in the first embodiment of the present invention, the position information 205 embedded as a comment in the source program 206 can be used to obtain the position information from the line number 205 of the source program 206. Therefore, even when the information obtained from the analysis function is only the line number of the source program, the position information of the input specification can be obtained. Also, since the rules for converting position information as comments are the same and the logic for obtaining position information from comment statements is the same, the rules for converting the position information of the input specifications as comments should be used when the types of generated programs are the same. By simply preparing, even if source programs generated by applying the generation rules corresponding to different program patterns are different, the analysis means can acquire the position information of the input specification by the same logic.

【0022】次に、この発明の第2実施の形態について
説明する。図4はこの第2実施の形態の構成を示すブロ
ック図である。この図4に示す代2実施の形態では、入
力手段401と、ジェネレータ402と、ソース記憶手
段405と、解析手段406と、出力手段407と、解
析結果格納手段408とから構成されている。ジェネレ
ータ402は、ソース生成手段403と、生成規則記憶
手段404とを含んでいる。この図4に示す第2実施の
形態では、図1で示した第1実施の形態の構成に新たに
解析結果格納手段408が追加されている。
Next, a second embodiment of the present invention will be described. FIG. 4 is a block diagram showing the configuration of the second embodiment. The second embodiment shown in FIG. 4 includes an input unit 401, a generator 402, a source storage unit 405, an analysis unit 406, an output unit 407, and an analysis result storage unit 408. The generator 402 includes a source generation unit 403 and a generation rule storage unit 404. In the second embodiment shown in FIG. 4, an analysis result storage means 408 is newly added to the configuration of the first embodiment shown in FIG.

【0023】解析手段406はソース記憶手段405に
格納されたソースプログラムを解析した結果を、一旦解
析結果格納手段408に格納する。入力手段401から
の指示にしたがって、解析手段406は解析結果格納手
段408に格納された解析結果とそこから求められた位
置情報を出力手段407に渡す。
The analysis means 406 temporarily stores the result of analyzing the source program stored in the source storage means 405 in the analysis result storage means 408. In accordance with an instruction from the input unit 401, the analysis unit 406 passes the analysis result stored in the analysis result storage unit 408 and the position information obtained therefrom to the output unit 407.

【0024】次に、具体例について説明する。解析手段
406がソースプログラムの構文誤りを検出する構文チ
ェッカであった場合を考える。構文チェッカは解析対象
のソースプログラムをバッチ的にチェックするため、解
析結果は複数ある可能性がある。このような場合は図3
のように1行ずつ入力仕様位置情報とともに出力できな
いため、一旦解析結果格納手段408に情報を格納す
る。
Next, a specific example will be described. Consider a case where the analyzing means 406 is a syntax checker for detecting a syntax error in a source program. Since the syntax checker checks the source program to be analyzed in a batch, there may be a plurality of analysis results. In such a case, FIG.
Since the information cannot be output line by line together with the input specification position information, the information is temporarily stored in the analysis result storage means 408.

【0025】チェック終了後、たとえば入力手段401
からの指示が一括出力の場合は、解析結果から対応する
入力仕様位置情報を求める処理を解析結果格納手段40
8に格納されているすべての解析結果に対して行い、す
べての対を一括して出力手段407に送る。図4に示す
第2実施の形態では、バッチ的な解析に対応し、図3に
示した第1実施の形態では、リアルタイム的な解析に対
応している。
After the check, for example, input means 401
If the instruction is a batch output, the processing for obtaining the corresponding input specification position information from the analysis result is performed by the analysis result storage unit 40.
The analysis is performed on all the analysis results stored in 8 and all pairs are sent to the output unit 407 collectively. The second embodiment shown in FIG. 4 corresponds to batch analysis, and the first embodiment shown in FIG. 3 corresponds to real-time analysis.

【0026】[0026]

【発明の効果】以上のように、この発明によれば、解析
機能から得られる情報がソースプログラムの行番号のみ
である場合でも入力仕様の位置情報が取得できるという
第1の効果が得られる。その理由は、ソースプログラム
の行番号から位置情報を求めるのに、ソースプログラム
中にコメントとして埋め込まれた位置情報が使えるため
である。また、生成されるプログラム種別が同じ場合は
入力仕様の位置情報をコメントとして変換する規則を用
意するだけで、異なったプログラムパターンに対応した
生成規則を適用することによって生成されるソースプロ
グラムが異なっても、解析手段は同一のロジックによっ
て入力仕様の位置情報を取得できるという第2の効果が
得られる。その理由は、位置情報をコメントとして変換
する規則が同一であり、コメント文から位置情報を求め
るロジックも同一であるためである。
As described above, according to the present invention, the first effect that the position information of the input specification can be obtained even when the information obtained from the analysis function is only the line number of the source program. The reason is that the position information embedded as a comment in the source program can be used to obtain the position information from the line number of the source program. In addition, when the generated program types are the same, only the rules for converting the position information of the input specifications as comments are prepared, and the source programs generated by applying the generation rules corresponding to the different program patterns are different. Also, the second effect is obtained that the analyzing means can acquire the position information of the input specification by the same logic. The reason is that the rules for converting the position information as a comment are the same, and the logic for obtaining the position information from the comment text is also the same.

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

【図1】この発明によるソースプログラム対応表示方式
の第1実施の形態の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a first embodiment of a display method corresponding to a source program according to the present invention.

【図2】この発明によるソースプログラム対応表示方式
の第1実施の形態の動作を説明するための入力仕様とソ
ースプログラムとの関係を示す説明図である。
FIG. 2 is an explanatory diagram showing a relationship between an input specification and a source program for explaining an operation of a first embodiment of a source program compatible display method according to the present invention.

【図3】この発明によるソースプログラム対応表示方式
の第1実施の形態における解析手段がリアルタイムデバ
ッガの場合の動作を説明するための説明図である。
FIG. 3 is an explanatory diagram for explaining an operation in a case where an analysis means is a real-time debugger in the first embodiment of a source program compatible display method according to the present invention.

【図4】この発明によるソースプログラム対応表示方式
の第2実施の形態の構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a second embodiment of a source program compatible display method according to the present invention.

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

101,401……入力手段、102,402……ジェ
ネレータ、103,403……ソース生成手段、10
4,404……生成規則記憶手段、105,405……
ソース記憶手段、106,406……解析手段、10
7,407……出力手段、408……解析結果格納手
段、201……位置情報、202……入力仕様、20
3,205……行番号、204,206……ソースプロ
グラム。
101, 401 ... input means, 102, 402 ... generator, 103, 403 ... source generation means, 10
4,404... Generation rule storage means, 105,405.
Source storage means, 106, 406... Analysis means, 10
7, 407: output means, 408: analysis result storage means, 201: position information, 202: input specification, 20
3, 205... Line number, 204, 206... Source program.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 仕様の書き換える知識を規則の形で記述
された生成規則を格納する生成規則記憶手段と、 入力手段から入力される仕様を読み込んで上記生成規則
記憶手段に記憶された生成規則を適用することにより入
力仕様上の位置情報をコメント文として挿入したソース
プログラムを生成してソース記憶手段に記憶するソース
生成手段と、 上記入力手段からの指示にしたがって上記ソース記憶手
段に記憶されているソースプログラムを解析して出力手
段に出力すべき情報が有る場合には、上記ソース記憶手
段に記憶されている対応する入力仕様の位置情報をコメ
ント文から抽出して、位置情報と解析結果とを対にして
上記出力手段に出力する解析手段と、 を備えることを特徴とするソースプログラム対応表示方
式。
1. A generation rule storing means for storing a generation rule in which knowledge of specification rewriting is described in the form of a rule, and a generation rule stored in the generation rule storage means which reads a specification inputted from an input means and stores the specification. A source generation unit that generates a source program in which positional information on the input specification is inserted as a comment by applying the same and stores the generated source program in a source storage unit, and is stored in the source storage unit according to an instruction from the input unit. If the source program is analyzed and there is information to be output to the output unit, the position information of the corresponding input specification stored in the source storage unit is extracted from the comment statement, and the position information and the analysis result are extracted. A source program compatible display method, comprising: analysis means for outputting to the output means as a pair.
【請求項2】 上記ソースプログラムは、位置情報を含
んだコメントと入力仕様が変換されたソースコードとが
対になっていることを特徴とする請求項1記載のソース
プログラム対応表示方式。
2. The display method according to claim 1, wherein the source program is a pair of a comment including position information and a source code whose input specification has been converted.
【請求項3】 上記解析手段は、実際にプログラムを動
作させながらプログラムの状況をリアルタイムにモニタ
リングするリアルタイムデバッガであることを特徴とす
る請求項1記載のソースプログラム対応表示方式。
3. The display method according to claim 1, wherein said analyzing means is a real-time debugger for monitoring the status of the program in real time while actually operating the program.
【請求項4】 上記解析手段は、上記ソース記憶手段に
格納されたソースプログラムを解析した結果を一旦解析
結果格納手段に格納した後に、上記入力手段の指示にし
たがって上記解析結果格納手段に格納された解析結果と
それから求めた位置情報を上記出力手段に出力すること
を特徴とする請求項1記載のソースプログラム対応表示
方式。
4. The analysis means stores the result of analyzing the source program stored in the source storage means in the analysis result storage means, and then stores the result in the analysis result storage means in accordance with an instruction from the input means. 2. The display method according to claim 1, wherein the analysis result and the position information obtained from the analysis result are output to the output means.
【請求項5】 上記解析手段は、上記ソースプログラム
の構文誤りを検出する構文チェッカであることを特徴と
する請求項1記載のソースプログラム対応表示方式。
5. The display method according to claim 1, wherein said analyzing means is a syntax checker for detecting a syntax error in said source program.
JP32892599A 1999-11-19 1999-11-19 Display system corresponding to source program Pending JP2001147832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32892599A JP2001147832A (en) 1999-11-19 1999-11-19 Display system corresponding to source program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32892599A JP2001147832A (en) 1999-11-19 1999-11-19 Display system corresponding to source program

Publications (1)

Publication Number Publication Date
JP2001147832A true JP2001147832A (en) 2001-05-29

Family

ID=18215635

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32892599A Pending JP2001147832A (en) 1999-11-19 1999-11-19 Display system corresponding to source program

Country Status (1)

Country Link
JP (1) JP2001147832A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7241988B1 (en) * 2022-06-21 2023-03-17 三菱電機株式会社 Program generation device, program generation method and program generation program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7241988B1 (en) * 2022-06-21 2023-03-17 三菱電機株式会社 Program generation device, program generation method and program generation program
WO2023248364A1 (en) * 2022-06-21 2023-12-28 三菱電機株式会社 Program generating device, program generating method, and program generating program

Similar Documents

Publication Publication Date Title
CN101739339B (en) Program dynamic dependency relation-based software fault positioning method
CN109857637B (en) Java language method coverage rate and method input and output statistical method based on annotation
Rask et al. Visual studio code vdm support
US8533683B2 (en) Stack walking enhancements using sensorpoints
US6314557B1 (en) Hybrid computer programming environment
JP2001147832A (en) Display system corresponding to source program
JP5539921B2 (en) Program development tools
JP2004287869A (en) Program execution monitoring device and method
JPH11110256A (en) Device and method for debugging program, and computer readable recording medium recorded with the method for the same
JPH10293683A (en) Device for comparatively analyzing program, method therefor and mechanically readable recording medium recording comparative analytic program for program
JP2011221656A (en) Method for generating execution code, compiler, and compile device
Elms Debugging optimised code using function interpretation
KR100290623B1 (en) A method of controlling data of database
JP3165105B2 (en) Program tracer, compiler and linker
Lee et al. Using LLDB
JPH01273144A (en) Software development supporting device
JP2004102742A (en) Program test debugging system
Durr et al. Initial Results for Quantifying AOP
CN115129578A (en) Assembly code inspection method and related equipment
CN113672239A (en) Visual algorithm package development method based on language analysis
JPH02244341A (en) Execution subroutine debugging information output trace system
CN115964295A (en) Method and device for quickly replacing compiled front-end file preprocessed in chip
JPH05197539A (en) Matching system for program source code
JP2003058392A (en) Software development environmental program, its recording medium, program debugging device and method
JPH04209029A (en) Parallel process program translation processor