[论文解读] Scilla: a Smart Contract Intermediate-Level LAnguage
Scilla 是一个用于经过验证的智能合约的中级语言,它将计算与区块链交互分离,并通过基于自动机的模型和 Coq 嵌入实现形式化验证。
This paper outlines key design principles of Scilla---an intermediate-level language for verified smart contracts. Scilla provides a clean separation between the communication aspect of smart contracts on a blockchain, allowing for the rich interaction patterns, and a programming component, which enjoys principled semantics and is amenable to formal verification. Scilla is not meant to be a high-level programming language, and we are going to use it as a translation target for high-level languages, such as Solidity, for performing program analysis and verification, before further compilation to an executable bytecode. We describe the automata-based model of Scilla, present its programming component and show how contract definitions in terms of automata streamline the process of mechanised verification of their safety and temporal properties.
研究动机与目标
- 在安全事件和复杂区块链交互中,激发对可靠智能合约的需求。
- 提出 Scilla 作为一种中间语言,使对合约行为的严格形式推理成为可能。
- 提供一个基于自动机的计算模型,清晰地将合约内的计算与区块链范围的交互分离。
- 展示 Scilla 如何通过 Coq 嵌入支持对安全性和活性属性的机械化验证。
提出的方法
- 将 Scilla 呈现为一种中间语言,旨在作为高层语言(如 Solidity)的翻译目标,以便在编译为字节码之前促进程序分析和验证。
- 描述基于自动机的模型,其中合约被构建为具有原子转换的通信自动机。
- 解释“纯计算”与“有副作用的状态变化”之间的分离,以及通过 CPS 风格的继续(continuations)在调用与继续之间的分离。
- 引入显式的 continuation 来建模返回流并支持受控的外部调用,从而实现更安全的交互模式,如不可重入。
- 概述一个基于 Coq 的形式化框架,编码合约状态、消息和转换,并为安全性与活性推理定义执行轨迹。
实验结果
研究问题
- RQ1如何设计智能合约以实现对其安全性和活性属性的严格形式验证?
- RQ2一种将计算与通信分离、并使用基于自动机的合约的语言设计是否能提升对合约组合与正确性的推理?
- RQ3如何将 continuation 集成以建模返回流和外部调用,同时保持可验证性?
- RQ4将 Solidity 风格的程序翻译为 Scilla,以在生成字节码前实现验证的路径是什么?
主要发现
- Scilla 通过一个 communicating-automata 模型提供了计算与区块链通信的原理性分离。
- 合约由原子转换构建;消息触发转换,确保状态变化被包含且可分析。
- 纯净性/副作用分离以及对 continuation 的显式使用支持可降维的验证和面向返回路径的 CPS 风格控制流。
- 本工作将 Scilla 与 Coq 集成,以机械化语义和对合约执行的安全性与活性证明。
- 一个 Crowdfunding 示例展示了工作流和基于自动机的验证方法(概念模型,而非数值结果)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。