Nothing Special   »   [go: up one dir, main page]

Skip to main content
Log in

Code generation for a family of executable modelling notations

  • Special Section Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

We are investigating semantically configurable model-driven engineering (MDE). The goal of this work is a modelling environment that supports flexible, configurable modelling notations, in which specifiers can configure the semantics of notations to suit their needs and yet still have access to the types of analysis tools and code generators normally associated with MDE. In this paper, we describe semantically configurable code generation for a family of behavioural modelling notations. The family includes variants of statecharts, process algebras, Petri Nets, and SDL88. The semantics of this family is defined using template semantics, which is a parameterized structured operational semantics in which parameters represent semantic variation points. A specific notation is derived by instantiating the family’s template semantics with parameter values that specify semantic choices. We have developed a code-generator generator (CGG) that creates a suitable Java code generator for a subset of derivable modelling notations. Our prototype CGG supports 26 semantics parameters, 89 parameter values, and 7 composition operators. As a result, we are able to produce code generators for a sizable family of modelling notations, though at present the performance of our generated code is about an order of magnitude slower than that produced by commercial-grade generators.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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. ApeSoft. Smartstate v4.1.0. http://www.smartstatestudio.com (2008)

  2. Appel, A.W.: Semantics-directed code generation. In: Proceedings of ACM Symposium on Principles of Programming Language (POPL’85), pp. 315–324. ACM Press, New York (1985)

  3. Baresi L., Pezzè M.: Formal interpreters for diagram notations. ACM Trans. Softw. Eng. Methodol. 14(1), 42–84 (2005)

    Article  Google Scholar 

  4. Batory D., O’Malley S.: The design and implementation of hierarchical software systems with reusable components. ACM Trans. Softw. Eng. Methodol. 1(4), 355–398 (1992)

    Article  Google Scholar 

  5. Berry G., Gonthier G.: The esterel synchronous programming language: design, semantics, implementation. Sci. Comp. Prog. 19(2), 87–152 (1992)

    Article  MATH  Google Scholar 

  6. Bjrklund, D., Lilius, J., Porres, I.: A unified approach to code generation from behavioral diagrams. In: Proceedings of Forum on Specification and Design Languages (FDL), pp. 21–34 (2003)

  7. Burmester, S., Giese, H., Schfer, W.: Code generation for hard real-time systems from real-time statecharts. Technical Report tr-ri-03-244, University of Paderborn (2003)

  8. Cleaveland C.: Program Generators with XML and Java. Prentice-Hall, UK (2001)

    Google Scholar 

  9. Cleaveland R., Sims S.: Generic tools for verifying concurrent systems. Sci. Comp. Prog. 41(1), 39–47 (2002)

    Article  Google Scholar 

  10. Cohen, M.B., Dwyer, M.B., Shi, J.: Coverage and adequacy in software product line testing. In: Proceedings of the ISSTA 2006 Workshop on Role of Software Architecture for Testing and Analysis (ROSATEA), pp. 53–63 (2006)

  11. Czarnecki K., Eisenecker U.W.: Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley Publishing Co., New York/USA (2000)

    Google Scholar 

  12. Harel D. et al.: STATEMATE: a working environment for the development of complex reactive systems. IEEE Trans. Softw. Eng. 16(4), 403–414 (1990)

    Article  MathSciNet  Google Scholar 

  13. D’Ambrogio, A.: A model transformation framework for the automated building of performance models from UML models. In: Proceedings of International Workshop on Software and Performance (WOSP’05), pp. 75–86. ACM Press, New York (2005)

  14. Day, N.A., Joyce, J.J.: Symbolic functional evaluation. In: TPHOLs, Volume 1690 of LNCS, pp. 341–358. Springer, Berlin (1999)

  15. Diehl S.: Natural semantics-directed generation of compilers and abstract machines. Form. Asps. Comp. 12(2), 71–99 (2000)

    Article  MATH  Google Scholar 

  16. Dillon L., Stirewalt R.: Inference graphs: a computational structure supporting generation of customizable and correct analysis components. IEEE Trans. Softw. Eng. 29(2), 133–150 (2003)

    Article  Google Scholar 

  17. Esmaeilsabzali S., Day N., Atlee J.M., Niu J.: Deconstructing the semantics of big-step modelling languages. Requir. Eng. 15(2), 235–256 (2010)

    Article  Google Scholar 

  18. Floch, J.: Supporting evolution and maintenance by using a flexible automatic code generator. In: Proceedings of International Conference on Software Engineering (ICSE’95), pp. 211–219. ACM Press, New York (1995)

  19. Gamma E., Helm R., Johnson R., Vlissides J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley, USA (1995)

    Google Scholar 

  20. Gao, J., Heimdahl, M.P.E., Wyk, E.V.: Flexible and extensible notations for modeling languages. In: Proceedings of Fundamental Approaches to Software Engineering (FASE), pp. 102–116 (2007)

  21. Hannan J.: Operational semantics-directed compilers and machine architectures. ACM Trans. Program. Lang. Syst. 16(4), 1215–1247 (1994)

    Article  MathSciNet  Google Scholar 

  22. Hannan J., Miller D.: From operational semantics to abstract machines. Math. Struct. Comput. Sci. 2(4), 415–459 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  23. Harel, D.: On the formal semantics of statecharts. In: Symposium on Logic in Computer Science, pp. 54–64 (1987)

  24. Harel D.: Statecharts: a visual formalism for complex systems. Sci. Comput. Program. 8(3), 231–274 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  25. Harel D., Naamad A.: The STATEMATE semantics of statecharts. ACM Trans. Softw. Eng. Methodol. 5(4), 293–333 (1996)

    Article  Google Scholar 

  26. Heimdahl, M.P.E., Keenan, D.J.: Generating code from hierarchical state-based requirements. In: Proceedings of the 3rd IEEE International Symposium on Requirements Engineering (RE’97), pp. 210–220 (1997)

  27. Heitmeyer C.L., Jeffords R.D., Labaw B.G.: Automated consistency checking of requirements specifications. ACM Trans. Softw. Eng. Methodol. 5(3), 231–261 (1996)

    Article  Google Scholar 

  28. Hoare C.A.R.: Communicating Sequential Processes. Prentice-Hall, UK (1985)

    MATH  Google Scholar 

  29. IBM: Rational Rose RealTime v7.0.0. http://www.ibm.com/rational (2005)

  30. IBM: Rational Rhapsody in J v7.4. http://www.ibm.com/software/awdtools/rhapsody/ (2007)

  31. IBM: Rational SDL Suite. http://www.ibm.com/software/awdtools/sdlsuite/ (2010). Accessed Sept 2010

  32. ISO8807: LOTOS: a formal description technique based on the temporal ordering of observational behaviour. Technical Report, ISO (1988)

  33. ITU-T: Recommendation Z.100. Specification and description language (SDL). Technical Report Z-100, International Telecommunication Union-Standardization Sector (1999)

  34. Jones, N., Gomard, C., Sestoft, P. (eds): Partial Evaluation and Automatic Program Generation. Prentice-Hall, UK (1993)

    MATH  Google Scholar 

  35. Jones, N. (eds): Semantics-Directed Compiler Generation, volume LNCS 94. Springer, Berlin (1980)

    Google Scholar 

  36. Kelly S., Tolvanen J.-P.: Domain-Specific Modeling: Enabling Full Code Generation. Wiley, NY (2008)

    Google Scholar 

  37. Knaack, J.L.: An algebraic approach to language translation. PhD Thesis, University of Iowa (1995)

  38. Leveson N.G., Heimdahl M.P.E., Hildreth H., Reese J.D.: Requirements specification for process-control systems. IEEE Trans. Softw. Eng. 20(9), 684–707 (1994)

    Article  Google Scholar 

  39. Lu, Y., Atlee, J.M., Day, N.A., Niu, J.: Mapping template semantics to SMV. In: Proceedings of Automotive Software Engineering (ASE’04), pp. 320–325 (2004)

  40. MathWorks. Simulink. http://www.mathworks.com/products/simulink (2010). Accessed Sept 2010

  41. Mathworks. Stateflow 7. http://www.mathworks.com/products/stateflow/ (2010). Accessed Sept 2010

  42. McGregor, J.D.: Testing a software product line. Technical Report CMU/SEI-2001-TR-022, Carnegie Mellon, Software Engineering Institute (2001)

  43. McMillan K.: Symbolic Model Checking: An Approach to the State Explosion Problem. Kluwer Academic, Dordrecht (1993)

    Google Scholar 

  44. Milner R.: Communication and Concurrency. Prentice-Hall, New York (1989)

    MATH  Google Scholar 

  45. Mosses P.: Action Semantics. Cambridge University Press, London (1992)

    Book  MATH  Google Scholar 

  46. Muller, P.-A., Fleurey, F., Jzquel, J.-M.: Weaving executability into object-oriented meta-languages. In: Proceedings of International Conference on Model Driven Engineering Languages and Systems (MoDELS), LNCS 3713, pp. 264–278 (2005)

  47. Niu, J.: Metro: a semantics-based approach for mapping specification notations to analysis tools. PhD Thesis, University of Waterloo (2005)

  48. Niu J., Atlee J.M., Day N.A.: Template semantics for model-based notations. IEEE Trans. Softw. Eng. 29(10), 866–882 (2003)

    Article  Google Scholar 

  49. Niu, J., Atlee, J.M., Day, N.A.: Understanding and comparing model-based specification notations. In: Proceedings of IEEE International Requirements Engineering Conference (RE’03), pp. 188–199. IEEE Computer Society Press, USA (2003)

  50. Object Management Group.: Unified modelling language: superstructure. version 2.0, formal/05-07-04. http://www.omg.org (2005)

  51. Paulson, L.: A semantics-directed compiler generator. In: Proceedings of ACM Symposium on Principles of Programming Language (POPL ’82), pp. 224–233. ACM Press, New York (1982)

  52. Pezzè, M., Young, M.: Constructing multi-formalism state-space analysis tools. In: IEEE International Conference on Software Engineering (ICSE), pp. 239–249. ACM Press, New York (1997)

  53. Plotkin G.: A structural approach to operational semantics. Computer Science Department, Aarhus University, Aarhus (1981)

    Google Scholar 

  54. Prout, A.: Parameterized code generation from template semantics. Master’s Thesis, School of Computer Science, University of Waterloo (2005)

  55. Prout, A., Atlee, J., Day, N., Shaker, P.: Semantically configurable code generation. In: ACM/IEEE International Conference on Model-Driven Engineering Languages and Systems, pp. 705–720 (2008)

  56. Selic B., Gullekson G., Ward P.: Real-Time Object-Oriented Modeling. Wiley, New York (1994)

    MATH  Google Scholar 

  57. Smith K.: Real-time object-oriented modeling: ObjecTime CASE tool simplifies real-time software development. Dr. Dobbs J Softw Tools 22(12), 64–74 (1997)

    Google Scholar 

  58. Swint, G.S., et al.: Clearwater: extensible, flexible, modular code generation. In: Proceedings of IEEE/ACM International Conference on Automotive Software Engineerig (ASE’05), pp. 144–153. ACM Press, New York (2005)

  59. Taleghani, A. Atlee, J.M.: Semantic variations among UML statemachines. In: ACM/IEEE International Conference on Model-Driven Engineering Languages and Systems, pp. 245–259 (2006)

  60. Tiella, R., Villafiorita, A., Tomasi, S.: FSMC+, a tool for the generation of Java code from statecharts. In: Proceedings of the 5th International Symposium on Principles and Practice of Programming in Java, pp. 93–102 (2007)

  61. Varró, D., Pataricza, A.: Generic and meta-transformations for model transformation engineering. In: UML 2004—The Unified Modeling Language, volume LNCS 3273, pp. 290–304, October 2004 (2004)

  62. von der Beeck, M.: A comparison of statecharts variants. In: ProCoS: Proceedings of the Third International Symposium Organized Jointly with the Working Group Provably Correct Systems on Formal Techniques in Real-Time and Fault-Tolerant Systems, pp. 128–148 (1994)

  63. Wasowski, A.: On efficient program synthesis from statecharts. In: Proceedings of the 2003 ACM SIGPLAN conference on Language, compiler, and tool for embedded systems, pp. 163–170 (2003)

  64. WindRiver.: Betterstate. http://www.windriver.com/portal/server.pt (2005)

  65. Yavuz-Kahveci, T., Bultan, T.: Specification, verification, and synthesis of concurrency control components. In: Proceedings of International Symposium on Software Testing and Analysis (ISSTA’02), pp. 169–179. ACM Press, New York (2002)

  66. Zave, P., Jackson, M.: A call abstraction for component coordination. In: International Colloquium on Automata, Languages, and Programming: Workshop on Formal Methods and Component Interaction (2002)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joanne M. Atlee.

Additional information

Communicated by Prof. Krzysztof Czarnecki.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Prout, A., Atlee, J.M., Day, N.A. et al. Code generation for a family of executable modelling notations. Softw Syst Model 11, 251–272 (2012). https://doi.org/10.1007/s10270-010-0176-6

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-010-0176-6

Keywords

Navigation