Advertisement

Formalizing DSL Semantics for Reasoning and Conformance Testing

  • Sarmen Keshishzadeh
  • Arjan J. Mooij
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8702)

Abstract

A Domain Specific Language (DSL) focuses on the essential concepts in a certain problem domain, thus abstracting from low-level implementation details. In combination with code generators, DSLs bring software development closer to domain requirements. The development of DSLs usually centers around the grammar and a code generator; there is little attention for the semantics of the DSL. However, a formal semantics is essential for reasoning about specifications in terms of the DSL (i.e., DSL instances). We argue that the semantics should be expressed independent of a code generator. Thus semantic issues can be revealed that could otherwise remain undetected. We also use the semantics to define the conformance of an implementation to a DSL instance, and to automatically test conformance of the (generated) implementation code to a DSL instance. We illustrate our approach using an industrial prototype DSL for collision prevention.

Keywords

Domain Specific Language (DSL) Semantics Code Generation Model-based Testing Conformance Testing 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ammann, P., Offutt, J.: Introduction to software testing. Cambridge University Press (2008)Google Scholar
  2. 2.
    Andova, S., van den Brand, M.G.J., Engelen, L.: Prototyping the semantics of a DSL using ASF+SDF: Link to formal verification of DSL models. In: Proceedings of AMMSE 2011. EPTCS, vol. 56, pp. 65–79 (2011)Google Scholar
  3. 3.
    Andova, S., van den Brand, M.G.J., Engelen, L.: Reusable and correct endogenous model transformations. In: Hu, Z., de Lara, J. (eds.) ICMT 2012. LNCS, vol. 7307, pp. 72–88. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  4. 4.
    de Moura, L., Bjørner, N.: Z3: An efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  5. 5.
    Ehrig, H., Ermel, C.: Semantical correctness and completeness of model transformations using graph and rule transformation. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 194–210. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  6. 6.
    Fiorentini, C., Momigliano, A., Ornaghi, M., Poernomo, I.: A constructive approach to testing model transformations. In: Tratt, L., Gogolla, M. (eds.) ICMT 2010. LNCS, vol. 6142, pp. 77–92. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  7. 7.
    Gaudel, M.-C.: Testing can be formal, too. In: Mosses, P.D., Nielsen, M., Schwartzbach, M.I. (eds.) TAPSOFT 1995. LNCS, vol. 915, pp. 82–96. Springer, Heidelberg (1995)Google Scholar
  8. 8.
    Wolfram Research Inc. Mathematica 8.0.0.0Google Scholar
  9. 9.
    Keshishzadeh, S., Mooij, A.J., Mousavi, M.R.: Early fault detection in DSLs using SMT solving and automated debugging. In: Hierons, R.M., Merayo, M.G., Bravetti, M. (eds.) SEFM 2013. LNCS, vol. 8137, pp. 182–196. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  10. 10.
    Mernik, M., Heering, J., Sloane, A.M.: When and how to develop Domain-Specific Languages. ACM Computing Surveys 37(4), 316–344 (2005)CrossRefGoogle Scholar
  11. 11.
    Mooij, A.J., Hooman, J., Albers, R.: Gaining industrial confidence for the introduction of Domain-Specific Languages. In: Proceedings of IEESD 2013, pp. 662–667. IEEE (2013)Google Scholar
  12. 12.
    Mooij, A.J., Hooman, J., Albers, R.: Early fault detection using design models for collision prevention in medical equipment. In: Gibbons, J., MacCaull, W. (eds.) FHIES 2013. LNCS, vol. 8315, pp. 170–187. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  13. 13.
    Ratiu, D., Voelter, M., Molotnikov, Z., Schaetz, B.: Implementing modular domain specific languages and analyses. In: Proceedings of Workshop on MoDeVVa 2012 (2012)Google Scholar
  14. 14.
    Sadilek, D.A., Wachsmuth, G.: Prototyping visual interpreters and debuggers for domain-specific modelling languages. In: Schieferdecker, I., Hartman, A. (eds.) ECMDA-FA 2008. LNCS, vol. 5095, pp. 63–78. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Stappers, F.P.M., Weber, S., Reniers, M.A., Andova, S., Nagy, I.: Formalizing a Domain Specific Language using SOS: an industrial case study. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 223–242. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  16. 16.
    Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: Eclipse Modeling Framework. Pearson Education (2008)Google Scholar
  17. 17.
    Tretmans, J.: Model based testing with Labelled Transition Systems. In: Hierons, R.M., Bowen, J.P., Harman, M. (eds.) Formal Methods and Testing. LNCS, vol. 4949, pp. 1–38. Springer, Heidelberg (2008)Google Scholar
  18. 18.
    van den Berg, F., Remke, A., Mooij, A., Haverkort, B.: Performance evaluation for collision prevention based on a Domain Specific Language. In: Balsamo, M.S., Knottenbelt, W.J., Marin, A. (eds.) EPEW 2013. LNCS, vol. 8168, pp. 276–287. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  19. 19.
    van Deursen, A., Klint, P., Visser, J.: Domain-Specific Languages: an annotated bibliography. SIGPLAN Notices 35(6), 26–36 (2000)CrossRefGoogle Scholar
  20. 20.
    Voelter, M.: DSL Engineering (2013), Version 1.0, http://dslbook.org

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Sarmen Keshishzadeh
    • 1
  • Arjan J. Mooij
    • 2
  1. 1.Eindhoven University of TechnologyEindhovenThe Netherlands
  2. 2.Embedded Systems Innovation by TNOEindhovenThe Netherlands

Personalised recommendations