U-Turn:通过反转方向增强错误分析
U-Turn: Enhancing Incorrectness Analysis by Reversing Direction
AI总结:
通过结合IL和SIL并利用启发式方法改进分析,提升错误检测的精度和自动化能力。
摘要:
O'Hearn的错误逻辑(IL)引发了对旨在检测程序错误而非证明其不存在的静态分析的重新关注,从而避免假警报——这对在工业环境中实际应用至关重要。随着新的错误逻辑出现以捕捉多样化的错误相关属性,一个关键问题浮现:能否通过(不)正确性技术提高精度、表达性、自动化或可扩展性?值得注意的框架,如结果逻辑、UNTer、局部完备性逻辑和精确分离逻辑,将多种分析统一在单一证明系统中。在本工作中,我们采用互补策略。与其设计统一的逻辑,我们结合IL,该逻辑识别可达的错误状态,与Sufficient Incorrectness Logic(SIL),该逻辑发现可能导致这些错误的输入状态。结果,我们得到了比单独使用逻辑更信息丰富和有效的分析。与其简单地按顺序使用它们,我们的关键创新是重用第一个分析的启发式选择来引导第二个。事实上,IL和SIL都依赖于下近似,因此它们的自动化合理化了避免穷举路径枚举(例如,选择性析取修剪、循环展开)的启发式方法。具体而言,我们将第二个逻辑的证明规则用来自第一个的推导来归纳地引导规则选择和应用。据我们所知,这第一次规则格式使得此类跨分析仪器化成为可能。这种联合分析通过揭示可达错误及其原因帮助调试和测试,并开辟了将错误洞察嵌入(一种新的)可扩展、表达性、自动化的代码合同的新途径。
英文摘要:
O'Hearn's Incorrectness Logic (IL) has sparked renewed interest in static analyses that aim to detect program errors rather than prove their absence, thereby avoiding false alarms -- a critical factor for practical adoption in industrial settings. As new incorrectness logics emerge to capture diverse error-related properties, a key question arises: can the combination of (in)correctness techniques enhance precision, expressiveness, automation, or scalability? Notable frameworks, such as outcome logic, UNTer, local completeness logic, and exact separation logic, unify multiple analyses within a single proof system. In this work, we adopt a complementary strategy. Rather than designing a unified logic, we combine IL, which identifies reachable error states, with Sufficient Incorrectness Logic (SIL), which finds input states potentially leading to those errors. As a result, we get a more informative and effective analysis than either logic in isolation. Rather than naively sequencing them, our key innovation is reusing heuristic choices from the first analysis to steer the second. In fact, both IL and SIL rely on under-approximation and thus their automation legitimates heuristics that avoid exhaustive path enumeration (e.g., selective disjunct pruning, loop unrolling). Concretely, we instrument the second logic's proof rules with derivations coming from the first to inductively guide rule selection and application. To our knowledge, this is the first rule format enabling such inter-analysis instrumentation. This combined analysis aids debugging and testing by revealing both reachable errors and their causes, and opens new avenues for embedding incorrectness insights into (a new kind of) scalable, expressive, automated code contracts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。