引用本文:王小兵,杨潇钰,舒新峰,赵亮.面向MSVL的智能合约形式化验证.软件学报,2021,32(6):1849-1866
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 3087次   下载 6817 本文二维码信息
码上扫一扫!
分享到: 微信 更多
面向MSVL的智能合约形式化验证
王小兵1, 杨潇钰1, 舒新峰2, 赵亮1
1.西安电子科技大学 计算机科学与技术学院, 陕西 西安 710071;2.西安邮电大学 计算机学院, 陕西 西安 710121
摘要:
智能合约是运行在区块链上的计算机协议,被广泛应用在各个领域中,但是其安全问题层出不穷,因此在智能合约部署到区块链上之前,需要对其进行安全审计.然而,传统的测试方法无法保证智能合约所需的高可靠性和正确性.说明了如何使用建模、仿真与验证语言(MSVL)和命题投影时序逻辑(PPTL)对智能合约进行建模和验证:首先介绍了MSVL与PPTL的理论基础;之后,通过分析和对比Solidity与MSVL语言的特性,开发了能够将Solidity程序转换为MSVL程序的SOL2M转换器,并详细介绍了SOL2M转换器的设计思路;最终,通过投票智能合约和银行转账智能合约两个实例,给出了SOL2M转换器的执行结果.使用PPTL从功能一致性、逻辑正确性以及合约完备性这3个方面描述了合约的性质,给出了使用统一模型检测器(UMC4M)对合约进行验证的过程.
关键词:  区块链  智能合约  形式化方法  MSVL
DOI:10.13328/j.cnki.jos.006253
分类号:
基金项目:国家自然科学基金(61672403,61972301);陕西省重点研发计划(2020GY-043,2020GY-210)
Formal Verification of Smart Contract Based on MSVL
WANG Xiao-Bing1, YANG Xiao-Yu1, SHU Xin-Feng2, ZHAO Liang1
1.School of Computer Science and Technology, Xidian University, Xi'an 710071, China;2.School of Computer Science and Technology, 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 study 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, an 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.
Key words:  blockchain  smart contract  formal methods  MSVL

引用本文:
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览次   下载  
分享到: 微信 更多
摘要:
关键词:  
DOI:
分类号:
基金项目:
Abstract:
Key words: