eclipse-gemoc / gemoc-studio

gemoc-studio
Eclipse Public License 1.0
25 stars 22 forks source link

add a DSL registry based on dsl files #58

Open dvojtise opened 6 years ago

dvojtise commented 6 years ago

in order to fully enable #8 and #57 we need a registry in eclipse that can reference the languages declared in dsl files.

Ie. similarly to Melange registry, it needs an extension point that plugin providing a dsl file must use in order to expose the language.

It will only declare the dsl, without any information about dsl relation ship (extends/implements, ...) These relation ship would be computed only in the running eclipse at request amoung available installed languages

ebousse commented 6 years ago

How are we currently finding DSLs registered by dsl files, if not by a form of registry?

dvojtise commented 6 years ago

currently, we find dsl files by looking to the registered extension, these extensions provide only the information about where to find the dsl file. If one wants to know which file (model ) can be handled by a dsl (ie. is instance of, or is downcast possible ), she has to load all the registered dsl file and analyze them. Such relationship should be analyzed once and saved/registered somewhere even if they are not written explicitly by the language designers. (and actually, there is no way to write this information in the dsl)

ebousse commented 6 years ago

Ah I see, so if I summarize you want a cache that would store computed relationships among DSLs, to avoid computing the same things twice?

But do we have any relationships between DSLs at the moment, when not using Melange?

In any case, why not, but it is still rather unclear to me how much of Melange we want to reimplement in GEMOC. I would almost prefer to focus on providing facilities to fully avoid "downcasting", eg. by exposing the execution state of a model in a generic fashion similarly to the trace, thus avoiding the need to have an merged static+dynamic ecore metamodel, and this avoiding the need to manage an "extends" relationship between two ecore files.

dvojtise commented 6 years ago

Agreed, an interface to access RTD would be better and would solve more issues. (issue https://github.com/eclipse/gemoc-studio/issues/122 opened to discuss how to acheive this)

however, a simple model "converter" that allows loading a model as if it was written in the execution language metamodel would still be useful in some situation (but less often :wink: )