论文标题
图形算法的自动验证,用OCAML编写
Auto-active Verification of Graph Algorithms, Written in OCaml
论文作者
论文摘要
功能编程为构建正确的构造软件提供了理想的基础。这种范式的语言通常具有最先进的类型系统,良好的抽象机制和明确定义的执行模型。我们声称所有这些都使用功能性语言编写软件以实现正式认证的出色目标。然而,某种程度上令人惊讶的是,很少将诸如演绎验证之类的技术应用于主流功能语言编写的大型程序。在本文中,我们希望解决这种情况并介绍现实的OCAML实施的自动活动证明。我们选择从Ocamlgraph库中发布的实现作为我们的目标,因为这既是大规模且广泛使用的OCAML代码。我们使用Cameleer(最近提出的用于OCAML程序的推力验证的工具)来进行所选案例研究的证明。绝大多数此类证明是使用SMT求解器完全自动完成的,并且在需要时,我们可以在Why3 IDE中应用轻量级的交互式证明(Cameleer将输入程序转换为等效的Whyml One,是Why3验证框架的语言)。据我们所知,这些是用OCAML编写的第一个机械化的图形算法证明。
Functional programming offers the perfect ground for building correct-by-construction software. Languages of such paradigm normally feature state-of-the-art type systems, good abstraction mechanisms, and well-defined execution models. We claim that all of these make software written in a functional language excellent targets for formal certification. Yet, somehow surprising, techniques such as deductive verification have been seldom applied to large-scale programs, written in mainstream functional languages. In this paper, we wish to address this situation and present the auto-active proof of realistic OCaml implementations. We choose implementations issued from the OCamlgraph library as our target, since this is both a large-scale and widely-used piece of OCaml code. We use Cameleer, a recently proposed tool for the deductive verification of OCaml programs, to conduct the proofs of the selected case studies. The vast majority of such proofs are completed fully-automatically, using SMT solvers, and when needed we can apply lightweight interactive proof inside the Why3 IDE (Cameleer translates an input program into an equivalent WhyML one, the language of the Why3 verification framework). To the best of our knowledge, these are the first mechanized, mostly-automated proofs of graph algorithms written in OCaml.