Semantically Configurable Code Generation

  • Adam Prout
  • Joanne M. Atlee
  • Nancy A. Day
  • Pourya Shaker
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5301)

Abstract

In model-driven engineering (MDE), software development is centred around a formal description (model) of the proposed software system, and other software artifacts are derived directly from the model. We are investigating semantically configurable MDE, in which specifiers are able to configure the semantics of their models. The goal of this work is to provide a modelling environment that offers flexible, configurable modelling notations, so that specifiers are better able to represent their ideas, and yet still provides the types of analysis tools and code generators normally associated with model-driven engineering. In this paper, we present a semantically configurable code-generator generator, which creates a Java-code generator for a modelling notation given the notation’s semantics expressed as a set of parameter values. We are able to simulate multiple different model-based code generators, though at present the performance of our generated code is about an order of magnitude slower than that produced by commercial-grade generators.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    ApeSoft. Smartstate v4.1.0 (2008), http://www.smartstatestudio.com
  2. 2.
    Appel, A.W.: Semantics-directed code generation. In: Proc. ACM Sym. on Prin. Prog. Lang (POPL 1985), pp. 315–324. ACM Press, New York (1985)Google Scholar
  3. 3.
    Batory, D., O’Malley, S.: The design and implementation of hierarchical software systems with reusable components. ACM Trans. Soft. Eng. Meth. 1(4), 355–398 (1992)CrossRefGoogle Scholar
  4. 4.
    Cleaveland, C.: Program Generators with XML and Java. Prentice-Hall, Englewood Cliffs (2001)Google Scholar
  5. 5.
    Czarnecki, K., Eisenecker, U.W.: Generative programming: methods, tools, and applications. ACM Press/Addison-Wesley Publishing Co., New York (2000)Google Scholar
  6. 6.
    Harel, D., et al.: STATEMATE: A working environment for the development of complex reactive systems. IEEE Trans. on Soft. Eng. 16(4), 403–414 (1990)CrossRefMathSciNetGoogle Scholar
  7. 7.
    D’Ambrogio, A.: A model transformation framework for the automated building of performance models from uml models. In: Proc. Intl. Work. on Soft. and Perf (WOSP 2005), pp. 75–86. ACM Press, New York (2005)CrossRefGoogle Scholar
  8. 8.
    Diehl, S.: Natural semantics-directed generation of compilers and abstract machines. Form. Asps. of Comp. 12(2), 71–99 (2000)MATHCrossRefGoogle Scholar
  9. 9.
    G.S.S., et al.: Clearwater: extensible, flexible, modular code generation. In: Proc. IEEE/ACM Intl. Conf. on Aut. Soft. Eng(ASE 2005), pp. 144–153. ACM Press, New York (2005)Google Scholar
  10. 10.
    Floch, J.: Supporting evolution and maintenance by using a flexible automatic code generator. In: Proc. Intl. Conf. on Soft. Eng (ICSE 1995), pp. 211–219. ACM Press, New York (1995)CrossRefGoogle Scholar
  11. 11.
    Grundy, J., et al.: Generating Domain-Specific Visual Language Editors from High-level Tool Specifications. In: Auto. Soft. Eng. (ASE), pp. 25–36 (2006)Google Scholar
  12. 12.
    Hannan, J.: Operational semantics-directed compilers and machine architectures. ACM Trans. Prog. Lang. Sys. 16(4), 1215–1247 (1994)CrossRefMathSciNetGoogle Scholar
  13. 13.
    Hannan, J., Miller, D.: From operational semantics to abstract machines. Math. Struct. Comp. Sci. 2(4), 415–459 (1992)MATHMathSciNetCrossRefGoogle Scholar
  14. 14.
    Harel, D.: On the formal semantics of statecharts. Symp. on Logic in Comp. Sci., 54–64 (1987)Google Scholar
  15. 15.
    IBM Rational. Rational Rose RealTime v7.0.0 (2005), http://www.ibm.com/rational
  16. 16.
    Jones, N.: Semantics-Directed Compiler Generation. LNCS, vol. 94. Springer, Heidelberg (1980)MATHGoogle Scholar
  17. 17.
    Knaack, J.L.: An algebraic approach to language translation. PhD thesis, University of Iowa (1995)Google Scholar
  18. 18.
    Königs, A., Schürr, A.: Tool integration with triple graph grammars – a survey. Elect. Notes in Theor. Comp. Sci. 148(1), 113–150 (2006)CrossRefGoogle Scholar
  19. 19.
    Lu, Y., Atlee, J.M., Day, N.A., Niu, J.: Mapping template semantics to SMV. In: Proc. of Auto. Soft. Eng. (ASE 2004), pp. 320–325 (2004)Google Scholar
  20. 20.
    McMillan, K.: Symbolic Model Checking: An Approach to the State Explosion Problem. Kluwer Academic Publishers, Dordrecht (1993)Google Scholar
  21. 21.
    Niu, J., Atlee, J.M., Day, N.A.: Template Semantics for Model-Based Notations. IEEE Trans. on Soft. Eng. 29(10), 866–882 (2003)CrossRefGoogle Scholar
  22. 22.
    Object Management Group. Revised submission for MOF 2.0 Query/View/Transformation RFP, http://www.omg.org/docs/ad/05-03-02.pdf
  23. 23.
    Object Management Group. Meta Object Facility Core Specification, Formal/06-01-01 (2006)Google Scholar
  24. 24.
    Paulson, L.: A semantics-directed compiler generator. In: Proc. ACM Sym. on Prin. of Prog. Lang (POPL 1982), pp. 224–233. ACM Press, New York (1982)Google Scholar
  25. 25.
    Prout, A.: Parameterized Code Generation From Template Semantics. Master’s thesis, School of Computer Science, University of Waterloo (2005)Google Scholar
  26. 26.
    Taleghani, A., Atlee, J.M.: Semantic variations among UML statemachines. In: ACM/IEEE Int. Conf. on Mod. Driven Eng. Lang. and Sys., pp. 245–259 (2006)Google Scholar
  27. 27.
  28. 28.
    Telelogic. Rhapsody in J v7.1.1.0 (2007), http://modeling.telelogic.com/products/rhapsody/index.cfm
  29. 29.
    Yavuz-Kahveci, T., Bultan, T.: Specification, verification, and synthesis of concurrency control components. In: Proc. Intl. Symp. on Soft. Test. and Anal (ISSTA 2002), pp. 169–179. ACM Press, New York (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Adam Prout
    • 1
  • Joanne M. Atlee
    • 1
  • Nancy A. Day
    • 1
  • Pourya Shaker
    • 1
  1. 1.David R. Cheriton School of Computer ScienceUniversity of WaterlooWaterlooCanada

Personalised recommendations