Specification Mining for Smart Contracts with Trace Slicing and Predicate Abstraction

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Ye, Liu, Yixuan, Li, Yi, Artho, Cyrille
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918002881986560
author Liu, Ye
Liu, Yixuan
Li, Yi
Artho, Cyrille
author_facet Liu, Ye
Liu, Yixuan
Li, Yi
Artho, Cyrille
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2403_13279
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Specification Mining for Smart Contracts with Trace Slicing and Predicate Abstraction
Liu, Ye
Liu, Yixuan
Li, Yi
Artho, Cyrille
Software Engineering
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.
title Specification Mining for Smart Contracts with Trace Slicing and Predicate Abstraction
topic Software Engineering
url https://arxiv.org/abs/2403.13279