Linear maps

Shuvendu K. Lahiri, S. Qadeer, David Walker
{"title":"Linear maps","authors":"Shuvendu K. Lahiri, S. Qadeer, David Walker","doi":"10.1145/1929529.1929531","DOIUrl":null,"url":null,"abstract":"Verification of large programs is impossible without proof techniques that allow local reasoning and information hiding. In this paper, we take the approach of modeling the heap as a collection of partial functions with disjoint domains. We call each such partial function a linear map. Programmers may select objects from linear maps, update linear maps or transfer addresses and their contents from one linear map to another. Programmers may also declare new linear map variables and pass linear maps as arguments to procedures. The program logic prevents any of these operations from duplicating locations and thereby breaking the key heap representation invariant: the domains of all linear maps remain disjoint. Linear maps facilitate modular reasoning because programs that use them are also able to use simple, classical frame rules to preserve information about heap state across procedure calls. We illustrate our approach through examples, prove that our verification rules are sound, and show that operations on linear maps may be erased and replaced by equivalent operations on a single, global heap.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-01-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Programming Languages meets Program Verification","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1929529.1929531","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6

Abstract

Verification of large programs is impossible without proof techniques that allow local reasoning and information hiding. In this paper, we take the approach of modeling the heap as a collection of partial functions with disjoint domains. We call each such partial function a linear map. Programmers may select objects from linear maps, update linear maps or transfer addresses and their contents from one linear map to another. Programmers may also declare new linear map variables and pass linear maps as arguments to procedures. The program logic prevents any of these operations from duplicating locations and thereby breaking the key heap representation invariant: the domains of all linear maps remain disjoint. Linear maps facilitate modular reasoning because programs that use them are also able to use simple, classical frame rules to preserve information about heap state across procedure calls. We illustrate our approach through examples, prove that our verification rules are sound, and show that operations on linear maps may be erased and replaced by equivalent operations on a single, global heap.
线性映射
没有允许局部推理和信息隐藏的证明技术,大型程序的验证是不可能的。在本文中,我们将堆建模为具有不相交域的部分函数的集合。我们称每一个这样的偏函数为线性映射。程序员可以从线性映射中选择对象,更新线性映射或将地址及其内容从一个线性映射转移到另一个线性映射。程序员还可以声明新的线性映射变量,并将线性映射作为参数传递给过程。程序逻辑防止任何这些操作复制位置,从而破坏键堆表示的不变性:所有线性映射的域保持不相交。线性映射促进了模块化推理,因为使用它们的程序也能够使用简单、经典的框架规则来保存关于过程调用的堆状态的信息。我们通过示例说明了我们的方法,证明了我们的验证规则是合理的,并表明线性映射上的操作可以被擦除和替换为单个全局堆上的等效操作。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信