期刊文献+

基于网络度量元的Solidity智能合约缺陷预测

Defect prediction for Solidity smart contracts using network metrics
下载PDF
导出
摘要 针对现有智能合约缺陷预测方法未考虑合约代码内部结构对缺陷产生的影响的不足,提出了一种基于网络度量元的Solidity智能合约缺陷预测方法。首先,通过Solidity-Antlr4工具构建Solidity智能合约的抽象语法树(abstract syntax tree, AST);其次,根据抽象语法树构建合约网络,网络中的节点代表函数和属性,边代表函数间的调用关系和函数对属性的操作关系;然后,引入复杂网络领域的知识,构建了一套针对Solidity智能合约的网络度量元;最后,基于多种回归模型和分类模型构建智能合约缺陷预测模型,进而比较不同类型的度量元在Solidity智能合约缺陷预测方面的性能。数据实验表明,结合了网络度量元的缺陷预测模型的预测性能比相应没有结合网络度量元的模型要好。 Existing smart contract defect prediction methods are not aware of the impact of the internal structure of contracts on defects prediction.To fill this gap,this paper proposed a novel Solidity smart contract defect prediction method based on a network metric suite.Firstly,it constructed the abstract syntax tree(AST)of the solidity smart contract by using the Solidity-Antlr4 tool.Secondly,it built the contract network based on the AST,with nodes representing functions and attributes,and edges representing the function-call relationship between functions and the operation relationship between functions and attri-butes.Then,it introduced the theory in the field of complex networks to build a network metric suite for Solidity smart contracts.Finally,it build smart contract defect prediction models based on multiple regression and classification models,and compared the performance of different metric in smart contract defect prediction.Comparative results show that defect prediction models combined with network metric suite outperform corresponding models without the network metric suite.
作者 李显伟 潘伟丰 王家乐 潘云 袁成祥 Li Xianwei;Pan Weifeng;Wang Jiale;Pan Yun;Yuan Chengxiang(School of Computer Science&Technology,Zhejiang Gongshang University,Hangzhou 310018,China)
出处 《计算机应用研究》 CSCD 北大核心 2023年第12期3545-3550,共6页 Application Research of Computers
基金 浙江省科技厅公益项目(LGF19F020007) 国家自然科学基金资助项目(62272412,61976187) 浙江省自然科学基金资助项目(LY22F020007)。
关键词 智能合约 软件缺陷预测 网络度量元集 SOLIDITY 抽象语法树 smart contract software defect prediction network metrics suite Solidity abstract syntax tree
  • 相关文献

参考文献2

二级参考文献13

共引文献5

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部