推断高阶程序的累积效应

Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies
{"title":"推断高阶程序的累积效应","authors":"Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies","doi":"arxiv-2408.02791","DOIUrl":null,"url":null,"abstract":"Many temporal safety properties of higher-order programs go beyond simple\nevent sequencing and require an automaton register (or \"accumulator\") to\nexpress, such as input-dependency, event summation, resource usage, ensuring\nequal event magnitude, computation cost, etc. Some steps have been made towards\nverifying more basic temporal event sequences via reductions to fair\ntermination [Murase et al. 2016] or some input-dependent properties through\ndeductive proof systems [Nanjo et al. 2018]. However, there are currently no\nautomated techniques to verify the more general class of register-automaton\nsafety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,\nregister-automata effects of recursive, higher-order programs. We capture\nproperties of a program's effects in terms of automata that summarizes the\nhistory of observed effects using an accumulator register. The key novelty is a\nnew abstract domain for context-dependent effects, capable of abstracting\nrelations between the program environment, the automaton control state, and the\naccumulator value. The upshot is a dataflow type and effect system that\ncomputes context-sensitive effect summaries. We demonstrate our work via a\nprototype implementation that computes dependent effect summaries (and\nvalidates assertions) for OCaml-like recursive higher order programs. As a\nbasis of comparison, we describe reductions to assertion checking for\neffect-free programs, and demonstrate that our approach outperforms prior tools\nDrift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat\ncould not verify any, Drift verified 9 benchmarks, and evDrift verified 19;\nevDrift also had a 30.5x over Drift on those benchmarks that both tools could\nsolve.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Inferring Accumulative Effects of Higher Order Programs\",\"authors\":\"Mihai Nicola, Chaitanya Agarwal, Eric Koskinen, Thomas Wies\",\"doi\":\"arxiv-2408.02791\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Many temporal safety properties of higher-order programs go beyond simple\\nevent sequencing and require an automaton register (or \\\"accumulator\\\") to\\nexpress, such as input-dependency, event summation, resource usage, ensuring\\nequal event magnitude, computation cost, etc. Some steps have been made towards\\nverifying more basic temporal event sequences via reductions to fair\\ntermination [Murase et al. 2016] or some input-dependent properties through\\ndeductive proof systems [Nanjo et al. 2018]. However, there are currently no\\nautomated techniques to verify the more general class of register-automaton\\nsafety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent,\\nregister-automata effects of recursive, higher-order programs. We capture\\nproperties of a program's effects in terms of automata that summarizes the\\nhistory of observed effects using an accumulator register. The key novelty is a\\nnew abstract domain for context-dependent effects, capable of abstracting\\nrelations between the program environment, the automaton control state, and the\\naccumulator value. The upshot is a dataflow type and effect system that\\ncomputes context-sensitive effect summaries. We demonstrate our work via a\\nprototype implementation that computes dependent effect summaries (and\\nvalidates assertions) for OCaml-like recursive higher order programs. As a\\nbasis of comparison, we describe reductions to assertion checking for\\neffect-free programs, and demonstrate that our approach outperforms prior tools\\nDrift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat\\ncould not verify any, Drift verified 9 benchmarks, and evDrift verified 19;\\nevDrift also had a 30.5x over Drift on those benchmarks that both tools could\\nsolve.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.02791\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.02791","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

高阶程序的许多时态安全特性超出了简单的事件排序,需要自动机寄存器(或 "累加器")来表达,如输入依赖性、事件求和、资源使用、确保事件量级相等、计算成本等。在通过还原到公平终结(fairtermination)[Murase 等人,2016 年] 或通过演绎证明系统(Nanjo 等人,2018 年] 来验证更基本的时序事件序列方面,人们已经迈出了一些步伐。然而,目前还没有自动化技术来验证高阶程序更一般的寄存器自动安全属性。我们引入了一种基于抽象解释的分析方法,来计算递归高阶程序的依赖性寄存器自动效应。我们用自动机捕捉程序的效应属性,自动机总结了使用累加器寄存器观察到的效应历史。关键的新颖之处在于为上下文相关效应提供了一个新的抽象域,能够抽象出程序环境、自动机控制状态和累加器值之间的关系。其结果是建立了一个数据流类型和效应系统,该系统可以计算与上下文相关的效应摘要。我们通过一个原型实现来演示我们的工作,它可以计算类似于 OCaml 的递归高阶程序的依赖效应摘要(并验证断言)。作为比较,我们描述了无效应程序断言检查的简化方法,并证明我们的方法优于先前的工具Drift和RCaml/PCSat。总体而言,在一组 21 个新基准中,RCaml/PCSat 无法验证任何基准,Drift 验证了 9 个基准,而 evDrift 验证了 19 个;在两个工具都能解决的基准上,evDrift 比 Drift 高出 30.5 倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Inferring Accumulative Effects of Higher Order Programs
Many temporal safety properties of higher-order programs go beyond simple event sequencing and require an automaton register (or "accumulator") to express, such as input-dependency, event summation, resource usage, ensuring equal event magnitude, computation cost, etc. Some steps have been made towards verifying more basic temporal event sequences via reductions to fair termination [Murase et al. 2016] or some input-dependent properties through deductive proof systems [Nanjo et al. 2018]. However, there are currently no automated techniques to verify the more general class of register-automaton safety properties of higher-order programs. We introduce an abstract interpretation-based analysis to compute dependent, register-automata effects of recursive, higher-order programs. We capture properties of a program's effects in terms of automata that summarizes the history of observed effects using an accumulator register. The key novelty is a new abstract domain for context-dependent effects, capable of abstracting relations between the program environment, the automaton control state, and the accumulator value. The upshot is a dataflow type and effect system that computes context-sensitive effect summaries. We demonstrate our work via a prototype implementation that computes dependent effect summaries (and validates assertions) for OCaml-like recursive higher order programs. As a basis of comparison, we describe reductions to assertion checking for effect-free programs, and demonstrate that our approach outperforms prior tools Drift and RCaml/PCSat. Overall, across a set of 21 new benchmarks, RCaml/PCSat could not verify any, Drift verified 9 benchmarks, and evDrift verified 19; evDrift also had a 30.5x over Drift on those benchmarks that both tools could solve.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Repr Types: One Abstraction to Rule Them All $μλεδ$-Calculus: A Self Optimizing Language that Seems to Exhibit Paradoxical Transfinite Cognitive Capabilities Expressing and Analyzing Quantum Algorithms with Qualtran Conversational Concurrency The MLIR Transform Dialect. Your compiler is more powerful than you think
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1