循环不变量:分析、分类和实例
Loop invariants: analysis, classification, and examples
摘要:
软件验证已成为确保信息技术持续进步的一个关键问题。完整的验证通常需要,作为一个关键的步骤,装备每个循环与“循环不变”。除了它们在验证中的作用,循环不变量通过提供对算法本质的基本见解来帮助程序理解。在实践中,找到合理和有用的不变量仍然是一个挑战。幸运的是,许多不变量似乎直观地表现出共同的味道。因此,理解这些基本不变模式可以为理解和验证各种程序提供帮助。我们对计算机科学不同领域的一系列基本算法中的循环不变量进行了系统的识别、验证和分类。本文分析了模式,在这项研究中发现,如何从后置条件的不变量,它提出了一个分类的不变量,根据这些模式,并提出了其应用程序的算法审查。讨论还表明,需要高层次的规范的基础上“域理论”。它描述了如何不变量和相应的算法已被机械验证使用自动程序证明;证明源文件是可用的。贡献还包括不变的推理和基于模型的规范的建议。
英文摘要:
Software verification has emerged as a key concern for ensuring the continued progress of information technology. Full verification generally requires, as a crucial step, equipping each loop with a "loop invariant". Beyond their role in verification, loop invariants help program understanding by providing fundamental insights into the nature of algorithms. In practice, finding sound and useful invariants remains a challenge. Fortunately, many invariants seem intuitively to exhibit a common flavor. Understanding these fundamental invariant patterns could therefore provide help for understanding and verifying a large variety of programs. We performed a systematic identification, validation, and classification of loop invariants over a range of fundamental algorithms from diverse areas of computer science. This article analyzes the patterns, as uncovered in this study, governing how invariants are derived from postconditions; it proposes a taxonomy of invariants according to these patterns, and presents its application to the algorithms reviewed. The discussion also shows the need for high-level specifications based on "domain theory". It describes how the invariants and the corresponding algorithms have been mechanically verified using an automated program prover; the proof source files are available. The contributions also include suggestions for invariant inference and for model-based specification.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。