Model-Driven Design of Object and Component Systems

  • Zhiming LiuEmail author
  • Xiaohong Chen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9506)


The notion of software engineering implies that software design and production should be based on the types of theoretical foundations and practical disciplines that are established in the traditional branches of engineering. The goal is to make development of complex software systems more predictable and the systems developed more trustworthy - safe, secure and dependable. A number of theories have been well developed in the past half a century, including Abstract Data Types, Hoare Logic, Process Calculi, and I/O automata, and those alike. Based on them, techniques and tools have been developed for software specification, refinement and verification.

However, the theoretically sound techniques and tools have not been seamlessly integrated in practical software development, and their impact upon commonly-used software systems is still far from convincing to software engineering practitioners. This is clearly reflected by the challenges of their applications in engineering large-scale systems, including Cyber-Physical Systems (CPS), Networks of Things and Cloud-Based Systems, that have multi-dimensional complexities. Indeed, students are not often shown how the theories, and their underpinned techniques and tools, can better inform the software engineering they are traditionally taught. The purpose of this course to demonstrate such an effort.

We present a model-driven design framework for component-based and object-oriented software systems. We identify a set of UML notations and textual descriptions for representing different abstractions of software artefacts produced in different development stages. These abstractions, their relations and manipulations all have formalisations in the rCOS formal method of component and object systems. The aim is to allow the advantage of using precise models for development better appreciated. We organise the lecture notes into three chapters, each having a title page but all the references to literature are given at the end of Part III.


Component-based architecture Object-oriented design Interfaces Contracts Design patterns rCOS UML 



The development of materials of this chapter started in 1998, and it has been revised ever since through the teaching at the University of leicester during 1998–2001, United Nations University -International Institute for Software Technology (UNU-IIST, Macau) in 2001–2013, and Birmingham City University in 2015, and at many international training schools (mostly supported by the UNU-IIST). We acknowledge the materials in the textbook of Larman [42] as a major source of knowledge and ideas, that have developed in all the versions of the course notes. The extensive research at UNU-IIST on the rCOS method and the development of its tool support have significantly contributed to development of the understanding of theoretical insight of object-oriented design, component-based design, and model-driven development, and their relations. We acknowledge the contribution from Xin Chen, Zhenbang Chen, Ruzheng Dong, He Jifeng, Wei Ke, Dan Li Xiaoshan Li, Jing Liu, Charles Morisset, Anders Ravn, Volker Stolz, Shuling Wang, Jing Yang, Liang Zhao, and Naijun Zhan.

Our special thanks go to Jonathan Bowen and Anders Ravn for their careful reading and constructive comments, without that we could not have made this chapter into its current form.


  1. 1.
  2. 2.
    Abrial, J.R.: The B-Book: Assigning Programs to Meanings. Cambridge University Press, Cambridge (1996)CrossRefzbMATHGoogle Scholar
  3. 3.
    Abrial, J.R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, New York (2010)CrossRefzbMATHGoogle Scholar
  4. 4.
    Limet, S., Robert, S., Turki, A.: Controlling an iteration-wise coherence in dataflow. In: Arbab, F., Ölveczky, P.C. (eds.) FACS 2011. LNCS, vol. 7253, pp. 241–258. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  5. 5.
    Bell, M.: Service-Oriented Modeling: Service Analysis, Design, and Architecture. Wiley & Sons, New Jersey (2008)Google Scholar
  6. 6.
    Booch, G.: Object-Oriented Analysis and Design with Applications. Addison-Wesley, Boston (1994)zbMATHGoogle Scholar
  7. 7.
    Bowen, J.P., Hinchey, M.G.: Formal methods. In: Gonzalez, T.F., Diaz-Herrera, J., Tucker, A.B.(eds.) Computer Science Handbook, 3rd edn. Section XI, Software Engineering, vol. 1, Computer Science and Software Engineering, Part 8, Programming Languages, Chapter 71, pp. 1–25. CRC Press (2014)Google Scholar
  8. 8.
    Brooks, F.P.: No silver bullet: essence and accidents of software engineering. IEEE Comput. 20(4), 10–19 (1987)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Brooks, F.P.: The mythical man-month: after 20 years. IEEE Softw. 12(5), 57–60 (1995)CrossRefGoogle Scholar
  10. 10.
    Chandy, K.M., Misra, J.: Parallel Program Design: a Foundation. Addison-Wesley, Reading. (1988)Google Scholar
  11. 11.
    Chen, X., He, J., Liu, Z., Zhan, N.: A model of component-based programming. In: Arbab, F., Sirjani, M. (eds.) FSEN 2007. LNCS, vol. 4767, pp. 191–206. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. 12.
    Chen, X., Liu, Z., Mencl, V.: Separation of concerns and consistent integration in requirements modelling. In: van Leeuwen, J., Italiano, G.F., van der Hoek, W., Meinel, C., Sack, H., Plášil, F. (eds.) SOFSEM 2007. LNCS, vol. 4362, pp. 819–831. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  13. 13.
    Chen, Z., et al.: Modelling with relational calculus of object and component systems - rCOS. In: Rausch, A., Reussner, R., Mirandola, R., Plášil, F. (eds.) The Common Component Modeling Example. LNCS, vol. 5153, pp. 116–145. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  14. 14.
    Chen, Z., Li, X., Liu, Z., Stolz, V., Yang, L.: Harnessing rCOS for tool support —the CoCoME experience. In: Jones, C.B., Liu, Z., Woodcock, J. (eds.) Formal Methods and Hybrid Real-Time Systems. LNCS, vol. 4700, pp. 83–114. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Chen, Z., Liu, Z., Ravn, A.P., Stolz, V., Zhan, N.: Refinement and verification in component-based model driven design. Sci. Comput. Program. 74(4), 168–196 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Chen, Z., Liu, Z., Stolz, V.: The rCOS tool. In: Fitzgerald, J., Larsen, P.G., Sahara, S. (eds.) Modelling and Analysis in VDM: Proceedings of the Fourth VDM/Overture Workshop, pp. 15–24. No. CS-TR-1099 in Technical report Series, University of Newcastle upon Tyne (2008)Google Scholar
  17. 17.
    Chen, Z., Morisset, C., Stolz, V.: Specification and validation of behavioural protocols in the rCOS modeler. In: Arbab, F., Sirjani, M. (eds.) FSEN 2009. LNCS, vol. 5961, pp. 387–401. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  18. 18.
    Clarke, E.M., Emerson, E.A.: Design and synthesis of synchronization skeletons using branching-time temporal logic. In: Kozen, D. (ed.) Logics of Programs. LNCS, vol. 131, pp. 52–71. Springer, Heidelberg (1981)CrossRefGoogle Scholar
  19. 19.
    Dijkstra, E.W., Scholten, C.S.: Predicate Calculus and Program Semantics. Springer, New York (1990)CrossRefzbMATHGoogle Scholar
  20. 20.
    Dijkstra, E.W.: The humble programmer. Commun. ACM 15(10), 859–866 (1972). An ACM Turing Award lectureCrossRefGoogle Scholar
  21. 21.
    Dong, R., Zhan, N., Zhao, L.: An interface model of software components. In: Liu, Z., Woodcock, J., Zhu, H. (eds.) ICTAC 2013. LNCS, vol. 8049, pp. 159–176. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  22. 22.
    Fischer, C.: Fault-tolerant programming by transformations. Ph.D. thesis, University of Warwick (1991)Google Scholar
  23. 23.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1994)zbMATHGoogle Scholar
  24. 24.
    Harel, D.: Statecharts: a visual formalism for complex systems. Sci. Comput. Program. 8(3), 231–274 (1987)MathSciNetCrossRefzbMATHGoogle Scholar
  25. 25.
    He, J., Li, X., Liu, Z.: Component-based software engineering. In: Van Hung, D., Wirsing, M. (eds.) ICTAC 2005. LNCS, vol. 3722, pp. 70–95. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  26. 26.
    He, J., Li, X., Liu, Z.: A theory of reactive components. Electr. Notes Theor. Comput. Sci. 160, 173–195 (2006)CrossRefGoogle Scholar
  27. 27.
    He, J., Liu, Z., Li, X.: rCOS: a refinement calculus of object systems. Theor. Comput. Sci. 365(1–2), 109–142 (2006)MathSciNetzbMATHGoogle Scholar
  28. 28.
    Heineman, G.T., Councill, W.T.: Component-Based Software Engineering: Putting the Pieces Together. Addison-Wesley Professional, Reading (2001)Google Scholar
  29. 29.
    Herold, S., et al.: CoCoME - the common component modeling example. In: Rausch, A., Reussner, R., Mirandola, R., Plášil, F. (eds.) The Common Component Modeling Example. LNCS, vol. 5153, pp. 16–53. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  30. 30.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)CrossRefzbMATHGoogle Scholar
  31. 31.
    Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Upper Saddle River (1985)zbMATHGoogle Scholar
  32. 32.
    Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice-Hall, Upper Saddle River (1998)zbMATHGoogle Scholar
  33. 33.
    Holzmann, G.J.: The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley, Reading (2004)Google Scholar
  34. 34.
    Holzmann, G.J.: Conquering complexity. IEEE Comput. 40(12), 111–113 (2007)CrossRefGoogle Scholar
  35. 35.
    Johnson, J.: My Life is Failure: 100 Things You Should Know to Be a Better Project Leader. Standish Group International, West Yarmouth (2006)Google Scholar
  36. 36.
    Jones, C.B.: Systematic Software Development using VDM. Prentice Hall, Upper Saddle River (1990)zbMATHGoogle Scholar
  37. 37.
    Ke, W., Li, X., Liu, Z., Stolz, V.: rCOS: a formal model-driven engineering method for component-based software. Front. Comput. Sci. China 6(1), 17–39 (2012)MathSciNetzbMATHGoogle Scholar
  38. 38.
    Ke, W., Liu, Z., Wang, S., Zhao, L.: A graph-based operational semantics of OO programs. In: Breitman, K., Cavalcanti, A. (eds.) ICFEM 2009. LNCS, vol. 5885, pp. 347–366. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  39. 39.
    Khaitan, S.: Design techniques and applications of cyber physical systems: a survey. IEEE Syst. J. 9(2), 350–365 (2014)CrossRefGoogle Scholar
  40. 40.
    Kroll, P., Kruchten, P.: The Rational Unified Process Made Easy: a Practitioner’s Guide to the RUP. Addison-Wesley, Boston (2003)Google Scholar
  41. 41.
    Lamport, L.: Specifying Systems: the TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2002)Google Scholar
  42. 42.
    Larman, C.: Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, 2nd edn. Prentice-Hall, Upper Saddle River (2001)Google Scholar
  43. 43.
    Lee, E.: Cyber physical systems: design challenges. Technical report No. UCB/EECS-2008-8, University of California, Berkeley (2008)Google Scholar
  44. 44.
    Leveson, N.G., Turner, C.S.: An investigation of the Therac-25 accidents. IEEE Comput. 26(7), 18–41 (1993)CrossRefGoogle Scholar
  45. 45.
    Li, D., Li, X., Liu, Z., Stolz, V.: Interactive transformations from object-oriented models to component-based models. Technical report 451, IIST, United Nations University, Macao (2011)Google Scholar
  46. 46.
    Li, D., Li, X., Liu, Z., Stolz, V.: Interactive transformations from object-oriented models to component-based models. In: Arbab, F., Ölveczky, P.C. (eds.) FACS 2011. LNCS, vol. 7253, pp. 97–114. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  47. 47.
    Li, D., Li, X., Liu, Z., Stolz, V.: Support formal component-based development with UML profile. In: 22nd Australian Conference on Software Engineering (ASWEC 2013), Melbourne, pp. 191–200. IEEE Computer Society, 4–7 June 2013Google Scholar
  48. 48.
    Li, X., Lu, R., Liang, X., Shen, X., Chen, J., Lin, X.: Smart community: an internet of things application. Commun. Mag. 49(11), 68–75 (2011)CrossRefGoogle Scholar
  49. 49.
    Li, X., Liu, Z., He, J.: Formal and use-case driven requirement analysis in UML. In: 25th International Computer Software and Applications Conference (COMPSAC 2001), Invigorating Software Development, Chicago, pp. 215–224. IEEE Computer Society, 8–12 October 2001Google Scholar
  50. 50.
    Li, X., Liu, Z., He, J.: A formal semantics of UML sequence diagram. In: 15th Australian Software Engineering Conference (ASWEC 2004), Melbourne, pp. 168–177. IEEE Computer Society, 13–16 April 2004Google Scholar
  51. 51.
    Li, X., Liu, Z., He, J.: Consistency checking of UML requirements. In: 10th International Conference on Engineering of Complex Computer Systems, pp. 411–420. IEEE Computer Society (2005)Google Scholar
  52. 52.
    Liu, J., Liu, Z., He, J., Li, X.: Linking UML models of design and requirement. In: Proceedings of the 2004 Australian Software Engineering Conference, pp. 329–338. IEEE Computer Society (2004)Google Scholar
  53. 53.
    Liu, Z.: Software development with UML. Technical Report 259, IIST, United Nations University, P.O. Box 3058, Macao (2002)Google Scholar
  54. 54.
    Liu, Z., Chen, X.: Interface-driven design in evolving component-based architectures, workshop of the 25 Anniversary of ProCoS, Proceedings to be Published in Springer Lecture Notes in Computer Science (2015)Google Scholar
  55. 55.
    Liu, Z., He, J., Li, X., Chen, Y.F.: A relational model for formal object-oriented requirement analysis in UML. In: Dong, J.S., Woodcock, J. (eds.) ICFEM 2003. LNCS, vol. 2885, pp. 641–664. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  56. 56.
    Liu, Z., Joseph, M.: Transformation of programs for fault-tolerance. Form. Asp. Comput. 4(5), 442–469 (1992)CrossRefzbMATHGoogle Scholar
  57. 57.
    Liu, Z., Joseph, M.: Specification and verification of fault-tolerance, timing, and scheduling. ACM Trans. Program. Lang. Syst. 21(1), 46–89 (1999)CrossRefGoogle Scholar
  58. 58.
    Liu, Z., Kang, E.Y., Zhan, N.: Composition and refinement of components. In: Butterfield, A. (ed.) UTP 2008. LNCS, vol. 5713, pp. 238–257. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  59. 59.
    Liu, Z., Li, X., He, J.: Using transition systems to unify UML models. In: George, C.W., Miao, H. (eds.) ICFEM 2002. LNCS, vol. 2495, pp. 535–547. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  60. 60.
    Liu, Z., Mencl, V., Ravn, A.P., Yang, L.: Harnessing theories for tool support. In: Proceedings of the Second International Symposium on Leveraging Applications of Formal Methods, Verification and Validation (ISoLA 2006), pp. 371–382. IEEE Computer Society, full version as UNU-IIST Technical report 343 (2006)Google Scholar
  61. 61.
    Liu, Z., Morisset, C., Stolz, V.: rCOS: theory and tool for component-based model driven development. In: Arbab, F., Sirjani, M. (eds.) FSEN 2009. LNCS, vol. 5961, pp. 62–80. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  62. 62.
    Long, Q., Liu, Z., Li, X., He, J.: Consistent code generation from UML models. In: Australian Software Engineering Conference, pp. 23–30. IEEE Computer Society, UNU-IIST TR 319 (2005)Google Scholar
  63. 63.
    Long, Q., Qiu, Z., Liu, Z.: Formal use of design patterns and refactoring. In: Margaria, T., Steffen, B. (eds.) ISoLA 2008. Communications in Computer and Information Science, vol. 17, pp. 323–338. Springer, Berlin (2008)Google Scholar
  64. 64.
    Lynch, N.A., Tuttle, M.R.: An introduction to input/output automata. CWI Q. 2(3), 219–246 (1989)MathSciNetzbMATHGoogle Scholar
  65. 65.
    Manna, Z., Pnueli, A.: The Temporal Logic of Reactive and Concurrent Systems: Specification. Springer, New York (1992)CrossRefzbMATHGoogle Scholar
  66. 66.
    Milner, R.: Communication and Concurrency. Prentice-Hall Inc., Upper Saddle River (1989)zbMATHGoogle Scholar
  67. 67.
    Naur, P., Randell, B. (eds.): Software engineering: report of a conference sponsored by the NATO science committee, Garmisch, 7–11 October 1968, Brussels, Scientific Affairs Division, NATO (1969)Google Scholar
  68. 68.
    Nielson, H., Nielson, F.: Semantics with Applications. A Formal Introduction. Wiley, Chichester (1993)zbMATHGoogle Scholar
  69. 69.
    Nuseibeh, B., Easterbrook, S.: Requirements engineering: a roadmap. In: Proceedings of the Conference on the Future of Software Engineering, ICSE 2000, pp. 35–46. ACM, New York (2000)Google Scholar
  70. 70.
    Object Managment Group: Model driven architecture - a technical perspective, document number ORMSC, 01 July 2001Google Scholar
  71. 71.
    Oettinger, A.: The hardware-software complementarity. Commun. ACM 10(10), 604–606 (1967)CrossRefGoogle Scholar
  72. 72.
    Palomar, E., Liu, Z., Bowen, J.P., Zhang, Y., Maharjan, S.: Component-based modelling for sustainable and scalable smart meter networks. In: Proceeding of IEEE International Symposium on a World of Wireless, Mobile and Multimedia Networks, WoWMoM 2014, Sydney, pp. 1–6, 19 June 2014Google Scholar
  73. 73.
    Peter, L.: The Peter Pyramid. William Morrow, New York (1986)Google Scholar
  74. 74.
    Peterson, J.L.: Petri Nets. ACM Comput. Surv. 9(3), 223–252 (1977)CrossRefzbMATHGoogle Scholar
  75. 75.
    Plotkin, G.D.: The origins of structural operational semantics. J. Log. Algebr. Program. 60(61), 3–15 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  76. 76.
    Pressman, R.S.: Software Engineering: A Practitioner’s Approach. The McGraw-Hill Companies, New York (2005)zbMATHGoogle Scholar
  77. 77.
    Queille, J.P., Sifakis, J.: Specification and verification of concurrent systems in CESAR. In: Dezani-Ciancaglini, M., Montanari, U. (eds.) Symposium on Programming. LNCS, vol. 137, pp. 337–351. Springer, Heidelberg (1982)CrossRefGoogle Scholar
  78. 78.
    Randell, B., Buxton, J. (eds.): Software engineering: report of a conference sponsored by the NATO science committee, Rome, Italy, 27–31 October 1969, Brussels, Scientific Affairs Division, NATO (1969)Google Scholar
  79. 79.
    Rausch, A., Reussner, R., Mirandola, R., Plášil, F.: Introduction. In: Rausch, A., Reussner, R., Mirandola, R., Plášil, F. (eds.) The Common Component Modeling Example. LNCS, vol. 5153, pp. 1–3. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  80. 80.
    Rayl, A.: NASA engineers and scientists-transforming dreams into reality (2008)Google Scholar
  81. 81.
    Robinson, K.: Ariane 5: flight 501 failure - a case study (2011)Google Scholar
  82. 82.
    Roscoe, A.W.: Theory and Practice of Concurrency. Prentice-Hall, Upper Saddle River (1997)Google Scholar
  83. 83.
    Shapiro, M.: Smart cities: quality of life, productivity, and the growth effects of human capital. Rev. Econ. Stat. 88, 324–335 (2006)CrossRefGoogle Scholar
  84. 84.
    Sommerville, I.: Software Engineering, 6th edn. Pearson Education Ltd., England (2001)zbMATHGoogle Scholar
  85. 85.
    Spivey, J.M.: The Z Notation: a Reference Manual, 2nd edn. Prentice Hall, Upper Saddle River (1992)zbMATHGoogle Scholar
  86. 86.
    Stellman, A., Greene, J.: Applied Software Project Management. O’Reilly Media (2005)Google Scholar
  87. 87.
    Stoy, J.E.: Denotational Semantics: the Scott-Strachey Approach to Programming Language Semantics. MIT Press, Cambridge (1977)zbMATHGoogle Scholar
  88. 88.
    Szyperski, C.: Component Software: Beyond Object-Oriented Programming, 2nd edn. Addison-Wesley Longman Publishing Co. Inc., Boston (2002)Google Scholar
  89. 89.
    Wirsing, M., Banâtre, J.P., Hölzl, M.M., Rauschmayer, A. (eds.): Software-Intensive Systems and New Computing Paradigms - Challenges and Visions, vol. 5380. Springer, New York (2008)zbMATHGoogle Scholar
  90. 90.
    Yang, L., Stolz, V.: Integrating refinement into software development tools. In: Pu, G., Stolz, V. (eds.) 1st International Workshop on Harnessing Theories for Tool Support in Software. Electronic Notes in Theoretical Computer Science, vol. 207, pp. 69–88. Elsevier, Amsterdam, UNU-IIST TR 385 (2008)Google Scholar
  91. 91.
    Zhao, L., Liu, X., Liu, Z., Qiu, Z.: Graph transformations for object-oriented refinement. Form. Asp. Comput. 21(1–2), 103–131 (2009)CrossRefzbMATHGoogle Scholar
  92. 92.
    Zhao, L., Wang, S., Liu, Z.: Graph-based object-oriented hoare logic. In: Liu, Z., Woodcock, J., Zhu, H. (eds.) Theories of Programming and Formal Methods. LNCS, vol. 8051, pp. 374–393. Springer, Heidelberg (2013)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.Centre for Software Research and InnovationSouthwest UniversityChongqingChina
  2. 2.Singapore University of Technology and DesignSingaporeSingapore

Personalised recommendations