Smart contracts are small but highly error-prone programs that implement agreements between multiple parties. We present a reactive synthesis workflow for the automatic construction of finite-state machines implementing the control flow of a smart contract. As specification language, we use temporal stream logic (TSL), which builds on LTL but adds additional mechanisms to reason about the control flow of infinite data. Our specifications not only reason about the order of transactions based on guards like access rights, but also include the updates of fields necessary for a correct control flow. We show how to comprehensively specify the control flow of various types of common smart contracts, including auctions, asset transfers, and crowd funding protocols. Our tool \tool implements the approach using BDD-based symbolic algorithms, resulting in a fast reactive control flow synthesis.
翻译:智能合同是执行多方协议的小型但高度易出错程序。 我们为自动建造执行智能合同控制流程的有限状态机器提供了一个反应式合成工作流程。 作为规格语言,我们使用时间流逻辑(TSL),该逻辑以LTL为基础,但增加了关于无限数据控制流程的更多机制。 我们的规格不仅说明基于进入权等保镖的交易顺序,而且还包括正确控制流程所需字段的更新。 我们展示了如何全面指定各类通用智能合同的控制流程,包括拍卖、资产转移和人群融资协议。 我们的工具\工具使用基于BDD的象征性算法实施该方法,导致快速反应控制流程合成。