Smart contracts, primarily written in Solidity, are integral to blockchain software applications, yet precise analysis and maintenance are hindered by the limitations of existing differencing tools. We introduce SoliDiffy, a novel Abstract Syntax Tree (AST) differencing tool specifically designed for Solidity. SoliDiffy enables fine-grained analysis by generating accurate and concise edit scripts of smart contracts, making it ideal for downstream tasks such as vulnerability detection, automated code repair, and code reviews. Our comprehensive evaluation on a large dataset of real-world Solidity contracts demonstrates that SoliDiffy delivers shorter and more precise edit scripts compared to state-of-the-art tools, while performing consistently in complex contract modifications. SoliDiffy is made publicly available at https://github.com/mojtaba-eshghie/SoliDiffy.
翻译:智能合约主要采用Solidity语言编写,是区块链软件应用的核心组成部分,然而现有差异分析工具的局限性阻碍了对其的精确分析与维护。本文介绍SoliDiffy——一种专为Solidity设计的创新型抽象语法树差异分析工具。SoliDiffy通过生成精确简洁的智能合约编辑脚本,支持细粒度分析,使其特别适用于漏洞检测、自动化代码修复和代码审查等下游任务。我们在真实场景的大规模Solidity合约数据集上进行综合评估,结果表明:相较于现有最先进工具,SoliDiffy能生成更简短且更精确的编辑脚本,同时在复杂合约修改中保持稳定性能。SoliDiffy已在https://github.com/mojtaba-eshghie/SoliDiffy公开提供。