一种基于不变量和求和的循环验证方法
A Complete Approach to Loop Verification with Invariants and Summaries
摘要:
不变量是验证循环正确性的主要方法。作为一种替代,循环契约,它明确了基础归纳证明的前提和结论,有时可以更自然地捕获正确性条件。但是,尽管有这种优势,第二种方法得到很少的关注,这篇文章的目标是把它从它的利基。我们给出了循环合同理论的第一个全面的阐述,包括其完备性的表征。我们展示了标准算法的具体例子,展示了它们的相对优点。此外,我们展示了一个新的建设性的翻译之间的两种方法,这使得所选择的规范方法从验证后端。
英文摘要:
Invariants are the predominant approach to verify the correctness of loops. As an alternative, loop contracts, which make explicit the premise and conclusion of the underlying induction proof, can sometimes capture correctness conditions more naturally. But despite this advantage, the second approach receives little attention overall, and the goal of this paper is to lift it out of its niche. We give the first comprehensive exposition of the theory of loop contracts, including a characterization of its completeness. We show concrete examples on standard algorithms that showcase their relative merits. Moreover, we demonstrate a novel constructive translation between the two approaches, which decouples the chosen specification approach from the verification backend.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。