Modularizing Cross-Cutting Concerns with Aspect-Oriented Extensions for Solidity

Over the past few years, blockchain technology has attracted much attention. The smart contract is a computer program that implements and executes transactions and business logic on the blockchain. Unlike traditional general-purpose programming languages, the modularization techniques of programming languages for the smart contracts are still immature. Specifically, a suitable modularization mechanism for cross-cutting concerns is still not available. From a software engineering perspective, the modularization of cross-cutting concerns is a fundamental issue that can dramatically affect the contracts' maintainability and readability. As a result, reducing the redundant cross-cutting logic is still a challenging task. This paper proposes a practically viable approach that supports Aspect-Oriented Programming (AOP) for smart contract development on Ethereum-based blockchains. We suggest a set of extension to Solidity, a programming language that runs on the Ethereum-based blockchains, that facilitates AOP semantics and behaviors. As a proof of concept, we also realize the weaving module for the extension. The feasibility of the proposed approach is demonstrated by a case study.

[1]  Liming Zhu,et al.  Applying Design Patterns in Smart Contracts - A Case Study on a Blockchain-Based Traceability Application , 2018, ICBC.

[2]  Michael Devetsikiotis,et al.  Blockchains and Smart Contracts for the Internet of Things , 2016, IEEE Access.

[3]  Mira Mezini,et al.  Aspect-oriented programming and modular reasoning , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[4]  Joseph D. Gradecki,et al.  Mastering AspectJ: Aspect-Oriented Programming in Java , 2003 .

[5]  Peng Zhang,et al.  Design of Blockchain-Based Apps Using Familiar Software Patterns to Address Interoperability Challenges in Healthcare , 2017 .

[6]  Jan Mendling,et al.  Untrusted Business Process Monitoring and Execution Using Blockchain , 2016, BPM.

[7]  Andrew Lippman,et al.  MedRec: Using Blockchain for Medical Data Access and Permission Management , 2016, 2016 2nd International Conference on Open and Big Data (OBD).

[8]  Stéphane Ducasse,et al.  Preliminary Steps Towards Modeling Blockchain Oriented Software , 2018, 2018 IEEE/ACM 1st International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB).

[9]  Chi Wu-Lee,et al.  Toward A Service Platform for Developing Smart Contracts on Blockchain in BDD and TDD Styles , 2017, 2017 IEEE 10th Conference on Service-Oriented Computing and Applications (SOCA).

[10]  Uwe Zdun,et al.  Design Patterns for Smart Contracts in the Ethereum Ecosystem , 2018, 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData).