Skip to main content

Generation of Inductive Types from Ecore Metamodels

  • Conference paper
  • First Online:
Model-Driven Engineering and Software Development (MODELSWARD 2018)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 991))

  • 526 Accesses

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Each metametamodel contains approximately 20 classes, 50 references, 30 attributes, and 30 data types.

  2. 2.

    Other proof assistants based on dependent types, such as Agda or Lean behave similarly.

References

  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. Bettini, L.: Implementing Domain-Specific Languages with Xtext and Xtend. Packt Publishing, Olton (2013)

    Google Scholar 

  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_11

    Chapter  Google Scholar 

  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-5

    Book  MATH  Google Scholar 

  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-9

    Book  MATH  Google Scholar 

  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_2

    Chapter  Google Scholar 

  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. 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. Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework 2.0, 2nd edn. Addison-Wesley Professional, Amsterdam (2009)

    Google Scholar 

  10. Sewell, P., et al.: Ott: effective tool support for the working semanticist. J. Funct. Program. 20, 71–122 (2010)

    Article  Google Scholar 

  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. 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)

    Article  MathSciNet  Google Scholar 

  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. Klint, P.: A meta-environment for generating programming environments. ACM Trans. Softw. Eng. Methodol. 2, 176–201 (1993)

    Article  Google Scholar 

  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. 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_6

    Chapter  Google Scholar 

  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_15

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

  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_48

    Chapter  Google Scholar 

  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_11

    Chapter  Google Scholar 

  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_7

    Chapter  Google Scholar 

  22. OMG: OMG Meta Object Facility (MOF) Core Specification (2016)

    Google Scholar 

  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. Tisi, M., Martínez, S., Jouault, F., Cabot, J.: Refining models with rule-based model transformations. Research Report RR-7582, INRIA (2011)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jérémy Buisson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Buisson, J., Rehab, S. (2019). Generation of Inductive Types from Ecore Metamodels. In: Hammoudi, S., Pires, L., Selic, B. (eds) Model-Driven Engineering and Software Development. MODELSWARD 2018. Communications in Computer and Information Science, vol 991. Springer, Cham. https://doi.org/10.1007/978-3-030-11030-7_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-11030-7_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-11029-1

  • Online ISBN: 978-3-030-11030-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics