Skip to main content
Log in

A theoretic framework of bidirectional transformation between systems and models

  • Research Paper
  • Published:
Science China Information Sciences Aims and scope Submit manuscript

Abstract

Synchronization between systems and models has been explored in model-driven engineering to enable model-based system management. Despite its promising use, there is a lack of a theoretic foundation for state-based system-model synchronization. This paper proposes a theory for state-based system-model bidirectional transformation (BX), and defines seven combinators for system-model BX to facilitate the development of well-behaved synchronizer programs. A system-model BX is a single program that converts a system with a model consistently. Forwards, it creates a model according to a system as a conventional BX. Backwards, it generates a set of system edits, which can turn the current system into a new state that is consistent with the given model. System-model BX is fully aware of the domain constraints about how to change a system, and plans a reasonable execution order for those edits, rather than applying them blindly. The paper also demonstrates the use of system-model BX by building a generic system-model synchronizer and a concrete file system synchronizer.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Fischer S, Hu Z J, Pacheco H. The essence of bidirectional programming. Sci China Inf Sci, 2015, 58: 052106

    Article  Google Scholar 

  2. Foster J N, Greenwald M B, Moore J T, et al. Combinators for bidirectional tree transformations. ACM Trans Program Lang Syst, 2007, 29: 17

    Article  Google Scholar 

  3. Ko H S, Hu Z J. An axiomatic basis for bidirectional programming. In: Proceedings of the ACM on Programming Languages, Los Angeles, 2018. 1–29

  4. Pacheco H, Zan T, Hu Z J. BiFluX: a bidirectional functional update language for XML. In: Proceedings of the 16th International Symposium on Principles and Practice of Declarative Programming (PPDP 2014), Canterbury, 2014. 1–12

  5. Tran V D, Kato H, Hu Z J. Programmable view update strategies on relations. In: Proceedings of VLDB Endow, Tokyo, 2020. 726–739

  6. Hofmann M, Pierce C B, Wagner D. Edit lenses. In: Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Philadelphia, 2012. 495–508

  7. Diskin Z, Gholizadeh H, Wider A, et al. A three-dimensional taxonomy for bidirectional model synchronization. J Syst Software, 2016, 111: 298–322

    Article  Google Scholar 

  8. He X, Hu Z J. Putback-based bidirectional model transformations. In: Proceedings of the 26th ACM Joint Meeting on European Software, Lake City, 2018. 434–444

  9. Xiong Y F, Song H, Hu Z J, et al. Synchronizing concurrent model updates based on bidirectional transformation. Softw Syst Model, 2013, 12: 89–104

    Article  Google Scholar 

  10. Hermann F, Ehrig H, Orejas F, et al. Model synchronization based on triple graph grammars: correctness, completeness and invertibility. Softw Syst Model, 2015, 14: 241–269

    Article  Google Scholar 

  11. Bencomo N, Götz S, Song H. Models@run.time: a guided tour of the state of the art and research challenges. Softw Syst Model, 2019, 18: 3049–3082

    Article  Google Scholar 

  12. Song H, Huang G, Chauvel F, et al. Supporting runtime software architecture: A bidirectional-transformation-based approach. J Syst Software, 2011, 84: 711–723

    Article  Google Scholar 

  13. Cánovas I J L, Jouault F, Cabot J, et al. API2MoL: automating the building of bridges between APIs and model-driven engineering. Inf Software Tech, 2012, 54: 257–273

    Article  Google Scholar 

  14. Boronat A. Code-first model-driven engineering: on the agile adoption of MDE tooling. In: Proceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering, San Diego, 2019. 874–886

  15. Antkiewicz M, Czarnecki K, Stephan M. Engineering of framework-specific modeling languages. IIEEE Trans Software Eng, 2009, 35: 795–824

    Article  Google Scholar 

  16. Bruneliére H, Cabot J, Dupé G, et al. MoDisco: a model driven reverse engineering framework. Inf Software Tech, 2014, 56: 1012–1032

    Article  Google Scholar 

  17. Yu Y, Lin Y, Hu Z J, et al. Maintaining invariant traceability through bidirectional transformations. In: Proceedings of the 34th International Conference on Software Engineering, Zurich, 2012. 540–550

  18. Reimann J, Seifert M, Aßmann U. Role-based generic model refactoring. In: Model Driven Engineering Languages and Systems. Berlin: Springer, 2010. 6395: 78–92

    Chapter  Google Scholar 

  19. Noguera C, Duchien L. Annotation framework validation using domain models. In: Model Driven Architecture-Foundations and Applications. Berlin: Springer, 2008. 5095: 48–62

    Chapter  Google Scholar 

  20. Eichberg M, Schäfer T, Mezini M. Using annotations to check structural properties of classes. In: Fundamental Approaches to Software Engineering. Berlin: Springer, 2005. 3442: 237–252

    Chapter  Google Scholar 

  21. Kawanaka S, Hosoya H. biXid: a bidirectional transformation language for XML. ACM SIGPLAN Not, 2006, 41: 201–214

    Article  MATH  Google Scholar 

  22. Bohannon A, Foster J N, Pierce B C, et al. Boomerang: resourceful lenses for string data. ACM SIGPLAN Not, 2008, 43: 407–419

    Article  MATH  Google Scholar 

  23. Giese H, Wagner R. From model transformation to incremental bidirectional model synchronization. Softw Syst Model, 2009, 8: 21–43

    Article  Google Scholar 

  24. Semeráth O, Debreceni C, Horváth Á, et al. Incremental backward change propagation of view models by logic solvers. In: Proceedings of the ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems, San Malo, 2016. 306–316

  25. Macedo N, Cunha A. Least-change bidirectional model transformation with QVT-R and ATL. Softw Syst Model, 2016, 15: 783–810

    Article  Google Scholar 

  26. Eramo R, Pierantonio A, Rosa G. Managing uncertainty in bidirectional model transformations. In: Proceedings of ACM SIGPLAN International Conference on Software Language Engineering, Pittsburg, 2015. 49–58

  27. Fritsche L, Kosiol J, Schürr A, et al. Efficient model synchronization by automatically constructed repair processes. In: Fundamental Approaches to Software Engineering. Cham: Springer, 2019. 11424: 116–133

    Chapter  Google Scholar 

  28. Weidner M, Miller H, Meiklejohn C. Composing and decomposing op-based CRDTs with semidirect products. In: Proceedings of the ACM on Programming Languages, Virtual, 2020. 94

  29. Mahdavi-Hezavehi S, Durelli V H S, Weyns D, et al. A systematic literature review on methods that handle multiple quality attributes in architecture-based self-adaptive systems. Inf Software Tech, 2017, 90: 1–26

    Article  Google Scholar 

  30. Krupitzer C, Roth F M, VanSyckel S, et al. A survey on engineering approaches for self-adaptive systems. Pervasive Mobile Comput, 2015, 17: 184–206

    Article  Google Scholar 

  31. Cheng B H C, de Lemos R, Giese H, et al. Software engineering for self-adaptive systems: a research roadmap. In: Software Engineering for Self-Adaptive Systems. Berlin: Springer, 2009. 5525: 1–26

    Chapter  Google Scholar 

  32. Macías-Escrivá F D, Haber R, del Toro R, et al. Self-adaptive systems: a survey of current approaches, research challenges and applications. Expert Syst Appl, 2013, 40: 7267–7279

    Article  Google Scholar 

  33. Zee K, Kuncak V, Rinard M. Full functional verification of linked data structures. ACM SIGPLAN Not, 2008, 43: 349–361

    Article  Google Scholar 

  34. Boyapati C, Khurshid S, Marinov D. Korat: automated testing based on Java predicates. In: Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis, Roma, 2002. 123–133

  35. Aichernig B K. Contract-based testing. In: Formal Methods at the Crossroads. Berlin: Springer, 2003. 2757: 34–48

    Google Scholar 

  36. He X, Chen X, Cai S B, et al. Testing bidirectional model transformation using metamorphic testing. Inf Software Tech, 2018, 104: 109–129

    Article  Google Scholar 

  37. Jackson D. Software Abstractions: Logic, Language, and Analysis. Cambridge: MIT Press, 2012

    Google Scholar 

  38. Jouault F, Allilaire F, Bézivin J, et al. ATL: a model transformation tool. Sci Comput Programm, 2008, 72: 31–39

    Article  MathSciNet  MATH  Google Scholar 

  39. Xiong Y F, Hu Z J, Zhao H Y, et al. Supporting automatic model inconsistency fixing. In: Proceedings of the the 7th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, Amsterdam, 2009. 315–324

Download references

Acknowledgements

This work was supported by Beijing Natural Science Foundation (Grant No. 4192036).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiao He.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

He, X., Hu, Z. & Meng, N. A theoretic framework of bidirectional transformation between systems and models. Sci. China Inf. Sci. 65, 202103 (2022). https://doi.org/10.1007/s11432-020-3276-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11432-020-3276-5

Keywords

Navigation