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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Addison, N.: Solidity 2 UML (2021). https://github.com/naddison36/sol2uml. Accessed 1 Mar 2022
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
Digital Asset: DAML documentation (2021). https://docs.daml.com/index.html. Accessed 1 Mar 2022
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
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
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
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
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
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
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
Kirschner, E.: Github, November 2020. https://github.com/entzik/daml-examples/blob/master/doodle/daml/Com/Thekirschners/Daml/Doodle.daml. Accessed 1 Mar 2022
Lawton, G.: Task markers, May 2021. https://searchcio.techtarget.com/feature/Top-9-blockchain-platforms-to-consider. Accessed 1 Mar 2022
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
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
Meyer, B.: Applying ’design by contract’. Computer 25(10), 40–51 (1992)
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
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
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
tintinweb: Solidity visual developer, June 2021. https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-visual-auditor. Accessed 1 Mar 2022
Vingerhouts, A.S., Heng, S., Wautelet, Y.: Organizational modeling for blockchain oriented software engineering with extended-i* and UML. In: PoEM Workshops (2020)
Xu, X., Weber, I., Staples, M.: Architecture for Blockchain Applications. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-03035-3
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)