Loop invariants characterize the partial result computed by a loop so far up to an intermediate state. Such invariants are correct, if they can be propagated forward through arbitrary iterations. Invariants can be complemented by summaries that characterize the remaining iterations as a binary relation between intermediate states to possible final states. Dually to invariants, summaries are correct if the intermediate state of reference can be propagated backwards towards the starting state, which may often encode the bulk of the correctness of a loop more naturally. In this paper, we derive sound verification conditions for this approach, and moreover characterize completeness relative to a class of "safe" invariants, alongside with fundamental and novel insights in the relation between invariants and summaries. All theoretical results have immediate practical consequences for tool use and construction. A preliminary evaluation of automation potential shows that the proposed approach is competitive, even without specialized solving strategies.
翻译:滚动变数是迄今为止由循环到中间状态所计算的部分结果的特征。 这种变式是正确的, 如果它们可以通过任意的迭代来传播的话。 变式可以由将其余的迭代作为中间国与可能的最终状态之间的二进制关系加以补充的摘要来补充。 双于变式, 如果中间参照状态可以向起始国传播, 中间参照状态可以向后向向向向后传播, 从而往往可以更自然地将循环的正确性大部分编码起来。 在本文中, 我们为这一方法提出了健全的核查条件, 并且将完整性与“ 安全” 变异体的类别相对起来, 并辅之以关于变异体与摘要之间关系的基本和新颖的洞察。 所有理论结果都对工具的使用和构建产生直接的实际后果。 对自动化潜力的初步评估表明, 拟议的办法是竞争性的, 即使没有专门的解决战略。