Compiling syntactically recursive programs

C. Queinnec
{"title":"Compiling syntactically recursive programs","authors":"C. Queinnec","doi":"10.1145/382126.382129","DOIUrl":null,"url":null,"abstract":"Lisp programs are traditionally represented by S-expressions. Side-eeecting S-expressions allows to easily build cyclic S-expressions which can be turned, through macroexpansion, into syntactically recursive programs i.e., programs which do not have a nite DAG-like representation. We do not know of any compiler able to compile such syntactically recursive programs. Yet, interpreters do not have these problems when evaluating these sort of programs. The paper proposes a program transformation that translates any possibly syntactically recursive program into an equivalent regular program. This result establishes (i) that any S-expression can be considered as a program irrespectively of its possibly cyclic structure, (ii) the equivalence of compilers and interpreters with respect to any S-expression as well as (iii) the possibility to implement a dynamic evaluation facility i.e., the eval function, without any interpreter and with the sole use of a compiler.","PeriodicalId":262740,"journal":{"name":"ACM SIGPLAN Lisp Pointers","volume":"76 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1992-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM SIGPLAN Lisp Pointers","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/382126.382129","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Lisp programs are traditionally represented by S-expressions. Side-eeecting S-expressions allows to easily build cyclic S-expressions which can be turned, through macroexpansion, into syntactically recursive programs i.e., programs which do not have a nite DAG-like representation. We do not know of any compiler able to compile such syntactically recursive programs. Yet, interpreters do not have these problems when evaluating these sort of programs. The paper proposes a program transformation that translates any possibly syntactically recursive program into an equivalent regular program. This result establishes (i) that any S-expression can be considered as a program irrespectively of its possibly cyclic structure, (ii) the equivalence of compilers and interpreters with respect to any S-expression as well as (iii) the possibility to implement a dynamic evaluation facility i.e., the eval function, without any interpreter and with the sole use of a compiler.
编译语法递归程序
Lisp程序传统上由s表达式表示。侧面s表达式允许很容易地构建循环s表达式,它可以通过宏展开转换为语法递归程序,即不具有类似于dag的表示的程序。我们不知道任何编译器能够编译这样的语法递归程序。然而,解释器在评估这类程序时没有这些问题。本文提出了一种程序变换,可以将任何可能的语法递归程序转换为等价的正则程序。这个结果建立了(i)任何s表达式都可以被认为是一个程序,而不考虑它可能的循环结构,(ii)编译器和解释器对任何s表达式的等效性,以及(iii)实现动态计算功能的可能性,即eval函数,不需要任何解释器,只使用编译器。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信