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

充分错误逻辑:SIL和分离SIL

Sufficient Incorrectness Logic: SIL and Separation SIL

Meta Platforms, Inc.(Meta平台公司)

Flavio Ascari, Roberto Bruni, Roberta Gori, Francesco Logozzo

AI总结:

SIL是一种新的下界三元组基础程序逻辑,用于推理程序错误,通过区分导致错误的初始状态,提高错误检测的准确性。

摘要:

在保证错误不存在的背景下,已证明了声音的上界方法有效,但不可避免地会产生假警报,这可能会阻碍程序员。相反,下界方法旨在查找错误,并且不受假警报的影响。我们引入了充分错误逻辑(SIL),一种新的下界、三元组基础的程序逻辑,用于推理程序错误。SIL旨在区分导致错误的初始状态。我们证明了SIL在最小规则集上是正确且完整的,并研究了可以促进程序分析的额外规则。我们正式比较了SIL与现有三元组基础程序逻辑。错误逻辑和SIL都进行下界估计,但前者只暴露真正的错误,后者定位导致这些错误的初始状态集合。霍尔逻辑进行上界估计,因此无法捕捉非确定性程序中导致错误的初始状态集合--对于确定性和终止性的程序,霍尔逻辑和SIL是相同的。最后,我们用分离逻辑公式(分离SIL)实例化SIL以处理指针和动态分配,并证明了其正确性,并且对于无循环程序,也证明了其完备性。我们认为在某些情况下,分离SIL可以产生比错误分离逻辑更简洁的后置条件,并提供更强的保证,并可以支持有效的逆向推理。

英文摘要:

Sound over-approximation methods have been proved effective for guaranteeing the absence of errors, but inevitably they produce false alarms that can hamper the programmers. Conversely, under-approximation methods are aimed at bug finding and are free from false alarms. We introduce Sufficient Incorrectness Logic~(SIL), a new under-approximating, triple-based program logic to reason about program errors. SIL is designed to set apart the initial states leading to errors. We prove that SIL is correct and complete for a minimal set of rules, and we study additional rules that can facilitate program analyses. We formally compare SIL to existing triple-based program logics. Incorrectness Logic and SIL both perform under-approximations, but while the former exposes only true errors, the latter locates the set of initial states that lead to such errors. Hoare Logic performs over-approximations and as such cannot capture the set of initial states leading to errors in nondeterministic programs -- for deterministic and terminating programs, Hoare Logic and SIL coincide. Finally, we instantiate SIL with Separation Logic formulae (Separation SIL) to handle pointers and dynamic allocation and we prove its correctness and, for loop-free programs, also its completeness. We argue that in some cases Separation SIL can yield more succinct postconditions and provide stronger guarantees than Incorrectness Separation Logic and can support effective backward reasoning.

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

↑