Uppsats

AST Differencing for Solidity

Master-uppsats

KTH/Skolan för elektroteknik och datavetenskap (EECS)

Publicerad: 2024

Språk: Engelska

Sammanfattning

Code differencing plays a crucial role in modern software engineering, helping developers quickly identify changes between versions. To enhance the accuracy and utility of these comparisons, Abstract Syntax Tree (AST) differencing provides a higher granularity, enabling more precise identification of code changes and supporting automatic code transformation through edit scripts. We identified a need for an AST differencing tool for the programming language Solidity. The state-of-the-art AST differencing tools do not support Solidity. Furthermore, the only available AST differencing tool for Solidity, Difftastic, does not enable code transformation and there are no scientific evaluations of its performance. We propose a solution for fine-grained source code differencing for Solidity smart contracts using an AST differencing algorithm. We evaluated our implementation by comparing it against Difftastic through both automatic and manual methods. The automatic evaluation focused on edit distance, a common metric for measuring the efficiency and accuracy of code differences, where shorter distances indicate higher quality. The manual evaluation involved visually inspecting the differences to determine which tool produced clearer and more accurate results. Our results indicate that our implementation provides correct and clear code differences. This research contributes a valuable tool for Solidity developers and enables more accurate software engineering tools for blockchain-based applications.

Information

Författare
Åryd, Viktor
Lärosäte / institution
KTH/Skolan för elektroteknik och datavetenskap (EECS)
Publiceringsdatum
2024
Uppsatstyp
Master-uppsats
Språk
Engelska

Utforska vidare

Liknande uppsatser

Uppsatser med liknande ämnen och nyckelord.