| 摘要: |
| 文章分析了编译实现函数式程序设计语言的主要技术,总结出函数式语言实现方法的两条设计准则:(1)简化函数调用处理的同时,减少被延迟求值参数所占用存储空间及其占用时间;(2)通过程序变换减少函数式程序的特殊语言现象.使其适应冯·偌依曼机的结构特征.文中介绍了几种新的编译技术以及采用这些技术实现的一个函数式语言编译系统. |
| 关键词: 函数式程序设计语言,编译程序,延迟求值,部分求值. |
| DOI: |
| 分类号: |
| 基金项目:本研究项目得到北京市自然科学基金资助. |
|
| ON THE IMPLEMENTATION OF COMPILERS FOR FUNCTIONAL LANGUAGES |
|
Liao Husheng
|
| Abstract: |
| This paper gives the main techniques for implementing compiler for function-al languages and proposes two rules for the design of the compiler’s implementation:(1)Saving the memory space for suspended arguments and to release them as early as possible.in addition to simplify function call;(2)Reducing the characteristic structure in rune-tional programs by some transformations.Some techniques and their application in a com piler for a functional language are also presented. |
| Key words: Functional programming language,compiler,lazy evaluation,partial evalua-tion. |