We implement extraction of Coq programs to functional languages based on MetaCoq's certified erasure. As part of this, we implement an optimisation pass removing unused arguments. We prove the pass correct wrt. a conventional call-by-value operational semantics of functional languages. We apply this to two functional smart contract languages, Liquidity and Midlang, and to the functional language Elm. Our development is done in the context of the ConCert framework that enables smart contract verification. We contribute a verified boardroom voting smart contract featuring maximum voter privacy such that each vote is kept private except under collusion of all other parties. We also integrate property-based testing into ConCert using QuickChick and our development is the first to support testing properties of interacting smart contracts. We test several complex contracts such as a DAO-like contract, an escrow contract, an implementation of a Decentralized Finance (DeFi) contract which includes a custom token standard (Tezos FA2), and more. In total, this gives us a way to write dependent programs in Coq, test them semi-automatically, verify, and then extract to functional smart contract languages, while retaining a small trusted computing base of only MetaCoq and the pretty-printers into these languages.


翻译:我们根据MetaCoq的认证消化功能语言实施 Coq 程序。 我们根据MetaCoq的认证取消功能语言。 作为其中的一部分, 我们实施优化通行证去掉未使用的论点。 我们证明通行证正确, 这是功能语言的常规按价值排列的常规操作语义。 我们将此应用于两种功能智能合同语言, 流动性和Midlang, 以及功能语言 Elm。 我们的开发是在ConCert框架范围内完成的, 该框架允许智能合同的核查。 我们提供了一份经过核查的董事会投票智能合同, 包含选民最大隐私, 使每张选票都保持私人状态, 除非所有其他政党串通。 我们还将基于财产的测试纳入ConCert, 使用QuickChick, 我们的发展是第一个支持测试互动智能合同特性的测试。 我们测试了若干复杂的合同, 如DAO类合同、代管合同、实施分散化金融(DeFi)合同, 其中包括一种定制代号标准(Tezos FA2) 和更多的合同。 。 总的来说, 这使我们有一条在Coq 中写依赖程序的方法, 仅进行半自动测试, 校验, 然后提取智能合同基础, 并保留这些可信任的Co- chilly- milling- mind- drical- drical brical brical brikedal brikedaldaldaldaldal kedal kedaldaldaldaldaldaldal kedaldaldaldaldaldaldaldaldaldaldaldaldald ked keds。

0
下载
关闭预览

相关内容

专知会员服务
50+阅读 · 2021年5月15日
专知会员服务
38+阅读 · 2020年9月6日
【ICML2020】多视角对比图表示学习,Contrastive Multi-View GRL
专知会员服务
77+阅读 · 2020年6月11日
【Google】监督对比学习,Supervised Contrastive Learning
专知会员服务
72+阅读 · 2020年4月24日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
开源书:PyTorch深度学习起步
专知会员服务
49+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
已删除
将门创投
3+阅读 · 2019年1月15日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Arxiv
1+阅读 · 2021年6月15日
Arxiv
0+阅读 · 2021年6月11日
VIP会员
相关VIP内容
专知会员服务
50+阅读 · 2021年5月15日
专知会员服务
38+阅读 · 2020年9月6日
【ICML2020】多视角对比图表示学习,Contrastive Multi-View GRL
专知会员服务
77+阅读 · 2020年6月11日
【Google】监督对比学习,Supervised Contrastive Learning
专知会员服务
72+阅读 · 2020年4月24日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
开源书:PyTorch深度学习起步
专知会员服务
49+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
相关资讯
已删除
将门创投
3+阅读 · 2019年1月15日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Top
微信扫码咨询专知VIP会员