arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2403.13279cs.SE
收藏

基于 Trace Slicing 和 Predicate Abstraction 的智能合约 Specification Mining

Specification Mining for Smart Contracts with Trace Slicing and Predicate Abstraction

Ye Liu, Yixuan Liu, Yi Li, Cyrille Artho

AI总结:

提出基于 trace slicing 和 predicate abstraction 的 specification mining 方法并实现工具 SMCON,从交易历史推断智能合约规范,实验证明其能提升符号分析的代码覆盖率与速度,并辅助开发者维护文档和测试套件。

摘要:

智能合约是运行在区块链上以实现 Decentralized Applications 的计算机程序。合约 specification 的缺失阻碍了合约理解和测试等常规任务。在本研究中,我们提出了一种 specification mining 方法,从过往交易历史中推断合约 specification。该方法推导出函数调用的高层行为自动机,并附带从交易历史中统计推断出的程序不变式。我们将该方法实现为工具 SMCON,并在 11 个经过充分研究的 Azure benchmark 智能合约和 6 个流行的真实世界 DApp 智能合约上进行了评估。实验表明,SMCON 挖掘出的相当准确的 specification 可用于增强智能合约的符号分析,实现更高的代码覆盖率和高达 56% 的加速,并帮助 DApp 开发者维护高质量文档和测试套件。

英文摘要:

Smart contracts are computer programs running on blockchains to implement Decentralized Applications. The absence of contract specifications hinders routine tasks, such as contract understanding and testing. In this work, we propose a specification mining approach to infer contract specifications from past transaction histories. Our approach derives high-level behavioral automata of function invocations, accompanied by program invariants statistically inferred from the transaction histories. We implemented our approach as tool SMCON and evaluated it on eleven well-studied Azure benchmark smart contracts and six popular real-world DApp smart contracts. The experiments show that SMCON mines reasonably accurate specifications that can be used to enhance symbolic analysis of smart contracts achieving higher code coverage and up to 56% speedup, and facilitate DApp developers in maintaining high-quality documentation and test suites.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑