書誌事項
- タイトル別名
-
- CPS Conversion of Imperative Language with Exception Handling and Its Formalization
- レイガイ ショリ キコウ オ ソナエタ メイレイガタ ゲンゴ ノ CPS ヘンカン ト ソノ テイシキカ
この論文をさがす
説明
制御フローグラフに類似した一般的な命令型言語を,CPS(継続渡しスタイル)を中間表現としてコンパイルする方法を提案する.CPS とは,「残りの計算」(継続と呼ばれる)を表現する関数を生成することにより,すべての関数呼び出しや条件分岐を末尾位置においた関数型言語の一種であり,Scheme やML といった関数型言語のコンパイラに広く用いられている.命令型言語をCPS に変換することで,スタックフレームや例外ハンドラが継続として明示化され,関数適用や例外処理における複雑な制御の流れが明確化される.結果として,インライン展開や末尾呼び出し最適化を含む多くの最適化が容易に実現できる.我々は命令型言語をCPS に変換する過程の単純な定式化を与え,その正しさを証明する.
We propose a method of compiling a generic imperative language (similar to control flow graphs) by using CPS (continuation passing style) as an intermediate representation. CPS is a form of functional programs that puts all function calls and all conditional branches into tail positions by generating functions to represent “the rest of the computation” (called continuations). It is widely used as an intermediate representation in compilers of functional languages such as Scheme and ML. By translating an imperative language into CPS, complicated control flow as in function application and exception handling is clarified because activation records and exception handlers are made explicit as continuations. As a result, many optimizations including inline expansion and tail-call optimization can be easily implemented. We give a simple formulation to the process of converting the imperative language into CPS and prove its correctness.
収録刊行物
-
- 情報処理学会論文誌プログラミング(PRO)
-
情報処理学会論文誌プログラミング(PRO) 45 (SIG12(PRO23)), 67-82, 2004-11-15
情報処理学会
- Tweet
キーワード
詳細情報 詳細情報について
-
- CRID
- 1050564287843969792
-
- NII論文ID
- 110002768481
-
- NII書誌ID
- AA11464814
-
- ISSN
- 18827802
- 03875806
-
- NDL書誌ID
- 7158035
-
- 本文言語コード
- ja
-
- 資料種別
- journal article
-
- データソース種別
-
- IRDB
- NDLサーチ
- CiNii Articles