Algebraic effects and handlers are a powerful abstraction to build non-local control-flow mechanisms such as resumable exceptions, lightweight threads, co-routines, generators, and asynchronous I/O. All of such features have very evolved semantics, hence they pose very interesting challenges to deductive verification techniques. In fact, there are very few proposed techniques to deductively verify programs featuring these constructs, even fewer when it comes to automated proofs. In this paper, we outline some of the currently available techniques for the verification of programs with algebraic effects. We then build off them to create a mostly automated verification framework by extending Cameleer, a tool which verifies OCaml code using GOSPEL and Why3. This framework embeds the behavior of effects and handlers using exceptions and defunctionalized functions.
翻译:代数效应和处理器是建立非本地控制流程机制的强大抽象过程,如可回收例外、轻量线、共程线、发电机和无同步I/O等。 所有这些特征都具有非常演变的语义学,因此对推算核查技术提出了非常有趣的挑战。事实上,很少建议采用什么技术来进行推算性核查,在自动验证时甚至更少。在本文件中,我们概述了用于核查具有代数效应的程序的现有技术。然后,我们通过扩展卡美利尔(Cameleer)来建立主要是自动化的核查框架,这是一个使用GOSPEL和“原因3”来验证OCaml代码的工具。这个框架包含使用例外和功能的效应和操作器的行为。