从安全到终止再返回:基于SMT的惰性语言验证
From Safety To Termination And Back: SMT-Based Verification For Lazy Languages
摘要:
基于SMT的验证器一直是保证程序安全性的有效手段。虽然这些技术是很好地理解,我们表明,他们隐含地需要渴望语义,直接将它们应用到一个懒惰的语言是不健全的,由于存在分歧的子计算。我们通过将安全分析与终止分析相结合来恢复合理性。当然,终止本身是一个具有挑战性的问题,但我们展示了如何安全分析可以用来确保终止,从而引导整个系统的稳健性。因此,虽然安全不变量一直需要证明终止,我们展示了如何终止证明可以健全地建立安全。我们已经在liquidHaskell中实现了我们的方法,这是Haskell的一个基于Refinement类型的验证器。我们通过使用liquidHaskell的实验评估来验证真实世界Haskell库的安全性,功能正确性和终止属性,总计超过10,000行代码,从而证明了其有效性。
英文摘要:
SMT-based verifiers have long been an effective means of ensuring safety properties of programs. While these techniques are well understood, we show that they implicitly require eager semantics; directly applying them to a lazy language is unsound due to the presence of divergent sub-computations. We recover soundness by composing the safety analysis with a termination analysis. Of course, termination is itself a challenging problem, but we show how the safety analysis can be used to ensure termination, thereby bootstrapping soundness for the entire system. Thus, while safety invariants have long been required to prove termination, we show how termination proofs can be to soundly establish safety. We have implemented our approach in liquidHaskell, a Refinement Type-based verifier for Haskell. We demonstrate its effectiveness via an experimental evaluation using liquidHaskell to verify safety, functional correctness and termination properties of real-world Haskell libraries, totaling over 10,000 lines of code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。