Inferring better contracts

Yi Wei, Carlo A. Furia, Nikolay Kazmin, B. Meyer
{"title":"Inferring better contracts","authors":"Yi Wei, Carlo A. Furia, Nikolay Kazmin, B. Meyer","doi":"10.1145/1985793.1985820","DOIUrl":null,"url":null,"abstract":"Considerable progress has been made towards automatic support for one of the principal techniques available to enhance program reliability: equipping programs with extensive contracts. The results of current contract inference tools are still often unsatisfactory in practice, especially for programmers who already apply some kind of basic Design by Contract discipline, since the inferred contracts tend to be simple assertions - the very ones that programmers find easy to write. We present new, completely automatic inference techniques and a supporting tool, which take advantage of the presence of simple programmer-written contracts in the code to infer sophisticated assertions, involving for example implication and universal quantification. Applied to a production library of classes covering standard data structures such as linked lists, arrays, stacks, queues and hash tables, the tool is able, entirely automatically, to infer 75% of the complete contracts - contracts yielding the full formal specification of the classes - with very few redundant or irrelevant clauses.","PeriodicalId":412454,"journal":{"name":"2011 33rd International Conference on Software Engineering (ICSE)","volume":"216 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-05-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"92","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2011 33rd International Conference on Software Engineering (ICSE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1985793.1985820","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 92

Abstract

Considerable progress has been made towards automatic support for one of the principal techniques available to enhance program reliability: equipping programs with extensive contracts. The results of current contract inference tools are still often unsatisfactory in practice, especially for programmers who already apply some kind of basic Design by Contract discipline, since the inferred contracts tend to be simple assertions - the very ones that programmers find easy to write. We present new, completely automatic inference techniques and a supporting tool, which take advantage of the presence of simple programmer-written contracts in the code to infer sophisticated assertions, involving for example implication and universal quantification. Applied to a production library of classes covering standard data structures such as linked lists, arrays, stacks, queues and hash tables, the tool is able, entirely automatically, to infer 75% of the complete contracts - contracts yielding the full formal specification of the classes - with very few redundant or irrelevant clauses.
推断更好的合同
在提高项目可靠性的主要技术之一的自动支持方面已经取得了相当大的进展:为项目提供广泛的合同。目前的契约推断工具在实践中仍然经常不能令人满意,特别是对于已经应用了某种基本的契约设计原则的程序员来说,因为推断的契约往往是简单的断言——程序员发现很容易编写的断言。我们提出了新的、完全自动的推理技术和一个支持工具,它利用代码中存在的程序员编写的简单契约来推断复杂的断言,例如涉及隐含和通用量化。应用于涵盖标准数据结构(如链表、数组、堆栈、队列和哈希表)的类的生产库时,该工具能够完全自动地推断出75%的完整契约——生成类的完整正式规范的契约——只有很少的冗余或不相关的子句。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:604180095
Book学术官方微信