arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.23389cs.LOcs.PL
收藏

CIll: 基于LLM的CTI引导不变式生成用于模型检查

CIll: CTI-Guided Invariant Generation via LLMs for Model Checking

Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学)

Yuheng Su, Tianjun Bu, Qiusong Yang, Yiwei Ci, Enyuan Tian

AI总结:

CIll通过结合LLM和IC3,利用CTI引导生成模型检查中的归纳不变式,提升效率和可扩展性。

摘要:

归纳不变式在模型检查中至关重要,但自动高效地生成有效的归纳不变式仍然具有挑战性。一种常见方法是迭代分析归纳反例(CTI)并推导出排除它们的不变式,如IC3。然而,IC3的子句学习仅限于CNF表示。对于某些设计,生成的不变式可能需要大量子句,这会损害可扩展性。我们提出了CIll,一种基于LLM的CTI引导框架,用于模型检查中的不变式生成。CIll在正确性检查和归纳性检查之间交替进行,用于生成的不变式。在正确性检查中,CIll使用BMC验证生成的不变式是否在给定限制内保持在可达状态中。在归纳性检查中,CIll检查生成的不变式与目标属性是否在累积强化下成为归纳的。当归纳性失败时,CIll提取CTI并将其提供给LLM。LLM检查设计和CTI以提出新的不变式,以使CTI失效。所提出的不变式随后通过正确性检查和归纳性检查重新验证,并且循环继续,直到通过生成的不变式强化的原始属性成为归纳的。CIll还利用IC3与LLM合作自动发现不变式,并使用K-归纳作为互补引擎。为了提高性能,CIll应用局部证明并重用IC3学习的不变式,减少冗余搜索并加快收敛速度。在我们的评估中,CIll在RISCV-Formal框架内证明了完全合规性,并在NERV和PicoRV32中证明了所有非M指令的完全准确性,而M扩展则针对RISCV-Formal提供的RVFI ALTOPS替代语义进行了证明。

英文摘要:

Inductive invariants are crucial in model checking, yet generating effective inductive invariants automatically and efficiently remains challenging. A common approach is to iteratively analyze counterexamples to induction (CTIs) and derive invariants that rule them out, as in IC3. However, IC3's clause-based learning is limited to a CNF representation. For some designs, the resulting invariants may require a large number of clauses, which hurts scalability. We present CIll, a CTI-guided framework that leverages LLMs to synthesize invariants for model checking. CIll alternates between (bounded) correctness checking and inductiveness checking for the generated invariants. In correctness checking, CIll uses BMC to validate whether the generated invariants hold on reachable states within a given bound. In inductiveness checking, CIll checks whether the generated invariants, together with the target property, become inductive under the accumulated strengthening. When inductiveness fails, CIll extracts CTIs and provides them to the LLM. The LLM inspects the design and the CTI to propose new invariants that invalidate the CTIs. The proposed invariants are then re-validated through correctness and inductiveness checks, and the loop continues until the original property strengthened by the generated invariants becomes inductive. CIll also employs IC3 to work with the LLM for automatically discovering invariants, and uses K-Induction as a complementary engine. To improve performance, CIll applies local proof and reuses invariants learned by IC3, reducing redundant search and accelerating convergence. In our evaluation, CIll proved full compliance within RISCV-Formal framework and full accuracy of all non-M instructions in NERV and PicoRV32, whereas M extensions are proved against the RVFI ALTOPS substitute semantics provided by RISCV-Formal.

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

↑