Polyglot Modeling/Metamodeling formats and frameworks

Very interesting discussion. It would be nice to bring this discussion also to the core SLE/Models community (yes some of us are here but many others are not).

2 Likes

I did a little work on capturing the JSON format from emfjson-jackson in JSON Schemas: see GitHub - dslmeinte/polyglot-emf at emfjson-jackson
That uses the JSON Schema language I implemented in MPS, which implements a sub set of the entire JSON Schema standard (v7). The JSON Schema Iā€™ve made is also woefully incomplete.

1 Like

It seems to me that there is a lot of interest on this topic. Should we organize a meetup on this?
@meinte.boersma you seem to have taken the lead on this one, would you like to lead the discussion during a meetup?

@jcabot , yes, you are right. How do you think we should reach other members of the SLE/Models community?

@ftomassetti : Youā€™re willing to ā€œspendā€ a virtual meetup slot on this? If yes: what would be a good date?

@jcabot : How do we reach out to the wider SLE/Models/MDSD/etc. communities out there? Iā€™m sure you have ideas :slight_smile:

As usual, time is my limiting factor. I try to spend 15 minutes here and there on this, but I also try not too close to the proverbial rabbit hole. (E.g.: itā€™s very tempting to shore up the MPS open source work I did in the past, but did not entirely survive an MPS upgrade.) So, Iā€™m very much dependent on contributors to actually get somewhere useful. (This might change once a certain book is ā€œDoneā€ ;))

Yes, I think this would be an interesting topic. I think the 25th of February would be perfect. But we can do it also later, of course.

Maybe we could also invite the authors of the Python and JS porting of EMF

1 Like

25/2 would be perfect for me as well, due to school holidays.
Inviting the parties mentioned in the README is a good idea!

Yes I do :slight_smile:

But I think we should wait for conferences to go back to a more ā€œon-siteā€ mode to have a deeper discussion.

I think the persons to invite should be:

  • Guillaume Hillairet for ecore.js, emfjson-jackson (who I think it is not part of this community)
  • Horacio Hoyos, for JSOI @horacio.hoyos
  • Vincent Aranega, for PyEcore @vincent.aranega

I will send an email to invite them and CC @meinte.boersma

2 Likes

@gmilano signaled this library: GitHub - crossecore/ecore-csharp: Ecore and OCL runtime API for C#
We could include it in our discussion

2 Likes

I updated the README in the polyglot-emf repo with all the links that were shared in the chat during the Virtual Meetup yesterday.

1 Like

I came across srcML: a tool to parse to a common parse tree/AST serialization format, including parsers for a couple of mainstream languages. Polyglot interop seems to be a thing not just in the EMF world.

1 Like

Hi,

thanks for bringing CrossEcore into the discussion. CrossEcore, like the name suggests, allows you to use the Ecore(+OCL-like) APIs across different target platforms. Todayā€™s software solutions are often a mix of different technologies (microservices) or target multiple platforms (Windows, Browser, Android, iOS, etc.), while each may use different programming languages. In practice, this often leads to data classes, serializers, validators, etc. being implemented over and over again by hand in every technology. With CrossEcore you can generate this code for TypeScript/JavaScript, C#, and Swift. The generated code has a consistent API and is interoperable.
CrossEcore was born in a project in which different single-source and multi-source architectures were compared with each other (e.g. Android/Java, iOS/Swift, Windows/C# vs. Xamarin/C# vs. Cordova/TypeScript, etc.). At EclipseConā€™18 I have also shown how to integrate CrossEcore with CouchDB/PouchDB to store EMF models as JSON documents.

Best,
Simon

2 Likes

Hi @schwichti ,

Could you share some links, specifically to slides/a paper/article from EclipseConā€™ 18?

BTW: would it be an idea to create an EMF.rocks Web site (like MPS.rocks) instead of the polyglot-repo on GitHub?

Hi,
here are some links:
Talk @ EclipseCon Europe 18: Modeling Symposium | EclipseCon Europe 2018 - YouTube

Generator, runtimes, examples: CrossEcore Ā· GitHub

Simon Schwichtenberg, Ivan Jovanovikj, Christian Gerth, Gregor Engels:
CrossEcore: an extendible framework to use ecore and OCL across platforms. ICSE (Companion Volume) 2018: 292-293
https://www.researchgate.net/publication/323289605_Poster_CrossEcore_An_Extendible_Framework_to_Use_Ecore_and_OCL_across_Platforms
Poster: https://www.researchgate.net/publication/325542015_Poster_CrossEcore_An_Extendible_Framework_to_Use_Ecore_and_OCL_across_Platforms

Related works on migrating MDT-OCL Java test cases to C#:

Ivan Jovanovikj, Anu Tony Thottam, Vishal Joseph Vincent, Enes Yigitbas, Stefan Sauer, Gregor Engels:
A Modeling Workbench for the Development of Situation-specific Test Co-migration Methods. MODELSWARD 2021: 232-239
https://doi.org/10.5220/0010259902320239

Ivan Jovanovikj, Enes Yigitbas, Achyuth Nagaraj, Anthony Anjorin, Stefan Sauer, Gregor Engels:
Validating Test Case Migration via Mutation Analysis. AST@ICSE 2020: 31-40
https://doi.org/10.1145/3387903.3389319

Ivan Jovanovikj, Enes Yigitbas, Stefan Sauer, Gregor Engels:
Concept-based Co-migration of Test Cases. MODELSWARD 2020: 449-456
https://doi.org/10.5220/0010259902320239

2 Likes