Automating Comment Generation for Smart Contract from Bytecode

字节码 计算机科学 程序设计语言 源代码 智能合约 编码(集合论) 集合(抽象数据类型) 数据库事务 Java
作者
Jianhang Xiang,Zhipeng Gao,Lingfeng Bao,Xing Hu,J. Chen,Xin Xia
出处
期刊:ACM Transactions on Software Engineering and Methodology [Association for Computing Machinery]
标识
DOI:10.1145/3699597
摘要

Recently, smart contracts have played a vital role in automatic financial and business transactions. To help end users without programming background to better understand the logic of smart contracts, previous studies have proposed models for automatically translating smart contract source code into their corresponding code summaries. However, in practice, only 13% of smart contracts deployed on the Ethereum blockchain are associated with source code. The practical usage of these existing tools is significantly restricted. Considering that bytecode is always necessary when deploying smart contracts, in this paper, we first introduce the task of automatically generating smart contract code summaries from bytecode. We propose a novel approach, named S mart BT ( Smart contract B ytecode T ranslator) for automatically translating smart contract bytecode into fine-grained natural language description directly. Two key challenges are posed for this task: structural code logic hidden in bytecode and the huge semantic gap between bytecode and natural language descriptions. To address the first challenge, we transform bytecode into CFG (Control-Flow Graph) to learn code structural and logic details. Regarding the second challenge, we introduce an information retrieval component to fetch similar comments for filling the semantic gap. Then the structural input and semantic input are used to build an attentional sequence-to-sequence neural network model. The copy mechanism is employed to copy rare words directly from similar comments and the coverage mechanism is employed to eliminate repetitive outputs. The automatic evaluation results show that SmartBT outperforms a set of baselines by a large margin, and the human evaluation results show the effectiveness and potential of SmartBT in producing meaningful and accurate comments for smart contract code from bytecode directly.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
2秒前
大个应助傲娇的咖啡豆采纳,获得10
3秒前
4秒前
壮观复天完成签到 ,获得积分10
5秒前
wenjie发布了新的文献求助10
6秒前
今后应助当当康康采纳,获得10
6秒前
7秒前
就那样完成签到,获得积分10
8秒前
月白发布了新的文献求助10
9秒前
哈哈完成签到,获得积分10
10秒前
10秒前
11秒前
唠叨的文龙完成签到,获得积分10
12秒前
守拙发布了新的文献求助10
12秒前
王博士完成签到,获得积分10
13秒前
在水一方应助w2503采纳,获得20
14秒前
15秒前
诚心的香水完成签到,获得积分10
16秒前
16秒前
xiaoputaor发布了新的文献求助10
17秒前
兴奋的凝丝发布了新的文献求助200
17秒前
今后应助帆布鞋采纳,获得10
18秒前
小西完成签到,获得积分10
18秒前
huan完成签到,获得积分10
19秒前
20秒前
wenjie完成签到,获得积分10
21秒前
22秒前
yangtong8完成签到,获得积分10
22秒前
maxuxuxu发布了新的文献求助10
22秒前
秤子发布了新的文献求助10
22秒前
zzz应助科研通管家采纳,获得10
23秒前
23秒前
李健应助科研通管家采纳,获得10
23秒前
FashionBoy应助科研通管家采纳,获得10
23秒前
23秒前
深情安青应助科研通管家采纳,获得10
23秒前
脑洞疼应助科研通管家采纳,获得10
23秒前
所所应助科研通管家采纳,获得10
23秒前
深情安青应助科研通管家采纳,获得10
24秒前
高分求助中
Malcolm Fraser : a biography 680
Signals, Systems, and Signal Processing 610
天津市智库成果选编 600
Climate change and sports: Statistics report on climate change and sports 500
Forced degradation and stability indicating LC method for Letrozole: A stress testing guide 500
全相对论原子结构与含时波包动力学的理论研究--清华大学 500
Organic Reactions Volume 118 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6454891
求助须知:如何正确求助?哪些是违规求助? 8265665
关于积分的说明 17616794
捐赠科研通 5520800
什么是DOI,文献DOI怎么找? 2904748
邀请新用户注册赠送积分活动 1881498
关于科研通互助平台的介绍 1724273