技术报告:使用循环作用域和for循环
Technical Report: Using Loop Scopes with for-Loops
摘要:
循环作用域已被证明是一个有用的工具,在创建健全的循环不变规则,不需要程序转换的循环体。在这里,我们将这个想法从while循环,for循环,也提出了健全的循环展开规则,while和for循环,既不需要程序转换的循环体,也不使用嵌套的方式。这种方法允许将for循环视为一等公民-而不是将for循环转换为while循环的通常方法-这使得用户更容易遵循半自动化证明,用户可能需要提供帮助才能完成证明。
英文摘要:
Loop scopes have been shown to be a helpful tool in creating sound loop invariant rules which do not require program transformation of the loop body. Here we extend this idea from while-loops to for-loops and also present sound loop unrolling rules for while- and for-loops, which require neither program transformation of the loop body, nor the use of nested modalities. This approach allows for-loops to be treated as first-class citizens -- rather than the usual approach of transforming for-loops into while-loops -- which makes semi-automated proofs easier to follow for the user, who may need to provide help in order to finish the proof.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。