Abstract
A domain specific language (DSL) focuses on the essential concepts in a specific problem domain, and abstracts from low-level implementation details. The development of DSLs usually centers around the meta-model, grammar and code generator, possibly extended with transformations to analysis models. Typically, little attention is given to the formal semantics of the language, whereas this is essential for reasoning about DSL models, and for assessing the correctness of the generated code and analysis models. We argue that the semantics of a DSL should be defined explicitly and independently of any code generator, to avoid all kinds of complexities from low-level implementation details. As the generated analysis models must reflect some of these implementation details, we propose to formalize them separately. To assess the correctness and consistency of the generated code and analysis models in a practical way, we use conformance testing. We extensively illustrate this general approach using specific formalizations for an industrial DSL on collision prevention. We do not aim for a generic semantic model for any DSL, but this specific DSL indicates the potential of a modular semantics to facilitate reuse among DSLs.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Andova S, van den Brand MGJ, Engelen L (2011) Prototyping the semantics of a DSL using ASF+SDF: link to formal verification of DSL models. In: Proceedings of AMMSE’11, EPTCS, vol 56, pp 65–79
Andova S, van den Brand MGJ, Engelen L (2012) Reusable and correct endogenous model transformations. In: Proceedings of ICMT’12. LNCS, vol 7307. Springer, New York, pp 72–88
Ammann P, Offutt J (2008) Introduction to software testing. Cambridge University Press, Cambridge
Bazzichi F, Spadafora I (1982) An automatic generator for compiler testing. IEEE Trans Softw Eng 4: 343–353
De Moura L, Bjørner N (2008) Z3: an efficient SMT solver. In: Proceedings of TACAS’08. LNCS, vol 4963. Springer, New York, pp 337–340
Dutle AM, Munoz CA, Narkawicz AJ, Butler RW (2015) Software validation via model animation. In: Proceedings of TAP’15. LNCS, vol 9154. Springer, New York, pp 92–108
Ehrig H, Ermel C (2008) Semantical correctness and completeness of model transformations using graph and rule transformation. In: Proceedings of ICGT’08. LNCS, vol 5214. Springer, New York, pp 194–210
Fiorentini C, Momigliano A, Ornaghi M, Poernomo I (2010) A constructive approach to testing model transformations. In: Proceedings of ICMT’10. LNCS, vol 6142. Springer, New York, pp 77–92
Gaudel MC (1995) Testing can be formal, too. In: Proceedings of TAPSOFT’95. LNCS, vol 915. Springer, New York, pp 82–96
Keshishzadeh S, Mooij AJ, Mousavi M (2013) Early fault detection in DSLs using smt solving and automated debugging. In: Proceedings of SEFM’13. LNCS, vol 8137, pp 182–196
Keshishzadeh S, Mooij AJ (2014) Formalizing DSL semantics for reasoning and conformance testing. In: Proceedings of SEFM’14. Springer, New York, pp 81–95
Leroy X (2009) Formal verification of a realistic compiler. Commun ACM 52(7): 107–115
Wolfram Research Inc., Mathematica 10.0.1.0. http://www.wolfram.com. Accessed Aug 2015
Mooij AJ, Hooman J, Albers R (2013) Gaining industrial confidence for the introduction of domain-specific languages. In: Proceedings of IEESD’13. IEEE, pp 662–667
Mooij AJ, Hooman J, Albers R (2014) Early fault detection using design models for collision prevention in medical equipment. In: Proceedings of FHIES’13. LNCS, vol 8315. Springer, New York, pp 170–187
Moreira AM, Hentz C, Déharbe D, de Matos ECB, Neto JBS, de Medeiros Jr V (2015) Verifying code generation tools for the B-method using tests: a case study. In: Proceedings of TAP’15. LNCS, vol 9154. Springer, New York, pp 76–91
Mernik M, Heering J, Sloane AM (2005) When and how to develop domain-specific languages. Comput Surv ACM 37: 316–344
Nagy I, Cleophas LG, van den Brand M, Engelen L, Raulea L, Mithun EXL (2012) VPDSL: a DSL for software in the loop simulations covering material flow. In: Proceedings of ICECCS’12. IEEE, pp 318–327
Ratiu D, Voelter M, Molotnikov Z, Schaetz B (2012) Implementing modular domain specific languages and analyses. In: Proceedings of workshop on MoDeVVa’12. ACM, New York, pp 35–40
Rivera JE, Durán F, Vallecillo A (2009) Formal specification and analysis of domain specific models using maude, simulation: transactions of the society for modeling and simulation international. Sage Publications, USA, pp 778–792
Sadilek DA, Wachsmuth G (2008) Prototyping visual interpreters and debuggers for domain-specific modelling languages. In: Proceedings of ECMDA-FA’08. LNCS, vol 5095. Springer, New York, pp 63–78
Steinberg D, Budinsky F, Paternostro M, Merks E (2008) Eclipse modeling framework. Pearson Education, London
Stappers FPM, Weber S, Reniers MA, Andova S, Nagy I (2012) Formalizing a domain specific language using sos: an industrial case study. In: Proceedings of SLE’11. LNCS, vol 6940. Springer, New York, pp 223–242
Theelen BD, Florescu O, Geilen MCW, Huang J, van der Putten PHA, Voeten JPM (2007) Software/hardware engineering with the parallel object-oriented specification language. In: Proceedings of the international conference on formal methods and models for codesign. IEEE, pp 139–148
Tretmans J (2008) Model based testing with labelled transition systems. In: (eds) Formal methods and testing. LNCS, vol 4949. Springer, New York, pp 1–38
van den Brand M, Groote JF (2013) Software engineering: redundancy is key. Sci Comput Program Elsevier 97: 75–81
van den Berg F, Remke A, Mooij AJ, Haverkort B (2013) Performance evaluation for collision prevention based on a domain specific language. In: Proceedings of EPEW’13, vol 8168. Springer, New York, pp 276–287
van Deursen A, Klint P, Visser J (2000) Domain-specific languages: an annotated bibliography. In: (eds) SIGPLAN notices, vol 35. ACM, New York, pp 26–36
Verriet J, Liang HL, Hamberg R, van Wijngaarden B (2013) Model-driven development of logistic systems using domain-specific tooling. In: Proceedings of CSD&M. Springer, New York, pp 165–176
Voelter M (2013) DSL engineering, version 1.0. http://dslbook.org. Accessed Aug 2015
Xtext (2014) Version 2.7. http://www.eclipse.org/Xtext/. Accessed Aug 2015
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Dimitra Giannakopoulou, Gwen Salaün, and Michael Butler
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Keshishzadeh, S., Mooij, A.J. Formalizing and testing the consistency of DSL transformations. Form Asp Comp 28, 181–206 (2016). https://doi.org/10.1007/s00165-016-0359-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-016-0359-1