use of org.yakindu.sct.model.sexec.transformation.FlowOptimizer in project statecharts by Yakindu.
the class SExecGeneratorEntryExecutor method createExecutionFlow.
protected ExecutionFlow createExecutionFlow(GeneratorEntry entry) {
ExecutionFlow flow = sequencer.transform((Statechart) entry.getElementRef());
Assert.isNotNull(flow, "Error creation ExecutionFlow");
FlowOptimizer optimizer = optimizerFactory.create(entry);
return optimizer.transform(flow);
}
use of org.yakindu.sct.model.sexec.transformation.FlowOptimizer in project statecharts by Yakindu.
the class FlowOptimizerFactory method create.
public FlowOptimizer create(GeneratorEntry entry) {
FlowOptimizer optimizer = optimizerProvider.get();
FeatureConfiguration optimizeConfig = entry.getFeatureConfiguration(FUNCTION_INLINING_FEATURE);
optimizer.inlineReactions(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_REACTIONS, false));
optimizer.inlineExitActions(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_EXIT_ACTIONS, false));
optimizer.inlineEntryActions(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_ENTRY_ACTIONS, false));
optimizer.inlineEnterSequences(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_ENTER_SEQUENCES, false));
optimizer.inlineExitSequences(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_EXIT_SEQUENCES, false));
optimizer.inlineChoices(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_CHOICES, false));
optimizer.inlineEntries(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_ENTRIES, false));
optimizer.inlineEnterRegion(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_ENTER_REGION, false));
optimizer.inlineExitRegion(getBoolValue(optimizeConfig, FUNCTION_INLINING_FEATURE_INLINE_EXIT_REGION, false));
return optimizer;
}
Aggregations