SPESC-Translator: Towards Automatically Smart Legal Contract Conversion for Blockchain-Based Auction Services

E. Chen, Bohan Qin, Yan Zhu, Weijing Song, Shengdian Wang, Cheng Chung William Chu, Stephen S. Yau

Research output: Contribution to journalArticlepeer-review

4 Scopus citations


In recent years, advanced smart contract languages (ASCLs) have been proposed to solve the problem of difficult reading, comprehension, and collaboration when writing smart legal contracts among people in different fields. However, this kind of languages are still hard to put into practice due to the lack of an effective conversion method from the ASCLs to executable smart contract programs. Aiming at this problem, we take SPESC as example to explore how to design conversion rules from the contract in it to the target programming language in Solidity, and to propose a three-layer smart contract framework, including advanced smart-contract layer, general smart-contract layer, and executable machine-code layer. These rules provide an approach to convert the definition of SPESC contracting parties into party-contracts on target language, as well as to produce SPESC contract terms into main-contract on target language. Moreover, the proposed framework specifies not only program architecture and storage structure on general smart-contract layer, but also important mechanisms, including personnel management, timing control, exception handling, etc., which can assist programmers to write smart contract programs. Furthermore, taking four SPESC contracts as testing objects, we provide the whole process of converting from SPESC contracts to Solidity programs by the SPESC-Translator, and verify the efficiency and security of the conversion process, including coding, deploying, running, and testing through Ethereum. The instance results show that the conversion rules and the three-layer framework can simplify the writing of smart contracts, standardize the program structure, and help programmers to verify the correctness of the contract programs.

Original languageEnglish (US)
Pages (from-to)3061-3076
Number of pages16
JournalIEEE Transactions on Services Computing
Issue number5
StatePublished - 2022


  • Smart contract
  • advanced smart contract languages
  • automated generation
  • blockchain
  • smart legal contract

ASJC Scopus subject areas

  • Hardware and Architecture
  • Computer Science Applications
  • Computer Networks and Communications
  • Information Systems and Management


Dive into the research topics of 'SPESC-Translator: Towards Automatically Smart Legal Contract Conversion for Blockchain-Based Auction Services'. Together they form a unique fingerprint.

Cite this