From 91f42cb2bc70e10c4ef807102f12115a024574ff Mon Sep 17 00:00:00 2001 From: Alexander Diewald <diewald@fortiss.org> Date: Wed, 21 Feb 2018 17:21:09 +0000 Subject: [PATCH] Exploration: DSE project MM improvements & DSE Backend Unification ================= | Exploration exploration.ecore ================= - ExplorationSpecification - targets: non-contained (Migrator!) - Add superSet reference to pass required SuperSets to the DSE backend. - Remove ExplorationSolution interface: No Migration needed. - Rename ExplorationSolutionSet --> ExplorationSolution - Deprecated inputModelAdapter: No migration needed, only used in MOEA. - Renaming: targetSpecification --> explorationSpec - targetSpecification marked @deprecated - No mirgator needed: Class was not used in previous stable releases. - Add EClass SuperSetMap: Relates types of elements to SuperSets - solution: EJavaClassToSuperSetMap (containment!) - Add EClass EJavaClassToSuperSetMap: internal map of "SuperSetMap" - key: Class - Value: SuperSet (NO containment!) - ExplorationSolution - Renamed solutionModelMap -> solutionSets (Type EJavaClassToEJavaObjectMap -> EJavaClassToSuperSetMap) - Adjust EOperations to modifications in backend map. - SingleExplorationSolution - Add the solution state for single solutions. - Adjust EOperations to modifications in backend map. - Removed EJavaClassToEJavaObjectMap dseproject.ecore ================ - DSE: - Add EReference target: ExplorationTarget (containment) - Remove explorationSpecification (Migrator!) - Add an ExplorationTargetPool that contains all ExplorationTargets of a DSE project. - DSERun: - Add EReference explorationSolution (containment) - Remove EReference visualization (Migrator!) dsl_v2.ecore ============ - Overwrite the accept method for the Sum expression: Do not return null if the associated set is empty, evaluate to Zero, instead. New Migrators ============= - DSEExplorationTargetContainmentMigrator Migrates the set of explorationTargets to the DSE project - VisualizationToExpSolutionMigrator: Migrates the Visualization data to the ExplorationSolution representation that allows a better traceability. Other Business ============== - Adjust plugin.xml to account for recently removed Objective- and ConstraintExpression classes. Now, ExplorationObjective and ExplorationConstraint is used. ================= | Exploration.alg - Adjust the Opt4JBackend to be comply to the new DSE Backend Specification - The output type detection in the base decoder is more robust. - The ITaskAdapter temporally references its corresponding component to ease the refactoring of the DSE backend interface. This shall not be needed when the transformation framework is integrated again. - Temporally transform the internal solutions to a superset of ComponentToExecutionUnitAllocations to create s solution model. Workaround until the transformation framework is integrated again. - Misc adjustment for backend changes. ================= | Exploration.smt - Adjust the Z3Backend to be comply to the new DSE Backend Specification - Base the results of the DeploymentRun2 and SolverRun2 on the ExplorationSolution (see above). ================ | Exploration.ui - Adjust the GUI logic to account for the changed containment relations. - Update the DSE project import wizard for the Meta-Model changes. - Move the ExplorationSolutionVisualizationUtils class to the UI plugin (here). It is used to transform ExplorationSolutions to a Visualization representation (i.e., DataSetCollection). - Use doubles instead of ints in the SpiderChartUtils. Although not a proper solution, this covers more cases... Instead the generic should be reflected. refs 3273 --- .../src/org/fortiss/tooling/base/utils/.ratings | 2 +- .../utils/VisualizationModelElementFactory.java | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/.ratings b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/.ratings index ad0efaa31..ba386c92d 100644 --- a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/.ratings +++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/.ratings @@ -14,5 +14,5 @@ PointsUtils.java 5c134ea1a85d290b81634567def23b2f44e0f2ba GREEN RectangleLayoutUtils.java 30cb9efa4872d9c5c60b4ad948685c912c5328cb GREEN SnapToGridUtils.java 3229ea4857a09a4feec7c339fd8ed3bc440207bf GREEN SystemUtils.java 95107a0f1b761d86b5b69513be23388a36ba232e GREEN -VisualizationModelElementFactory.java abaf22f9ac61b5450babc284da2e85fec5e2ddb5 GREEN +VisualizationModelElementFactory.java 00f2eec586f978bdaaddfa03dd4261bbaef5beed YELLOW ZoomUtils.java 38e199b6c11a330d749dfd4d5aaa53f0f42ecb63 GREEN diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/VisualizationModelElementFactory.java b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/VisualizationModelElementFactory.java index 79ee7b99d..18e67450e 100644 --- a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/VisualizationModelElementFactory.java +++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/utils/VisualizationModelElementFactory.java @@ -57,12 +57,19 @@ public class VisualizationModelElementFactory { } /** Creates a visualization {@link DataSet}. */ - public static DataSet createDataSet(List<DataPoint<?>> dataPoints) { - DataSet dataSet = VisualizationFactory.eINSTANCE.createDataSet(); + public static DataSet createDataSet(List<DataPoint<?>> dataPoints, String name) { + DataSet dataSet = createDataSet(name); dataSet.getPoints().addAll(dataPoints); return dataSet; } + /** Creates an empty visualization {@link DataSet}. */ + public static DataSet createDataSet(String name) { + DataSet dataSet = VisualizationFactory.eINSTANCE.createDataSet(); + dataSet.setName(name); + return dataSet; + } + /** Creates a visualization {@link DataSetCollection}. */ @SuppressWarnings("unchecked") public static DataSetCollection createDataSetCollection(List<DataSet> dataSets, @@ -79,9 +86,4 @@ public class VisualizationModelElementFactory { public static DataSetCollection createDataSetCollection() { return VisualizationFactory.eINSTANCE.createDataSetCollection(); } - - /** Creates an empty visualization {@link DataSet}. */ - public static DataSet createDataSet() { - return VisualizationFactory.eINSTANCE.createDataSet(); - } } -- GitLab