Advertisement

Generation of Inductive Types from Ecore Metamodels

  • Jérémy BuissonEmail author
  • Seidali Rehab
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 991)

Abstract

When one wants to design a language and related supporting tools, two distinct technical spaces can be considered. On the one hand, model-driven tools like Xtext or MPS automatically provide a compilation infrastructure and a full-featured integrated development environment. On the other hand, a formal workbench like a proof assistant helps in the design and verification of the language specification. But these two technical spaces can hardly be used in conjunction. In the paper, we propose an automatic transformation that takes an input Ecore metamodel, and generates a set of inductive types in Gallina and Vernacular, the language of the Coq proof assistant. By doing so, it is guaranteed that the same abstract syntax as the one described by the Ecore metamodel is used, e.g., to formally define the language’s semantics or type system or set up a proof-carrying code infrastructure. Improving over previous state of the art, our transformation supports structural elements of Ecore, with no restriction. But our transformation is not injective. A benchmark evaluation shows that our transformation is effective, including in the case of real-world metamodels like UML and OCL. We also validate our transformation in the context of an ad-hoc proof-carrying code infrastructure.

Keywords

Model-driven engineering Model transformation Inductive type QVT-Operational Ecore Xtext Coq 

References

  1. 1.
    Oquendo, F., Buisson, J., Leroux, E., Moguérou, G., Quilbeuf, J.: The SoS Architect Studio: toolchain for the formal architecture description and analysis of software-intensive systems-of-systems with SosADL (2016)Google Scholar
  2. 2.
    Bettini, L.: Implementing Domain-Specific Languages with Xtext and Xtend. Packt Publishing, Olton (2013)Google Scholar
  3. 3.
    Voelter, M.: Language and IDE modularization and composition with MPS. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2011. LNCS, vol. 7680, pp. 383–430. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-35992-7_11CrossRefGoogle Scholar
  4. 4.
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development: Coq’Art: The Calculus of Inductive Constructions, 1st edn. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-662-07964-5CrossRefzbMATHGoogle Scholar
  5. 5.
    Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL: A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002).  https://doi.org/10.1007/3-540-45949-9CrossRefzbMATHGoogle Scholar
  6. 6.
    Klint, P., van der Storm, T.: Model transformation with immutable data. In: Van Gorp, P., Engels, G. (eds.) ICMT 2016. LNCS, vol. 9765, pp. 19–35. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-42064-6_2CrossRefGoogle Scholar
  7. 7.
    Necula, G.C.: Proof-carrying code. In: Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1997, Paris, France, pp. 106–119 (1997)Google Scholar
  8. 8.
    Buisson, J., Rehab, S.: Automatic transformation from Ecore metamodels towards Gallina inductive types. In: Proceedings of the 6th International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD, INSTICC, pp. 488–495. SciTePress (2018)Google Scholar
  9. 9.
    Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework 2.0, 2nd edn. Addison-Wesley Professional, Amsterdam (2009)Google Scholar
  10. 10.
    Sewell, P., et al.: Ott: effective tool support for the working semanticist. J. Funct. Program. 20, 71–122 (2010)CrossRefGoogle Scholar
  11. 11.
    Mulligan, D.P., Owens, S., Gray, K.E., Ridge, T., Sewell, P.: Lem: reusable engineering of real-world semantics. In: Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming, ICFP 2014, Gothenburg, Sweden, pp. 175–188 (2014)Google Scholar
  12. 12.
    Roşu, G., Şerbănuţă, T.F.: K overview and SIMPLE case study. Electron. Notes Theor. Comput. Sci. 304, 3–56 (2014). Proceedings of the Second International Workshop on the K Framework and its Applications (K 2011)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Borras, P., et al.: Centaur: the system. In: Proceedings of the Third ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, SDE 3, Boston, Massachusetts, USA, pp. 14–24 (1988)Google Scholar
  14. 14.
    Klint, P.: A meta-environment for generating programming environments. ACM Trans. Softw. Eng. Methodol. 2, 176–201 (1993)CrossRefGoogle Scholar
  15. 15.
    Kats, L.C., Visser, E.: The Spoofax language workbench: rules for declarative specification of languages and IDEs. In: Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2010, pp. 444–463 (2010)Google Scholar
  16. 16.
    Klint, P., van der Storm, T., Vinju, J.: EASY meta-programming with Rascal. In: Fernandes, J.M., Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2009. LNCS, vol. 6491, pp. 222–289. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-18023-1_6CrossRefGoogle Scholar
  17. 17.
    Barbier, F., Cariou, E.: Inductive UML. In: Abelló, A., Bellatreche, L., Benatallah, B. (eds.) MEDI 2012. LNCS, vol. 7602, pp. 153–161. Springer, Heidelberg (2012).  https://doi.org/10.1007/978-3-642-33609-6_15CrossRefGoogle Scholar
  18. 18.
    Cabot, J., Clarisó, R., Riera, D.: On the verification of UML/OCL class diagrams using constraint programming. J. Syst. Softw. 93, 1–23 (2014)CrossRefGoogle Scholar
  19. 19.
    Meyer, E., Souquières, J.: A systematic approach to transform OMT diagrams to a B specification. In: Wing, J.M., Woodcock, J., Davies, J. (eds.) FM 1999. LNCS, vol. 1708, pp. 875–895. Springer, Heidelberg (1999).  https://doi.org/10.1007/3-540-48119-2_48CrossRefGoogle Scholar
  20. 20.
    Lano, K., Clark, D., Androutsopoulos, K.: UML to B: formal verification of object-oriented models. In: Boiten, E.A., Derrick, J., Smith, G. (eds.) IFM 2004. LNCS, vol. 2999, pp. 187–206. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-24756-2_11CrossRefGoogle Scholar
  21. 21.
    Djeddai, S., Strecker, M., Mezghiche, M.: Integrating a formal development for DSLs into meta-modeling. In: Abelló, A., Bellatreche, L., Benatallah, B. (eds.) MEDI 2012. LNCS, vol. 7602, pp. 55–66. Springer, Heidelberg (2012).  https://doi.org/10.1007/978-3-642-33609-6_7CrossRefGoogle Scholar
  22. 22.
    OMG: OMG Meta Object Facility (MOF) Core Specification (2016)Google Scholar
  23. 23.
    Gerber, A., Raymond, K.: MOF to EMF: there and back again. In: Proceedings of the 2003 OOPSLA Workshop on Eclipse Technology eXchange, eclipse 2003, Anaheim, California, pp. 60–64 (2003)Google Scholar
  24. 24.
    Tisi, M., Martínez, S., Jouault, F., Cabot, J.: Refining models with rule-based model transformations. Research Report RR-7582, INRIA (2011)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.IRISA, Écoles de Saint-Cyr CoëtquidanGuerFrance
  2. 2.MISC, University of Constantine 2 - Abdelhamid MehriConstantineAlgeria

Personalised recommendations