Commit a506a67a authored by Simon Barner's avatar Simon Barner
Browse files

GREEN

Issue-Ref: 3598
Issue-Url: https://af3-developer.fortiss.org/issues/3598

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 8cc2b0b2
AF3z3Activator.java e9ff1932a62e74d66260edab2132501a327f08b6 GREEN
Z3Type.java 73e319ae206d2fd456ec9430c01b5ff7fc7282d0 GREEN
Z3javaAPIWrapper.java d21fa89f50dd9afe49eaad0901384bdf99df548f YELLOW
Z3javaAPIWrapper.java d21fa89f50dd9afe49eaad0901384bdf99df548f GREEN
......@@ -5,7 +5,7 @@ ConstraintDefinitionUtils.java f110a4a216905d2236324ae459d789d50114e25c GREEN
ConstraintToNonQuantifiedSMT.java de0e8a7000e26d745b62a27f8c2482e7a7737add GREEN
ConstraintToQuantifiedSMT.java c84e799c69195fe80a2e66a39d0192325b06c7fd GREEN
DSMLTransformationService.java b2e90e11e36346d01c79c18f16ffc62f66f35888 GREEN
DSMLtoSMTTransformator.java 7a03c75f6d7baba392fee2c0f900fb7726854d72 YELLOW
DSMLtoSMTTransformator.java 7a03c75f6d7baba392fee2c0f900fb7726854d72 GREEN
DeploScheduleRun.java d074d157250deba431d8f34d13d6464fd27f8acb GREEN
DeploymentRun.java 67d240b1f02f906748811acad9ced9dd71e7cb56 GREEN
IDSMLTransformationService.java f56241d2dff68a69cd1fe09c119d615f74088650 GREEN
......
AllocationPatternCompositeBackend.java afd6f4373b2f6fda3a99d1c3d2ba7c296a877567 GREEN
ConstraintPatternHeader.java 8a4d00fa9831bc762ab6eeebf764a0b01a14bee8 RED
ConstraintViewBackend.java 7600f81a5a08a2fbb586189fc3bb269b09b5e914 YELLOW
ConstraintViewBackend.java 7600f81a5a08a2fbb586189fc3bb269b09b5e914 GREEN
FunctionCouplingCompositeBackend.java 0bdfcf5b127ab06893638b4f3c09d87f97e1decb YELLOW
MemoryPatternBackend.java adadf858ac3b3b5735d60e4fe4f282176a154007 YELLOW
MemoryPatternBackend.java 886d69513d2c6237696184b9bf5fb1cfaadfa943 GREEN
SafetyPatternBackend.java 262de8fe2277f6e55e0936c9631cccf53c794b1c RED
......@@ -15,12 +15,13 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.ui.perspective.constraint;
import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotation;
import org.eclipse.swt.widgets.Composite;
import org.fortiss.af3.exploration.ui.perspective.generic.UtilizationPatternBackend;
import org.fortiss.af3.platform.model.annotation.RamSize;
import org.fortiss.af3.task.model.annotation.RamRequirement;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.base.utils.AnnotationUtils;
/**
* Implementation of memory pattern as utilization pattern.
......@@ -41,16 +42,14 @@ public class MemoryPatternBackend extends UtilizationPatternBackend<RamRequireme
@Override
public String getComponentSpecificationValue(IModelElement element,
Class<RamRequirement> spec) {
RamRequirement annotation = AnnotationUtils.getAnnotation(element, RamRequirement.class);
// TODO Check: Return value used to be based on the accumulated memory requirement which has
// been removed in the frame of #2964.
RamRequirement annotation = getAnnotation(element, RamRequirement.class);
return annotation.getBytes() + "";
}
/** {@inheritDoc} */
@Override
public String getECUSpecificationValue(IModelElement element, Class<RamSize> spec) {
RamSize annotation = AnnotationUtils.getAnnotation(element, RamSize.class);
RamSize annotation = getAnnotation(element, RamSize.class);
return annotation.getBytes() + "";
}
}
FrequencyAnnotationMigrationProvider.java 4a8db7cfee30746658834498ed4a133fa806f8e7 GREEN
MemoryPerNodeAnnotationMigrationProvider.java 3f4b943c6eccf012c562f3c8bd4565de63e7b871 YELLOW
MemoryPerNodeAnnotationMigrationProvider.java c7aa75b7894fe1125cce2dcb5c8f52f0e7dcaed7 GREEN
......@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.extension.IMigrationProvider;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
/**
* Migrates MemoryPerNode annotations to RamSize annotations.
* Migrates {@link MemoryPerNode} annotations to {@link RamSize} annotations.
*
* @author munaro
*/
......
AllocationToDeploymentTransformation.java a886f42410d752a4134fc768c997e731ed3a2b09 GREEN
MemoryRequirementAnnotationMigrationProvider.java 5adf2e82d4ac512133b8fe17979fcfe46c0c97a6 YELLOW
MemoryRequirementAnnotationMigrationProvider.java aaf84d505fe7817054f8245f2ff983f92b393480 GREEN
PeriodMigrationProvider.java 2fe676ee748e41d38c3f5afcbb3fa2e6188cbc80 GREEN
......@@ -16,20 +16,22 @@
package org.fortiss.af3.task.model;
import static java.util.Collections.singletonList;
import static java.util.stream.Collectors.toList;
import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import static org.fortiss.af3.allocation.utils.AllocationModelElementFactory.createAllocationTableCollection;
import static org.fortiss.af3.allocation.utils.AllocationUtils.getOrCreateAllocationTable;
import static org.fortiss.tooling.common.util.LambdaUtils.asStream;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getParentElement;
import static org.fortiss.tooling.kernel.utils.UniqueIDUtils.fixMissingIDs;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.xml.type.AnyType;
import org.fortiss.af3.allocation.model.AllocationTableCollection;
import org.fortiss.af3.allocation.utils.AllocationModelElementFactory;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.component.model.ComponentArchitecture;
import org.fortiss.af3.component.model.annotation.MemoryRequirement;
......@@ -41,11 +43,9 @@ import org.fortiss.af3.task.util.ComponentToTaskArchitectureTransformation;
import org.fortiss.tooling.base.model.element.IModelElementSpecification;
import org.fortiss.tooling.kernel.extension.IMigrationProvider;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
import org.fortiss.tooling.kernel.utils.KernelModelElementUtils;
/**
* Migrates MemoryRequirement annotations to RamRequirement annotations.
* Migrates {@link MemoryRequirement} annotations to {@link RamRequirement} annotations.
*
* @author munaro
*/
......@@ -70,17 +70,16 @@ public class MemoryRequirementAnnotationMigrationProvider implements IMigrationP
private List<ComponentToTaskAllocationTable> getOrCreateComponentToTaskAllocationTables(
ITopLevelElement modelElement, MemoryRequirement memoryRequirement) {
FileProject fileProject = (FileProject)modelElement.getRootModelElement();
ComponentArchitecture componentArchitecture = KernelModelElementUtils
.getParentElement(memoryRequirement, ComponentArchitecture.class, false);
ComponentArchitecture componentArchitecture =
getParentElement(memoryRequirement, ComponentArchitecture.class, false);
List<ComponentToTaskAllocationTable> allocationTables =
EcoreUtils.getChildrenWithType(fileProject, ComponentToTaskAllocationTable.class)
.stream().filter(a -> a.getSourceView() == componentArchitecture)
.collect(Collectors.toList());
getChildrenWithType(fileProject, ComponentToTaskAllocationTable.class).stream()
.filter(a -> a.getSourceView() == componentArchitecture).collect(toList());
if(!allocationTables.isEmpty()) {
return allocationTables;
}
AllocationTableCollection allocationTableCollection =
AllocationModelElementFactory.createAllocationTableCollection("Allocations");
createAllocationTableCollection("Allocations");
fixMissingIDs(allocationTableCollection, fileProject);
fileProject.getRootElements().add(allocationTableCollection);
TaskArchitecture taskArchitecture = new ComponentToTaskArchitectureTransformation()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment