数据驱动的无模板不变量生成
Data-Driven Template-Free Invariant Generation
AI总结:
本文提出一种数据驱动的无模板不变量生成方法,将候选不变量视为分类器,用决策树从正反例学习,并通过运行时监控修订,以概率收敛到可达状态集的过度近似,实验证明仅用少量状态即可学习有效不变量。
摘要:
并发程序的自动验证面临状态爆炸问题,这是由于顺序组件之间指数级的可能交错以及大型或无限的状态空间所致。另一种方法是演绎验证,给定候选不变量,我们建立归纳不变性,并证明任何满足不变量的状态也是安全的。然而,学习(归纳)程序不变量是困难的。为此,我们提出了一种数据驱动的程序不变量综合过程,其中假设程序不变量是一个表达式,它表征了可达程序状态的(希望是紧密的)过度近似。我们方法的主要思想是:(1)我们将候选不变量视为一个分类器,将(采样)程序轨迹中观察到的状态与推测为不可达的状态分开。(2)我们开发了一种枚举式、无模板的方法,从正例和反例中学习此类分类器。其核心是,我们的枚举方法采用决策树来生成不过度拟合观察状态(从而泛化)的表达式。(3)我们采用运行时框架来监控可能反驳候选不变量的程序执行;每次反驳都会触发对候选不变量的修订。我们的运行时框架可以看作是统计模型检查的一个实例,这为我们提供了关于候选不变量的概率保证。我们还表明,在某些情况下,我们的反例引导归纳综合方法(在概率上)收敛到可达状态集的过度近似。我们的实验结果表明,我们的框架在广泛的各种并发程序中,仅使用可达状态集的一小部分就能擅长学习有用的不变量。
英文摘要:
Automatic verification of concurrent programs faces state explosion due to the exponential possible interleavings of its sequential components coupled with large or infinite state spaces. An alternative is deductive verification, where given a candidate invariant, we establish inductive invariance and show that any state satisfying the invariant is also safe. However, learning (inductive) program invariants is difficult. To this end, we propose a data-driven procedure to synthesize program invariants, where it is assumed that the program invariant is an expression that characterizes a (hopefully tight) over-approximation of the reachable program states. The main ideas of our approach are: (1) We treat a candidate invariant as a classifier separating states observed in (sampled) program traces from those speculated to be unreachable. (2) We develop an enumerative, template-free approach to learn such classifiers from positive and negative examples. At its core, our enumerative approach employs decision trees to generate expressions that do not over-fit to the observed states (and thus generalize). (3) We employ a runtime framework to monitor program executions that may refute the candidate invariant; every refutation triggers a revision of the candidate invariant. Our runtime framework can be viewed as an instance of statistical model checking, which gives us probabilistic guarantees on the candidate invariant. We also show that such in some cases, our counterexample-guided inductive synthesis approach converges (in probability) to an overapproximation of the reachable set of states. Our experimental results show that our framework excels in learning useful invariants using only a fraction of the set of reachable states for a wide variety of concurrent programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。