Haskellプログラムの開発を支援するGHCiデバッガフロントエンド

Bibliographic Information

Other Title
  • Haskell プログラム ノ カイハツ オ シエン スル GHCi デバッガフロントエンド
  • GHCi Debugger Front-end for Haskell Programming

Search this article

Abstract

遅延評価型関数型言語 Haskell で書かれたプログラムのデバッグは,処理系 GHC に組み込まれている GHCi デバッガを用いて,実行時の変数の情報を確認する等して行うことが一般的である.GHCi デバッガは,対話的な環境におけるコマンド入力により,ブレイクポイントの設定,ステップ実行,状況に応じた変数の評価や追跡機能等の機能を提供する.しかし,GHCi デバッガは,グラフィカルなユーザインタフェースによる,ステップ実行の可視化が必要であることが,開発者らにより指摘されている.そこで,本論文では GHCi デバッガに対して,デバッグ実行時の表示を追加し,操作を簡易化するための機構を,ウェブブラウザを利用したフロントエンドとして実装する.本フロントエンドは,GUI を用いてソースコードと評価順序を確認しつつ履歴を簡単に戻りながら遅延オブジェクトの内容を評価できるデバッグ支援環境を提供する.実装には,Python および jQuery ライブラリを用いた.本フロントエンドは,GHCi デバッガの出力を JavaScript を用いた動的 HTML として整形する機構とウェブブラウザの操作を GHCi デバッガのコマンドに対応付ける HTTP サーバの 2 つで構成されている.GHC とウェブブラウザが使用できる環境であれば,環境を選ばず簡単に導入が行えることが特長となっている.

To debug a program written in Haskell, it is usual to use the GHCi debugger in the distribution set of the GHC (Glasgow Haskell Compiler) interpreter. The GHCi debugger provides various interactive abilities such as setting breakpoints, single-step execution, inspecting variables, and execution in trace mode. However, it is pointed out by the developers of the GHCi debugger that visualization of step executions in a graphical user interface is necessary. Thus, we designed and implemented a front-end of the GHCi debugger with a graphical user interface that runs on an usual Web browser to help the debugging operations easier. This front-end offers a debug-supporting environment that enables users to easily confirm the evaluation order and to force delayed objects. The front-end is implemented by Python and jQuery library. The front-end is composed of two parts; one converts an output of GHCi into a dynamic HTML with JavaScript, and the other associates the operations of the user on a Web browser with the commands of the GHCi debugger. It can be used in any programming environment in which GHCi and a Web browser are installed.

Journal

Keywords

Details 詳細情報について

Report a problem

Back to top