首页 | 本学科首页   官方微博 | 高级检索  
     

面向MSVL的智能合约形式化验证
引用本文:王小兵,杨潇钰,舒新峰,赵亮.面向MSVL的智能合约形式化验证[J].软件学报,2021,32(6):1849-1866.
作者姓名:王小兵  杨潇钰  舒新峰  赵亮
作者单位:西安电子科技大学 计算机科学与技术学院, 陕西 西安 710071;西安邮电大学 计算机学院, 陕西 西安 7100121
基金项目:国家自然科学基金(61672403,61972301);陕西省重点研发计划(2020GY-043,2020GY-210)
摘    要:智能合约是运行在区块链上的计算机协议,被广泛应用在各个领域中,但是其安全问题层出不穷,因此在智能合约部署到区块链上之前需要对其进行安全审计,然而,传统的测试方法无法保证智能合约所需的高可靠性和正确性.说明了如何使用建模、仿真与验证语言(MSVL)和命题投影时序逻辑(PPTL)对智能合约进行建模和验证,首先介绍了MSVL与PPTL的理论基础;之后通过分析和对比了Solidity与MSVL语言的特性,开发了能够将Solidity程序转换为MSVL程序的SOL2M转换器,并详细介绍了SOL2M转换器的设计思路;最终通过投票智能合约和银行转账智能合约两个实例,给出了SOL2M转换器的执行结果,使用PPTL从功能一致性、逻辑正确性以及合约完备性三个方面描述了合约的性质,给出了使用统一模型检测器(UMC4M)对合约进行验证的过程.

关 键 词:区块链  智能合约  形式化方法  MSVL
收稿时间:2020/8/30 0:00:00
修稿时间:2020/10/26 0:00:00

Formal Verification of Smart Contract Based on MSVL
WANG Xiao-Bing,YANG Xiao-Yu,SHU Xin-Feng,ZHAO Liang.Formal Verification of Smart Contract Based on MSVL[J].Journal of Software,2021,32(6):1849-1866.
Authors:WANG Xiao-Bing  YANG Xiao-Yu  SHU Xin-Feng  ZHAO Liang
Affiliation:School of Computer Science and Technology, Xidian University, Xi''an 710071, China;School of Computer Science, Xi''an University of Posts and Telecommunications, Xi''an 710121, China
Abstract:Smart contract is a computer protocol running on the blockchain, which is widely used in various fields. However, its security problems continue to emerge. Therefore, it is necessary to audit the security of a smart contract before it is deployed on the blockchain. Traditional testing methods cannot guarantee the high reliability and correctness required by smart contracts. This paper shows how to use modeling, simulation and verification language (MSVL) and propositional projection temporal logic (PPTL) to model and verify smart contracts. First, the theoretical basis of MSVL and PPTL is introduced. Then, by analyzing and comparing the characteristics of Solidity and MSVL, a SOL2M converter which can convert a Solidity program to an MSVL program is developed and its design idea is introduced in detail. Finally, the execution results of SOL2M converter are given by two examples of a vote smart contract and a bank transfer smart contract. The properties of contracts are described by PPTL on three aspects:function consistency, logic correctness and contract completeness. And the process of using UMC4M (Unified Model Checker for MSVL) to verify the contract is also given.
Keywords:blockchain  Smart Contract  formal methods  MSVL
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号