使用基于契约式设计的细化类型的静态代码分析

K. Ishii, S. Nishizaki
{"title":"使用基于契约式设计的细化类型的静态代码分析","authors":"K. Ishii, S. Nishizaki","doi":"10.1145/3384544.3384587","DOIUrl":null,"url":null,"abstract":"Design by Contract is a programming methodology by which it is possible to annotate program codes with contracts in order to increase the safety of the program. The contracts represent the speci-fication of the software and are categorized into three groups: pre-condition, post-condition, and invariant. The idea of Design by Contract provides the correctness of a program code, satisfying that the caller of each procedure assumes the responsibility for the pre-condition and the callee assumes the responsibility for the post-condition. Findler et al. proposed a formal system based on the typed lambda calculus in which contracts are verified dynamically, that is, in run-time. Flanagan et al. introduced a formal system in which both static and dynamic checking of contracts are possible. In their system, it is possible to represent a contract as static, typing information using refinement type and dependent type. In our paper, we introduce the typed lambda calculus with dependent type and refinement type in the style of Flanagan and study a static analysis in the calculus. The static analysis provides refining of contracts and code optimization based on the contracts. We implement the analyzer using an SMT (Satisfiability Modulo Theory) server.","PeriodicalId":200246,"journal":{"name":"Proceedings of the 2020 9th International Conference on Software and Computer Applications","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-02-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Static Code Analysis Using Refinement Types based on Design by Contract\",\"authors\":\"K. Ishii, S. Nishizaki\",\"doi\":\"10.1145/3384544.3384587\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Design by Contract is a programming methodology by which it is possible to annotate program codes with contracts in order to increase the safety of the program. The contracts represent the speci-fication of the software and are categorized into three groups: pre-condition, post-condition, and invariant. The idea of Design by Contract provides the correctness of a program code, satisfying that the caller of each procedure assumes the responsibility for the pre-condition and the callee assumes the responsibility for the post-condition. Findler et al. proposed a formal system based on the typed lambda calculus in which contracts are verified dynamically, that is, in run-time. Flanagan et al. introduced a formal system in which both static and dynamic checking of contracts are possible. In their system, it is possible to represent a contract as static, typing information using refinement type and dependent type. In our paper, we introduce the typed lambda calculus with dependent type and refinement type in the style of Flanagan and study a static analysis in the calculus. The static analysis provides refining of contracts and code optimization based on the contracts. We implement the analyzer using an SMT (Satisfiability Modulo Theory) server.\",\"PeriodicalId\":200246,\"journal\":{\"name\":\"Proceedings of the 2020 9th International Conference on Software and Computer Applications\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-02-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2020 9th International Conference on Software and Computer Applications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3384544.3384587\",\"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 2020 9th International Conference on Software and Computer Applications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3384544.3384587","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

契约式设计是一种编程方法,通过它可以用契约注释程序代码,以增加程序的安全性。契约代表了软件的规范,分为三组:前置条件、后置条件和不变条件。契约式设计的思想提供了程序代码的正确性,满足了每个过程的调用者承担前置条件的责任,而被调用者承担后置条件的责任。Findler等人提出了一种基于类型化lambda演算的形式化系统,其中契约是动态验证的,即在运行时进行验证。Flanagan等人引入了一个正式的系统,在这个系统中,契约的静态和动态检查都是可能的。在他们的系统中,可以将契约表示为静态的、使用细化类型和依赖类型的类型信息。在本文中,我们引入了具有Flanagan风格的依赖类型和细化类型的类型化λ演算,并研究了演算中的静态分析。静态分析提供了契约的细化和基于契约的代码优化。我们使用SMT(可满足模理论)服务器实现分析器。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Static Code Analysis Using Refinement Types based on Design by Contract
Design by Contract is a programming methodology by which it is possible to annotate program codes with contracts in order to increase the safety of the program. The contracts represent the speci-fication of the software and are categorized into three groups: pre-condition, post-condition, and invariant. The idea of Design by Contract provides the correctness of a program code, satisfying that the caller of each procedure assumes the responsibility for the pre-condition and the callee assumes the responsibility for the post-condition. Findler et al. proposed a formal system based on the typed lambda calculus in which contracts are verified dynamically, that is, in run-time. Flanagan et al. introduced a formal system in which both static and dynamic checking of contracts are possible. In their system, it is possible to represent a contract as static, typing information using refinement type and dependent type. In our paper, we introduce the typed lambda calculus with dependent type and refinement type in the style of Flanagan and study a static analysis in the calculus. The static analysis provides refining of contracts and code optimization based on the contracts. We implement the analyzer using an SMT (Satisfiability Modulo Theory) server.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信