Eclipse Modeling Framework (EMF) is commonly used to build domain model (ECORE), which becomes as a platform to establish the echo system of the tools around it (data loader, serializer, editors, validations etc.,)
Examples of such domain models are :
- ARTOP (for Autosar specification)
- AMALTHEA (for representing information of embedded multi- and many-core software systems)
An 'organization'/'Open Source Community' consists of employees with different roles and competencies (tool developers, embedded developers, data scientists, researchers …) , not everyone has competency to use java/eclipse plugins, which in-turn leads to usage of different programming languages to interpret the same domain model (which is serialized in XMI format) -> despite of everything being available in Java (EMF based infrastructure).
Example: There are cases where "data scientists" ended up developing xml loader in Python language to parse data model files (XMI) and resolve the references explicitly, even though there was a EMF loader available in java.
- Only reason for this can be lack of competency to use java/eclipse plug-in development environment and comfort w.r.t. usage of Python as a programming language to quickly write a script to extract contents of data model and perform certain analysis.
Above mentioned approach not only consumes additional effort to develop loader for data model in Python, but it is also error prone as not all the corner cases are considered. This effort should be again repeated for each release of the domain model (based on the changes in EMF meta-model)
Based on the above mentioned scenario, in this talk we will look at the benefits achieved :
- By bridging the language barrier through exchanging the in-memory objects of the EMF data model across different programming languages.
- Enhancing the editors of other programming languages to support EMF data model API's on content assist, based on the context (which motivates the developers of other programming languages to still use EMF model)
For demonstrating the benefits, demo includes:
- example of APP4MC data model (information of embedded multi- and many-core software systems) EMF objects, exchanged between Java and Python
- Overview of java-python bridge using Py4J libraries, which provides infrastructure to access java/EMF objects in Python program, and invoke API available on these EMF objects.
- Enhancement made to Python eclipse editor (PyDev), which will populate the EMF object API's in the content assist based on the context -> which helps python developers to easily use API's of EMF data model. Screenshot of the python editor with conent assist proposals populated from ECORE data can be found at link. This enhancement to PyDev editor can be contributed to eclipse community in future, as it provides extension point through which custom implementation of content assist proposals can be contributed for other use-cases (by loading jar file/XSD/JSCON etc.,).
- Overview of APP4MC EMF meta-model viewer to understand the EMF data structure graphically.