归纳谓词综合模程序(扩展版)
Inductive Predicate Synthesis Modulo Programs (Extended)
AI总结:
针对程序分析中分析器与求解器层面不匹配的问题,提出IPS-MP框架扩展高级语言以指导分析,证明其布尔情况可高效求解且可归约为约束霍恩子句可满足性问题,实现了基于SeaHorn的求解器并应用于智能合约验证。
摘要:
程序分析领域的一个日益增长的趋势是在输入程序的语言内编码验证条件。这通过利用现成的验证器简化了分析工具的设计,但使得与底层求解器的通信更具挑战性。本质上,分析器在输入程序层面运行,而求解器在问题编码层面运行。为弥合这一差距,验证器必须将证明规则从分析器传递给求解器。例如,基于归纳程序验证器构建的并发程序分析器可能需要为底层求解器声明Owicki-Gries风格的证明规则。每一条此类证明规则都进一步规定了程序应如何被验证,这意味着传递证明规则的问题是不变量综合的一种形式。\n同样,许多程序分析任务都归结为相对于某个程序的纯无循环布尔函数(即谓词)的综合。基于这一观察,我们提出了归纳谓词综合模程序(Inductive Predicate Synthesis Modulo Programs,IPS-MP),它以最小的综合特性扩展了高级语言,以指导分析。在IPS-MP中,未知谓词出现在assume和assert语句下,充当模程序语义的规约。现有的综合求解器在处理IPS-MP时效率低下,因为它们针对的是更通用的问题。在本文中,我们证明了IPS-MP在布尔情况下存在高效解决方案,尽管它通常是不可判定的。此外,我们证明了IPS-MP可归约为约束霍恩子句的可满足性问题,该问题不如现有综合问题通用,但表达能力足以编码验证任务。我们提供了从具有挑战性的验证任务(如参数化模型检测)到IPS-MP的归约方法。我们通过基于SeaHorn的高效IPS-MP求解器实现了这些归约,并描述了其在智能合约验证中的应用。
英文摘要:
A growing trend in program analysis is to encode verification conditions within the language of the input program. This simplifies the design of analysis tools by utilizing off-the-shelf verifiers, but makes communication with the underlying solver more challenging. Essentially, the analyzer operates at the level of input programs, whereas the solver operates at the level of problem encodings. To bridge this gap, the verifier must pass along proof-rules from the analyzer to the solver. For example, an analyzer for concurrent programs built on an inductive program verifier might need to declare Owicki-Gries style proof-rules for the underlying solver. Each such proof-rule further specifies how a program should be verified, meaning that the problem of passing proof-rules is a form of invariant synthesis. Similarly, many program analysis tasks reduce to the synthesis of pure, loop-free Boolean functions (i.e., predicates), relative to a program. From this observation, we propose Inductive Predicate Synthesis Modulo Programs (IPS-MP) which extends high-level languages with minimal synthesis features to guide analysis. In IPS-MP, unknown predicates appear under assume and assert statements, acting as specifications modulo the program semantics. Existing synthesis solvers are inefficient at IPS-MP as they target more general problems. In this paper, we show that IPS-MP admits an efficient solution in the Boolean case, despite being generally undecidable. Moreover, we show that IPS-MP reduces to the satisfiability of constrained Horn clauses, which is less general than existing synthesis problems, yet expressive enough to encode verification tasks. We provide reductions from challenging verification tasks -- such as parameterized model checking -- to IPS-MP. We realize these reductions with an efficient IPS-MP-solver based on SeaHorn, and describe a application to smart-contract verification.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。