Galois connecting call-by-value and call-by-name

Dylan McDermott, A. Mycroft
{"title":"Galois connecting call-by-value and call-by-name","authors":"Dylan McDermott, A. Mycroft","doi":"10.4230/LIPIcs.FSCD.2022.32","DOIUrl":null,"url":null,"abstract":"We establish a general framework for reasoning about the relationship between call-by-value and call-by-name. In languages with side-effects, call-by-value and call-by-name executions of programs often have different, but related, observable behaviours. For example, if a program might diverge but otherwise has no side-effects, then whenever it terminates under call-by-value, it terminates with the same result under call-by-name. We propose a technique for stating and proving these properties. The key ingredient is Levy's call-by-push-value calculus, which we use as a framework for reasoning about evaluation orders. We show that the call-by-value and call-by-name translations of expressions into call-by-push-value have related observable behaviour under certain conditions on side-effects, which we identify. We then use this fact to construct maps between the call-by-value and call-by-name interpretations of types, and identify further properties of side-effects that imply these maps form a Galois connection. These properties hold for some side-effects (such as divergence), but not others (such as mutable state). This gives rise to a general reasoning principle that relates call-by-value and call-by-name. We apply the reasoning principle to example side-effects including divergence and nondeterminism.","PeriodicalId":284975,"journal":{"name":"International Conference on Formal Structures for Computation and Deduction","volume":"3 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-02-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Conference on Formal Structures for Computation and Deduction","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.FSCD.2022.32","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

We establish a general framework for reasoning about the relationship between call-by-value and call-by-name. In languages with side-effects, call-by-value and call-by-name executions of programs often have different, but related, observable behaviours. For example, if a program might diverge but otherwise has no side-effects, then whenever it terminates under call-by-value, it terminates with the same result under call-by-name. We propose a technique for stating and proving these properties. The key ingredient is Levy's call-by-push-value calculus, which we use as a framework for reasoning about evaluation orders. We show that the call-by-value and call-by-name translations of expressions into call-by-push-value have related observable behaviour under certain conditions on side-effects, which we identify. We then use this fact to construct maps between the call-by-value and call-by-name interpretations of types, and identify further properties of side-effects that imply these maps form a Galois connection. These properties hold for some side-effects (such as divergence), but not others (such as mutable state). This gives rise to a general reasoning principle that relates call-by-value and call-by-name. We apply the reasoning principle to example side-effects including divergence and nondeterminism.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
伽罗瓦连接按值调用和按名称调用
我们建立了一个通用的框架来推理按值调用和按名称调用之间的关系。在具有副作用的语言中,按值调用和按名称调用的程序执行通常具有不同但相关的可观察行为。例如,如果一个程序可能会发散,但没有副作用,那么无论何时它在按值调用下终止,它在按名称调用下都会以相同的结果终止。我们提出了一种陈述和证明这些性质的技术。关键成分是Levy的推值调用演算,我们将其用作评估顺序推理的框架。我们证明了表达式的按值调用和按名调用转换为按推值调用在某些条件下具有相关的可观察行为,并且我们确定了副作用。然后,我们使用这一事实在类型的按值调用和按名称调用解释之间构建映射,并确定暗示这些映射形成伽罗瓦连接的副作用的进一步属性。这些属性适用于一些副作用(如发散),但不适用其他副作用(如可变状态)。这就产生了一个将按值调用和按名称调用联系起来的一般推理原则。我们将推理原理应用于包括发散和不确定性在内的副作用示例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Cyclic Proofs for Arithmetical Inductive Definitions The Logical Essence of Compiling With Continuations Compositional Confluence Criteria An Analysis of Tennenbaum's Theorem in Constructive Type Theory Rewriting modulo traced comonoid structure
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1