JP2696210B2 - Displaying execution trace of logical language program - Google Patents

Displaying execution trace of logical language program

Info

Publication number
JP2696210B2
JP2696210B2 JP62063993A JP6399387A JP2696210B2 JP 2696210 B2 JP2696210 B2 JP 2696210B2 JP 62063993 A JP62063993 A JP 62063993A JP 6399387 A JP6399387 A JP 6399387A JP 2696210 B2 JP2696210 B2 JP 2696210B2
Authority
JP
Japan
Prior art keywords
predicate
information
execution
display
pointer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP62063993A
Other languages
Japanese (ja)
Other versions
JPS63231543A (en
Inventor
正 広瀬
和夫 中尾
啓子 品田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP62063993A priority Critical patent/JP2696210B2/en
Priority to US07/156,459 priority patent/US4943968A/en
Publication of JPS63231543A publication Critical patent/JPS63231543A/en
Application granted granted Critical
Publication of JP2696210B2 publication Critical patent/JP2696210B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラムの実行トレースに関し、特に、
論理型言語で記述されたプログラムの実行トレースの表
示に関する。 〔従来の技術〕 一般に、プログラムの実行トレースは、デバツグ作業
の支援のために行なわれるものであり、したがつて、プ
ログラムのどの部分が目下実行中なのかを、表示された
トレース情報からいつでも容易に把握できることが望ま
れる。従来における論理型言語プログラムの実行トレー
スの表示は、項の制御点、例えは、呼出し(CALL)、再
呼出し(REDO)、成功終了(EXIT)、及び失敗終了(FA
IL)のどれを通過したかを、実行対象の述語、項等と供
に、文字列により順次羅列的に表示するものである(W.
F.Clockskin,C.S.Mellish原著、中村克彦訳「Prologプ
ログラミング」マイクロソフトウエア社1983年発行参
照)。 第11図は、後述する第4図のPrologプログラムについ
て、従来技術に属する形式の実行トレース表示の例を示
す。この例では、制御点の種別として、前記の4点に加
えて、それらの特別な場合であるユニフイケーシヨン呼
出し(UCALL)、ユニフイケーシヨン再呼出し(URED
O)、ユニフイケーシヨン成功終了(UEXIT)及びユニフ
イケーシヨン失敗終了(UFAIL)が用いられている。文
の先頭項(頭部項)については、先に述べた制御点種別
の代りに、これらの追加された制御点種別が用いられ
る。第11図において、左端の数字は述語のレベルを示
し、その右の欄は通過した前記8種類の制御点の一つを
示し、その更に右の欄は、実行対象の項その他を示す。
例えば、第4行は、述語rの試行を要求する項r(2,
X)がCALL点を通過したことを示し、第5行は、この述
語r中の文r(1,X):−s(X)の先頭項r(1,X)が
UCALL点を通過したことを示し、第6行は、この項がUFA
IL点を通過したことを示し、第7行は述語rの次の文r
(2,X):−t(X),s(X)の先頭項r(2,X)がUCAL
L点を通過したことを示し、第8行は、この項がUEXIT点
を通過したことを示し、そして、第9行は、この文の第
2項t(X)がCALL点を通過し、したがつて、述語tが
次に試行されることを示す。 論理型言語のプログラムの各項を箱形図形で囲んで表
示し、この箱形図形の四辺を用いて各項に対する呼出し
の変化や過去の実行状態を表現することは、既に提案さ
れている(特開昭62−55739号及び特開昭62−57033
号)。しかし、これらの提案は、実行トレースの表示に
までは及んでいない。 〔発明が解決しようとする問題点〕 第11図に示されるような従来の実行トレース表示は、
情報量については十分である。しかし、プログラムのど
の部分が実行中かをその表示から把握することは、決し
て容易ではない。加えて、論理型言語のプログラムで
は、バツクトラツキングが頻発するため、単に現在の実
行点が指摘できるだけでは足りず、そこに至るまでの経
緯も把握できることが必要であるが、これは一層困難で
ある。 通常、プログラマは、言語仕様の許す範囲で、字下
げ、改行、注釈の挿入などにより、なるべく理解し易い
形式でプログラムを記述し、そして、この特定の記述形
式でそのプログラムを理解している。したがつて、第11
図に示されるような形式のトレース表示を参照しながら
デバツグを行なう場合に、多くのプログラム作成者は、
自分が記述したとおりの形式のプログラムソースリスト
出力を別に用意し、このプログラムソースリスト上にお
ける現在の実行点とそこに至る経緯とを、第11図のよう
なトレース情報から推察・判断することを余儀なくされ
る。この推考・判断のための労力が、デバツグの効率の
向上を妨げていた。 本発明の目的は、論理型言語のプログラムにおける現
在の実行点とそこに至る経緯が把握し易い形式の実行ト
レース表示を提供し、それにより、前述した推考・判断
のための労力を軽減して、デバツグの効率の向上に資す
ることにある。 〔問題点を解決するための手段〕 本発明は、処理中の少なくとも一つの述語のプログラ
ムソースリストを表示するステツプと、この表示された
プログラムソースリスト上に、この述語の最新の実行状
態を、図式で表示するステツプとを有する。 〔作用〕 前記諸ステツプの結果、処理中の述語が、プログラム
作成時の記述形式で表示され、かつ、このような形式の
表示上に、この述語がどのような実行状態に達している
かが、簡潔に図式表示される。例えば、各項が到達して
いる実行状態が、呼出し、再呼出し、呼出し後の成功終
了又は失敗終了、あるいは再呼出し後の成功終了又は失
敗終了のいずれであるのかが、その項を囲む箱形図形の
辺と頂点の一つによつて示される。したがつて、プログ
ラマは、自分の理解し易い形式で示されたプログラム上
で諸項の図式表示された実行状態をたどることにより、
現在の実行点とそこに至る経緯を容易に把握することが
できる。 〔実施例〕 第2図は、本発明の一実施例を実行するためのデータ
処理装置の一例を示す。この装置は、中央処理装置1,主
メモリ2,補助メモリ3,CRT表示装置4,キーボード5,及び
それらを結合するバス6からなる。 第3図は、第2図に示された装置のためのソフトウエ
ア構成の一例を示す。図において、実線は被処理情報の
伝達を表わし、点線は起動の制御を表わす。このソフト
ウエアは、主メモリ2内に用意される。制御部31は、キ
ーボード5から入力される問合せ情報とユーザプログラ
ム読込み指示を、推論部34と入力部32にそれぞれ渡し、
それらを起動する。入力部32は、ユーザプログラム読込
み指示に従つて、補助メモリ3に格納されているユーザ
プログラムをデータエリア33に読込む。データエリア33
は、ユーザプログラムをその実行期間中保持するととも
に、推論及び実行トレース表示の実行に必要な各種の情
報を保持する。推論部34は、問合せ情報に応答して、デ
ータエリア33を参照しながら、推論を実行する。トレー
ス表示部35は、推論部34から与えられる推論情報と、デ
ータエリア33内の情報を処理して、推論実行状態、すな
わち実行トレース情報を、CRT表示装置4上に表示す
る。 予め、ユーザはユーザプログラムを作成し、補助メモ
リ3に格納しておく。第4図には、Prologで記述された
ユーザプログラムの一例が示されている。第4図におい
て、文ないしがユーザプログラムを構成する。Prol
ogプログラムは、通常、規則文と事実文からなる。文
ないしは規則文であり、文ないしは事実文であ
る。例えば、規則文は、r(2,X)で示される事実が
真であればp(X)で示される事実は真であるという規
則を表わし、事実文は、t(a)で示される事実が真
であるという事実を表わす。文の先頭項の名称とその引
数の個数を同じくする文の集合を述語と呼ぶ。例えば、
文ないしは一つの述語を構成し、その名称はrで、
引数の個数は2である。述語の名称と引数の個数を併せ
て述語名と呼び、この用語は後記の説明中に用いられて
いる。 ユーザは、文ないしからなるプログラムを補助メ
モリから読込むようにシステムに指示した後、文のよ
うな形式の問合せ情報を、キーボード5を介して投入す
る。文は、p(X)で示される事実は真であるか否か
という問合せを表わす。システムは、この問合せに対し
て、に示されるような形式の応答を出力する。この応
答は、問題の事実がX=aのときに真であるという趣
旨のものである。 問合せ情報から応答を生成する処理は、推論部34によ
り行なわれる。しかし、本発明の対象は、応答生成処理
それ自体でなく、推論部34の実行過程の表示であり、そ
れはトレース表示部35により行なわれる。それゆえ、推
論部34による応答生成処理の詳細な説明は省略し、トレ
ース表示部34によるトレース表示過程を以下に詳述す
る。 まず、トレース表示過程で利用されるデータエリア33
の情報の部分を説明する。第5図に示されるように、デ
ータエリア33は、名前表51と、表示スタツク52と、スタ
ツクポインタエリア53と、ヒープエリア54を含む。名前
表51は、前述した述語名(述語の名称と引数の個数)の
それぞれについて、関連情報へのポインタを保持するテ
ーブルである。各述語名に1個のレコードが割当てら
れ、各レコードは、述語名称フイールド511、テキスト
情報ポインタフイールド512、位置情報ポインタフイー
ルド513、及び木構造情報ポインタフイールド514からな
る。 ピープエリア54は、前記のポインタが指す木構造情報
541、位置情報542、及びテキスト情報543を保持する。
本構造情報541は、ユーザプログラム中の各文の木構造
を表わす情報である。この情報は、各文を構文解析する
ことにより得られ、主に推論部34により使用される。テ
キスト情報543は、ユーザプログラムをユーザがそれを
記述したとおりの形式で表現する情報であり、それがCR
T上に表示されると、ユーザが記述した形式におけるユ
ーザプログラム、すなわちプログラムソーステキストが
表示される。位置情報542は、プログラムソーステキス
ト(以下テキストと略称する)中の各文の各項の表示画
面上における位置を示す情報である。 第6図(a)は、位置情報542の詳細を、その一部に
ついて示す。各文に対応して1個の文ノード(61,62)
が設けられ、各文中の各項に対応して1個の項ノード
(63〜67)が設けられる。文ノードは2個のポインタか
らなり、第1のポインタは対応する文の先頭項に対応す
る項ノードのアドレスを指し、第2のポインタは同じ述
語に属する次の文に対応する文ノードのアドレスを指
し、最後の文に対応する文ノードの第2ポインタには0
が設定される。名前表51(第5図)中の各レコードの位
置情報フイールド513の内容は、対応する述語の先頭文
に対応する文ノードのアドレスを指す。各項ノードは、
1個のポインタと4個の位置情報からなる。このポイン
タは、同じ文中の次の項に対応する項ノードのアドレス
を指し、最後の項に対応する項ノードにおいては0に設
定される。各項ノードの4個の位置情報は、テキストが
表示された場合に、対応する項が表示されるべきCRT画
面上の位置(第6図(b)参照)を示す。 第6図は、第4図に示されたプログラムにおける、述
語名r(引数個数2)に対応する位置情報の一部を例示
したものである。この述語は、3個の文〜からな
り、文ノード61は第1の文に対応し、文ノード62は第
2の文に対応する。第1文は2個の項r(1,X)と
s(X)からなり、これらの項は、項ノード63と64にそ
れぞれ対応する。第2文は3個の項r(2,X)とt
(X)とs(X)とからなり、これらの項は、項ノード
65と66と67にそれぞれ対応する。項ノード67の4個の位
置情報x1,x2,y1,y2は、第6図(b)に示されるよう
に、CRT画面68上で対応する項s(X)を囲う箱形図形6
9の位置を示す。 第7図は、表示スタツク52とスタツクポインタエリア
53の詳細を示す。表示スタツク52は、スタツクとして機
能する記憶領域であつて、推論部34での実行過程を表示
の制御のために記録する。表示スタツク52の各レコード
は、呼出された各述語に対応し、次の6個のフイールド
からなる。 pidフイールド71: 当該述語名に対する名前表51中のレコードの番号(述
語名識別子pid)を格納するフイールド ppフイールド72: 呼出元述語に対応する表示スタツク52中のレコードへ
のポインタ(親ポインタpp)を格納するフイールド clpフイールド73: 当該述語の位置情報542における実行中の文に対応す
る文ノードへのポインタ(文ポインタclp)を格納する
フイールド glpフイールド74: 当該述語の位置情報542における実行中の項に対応す
る項ノードへのポインタ(高ポインタglp)を格納する
フイールド kdフイールド75: 当該述語に関して推論部34から送られた最新の制御点
種別を格納するフイールド fpフイールド76: ソーステキストの当該述語の部分のCRT表示のために
割当てられた出力ウインドウのフアイル番号を格納する
フイールド スタツクポインタエリア53には、カレントポインタ
(CP)77と空ポインタ(EP)78が格納される。カウント
ポインタ77は、現在実行中の述語に対応する表示スタツ
ク52中のレコードのアドレスを指し、空ポインタ78は、
表示スタツク52の空きエリアの先頭アドレスを指す。 推論部34は、各項について、その8個の制御点(CAL
L,EXIT,REDO,FAIL,UCALL,UEXIT,UREDO,UFAIL)のいずれ
かが実行された時点で、その述語名と制御点種別を推論
制御情報としてトレース表示部35に渡して、これを起動
する。トレース表示部35は、起動されると、第8図に示
されるように、制御点表示処理81とスタツク処理82を行
ない、次いで、制御点種別がCALL又はREDOの場合に、テ
キスト表示処理83又はテキスト再表示処理84をそれぞれ
行なう。制御点表示処理81は、処理された項がどの型の
制御点を通過したかを、カレントポインタ77(第7図)
が指す表示スタツクレコード(以下カレントレコードと
いう)又はそのレコードのppフイールドが指すレコード
(以下親レコードという)の内容と、推論部34からの制
御点種別情報とに基づいて、テキスト上に表示する。ス
タツク処理82は、次の処理結果の表示に備えて、表示ス
タツク52と両ポインタ77,78を、推論部からの制御点種
別情報に応じて更新する。テキスト表示処理83は、CALL
処理の結果として次に処理される述語のテキストを表示
し、テキスト再表示装置84は、REDO処理の結果として次
に処理のやり直しが行なわれる述語のテキストを表示し
直す。次にこれらの処理の詳細を説明するが、便宜上、
スタツク処理82を最初に説明する。 第9図は、スタツク処理82をやや詳細に示すフローチ
ヤートである。まず、推論部34から受取つた推論制御情
報中の制御点種別が判別される(処理900)。制御点種
別がCALLであれば、次のような処理901〜904が行なわれ
る。 (1)カレントポインタ77が指すレコード(カレントレ
コード)のkdフイールドに“CALL"を設定する(901)。 (2)空ポインタ78に指すレコード位置に新しいレコー
ドを作成し、その諸フイールドの値を次のように設定す
る(902)。 pid=推論制御情報中の述語名に対応する述語名識別子
(なお、述語名と述語名識別子の対応を示すテーブルは
予め用意されている) pp=カレントポインタ77の値 clp=前記pidが指す名前表レコード中の位置情報ポイン
タフイールド513の値、すなわち、対応する述語の最初
の文ノードのアドレス glp=前記clpが指す文ノードの第1ポインタの値、すな
わち、先頭項ノードのアドレス kd=設定無し fp=この述語に新しく割当てられた出力ウインドウのフ
アイル番号 (3)カレントポインタ77に空ポインタ78の値を設定す
る(903)。 (4)空ポインタ78の値を1レコード分だけ増加して、
空エリアの新先頭アドレスを指すようにする(904)。 制御点種別がEXITであれば、次のような処理905と906
が行なわれる。 (1)カレントレコードのppフイールドが指すレコード
(親レコード)のglpフイールドを、次の項ノードを指
すように変更する(905)。詳述すれば、親レコードglp
値が0でなければ、それが指す項ノードのポインタ値
(同じ文の次の項ノードのアドレス)を、このglpフイ
ールドに設定する。ただし、親レコードのglp値が0で
あれば、このレコードのclp値が指す文ノードの第2ポ
インタ(次の文ノードのアドレス)を取出して、それを
このclpフイールドに設定し、そして、glpフイールドに
は、この新clp値が指す文ノードの第1ポインタの値を
設定して、その文の先頭項ノードを指すようにする。 (2)カレントポインタ77の値を、それが現在指してい
るレコードのppフイールドの値(親レコードのアドレ
ス)に設定する(906)。 制御点種別がREDOであれば、次のような処理907と908
が行なわれる。 (1)カレントレコードのkdフイールドに“REDO"を設
定する(907)。 (2)空ポインタ78が指す位置からカレントポインタ77
が指す位置まで順にさかのぼつて、カレントポインタの
値をppフイールドに持つレコードを探し、このレコード
を指すようにカレントポインタの値を変更する(90
8)。 制御点種別FAILであれば、次のような処理909〜912が
行なわれる。 (1)カレントレコードのfpフイールドが示すウインド
ウを消去する(909)。 (2)親レコードのglpを、一つ前の項ノードを指すよ
うに変更する(910)。なお、FAILが生じる時、親レコ
ードのglpが先頭項ノードを指していることはない。 (3)カレントポインタ77の値を、カレントレコードの
pp値に設定し、親レコードを指すようにする(911)。 (4)空ポインタ78の値を、カレントポインタ77の旧値
に設定する(912)。 制御点種別がUCALLであれば、カレントレコードのkd
フイールドに“CALL"を設定する(913)。 制御点種別がUEXITであれば、カレントレコードのglp
値を、それが指す項ノードのポインタの値、すなわち、
同じ文の次の項ノードのアドレスに変更する(914)。
もしも現glpが最後の項ノードを指していれば、その項
ノードのポインタ値は0であり、したがつて、glp値は
0に設定される。 制御点種別がUREDOであれば、カレントレコードのkd
フイールドに“REDO"を設定する(915)。 制御点種別がUFAILであれば、カレントレコードのclp
値を、それが指す文ノードの第2ポインタの値、すなわ
ち、次の文ノードのアドレスに変更し、かつ、glp値
を、新clp値が指す文ノードの第1ポインタの値、すな
わち、この文の先頭項ノードのアドレスに変更する(91
6)。 以上のようなスタツク処理の後では、カレントポイン
タは、次の処理対象として通常予想される項ノードと、
それが前回にCALL又はREDOを通過したか否かを示す。た
だし、次に推論部から受取る制御点種別がEXIT又はFAIL
の場合は、親レコードが対象項ノードとその前回の制御
点種別を示す。 次に、制御点表示処理81を説明する。第10図は、この
処理81をやや詳細に示すフローチヤートである。まず、
推論部34から受取つた推論制御情報中の制御点種別が判
別される(100)。制御点種別がCALL又はUCALLであれ
ば、カレントレコードのglpフイールドが指す項ノード
中の位置情報(x1,x2,y1,y2)に従つて、表示画面上
で、対応する項を囲む箱形図形の左上頂点を点滅表示す
る(101)。 制御点種別がEXIT又はUEXITであれば、まず、前回の
制御点種別を調べる(102)。前回の制御点種別は、EXI
Tの場合には親レコード(カレントレコードのppフイー
ルドが指すレコード)のkdフイールドに記録されてお
り、UEXITの場合にはカレントレコードのkdフイールド
に記録されている。前回制御点種別がCALLであれば、対
応する項を囲む箱形図形の上辺を太線表示し(103)、
前回制御点種別がREDOであれば、この箱形図形の右辺を
太線表示する(104)。この箱形図形の位置は、EXITの
場合は親レコード、UEXITの場合はカレントレコード
の、glpフイールドが指す項ノード中の位置情報により
指定される。 制御点種別がREDO又はUREDOならば、カレントレコー
ドのglpフイールドが指す項ノード中の位置情報に従つ
て、対応する項を囲む箱形図形の右下頂点を点滅表示す
る(105)。 制御点種別がFAIL又はUFAILであれば、まず、前回制
御点種別を調べ(106)、それがCALLであれば、対応す
る項を囲う箱形図形の左辺を太線表示し(107)、REDO
であれば、この箱形図形の下辺を太線表示する(10
8)。前項制御点の種別と箱形図形の位置は、FAILとUFA
ILのときと同様に、EXITの場合は親レコードから得ら
れ、UEXITの場合はカレントレコードから得られる。 テキスト表示処理83においては、推論部34から受けた
制御点種別がCALLであつたことに応答して、まず、カレ
ントレコード(第9図の処理902により作成されたレコ
ード)のfpフイールドを参照して画面上に新しいウイン
ドウを作る。次いで、pidフイールドが指す名前表レコ
ードを調べて、そのテキスト情報ポインタ512が指すテ
キスト情報を、テキスト情報543から選択し、前ウイン
ドウに表示する。 テキスト再表示処理84においては、推論部から受けた
制御点種別がREDOであつたことに応答して、カレントレ
コード(第9図の処理908により更新されたカレントポ
インタが指すレコード)のpidフイールドが指す名前表
レコードを調べ、そのテキスト情報ポインタ512を指す
テキスト情報を、fpフイールドが示すウインドウに再度
表示する。 以上に述べた実施例では、CALL及びREDOの結果呼出さ
れるすべての述語のテキストが表示される。しかし、ユ
ーザが指定した述語のテキストのみを表示するように変
更してもよい。それには、例えば、述語名と述語名識別
子(pid)の対応テーブルに、表示の要否を示すユーザ
の設定可能なフラグを付加し、これに従つてテキストの
表示を制御すればよい。 第1図(a)は、第4図のプロプログラムに対する第
11図と同じトレースを、前記の実施例により表示したCR
T画面の一例を示す。ただし、この例では、述語tとs
とuのテキスト表示は抑止されている。第1図(b)
は、前述した制御点の表示形式を総覧的に示す。第1図
(a)において、CRT画面10上に出力ウインドウ11と12
が開かれている。第11図の第1行のCALLにおいて出力ウ
インドウ11に述語pのテキストが表示され、次のUCALL
において先頭項p(X)にCALLが表示され、次のUEXIT
においてそれはCALL−EXITに変わる。第4行のCALLにお
いて、述語pの文の第2項r(2,X)にCALLが表示され
るとともに、出力ウインドウ12に述語rのテキストが表
示され、次のUCALLにおいて第1文の先頭項r(1,X)に
CALLが表示される。その後、第6行のUFAILにおいてこ
の先頭項の表示はCALL−FAILに変り、第8行のUEXITに
おいて述語rの第2文の先頭項にCALL−EXITが表示さ
れ、次のCALLにおいて第2文の第2項t(X)にCALLが
表示される。この時に、もしも抑止されていなければ、
述語tのテキストが新しいウインドウに表示されること
になる。第12行のEXITにおいて第2文の第2項t(X)
にCALL−EXITが表示されて、最後の行のCALLにおいて第
2文の第3項s(X)にCALLが表示される。述語sのテ
キスト表示は抑止されている。 図示された現在の画面の視察から、次のことが容易に
理解できる。すなわち、現在は述語rの処理中で、目下
の実行点は項s(X)のCALL点であること、この実行点
に至るまでに、述語rの第1文の第1項を失敗終了し、
第2文の第1項と第2項を成功終了したこと、したがつ
て、この項s(X)に制御が渡るのは始めてであるこ
と、である。 本実施例では、トレース表示部35専用の表示スタツク
52が設けられているが、推論部34が使用する推論実行用
スタツクにトレース表示制御用の領域を付加し、ここに
表示スタツク52に格納すべき情報を格納して、このスタ
ツクをトレース表示部35と共用してもよい。また、最初
から全部の項を箱形図形で囲んで表示して、制御点を点
滅、太線表示その他で強調表示してもよいし、あるい
は、未実行の項に対しては箱形図形を表示せずに、実行
された項に対する制御点の表示のみを行なつてもよい。
制御点の表現形式も、前記の実施例に限られず、各項の
周囲に表示しうる任意のシンボルを利用できる。 〔発明の効果〕 本発明によれば、論理型言語プログラムにおける現在
のプログラム実行点とそこに到る各点の実行状態が、プ
ログラマが記述したままの形式のソースリスト上に、直
観的に理解しやすい形式で表示される。したがつて、普
通ならば把握の困難な論理型言語プログラムの実行過程
を、容易に把握することができ、その結果、デバツギン
グ効率の著しい改善が期待できる。
Description: TECHNICAL FIELD The present invention relates to an execution trace of a program, in particular,
The present invention relates to displaying an execution trace of a program described in a logical language. [Prior Art] Generally, the execution trace of a program is performed to assist a debugging operation, and therefore, which part of the program is currently being executed can be easily determined at any time from the displayed trace information. It is desirable to be able to grasp it. Conventionally, the execution trace of a logical language program is displayed at the control points of terms, for example, call (CALL), recall (REDO), successful end (EXIT), and failed end (FA).
IL) are sequentially displayed in a character string, along with the predicates, terms, and the like to be executed.
F. Clockskin, originally written by CSMellish, translated by Katsuhiko Nakamura, “Prolog Programming”, published by Microsoftware 1983). FIG. 11 shows an example of execution trace display in a format belonging to the prior art, for the Prolog program of FIG. 4 described later. In this example, as the types of control points, in addition to the above-mentioned four points, those special cases, namely, the unification call (UCALL) and the unification recall (URED)
O), Unification Successful End (UEXIT) and Unification Failure Unsuccessful End (UFAIL). For the head term (head term) of the sentence, these added control point types are used instead of the control point types described above. In FIG. 11, the leftmost numeral indicates the level of the predicate, the right column indicates one of the eight types of control points passed, and the further right column indicates the item to be executed and the like.
For example, the fourth line shows that the term r (2,
X) has passed the CALL point, and the fifth line shows that the first term r (1, X) of the sentence r (1, X):-s (X) in this predicate r
Line 6 indicates that we have crossed the UCALL point.
The line 7 indicates that the statement has passed the IL point.
(2, X): the leading term r (2, X) of -t (X), s (X) is UCAL
Line 8 indicates that this point has passed the UEXIT point, line 8 indicates that this term has passed the UEXIT point, and line 9 indicates that the second term t (X) of this sentence has passed the CALL point, Thus, we indicate that the predicate t will be tried next. It has already been proposed to display each term of a program in a logical language by enclosing it in a box-shaped figure, and to express the change in the call for each term and the past execution state using the four sides of this box-shaped figure ( JP-A-62-55739 and JP-A-62-57033
issue). However, these proposals do not extend to displaying execution traces. [Problems to be Solved by the Invention] The conventional execution trace display as shown in FIG.
The amount of information is sufficient. However, it is not easy to know which part of a program is running from its display. In addition, since backtracking occurs frequently in logic language programs, it is not enough to simply point out the current execution point, and it is necessary to be able to grasp the process leading up to that point. is there. Usually, a programmer describes a program in a format that is as easy to understand as possible by indentation, line breaks, insertion of annotations, etc., as far as the language specification allows, and understands the program in this specific description format. Therefore, the eleventh
When performing debugging while referring to the trace display in the format shown in the figure, many program writers
Prepare a separate program source list output in the format you described, and infer and judge the current execution point on this program source list and the process leading to it from the trace information shown in Fig. 11. I will be forced. This effort to make inferences and judgments has hindered the improvement of debugging efficiency. An object of the present invention is to provide an execution trace display in a format in which a current execution point in a program of a logical language and a process leading to the current execution point can be easily grasped, thereby reducing the above-described effort for inference and judgment. And contribute to improving the efficiency of debugging. [Means for Solving the Problems] The present invention provides a step of displaying a program source list of at least one predicate being processed, and displaying the latest execution state of this predicate on the displayed program source list. And graphically displaying steps. [Operation] As a result of the above steps, the predicate being processed is displayed in a description format at the time of program creation, and on the display in such a format, the execution state of the predicate has been reached. It is represented in a simplified diagram. For example, whether the execution state that each item has reached is calling, recalling, successful or unsuccessful termination after the call, or successful or unsuccessful termination after the recall, is a box surrounding the item. It is indicated by one of the sides and vertices of the figure. Therefore, by following the graphically illustrated execution state of the various items on the program shown in a format that is easy for the programmer to understand,
The current execution point and the process leading to it can be easily grasped. Embodiment FIG. 2 shows an example of a data processing apparatus for executing an embodiment of the present invention. This device comprises a central processing unit 1, a main memory 2, an auxiliary memory 3, a CRT display device 4, a keyboard 5, and a bus 6 connecting them. FIG. 3 shows an example of a software configuration for the device shown in FIG. In the figure, a solid line represents transmission of information to be processed, and a dotted line represents control of activation. This software is prepared in the main memory 2. The control unit 31 passes the query information and the user program reading instruction input from the keyboard 5 to the inference unit 34 and the input unit 32, respectively.
Launch them. The input unit 32 reads the user program stored in the auxiliary memory 3 into the data area 33 according to the user program reading instruction. Data area 33
Holds the user program during its execution period and also holds various information necessary for executing inference and execution trace display. The inference unit 34 performs inference with reference to the data area 33 in response to the inquiry information. The trace display unit 35 processes the inference information given from the inference unit 34 and the information in the data area 33, and displays an inference execution state, that is, execution trace information on the CRT display device 4. The user creates a user program in advance and stores it in the auxiliary memory 3. FIG. 4 shows an example of a user program described in Prolog. In FIG. 4, a sentence or tag constitutes a user program. Prol
An og program usually consists of rules and facts. It is a sentence or rule sentence, and is a sentence or fact sentence. For example, a rule sentence indicates a rule that if the fact indicated by r (2, X) is true, the fact indicated by p (X) is true, and the fact sentence indicates the fact indicated by t (a). Represents the fact that is true. A set of statements having the same name of the first term in the statement and the number of arguments is called a predicate. For example,
Constructs a sentence or a predicate whose name is r,
The number of arguments is two. The predicate name and the number of arguments are collectively referred to as a predicate name, and this term is used in the description below. After instructing the system to read a program consisting of sentences or sentences from the auxiliary memory, the user inputs query information in the form of sentences through the keyboard 5. The statement represents a query as to whether the fact indicated by p (X) is true. The system outputs a response to the query in the format as shown in the following. This response is to the effect that the fact in question is true when X = a. The process of generating a response from the inquiry information is performed by the inference unit 34. However, the object of the present invention is not the response generation processing itself but the display of the execution process of the inference unit 34, which is performed by the trace display unit 35. Therefore, a detailed description of the response generation processing by the inference unit 34 is omitted, and the trace display process by the trace display unit 34 will be described in detail below. First, the data area 33 used in the trace display process
The information part will be described. As shown in FIG. 5, the data area 33 includes a name table 51, a display stack 52, a stack pointer area 53, and a heap area 54. The name table 51 is a table that holds a pointer to related information for each of the above-described predicate names (the predicate name and the number of arguments). One record is assigned to each predicate name, and each record is composed of a predicate name field 511, a text information pointer field 512, a position information pointer field 513, and a tree structure information pointer field 514. The peep area 54 is a tree structure information pointed to by the pointer.
541, position information 542, and text information 543 are held.
This structure information 541 is information representing the tree structure of each sentence in the user program. This information is obtained by parsing each sentence and is mainly used by the inference unit 34. The text information 543 is information that expresses the user program in the format as described by the user,
When displayed on T, a user program in a format described by the user, that is, a program source text is displayed. The position information 542 is information indicating the position on the display screen of each item of each sentence in the program source text (hereinafter abbreviated as text). FIG. 6A shows details of the position information 542 for a part thereof. One sentence node (61,62) corresponding to each sentence
Is provided, and one item node (63 to 67) is provided corresponding to each item in each sentence. The statement node consists of two pointers, the first pointer points to the address of the term node corresponding to the first term of the corresponding statement, and the second pointer is the address of the statement node corresponding to the next statement belonging to the same predicate. And the second pointer of the statement node corresponding to the last statement is 0
Is set. The contents of the position information field 513 of each record in the name table 51 (FIG. 5) indicates the address of the statement node corresponding to the first sentence of the corresponding predicate. Each term node is
It consists of one pointer and four pieces of position information. This pointer points to the address of the term node corresponding to the next term in the same sentence, and is set to 0 in the term node corresponding to the last term. The four pieces of position information of each item node indicate the position on the CRT screen where the corresponding item should be displayed when the text is displayed (see FIG. 6 (b)). FIG. 6 exemplifies a part of the position information corresponding to the predicate name r (the number of arguments 2) in the program shown in FIG. This predicate is composed of three sentences to, and the sentence node 61 corresponds to the first sentence, and the sentence node 62 corresponds to the second sentence. The first sentence consists of two terms r (1, X) and s (X), which correspond to term nodes 63 and 64, respectively. The second sentence is composed of three terms r (2, X) and t
(X) and s (X), and these terms are term nodes
They correspond to 65, 66 and 67 respectively. The four pieces of position information x 1 , x 2 , y 1 , y 2 of the term node 67 are represented by a box shape surrounding the corresponding term s (X) on the CRT screen 68 as shown in FIG. Figure 6
Indicates the position of 9. FIG. 7 shows the display stack 52 and the stack pointer area.
Shows 53 details. The display stack 52 is a storage area that functions as a stack, and records the execution process of the inference unit 34 for display control. Each record in the display stack 52 corresponds to each predicate called and consists of the following six fields. pid field 71: a field pp storing the record number (predicate name identifier pid) in the name table 51 for the predicate name; a field pp field 72: pointer to a record in the display stack 52 corresponding to the caller predicate (parent pointer pp) A field clp field 73 that stores a pointer to a statement node (statement pointer clp) corresponding to the statement being executed in the position information 542 of the predicate is a field glp field 74 that is executing in the position information 542 of the predicate. A field kd field 75 for storing a pointer (high pointer glp) to the term node corresponding to the term, a field fp field 76 for storing the latest control point type sent from the inference unit 34 regarding the predicate, and a predicate for the source text Field stack pointer area that stores the file number of the output window allocated for CRT display of the part The 53, current pointer (CP) 77 and an empty pointer (EP) 78 is stored. The count pointer 77 points to the address of the record in the display stack 52 corresponding to the currently executing predicate.
Indicates the start address of the empty area of the display stack 52. The inference unit 34 calculates, for each term, its eight control points (CAL
L, EXIT, REDO, FAIL, UCALL, UEXIT, UREDO, UFAIL), the predicate name and the control point type are passed to the trace display unit 35 as inference control information and activated. . When activated, the trace display unit 35 performs a control point display process 81 and a stack process 82 as shown in FIG. 8, and then, when the control point type is CALL or REDO, a text display process 83 or The text redisplay processing 84 is performed. The control point display processing 81 determines which type of control point the processed term has passed by using a current pointer 77 (FIG. 7).
Is displayed on the text based on the contents of the display stack record (hereinafter referred to as the current record) indicated by, or the record indicated by the pp field of the record (hereinafter referred to as the parent record), and the control point type information from the inference unit 34. . The stack processing 82 updates the display stack 52 and both pointers 77 and 78 according to the control point type information from the inference unit in preparation for displaying the next processing result. Text display processing 83, CALL
The text of the predicate to be processed next is displayed as a result of the processing, and the text redisplay device 84 redisplays the text of the predicate to be redone next as a result of the REDO processing. Next, details of these processes will be described.
The stack processing 82 will be described first. FIG. 9 is a flowchart showing the stack processing 82 in somewhat more detail. First, the control point type in the inference control information received from the inference unit 34 is determined (process 900). If the control point type is CALL, the following processes 901 to 904 are performed. (1) “CALL” is set in the kd field of the record (current record) pointed to by the current pointer 77 (901). (2) A new record is created at the record position indicated by the null pointer 78, and the values of its fields are set as follows (902). pid = predicate name identifier corresponding to the predicate name in the inference control information (a table indicating the correspondence between the predicate name and the predicate name identifier is prepared in advance) pp = the value of the current pointer 77 clp = the name indicated by the pid The value of the position information pointer field 513 in the table record, ie, the address glp of the first statement node of the corresponding predicate = the value of the first pointer of the statement node indicated by the clp, ie, the address kd of the first term node = not set fp = file number of the output window newly allocated to this predicate (3) The value of the empty pointer 78 is set to the current pointer 77 (903). (4) The value of the empty pointer 78 is increased by one record,
It points to the new start address of the empty area (904). If the control point type is EXIT, the following processes 905 and 906
Is performed. (1) The glp field of the record (parent record) indicated by the pp field of the current record is changed to point to the next term node (905). In detail, the parent record glp
If the value is not 0, the pointer value of the term node pointed to by it (the address of the next term node in the same statement) is set in this glp field. However, if the glp value of the parent record is 0, the second pointer of the statement node indicated by the clp value of this record (the address of the next statement node) is taken out and set in this clp field. In the field, the value of the first pointer of the statement node indicated by the new clp value is set so as to point to the first term node of the statement. (2) The value of the current pointer 77 is set to the value of the pp field (address of the parent record) of the record currently pointed to (906). If the control point type is REDO, the following processes 907 and 908
Is performed. (1) “REDO” is set in the kd field of the current record (907). (2) Starting from the position indicated by the empty pointer 78, the current pointer 77
Going back to the position indicated by, search for a record that has the current pointer value in the pp field, and change the current pointer value to point to this record (90
8). If the control point type is FAIL, the following processes 909 to 912 are performed. (1) The window indicated by the fp field of the current record is deleted (909). (2) Change the glp of the parent record to point to the previous item node (910). When a FAIL occurs, glp of the parent record does not point to the first term node. (3) The value of the current pointer 77 is
Set to pp value and point to parent record (911). (4) The value of the empty pointer 78 is set to the old value of the current pointer 77 (912). If the control point type is UCALL, kd of the current record
Set the field to “CALL” (913). If the control point type is UEXIT, the glp of the current record
The value is the value of the pointer of the term node it points to, that is,
Change to the address of the next term node in the same sentence (914).
If the current glp points to the last term node, the pointer value of that term node is zero, so the glp value is set to zero. If the control point type is UREDO, kd of the current record
Set the field to “REDO” (915). If the control point type is UFAIL, clp of the current record
Change the value to the value of the second pointer of the statement node to which it points, ie, the address of the next statement node, and replace the glp value with the value of the first pointer of the statement node to which the new clp value points, ie, this Change to the address of the first node of the statement (91
6). After the stack processing as described above, the current pointer includes the term node normally expected as the next processing target,
Indicates whether it passed CALL or REDO last time. However, if the control point type received from the inference unit is EXIT or FAIL
In the case of, the parent record indicates the target item node and its previous control point type. Next, the control point display processing 81 will be described. FIG. 10 is a flowchart showing the process 81 in a little more detail. First,
The control point type in the inference control information received from the inference unit 34 is determined (100). If the control point type is a CALL or UCALL, positional information in terms node pointed to glp field in the current record (x 1, x 2, y 1, y 2) in accordance connexion, on the display screen, the corresponding term The upper left vertex of the enclosing box-shaped figure blinks (101). If the control point type is EXIT or UEXIT, first, the previous control point type is checked (102). The last control point type was EXI
In the case of T, it is recorded in the kd field of the parent record (the record pointed to by the pp field of the current record), and in the case of UEXIT, it is recorded in the kd field of the current record. If the previous control point type was CALL, the upper side of the box-shaped figure surrounding the corresponding item is displayed as a bold line (103),
If the previous control point type is REDO, the right side of this box-shaped figure is displayed as a bold line (104). The position of this box-shaped figure is specified by the position information in the term node indicated by the glp field of the parent record in the case of EXIT and the current record in the case of UEXIT. If the control point type is REDO or UREDO, the lower right vertex of the box-shaped figure surrounding the corresponding item is blinked according to the position information in the item node indicated by the glp field of the current record (105). If the control point type is FAIL or UFAIL, the previous control point type is checked first (106). If it is CALL, the left side of the box-shaped figure surrounding the corresponding item is displayed as a bold line (107) and REDO is displayed.
If so, display the bottom side of this box-shaped figure as a bold line (10
8). The control point type and box shape position in the previous section are FAIL and UFA.
As in the case of IL, EXIT is obtained from the parent record, and UEXIT is obtained from the current record. In the text display process 83, in response to the control point type being CALL received from the inference unit 34, first, the fp field of the current record (the record created by the process 902 in FIG. 9) is referred to. To create a new window on the screen. Next, the name table record pointed to by the pid field is checked, and the text information pointed to by the text information pointer 512 is selected from the text information 543 and displayed in the previous window. In the text redisplay processing 84, in response to the control point type received from the inference unit being REDO, the pid field of the current record (the record pointed to by the current pointer updated by the processing 908 in FIG. 9) is changed. The name table record pointed to is checked, and the text information pointing to the text information pointer 512 is displayed again in the window indicated by the fp field. In the embodiment described above, the text of all predicates called as a result of CALL and REDO is displayed. However, a modification may be made so that only the text of the predicate specified by the user is displayed. For this purpose, for example, a flag that can be set by the user indicating whether or not the display is necessary may be added to the correspondence table between the predicate name and the predicate name identifier (pid), and the display of the text may be controlled accordingly. FIG. 1 (a) is a diagram corresponding to the pro program of FIG.
The same trace as in FIG.
4 shows an example of a T screen. However, in this example, the predicates t and s
And the text display of u is suppressed. Fig. 1 (b)
Indicates the display format of the control points described above. In FIG. 1A, output windows 11 and 12 are displayed on a CRT screen 10.
Is open. In the CALL on the first line in FIG. 11, the text of the predicate p is displayed in the output window 11, and the next UCALL
, CALL is displayed in the first term p (X), and the next UEXIT
In it it turns into CALL-EXIT. In the CALL of the fourth line, the CALL is displayed in the second term r (2, X) of the statement of the predicate p, the text of the predicate r is displayed in the output window 12, and the beginning of the first sentence in the next UCALL Term r (1, X)
CALL is displayed. Thereafter, the display of the first term in the UFAIL on the sixth line is changed to CALL-FAIL, CALL-EXIT is displayed on the first item of the second sentence of the predicate r in the UEXIT on the eighth line, and the second sentence is displayed in the next CALL Is displayed in the second term t (X). At this time, if not suppressed,
The text of the predicate t will be displayed in a new window. The second term t (X) of the second sentence in EXIT on line 12
Is displayed in the CALL of the last line, and CALL is displayed in the third term s (X) of the second sentence. The text display of the predicate s is suppressed. From the inspection of the current screen shown, the following can be easily understood. That is, the predicate r is currently being processed, and the current execution point is the CALL point of the term s (X). By the time this execution point is reached, the first term of the first sentence of the predicate r fails and ends. ,
This means that the first and second terms of the second sentence have been successfully completed, and thus control is passed to this term s (X) for the first time. In this embodiment, the display stack dedicated to the trace display unit 35 is used.
A trace display control area is added to the inference execution stack used by the inference unit 34, information to be stored in the display stack 52 is stored therein, and this stack is displayed in the trace display unit. May be shared with 35. In addition, all items may be displayed in a box shape from the beginning, and control points may be highlighted by flashing, bold lines, etc., or a box shape may be displayed for unexecuted items. Instead, only the control points for the executed term may be displayed.
The expression form of the control points is not limited to the above-described embodiment, and any symbol that can be displayed around each item can be used. [Effects of the Invention] According to the present invention, the current program execution point and the execution state of each point in the logic language program are intuitively understood on a source list in a format as described by the programmer. It is displayed in an easy-to-use format. Therefore, it is possible to easily understand the execution process of a logical language program which is normally difficult to grasp, and as a result, a remarkable improvement in debugging efficiency can be expected.

【図面の簡単な説明】 第1図は本発明の一実施例によって得られる表示画面を
示す図、第2図は本発明の実行に用いられるデータ処理
装置のハードウエア構成の一例を示すブロツクダイヤグ
ラム、第3図は本発明の一実施例のためのソフトウエア
構成を示すブロツクダイヤグラム、第4図はPrologによ
るプログラムの一例を示す図、第5図は第3図における
データエリアの詳細を示す図、第6図は第5図における
位置情報領域の一例を示す図、第7図は第5図における
表示スタツクとスタツクポインタエリアの一例を示す
図、第8図は本発明の一実施例によるトレース表示処理
の概略を示すフローチヤート、第9図は第8図における
スタツク処理の詳細を示すフローチヤート、第10図は第
8図における制御点表示処理の詳細を示すフローチヤー
ト、第11図は従来技術によるトレース表示の一例を示す
図である。 81,100〜108……実行状態表示ステツプ、82,900〜916…
…表示制御情報更新ステツプ、83,84……プログラムソ
ースリスト表示ステツプ。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram showing a display screen obtained by an embodiment of the present invention, and FIG. 2 is a block diagram showing an example of a hardware configuration of a data processing device used for executing the present invention. FIG. 3 is a block diagram showing a software configuration for an embodiment of the present invention, FIG. 4 is a diagram showing an example of a program by Prolog, and FIG. 5 is a diagram showing details of a data area in FIG. 6, FIG. 6 shows an example of the position information area in FIG. 5, FIG. 7 shows an example of the display stack and the stack pointer area in FIG. 5, and FIG. 8 shows an embodiment of the present invention. 9 is a flowchart showing the outline of the trace display processing, FIG. 9 is a flowchart showing the details of the stack processing in FIG. 8, and FIG. 10 is a flowchart showing the details of the control point display processing in FIG. , FIG. 11 is a diagram showing an example of the trace display according to the prior art. 81,100-108 …… Execution status display step, 82,900-916…
... Display control information update step, 83,84 ... Program source list display step.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−57033(JP,A) 特開 昭62−55739(JP,A) ICOT研究速報 TM−80「日本ソ フトウェア科学会第1回大会発表論文 集」(昭60−12−3)藤田俊之、竹内彰 一、近藤浩康著”Conwrrent Prolog ウィンドウ・トレーサに ついて”p.25−28   ────────────────────────────────────────────────── ─── Continuation of front page    (56) References JP-A-62-257033 (JP, A)                 JP-A-62-55739 (JP, A)                 ICOT Research Bulletin TM-80               Papers presented at the 1st Japan Society of Software Science Conference               Shu (Showa 60-12-3) Toshiyuki Fujita, Akira Takeuchi               1. Hiroyasu Kondo, "Concurrent               Prolog window tracer               About "p.25-28

Claims (1)

(57)【特許請求の範囲】 1.少なくとも一つの述語を含み、各述語は少なくとも
一つの項を含む、論理型言語で記述されたプログラム
を、データ処理装置で実行する過程において、処理され
る少なくとも一つの述語のプログラムソースリストを表
示するステツプと、表示されたプログラムソースリスト
上にこの述語の最新実行状態を図式で表示するステツプ
とを有する、実行トレース表示方法。 2.特許請求の範囲1において、前記図式は実行された
各項を囲む箱形図形であり、その4辺と4頂点の少なく
とも一部の表示形態がその項の最新実行状態を示す、実
行トレース表示方法。 3.特許請求の範囲2において、前記最新実行状態は、
呼出し、再呼出し、呼出し後の成功終了及び失敗終了、
並びに再呼出し後の成功終了及び失敗終了を含み、前記
箱形図形の2頂点が前記呼出し及び再呼出しにそれぞれ
対応し、前記箱形図形の4辺が前記呼出し後の成功終了
及び失敗終了並びに再呼出し後の成功終了及び失敗終了
にそれぞれ対応する、実行トレース表示方法。 4.特許請求の範囲1、2又は3において、その方法
は、プログラム実行過程における実行状態を示す実行状
態情報に応答して関連する述語のための表示制御情報を
更新するステツプを有し、前記両表示ステツプは、前記
実行状態情報と表示制御情報とに基づいて制御される、
実行トレース表示方法。 5.特許請求の範囲4において、前記表示制御情報は、
それぞれが一つの述語に対応してその述語の実行状態表
示の制御に用いられる複数の情報ブロツクと、前記情報
ブロツクの一つを示すポインタ情報とを含み、前記更新
ステツプは、新しい情報ブロツクを生成するステツプ
と、既成情報ブロツクの内容を変更するステツプと、前
記ポインタ情報を変更するステツプとを含む、実行トレ
ース表示方法。 6.特許請求の範囲5において、前記情報ブロツクは、
対応する述語を示す部分と、述語間の呼出関係を示す部
分と、処理対象項を示す部分と、実行経歴の少なくとも
一部を示す部分とを含む、実行トレース表示方法。 7.特許請求の範囲1ないし6のいずれかにおいて、異
なる述語のプログラムソースリストに表示画面上の異な
るウインドウを割当てるとともに、先に実行された述語
のウインドウの上に後から実行された述語のウインドウ
がオーバラツプするように表示する、実行トレース表示
方法。
(57) [Claims] A program source list of at least one predicate to be processed in a process of executing a program written in a logical language on a data processing device, the program source list including at least one predicate and each predicate including at least one term is displayed. An execution trace display method comprising: a step; and a step of graphically displaying the latest execution state of the predicate on a displayed program source list. 2. 2. The execution trace display method according to claim 1, wherein the diagram is a box-shaped figure surrounding each executed item, and a display form of at least a part of four sides and four vertices indicates the latest execution state of the item. . 3. In claim 2, the latest execution state is:
Call, recall, successful and unsuccessful termination after the call,
And two vertices of the box-shaped figure correspond to the calling and recalling, respectively, and four sides of the box-shaped figure correspond to the successful and unsuccessful ends and recalled after the calling. An execution trace display method corresponding to a successful end and a failed end after calling, respectively. 4. The method according to claim 1, 2 or 3, wherein the method includes a step of updating display control information for an associated predicate in response to execution state information indicating an execution state in a program execution process. The steps are controlled based on the execution state information and the display control information.
Execution trace display method. 5. In claim 4, the display control information includes:
Each of the information blocks includes a plurality of information blocks corresponding to one predicate and used for controlling the execution state display of the predicate, and pointer information indicating one of the information blocks, and the updating step generates a new information block. And a step of changing the content of the existing information block, and a step of changing the pointer information. 6. In claim 5, the information block comprises:
An execution trace display method including a part indicating a corresponding predicate, a part indicating a calling relationship between the predicates, a part indicating a processing target item, and a part indicating at least a part of the execution history. 7. In any one of claims 1 to 6, different windows on the display screen are assigned to program source lists of different predicates, and a window of a later executed predicate overlaps a window of a previously executed predicate. How to display the execution trace as you would.
JP62063993A 1987-03-04 1987-03-20 Displaying execution trace of logical language program Expired - Lifetime JP2696210B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP62063993A JP2696210B2 (en) 1987-03-20 1987-03-20 Displaying execution trace of logical language program
US07/156,459 US4943968A (en) 1987-03-04 1988-02-16 Method of displaying execution trace in a logic programming language processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62063993A JP2696210B2 (en) 1987-03-20 1987-03-20 Displaying execution trace of logical language program

Publications (2)

Publication Number Publication Date
JPS63231543A JPS63231543A (en) 1988-09-27
JP2696210B2 true JP2696210B2 (en) 1998-01-14

Family

ID=13245309

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62063993A Expired - Lifetime JP2696210B2 (en) 1987-03-04 1987-03-20 Displaying execution trace of logical language program

Country Status (1)

Country Link
JP (1) JP2696210B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH079627B2 (en) * 1985-09-04 1995-02-01 株式会社日立製作所 Logical language processing method
JPH079628B2 (en) * 1985-09-06 1995-02-01 株式会社日立製作所 How to display operating range of logic language

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ICOT研究速報 TM−80「日本ソフトウェア科学会第1回大会発表論文集」(昭60−12−3)藤田俊之、竹内彰一、近藤浩康著"Conwrrent Prolog ウィンドウ・トレーサについて"p.25−28

Also Published As

Publication number Publication date
JPS63231543A (en) 1988-09-27

Similar Documents

Publication Publication Date Title
US4829468A (en) Print control system
JP4448881B2 (en) Method and system for generating a computer program
JPH0228831A (en) Version management
US4943968A (en) Method of displaying execution trace in a logic programming language processing system
JPH10124495A (en) Original text generation processor and medium for storing program for the same
EP0661650A2 (en) Document editing apparatus
JP2696210B2 (en) Displaying execution trace of logical language program
JPH0934698A (en) Software generating method and software developing and supporting method
JP3516843B2 (en) Database access method
JPS60221866A (en) Document editing processor
JPH06230957A (en) Check list system
JPH02146630A (en) Program developing system for microprocessor
JP3424558B2 (en) Object management method
JPH0128974B2 (en)
JPH042961B2 (en)
JPH09251456A (en) Composite document processing method
JP2618493B2 (en) Sequence controller
JPS63223931A (en) Logic diagram execution route output processing system
JPH03231335A (en) Display system for error message
JPH07192005A (en) Learning storage controller
JPH0792771B2 (en) Program execution status display system
JPH0520319A (en) Display controller
Reiss et al. The Annotation Editor
JPH04273314A (en) Method and device for controlling screen
JPH05165613A (en) Resource relational information display processing system