maestro
maestro copied to clipboard
Introduce Builder throughout - removing specification-available expansion plugins?
Currently the MablTemplateGenerator
creates a specification containing expansions.
This means, that this can be picked up later on and processed to generate the desired spec.
If the MablTemplateGenerator
creates a MablApiBuilder
that has to be passed on to the expansion plugins, then it violates the possibility of having a specification with expansions that are yet to be expanded.
Thus, the idea of expansion plugins still live, but having expansions within a specification does not.
Shall we drop this entirely? And just perform code-generation basically?
- How should we invoke expansion plugins when using a builder?
- How should we pass builder data to expansion plugins when using a builder?
Proposal: Currently the plugins receive the following:
public List<PStm> expand(AFunctionDeclaration declaredFunction, List<PExp> formalArguments, IPluginConfiguration config,
ISimulationEnvironment envIn, IErrorReporter errorReporter)
How about changing the ISimulationEnvironment to also include a builder? So I becomes simulationContext, which in turn includes the simulationenvironment. How's this @lausdahl ?
Create an additional interface method:
public void expand(AFunctionDeclaration declaredFunction, ContextObj, IPluginConfiguration, DoubleVariable, DoubleVariable, IntVariable, List<Fmi2Components> components)
- [ ] Can we automatically map a MaBL lex identifier to DoubleVariable?