Lazy evaluation is a powerful tool for functional programmers. It enables the concise expression of on-demand computation and a form of compositionality not available under other evaluation strategies. However, the stateful nature of lazy evaluation makes it hard to analyze a program's computational cost, either informally or formally. In this work, we present a novel and simple framework for formally reasoning about lazy computation costs based on a recent model of lazy evaluation: clairvoyant call-by-value. The key feature of our framework is its simplicity, as expressed by our definition of the clairvoyance monad. This monad is both simple to define (around 20 lines of Coq) and simple to reason about. We show that this monad can be effectively used to mechanically reason about the computational cost of lazy functional programs written in Coq.


翻译:懒惰评估是功能程序员的有力工具,它能够简明地表达需求计算和在其他评价战略下无法提供的构成形式。 但是,懒惰评估的典型性质使得很难以非正式或正式的方式分析一个方案的计算成本。在这项工作中,我们提出了一个新颖而简单的框架,用于根据最近的懒惰评估模式(Clairvoyant call-culity-value)正式推理懒惰计算成本。我们框架的主要特征是其简单性,正如我们对“阴暗蒙达”的定义所表现的那样。这道寺既简单易定义(约20行 Coq ),又易于解释。我们表明,这道寺可以有效地用于机械地解释在 Coq 书写的懒惰功能方案中的计算成本。

0
下载
关闭预览

相关内容

【干货书】电子工程与计算机科学概率论,389页pdf
专知会员服务
43+阅读 · 2021年7月24日
【干货书】真实机器学习,264页pdf,Real-World Machine Learning
【快讯】CVPR2020结果出炉,1470篇上榜, 你的paper中了吗?
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
53+阅读 · 2019年9月29日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
已删除
将门创投
7+阅读 · 2018年11月5日
【推荐】SLAM相关资源大列表
机器学习研究会
10+阅读 · 2017年8月18日
Arxiv
0+阅读 · 2021年9月3日
Arxiv
14+阅读 · 2020年9月1日
Arxiv
3+阅读 · 2018年3月29日
VIP会员
最新内容
美海军陆战队将三型无人机整合入统一战场网络
专知会员服务
2+阅读 · 今天9:39
《无人机蜂群:释放人类-蜂群编队的潜能》
专知会员服务
3+阅读 · 今天9:12
《战略战术化:一项综合性述评》
专知会员服务
2+阅读 · 今天9:08
美陆军-工业界协同推进反无人机系统技术发展
专知会员服务
1+阅读 · 今天8:46
《跨域指挥背景下的领导力发展》最新报告
专知会员服务
1+阅读 · 今天8:40
俄乌无人机战争的六大启示
专知会员服务
10+阅读 · 8月3日
《无人机空中监控:通信实验洞察》
专知会员服务
8+阅读 · 8月3日
从采集到决策:美军视角下的战术情报范式重构
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
已删除
将门创投
7+阅读 · 2018年11月5日
【推荐】SLAM相关资源大列表
机器学习研究会
10+阅读 · 2017年8月18日
Top
微信扫码咨询专知VIP会员