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.
伽罗瓦连接按值调用和按名称调用
我们建立了一个通用的框架来推理按值调用和按名称调用之间的关系。在具有副作用的语言中,按值调用和按名称调用的程序执行通常具有不同但相关的可观察行为。例如,如果一个程序可能会发散,但没有副作用,那么无论何时它在按值调用下终止,它在按名称调用下都会以相同的结果终止。我们提出了一种陈述和证明这些性质的技术。关键成分是Levy的推值调用演算,我们将其用作评估顺序推理的框架。我们证明了表达式的按值调用和按名调用转换为按推值调用在某些条件下具有相关的可观察行为,并且我们确定了副作用。然后,我们使用这一事实在类型的按值调用和按名称调用解释之间构建映射,并确定暗示这些映射形成伽罗瓦连接的副作用的进一步属性。这些属性适用于一些副作用(如发散),但不适用其他副作用(如可变状态)。这就产生了一个将按值调用和按名称调用联系起来的一般推理原则。我们将推理原理应用于包括发散和不确定性在内的副作用示例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信