Search in sources :

Example 1 with FlowOptimizer

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);
}
Also used : FlowOptimizer(org.yakindu.sct.model.sexec.transformation.FlowOptimizer) ExecutionFlow(org.yakindu.sct.model.sexec.ExecutionFlow)

Example 2 with FlowOptimizer

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;
}
Also used : FlowOptimizer(org.yakindu.sct.model.sexec.transformation.FlowOptimizer) FeatureConfiguration(org.yakindu.sct.model.sgen.FeatureConfiguration)

Aggregations

FlowOptimizer (org.yakindu.sct.model.sexec.transformation.FlowOptimizer)2 ExecutionFlow (org.yakindu.sct.model.sexec.ExecutionFlow)1 FeatureConfiguration (org.yakindu.sct.model.sgen.FeatureConfiguration)1