Qiyuan Zhao, George Pîrlea, Zhendong Ang, Umang Mathur, Ilya Sergey
{"title":"为效率扎根:分离逻辑中基于数组的树的机械化推理","authors":"Qiyuan Zhao, George Pîrlea, Zhendong Ang, Umang Mathur, Ilya Sergey","doi":"10.1145/3636501.3636944","DOIUrl":null,"url":null,"abstract":"Array-based encodings of tree structures are often preferable to linked or abstract data type-based representations for efficiency reasons. Compared to the more traditional encodings, array-based trees do not immediately offer convenient induction principles, and the programs that manipulate them often implement traversals non-recursively, requiring complex loop invariants for their correctness proofs. In this work, we provide a set of definitions, lemmas, and reasoning principles that streamline proofs about array-based trees and programs that work with them. We showcase our proof techniques via a series of small but characteristic examples, culminating with a large case study: verification of a C implementation of a recently published tree clock data structure in a Separation Logic embedded into Coq.","PeriodicalId":516581,"journal":{"name":"Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs","volume":"45 3","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-01-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Rooting for Efficiency: Mechanised Reasoning about Array-Based Trees in Separation Logic\",\"authors\":\"Qiyuan Zhao, George Pîrlea, Zhendong Ang, Umang Mathur, Ilya Sergey\",\"doi\":\"10.1145/3636501.3636944\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Array-based encodings of tree structures are often preferable to linked or abstract data type-based representations for efficiency reasons. Compared to the more traditional encodings, array-based trees do not immediately offer convenient induction principles, and the programs that manipulate them often implement traversals non-recursively, requiring complex loop invariants for their correctness proofs. In this work, we provide a set of definitions, lemmas, and reasoning principles that streamline proofs about array-based trees and programs that work with them. We showcase our proof techniques via a series of small but characteristic examples, culminating with a large case study: verification of a C implementation of a recently published tree clock data structure in a Separation Logic embedded into Coq.\",\"PeriodicalId\":516581,\"journal\":{\"name\":\"Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs\",\"volume\":\"45 3\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-01-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3636501.3636944\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3636501.3636944","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
摘要
出于效率的考虑,基于数组的树结构编码通常优于基于链接或抽象数据类型的表示法。与更传统的编码方式相比,基于数组的树并不能立即提供方便的归纳原则,而且操作这些树的程序往往以非递归方式实现遍历,因此需要复杂的循环不变式来证明其正确性。在这项工作中,我们提供了一系列定义、lemmas 和推理原则,简化了对基于数组的树和使用它们的程序的证明。我们通过一系列小而有特色的例子展示了我们的证明技术,最后还进行了一个大型案例研究:用嵌入 Coq 的分离逻辑验证最近发布的树时钟数据结构的 C 语言实现。
Rooting for Efficiency: Mechanised Reasoning about Array-Based Trees in Separation Logic
Array-based encodings of tree structures are often preferable to linked or abstract data type-based representations for efficiency reasons. Compared to the more traditional encodings, array-based trees do not immediately offer convenient induction principles, and the programs that manipulate them often implement traversals non-recursively, requiring complex loop invariants for their correctness proofs. In this work, we provide a set of definitions, lemmas, and reasoning principles that streamline proofs about array-based trees and programs that work with them. We showcase our proof techniques via a series of small but characteristic examples, culminating with a large case study: verification of a C implementation of a recently published tree clock data structure in a Separation Logic embedded into Coq.