Abstract
Model Driven Architecture (MDA) together with Unified Modelling Language (UML) presents a framework which transfers the emphasis of development from source code to the higher level of abstraction i.e., models. In this paper, we demonstrate the application of MDA principles for generating smart contract code executed on a blockchain. Even though blockchain smart contracts are not in all cases a classic type of object-oriented software, which UML is intended for, we demonstrate the possibility to adapt to this specific implementation platform. MDA Platform Specific Model (PSM) is used as an input for transformation algorithm which maps PSM metamodel elements to Go Chaincode elements and produces Go chaincode. In PSM, UML class and sequence diagrams are used for specifying structural and behavioural aspects of the smart contract. MOFM2T transformation language and Acceleo tool are employed for the implementation of this algorithm. The results of the algorithm execution were demonstrated using example chaincode for machine learning model validation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Hewa, T., Ylianttila, M., Liyanage, M.: Survey on Blockchain based smart contracts: applications, opportunities and challenges. J. Netw. Comput. Appl. (2020). https://doi.org/10.1016/j.jnca.2020.102857
Khaled Salah, M., Rehman, H.U., Nizamuddin, N., Al-Fuqaha, A.: Blockchain for AI: review and open research challenges. IEEE Access 7, 10127–10149 (2019). https://doi.org/10.1109/ACCESS.2018.2890507
The Linux Foundation Hyperledger Fabric. https://www.hyperledger.org/use/fabric. Accessed 06 Nov 2020
Pastor, O., España, S., Panach, J.I., Aquino, N.: Model-driven development. Informatik Spektrum 31, 394–407 (2008). https://doi.org/10.1007/s00287-008-0275-8
Pastor, O., Molina, J.C.: Model-Driven Architecture in Practice. Springer (2007). https://www.omg.org/cgi-bin/doc?ormsc/14-06-01
Object Management Group Model Driven Architecture (MDA) MDA Guide rev. 2.0. https://www.omg.org/cgi-bin/doc?ormsc/14-06-01. Accessed 06 Nov 2020
Object Management Group UML 2.5 Specification. https://www.omg.org/spec/UML/2.5/PDF. Accessed 06 Nov 2020
Jurgelaitis, M., Drungilas, V., Butkienė, R., Vaičiukynas, E., Čeponienė, L.: Modelling principles for blockchain-based implementation of business or scientific processes. In: CEUR workshop proceedings: IVUS (2019). http://ceur-ws.org/Vol-2470/p13.pdf
Ciccozzi, F., Malavolta, I., Selic, B.: Execution of UML models: a systematic review of research and practice. Softw. Syst. Model. 18, 2313–2360 (2019). https://doi.org/10.1007/s10270-018-0675-4
Sousa, V.A., Burnay, C., Snoeck, M.: B-MERODE: a model-driven engineering and artifact-centric approach to generate Blockchain-based information systems. In: Advanced Information Systems Engineering. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-49435-3_8
López-Pintado, O., García-Bañuelos, L., Dumas, M., Weber, I., Ponomarev, A.: CATERPILLAR: a business process execution engine on the ethereum Blockchain. Softw. Pract. Experience 49(7), 1162-1193 (2018)
Sebastián, G., A.Gallud, J., Tesoriero, R.: Code generation using model driven architecture: a systematic mapping study. J. Comput. Lang. 56, p. 100935 (2020). https://doi.org/10.1016/j.cola.2019.100935
Syahputra, H., Weigand, H.: The development of smart contracts for heterogeneous Blockchains. In: Proceedings of the I-ESA Conferences, vol. 9. Springer (2019). https://doi.org/10.1007/978-3-030-13693-2_19
Wöhrer, M., Zdun, U.: Domain specific language for smart contract development. In: 2020 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), pp. 19 (2020). https://doi.org/10.1109/ICBC48266.2020.9169399
He, X., Qin, B., Zhu, Y., Chen, X., Liu, Y.: SPESC: a specification language for smart contracts. In: 42nd Annual Computer Software and Applications Conference, pp. 132–137. IEEE (2018). https://doi.org/10.1109/COMPSAC.2018.00025
Górski, T., Bednarski, J.: Transformation of the UML deployment model into a distributed ledger network configuration. In: 2020 IEEE 15th International Conference of System of Systems Engineering (SoSE), pp. 255–260. IEEE (2020). https://doi.org/10.1109/SoSE50414.2020.9130492
Zupan, N., Kasinathan, P., Cuellar, J., Sauer, M.: Secure smart contract generation based on petri nets. In: Rosa Righi R., Alberti A., Singh M. (eds.) Blockchain Technology for Industry 4.0. Blockchain Technologies. Springer (2020). https://doi.org/10.1007/978-981-15-1137-0_4
Package shim – GoDoc. https://godoc.org/github.com/hyperledger/fabric-chaincode-go/shim. Accessed 06 Nov 2020
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Jurgelaitis, M., Drungilas, V., Čeponienė, L., Vaičiukynas, E., Butkienė, R., Čeponis, J. (2021). Smart Contract Code Generation from Platform Specific Model for Hyperledger Go. In: Rocha, Á., Adeli, H., Dzemyda, G., Moreira, F., Ramalho Correia, A.M. (eds) Trends and Applications in Information Systems and Technologies. WorldCIST 2021. Advances in Intelligent Systems and Computing, vol 1368. Springer, Cham. https://doi.org/10.1007/978-3-030-72654-6_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-72654-6_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-72653-9
Online ISBN: 978-3-030-72654-6
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)