带指针程序演绎合成的高阶规范(扩展版)

David Young, Ziyi Yang, Ilya Sergey, Alex Potanin
{"title":"带指针程序演绎合成的高阶规范(扩展版)","authors":"David Young, Ziyi Yang, Ilya Sergey, Alex Potanin","doi":"arxiv-2407.09143","DOIUrl":null,"url":null,"abstract":"Synthetic Separation Logic (SSL) is a formalism that powers SuSLik, the\nstate-of-the-art approach for the deductive synthesis of provably-correct\nprograms in C-like languages that manipulate Heap-based linked data structures.\nDespite its expressivity, SSL suffers from two shortcomings that hinder its\nutility. First, its main specification component, inductive predicates, only\nadmits \\emph{first-order} definitions of data structure shapes, which leads to\nthe proliferation of ``boiler-plate'' predicates for specifying common\npatterns. Second, SSL requires \\emph{concrete} definitions of data structures\nto synthesise programs that manipulate them, which results in the need to\nchange a specification for a synthesis task every time changes are introduced\ninto the layout of the involved structures. We propose to significantly lift the level of abstraction used in writing\nSeparation Logic specifications for synthesis -- both simplifying the approach\nand making the specifications more usable and easy to read and follow. We avoid\nthe need to repetitively re-state low-level representation details throughout\nthe specifications -- allowing the reuse of different implementations of the\nsame data structure by abstracting away the details of a specific layout used\nin memory. Our novel \\textit{high-level front-end language} called Pika\nsignificantly improves the expressiveness of SuSLik. We implemented a layout-agnostic synthesiser from Pika to SuSLik enabling\npush-button synthesis of C programs with in-place memory updates, along with\nthe accompanying full proofs that they meet Separation Logic-style\nspecifications, from high-level specifications that resemble ordinary\nfunctional programs. Our experiments show that our tool can produce C code that\nis comparable in its performance characteristics and is sometimes faster than\nHaskell.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"77 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Higher-Order Specificationsfor Deductive Synthesis of Programs with Pointers (Extended version)\",\"authors\":\"David Young, Ziyi Yang, Ilya Sergey, Alex Potanin\",\"doi\":\"arxiv-2407.09143\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Synthetic Separation Logic (SSL) is a formalism that powers SuSLik, the\\nstate-of-the-art approach for the deductive synthesis of provably-correct\\nprograms in C-like languages that manipulate Heap-based linked data structures.\\nDespite its expressivity, SSL suffers from two shortcomings that hinder its\\nutility. First, its main specification component, inductive predicates, only\\nadmits \\\\emph{first-order} definitions of data structure shapes, which leads to\\nthe proliferation of ``boiler-plate'' predicates for specifying common\\npatterns. Second, SSL requires \\\\emph{concrete} definitions of data structures\\nto synthesise programs that manipulate them, which results in the need to\\nchange a specification for a synthesis task every time changes are introduced\\ninto the layout of the involved structures. We propose to significantly lift the level of abstraction used in writing\\nSeparation Logic specifications for synthesis -- both simplifying the approach\\nand making the specifications more usable and easy to read and follow. We avoid\\nthe need to repetitively re-state low-level representation details throughout\\nthe specifications -- allowing the reuse of different implementations of the\\nsame data structure by abstracting away the details of a specific layout used\\nin memory. Our novel \\\\textit{high-level front-end language} called Pika\\nsignificantly improves the expressiveness of SuSLik. We implemented a layout-agnostic synthesiser from Pika to SuSLik enabling\\npush-button synthesis of C programs with in-place memory updates, along with\\nthe accompanying full proofs that they meet Separation Logic-style\\nspecifications, from high-level specifications that resemble ordinary\\nfunctional programs. Our experiments show that our tool can produce C code that\\nis comparable in its performance characteristics and is sometimes faster than\\nHaskell.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":\"77 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-12\",\"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-2407.09143\",\"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-2407.09143","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

合成分离逻辑(Synthetic Separation Logic,简称 SSL)是为 SuSLik 提供支持的一种形式主义,SuSLik 是一种最先进的方法,用于在类 C 语言中以演绎法合成可证明正确的程序,这些程序可操作基于堆的链接数据结构。首先,它的主要规范组件--归纳谓词,只允许对数据结构形状进行 "emph{first-order}"定义,这导致了用于指定常见模式的 "boiler-plate "谓词的激增。其次,SSL要求对数据结构进行 "emph{具体}"定义,以便综合处理这些数据结构的程序,这就导致每当相关结构的布局发生变化时,都需要更改综合任务的规范。我们建议大幅提升编写用于合成的分离逻辑规范的抽象程度--既简化方法,又使规范更可用、更易读和易遵循。我们避免了在整个规范中重复陈述低层次表示细节的需要--通过抽象掉内存中使用的特定布局细节,允许重复使用相同数据结构的不同实现。我们名为 Pikas 的新颖前端语言(textit{high-level front-end language})极大地提高了 SuSLik 的表现力。我们实现了一个从Pika到SuSLik的布局无关合成器,它可以一键合成具有就地内存更新功能的C语言程序,并附带完整的证明,证明这些程序符合分离逻辑风格的规范,而这些规范来自与普通功能程序类似的高级规范。我们的实验表明,我们的工具可以生成性能相当的 C 代码,有时甚至比 Haskell 更快。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Higher-Order Specificationsfor Deductive Synthesis of Programs with Pointers (Extended version)
Synthetic Separation Logic (SSL) is a formalism that powers SuSLik, the state-of-the-art approach for the deductive synthesis of provably-correct programs in C-like languages that manipulate Heap-based linked data structures. Despite its expressivity, SSL suffers from two shortcomings that hinder its utility. First, its main specification component, inductive predicates, only admits \emph{first-order} definitions of data structure shapes, which leads to the proliferation of ``boiler-plate'' predicates for specifying common patterns. Second, SSL requires \emph{concrete} definitions of data structures to synthesise programs that manipulate them, which results in the need to change a specification for a synthesis task every time changes are introduced into the layout of the involved structures. We propose to significantly lift the level of abstraction used in writing Separation Logic specifications for synthesis -- both simplifying the approach and making the specifications more usable and easy to read and follow. We avoid the need to repetitively re-state low-level representation details throughout the specifications -- allowing the reuse of different implementations of the same data structure by abstracting away the details of a specific layout used in memory. Our novel \textit{high-level front-end language} called Pika significantly improves the expressiveness of SuSLik. We implemented a layout-agnostic synthesiser from Pika to SuSLik enabling push-button synthesis of C programs with in-place memory updates, along with the accompanying full proofs that they meet Separation Logic-style specifications, from high-level specifications that resemble ordinary functional programs. Our experiments show that our tool can produce C code that is comparable in its performance characteristics and is sometimes faster than Haskell.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Memory Consistency and Program Transformations No Saved Kaleidosope: an 100% Jitted Neural Network Coding Language with Pythonic Syntax Towards Quantum Multiparty Session Types The Incredible Shrinking Context... in a decompiler near you Scheme Pearl: Quantum Continuations
×
引用
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