ICSE 2023 (series) / ICPC 2023 (series) / Journal First /
Machine Translation-based Fine-grained Comments Generation for Solidity Smart Contracts
Mon 15 May 2023 10:13 - 10:22 at Meeting Room 106 - Conference Introductions / MIP Talk / Documentation and Stack Overflow Chair(s): Christoph Treude, Akhila Sri Manasa Venigalla
Context: As self-executing programs on blockchain platforms, smart contracts can build a trusted environment between multi-parties. However, participants who lack programming knowledge usually have difficulties understanding smart contracts by reading the source code. It brings them difficulties and risks when interacting with decentralized applications.
Objective: We aim to translate the smart contract source code into natural language descriptions as fine-grained in-line comments to help people better understand, learn and operate smart contracts.
Method: We propose an automated translation approach for smart contracts written in Solidity, termed SolcTrans, based on an Syntax Tree (AST) and formal grammar. We have investigated representative Solidity smart contracts, identified the AST parsing paths and core attributes used for translation, and proposed corresponding translation templates for special statements. Then, we leveraged reinforcement learning to train a Probabilistic Context-Free Grammar-based syntax synthesizer used to generate comprehensible English sentences as comments.
Result: The experimental results show that SolcTrans outperforms four state-of-the-art neural machine translation models under currently available training data and is less affected by lengths of code snippets and translation outputs. We also conducted a human evaluation among 20 volunteers and asked them to score the generated comments. The results demonstrate that SolcTrans performs well on three metrics: Accuracy, Readability, and Instructiveness.
Mon 15 MayDisplayed time zone: Hobart change
Mon 15 May
Displayed time zone: Hobart change
09:00 - 10:30 | Conference Introductions / MIP Talk / Documentation and Stack OverflowDiscussion / Research / Opening / Journal First / MIP Talk at Meeting Room 106 Chair(s): Christoph Treude University of Melbourne, Akhila Sri Manasa Venigalla IIT Tirupati | ||
09:00 15mDay opening | Conference Opening Opening G: Christoph Treude University of Melbourne, P: Raula Gaikovina Kula Nara Institute of Science and Technology, P: Bonita Sharif University of Nebraska-Lincoln, USA | ||
09:15 40mTalk | MIP Talk on ICPC 2013 Paper titled "Automatic generation of natural language summaries for Java classes" MIP Talk Laura Moreno CQSE America, Jairo Aponte Universidad Nacional de Colombia, Giriprasad Sridhara IBM Research Labs, Andrian Marcus University of Texas at Dallas, Lori Pollock University of Delaware, USA, K. Vijay-Shanker | ||
09:55 9mFull-paper | QTC4SO: Automatic Question Title Completion for Stack Overflow Research Yanlin Zhou School of Information Science and Technology, Nantong University, ShaoYu Yang School of Information Science and Technology, Nantong University, Xiang Chen Nantong University, Zichen Zhang School of Information Science and Technology, Nantong University, Jiahua Pei School of Information Science and Technology, Nantong University Pre-print | ||
10:04 9mTalk | A Study of Update Request Comments in Stack Overflow Answer Posts Journal First Mohammad Sadegh Sheikhaei School of Computing, Queen's University, Yuan Tian Queens University, Kingston, Canada, Shaowei Wang University of Manitoba Link to publication | ||
10:13 9mTalk | Machine Translation-based Fine-grained Comments Generation for Solidity Smart Contracts Journal First Chaochen Shi Deakin University, Yong Xiang Deakin University, Jiangshan Yu Monash University, Keshav Sood Deakin University, Longxiang Gao Qilu University of Technology | ||
10:22 8mPanel | Discussion 1 Discussion |