arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.09232cs.SCcs.PLmath.AG
收藏

用于计算多项式循环不变量的代数工具

Algebraic Tools for Computing Polynomial Loop Invariants

Erdenebayar Bayarmagnai, Fatemeh Mohammadi, Rémi Prébet

AI总结:

针对任意次数多项式循环的不变量计算问题,本研究借助代数几何工具提出两种按初始值是否为参数区分的算法,可生成指定次数内的所有多项式不变量,并给出超计算能力时生成特定不变量的替代方法。

摘要:

循环不变量是程序循环的一类性质,在循环的每次迭代前后均成立。它们常被用于程序验证,确保算法在执行过程中始终输出正确结果,因此不变量的生成成为循环相关研究的关键任务。我们专门聚焦于多项式循环,这类循环的循环条件和循环内的赋值均以多项式形式表达。尽管为通用循环计算多项式不变量是不可判定的,但针对特定类别循环的高效算法已被开发出来。例如,当while循环内的所有赋值都涉及线性多项式时,该循环是可求解的。在本研究中,我们探讨多项式具有任意次数的更通用情形。\n我们应用代数几何领域的工具,提出了两种算法,用于生成while循环中次数不超过指定值的所有多项式不变量。这两种算法的区别在于循环变量的初始值是给定的还是被视为参数。此外,我们引入了多种方法来处理代数问题超出我们方法计算能力的情况,在这类场景中,我们确定了生成特定多项式不变量的替代方案。

英文摘要:

Loop invariants are properties of a program loop that hold before and after each iteration of the loop. They are often employed to verify programs and ensure that algorithms consistently produce correct results during execution. Consequently, the generation of invariants becomes a crucial task for loops. We specifically focus on polynomial loops, where both the loop conditions and assignments within the loop are expressed as polynomials. Although computing polynomial invariants for general loops is undecidable, efficient algorithms have been developed for certain classes of loops. For instance, when all assignments within a while loop involve linear polynomials, the loop becomes solvable. In this work, we study the more general case where the polynomials exhibit arbitrary degrees. Applying tools from algebraic geometry, we present two algorithms designed to generate all polynomial invariants for a while loop, up to a specified degree. These algorithms differ based on whether the initial values of the loop variables are given or treated as parameters. Furthermore, we introduce various methods to address cases where the algebraic problem exceeds the computational capabilities of our methods. In such instances, we identify alternative approaches to generate specific polynomial invariants.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑