在证明中将for-loops视为一等公民
Treating for-Loops as First-Class Citizens in Proofs
摘要:
索引循环作用域已被证明是一个有用的工具,在创建健全的循环不变规则的动态逻辑的程序设计语言与突然完成,如Java。这些规则不像其他处理突然完成的方法那样需要对循环体进行程序转换。然而,索引循环作用域是专门为while循环提供循环不变规则而设计的,并且工作起来相当不透明。在这里,我们建议用一个更透明的解决方案来取代索引循环范围,这也让我们将这个想法从while循环扩展到for循环。我们进一步提出了健全的循环展开规则,而,做和循环,既不需要程序转换的循环体,也不使用嵌套的方式。这种方法允许循环在证明中被视为一等公民-而不是通常的将for循环转换为while循环的方法-这使得半自动化证明更加透明,更容易为用户所遵循,用户可能需要交互才能关闭证明。
英文摘要:
Indexed loop scopes have been shown to be a helpful tool in creating sound loop invariant rules in dynamic logic for programming languages with abrupt completion, such as Java. These rules do not require program transformation of the loop body, as other approaches to dealing with abrupt completion do. However, indexed loop scopes were designed specifically to provide a loop invariant rule for while loops and work rather opaquely. Here we propose replacing indexed loop scopes with a more transparent solution, which also lets us extend this idea from while loops to for loops. We further present sound loop unrolling rules for while, do 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 in proofs -- rather than the usual approach of transforming for loops into while loops -- which makes semi-automated proofs more transparent and easier to follow for the user, whose interactions may be required in order to close the proofs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。