An approach to translating Haskell programs to Agda and reasoning about them

05/18/2022
by   Harold Carr, et al.
0

We are using the Agda programming language and proof assistant to formally verify the correctness of a Byzantine Fault Tolerant consensus implementation based on HotStuff / LibraBFT. The Agda implementation is a translation of our Haskell implementation based on LibraBFT. This short paper focuses on one aspect of this work. We have developed a library that enables the translated Agda implementation to closely mirror the Haskell code on which it is based. This makes it easier and more efficient to review the translation for accuracy, and to maintain the translated Agda code when the Haskell code changes, thereby reducing the risk of translation errors. We also explain how we capture the semantics of the syntactic features provided by our library, thus enabling formal reasoning about programs that use them; details of how we reason about the resulting Agda implementation will be presented in a future paper. The library that we present is independent of our particular verification project, and is available, open-source, for others to use and extend.

READ FULL TEXT

Authors

page 1

page 2

page 3

page 4

03/25/2022

Towards Formal Verification of HotStuff-based Byzantine Fault Tolerant Consensus in Agda: Extended Version

LibraBFT is a Byzantine Fault Tolerant (BFT) consensus protocol based on...
07/16/2021

SMLtoCoq: Automated Generation of Coq Specifications and Proof Obligations from SML Programs with Contracts

Formally reasoning about functional programs is supposed to be straightf...
09/13/2019

That's C, baby. C!

Hardly a week goes by at BUGSENG without having to explain to someone th...
03/19/2018

Ready, Set, Verify! Applying hs-to-coq to real-world Haskell code

Good tools can bring mechanical verification to programs written in main...
05/24/2020

A Proof Assistant Based Formalisation of Core Erlang

Our research is part of a wider project that aims to investigate and rea...
06/14/2022

Aeneas: Rust Verification by Functional Translation

We present Aeneas, a new verification toolchain for Rust programs based ...
09/02/2021

Security-Hardening Software Libraries with Ada and SPARK – A TCP Stack Use Case

This white paper demonstrates how the assurance, reliability, and securi...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.