Automatically proving separation logic entailments is a fundamental challenge in verification. While rule-based methods rely on separation logic rules (lemmas) for automation, these rule statements are insufficient for describing automation strategies, which usually involve the alignment and elimination of corresponding memory layouts in specific scenarios. To overcome this limitation, we propose Stellis, a strategy language for purifying separation logic entailments, i.e., removing all spatial formulas to reduce the entailment to a simpler pure entailment. Stellis features a powerful matching mechanism and a flexible action description, enabling the straightforward encoding of a wide range of strategies. To ensure strategy soundness, we introduce an algorithm that generates a soundness condition for each strategy, thereby reducing the soundness of each strategy to the correctness of its soundness condition. Furthermore, based on a mechanized reduction soundness theorem, our prototype implementation generates correctness proofs for the overall automation. We evaluate our system on a benchmark of 229 entailments collected from verification of standard linked data structures and the memory module of a microkernel, and the evaluation results demonstrate that, with such flexibility and convenience provided, our system is also highly effective, which automatically purifies 95.6% (219 out of 229) of the entailments using 5 libraries with 98 strategies.
翻译:自动证明分离逻辑蕴含是验证领域的一个基本挑战。虽然基于规则的方法依赖分离逻辑规则(引理)实现自动化,但这些规则陈述不足以描述自动化策略,后者通常涉及在特定场景中对齐和消除对应的内存布局。为克服这一限制,我们提出了Stellis,一种用于纯化分离逻辑蕴含的策略语言,即通过移除所有空间公式将蕴含简化为更简单的纯蕴含。Stellis具备强大的匹配机制和灵活的动作描述功能,能够直接编码多种策略。为确保策略的正确性,我们引入了一种算法,为每个策略生成正确性条件,从而将策略的正确性归结为其正确性条件的验证。此外,基于机械化的归约正确性定理,我们的原型实现为整体自动化过程生成了正确性证明。我们在包含229个蕴含的基准测试集上评估了系统,这些蕴含收集自标准链表数据结构的验证和微内核内存模块。评估结果表明,在提供如此灵活性和便利性的同时,我们的系统仍具有高效性:使用5个库中的98种策略,自动纯化了95.6%(229个中的219个)的蕴含。