JPS6258335A - Issuing device for list of program - Google Patents

Issuing device for list of program

Info

Publication number
JPS6258335A
JPS6258335A JP19890785A JP19890785A JPS6258335A JP S6258335 A JPS6258335 A JP S6258335A JP 19890785 A JP19890785 A JP 19890785A JP 19890785 A JP19890785 A JP 19890785A JP S6258335 A JPS6258335 A JP S6258335A
Authority
JP
Japan
Prior art keywords
information
program
image
list
pattern
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
JP19890785A
Other languages
Japanese (ja)
Inventor
Nobuo Hara
伸夫 原
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP19890785A priority Critical patent/JPS6258335A/en
Publication of JPS6258335A publication Critical patent/JPS6258335A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Digital Computer Display Output (AREA)

Abstract

PURPOSE:To understand visually overall structure of a source program by synthesizing the image information produced from the structure analysis information and the condition deciding analysis information with a source program list. CONSTITUTION:A compiler 2 performs the structure analysis or the condition deciding analysis of a source program 1 and sends the structure analysis information 3 and the condition deciding analysis information 4 to a printer image control part 7. Based on these information, the part 7 gives a pattern request signal 8 to a pattern generator 9 and also the image memory address data 14 to an image memory 19 and writes the image data 16 which is changed into an approximate size by an enlarging/reducing circuit part 12. The image data delivered from an image memory 19 is given to a program list image synthesizing part 17 and synthesized with the list data 13 outputted from the compiler 2. This synthetic data is displayed on a display device 20.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はプログラムのリストをディスプレイ装置或いは
プリンタ装置に出力する方式に係り、特にコンパイラか
らの情報をもとにプログラムの内容を視覚的にも理解で
きるように図形や記号を付加することができる視認性に
優れたプログラムのリスト発行装置に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention relates to a method for outputting a list of programs to a display device or a printer device, and particularly to a method for visually understanding the contents of a program based on information from a compiler. The present invention relates to a program list issuing device that has excellent visibility and can add figures and symbols to make the program easier to read.

〔従 来 技 術〕[Traditional technique]

集積回路技術の進歩に伴い、パーソナルコンピュータ或
いはマイクロコンピュータ等が高機能化され、多くのプ
ログラム言語を利用できるようになってきた。特に19
70年代の初めにベル研究所で開発されたUNIXとい
うオペレーティングシステム(OS)上にはC言語、フ
ォートラン言語。
2. Description of the Related Art As integrated circuit technology advances, personal computers, microcomputers, and the like have become more sophisticated, and many programming languages have become available. Especially 19
The C and Fortran languages run on the UNIX operating system (OS) developed at Bell Laboratories in the early 1970s.

パスカル言語、リスプ言語等の高級言語が利用できる。High-level languages such as Pascal language and Lisp language can be used.

特にC言語は高級言語であると同時にアセンブラ語、す
なわち機械語なみの柔軟性を持つており、プログラムの
作成から実行までが素早く出来る上、異種のシステム間
での互換性も高いため。
In particular, the C language is a high-level language and at the same time has the flexibility of assembler language, that is, machine language, which allows programs to be created and executed quickly, and is highly compatible with different systems.

UNIX上で特に利用されている。しかし、C言語では
非常に分り難いプログラムが出来てしまう可能性もあり
、安全で分り易いプログラムを書く必要がある。また他
の言語1例えばリスプのような言語においては、ソース
プログラムそのものが。
It is especially used on UNIX. However, it is possible to create programs that are extremely difficult to understand using the C language, so it is necessary to write programs that are safe and easy to understand. In other languages, such as Lisp, the source program itself.

非常に力・7コ記号の多いS表現で書かれるので。It is written in the S expression, which has a lot of power and 7 symbols.

左カッコと右カッコの対応関係が非常にわかりにくいこ
とがある。このようにC言語やリスプ言語等は人間にわ
かりやすいソースプログラムではあるが、プログラム言
語特有に決められた記号のみを用いてディスプレイ装置
、或いはプリンタ装置にプログラムリストをそのまま出
力するとわかりに(いときがある。
The correspondence between left and right parentheses can sometimes be very difficult to understand. In this way, C language, Lisp language, etc. are source programs that are easy to understand for humans, but if you output the program list as is to a display device or printer using only the symbols unique to the programming language, it becomes difficult to understand (there are times when it is difficult to understand). be.

一般にUNIXのような高性能なO8上ではディスプレ
イ装置画面上で編集する画面エディターがあって、キー
ボードから自分の操作プログラムを入力し、必要なら修
正を行って誤りのない操作プログラムを作成し、ソース
ファイルとしてディスクに格納し、ディスクから出力し
て再び編集することができる。そして、このような画面
エディタ上でも従来は作成したソースファイル通りにリ
ストしていただけであった。そのため、ソースファイル
通りにリストしていたために1画面上でプログラムのリ
スト上を見たとき、プログラムの内容がどのような構造
になっているかたやすく理解できず、特に操作プログラ
ムが長い場合には、サブルーチンのネスティング状i、
  IF文や、ループ文の範囲、有効範囲等がひと目で
理解できないという欠点を有していた。特に条件判断を
行う場合の前記条件が非常に多いと条件判断の有効範囲
が分りづらく、各判断記号や、その優先順位をユーザが
記憶していなければ、何をプログラム上でやっているの
か理解できなくなることがある。これは、プログラムそ
のものがアルファベットや特殊記号の羅列のみでリスト
化されているからであり1画像的な情報を含んでいない
からである。
In general, high-performance O8 systems such as UNIX have a screen editor that edits on the display device screen.You can input your own operating program from the keyboard, make corrections if necessary to create an error-free operating program, and then edit the source code. You can save it to disk as a file, output it from disk, and edit it again. In the past, even on such a screen editor, the source files were simply listed as they were created. Therefore, when you look at the program list on one screen because it is listed according to the source file, it is difficult to understand the structure of the program contents, especially when the operation program is long. , subroutine nesting state i,
It has the disadvantage that the range of IF statements, loop statements, effective ranges, etc. cannot be understood at a glance. Especially when making conditional judgments, if there are a large number of conditions, it is difficult to understand the effective scope of the conditional judgments, and if the user does not remember each judgment symbol and its priority order, they will not be able to understand what the program is doing. It may not be possible to do so. This is because the program itself is listed only as a list of alphabets and special symbols, and does not contain image-like information.

〔発明の目的〕[Purpose of the invention]

本発明は、このような従来の欠点を除去し、操作プログ
ラムのリスト上にプログラムの構造、或いは内容等を図
形化した画像情報を付加し、自分で書いたプログラムを
視覚的にも理解しやすく。
The present invention eliminates these conventional drawbacks and adds image information that graphically represents the structure or content of the program to the list of operating programs, making it easier to visually understand the program you wrote yourself. .

プログラムのネスティング、ループ文の有効範囲。Program nesting, scope of loop statements.

或いは条件判断の優先順位等をロジック記号を使1て9
画面情報として出力装置に出力するので。
Or, use logic symbols to prioritize conditions, etc.
Because it is output to the output device as screen information.

非常に理解しやすい視認性の優れたプログラムのリスト
発行装置を提供するものである。
To provide a program list issuing device that is very easy to understand and has excellent visibility.

〔発明の要点〕[Key points of the invention]

上記目的は本発明によればプログラムをリストする装置
において、前記プログラムの情報を元にプログラムの内
容をパターン化して発生するパターン発生手段を有する
ことを特徴とするプログラムのリスト発行装置を提供す
ることにより達成される。
According to the present invention, it is an object of the present invention to provide a program list issuing device, which is characterized in that it has a pattern generating means that generates a pattern by patterning the contents of the program based on the information of the program. This is achieved by

〔実  施  例〕〔Example〕

次に本発明を図面を参照して説明する。本発明の視認性
のすぐれたプログラムのリスト発行装置を第1図に示す
。パーソナルコンピュータ、或いはマイクロコンピュー
タシステムにおいて使われているO89例えばUNIX
システム上には画面エディターが含まれており、それを
使ってキーボードから自分のプログラムを入力し、適当
に編集を行って、誤りのないソースプログラム1をディ
スク中にソースファイルとして作成する。コンパイラ2
は、自分で書いたプログラムを計算機が直接実行できる
機械語即ち命令の系列に翻訳するものである。この機械
語の形のプログラムをオブジェクトプログラムといい、
これもオブジェクトファイルとしてコンパイラ2から出
力される。ソースファイル1上のソースプログラムから
作られるオブジェクトプログラムは、オブジェクトファ
イル5に記憶されるが、入出力制御が伴う場合にはそれ
だけでは、実行できず2通常は、ライブラリにあるいく
つかのプログラムとをリンカによって結合されて最終的
には主記憶上に記憶されるロードモジュールに変更され
て実行される。コンパイラ2は従来ではソースプログラ
ムの構造解析、或いは条件判断の条件解析等を行っても
、この解析はコンパイラ内部で使われるだけであったが
9本発明では、第1図に示すように、解析情報をプリン
タイメージ制御部7に伝送している。構造解析情報3は
、サブルーチン、ループ文、或いは条件文の始まりや終
了に関する情報や、サブルーチンのネスティング状態を
示す情報である。また1条件判断解析情報4は、四則演
算の演算子の優先順位や論理記号9例えばアンド、オア
、エクスクルシブオア、等の優先順位に関する情報であ
る。
Next, the present invention will be explained with reference to the drawings. FIG. 1 shows a program list issuing device with excellent visibility according to the present invention. O89, such as UNIX, used in personal computers or microcomputer systems
The system includes a screen editor, which is used to input one's own program from the keyboard, perform appropriate editing, and create an error-free source program 1 as a source file on the disk. Compiler 2
translates a program you have written into machine language, or a sequence of instructions, that can be directly executed by a computer. This machine language program is called an object program.
This is also output from the compiler 2 as an object file. The object program created from the source program in the source file 1 is stored in the object file 5, but if input/output control is involved, it cannot be executed alone. They are combined by a linker, changed into a load module that is finally stored in main memory, and then executed. Conventionally, even if the compiler 2 analyzes the structure of a source program or analyzes conditions for determining conditions, this analysis is only used within the compiler.9 In the present invention, as shown in FIG. The information is transmitted to the printer image control section 7. The structure analysis information 3 is information regarding the start and end of a subroutine, loop statement, or conditional statement, and information indicating the nesting state of the subroutine. Further, the one-condition judgment analysis information 4 is information regarding the priority order of operators of four arithmetic operations and the priority order of logical symbols 9 such as and, or, exclusive or, etc.

プリンタイメージ制御部7は、前記構造解析情報3や条
件判断解析情報4をもとにプリントイメージに変換した
時に発生するラインの増加情報をコンパイラ2にライン
変更情報6として通知し。
The printer image control unit 7 notifies the compiler 2 of line increase information that occurs when converting into a print image based on the structure analysis information 3 and condition judgment analysis information 4 as line change information 6.

コンパイラ2がページ切換時にラインの数をカウントす
るためのアップダウン情報として利用する。
The compiler 2 uses this as up/down information to count the number of lines when switching pages.

また、プリンタイメージ制御部7は前記構造解析情報3
.或いは条件判断解析情報4をもとにパターンジェネレ
ータ9にパターン要求信号8を与える。また、出力する
図形の拡大縮小を行うために。
Further, the printer image control unit 7 also controls the structure analysis information 3.
.. Alternatively, the pattern request signal 8 is given to the pattern generator 9 based on the condition judgment analysis information 4. Also, to scale the output figure.

拡大/縮小回路部12に拡大/縮小要求信号11を与え
る。さらに、予め用意された図形を格納しているイメー
ジメモリ19にイメージメモリアドレスデータ14を与
えると同時にライト要求信号15を与えて拡大/縮小回
路部12で適当な大きさに変形した図形即ちイメージデ
ータ16をイメージメモリ19に書込むように制御する
。即ち。
An enlargement/reduction request signal 11 is given to the enlargement/reduction circuit section 12 . Further, the image memory address data 14 is given to the image memory 19 storing the figure prepared in advance, and at the same time, the write request signal 15 is given to the enlargement/reduction circuit section 12 to transform the figure to an appropriate size, that is, image data. 16 is controlled to be written into the image memory 19. That is.

プリントイメージ制御部7はパターンジェネレータ9.
及び拡大/縮小回路部12及びイメージメモリ19の制
御を行う中心部である。適当に変更された図形はイメー
ジメモリ19から1ライン上のイメージデータとして、
出力線18に出力され。
The print image control section 7 includes a pattern generator 9.
It is a central portion that controls the enlargement/reduction circuit section 12 and the image memory 19. The appropriately changed figure is stored as image data one line higher than the image memory 19.
It is output to the output line 18.

プログラムリストイメージデータ合成部17への一方の
入力として与える。リストイメージデータ合成部17の
他の入力はコンパイラ2から出力されるソースプログラ
ムそのもののリストであって。
It is given as one input to the program list image data synthesis section 17. The other input to the list image data synthesis section 17 is a list of the source program itself output from the compiler 2.

リストデータ13である。コンパイラ2から出力される
ソースプログラムのりスト13と前記ソースプログラム
の構造や内容を理解するための図形。
This is list data 13. Figures for understanding the source program list 13 output from the compiler 2 and the structure and contents of the source program.

即ちイメージデータ18とが前記プログラムリストイメ
ージデータ合成部17で合成されると、最終的なリスト
データが出力線20に出力される。
That is, when the image data 18 is synthesized by the program list image data synthesis section 17, the final list data is outputted to the output line 20.

リストデータ20は、CRT制御部21を介して画面情
報としてディスプレイ装置20に合成された情報として
表示され名。または、プリンタ制御部23を介してプリ
ンタ24に、プログラムリストとリストを理解するため
に付加された図形情報とが1合成された形で出力される
。このように。
The list data 20 is displayed as synthesized information on the display device 20 as screen information via the CRT control unit 21. Alternatively, the program list and graphic information added for understanding the list are outputted to the printer 24 via the printer control unit 23 in a combined form. in this way.

本発明はソースプログラムのリストそのものにソ−スプ
ログラムの内容を視覚的に理解することを可能にする図
形、即ち、イメージを付加する装置である。
The present invention is an apparatus for adding figures, ie, images, to the list of source programs themselves, making it possible to visually understand the contents of the source programs.

次にプログラムリストの内容を視覚的に理解しやすくす
る図形情報に関して具体的な実施例で説明する。プログ
ラムの構造や条件判断等はプログラムの種類によって異
なるが、プログラムは一般に条件文や、ループ文や、サ
ブルーチンを含んでいる。C言語の場合には、プログラ
ムは関数の集りとして構成され、各関数の並べ方の順序
は自由であり、関数そのものは独立化されたものでそれ
ぞれ独立にコンパイル出来るといった特徴をもっている
。すなわち、C言語は構造化プログラムの一種である。
Next, graphical information that makes it easier to visually understand the contents of a program list will be explained using a specific example. Program structures, conditional judgments, etc. differ depending on the type of program, but programs generally include conditional statements, loop statements, and subroutines. In the case of the C language, a program is constructed as a collection of functions, the functions can be arranged in any order, and the functions themselves are independent and can be compiled independently. That is, the C language is a type of structured program.

パスカル言語等も構造化プログラムになっている。また
、リスプ言語も関数の集りとして構成する言語であり、
一般にS表現という非常にカッコの多いソースプログラ
ムである。C言語やパスカル言語、或いはリスプ言語等
は、関数の中に関数があったり、同じ関数の中に同じ自
分の関数を挿入して再帰的な呼出しを可能にし、複雑な
制御が出来る。このような高級言語によって。
The Pascal language is also a structured program. Lisp language is also a language that is constructed as a collection of functions.
Generally, it is a source program with many parentheses called S expression. In the C language, Pascal language, Lisp language, etc., there are functions within functions, or the same function can be inserted within the same function to enable recursive calling, allowing complex control. by such high-level languages.

構造や判断方式は異なるので1本実施例ではC言語を例
にして、更にプログラムのリストに図形情報を付加する
方法を説明する。C言語ではデータとしてアドレスポイ
ンタが使われたり、演算子の種類が非常に多(9表現方
法も非常にコンパクトになるようにブロックは大力フコ
で表すようにしている。C言語では1例えば、1ずつ増
すインクリメントは++で表し、ディクリメントは、−
一で表現し、ビット毎の演算記号として、&、+!。
Since the structure and judgment method are different, in this embodiment, C language is used as an example, and a method of adding graphic information to a program list will be explained. In the C language, address pointers are used as data, and there are a large number of types of operators (9) Blocks are expressed in large letters so that the representation method is also very compact.In the C language, 1 For example, 1 An increment is represented by ++, a decrement is represented by -
Expressed as 1 and as bit-wise operation symbols, &, +! .

ハント記号を使い、論理演算としては、1.&を使い、
2進シフトは〉くを使っている。また、プログラムの流
れを制御する構文として、 while文。
Using Hunt symbols, the logical operations are 1. Use &,
Binary shift uses 〉ku. Also, the while statement is a syntax that controls the flow of the program.

for文+  if文、  do文、  5w1tch
文、  case文等がある。
for statement + if statement, do statement, 5w1tch
There are sentences, case sentences, etc.

C言語の原文の一例を第2図(alに示す。第2図+8
)の原文において、最初のdefine命令はMAXL
INEという文字列を1oooという値に定義するマク
ロ命令である。2行目のmain  ()はC言語の始
まりに必要なもので、3行目と14行目の大力フコ()
との間において、;記号の前に文を羅列して各文を一般
に順序よく実行する手続型のプログラムになっている。
An example of the original text of the C language is shown in Figure 2 (al).Figure 2+8
), the first define instruction is MAXL
This is a macro instruction that defines the character string INE as a value of 1ooo. The main () on the second line is necessary for the beginning of the C language, and the main () on the third and 14th lines.
It is a procedural program that enumerates statements before the ; symbol and generally executes each statement in order.

4行目は、nという変数を整数型に宣言する文であり、
第5行目は1ineという1ooo文字まで表現できる
文字変数を宣言する文である。尚、2行目の/*記号で
挾まれた文章は注釈文で今の場合、このプログラムがブ
ランクとタブを除くためのプログラムであることを注釈
している。第6行目のwhile文はプログラムの流れ
を制御する構文の1つであり、小カッコ()の中身が成
立している間は9次の大カッコ()の間を繰り返して実
行せよという指示である。すなわち、  1ineとい
う変数とMAXLINE!という変数を引数として持つ
getline関数の値をnに代入し2代入した結果が
、正である間は、7行目から13行目ま°での間の文章
を実行することになる。7行目において更に、 +vh
ile文がある。7行目の−hile文は変数nから1
を引いた結果の変数nがO又は正である間は次の8行目
から10行目の間を繰り返すことを指示する文である。
The fourth line is a statement that declares the variable n to be an integer type,
The fifth line is a statement that declares a character variable called 1ine that can represent up to 1ooo characters. Note that the sentence between the /* symbols on the second line is a comment, which in this case notes that this program is a program for removing blanks and tabs. The while statement on the 6th line is one of the syntaxes that controls the flow of the program, and it instructs to repeat the execution between the 9th order brackets () while the contents of the parentheses () hold true. It is. In other words, the variable 1ine and MAXLINE! As long as the result of substituting n with the value of the getline function that has the variable as an argument and substituting 2 is positive, the sentences from the 7th line to the 13th line will be executed. Furthermore, in the 7th line, +vh
There is an ile statement. The -hile statement on the 7th line changes variable n to 1
This is a statement that instructs to repeat the next 8th to 10th lines while the variable n resulting from subtraction is O or positive.

8行目のif文はやはりプログラムの流れを変える構文
であって、8行目と9行目の小カッコ()で囲まれた文
章が成立する場合のみ、10行目すなわち、 tyre
ak命令を実行する。すなわち、10行目のbreak
命令は7行目のwhile文の実行の終りを示すと同時
に8行目のif文の実行の終りをも示し、ルーチンから
の脱出を表す文である。if文の条件式の中のアンド記
号が2つ重なった記号&&は論理的ANDを表し、全体
で、変数1ineのn番目がブランクでなく、かつ。
The if statement on the 8th line is a syntax that changes the flow of the program, and only when the sentences enclosed in parentheses () on the 8th and 9th lines hold true, the if statement on the 10th line, that is, tyre
Execute the ak command. In other words, break on line 10
The command indicates the end of the execution of the while statement on the seventh line, and at the same time indicates the end of the if statement on the eighth line, and is a statement indicating escape from the routine. The symbol && in the conditional expression of the if statement, which is made up of two overlapping AND symbols, represents a logical AND, and the nth variable 1ine is not blank.

またタブ(\t)でもなく、改行(\n)記号でないと
きのみ、if文から脱出することを指示している。すな
わち、!記号は不等値比較を表している。if文を脱出
すると、7行目のwhileを実行してnが1つディク
リメントし、その結果が、まだ。
It also instructs to escape from the if statement only when it is not a tab (\t) or line feed (\n) symbol. In other words! The symbol represents an inequality comparison. After exiting the if statement, execute the while on the 7th line and decrement n by 1, and the result is still.

正であるならば、ふたたびif文を実行することになる
。この動作をnがOになるまで繰り返して。
If it is positive, the if statement will be executed again. Repeat this operation until n becomes O.

7行目に対応するwhile文から説出し、11行目の
文を実行する。11行目の文は10の文字変数を1 i
ne変数のn+1番目に代入し、その1ine変数を1
2行目のprintf文で文字列で印刷し、改行するこ
とを指示する。そして再び6行目のwhile文に戻リ
、変数nの値が正である間は以下のことを同様に実行す
る。このようにして後側のブランクとタブを取除く操作
プログラムが作成されたことになる。
The while statement corresponding to the 7th line is explained, and the statement on the 11th line is executed. The statement on line 11 sets 10 character variables to 1 i
Assign to the (n+1)th ne variable and make that 1ine variable 1
The printf statement on the second line instructs printing as a character string and starting a new line. Then, return to the while statement on the 6th line again, and execute the following in the same way while the value of variable n is positive. In this way, an operation program for removing blanks and tabs on the rear side has been created.

このようなC言語のソースプログラムは第1図のシステ
ム上でソースファイル1に格納される。
Such a C language source program is stored in a source file 1 on the system shown in FIG.

このソースファイルは、第2図(a)に示すように。This source file is as shown in Figure 2(a).

視覚的には非常に分り難いソースプログラムそのものの
リストだけで表現されているものである。
It is expressed only as a list of the source programs themselves, which is visually very difficult to understand.

本発明では、このようなソースプログラムをコンパイラ
2からプリントイメージ制御部7に与えられる構造解析
情報3をもとに、第2図(b)に示すようにプログラム
の構造を矢印により区切り、構造をわかりやすくしてい
る。すなわち、第2図(b)に示すように、3行目の左
大カフコ (と14行目の石火カフコ)が対応している
ことを示す矢印10を図形的に画面に出力している。こ
れはmain文の開始と終りを表現している。また、矢
印11は6行目の5nhile文の有効範囲を示すもの
で6行目の終りの大カッコ (と13行目の石火カッコ
)が対応していることを示している。同様に7行目の%
1hile文の有効範囲は10行目のbreak文であ
るから、これを矢印12によって表現している。また、
8行目のif文の有効範囲は8行目から10行目のbr
ead文までであるからこの有効範囲は矢印13で表現
されている。このように矢印の図形を有効に使うことに
よってネスティングの状態が視覚的にひと目で分るよう
になる。すなわち、矢印11で示される一hile文の
中に矢印12で示すwhile構文があり、そのwhi
le文の中に矢印13で示すif構文が含まれているこ
とが視覚的にわかることになる。
In the present invention, based on the structure analysis information 3 given from the compiler 2 to the print image control section 7, the structure of the program is separated by arrows as shown in FIG. It's easy to understand. That is, as shown in FIG. 2(b), an arrow 10 is graphically output on the screen to indicate that the left large kafko on the 3rd line (and the stone fire kafko on the 14th line) correspond. This represents the beginning and end of the main sentence. Furthermore, arrow 11 indicates the effective range of the 5nhile statement on line 6, and indicates that the brackets at the end of line 6 (and the parentheses on line 13) correspond. Similarly, % on the 7th line
Since the effective range of the 1file statement is the break statement on the 10th line, this is represented by an arrow 12. Also,
The valid range of the if statement on line 8 is br from line 8 to line 10
Since it extends up to the ead statement, this effective range is represented by an arrow 13. By effectively using arrow shapes in this way, the nesting status can be visually understood at a glance. In other words, there is a while sentence shown by arrow 12 in one whole sentence shown by arrow 11, and the while sentence is shown by arrow 12.
It can be visually seen that the le statement includes an if syntax indicated by arrow 13.

さらに1本発明ではコンパイラ2からプリントイメージ
制御部7に条件判断解析情報4を与えることにより9例
えば9条件判断文の条件が多い場合に、それをロジック
記号を用いて表現するようにしている。すなわち、ロジ
ック記号を出力するようにプリンタイメージ制御部7か
らパターン要求信号8をパターンジェネレータ9に出力
し、更に拡大/縮小要求信号11を拡大/縮小回路部1
2を与えて、前記ロジック記号を適当な大きさに拡大/
縮小し、イメージメモリ19に格納する。
Furthermore, in the present invention, the compiler 2 supplies the condition judgment analysis information 4 to the print image control unit 7, so that when there are many conditions, for example, 9 condition judgment statements, they are expressed using logic symbols. That is, the pattern request signal 8 is outputted from the printer image control section 7 to the pattern generator 9 so as to output a logic symbol, and the enlargement/reduction request signal 11 is sent to the enlargement/reduction circuit section 1.
2 and enlarge the logic symbol to an appropriate size/
It is reduced in size and stored in the image memory 19.

そしてそのロジック記号を1ラインイメージデータとし
て出力し、第2図(a)に示すソースプログラムの原文
を1ラインずつ出す時に同時に前記ロジック記号をプロ
グラムリストイメージデータ合成部17で合成しながら
、出力線20に出力し、CRT制御部21を介してCR
T20或いはプリンタ制御部23を介してプリンタ24
に出力するように出来る。その結果は第2図(C1に示
される。第2図fc)は条件判断のイメージ化を、第2
図(b)に示される構造解析情報に従う矢印記号と同時
に、論理記号を用いて図形的に表現しているものである
Then, the logic symbol is outputted as one line image data, and when outputting the original text of the source program shown in FIG. 20 and output to the CR via the CRT control unit 21.
Printer 24 via T20 or printer control unit 23
You can output it to The results are shown in Figure 2 (C1; Figure 2 fc).
It is graphically expressed using logical symbols as well as arrow symbols according to the structural analysis information shown in Figure (b).

すなわぢ、第2図(alの原文における8行目のif文
の条件式は変数1ineのn番目の値がブランク記号で
もなく、タブ記号でもなく、又、改行復帰記号でもない
場合に5次のことを実行せよという指定であるから、こ
れを論理的な記号を用いて表現すれば、第2図(C)に
示すように、&&記号に代ってアンド図形に変更されて
出力される。そして小カッコ()は画面上では拡大され
て表現されている。このような論理的なアンド記号を図
形的にソースプログラムのリストと合成して付加すれば
視覚的に条件判断のイメージが理解しやすくなるこは明
らかである。
In other words, the conditional expression of the if statement on line 8 in the original text of Figure 2 (al) is 5 if the nth value of the variable 1ine is neither a blank symbol nor a tab symbol nor a newline return symbol Since this is a command to execute the following, if this is expressed using logical symbols, the && symbol will be changed to an and shape and output as shown in Figure 2 (C). The parentheses () are enlarged on the screen.If you add logical AND symbols like this by graphically combining them with the source program list, you can visually visualize the condition judgment. It is obvious that it will be easier to understand.

ロジック記号を図形的に出力することによって。By outputting logic symbols graphically.

更に条件判断時の優先順位も視覚的に理解できるように
なる。例えば、第3図(a)のソースプログラムはC言
語で書かれたif文の論理的な条件式であって、変数C
とDとをビット単位のオアを行った結果と、変数Bをビ
ット毎のアンドを取り、その結果とAとを論理的なオア
を実行し、その結果が論理的オアを満足しなければ、a
=bを実行し。
Furthermore, it becomes possible to visually understand the priority order when determining conditions. For example, the source program in FIG. 3(a) is a logical conditional expression of an if statement written in C language, and a variable C
Take the result of performing a bitwise OR on and D, perform a bitwise AND on the variable B, perform a logical OR on that result and A, and if the result does not satisfy the logical OR, a
= Execute b.

そうでなければ、a=cを実行する文章である。Otherwise, it is a sentence that executes a=c.

このようなソースプログラムをディスプレイ装置上に出
力されても、視覚的に即、理解できずユーザは論理的に
かなり思考する必要がある。そこで。
Even if such a source program is output on a display device, it cannot be visually understood immediately and the user is required to think logically. Therefore.

本発明ではこの論理的な条件文を条件判断解析情報3を
もとにパターンジェネレータ9から論理記号を出力し2
条件文に適合した論理記号の接続情報とともに合成し、
プログラムリストイメージデ−タ合成部17でソースプ
ログラムのリスト情報と合成して例えばディスプレイ装
置に図示するようにしている。その結果は第3図(b)
に示すようになっている。条件判断に必要な論理記号の
優先順位はNO前記号、ビット毎のアンド、ビット毎の
オア、そして、論理的なオアの順序である。その優先順
位に従って第3図(alの原文のif文の条件式をシン
ボル記号で表現すれば、第3図(b)に示すように、C
とDのオアの結果をBとアンドとり、その結果をAとノ
アを取る形で図形的に表現されることになる。
In the present invention, this logical conditional sentence is generated by outputting logical symbols from a pattern generator 9 based on the condition judgment analysis information 3.
Synthesize along with connection information of logical symbols that match the conditional statement,
A program list image data synthesis unit 17 synthesizes the list information with the list information of the source program and displays the image on, for example, a display device. The result is shown in Figure 3(b)
It is shown in the figure below. The priority order of the logical symbols required for conditional judgment is the symbol before NO, bitwise AND, bitwise OR, and logical OR. If the conditional expression of the if statement in the original text of Figure 3 (al) is expressed in symbols according to the priority order, as shown in Figure 3 (b), C
It is expressed graphically by taking the OR result of and D and taking B and AND, and then taking the result of A and NOAH.

このように本発明では図形パターンをソースプログラム
そのものに付加する機能を有しているが。
As described above, the present invention has a function of adding graphic patterns to the source program itself.

色々なパターンは、パターンジェネレータ9から発生さ
れることになる。パターンの種類はいろいろあるが、第
4図に示すようなものが特に必要となる。第4図に示す
パターンについてはプリンタイメージ制御部7からパタ
ーン要求信号8が出力された時点でいずれかのパターン
を出力することになる。第4図に示されるようなパター
ンがパターンジェネレータ9から発生されると、これを
まず、拡大/縮小回路部12に入力し、前記プリンタイ
メージ制御部7から拡大/縮小要求信号11が出力され
た場合には、パターンの拡大/縮小を行うことになる。
Various patterns will be generated from the pattern generator 9. Although there are various types of patterns, the one shown in FIG. 4 is particularly required. Regarding the patterns shown in FIG. 4, one of the patterns will be output when the pattern request signal 8 is output from the printer image control section 7. When the pattern shown in FIG. 4 is generated by the pattern generator 9, it is first inputted to the enlargement/reduction circuit section 12, and the enlargement/reduction request signal 11 is outputted from the printer image control section 7. In this case, the pattern will be enlarged/reduced.

拡大/縮小の仕方もいろいろある1例えば、第5図に示
すように、アンド図形aは、出力されるべきディスプレ
イ装置の画面の大きさ、或いはその画面に表示されるソ
ースプログラムの画面領域にあわせて適当な大きさに変
更され、bやCやdのようになる。拡大/縮小されたイ
メージはイメージメモリ19に格納される。イメージは
、プリントイメージ制御部7から出力されるライト要求
信号15に従って、同時に制御部7から出力されるアド
レスデータ14で指定されるメモリアドレスに書込まれ
ることになる。そしてプログラムリストイメージ合成部
17でソースプログラムのリストと合成される。合成部
17は。
There are various ways of enlarging/reducing.1 For example, as shown in Figure 5, the AND figure a can be enlarged or reduced according to the size of the screen of the display device to be output, or the screen area of the source program displayed on that screen. is changed to an appropriate size, such as b, C, or d. The enlarged/reduced image is stored in the image memory 19. In accordance with the write request signal 15 output from the print image control section 7, the image is simultaneously written to the memory address specified by the address data 14 output from the control section 7. Then, the program list image composition section 17 composites the image with the source program list. The synthesis section 17 is.

合成のみならず、必要でないリストを省略してイメージ
とリストとを入れ換える操作を行うこともある。その様
子は第6図に示される。コンパイラ2の出力であるソー
スプログラムのリストとイメージメモリ19から出力さ
れたイメージ情報6例えば、プログラムの構造を明確に
するための矢印記号或いは条件判断を見やすくするため
の論理記号を含んだイメージとが合成されて出力される
In addition to compositing, operations may also be performed to omit unnecessary lists and replace images and lists. The situation is shown in FIG. The source program list output from the compiler 2 and the image information 6 output from the image memory 19 may include, for example, arrow symbols to clarify the program structure or logical symbols to make condition judgments easier to see. Combined and output.

尚、イメージメモリ19から出力されるデータは1ライ
ンイメージデータであり、従って前記イメージメモリ1
9は、第7図に示すように、1947分のイメージデー
タのみを蓄えることになる。
Note that the data output from the image memory 19 is one line image data, and therefore the data output from the image memory 19 is 1 line image data.
9, as shown in FIG. 7, stores only 1947 minutes of image data.

第7図はプリントイメージ制御部7から与えられるアド
レス及びライト要求信号に従って1例えば。
FIG. 7 shows one example in accordance with the address and write request signal given from the print image control section 7.

アドレス1には70のイメージデータを書込み。Write 70 image data to address 1.

アドレス2には71のイメージデータ、アドレス3には
72のイメージデータをそれぞれ・1ライン゛分のデー
タとして書込むと、それを合成することによって、第7
図の下の方に示すような図形が得られ、出力されること
になる。
When 71 image data and 72 image data are written to address 2 and address 3 as data for one line, respectively, by combining them, the seventh
A figure like the one shown at the bottom of the figure will be obtained and output.

このように本発明はプリントイメージ制御部7゜パター
ンジェネレータ9.拡大/縮小回路部12゜イメージメ
モリ19及びプリンタリストイメージデータ合成部17
をコンパイラ2の出力に接続し。
As described above, the present invention includes the print image control unit 7° pattern generator 9. Enlargement/reduction circuit section 12゜image memory 19 and printer list image data synthesis section 17
Connect to the output of compiler 2.

前記コンパイラ2より出力される構造解析情報3と条件
判断解析情報4をもとに前記コンパイラ2にライン変更
情報を与えながら、イメージ情報をソースプログラムの
リストと共に合成してCRT20或いはプリンタ24に
出力するようにしている。
While providing line change information to the compiler 2 based on the structure analysis information 3 and condition judgment analysis information 4 output from the compiler 2, image information is synthesized with the source program list and output to the CRT 20 or printer 24. That's what I do.

C発明の効果〕 本発明はこのようにコンパイラから出力される構造解析
情報や条件判断解析情報をもとにして作られるイメージ
情報をソースプログラムリストと共に合成することによ
り、ソースプログラムの全体的な構造を視覚的に理解出
来るようにし、更に条件判断を画像的に理解できるよう
にするとともに1条件判断の時の優先順位もひと目でわ
かるようにできるという効果がある。更に、ユーザがわ
かりにくいプログラムリストを解析することなく。
C Effects of the Invention] The present invention synthesizes the image information created based on the structure analysis information and condition judgment analysis information output from the compiler together with the source program list, thereby analyzing the overall structure of the source program. This has the effect of making it possible to visually understand the conditions, and also making it possible to understand the conditional judgments visually, as well as making it possible to understand at a glance the priority order when making one-conditional judgments. Furthermore, the user does not have to parse confusing program lists.

画像的にプログラムをただちに理解できるので。Because you can immediately understand the program visually.

ユーザの負担が軽減されるという効果がある。This has the effect of reducing the burden on the user.

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

第1図は本発明のリスト発生装置の構成を示すブロック
図。 第2図(a)はソースプログラムの原文。 第2図(b)は本発明により第2図(a)のソースプロ
グラムを構造的に見やすくするために矢印記号が付加さ
れたソースプログラム。 第2図(C)は本発明により条件判断のイメージ化を行
ったソースプログラムの結果を示すソースプログラム図
。 第3図は本発明により論理的な条件判断を論理シンボル
で表現したソースプログラム図。 第4図はパターンジェネレータから発生されるパターン
の実施例。 第5図は拡大/縮小部で実行されるアンド図形の拡大/
縮小の実施例。 第6図は本発明のプログラムリストイメージ合成部の機
能を示す実施例図。 第7図は本発明のイメージメモリに格納される1ライン
分のイメージデータの格納方式を示す図である。 1・・・ソースファイル。 2・・・コンパイラ。 3・・・構造解析情報。 4・・・条件判断解析情報。 5・・・オブジェクトファイル。 6・・・ライン変更情報。 7・・・プリントイメージ制御部。 8・・・パターン要求。 9・・・パターンジェネレータ。 10・・・イメージデータ。 11・・・拡大/縮小要求信号、 12・・・拡大/縮小部。 13・・・プログラムリスト。 14・・・アドレスデータ。 15・・・ライト要求信号。 16・・・拡大/縮小されたイメージデータ。 17・・・プログラムリスト/イメージデータ合成部。 18・・・1ラインイメージデータ。 19・・・イメージデータ。 20・・・最終的なリスト。 2.1・・・CRT制御部。 22・・・CRT。 23・・・プリンタ制御部。 24・・・プリンタ。 特許 出願人   カシオ計算機株式会社1−−−ソー
スファイlし 2−−コンハ9イラ 3−71:4解杵清報 4−−−talJ彦v解ff+1iliL甘−1フ゛ジ
、71−フマイ1V ら−−−ライン吹史楕報 7−−−ブリントイメー:/″争“1すP含28−一−
バ7−ン*に− ?−−−、マターー/シ゛2ネレー9 10−−−イメージ千゛−タ 13−一−アロブラへリスト 14−−一7ドレス〒°−タ 15−−−ライト季セ゛イ書号 16−−−オ瓜入/摘1)・2れr;イメージ千−22
0−9本も917な嘩Iスト zl−CRT剣御部 22−−−CRT 第1図 (C) (ω 第4図 *sVA 第6図 第7因
FIG. 1 is a block diagram showing the configuration of a list generation device according to the present invention. Figure 2 (a) is the original text of the source program. FIG. 2(b) is a source program in which arrow symbols are added to the source program of FIG. 2(a) in order to make the structure easier to see, according to the present invention. FIG. 2(C) is a source program diagram showing the result of a source program in which condition judgment is visualized according to the present invention. FIG. 3 is a source program diagram expressing logical condition judgments using logical symbols according to the present invention. FIG. 4 shows an example of a pattern generated by a pattern generator. Figure 5 shows the enlargement/reduction of the AND figure executed in the enlargement/reduction section.
Example of reduction. FIG. 6 is an embodiment diagram showing the functions of the program list image synthesis section of the present invention. FIG. 7 is a diagram showing a storage method for one line of image data stored in the image memory of the present invention. 1... Source file. 2...Compiler. 3... Structural analysis information. 4...Condition judgment analysis information. 5...Object file. 6...Line change information. 7...Print image control section. 8...Pattern request. 9...Pattern generator. 10...Image data. 11... Enlargement/reduction request signal, 12... Enlargement/reduction unit. 13...Program list. 14...Address data. 15...Write request signal. 16... Enlarged/reduced image data. 17...Program list/image data synthesis section. 18...1 line image data. 19...Image data. 20...Final list. 2.1...CRT control section. 22...CRT. 23...Printer control unit. 24...Printer. Patent Applicant: Casio Computer Co., Ltd. 1 --- Source file 2 --- Konha 9 Ira 3-71:4 Kaiseki Kiho 4 --- tal J Hiko v Kazu ff + 1iliL sweet 1 page, 71-Fumai 1 V et al. ---Line blow history report 7---Blint image: /"Contest" 1P included 28-1-
Ban7-ban*ni-? ---, Matter/Sheet 2 Nere 9 10---Image 13-1-Alobra list 14--17 Dress〒°-ta 15--Light season number 16--O Melon entry/picking 1)・2rer; Image Sen-22
0-9 is also 917 fights zl-CRT sword control section 22 ---CRT Fig. 1 (C) (ω Fig. 4 * sVA Fig. 6 7th cause

Claims (1)

【特許請求の範囲】 1)プログラムをリストする装置において、前記プログ
ラムの情報を元にプログラムの内容をパターン化して発
生するパターン発生手段を有することを特徴とするプロ
グラムのリスト発行装置。 2)ソースプログラムを入力しオブジェクトプログラム
を作成するコンパイラを含む計算機システムにおいて、
前記コンパイラから出力される前記ソースプログラムの
構造解析情報及び条件判断解析情報等を使って、前記コ
ンパイラから出力される前記ソースプログラムのリスト
に付加して前記ソースプログラムの構造或いは条件判断
を視覚的に理解しやすくするイメージ情報を発生する手
段と、前記発生手段と前記コンパイラとに接続され、前
記ソースプログラムのリストと前記イメージ情報を合成
する手段とを有し、前記計算機システムの周辺装置に、
前記ソースプログラムのリストを出力する場合に前記イ
メージ情報を付加して表示することを特徴とするプログ
ラムのリスト発行装置。 3)前記コンパイラから出力される構造解析情報及び条
件判断解析情報を入力し、前記コンパイラにライン変更
情報を与えるとともに、前記イメージ情報を前記ソース
プログラムのリストに付加するために、前記イメージ情
報を出力するための制御を実行するプリントイメージ制
御部と、前記プリントイメージ制御部からパターン要求
が出された時にパターンを出力するパターンジェネレー
タと、前記プリントイメージ制御部から拡大/縮小要求
が出された時に前記パターンジェネレータからのイメー
ジデータを拡大/縮小する拡大/縮小回路部と、前記プ
リントイメージ制御部から書込みアドレス及び書込み用
のライト要求が出された時に前記拡大/縮小回路部から
のイメージデータを書込んで格納するイメージメモリと
、前記イメージメモリの出力情報と前記コンパイラから
出力される前記ソースプログラムのリストとを合成する
プログラムリストイメージデータ合成部と、前記プログ
ラムリストイメージデータ合成部に接続される出力装置
とからなることを特徴とする特許請求の範囲第2項記載
のプログラムのリスト発行装置。 4)前記イメージ情報発生手段は前記条件判断解析情報
に基づいて、矢印と矢印を結ぶ線とからなるパターン情
報を発することを特徴とする特許請求の範囲第2項記載
のプログラムのリスト発行装置。 5)前記イメージ情報発生手段は前記構造解析情報に基
づいて、入出力信号と論理記号を示す図形とからなるパ
ターン情報を発生することを特徴とする特許請求の範囲
第2項記載のプログラムのリスト発行装置。
Claims: 1) An apparatus for issuing a list of programs, characterized in that the apparatus includes a pattern generation means for generating a pattern by generating a pattern from the contents of the program based on the information of the program. 2) In a computer system that includes a compiler that inputs a source program and creates an object program,
Using the structure analysis information and condition judgment analysis information of the source program output from the compiler, add it to the list of the source programs output from the compiler to visually understand the structure or condition judgment of the source program. a peripheral device of the computer system, comprising: means for generating image information to facilitate understanding; and means connected to the generating means and the compiler, for synthesizing the source program list and the image information;
A program list issuing device characterized in that when outputting the source program list, the image information is added and displayed. 3) Inputting structural analysis information and condition judgment analysis information output from the compiler, providing line change information to the compiler, and outputting the image information in order to add the image information to the list of the source program. a pattern generator that outputs a pattern when a pattern request is issued from the print image control section; and a pattern generator that outputs a pattern when an enlargement/reduction request is issued from the print image control section; an enlargement/reduction circuit section for enlarging/reducing the image data from the pattern generator; and writing the image data from the enlargement/reduction circuit section when a write address and a write request for writing are issued from the print image control section. an image memory stored in the image memory, a program list image data synthesis section that synthesizes output information of the image memory and the source program list output from the compiler, and an output device connected to the program list image data synthesis section. A program list issuing device according to claim 2, comprising: 4) The program list issuing device according to claim 2, wherein the image information generating means generates pattern information consisting of arrows and lines connecting the arrows based on the condition judgment analysis information. 5) The list of programs according to claim 2, wherein the image information generating means generates pattern information consisting of input/output signals and figures representing logical symbols based on the structural analysis information. Publishing device.
JP19890785A 1985-09-09 1985-09-09 Issuing device for list of program Pending JPS6258335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19890785A JPS6258335A (en) 1985-09-09 1985-09-09 Issuing device for list of program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19890785A JPS6258335A (en) 1985-09-09 1985-09-09 Issuing device for list of program

Publications (1)

Publication Number Publication Date
JPS6258335A true JPS6258335A (en) 1987-03-14

Family

ID=16398926

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19890785A Pending JPS6258335A (en) 1985-09-09 1985-09-09 Issuing device for list of program

Country Status (1)

Country Link
JP (1) JPS6258335A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63245521A (en) * 1987-03-31 1988-10-12 Hitachi Software Eng Co Ltd Program nest discriminating and displaying system
US5147070A (en) * 1990-03-23 1992-09-15 Yamato Kakozai Co., Ltd. Pouring plug for a container having a tubular blade
JP4866234B2 (en) * 2003-04-14 2012-02-01 テトラ ラバル ホールデイングス エ フイナンス ソシエテ アノニム How to produce a packaging laminate

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63245521A (en) * 1987-03-31 1988-10-12 Hitachi Software Eng Co Ltd Program nest discriminating and displaying system
US5147070A (en) * 1990-03-23 1992-09-15 Yamato Kakozai Co., Ltd. Pouring plug for a container having a tubular blade
JP4866234B2 (en) * 2003-04-14 2012-02-01 テトラ ラバル ホールデイングス エ フイナンス ソシエテ アノニム How to produce a packaging laminate

Similar Documents

Publication Publication Date Title
JP4007562B2 (en) Programming support method and apparatus
JPH0640302B2 (en) Schematic / source program automatic generation method
JPS6258335A (en) Issuing device for list of program
Detmer Introduction to 80x86 assembly language and computer architecture
Johnson INR: A program for computing finite automata
JPS59186020A (en) Data transfer controlling system
JPH06274333A (en) Input support method and editing support method for program
JPH0863369A (en) Optimization information output system
Jacob A visual programming environment for designing user interfaces
Burgess C programming tutorial
Whiting et al. Microprocessors in CRT terminals
JPS6142296B2 (en)
JPH0258126A (en) Program design cad device
Mano et al. An intelligent multi-display terminal system towards: a better programming environment
Brown SUPERMAC—a macro facility that can be added to existing compilers
JPS58215692A (en) Copy indication system
JP2001022808A (en) Logic circuit reducing device, method and device for logic simulation
Salomon et al. Advanced Introduction
Green et al. An easily-implemented language for computer control of complex experiments
JPS60100226A (en) Test processor for tree structure chart
Barach et al. NPP: An easy to implement preprocessor for text formatting
Queinnec Literate programming from Scheme to TeX
KROMMES The WEB System of Structured Software Design and Documentation for C, C++, Fortran, Ratfor, and TEX User Manual
JPH05197589A (en) Automatic generation system of test program
Denhaa Design environments and the user interface for CAD of control systems