HMC:使用抽象解释器编译函数式程序
HMC: Verifying Functional Programs Using Abstract Interpreters
摘要:
我们提出了Hindley-Milner-Cousots(HMC),一个算法,允许任何一阶命令式程序的过程间分析被用来验证类型化高阶函数程序的安全属性。HMC工作如下。首先,它利用函数程序的类型结构来生成一组逻辑精化约束,这些约束的满足意味着源程序的安全性。其次,它将逻辑精化约束转换成一个简单的一阶命令式程序,该程序是安全的,当且仅当约束是可满足的。因此,HMC一举使工具的不变生成,例如,基于抽象域、谓词抽象、反例引导的精化和Craig插值可以直接应用于以全自动的方式验证现代函数式语言的安全属性。我们已经实现了HMC,并描述了初步的实验结果,使用两个命令式检查器- ARMC和InterProc -来验证OCaml程序。因此,通过组成基于类型的推理在程序语法和基于状态的推理在抽象解释的基础上,HMC打开了大门,以现代程序设计语言编写的程序的自动验证。
英文摘要:
We present Hindley-Milner-Cousots (HMC), an algorithm that allows any interprocedural analysis for first-order imperative programs to be used to verify safety properties of typed higher-order functional programs. HMC works as follows. First, it uses the type structure of the functional program to generate a set of logical refinement constraints whose satisfaction implies the safety of the source program. Next, it transforms the logical refinement constraints into a simple first-order imperative program that is safe iff the constraints are satisfiable. Thus, in one swoop, HMC makes tools for invariant generation, e.g., based on abstract domains, predicate abstraction, counterexample-guided refinement, and Craig interpolation be directly applicable to verify safety properties of modern functional languages in a fully automatic manner. We have implemented HMC and describe preliminary experimental results using two imperative checkers -- ARMC and InterProc -- to verify OCaml programs. Thus, by composing type-based reasoning grounded in program syntax and state-based reasoning grounded in abstract interpretation, HMC opens the door to automatic verification of programs written in modern programming languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。