Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them
Autor(a) principal: | |
---|---|
Data de Publicação: | 2022 |
Tipo de documento: | Dissertação |
Idioma: | eng |
Título da fonte: | Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
Texto Completo: | http://hdl.handle.net/10362/151098 |
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. |
id |
RCAP_3b2dbb11af01b1e12b98dfe6f485bc56 |
---|---|
oai_identifier_str |
oai:run.unl.pt:10362/151098 |
network_acronym_str |
RCAP |
network_name_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository_id_str |
7160 |
spelling |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify themDeductive VerificationAlgebraic EffectsEffect HandlersMulticore OCamlGOSPELWhy3Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e InformáticaThe 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.A próxima iteração do compilador OCaml será histórica no que diz respeito ao ecosistema da linguagem. A versão 5.0 introduzirá Multicore OCaml, uma implementação multi- threaded do runtime OCaml. Nesta versão, dois paradigmas serão adicionados: paralelismo utilizando domains e concorrência em estilo direto na forma de efeitos algébricos e handlers. Neste relatório, focar-nos-emos no segundo ponto, tentado responder à seguinte questão: "que ferramentas e princípios deveremos desenvolver de modo a applicar provas dedutivas automáticas a programas com efeitos e handlers?". Efeitos algébricos e handlers são uma abstrações poderosas que nos permite construir mecanismos para controlar o curso de um programa como, por exemplo, exceções que nos permitem recomeçar a computação, threads lightwheight, corotinas, geradores e I/O asíncrono. Todos estes paradigmas são um grande desafio no contexto de verificação dedutiva pois têm semanticas bastante complexas. Neste relatório iremos abordar algumas das técnicas existentes para provar programas com efeitos algébricos. Ademais, propomos uma estratégia de verificação para provar automáticamente programas com handlers. Para este efeito, extendemos a ferramenta Cameleer, um verificador de código OCaml que utiliza a linguagem de especificação GOSPEL e o prover Why3. Esta extensão visa aproximar o comportamento de handlers utilizando exceções e funções desfuncionalizadas.Pereira, MárioRavara, AntónioRUNSoares, Tiago Lopes2023-03-23T11:08:20Z2022-122022-12-01T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10362/151098enginfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2024-03-11T05:33:34Zoai:run.unl.pt:10362/151098Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-20T03:54:28.062848Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse |
dc.title.none.fl_str_mv |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
title |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
spellingShingle |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them Soares, Tiago Lopes Deductive Verification Algebraic Effects Effect Handlers Multicore OCaml GOSPEL Why3 Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática |
title_short |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
title_full |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
title_fullStr |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
title_full_unstemmed |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
title_sort |
Handle with Care and Confidence – Extending Cameleer with Algebraic Effects and Effect Handlers. An analysis of algebraic effects and techniques to deductively verify them |
author |
Soares, Tiago Lopes |
author_facet |
Soares, Tiago Lopes |
author_role |
author |
dc.contributor.none.fl_str_mv |
Pereira, Mário Ravara, António RUN |
dc.contributor.author.fl_str_mv |
Soares, Tiago Lopes |
dc.subject.por.fl_str_mv |
Deductive Verification Algebraic Effects Effect Handlers Multicore OCaml GOSPEL Why3 Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática |
topic |
Deductive Verification Algebraic Effects Effect Handlers Multicore OCaml GOSPEL Why3 Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática |
description |
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. |
publishDate |
2022 |
dc.date.none.fl_str_mv |
2022-12 2022-12-01T00:00:00Z 2023-03-23T11:08:20Z |
dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
dc.type.driver.fl_str_mv |
info:eu-repo/semantics/masterThesis |
format |
masterThesis |
status_str |
publishedVersion |
dc.identifier.uri.fl_str_mv |
http://hdl.handle.net/10362/151098 |
url |
http://hdl.handle.net/10362/151098 |
dc.language.iso.fl_str_mv |
eng |
language |
eng |
dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/openAccess |
eu_rights_str_mv |
openAccess |
dc.format.none.fl_str_mv |
application/pdf |
dc.source.none.fl_str_mv |
reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação instacron:RCAAP |
instname_str |
Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
instacron_str |
RCAAP |
institution |
RCAAP |
reponame_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
collection |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository.name.fl_str_mv |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
repository.mail.fl_str_mv |
|
_version_ |
1799138133109899264 |