Commit 4c70baaf authored by Simon Barner's avatar Simon Barner
Browse files

RED

exploration.ecore
- Add comment to InstanceOfElement and ContainedByElement that they
  are temporary specifications to control the export of the synthesized
  solution that is not to be saved to the model.
- Potentially, introduce an intermediate type, e.g.
ITransformationControlSpecification, that contains the above
documentation.

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

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent d44da2f7
dseml.ecore 7d40e97f4d0bcebc825455b334c7109573896cff GREEN
exploration.ecore 0c7123515319b80c8030d9990ca762ca8037d8d0 YELLOW
exploration.ecore 0c7123515319b80c8030d9990ca762ca8037d8d0 RED
DSEStaticImpl.java ceaf5ecf8c77609d4ae13d40b88ac443fe6b09e9 GREEN
InitialInputDefinitionStepStaticImpl.java 6d9951e848a64687f83d750557f6d6dcc5c04d54 GREEN
ModelSnapshotStaticImpl.java a03d2e1273cd5130359a1d757a03c477d92997f0 GREEN
ProcessStepStaticImpl.java 397bd5182d3bb608c5b9c991586a02971947386c YELLOW
InitialInputDefinitionStepStaticImpl.java 5c0d13f3e16cd720ecef35378d15fb599a1e9c09 RED
ModelSnapshotStaticImpl.java f9161c14852ce9f3a55e8b6b16ba781124f3adf9 RED
ProcessStepStaticImpl.java 2c2ab6445af93bc7eccfb4b6031efe963d1b5560 RED
SolutionSelectionStepStaticImpl.java f62112f9d033b45294155eb8f77edfd74a633b07 YELLOW
......@@ -31,6 +31,8 @@ public class InitialInputDefinitionStepStaticImpl {
/** Static implementation of {@link InitialInputDefinitionStep#addSnapshot(ModelSnapshot)}. */
public static void addSnapshot(InitialInputDefinitionStepImpl initialInputDefinitionStepImpl,
ModelSnapshot snapshot) {
// TODO (SB) Use
// ProjectPackage.Literals.ARTIFACT_SNAPSHOT_COLLECTION__CONTAINED_MODEL_SNAPSHOTS;
EReference modelSnapFeature =
ProjectPackage.eINSTANCE.getArtifactSnapshotCollection_ContainedModelSnapshots();
@SuppressWarnings("unchecked") EList<ModelSnapshot> snaps =
......
......@@ -34,6 +34,7 @@ public class ModelSnapshotStaticImpl {
/** Implements {@link ModelSnapshot#addSuperSet(SuperSet, Class)}. */
public static <T extends IModelElement> void addSuperSet(ModelSnapshotImpl modelSnapshotImpl,
SuperSet<T> superSet, Class<T> setType) {
// TODO (SB) Use ProjectPackage.Literals.MODEL_SNAPSHOT__SUPER_SET_MAP
EStructuralFeature setFeature = ProjectPackage.eINSTANCE.getModelSnapshot_SuperSetMap();
SuperSetMap map = (SuperSetMap)modelSnapshotImpl.eGet(setFeature);
if(map == null) {
......@@ -46,6 +47,7 @@ public class ModelSnapshotStaticImpl {
/** Implements {@link ModelSnapshot#getSuperSet(Class)}. */
public static <T extends IModelElement> SuperSet<T>
getSuperSet(ModelSnapshotImpl modelSnapshotImpl, Class<T> setType) {
// TODO (SB) Use ProjectPackage.Literals.MODEL_SNAPSHOT__SUPER_SET_MAP
EStructuralFeature setFeature = ProjectPackage.eINSTANCE.getModelSnapshot_SuperSetMap();
SuperSetMap map = (SuperSetMap)modelSnapshotImpl.eGet(setFeature);
return (map != null) ? map.get(setType) : null;
......
......@@ -114,10 +114,14 @@ public class ProcessStepStaticImpl {
// alternate behavior is observed, the create logic of ProcessSteps has to
// be examined.
if(traverseSnaps) {
// TODO (SB) Use
// ProjectPackage.Literals.ARTIFACT_SNAPSHOT_COLLECTION__CONTAINED_MODEL_SNAPSHOTS;
EReference modelSnapFeature = ProjectPackage.eINSTANCE
.getArtifactSnapshotCollection_ContainedModelSnapshots();
for(ModelSnapshot thisSnapshot : (Collection<ModelSnapshot>)processStep
.eGet(modelSnapFeature)) {
// TODO (SB) ProjectPackage.Literals.MODEL_SNAPSHOT__SUPER_SET_MAP
EStructuralFeature mapFeature =
ProjectPackage.eINSTANCE.getModelSnapshot_SuperSetMap();
SuperSetMap artifactMap =
......@@ -201,6 +205,7 @@ public class ProcessStepStaticImpl {
if(thisSnapshot.getRootElement().getClass() != otherSnapshot.getRootElement().getClass()) {
return false;
}
// TODO (SB): Use ProjectPackage.Literals.MODEL_SNAPSHOT__SUPER_SET_MAP
EStructuralFeature setFeature = ProjectPackage.eINSTANCE.getModelSnapshot_SuperSetMap();
SuperSetMap thisMap = (SuperSetMap)thisSnapshot.eGet(setFeature);
SuperSetMap otherMap = (SuperSetMap)otherSnapshot.eGet(setFeature);
......
DSESolutionVisualization.java f405ef1fbe8ce64f754ead646fa352fc405d2eda GREEN
IDSEBackend.java c66d2c151caf79fa2f99665bc75d61884e677eaa GREEN
IDSEBackendService.java 88c7ef5131025ef0e83e64ec26cdf3c2fa48abbe GREEN
IDSESolutionExporterService.java 17797ddb10aa13a2ad45049d53c454175eb588b6 YELLOW
IDSESolutionExporterService.java 17797ddb10aa13a2ad45049d53c454175eb588b6 GREEN
DSEBackendService.java 6af7d976cfa9d49875dc3183b034c958b14d167f GREEN
DSESolutionExporterService.java 8d6a0e44e5dbd3bf75f56194f79bf3ff6c5aca1c YELLOW
DSEBackendService.java 34046f8022863672842ebb94dcee6afecff1879b RED
DSESolutionExporterService.java 8d6a0e44e5dbd3bf75f56194f79bf3ff6c5aca1c GREEN
......@@ -215,6 +215,7 @@ public class DSEBackendService implements IDSEBackendService, IIntrospectiveKern
SolutionsPackage.eINSTANCE.getSingleExplorationSolution_SolutionSets();
for(SingleExplorationSolution singleSolution : dseSolution.getSolutions()) {
try {
// TODO (SB: Use SolutionsPackage.Literals.SINGLE_EXPLORATION_SOLUTION)
SuperSetMap superSets = (SuperSetMap)singleSolution.eGet(solutionMapFeature);
validateBasicInformation(superSets);
} catch(Exception e) {
......
DSESolutionArtifacts.java a90171c6adc6e522e328e1bb3b55ae4dac18f5e5 YELLOW
DSESolutionConversionContext.java d16e052e6c3b56b7e2ae21ffec97bd41df1d3d4d YELLOW
DSESolutionConverterBase.java ddfd79b2535b7242b39c331ba8a12ccc36155677 YELLOW
IDSESolutionConverter.java 4c3f3555b98c19d0642797a28de1d9bdd113ab5a YELLOW
RouteConverter.java b63f6c096b3c33595ff3d6225e294b894208b07e YELLOW
ScheduleConverter.java 90a8bbcd6b936ea32d68692969e692a7605fa580 YELLOW
SignalToRouteConverter.java 0aac4963f9ae0f24814ccfb510a02c4ea84e1443 YELLOW
TaskToExecUnitConverter.java 2566b87947007df54a4cc96f71f066a944629d23 YELLOW
DSESolutionArtifacts.java 476768216ad01864c0c01536624e50fee17b0fc1 RED
DSESolutionConversionContext.java d16e052e6c3b56b7e2ae21ffec97bd41df1d3d4d GREEN
DSESolutionConverterBase.java ddfd79b2535b7242b39c331ba8a12ccc36155677 GREEN
IDSESolutionConverter.java 4c3f3555b98c19d0642797a28de1d9bdd113ab5a GREEN
RouteConverter.java b63f6c096b3c33595ff3d6225e294b894208b07e GREEN
ScheduleConverter.java dfbde7dafdf9ca2f9b7b55bf1c662de13e508509 RED
SignalToRouteConverter.java ab5b80352445d3f7a82f9416950a2b0e42f8e048 RED
TaskToExecUnitConverter.java e772e2c1617b66f851b0752185e0eb81ca53d20b RED
......@@ -62,6 +62,7 @@ public class DSESolutionArtifacts {
artifactsToCopy.addAll(inputModels);
Map<EObject, EObject> copiedArtifacts = copyToRefMap(artifactsToCopy);
// TODO (SB: Use SolutionsPackage.Literals.SINGLE_EXPLORATION_SOLUTION__SOLUTION_SETS)
SuperSetMap origSolutionMap = (SuperSetMap)expSol
.eGet(SolutionsPackage.eINSTANCE.getSingleExplorationSolution_SolutionSets());
......
......@@ -148,6 +148,7 @@ public class ScheduleConverter
}
}
// TODO (SB: Comment still valid?)
// In case there is a copied schedulable entity (e.g., Segments), use it. Otherwise
// (e.g., Tasks), just use the original one.
resAlloc.getSchedulableEntity().setModelElement(modelElement);
......
......@@ -56,6 +56,7 @@ public class SignalToRouteConverter
final TaskToExecutionUnitAllocationTable ta2paFin = ta2pa;
for(SignalToRouteAllocationEntry entry : fromSuperSet.getEntries()) {
// TODO (SB: is this comment still valid? Or aren't all model elements copied now?)
// Route (as part of PA) has been copied in RouteConverter: Dereference in map
Route route = entry.getRoute();
entry.getSignals().forEach(t -> addAllocationEntry(ta2paFin,
......
......@@ -66,6 +66,7 @@ public class TaskToExecUnitConverter extends
TaskToExecutionUnitAllocationTable existingT2ExUTable =
atc.getAllocationTable(TaskToExecutionUnitAllocationTable.class);
if(existingT2ExUTable != null) {
// TODO (SB: static import)
EcoreUtil.delete(existingT2ExUTable);
}
......@@ -76,6 +77,7 @@ public class TaskToExecUnitConverter extends
baseName + " - Task " + RIGHT_ARROW + "ExecUnit", taArch, platArch);
for(TaskToExecutionUnitAllocationEntry entry : fromSuperSet.getEntries()) {
// TODO (SB: is this comment still valid? Or aren't all model elements copied now?)
// ExecutionUnit (as part of PA) has been copied in RouteConverter: Dereference in map
ExecutionUnit executionUnit = entry.getExecutionUnit();
entry.getTasks().forEach(t -> addAllocationEntry(ta2pa,
......
PartitionChannelConverter.java 52f517bab5060628c2b49d9100dbb807f1dd3c85 YELLOW
PartitionChannelConverter.java b8d7fc09de25e6eb55cbdde9d205958e0c89c87c RED
PartitionConverter.java 9e9861618e29cf0cbdcdbaae881ccca2538b1458 YELLOW
PartitionToExecutionUnitConverter.java e2b73759498f72277378cfaf1f37a3357742a671 YELLOW
TaskToPartitionConverter.java f71db1ef5488d48ef5e38b0e7c82bdff92d1d269 YELLOW
......@@ -88,6 +88,7 @@ public class PartitionChannelConverter
TaskInputPort targetInputPort = signal.getTargetTaskPort();
Task targetTask = (Task)targetInputPort.getOwner();
// TODO (SB): Check comment
// NOTE: We don't need to query the copyRefMap here, since the allocation tables
// are transformed before and they are already pointing to the correct
// Partitions.
......
DSEProjectModelElementFactory.java ff8297a378c637c29d98097f5f75eb3067392027 GREEN
DSESolutionConversionUtils.java f86e8f4ec4afe26307229f7e4a2b8fefd0dae409 YELLOW
DSEProjectModelElementFactory.java ec7cb91d289cad7869dc71f992d6e7904c84a0e4 RED
DSESolutionConversionUtils.java 18407d7fada5588c52243612ba13f2620e6fd435 RED
DSMLModelElementFactory.java 24b8cf9c900e948dcc71eb2a7fa26232baa6f7a5 GREEN
DSMLUtils.java c07eeef09787cea9db98533d346e3e384a232593 GREEN
ExplorationModelElementFactory.java bb48b2d09b92efcb1b2d3e382555089bb7ed5db5 GREEN
ExplorationReflectionUtils.java 62731e1cef32fe93f2c2017f93f5ba1f054d5197 GREEN
ExplorationUtils.java cd48d4910a1a6668d8c39cbd93c220e1b87bdef4 YELLOW
ExplorationUtils.java bcef13597d20de673f523fcbc01195fcc6a4425f RED
ModelSnapshotExtractUtils.java 940c5f0e2859519522ae8edfda63e05112870776 GREEN
PatternFactoryUtils.java bcb1d325aecfef12d29d4eb53b28fe59dbd20e9a GREEN
......@@ -80,6 +80,7 @@ public class DSEProjectModelElementFactory {
ModelSnapshot snapshot = ProjectFactory.eINSTANCE.createModelSnapshot();
snapshot.setRootElement(rootElement);
if(map != null) {
// TODO (SB): Use ProjectPackage.Literals.MODEL_SNAPSHOT__SUPER_SET_MAP
EStructuralFeature setFeature = ProjectPackage.eINSTANCE.getModelSnapshot_SuperSetMap();
snapshot.eSet(setFeature, map);
map.keySet().forEach(k -> snapshot.addSuperSet(map.get((Class<IModelElement>)k),
......
......@@ -50,6 +50,8 @@ public class DSESolutionConversionUtils {
return containmentSpec.getFutureContainerRef();
}
// TODO (SB: Check documentation: The method raises an exception, but it does not necessarily
// show an error message)
/**
* Shows a conversion error message to a user indicating which transformation failed and why.
*
......
......@@ -85,6 +85,8 @@ public class ExplorationUtils {
return resultMap;
}
// TODO (SB: everywhere else, the 2nd parameter is called searchFunction, here it is a
// aggregateFunction). Intentional?
/**
* Collects all elements in a recursive walk from the current {@link ProcessStep} to the root of
* the tree that match the given search function. Elements are collected by the search function
......@@ -131,6 +133,8 @@ public class ExplorationUtils {
@SuppressWarnings("unchecked")
@Override
public void accept(ProcessStep processStep, EList<T> collectedElements) {
// TODO (SB)
// ProjectPackage.Literals.ARTIFACT_SNAPSHOT_COLLECTION__CONTAINED_MODEL_SNAPSHOTS
EReference modelSnapFeature = ProjectPackage.eINSTANCE
.getArtifactSnapshotCollection_ContainedModelSnapshots();
for(ModelSnapshot thisSnapshot : (Collection<ModelSnapshot>)processStep
......@@ -143,6 +147,7 @@ public class ExplorationUtils {
return collectedElements;
}
// TODO (SB: check documentation of return type)
/**
* Collects all {@link SolutionSelectionStep} in a recursive walk from the current
* {@link ProcessStep} to the root of the tree.
......
ComponentToPartitionArchitectureTransformation.java f27c895bd14377cec457bf33c4bfa7de88c73d72 GREEN
PartitionModelElementFactory.java 4f2361884978a39f8fee855f79afdb4cf161f2bc YELLOW
PartitionModelElementFactory.java ff80fd260146ca827871fe45ab16f8917a260bb1 RED
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