Concurrent Clean : FGRS vs. lambda calculus
Cleanが意味論としてラムダ計算ではなくグラフ書き換えを使っているのはなぜかということなのですが、
Functional Programming and Parallel Graph Rewriting (International Computer Science Series)
- 作者: M. J. Plasmeijer,Marko Van Eekelen,Rinus Plasmeijer,M. C. J. D. Van Eekelen
- 出版社/メーカー: Addison-Wesley
- 発売日: 1993/07/01
- メディア: ハードカバー
- クリック: 1回
- この商品を含むブログ (6件) を見る
Part 4に以下のような図があります。
Functional graph rewriting | V Miranda Clean Motorola program --> program --> ABC code --> code ABC machine Motorola simulator processor
で、こういう説明文がついています
So an implementation is described for a particular functional language (Miranda) based on the model that we consider to be the most suited for this purpose: FGRSs. First, the language is translated into an intermediate language (Clean) based on FGRSs. Since the level of Clean is still rather high compared with the level of a concrete machine, a Clean program is translated into code for an abstract stack-based machine (the ABC machine). The abstract machine forms an additional more concrete intermediate level enabling a relatively easy production of interpreters and code generators for various target machines.
で、この「for this purpose」というのが、この文脈では「An efficient implementation of a functional language」ということなわけですが、
これから分かるとおり、Cleanという言語は、関数型言語(namely Miranda)の効率的な実装のために作られた中間言語だったので、ラムダ計算ではなくグラフ書き換えを意味論に採用し、また、言語表面に効率性に関連する機能を持つような仕様になっているのではないかと思います。