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

多项式循环不变量的代数与算法方法

Algebraic and Algorithmic Methods for Computing Polynomial Loop Invariants

KU Leuven(荷语鲁汶大学);Inria, CNRS, ENS de Lyon, Université Claude Bernard Lyon 1, LIP, UMR 5668(法国国家信息与自动化研究所、法国国家科学研究中心、里昂高等师范学校、里昂第一大学)

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

AI总结:

本文提出两种算法,用于生成多项式循环不变量,通过代数几何工具结合线性代数和多项式理想计算,提高效率。

摘要:

循环不变量是程序循环在每次迭代前后都成立的性质。它们常用于验证程序并确保算法在执行过程中始终产生正确结果。因此,生成不变量成为循环的关键任务。我们特别关注多项式循环,其中循环条件和循环内的赋值均以多项式形式表达。尽管计算一般循环的多项式不变量是不可判定的,但针对某些循环类别已开发出高效的算法。例如,当while循环内的所有赋值涉及线性多项式时,循环变得可解。在本工作中,我们研究更一般的情况,其中多项式可以具有任意次数。利用代数几何工具,我们提出了两种算法,用于在给定向量子空间内生成所有多项式不变量,适用于具有非确定性条件语句的分支循环。这些算法结合了线性代数子程序和多项式理想计算。它们根据循环变量的初始值是否指定或作为参数而有所不同。此外,我们还提出了一种更高效的算法,用于生成特定形式的多项式不变量,适用于所有初始值。该算法避免了昂贵的理想计算。

英文摘要:

Loop invariants are properties of a program loop that hold both before and after each iteration of the loop. They are often used to verify programs and ensure that algorithms consistently produce correct results during execution. Consequently, generating invariants becomes a crucial task for loops. We specifically focus on polynomial loops, where both the loop conditions and the 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 can have arbitrary degrees. Using tools from algebraic geometry, we present two algorithms designed to generate all polynomial invariants within a given vector subspace, for a branching loop with nondeterministic conditional statements. These algorithms combine linear algebraic subroutines with computations on polynomial ideals. They differ depending on whether the initial values of the loop variables are specified or treated as parameters. Additionally, we present a much more efficient algorithm for generating polynomial invariants of a specific form, applicable to all initial values. This algorithm avoids expensive ideal computations.

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

↑