二次不变式的线性循环合成
Linear Loop Synthesis for Quadratic Invariants
AI总结:
本文研究循环合成问题,提出一种过程,给定二次方程即可判定并合成具有线性更新且满足该二次不变式的非嵌套while循环,确保变量取得无限多值,使循环设计上正确且无需验证。
摘要:
不变式是形式化循环验证的关键,因为它们捕获了在每次循环迭代前后均有效的循环性质。然而,即使对于语法受限的循环类别,生成不变式也是一项众所周知的困难任务。在本文中,我们不再为给定的循环生成不变式,而是合成能够展现出由不变式给定的预定义行为的循环。从形式化循环验证的角度来看,合成的循环在设计上就是正确的,因此不再需要被验证。为了克服对任意强不变式进行推理的困难,在本文中,我们构造了具有线性更新且展现出多项式等式不变式的简单(非嵌套)while循环。我们不再求解任意多项式方程,而是考虑由任意数量变量的单个二次不变式定义的循环性质。我们提出了一种过程,给定一个二次方程,该过程能够判定是否存在一个满足该方程且具有仿射更新的循环。此外,如果答案为肯定,该过程会合成一个循环,并确保其变量能取得无限多个不同的值。
英文摘要:
Invariants are key to formal loop verification as they capture loop properties that are valid before and after each loop iteration. Yet, generating invariants is a notorious task already for syntactically restricted classes of loops. Rather than generating invariants for given loops, in this paper we synthesise loops that exhibit a predefined behaviour given by an invariant. From the perspective of formal loop verification, the synthesised loops are thus correct by design and no longer need to be verified. To overcome the hardness of reasoning with arbitrarily strong invariants, in this paper we construct simple (non-nested) while loops with linear updates that exhibit polynomial equality invariants. Rather than solving arbitrary polynomial equations, we consider loop properties defined by a single quadratic invariant in any number of variables. We present a procedure that, given a quadratic equation, decides whether a loop with affine updates satisfying this equation exists. Furthermore, if the answer is positive, the procedure synthesises a loop and ensures its variables achieve infinitely many different values.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。