langsmith:159
From: MAEDA Atusi <maeda-langsmith atusi.org>
Date: Fri, 15 Oct 2004 02:08:37 +0900
Subject: [langsmith:159] CPS (Re: 並行プログラミングのサポート)
"HAMADA, Masaaki" <allchapters nifty.com> writes: > Schemeのエピソードは私も今はなき雑誌 bitで読みました。 > 当時はSchemeのことをLispの内部的な処理をCPS(continuation passing style) > にしたものぐらいの認識だったのですが、これを読んで事実は逆でSchemeから > CPSが生まれたのか?と疑問を持った記憶があります。これ結局答え知らない・・ 私がcontinuationとかCPSについて読んだのは Guy L. SteeleとG. J. Sussman: "LAMBDA: the Ultimate Imperative", MIT AI MEMO 353 (1976) ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-353.pdf ですが、continuationとかCPSの概念自体は少し前からあったようです。 私も良く知りませんが、理論っぽい論文では C. Strachey, C. P. Wadsworth: "Continuations: a Mathematical Semantics for Handling Full Jumps," Technical Monograph PRG-11, Oxford University Computing Laboratory, Programming Research Group (1974) M. J. Fischer: "Lambda Calculus Schemata", In Proceedings of the ACM Conference on Assertions about Programs, pages 104-109, SIGPLAN Notices Vol.7, No.1 (1972) G. D. Plotkin: "Call-by-Name, Call-by-Value and the λ-Calculus", Theoretical Computer Science, No.1, pages 125-159 (1975) なんかが参照されてるようです。 ただ、continuationやCPSが実用的なコンパイラに役立つことを示したのは、 Schemeに関するSteeleやSussmanの仕事が最初だと思います。特にSteeleの修 士論文の、"RABBIT: a Compiler for SCHEME" は影響が大きかったと思います。 この後、しばらくCPSを用いたコンパイラが流行りました。MLのコンパイラを 題材にしたA. Appelの"Compiling with Continuations"なんていう本も出てい ます。 トリビア: RABBITのもうひとつの影響として、その後のSchemeのコンパイラに は...bitという名をつけるのが流行りました。Orbit, Twobit, Gambit等。 トリビアその2: RABBIT論文の本当の題目はとても長くて、論文にはまるで映 画のタイトルクレジットのごとく RABBIT: A Compiler for SCHEME (A Dialect of LISP) A Study in Compiler Optimization Based on Viewing LAMBDA as RENAME and PROCEDURE CALL as GOTO using the techniques of Macro Definition of Control and Environment Structures Source-to-Source Transformation Procedure Integration and Tail-Recursion と書いてあります。抱腹絶倒の名著Hacker's Dictionary (Jargon File)の著者 Steeleらしいユーモアだと思います。 (ftp://publications.ai.mit.edu/ai-publications/pdf/AITR-474.pdf) この人が書くと、無味乾燥なはずの言語規格書もニヤリとする箇所の多いもの になります。Common Lisp: the Language (CLtL) の例題とか Java Language Specification の索引の遊びを読んでウケたのは私だけではないと思います。 前田敦司(現実逃避中) -- ML: langsmith quickml.atdot.net 使い方: http://www.atdot.net/~ko1/quickml
131 2004-09-28 00:46 [allchapters nifty.co] 並行プログラミングのサポート 132 2004-09-28 09:09 ┣[matz ruby-lang.org ] 133 2004-09-29 03:22 ┃┗[allchapters nifty.co] 149 2004-10-09 23:59 ┃ ┗[maeda-langsmith atus] 152 2004-10-12 21:43 ┃ ┗[allchapters nifty.co] 153 2004-10-12 23:43 ┃ ┗[maeda-langsmith atus] 157 2004-10-14 13:00 ┃ ┣[maeda-langsmith atus] 158 2004-10-15 00:30 ┃ ┗[allchapters nifty.co] -> 159 2004-10-15 02:08 ┃ ┗[maeda-langsmith atus] CPS (Re: 並行プログラミングのサポート) 134 2004-10-05 00:53 ┗[mas pb.highway.ne.jp] 137 2004-10-07 01:18 ┗[allchapters nifty.co]