Publicação
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them
| Resumo: | The new major release of the OCaml compiler is set to be an important landmark in the history and ecosystem of the language. The 5.0 version introduces Multicore OCaml, a multi-threaded implementation of the OCaml runtime. Two new important paradigms shall arise in the language: parallelism via domains and direct-style concurrency via algebraic effects and handlers. In this work, we focus precisely on the latter and try to answer the following research question: "what tools and principles must be developed in order to apply automated deductive proofs to OCaml programs featuring effects and handlers?". 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 report, 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. |
|---|---|
| Autores principais: | Soares, Tiago Lopes |
| Assunto: | Deductive Verification Algebraic Effects Effect Handlers Multicore OCaml GOSPEL Why3 |
| Ano: | 2022 |
| País: | Portugal |
| Tipo de documento: | dissertação de mestrado |
| Tipo de acesso: | acesso aberto |
| Instituição associada: | Universidade Nova de Lisboa |
| Idioma: | inglês |
| Origem: | Repositório Institucional da UNL |
| Resumo: | The new major release of the OCaml compiler is set to be an important landmark in the history and ecosystem of the language. The 5.0 version introduces Multicore OCaml, a multi-threaded implementation of the OCaml runtime. Two new important paradigms shall arise in the language: parallelism via domains and direct-style concurrency via algebraic effects and handlers. In this work, we focus precisely on the latter and try to answer the following research question: "what tools and principles must be developed in order to apply automated deductive proofs to OCaml programs featuring effects and handlers?". 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 report, 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. |
|---|