(不可)可解循环分析
(Un)Solvable Loop Analysis
AI总结:
本文提出一种针对不可解循环的不变量合成技术,通过自动划分变量并识别缺陷变量,从缺陷单项式合成闭式解多项式,或合成等价的可解循环,从而生成不变量,实验验证了其可行性与适用性。
摘要:
自动生成不变量是计算机辅助分析概率性和确定性程序以及编译器优化的关键,也是一个具有挑战性的开放问题。虽然该问题在一般情况下是不可判定的,但对于受限的循环类别,其目标已经得到解决。对于由Kapur和Rodríguez-Carbonell于2004年引入的可解循环类,可以从模拟循环行为的递推方程的闭式解中自动计算不变量。在本文中,我们建立了一种针对不可解循环(即不可解循环)的不变量合成技术。我们的方法自动划分程序变量,并识别出表征不可解性的所谓缺陷变量。在此,我们考虑以下两个应用。首先,我们提出了一种新技术,从缺陷单项式中自动合成多项式,这些多项式具有闭式解,从而产生多项式循环不变量。其次,给定一个不可解循环,我们合成具有以下性质的可解循环:可解循环的不变多项式都是给定不可解循环的所有不变量。我们的实现和实验证明了我们的方法对确定性和概率性程序的可行性和适用性。
英文摘要:
Automatically generating invariants, key to computer-aided analysis of probabilistic and deterministic programs and compiler optimisation, is a challenging open problem. Whilst the problem is in general undecidable, the goal is settled for restricted classes of loops. For the class of solvable loops, introduced by Kapur and Rodríguez-Carbonell in 2004, one can automatically compute invariants from closed-form solutions of recurrence equations that model the loop behaviour. In this paper we establish a technique for invariant synthesis for loops that are not solvable, termed unsolvable loops. Our approach automatically partitions the program variables and identifies the so-called defective variables that characterise unsolvability. Herein we consider the following two applications. First, we present a novel technique that automatically synthesises polynomials from defective monomials, that admit closed-form solutions and thus lead to polynomial loop invariants. Second, given an unsolvable loop, we synthesise solvable loops with the following property: the invariant polynomials of the solvable loops are all invariants of the given unsolvable loop. Our implementation and experiments demonstrate both the feasibility and applicability of our approach to both deterministic and probabilistic programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。