Skip to main content

2018 | OriginalPaper | Buchkapitel

A Framework for UML-Based Component-Based Design and Code Generation for Reactive Systems

verfasst von : Van Cam Pham, Ansgar Radermacher, Sébastien Gérard, Shuai Li

Erschienen in: Model-Driven Engineering and Software Development

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

One way to design complex systems is to use an event-driven architecture. Model Driven Engineering (MDE) promotes the use of different abstract concepts, among which are the UML state machine, composite structure elements and their associated visualizations, as a powerful means to design such an architecture. MDE seeks to increase software productivity by automatically generating executable code from state machines and composite structures. To this end, a code generation approach in MDE should support all model elements used at the design level. However, existing code generation approaches and tools are still limited, especially when considering concurrency, event types, and pseudo states such as history and junction. Furthermore, in the literature, the combination of component-based design and UML state machines is supported by only a few existing approaches. This paper explores this combination and provides code generation patterns and framework-based tooling support for the combination and complete and efficient code generation from UML state machines. We extend a well-known state machine code generation pattern with concurrency support. In order to verify the semantics of generated code, we execute code generated by the proposed framework with a set of state-machine examples that are part of a test-suite described in the recent OMG standard Precise Semantics Of State Machine. The traced execution results comply with the standard and are a good hint that the execution is semantically correct. Regarding code efficiency, the code generated by our approach supports multi-thread-based concurrency, and the size of the generated code is smaller compared to considered approaches. Moreover, we demonstrate the practicality, feasibility, and scalability of the proposed approach with two case studies.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
Some approaches call the method of this thread as a super loop reading events from the queue.
 
2
To avoid runtime memory allocation, STATE_MAX is for each state machine, rather than for all state machines, which will waste resource small state machines.
 
3
Component-based design can be used, but the purpose of this case study is to show the usability and practicality of UML state machines and events.
 
Literatur
1.
Zurück zum Zitat OMG Available Specification without Change Bars. OMG Unified Modeling Language (OMG UML), pp. 1–212 (2007) OMG Available Specification without Change Bars. OMG Unified Modeling Language (OMG UML), pp. 1–212 (2007)
2.
Zurück zum Zitat Posse, E.: PapyrusRT: modelling and code generation (invited presentation). In: Proceedings of the International Workshop on Open Source Software for Model Driven Engineering Co-located with ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS 2015), Ottawa, Canada, 29 September 2015, pp. 54–63 (2015) Posse, E.: PapyrusRT: modelling and code generation (invited presentation). In: Proceedings of the International Workshop on Open Source Software for Model Driven Engineering Co-located with ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS 2015), Ottawa, Canada, 29 September 2015, pp. 54–63 (2015)
3.
Zurück zum Zitat IBM: IBM Rhapsody (2016). Accessed 4 July 2016 IBM: IBM Rhapsody (2016). Accessed 4 July 2016
5.
Zurück zum Zitat Whittle, J., Hutchinson, J., Rouncefield, M.: Model-driven engineering practices in industry: social, organizational and managerial factors that lead to success or failure. Sci. Comput. Program. 89, 144–161 (2014)CrossRef Whittle, J., Hutchinson, J., Rouncefield, M.: Model-driven engineering practices in industry: social, organizational and managerial factors that lead to success or failure. Sci. Comput. Program. 89, 144–161 (2014)CrossRef
7.
Zurück zum Zitat Badreddin, O., Lethbridge, T.C., Forward, A., Elaasar, M., Aljamaan, H., Garzon, M.A.: Enhanced code generation from UML composite state machines. In: 2014 2nd International Conference on Model-Driven Engineering and Software Development (MODELSWARD), pp. 235–245. IEEE (2014) Badreddin, O., Lethbridge, T.C., Forward, A., Elaasar, M., Aljamaan, H., Garzon, M.A.: Enhanced code generation from UML composite state machines. In: 2014 2nd International Conference on Model-Driven Engineering and Software Development (MODELSWARD), pp. 235–245. IEEE (2014)
10.
Zurück zum Zitat Charfi, A., Mraidha, C., Boulet, P.: An optimized compilation of UML state machines. In: 2012 IEEE 15th International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing, pp. 172–179 (2012) Charfi, A., Mraidha, C., Boulet, P.: An optimized compilation of UML state machines. In: 2012 IEEE 15th International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing, pp. 172–179 (2012)
11.
Zurück zum Zitat OMG: Precise Semantics of UML State Machines (PSSM) Revised Submission (2016). Revised Submission, ad/16-11-01 OMG: Precise Semantics of UML State Machines (PSSM) Revised Submission (2016). Revised Submission, ad/16-11-01
12.
Zurück zum Zitat Pham, V.C., Radermacher, A., Gérard, S., Li, S.: Complete code generation from UML state machine. In: Proceedings of the 5th International Conference on Model-Driven Engineering and Software Development, MODELSWARD 2017, Porto, Portugal, 19–21 February 2017, pp. 208–219 (2017) Pham, V.C., Radermacher, A., Gérard, S., Li, S.: Complete code generation from UML state machine. In: Proceedings of the 5th International Conference on Model-Driven Engineering and Software Development, MODELSWARD 2017, Porto, Portugal, 19–21 February 2017, pp. 208–219 (2017)
13.
Zurück zum Zitat OMG: A UML Profile for MARTE: Modeling and Analysis of Real- Time Embedded Systems, version 1.1 formal/2011-06-02 (2011) OMG: A UML Profile for MARTE: Modeling and Analysis of Real- Time Embedded Systems, version 1.1 formal/2011-06-02 (2011)
14.
Zurück zum Zitat Butenhof, D.R.: Programming with POSIX Threads. Addison-Wesley Professional, Boston (1997) Butenhof, D.R.: Programming with POSIX Threads. Addison-Wesley Professional, Boston (1997)
15.
Zurück zum Zitat Niaz, I.A., Tanaka, J., et al.: Mapping UML statecharts to Java code. In: IASTED Conference on Software Engineering, pp. 111–116 (2004) Niaz, I.A., Tanaka, J., et al.: Mapping UML statecharts to Java code. In: IASTED Conference on Software Engineering, pp. 111–116 (2004)
16.
Zurück zum Zitat Shalyto, A., Shamgunov, N.: State machine design pattern. In: Proceedings of the 4th International Conference on .NET Technologies (2006) Shalyto, A., Shamgunov, N.: State machine design pattern. In: Proceedings of the 4th International Conference on .NET Technologies (2006)
17.
Zurück zum Zitat Spinke, V.: An object-oriented implementation of concurrent and hierarchical state machines. Inf. Softw. Technol. 55, 1726–1740 (2013)CrossRef Spinke, V.: An object-oriented implementation of concurrent and hierarchical state machines. Inf. Softw. Technol. 55, 1726–1740 (2013)CrossRef
18.
Zurück zum Zitat Booch, G., Rumbaugh, J., Jacobson, I.: The Unified Modeling Language User Guide, vol. 3 (1998) Booch, G., Rumbaugh, J., Jacobson, I.: The Unified Modeling Language User Guide, vol. 3 (1998)
20.
Zurück zum Zitat Knapp, A.: Semantics of UML State Machines (2004) Knapp, A.: Semantics of UML State Machines (2004)
24.
Zurück zum Zitat Blech, J.O., Glesner, S.: Formal verification of Java code generation from UML models. In: Proceedings of the 3rd International Fujaba Days, pp. 49–56 (2005) Blech, J.O., Glesner, S.: Formal verification of Java code generation from UML models. In: Proceedings of the 3rd International Fujaba Days, pp. 49–56 (2005)
30.
Zurück zum Zitat Lavender, R.G., Schmidt, D.C.: Active object. Context, pp. 1–12 (1996) Lavender, R.G., Schmidt, D.C.: Active object. Context, pp. 1–12 (1996)
31.
Zurück zum Zitat Boost Library: The Boost Statechart Library (2016). Accessed 4 July 2016 Boost Library: The Boost Statechart Library (2016). Accessed 4 July 2016
35.
Zurück zum Zitat Nethercote, N., Seward, J.: Valgrind: a framework for heavyweight dynamic binary instrumentation. In: ACM SIGPLAN Notices, vol. 42, pp. 89–100. ACM (2007)CrossRef Nethercote, N., Seward, J.: Valgrind: a framework for heavyweight dynamic binary instrumentation. In: ACM SIGPLAN Notices, vol. 42, pp. 89–100. ACM (2007)CrossRef
36.
Zurück zum Zitat Katz, R.H., Borriello, G.: Contemporary Logic Design (2005) Katz, R.H., Borriello, G.: Contemporary Logic Design (2005)
39.
Zurück zum Zitat Domínguez, E., Pérez, B., Rubio, A.L., Zapata, M.A.: A systematic review of code generation proposals from state machine specifications. Inf. Softw. Technol. 54(10), 1045–1066 (2012)CrossRef Domínguez, E., Pérez, B., Rubio, A.L., Zapata, M.A.: A systematic review of code generation proposals from state machine specifications. Inf. Softw. Technol. 54(10), 1045–1066 (2012)CrossRef
40.
Zurück zum Zitat Douglass, B.P.: Real-Time UML: Developing Efficient Objects for Embedded Systems (1999) Douglass, B.P.: Real-Time UML: Developing Efficient Objects for Embedded Systems (1999)
42.
Zurück zum Zitat Harrand, N., Fleurey, F., Morin, B., Husa, K.E.: ThingML: a language and code generation framework for heterogeneous targets. In: Proceedings of the ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems, pp. 125–135. ACM (2016) Harrand, N., Fleurey, F., Morin, B., Husa, K.E.: ThingML: a language and code generation framework for heterogeneous targets. In: Proceedings of the ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems, pp. 125–135. ACM (2016)
43.
Zurück zum Zitat Selic, B., Gullekson, G., Ward, P.T.: Real-Time Object-Oriented Modeling, vol. 2 (1994) Selic, B., Gullekson, G., Ward, P.T.: Real-Time Object-Oriented Modeling, vol. 2 (1994)
44.
Zurück zum Zitat Cheng, S.W., Garlan, D.: Mapping Architectural Concepts to UML-RT (2001) Cheng, S.W., Garlan, D.: Mapping Architectural Concepts to UML-RT (2001)
Metadaten
Titel
A Framework for UML-Based Component-Based Design and Code Generation for Reactive Systems
verfasst von
Van Cam Pham
Ansgar Radermacher
Sébastien Gérard
Shuai Li
Copyright-Jahr
2018
DOI
https://doi.org/10.1007/978-3-319-94764-8_13

Premium Partner