Skip to main content

Automatic Smart Contract Generation with Knowledge Extraction and Unified Modeling Language

  • Conference paper
  • First Online:
Smart Computing and Communication (SmartCom 2022)

Abstract

Since the launch of Ethereum in 2013, the smart contract has been a momentous part of the blockchain systems due to its character of automatic execution. The generation of smart contracts has also attracted extensive attention from the academic community. However, the preparation and generation of smart contracts are still mainly manual so far, which limits the scalability of the smart contracts. In this paper, we put forward a new method to generate smart contracts automatically based on knowledge extraction and Unified Modeling Language (UML), which can significantly accelerate the generation of smart contracts. We will describe this method in more detail based on the logistics supply chain.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Liu, L., et al.: A recursive reinforced blockchain performance evaluation and improvement architecture: maximising diversity to improve scalability. Int. J. Commun. Syst. e5315 (2022)

    Google Scholar 

  2. Zheng, Z., Xie, S., Dai, H.-N., Chen, X., Wang, H.: Blockchain challenges and opportunities: a survey. Int. J. Web Grid Serv. 14(4), 352–375 (2018)

    Article  Google Scholar 

  3. Jurgelaitis, M., Čeponienė, L., Butkienė, R.: Solidity code generation from UML state machines in model-driven smart contract development. IEEE Access 10, 33465–33481 (2022)

    Article  Google Scholar 

  4. Liu, L., Wei-Tek Tsai, Md., Bhuiyan, Z.A., Peng, H., Liu, M.: Blockchain-enabled fraud discovery through abnormal smart contract detection on ethereum. Futur. Gener. Comput. Syst. 128, 158–166 (2022)

    Article  Google Scholar 

  5. Balog, M., Gaunt, A.L., Brockschmidt, M., Nowozin, S., Tarlow, D.: Deepcoder: learning to write programs. arXiv preprint arXiv:1611.01989 (2016)

  6. Veeramani, A., Venkatesan, K., Nalinadevi, K.: Abstract syntax tree based unified modeling language to object oriented code conversion. In: Proceedings of the 2014 International Conference on Interdisciplinary Advances in Applied Computing, pp. 1–8 (2014)

    Google Scholar 

  7. Choudhury, O., Rudolph, N., Sylla, I., Fairoza, N., Das, A.: Auto-generation of smart contracts from domain-specific ontologies and semantic rules. In: 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), pp. 963–970. IEEE (2018)

    Google Scholar 

  8. Tateishi, T., Yoshihama, S., Sato, N., Saito, S.: Automatic smart contract generation using controlled natural language and template. IBM J. Res. Dev. 63(2/3), 6–1 (2019)

    Article  Google Scholar 

  9. Asawa, K., Kukreja, S., Gondkar, R.: An NCDP for developing a blockchain based dynamic supply chain management with auto-generation of smart contract. In: 2021 26th International Conference on Automation and Computing (ICAC), pp. 1–6. IEEE (2021)

    Google Scholar 

  10. Li, X., et al.: Entity-relation extraction as multi-turn question answering. arXiv preprint arXiv:1905.05529 (2019)

  11. Li, Q., et al.: Reinforcement learning-based dialogue guided event extraction to exploit argument relations. IEEE/ACM Trans. Audio Speech Lang. Process. 30, 520–533 (2021)

    Article  Google Scholar 

  12. Peng, H., et al.: Fine-grained event categorization with heterogeneous graph convolutional networks. arXiv preprint arXiv:1906.04580 (2019)

  13. Peng, H., et al.: Streaming social event detection and evolution discovery in heterogeneous information networks. ACM Trans. Knowl. Discov. Data 15(5), 1–33 (2021)

    Article  Google Scholar 

  14. Peng, H., Zhang, R., Li, S., Cao, Y., Pan, S., Philip, Yu.: Reinforced, incremental and cross-lingual event detection from social messages. IEEE Trans. Pattern Anal. Mach. Intell. 45(1), 980–998 (2022)

    Article  Google Scholar 

  15. Peng, H., Zhang, R., Dou, Y., Yang, R., Zhang, J., Yu, P.S.: Reinforced neighborhood selection guided multi-relational graph neural networks. ACM Trans. Inf. Syst. (TOIS) 40(4), 1–46 (2021)

    Article  Google Scholar 

  16. Peng, H., et al.: Lime: low-cost and incremental learning for dynamic heterogeneous information networks. IEEE Trans. Comput. 71(3), 628–642 (2021)

    Article  MATH  Google Scholar 

  17. Ben Abdessalem Karaa, W., Ben Azzouz, Z., Singh, A., Dey, N., Ashour, A.S., Ben Ghazala, H.: Automatic builder of class diagram (ABCD): an application of UML generation from functional requirements. Softw. Pract. Exp. 46(11), 1443–1458 (2016)

    Google Scholar 

  18. Abdelnabi, E.A., Maatuk, A.M., Abdelaziz, T.M., Elakeili, S.M.: Generating UML class diagram using NLP techniques and heuristic rules. In: 2020 20th International Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA), pp. 277–282 (2020)

    Google Scholar 

  19. Peng, H., Li, H., Song, Y., Zheng, V., Li, J.: Differentially private federated knowledge graphs embedding. In: Proceedings of the 30th ACM International Conference on Information & Knowledge Management, pp. 1416–1425 (2021)

    Google Scholar 

  20. Eberts, M., Ulges, A.: Span-based joint entity and relation extraction with transformer pre-training. arXiv preprint arXiv:1909.07755 (2019)

  21. Du, X., Cardie, C.: Event extraction by answering (almost) natural questions. arXiv preprint arXiv:2004.13625 (2020)

  22. Niaz, I.A., Tanaka, J., et al.: Mapping UML statecharts to java code. In: IASTED Conference on Software Engineering, pp. 111–116 (2004)

    Google Scholar 

  23. Usman, M., Nadeem, A.: Automatic generation of java code from UML diagrams using UJECTOR. Int. J. Softw. Eng. Appl. 3(2), 21–37 (2009)

    Google Scholar 

  24. Sunitha, E.V., Samuel, P.: Automatic code generation from UML state chart diagrams. IEEE Access 7, 8591–8608 (2019)

    Article  Google Scholar 

  25. Kai, H., Zhu, J., Ding, Y., Bai, X., Huang, J.: Smart contract engineering. Electronics 9(12), 2042 (2020)

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported by the S &T Program of Hebei through grant 20310101D.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Mingsheng Liu or Jianwu Zheng .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ran, P. et al. (2023). Automatic Smart Contract Generation with Knowledge Extraction and Unified Modeling Language. In: Qiu, M., Lu, Z., Zhang, C. (eds) Smart Computing and Communication. SmartCom 2022. Lecture Notes in Computer Science, vol 13828. Springer, Cham. https://doi.org/10.1007/978-3-031-28124-2_44

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-28124-2_44

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-28123-5

  • Online ISBN: 978-3-031-28124-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics