Static evaluation of functional programs

G. Lindstrom
{"title":"Static evaluation of functional programs","authors":"G. Lindstrom","doi":"10.1145/12276.13331","DOIUrl":null,"url":null,"abstract":"Static evaluation underlies essentially all techniques for a priori semantic program manipulation, i.e. those that stop short of fully general execution. Included are such activities as type checking, partial evaluation, and, ultimately, optimized compilation.\nThis paper describes a novel approach to static evaluation of programs in functional languages involving infinite data objects, i.e. those using normal order or “lazy” evaluation. Its principal features are abstract interpretation on a domain of demand patterns, and a notion of function “reversal”. The latter associates with each function f a derived function f' mapping demand patterns on f to demand patterns on its formal parameter. This is used for a comprehensive form of strictness analysis, aiding in efficient compilation.\nThis analysis leads to a revised notion of basic block, appropriate as an intermediate representation for a normal order functional language. An implementation of the analysis technique in Prolog is sketched, as well as an effort currently underway to apply the technique to the generation of optimized G-machine code.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1986-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"21","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"SIGPLAN Conferences and Workshops","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/12276.13331","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 21

Abstract

Static evaluation underlies essentially all techniques for a priori semantic program manipulation, i.e. those that stop short of fully general execution. Included are such activities as type checking, partial evaluation, and, ultimately, optimized compilation. This paper describes a novel approach to static evaluation of programs in functional languages involving infinite data objects, i.e. those using normal order or “lazy” evaluation. Its principal features are abstract interpretation on a domain of demand patterns, and a notion of function “reversal”. The latter associates with each function f a derived function f' mapping demand patterns on f to demand patterns on its formal parameter. This is used for a comprehensive form of strictness analysis, aiding in efficient compilation. This analysis leads to a revised notion of basic block, appropriate as an intermediate representation for a normal order functional language. An implementation of the analysis technique in Prolog is sketched, as well as an effort currently underway to apply the technique to the generation of optimized G-machine code.
函数程序的静态求值
静态求值基本上是所有先验语义程序操作技术的基础,即那些停止完全通用执行的技术。包括类型检查、部分求值以及最终的优化编译等活动。本文描述了函数式语言中涉及无限数据对象的程序静态求值的一种新方法,即使用正常顺序或“惰性”求值的程序。它的主要特点是对需求模式领域的抽象解释,以及功能“反转”的概念。后者与每个函数f关联一个派生函数f',将f上的需求模式映射到其形式参数上的需求模式。这用于全面形式的严格性分析,有助于有效的编译。这种分析导致了对基本块概念的修订,适合作为正常顺序函数式语言的中间表示。概述了Prolog中分析技术的实现,以及目前正在进行的将该技术应用于生成优化的G-machine代码的工作。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信