Commit eba39e86 authored by Martin Eisenmann's avatar Martin Eisenmann

Merge branch '4016' of https://git.fortiss.org/af3/af3.git into 4016

parents 6b67c74f 159c5294
ParameterEntryTreeViewerEditingSupport.java 4ee444241e97e5988d8c6f2f3437aa0e89a83501 GREEN
ParameterEntryTreeViewerLabelProvider.java 46098593c7438473ce67f60dbbdc5d69afddc077 GREEN
ParameterEntryTreeViewerLabelProvider.java 93d661b82d11167b08721c3c3448d1a9eb608b7d GREEN
ParameterSourceElementTreeViewerEditingSupport.java 9e30e6e0df10beaaf3231c9ff06a0c5ab1df9b34 GREEN
ParameterSourceElementTreeViewerLabelProvider.java 6dbb656b23bf79aedbfd31d14c248fbe8f32ebad GREEN
ParameterSourceElementTreeViewerLabelProvider.java 2e5fce0c23707df0d40e4d876df7ece83e050424 GREEN
ParameterTableTreeViewerManager.java 497ae92bb11d8adbc1059636e632267f4fd035fd GREEN
TreeViewerCheckBoxEditingSupport.java e74087115ffcc255c9e7604f567f2c51478eac1b GREEN
TreeViewerCheckBoxLabelProvider.java a3f517284f52310b06f16d37fe351f44eb8e48ff GREEN
......
......@@ -19,8 +19,8 @@ import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.RIG
import static org.fortiss.af3.allocation.utils.AllocationUtils.getAnnotationEntry;
import static org.fortiss.af3.allocation.utils.AllocationUtils.getParameterEntryName;
import static org.fortiss.af3.allocation.utils.AllocationUtils.getParameterEntryValue;
import static org.fortiss.tooling.base.ui.annotation.labelprovider.AnnotationLabelProvider.READ_ONLY_ANNOTATION_BACKGROUND_COLOR;
import static org.fortiss.tooling.base.ui.annotation.labelprovider.AnnotationLabelProvider.getAnnotatationBackgroundColor;
import static org.fortiss.tooling.base.ui.annotation.view.fx.AnnotationsFXUtils.READ_ONLY_EMPTY_ANNOTATION_BACKGROUND_COLOR_SWT;
import static org.fortiss.tooling.base.ui.annotation.view.fx.AnnotationsFXUtils.getSWTBackgroundColorForEntry;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.swt.SWT;
......@@ -141,13 +141,13 @@ public class ParameterEntryTreeViewerLabelProvider<T extends ParameterTable>
Color color = super.getBackground(object);
if(annotationEntry != null) {
return getAnnotatationBackgroundColor(annotationEntry, annotationType, color);
return getSWTBackgroundColorForEntry(annotationEntry, annotationType, color);
}
// Fall back to default color in case annotation entry does not exist yet, but the
// element is "applicable" for the underlying parameter.
return color;
}
return READ_ONLY_ANNOTATION_BACKGROUND_COLOR;
return READ_ONLY_EMPTY_ANNOTATION_BACKGROUND_COLOR_SWT;
}
}
......@@ -17,7 +17,8 @@ package org.fortiss.af3.allocation.ui.editor.treeviewer;
import static org.fortiss.af3.allocation.ui.editor.treeviewer.ParameterTableTreeViewerManager.getAnnotationName;
import static org.fortiss.af3.allocation.ui.editor.treeviewer.ParameterTableTreeViewerManager.getAnnotationType;
import static org.fortiss.tooling.base.ui.annotation.labelprovider.AnnotationLabelProvider.getAnnotatationBackgroundColor;
import static org.fortiss.tooling.base.ui.annotation.view.fx.AnnotationsFXUtils.READ_ONLY_EMPTY_ANNOTATION_BACKGROUND_COLOR_SWT;
import static org.fortiss.tooling.base.ui.annotation.view.fx.AnnotationsFXUtils.getSWTBackgroundColorForEntry;
import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.swt.SWT;
......@@ -27,7 +28,6 @@ import org.fortiss.tooling.base.annotation.AnnotationEntry;
import org.fortiss.tooling.base.annotation.IAnnotationValueService;
import org.fortiss.tooling.base.model.element.IAnnotatedSpecification;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.base.ui.annotation.labelprovider.AnnotationLabelProvider;
import org.fortiss.tooling.kernel.ui.util.KernelUIUtils;
/**
......@@ -95,10 +95,10 @@ public class ParameterSourceElementTreeViewerLabelProvider extends ColumnLabelPr
AnnotationEntry annotationEntry =
IAnnotationValueService.getInstance().getAnnotationEntry((IModelElement)object);
return getAnnotatationBackgroundColor(annotationEntry, annotationType, color);
return getSWTBackgroundColorForEntry(annotationEntry, annotationType, color);
}
return AnnotationLabelProvider.READ_ONLY_ANNOTATION_BACKGROUND_COLOR;
return READ_ONLY_EMPTY_ANNOTATION_BACKGROUND_COLOR_SWT;
}
/** {@inheritDoc} */
......
<?xml version="1.0" encoding="UTF-8"?>
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-component-behavior-code="http://www.fortiss.org/af3/component/behavior/code" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-definitions="http://www.fortiss.org/af3/expression/definitions" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-terms-imperative="http://www.fortiss.org/af3/expression/terms/imperative" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-project-development="http://www.fortiss.org/af3/project/development" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="57" id="57" name="CCodeGeneratorComponentsTestData">
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-component-behavior-code="http://www.fortiss.org/af3/component/behavior/code" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-definitions="http://www.fortiss.org/af3/expression/definitions" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-terms-imperative="http://www.fortiss.org/af3/expression/terms/imperative" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="57" id="57" name="CCodeGeneratorComponentsTestData">
<rootElements xsi:type="org-fortiss-af3-project:ProjectConfiguration" xmi:id="1" id="1">
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" xmi:id="2" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" xmi:id="3" id="3">
<development xsi:type="org-fortiss-af3-project-development:DummyDevelopmentProcess"/>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-component:ComponentArchitecture" xmi:id="4" id="4" name="Component Architecture">
<containedElements xsi:type="org-fortiss-af3-component:Component" xmi:id="5" id="5" name="Component Architecture Root" comment="">
......
<?xml version="1.0" encoding="UTF-8"?>
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-project-development="http://www.fortiss.org/af3/project/development" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-af3-state="http://www.fortiss.org/af3/state" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="35" id="35" name="ComponentBasicTests">
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-af3-state="http://www.fortiss.org/af3/state" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="35" id="35" name="ComponentBasicTests">
<rootElements xsi:type="org-fortiss-af3-project:ProjectConfiguration" xmi:id="1" id="1">
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" xmi:id="2" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" xmi:id="3" id="3">
<development xsi:type="org-fortiss-af3-project-development:DummyDevelopmentProcess"/>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-component:ComponentArchitecture" xmi:id="4" id="4" name="Component Architecture">
<containedElements xsi:type="org-fortiss-af3-component:Component" xmi:id="5" id="5" name="Component Architecture Root" comment="">
......@@ -51,6 +48,7 @@
</specifications>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Points" key="points">
<points x="236" y="52"/>
<points x="236" y="52"/>
</layoutData>
</connections>
<layoutData xsi:type="org-fortiss-tooling-base-model-layout:Point" key="pos"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-component-behavior-code="http://www.fortiss.org/af3/component/behavior/code" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-definitions="http://www.fortiss.org/af3/expression/definitions" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-terms-imperative="http://www.fortiss.org/af3/expression/terms/imperative" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-project-development="http://www.fortiss.org/af3/project/development" xmlns:org-fortiss-af3-project-execution="http://www.fortiss.org/af3/project/execution" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="31" id="31" name="ComponentComplexTypesSimulatorTests">
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-component-behavior-code="http://www.fortiss.org/af3/component/behavior/code" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-definitions="http://www.fortiss.org/af3/expression/definitions" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-terms-imperative="http://www.fortiss.org/af3/expression/terms/imperative" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-project-execution="http://www.fortiss.org/af3/project/execution" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="31" id="31" name="ComponentComplexTypesSimulatorTests">
<rootElements xsi:type="org-fortiss-af3-project:ProjectConfiguration" xmi:id="1" id="1">
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" xmi:id="2" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" xmi:id="3" id="3">
<development xsi:type="org-fortiss-af3-project-development:DummyDevelopmentProcess"/>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-expression:DataDictionary" xmi:id="4" id="4">
<typeDefinitions xsi:type="org-fortiss-af3-expression-definitions:Structure" xmi:id="7" id="7" name="Point">
......
<?xml version="1.0" encoding="UTF-8"?>
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-component-behavior-code="http://www.fortiss.org/af3/component/behavior/code" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-terms-imperative="http://www.fortiss.org/af3/expression/terms/imperative" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-mira="http://www.fortiss.org/af3/mira" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-project-development="http://www.fortiss.org/af3/project/development" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="22" id="22" name="LibraryTests">
<org-fortiss-af3-project:FileProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org-fortiss-af3-component="http://www.fortiss.org/af3/component" xmlns:org-fortiss-af3-component-behavior-code="http://www.fortiss.org/af3/component/behavior/code" xmlns:org-fortiss-af3-expression="http://www.fortiss.org/af3/expression" xmlns:org-fortiss-af3-expression-terms="http://www.fortiss.org/af3/expression/terms" xmlns:org-fortiss-af3-expression-terms-imperative="http://www.fortiss.org/af3/expression/terms/imperative" xmlns:org-fortiss-af3-expression-types="http://www.fortiss.org/af3/expression/types" xmlns:org-fortiss-af3-mira="http://www.fortiss.org/af3/mira" xmlns:org-fortiss-af3-project="http://www.fortiss.org/af3/project" xmlns:org-fortiss-af3-project-configuration="http://www.fortiss.org/af3/project/configuration" xmlns:org-fortiss-af3-safety-annotation="http://www.fortiss.org/af3/safety/annotation" xmlns:org-fortiss-tooling-base-model-layout="http://www.fortiss.org/tooling/base/model/layout" xmi:id="22" id="22" name="LibraryTests">
<rootElements xsi:type="org-fortiss-af3-project:ProjectConfiguration" xmi:id="1" id="1">
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" xmi:id="2" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" xmi:id="3" id="3">
<development xsi:type="org-fortiss-af3-project-development:DummyDevelopmentProcess"/>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-expression:DataDictionary" xmi:id="4" id="4"/>
<rootElements xsi:type="org-fortiss-af3-component:ComponentArchitecture" xmi:id="5" id="5" name="Component Architecture">
......
SMTExplorationTargetMigrator.java c5cf1a5f40ea0a3c1b0940bdbb57950584d44af6 GREEN
SMTExplorationTargetMigrator.java 0c7c94bae31eab03bdafe69d62606d7042845027 GREEN
......@@ -84,7 +84,8 @@ public class SMTExplorationTargetMigrator implements IMigrationProvider {
for(SMTObjective objective : getChildrenWithType(dse, SMTObjective.class)) {
ExplorationObjective<Double> newObjective = createExplorationObjective(Double.class,
createUserDefinedDimension(objective.getDimension()),
objective.getExpression(), objective.getName());
newHashSet(IDeploymentSynthesis.class), objective.getExpression(),
objective.getName());
replace(objective, newObjective);
oldNewMap.put(objective, newObjective);
......
ConstraintDefinitionUtils.java b33123ce448cb168ddc80457604a1743c198c57e GREEN
ConstraintDefinitionUtils.java 8f1d3cf09780365a639e2ffa12e5599bade0ed6a GREEN
SMTTransformationUtils.java 858765e735f7a8ea8b9e13e12f3c5fba93d36ed3 GREEN
......@@ -16,6 +16,7 @@
package org.fortiss.af3.exploration.smt.util;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newHashSet;
import static java.math.BigDecimal.ZERO;
import static java.util.stream.Collectors.toSet;
import static org.fortiss.af3.exploration.smt.modeltransformation.EnergyConstraintDefinition.STD_FREQ;
......@@ -39,6 +40,7 @@ import static org.fortiss.tooling.base.utils.AnnotationUtils.hasAnnotation;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.eclipse.emf.common.util.EList;
......@@ -60,6 +62,8 @@ import org.fortiss.af3.exploration.dseml.model.function.Start;
import org.fortiss.af3.exploration.dseml.model.function.StronglyCausal;
import org.fortiss.af3.exploration.model.IExplorationObjective;
import org.fortiss.af3.exploration.model.project.RuleSet;
import org.fortiss.af3.exploration.model.synthesiscategory.IScheduleSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.ISynthesisCategory;
import org.fortiss.af3.exploration.smt.model.dseml.DsemlFactory;
import org.fortiss.af3.exploration.smt.model.dseml.FrequencyAssigned;
import org.fortiss.af3.platform.model.ExecutionUnit;
......@@ -98,8 +102,11 @@ public class ConstraintDefinitionUtils {
List<IFunction> objectives = newArrayList(createMinimizeSumObjective(rsAllocs));
int i = 0;
for(IFunction o : objectives) {
IExplorationObjective<?> oSmt = createExplorationObjective(Double.class,
createTemporalDimension(), o, "Latency Minimization Objective " + i++);
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IScheduleSynthesis.class);
IExplorationObjective<?> oSmt =
createExplorationObjective(Double.class, createTemporalDimension(), categories,
o, "Latency Minimization Objective " + i++);
rs.getExplorationTargets().add(oSmt);
}
......
......@@ -4,11 +4,6 @@
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" xmi:id="2" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" xmi:id="3" id="3">
<development xsi:type="org-fortiss-af3-project-development:ConstraintBasedDevelopmentProcess" currentObjective="4" constraintInstanceContainer="3">
<configurations xmi:id="4" id="4" name="Default configuration"/>
</development>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-component:ComponentArchitecture" xmi:id="5" id="5" name="Component Architecture">
<containedElements xsi:type="org-fortiss-af3-component:Component" xmi:id="6" id="6" name="Component Architecture" comment="">
......
......@@ -4,11 +4,6 @@
<configurationElements xsi:type="org-fortiss-af3-project-configuration:TypeSystemConfiguration" xmi:id="2" id="2">
<typesystem xsi:type="org-fortiss-af3-expression:MicroTypeSystem"/>
</configurationElements>
<configurationElements xsi:type="org-fortiss-af3-project-configuration:DevelopmentProcessConfiguration" xmi:id="3" id="3">
<development xsi:type="org-fortiss-af3-project-development:ConstraintBasedDevelopmentProcess" currentObjective="4" constraintInstanceContainer="3">
<configurations xmi:id="4" id="4" name="Default configuration"/>
</development>
</configurationElements>
</rootElements>
<rootElements xsi:type="org-fortiss-af3-component:ComponentArchitecture" xmi:id="5" id="5" name="Component Architecture">
<containedElements xsi:type="org-fortiss-af3-component:Component" xmi:id="6" id="6" name="Component Architecture" comment="">
......
......@@ -33,6 +33,7 @@ import static test.org.fortiss.af3.exploration.smt.util.TestDeploymentUtils.getT
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.stream.Collectors;
import org.fortiss.af3.exploration.dseml.model.expression.IExpression;
......@@ -107,7 +108,6 @@ public class BusBandwidthOptimizationTest extends SMTTestBase {
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
public Collection<IExplorationTarget<?>> createAdditionalConstraints() throws Exception {
Collection<IExplorationTarget<?>> explorationTargets = new ArrayList<>();
......@@ -118,23 +118,26 @@ public class BusBandwidthOptimizationTest extends SMTTestBase {
superSetMap.get(TransmissionUnit.class).getEntries().stream()
.filter(t -> t.getName().equals(transmissionUnitName)).findAny().get();
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IDeploymentSynthesis.class);
// Assign tasks to different ECUs
IExpression allocate0 = createAllocationPatternExpression(dse, true, asList(tasks[0]),
asList(executionUnits[0]));
IExpression allocate1 = createAllocationPatternExpression(dse, true, asList(tasks[1]),
asList(executionUnits[1]));
explorationTargets.add(createExplorationConstraint(Boolean.class,
createResourceDimension(), newHashSet(IDeploymentSynthesis.class), allocate0,
"Allocation: Task 0 - ECU 0", false));
explorationTargets.add(createExplorationConstraint(Boolean.class,
createResourceDimension(), newHashSet(IDeploymentSynthesis.class), allocate1,
"Allocation: Task 1 - ECU 1", false));
explorationTargets
.add(createExplorationConstraint(Boolean.class, createResourceDimension(),
categories, allocate0, "Allocation: Task 0 - ECU 0", false));
explorationTargets
.add(createExplorationConstraint(Boolean.class, createResourceDimension(),
categories, allocate1, "Allocation: Task 1 - ECU 1", false));
// Specify the transmission unit's weight
IExpression routeWeightExpression = createRouteWeightConstraintPatternExpression(dse);
explorationTargets.add(createExplorationConstraint(Boolean.class,
createResourceDimension(), newHashSet(IDeploymentSynthesis.class),
routeWeightExpression, "BandwidthWeight", false));
explorationTargets
.add(createExplorationConstraint(Boolean.class, createResourceDimension(),
categories, routeWeightExpression, "BandwidthWeight", false));
for(TransmissionUnit bus : dse.getCurrentStep().getSuperSetMap()
.get(TransmissionUnit.class).getEntries()) {
......@@ -142,9 +145,9 @@ public class BusBandwidthOptimizationTest extends SMTTestBase {
.getEntries()) {
IExpression routeUsesBusExpression =
createRouteUsesBusConstraintPatternExpression(dse, bus, route);
explorationTargets.add(createExplorationConstraint(Boolean.class,
createResourceDimension(), newHashSet(IDeploymentSynthesis.class),
routeUsesBusExpression, "RouteUsesBus", false));
explorationTargets.add(
createExplorationConstraint(Boolean.class, createResourceDimension(),
categories, routeUsesBusExpression, "RouteUsesBus", false));
}
}
......@@ -152,7 +155,7 @@ public class BusBandwidthOptimizationTest extends SMTTestBase {
IExpression bandwidthOptimization =
createBusWeightOptimizationPatternExpression(dse, testTransmissionUnit, true);
explorationTargets.add(createExplorationObjective(Double.class,
createResourceDimension(), bandwidthOptimization,
createResourceDimension(), categories, bandwidthOptimization,
"Bandwidth Optimization: " + transmissionUnitName));
return explorationTargets;
......
......@@ -27,6 +27,7 @@ import static test.org.fortiss.af3.exploration.smt.util.TestSchedulingUtils.getF
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import org.fortiss.af3.exploration.dseml.model.function.Minimize;
import org.fortiss.af3.exploration.model.IExplorationTarget;
......@@ -94,8 +95,10 @@ public class EnergyOptimizationTest extends SMTTestBase {
Minimize minConFunc =
createMinimizeConsumptionObjective(superSetMap.get(ResourceAllocation.class),
superSetMap.get(Task.class), superSetMap.get(ExecutionUnit.class));
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IScheduleSynthesis.class);
explorationTargets.add(createExplorationObjective(Double.class, createEnergyDimension(),
minConFunc, "Energy optimization objective"));
categories, minConFunc, "Energy optimization objective"));
return explorationTargets;
}
......
......@@ -29,12 +29,14 @@ import static test.org.fortiss.af3.exploration.smt.util.TestDeploymentUtils.getE
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.stream.Collectors;
import org.fortiss.af3.exploration.dseml.model.expression.IExpression;
import org.fortiss.af3.exploration.model.IExplorationTarget;
import org.fortiss.af3.exploration.model.SuperSetMap;
import org.fortiss.af3.exploration.model.solutions.ExplorationSolution;
import org.fortiss.af3.exploration.model.synthesiscategory.IDeploymentSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.IScheduleSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.ISynthesisCategory;
import org.fortiss.af3.exploration.smt.solver.DeploymentRun;
......@@ -113,9 +115,11 @@ public class HardwareOptimizationTest extends SMTTestBase {
IExpression ramMinimization = createHardwareOptimizationPatternExpression(dse, true, 0,
asList(tasks), asList(testExecutionUnit), RamSize.class);
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IDeploymentSynthesis.class);
explorationTargets
.add(createExplorationObjective(Double.class, createResourceDimension(),
ramMinimization, "RAM Minimization: " + executionUnitName));
categories, ramMinimization, "RAM Minimization: " + executionUnitName));
return explorationTargets;
}
......
......@@ -27,6 +27,7 @@ import static test.org.fortiss.af3.exploration.smt.util.TestSchedulingUtils.getF
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import org.fortiss.af3.exploration.dseml.model.function.Minimize;
import org.fortiss.af3.exploration.model.IExplorationTarget;
......@@ -92,8 +93,11 @@ public class LatencyOptimizationTest extends SMTTestBase {
SuperSetMap superSetMap = expSpec.getSearchSpace();
Minimize minRaSet =
createMinimizeSumObjective(superSetMap.get(ResourceAllocation.class));
explorationTargets.add(createExplorationObjective(Double.class,
createTemporalDimension(), minRaSet, "Latency optimization objective"));
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IScheduleSynthesis.class);
explorationTargets
.add(createExplorationObjective(Double.class, createTemporalDimension(),
categories, minRaSet, "Latency optimization objective"));
return explorationTargets;
}
......
BusBandwidthOptimizationPatternFXController.java 5dbbcafc47024082740945f87eae4bc88adcea63 GREEN
EnergyMinimizationPatternFXController.java b9141332a056e7cea3ce2e1cd7c77fdcf851e828 GREEN
HardwareOptimizationPatternFXController.java 4a2a05d9dab1e1ba7d81aa982049946c4bf79cae GREEN
LatencyMinimizationPatternFXController.java 322b476e7dad27160db54764f887c04406644b76 GREEN
BusBandwidthOptimizationPatternFXController.java d4aae6314b3b6b197bc18e2099c67d9b78c42484 GREEN
EnergyMinimizationPatternFXController.java 5da8dd709ec5053dd610384dce2a535a4781da53 GREEN
HardwareOptimizationPatternFXController.java c0592786a0b11be6ffc57d10c85eacbcc00064d4 GREEN
LatencyMinimizationPatternFXController.java bda2f2c4d4d1329fe93ffa1f0fc7741a64f584d5 GREEN
......@@ -29,6 +29,7 @@ import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createRouteWe
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import org.fortiss.af3.exploration.dseml.model.expression.IExpression;
......@@ -38,6 +39,7 @@ import org.fortiss.af3.exploration.model.IExplorationObjective;
import org.fortiss.af3.exploration.model.IExplorationTarget;
import org.fortiss.af3.exploration.model.project.DSE;
import org.fortiss.af3.exploration.model.synthesiscategory.IDeploymentSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.ISynthesisCategory;
import org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager;
import org.fortiss.af3.exploration.ui.perspective.targetdef.PatternFXControllerBase;
import org.fortiss.af3.platform.model.Route;
......@@ -86,7 +88,6 @@ public class BusBandwidthOptimizationPatternFXController extends PatternFXContro
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
public IExplorationTarget<?> getExplorationTarget() {
DSE dse = IDSEPerspectiveManager.INSTANCE.getCurrentlySelectedDSE();
......@@ -97,24 +98,26 @@ public class BusBandwidthOptimizationPatternFXController extends PatternFXContro
Collection<IExplorationConstraint<?>> constraints = new ArrayList<>();
IExpression routeWeightExpression = createRouteWeightConstraintPatternExpression(dse);
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IDeploymentSynthesis.class);
constraints.add(createExplorationConstraint(Boolean.class, createResourceDimension(),
newHashSet(IDeploymentSynthesis.class), routeWeightExpression, "BandwidthWeight",
true));
categories, routeWeightExpression, "BandwidthWeight", true));
for(TransmissionUnit bus : dse.getCurrentStep().getSuperSetMap().get(TransmissionUnit.class)
.getEntries()) {
for(Route route : dse.getCurrentStep().getSuperSetMap().get(Route.class).getEntries()) {
IExpression routeUsesBusExpression =
createRouteUsesBusConstraintPatternExpression(dse, bus, route);
constraints.add(createExplorationConstraint(Boolean.class,
createResourceDimension(), newHashSet(IDeploymentSynthesis.class),
routeUsesBusExpression, "RouteUsesBus", true));
constraints
.add(createExplorationConstraint(Boolean.class, createResourceDimension(),
categories, routeUsesBusExpression, "RouteUsesBus", true));
}
}
IExpression expr = createBusWeightOptimizationPatternExpression(dse, selectedBus,
minButton.isSelected());
IExplorationObjective<Double> objective = createExplorationObjective(Double.class,
createUserDefinedDimension(getCategory()), expr, getExplorationTargetName());
IExplorationObjective<Double> objective =
createExplorationObjective(Double.class, createUserDefinedDimension(getCategory()),
categories, expr, getExplorationTargetName());
objective.getImplicitConstraints().addAll(constraints);
return objective;
......
......@@ -15,17 +15,21 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.ui.perspective.targetdef.objective.pattern;
import static com.google.common.collect.Sets.newHashSet;
import static java.util.Collections.emptyList;
import static org.fortiss.af3.exploration.smt.modeltransformation.EnergyConstraintDefinition.createMinimizeConsumptionObjective;
import static org.fortiss.af3.exploration.util.ExplorationModelElementFactory.createExplorationObjective;
import static org.fortiss.af3.exploration.util.ExplorationModelElementFactory.createUserDefinedDimension;
import java.util.Collection;
import java.util.HashSet;
import org.fortiss.af3.exploration.dseml.model.expression.SuperSet;
import org.fortiss.af3.exploration.dseml.model.function.Minimize;
import org.fortiss.af3.exploration.model.ExplorationObjective;
import org.fortiss.af3.exploration.model.IExplorationTarget;
import org.fortiss.af3.exploration.model.synthesiscategory.IScheduleSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.ISynthesisCategory;
import org.fortiss.af3.exploration.ui.perspective.targetdef.PatternFXControllerBase;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.schedule.model.ResourceAllocation;
......@@ -66,8 +70,11 @@ public class EnergyMinimizationPatternFXController extends PatternFXControllerBa
SuperSet<Task> taskSet = getSuperSet(Task.class).get();
SuperSet<ExecutionUnit> execUnitSet = getSuperSet(ExecutionUnit.class).get();
Minimize energyMin = createMinimizeConsumptionObjective(raSet, taskSet, execUnitSet);
ExplorationObjective<?> objective = createExplorationObjective(Double.class,
createUserDefinedDimension(getCategory()), energyMin, getExplorationTargetName());
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IScheduleSynthesis.class);
ExplorationObjective<?> objective =
createExplorationObjective(Double.class, createUserDefinedDimension(getCategory()),
categories, energyMin, getExplorationTargetName());
return objective;
}
......
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.ui.perspective.targetdef.objective.pattern;
import static com.google.common.collect.Sets.newHashSet;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.toList;
import static org.fortiss.af3.exploration.ui.util.ExplorationUiUtils.createNameProvider;
......@@ -26,6 +27,7 @@ import static org.fortiss.tooling.common.util.LambdaUtils.getFirst;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.prepareUniqueID;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import org.fortiss.af3.exploration.dseml.model.expression.IExpression;
......@@ -33,6 +35,8 @@ import org.fortiss.af3.exploration.dseml.model.expression.SuperSet;
import org.fortiss.af3.exploration.model.ExplorationObjective;
import org.fortiss.af3.exploration.model.IExplorationTarget;
import org.fortiss.af3.exploration.model.project.DSE;
import org.fortiss.af3.exploration.model.synthesiscategory.IDeploymentSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.ISynthesisCategory;
import org.fortiss.af3.exploration.ui.perspective.service.IDSEPerspectiveManager;
import org.fortiss.af3.exploration.ui.perspective.targetdef.PatternFXControllerBase;
import org.fortiss.af3.platform.model.ExecutionUnit;
......@@ -126,8 +130,11 @@ public class HardwareOptimizationPatternFXController extends PatternFXController
IExpression expr = createHardwareOptimizationPatternExpression(dse, minButton.isSelected(),
operation, getSelectedTasks(), getSelectedExecutionUnits(), property);
ExplorationObjective<?> objective = createExplorationObjective(Double.class,
createUserDefinedDimension(getCategory()), expr, getExplorationTargetName());
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IDeploymentSynthesis.class);
ExplorationObjective<?> objective =
createExplorationObjective(Double.class, createUserDefinedDimension(getCategory()),
categories, expr, getExplorationTargetName());
prepareUniqueID(objective, dse);
return objective;
}
......
......@@ -15,17 +15,21 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.ui.perspective.targetdef.objective.pattern;
import static com.google.common.collect.Sets.newHashSet;
import static java.util.Collections.emptyList;
import static org.fortiss.af3.exploration.smt.modeltransformation.EnergyConstraintDefinition.createMinimizeSumObjective;
import static org.fortiss.af3.exploration.util.ExplorationModelElementFactory.createExplorationObjective;
import static org.fortiss.af3.exploration.util.ExplorationModelElementFactory.createUserDefinedDimension;
import java.util.Collection;
import java.util.HashSet;
import org.fortiss.af3.exploration.dseml.model.expression.SuperSet;
import org.fortiss.af3.exploration.dseml.model.function.Minimize;
import org.fortiss.af3.exploration.model.ExplorationObjective;
import org.fortiss.af3.exploration.model.IExplorationTarget;
import org.fortiss.af3.exploration.model.synthesiscategory.IScheduleSynthesis;
import org.fortiss.af3.exploration.model.synthesiscategory.ISynthesisCategory;
import org.fortiss.af3.exploration.ui.perspective.targetdef.PatternFXControllerBase;
import org.fortiss.af3.schedule.model.ResourceAllocation;
......@@ -61,8 +65,11 @@ public class LatencyMinimizationPatternFXController extends PatternFXControllerB
public IExplorationTarget<?> getExplorationTarget() {
SuperSet<ResourceAllocation> raSet = getSuperSet(ResourceAllocation.class).get();
Minimize latencyMin = createMinimizeSumObjective(raSet);
ExplorationObjective<?> objective = createExplorationObjective(Double.class,
createUserDefinedDimension(getCategory()), latencyMin, getExplorationTargetName());
@SuppressWarnings("unchecked") HashSet<Class<? extends ISynthesisCategory>> categories =
newHashSet(IScheduleSynthesis.class);