Journal of Functional Programming | VOL. 32
Read

Extracting functional programs from Coq, in Coq

Publication Date Jan 1, 2022

Abstract

Abstract We implement extraction of Coq programs to functional languages based on MetaCoq’s certified erasure. We extend the MetaCoq erasure output language with typing information and use it as an intermediate representation, which we call ${\lambda^T_\square}$ . We complement the extraction functionality with a full pipeline that includes several standard transformations (e.g. eta-expansion and inlining) implemented in a proof-generating manner along with a verified optimisation pass removing unused arguments. We prove the pass correct wrt. a conventional call-by-value operational semantics of functional languages. From the optimised ${\lambda^T_\square}$ representation, we obtain code in two functional smart contract languages, Liquidity and CameLIGO, the functional language Elm, and a subset of the multi-paradigm language for systems programming Rust. Rust is currently gaining popularity as a language for smart contracts, and we demonstrate how our extraction can be used to extract smart contract code for the Concordium network. The development is done in the context of the ConCert framework that enables smart contract verification. We contribute with two verified real-world smart contracts (boardroom voting and escrow), which we use, among other examples, to exemplify the applicability of the pipeline. In addition, we develop a verified web application and extract it to fully functional Elm code. In total, this gives us a way to write dependently typed progra...

Concepts

Functional Languages Smart Contract Language For Smart Contracts Coq Programs Full Pipeline Intermediate Representation Target Languages Contract Languages Subset Of Language Semantics Of Languages

Round-ups are the summaries of handpicked papers around trending topics published every week. These would enable you to scan through a collection of papers and decide if the paper is relevant to you before actually investing time into reading it.

Coronavirus Research Articles published between Nov 28, 2022 to Dec 04, 2022

R DiscoveryDec 05, 2022
R DiscoveryArticles Included:  5

The coronavirus disease 2019 (COVID-19) is a contagious disease that is caused by a novel coronavirus. Bentham is offering subject-based scholarly con...

Read More

Climate change Research Articles published between Nov 28, 2022 to Dec 04, 2022

R DiscoveryDec 05, 2022
R DiscoveryArticles Included:  5

We use cookies to improve your website experience. To learn about our use of cookies and how you can manage your cookie settings, please see our Cooki...

Read More

Quality Of Education Research Articles published between Nov 28, 2022 to Dec 04, 2022

R DiscoveryDec 05, 2022
R DiscoveryArticles Included:  4

Introduction: The Internet is an extensively used source of medical education by the public. YouTube is a valuable source of information which can be ...

Read More

Gender Equality Research Articles published between Nov 28, 2022 to Dec 04, 2022

R DiscoveryDec 05, 2022
R DiscoveryArticles Included:  3

Gender equity in the classroom is important for teachers to think about in order to ensure they are creating safe environments that allow their studen...

Read More

Coronavirus Pandemic

You can also read COVID related content on R COVID-19

R ProductsCOVID-19

ONE PROBLEM . ONE PURPOSE . ONE PLACE

Creating the world’s largest AI-driven & human-curated collection of research, news, expert recommendations and educational resources on COVID-19

COVID-19 Dashboard

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on “as is” basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The Copyright Law.