Skip to main content

Visual Smart Contracts for DAML

  • Conference paper
  • First Online:
Graph Transformation (ICGT 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13349))

Included in the following conference series:

Abstract

The Digital Asset Modelling Language (DAML) enables low-code development of smart contract applications. Starting from a high-level but textual notation, DAML thus implements the lower end of a model-driven development process, from a platform-specific level to implementations on a range of blockchain platforms. Existing approaches for modelling smart contracts support a domain-oriented, conceptual view but do not link to the same technology-specific level.

We develop a notation based on class diagrams and visual contracts that map directly to DAML smart contracts. The approach is grounded in an operational semantics in terms of graph transformation that accounts for the more complex behavioural features of DAML, such as its role-based access control and the order of contract execution and archival. The models, with their mappings to DAML and their operational semantics, are introduced via the Doodle case study from a DAML tutorial and validated through testing the graph transformation system against the DAML code using the Groove model checker.

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 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.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. Addison, N.: Solidity 2 UML (2021). https://github.com/naddison36/sol2uml. Accessed 1 Mar 2022

  2. Alshanqiti, A., Heckel, R., Kehrer, T.: Visual contract extractor: a tool for reverse engineering visual contracts using dynamic analysis. In: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, pp. 816–821. Association for Computing Machinery, New York, NY, USA (2016). https://doi.org/10.1145/2970276.2970287

  3. Digital Asset: DAML documentation (2021). https://docs.daml.com/index.html. Accessed 1 Mar 2022

  4. Engels, G., Lohmann, M., Sauer, S., Heckel, R.: Model-driven monitoring: an application of graph transformation for design by contract. In: Corradini, A., Ehrig, H., Montanari, U., Ribeiro, L., Rozenberg, G. (eds.) ICGT 2006. LNCS, vol. 4178, pp. 336–350. Springer, Heidelberg (2006). https://doi.org/10.1007/11841883_24

    Chapter  MATH  Google Scholar 

  5. Ghamarian, A.H., de Mol, M., Rensink, A., Zambon, E., Zimakova, M.: Modelling and analysis using GROOVE. Int. J. Softw. Tools Technol. Transf. 14(1), 15–40 (2012). https://doi.org/10.1007/s10009-011-0186-x

  6. Haelterman, N.: How to model smart contracts within software projects, February 2018. https://blog.fundrequest.io/how-to-model-smart-contracts-within-software-projects-ef1e298b21e6. Accessed 1 Mar 2022

  7. Heckel, R., Taentzer, G.: Graph Transformation for Software Engineers - With Applications to Model-Based Development and Domain-Specific Language Engineering. Springer, Cham (2020), https://doi.org/10.1007/978-3-030-43916-3

  8. Heckel, R., Wagner, A.: Ensuring consistency of conditional graph rewriting - a constructive approach. Electron. Notes Theor. Comput. Sci. 2, 118–126 (1995). https://doi.org/10.1016/S1571-0661(05)80188-4

  9. Kirschner, E.: A doodle in DAML - Part 1. Medium.com, October 2020. https://entzik.medium.com/a-doodle-in-daml-part-1-d2ef18bbf7e8. Accessed 1 Mar 2022

  10. Kirschner, E.: A doodle in DAML - Part 2. Medium.com (November 2020), https://entzik.medium.com/a-doodle-in-daml-part-2-910614d94c62. Accessed 1 Mar 2022

  11. Kirschner, E.: Github, November 2020. https://github.com/entzik/daml-examples/blob/master/doodle/daml/Com/Thekirschners/Daml/Doodle.daml. Accessed 1 Mar 2022

  12. Lawton, G.: Task markers, May 2021. https://searchcio.techtarget.com/feature/Top-9-blockchain-platforms-to-consider. Accessed 1 Mar 2022

  13. Lu, Q., et al.: Integrated model-driven engineering of blockchain applications for business processes and asset management. Softw. Pract. Exp. 51(5), 1059–1079 (2021). https://doi.org/10.1002/spe.2931

  14. Marchesi, M., Marchesi, L., Tonelli, R.: An agile software engineering method to design blockchain applications. In: Proceedings of the 14th Central and Eastern European Software Engineering Conference Russia. CEE-SECR 2018, Association for Computing Machinery, New York, NY, USA (2018). https://doi.org/10.1145/3290621.3290627

  15. Meyer, B.: Applying ’design by contract’. Computer 25(10), 40–51 (1992)

    Google Scholar 

  16. Nassar, N., Kosiol, J., Arendt, T., Taentzer, G.: Constructing optimized constraint-preserving application conditions for model transformation rules. J. Log. Algebraic Methods Program. 114, 100564 (2020). https://doi.org/10.1016/j.jlamp.2020.100564

  17. Rocha, H., Ducasse, S.: Preliminary steps towards modeling blockchain oriented software. In: 1st IEEE/ACM International Workshop on Emerging Trends in Software Engineering for Blockchain, WETSEB@ICSE 2018, Gothenburg, Sweden, May 27–June 3, 2018, pp. 52–57. ACM (2018). https://ieeexplore.ieee.org/document/8445060

  18. Szabo, N.: Formalizing and securing relationships on public networks. First Monday 2(9) (1997). https://firstmonday.org/ojs/index.php/fm/article/view/548. Accessed 1 Mar 2022

  19. tintinweb: Solidity visual developer, June 2021. https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-visual-auditor. Accessed 1 Mar 2022

  20. Vingerhouts, A.S., Heng, S., Wautelet, Y.: Organizational modeling for blockchain oriented software engineering with extended-i* and UML. In: PoEM Workshops (2020)

    Google Scholar 

  21. Xu, X., Weber, I., Staples, M.: Architecture for Blockchain Applications. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-03035-3

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Reiko Heckel .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 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

Heckel, R., Erum, Z., Rahmi, N., Pul, A. (2022). Visual Smart Contracts for DAML. In: Behr, N., Strüber, D. (eds) Graph Transformation. ICGT 2022. Lecture Notes in Computer Science, vol 13349. Springer, Cham. https://doi.org/10.1007/978-3-031-09843-7_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-09843-7_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-09842-0

  • Online ISBN: 978-3-031-09843-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics