Improve management of ALE when used as SiriusInterpreter #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR makes ALE interperter available all the time as a SiriusInterpreter (ie. a SiriusInterpreter is an interpreter used by Sirius in the odesign fields) (It was previously available only when running a single engine)
Expression in Sirius can now use
ale:
queries for both displaying runtime data while running a model AND displaying static information while editing a model (ie. as a replacement of[ /]
oraql:
queries)This PR also fixes the display of
ale:
queries in Sirius 6.3.0 when no model is running (cf. #44)This PR also provides a support for multiple model execution at the same time. (In the previous version, only one engine was available to provide runtime data to the SiriusIntepreter )
Changes
ALESiriusInterpreterProvider
is registered using the extension point in the plugin.xmlALESiriusInterpreter
is now a singleton, engines register themselves as known engines. When evaluating a query,ALESiriusInterpreter
either find the appropriateALEEngine
or creates a new one able to evaluate queries relative only to the static part of the model. A small cache avoid creatingALEEngine
on every call.Launcher
(launch configuration) implicitly registers the newly created engine to the known engines ofALESiriusInterpreter
singleton. The launcher also implicitly adds the EngineAddon to the engine in order to unregister and free all the resources.Contribution to issues
Closes #44
Contributes to gemoc/ale-lang#150
Companion Pull Requests