Commit ed1e5cb9 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Merge branch '4033' into 'master'

DSE-TCgen: Keep input models in the AF3 prj

See merge request af3/af3!348
parents 148076db b782bd40
AnnotationGenerationUtils.java 599f568c7e7da8555399ae7ee4eb922cb490effd GREEN AnnotationGenerationUtils.java 599f568c7e7da8555399ae7ee4eb922cb490effd GREEN
CompArchGeneratonUtil.java 0f1e3c048884fa4df6a35b6a110c46da58f59857 GREEN CompArchGeneratonUtil.java 0f1e3c048884fa4df6a35b6a110c46da58f59857 GREEN
DseUtils.java de113a513cce32f8945c126b94e38f7d6f7feb86 GREEN DseUtils.java 74ba8febd5a74cece21b5dd5ea7673dec7ddc122 GREEN
FileWriterUtil.java 4a95559f571d41fa44e6236fc055ab5baac7c384 GREEN FileWriterUtil.java 4a95559f571d41fa44e6236fc055ab5baac7c384 GREEN
GraphGenerationUtilities.java e637fd6a38339c60a6a7ac5af116db304266d345 GREEN GraphGenerationUtilities.java e637fd6a38339c60a6a7ac5af116db304266d345 GREEN
GraphMetricUtils.java 99a398d4ff9b15b3eeb35748e32aa34a9b197f07 GREEN GraphMetricUtils.java 99a398d4ff9b15b3eeb35748e32aa34a9b197f07 GREEN
......
...@@ -34,6 +34,7 @@ import static org.fortiss.af3.exploration.util.ModelSnapshotExtractUtils.createT ...@@ -34,6 +34,7 @@ import static org.fortiss.af3.exploration.util.ModelSnapshotExtractUtils.createT
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createAllocationPatternExpression; import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createAllocationPatternExpression;
import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createUtilizationPatternExpression; import static org.fortiss.af3.exploration.util.PatternFactoryUtils.createUtilizationPatternExpression;
import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotationValue; import static org.fortiss.tooling.base.utils.AnnotationUtils.getAnnotationValue;
import static org.fortiss.tooling.common.util.LambdaUtils.firstOfType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy; import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf; import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
...@@ -66,6 +67,8 @@ import org.fortiss.af3.task.model.Task; ...@@ -66,6 +67,8 @@ import org.fortiss.af3.task.model.Task;
import org.fortiss.af3.task.model.TaskArchitecture; import org.fortiss.af3.task.model.TaskArchitecture;
import org.fortiss.af3.task.model.annotation.FlashRequirement; import org.fortiss.af3.task.model.annotation.FlashRequirement;
import org.fortiss.af3.timing.model.TimingSpecification; import org.fortiss.af3.timing.model.TimingSpecification;
import org.fortiss.tooling.kernel.model.IProjectRootElement;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
/** /**
* Utility class supporting the interaction with artifacts of the design space exploration. * Utility class supporting the interaction with artifacts of the design space exploration.
...@@ -105,16 +108,29 @@ public class DseUtils { ...@@ -105,16 +108,29 @@ public class DseUtils {
// The created DSE already owns an InitialInputDefinitionStep. // The created DSE already owns an InitialInputDefinitionStep.
InitialInputDefinitionStep inputDefStep = dse.getInitialStep(); InitialInputDefinitionStep inputDefStep = dse.getInitialStep();
ModelSnapshot caSnap = createComponentArchitectureSnapshot( Collection<IProjectRootElement> rootElements = new ArrayList<>();
rootElements.add(
pickFirstInstanceOf(ComponentArchitecture.class, af3Project.getRootElements())); pickFirstInstanceOf(ComponentArchitecture.class, af3Project.getRootElements()));
rootElements
.add(pickFirstInstanceOf(PlatformArchitecture.class, af3Project.getRootElements()));
rootElements.add(pickFirstInstanceOf(TaskArchitecture.class, af3Project.getRootElements()));
rootElements.add(
pickFirstInstanceOf(AllocationTableCollection.class, af3Project.getRootElements()));
rootElements
.add(pickFirstInstanceOf(TimingSpecification.class, af3Project.getRootElements()));
Collection<IProjectRootElement> copiedRootElements = EcoreUtils.copy(rootElements);
ModelSnapshot caSnap = createComponentArchitectureSnapshot(
firstOfType(copiedRootElements, ComponentArchitecture.class).get());
ModelSnapshot paSnap = createPlatformArchitectureSnapshot( ModelSnapshot paSnap = createPlatformArchitectureSnapshot(
pickFirstInstanceOf(PlatformArchitecture.class, af3Project.getRootElements())); firstOfType(copiedRootElements, PlatformArchitecture.class).get());
ModelSnapshot taSnap = createTaskArchitectureSnapshot( ModelSnapshot taSnap = createTaskArchitectureSnapshot(
pickFirstInstanceOf(TaskArchitecture.class, af3Project.getRootElements())); firstOfType(copiedRootElements, TaskArchitecture.class).get());
ModelSnapshot allocSnap = createAllocationTableCollectionSnapshot( ModelSnapshot allocSnap = createAllocationTableCollectionSnapshot(
pickFirstInstanceOf(AllocationTableCollection.class, af3Project.getRootElements())); firstOfType(copiedRootElements, AllocationTableCollection.class).get());
ModelSnapshot timeSnap = createTimingSpecificationSnapshot( ModelSnapshot timeSnap = createTimingSpecificationSnapshot(
pickFirstInstanceOf(TimingSpecification.class, af3Project.getRootElements())); firstOfType(copiedRootElements, TimingSpecification.class).get());
inputDefStep.addSnapshot(caSnap); inputDefStep.addSnapshot(caSnap);
inputDefStep.addSnapshot(paSnap); inputDefStep.addSnapshot(paSnap);
......
Supports Markdown
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