跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算机科学中的逻辑

arXiv:2211.12228 (cs)
[提交于 2022年11月22日]

标题:Contract Strengthening through Constrained Horn Clause Verification

作者:Emanuele De Angelis, Fabio Fioravanti, Alberto Pettorossi, Maurizio Proietti
查看论文《Contract Strengthening through Constrained Horn Clause Verification》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:The functional properties of a program are often specified by providing a contract for each of its functions. A contract of a function consists of a pair of formulas, called a precondition and a postcondition, which, respectively, should hold before and after execution of that function. It might be the case that the contracts supplied by the programmer are not adequate to allow a verification system to prove program correctness, that is, to show that for every function, if the precondition holds and the execution of the function terminates, then the postcondition holds. We address this problem by providing a technique which may strengthen the postconditions of the functions, thereby improving the ability of the verifier to show program correctness. Our technique consists of four steps. First, the translation of the given program, which may manipulate algebraic data structures (ADTs), and its contracts into a set of constrained Horn clauses (CHCs) whose satisfiability implies the validity of the given contracts. Then, the derivation, via CHC transformation performed by the VeriCaT tool, of a new set of CHCs that manipulate only basic sorts (such as booleans or integers) and whose satisfiability implies the satisfiability of the original set of clauses. Then, the construction of a model, if any, of the new, derived CHCs using the CHC solver SPACER for basic sorts. Finally, the translation of that model into the formulas that suitably strengthen the postconditions of the given contracts. We will present our technique through an example consisting of a Scala program for reversing lists. Note that the Stainless verifier is not able to prove the correctness of that program when considering the given contracts, while it succeeds when considering the contracts with the strengthened postconditions constructed by applying our technique.
评论: In Proceedings HCVS/VPT 2022, arXiv:2211.10675
主题: 计算机科学中的逻辑 (cs.LO); 程序设计语言 (cs.PL)
引用方式: arXiv:2211.12228 [cs.LO]
  (或者 arXiv:2211.12228v1 [cs.LO] 对于此版本)
  https://doi.org/10.48550/arXiv.2211.12228
期刊参考: EPTCS 373, 2022, pp. 23-34
相关 DOI: https://doi.org/10.4204/EPTCS.373.3

提交历史

来自:EPTCS
[v1] 2022年11月22日 星期二 12:35:19 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.LO
< 上一篇   |   下一篇 >
最新 | 近期 | 2022-11
切换浏览方式为:
cs
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站