Skip to content
Snippets Groups Projects
Commit 4704a424 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Exploration.alg: AF3-Adapter cleanup.

* Isolate the property readout (from annotations) in single adapters.
* Reintegrate the ReplicationBound annotation.
* Add an additional parameter to the SystemModelAdapter.
refs 3262
parent e69ff571
No related branches found
No related tags found
No related merge requests found
Showing
with 171 additions and 59 deletions
......@@ -50,6 +50,15 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="componentRef" upperBound="-1"
eType="ecore:EClass platform:/resource/org.fortiss.af3.component/model/component.ecore#//Component"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ReplicationBounds" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IAnnotatedSpecification platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHiddenSpecification">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="{@link IAnnotatedSpecification} specifying the minmally required and maximally allowed number of replica of the specified {@link Task}."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="minReplication" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="maxReplication" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
</eClassifiers>
</eSubpackages>
<eSubpackages name="feature" nsURI="http://www.fortiss.org/af3/exploration/moea/feature"
nsPrefix="org-fortiss-af3-exploration-moea-feature">
......
......@@ -32,6 +32,10 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true"
ecoreFeature="ecore:EReference moea.ecore#//annotation/ComponentDiverseImplRef/componentRef"/>
</genClasses>
<genClasses ecoreClass="moea.ecore#//annotation/ReplicationBounds">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute moea.ecore#//annotation/ReplicationBounds/minReplication"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute moea.ecore#//annotation/ReplicationBounds/maxReplication"/>
</genClasses>
</nestedGenPackages>
<nestedGenPackages prefix="Feature" basePackage="org.fortiss.af3.exploration.moea.model"
disposableProviderFactory="true" ecorePackage="moea.ecore#//feature">
......
......@@ -14,6 +14,12 @@
<annotation binding="org.fortiss.af3.exploration.alg.annotation.valueprovider.ComponentImplDiversityRefValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.component.model.Component"/>
</annotation>
<annotation binding="org.fortiss.af3.timing.annotation.valueprovider.MaxReplicationBoundValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.task.model.Task"/>
</annotation>
<annotation binding="org.fortiss.af3.timing.annotation.valueprovider.MinReplicationBoundValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.task.model.Task"/>
</annotation>
<annotation binding="org.fortiss.af3.timing.annotation.valueprovider.WcetValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.deployment.model.DeploymentParameterValue"/>
</annotation>
......
ComponentImplDiversityRefValueProvider.java d2cbe7d1acefd9941a766ea7cf2ac958a4347ef6 RED
MaxReplicationBoundValueProvider.java 697ecf4593ec7fd29992b25b782ddf20f191c975 RED
MinReplicationBoundValueProvider.java 3e806929a039c49b83455b637bf16c079a9e9c29 RED
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2014 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.alg.annotation.valueprovider;
import org.fortiss.af3.exploration.moea.model.annotation.AnnotationPackage;
import org.fortiss.af3.exploration.moea.model.annotation.ReplicationBounds;
import org.fortiss.af3.task.model.Task;
import org.fortiss.tooling.base.annotation.valueprovider.EStructuralFeatureValueProviderBase;
/**
* Maximum number of instances that shall be generated for this {@link Task}.
*
* @author diewald
*/
public class MaxReplicationBoundValueProvider
extends EStructuralFeatureValueProviderBase<ReplicationBounds> {
/** Constructor. */
public MaxReplicationBoundValueProvider() {
super(AnnotationPackage.Literals.REPLICATION_BOUNDS,
AnnotationPackage.Literals.REPLICATION_BOUNDS__MAX_REPLICATION);
}
/** {@inheritDoc} */
@Override
public String getAnnotationName(ReplicationBounds specification) {
return "Max Replication";
}
}
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2014 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.alg.annotation.valueprovider;
import org.fortiss.af3.exploration.moea.model.annotation.AnnotationPackage;
import org.fortiss.af3.exploration.moea.model.annotation.ReplicationBounds;
import org.fortiss.af3.task.model.Task;
import org.fortiss.tooling.base.annotation.valueprovider.EStructuralFeatureValueProviderBase;
/**
* Minimum number of instances that shall be generated for this {@link Task}.
*
* @author diewald
*/
public class MinReplicationBoundValueProvider
extends EStructuralFeatureValueProviderBase<ReplicationBounds> {
/** Constructor. */
public MinReplicationBoundValueProvider() {
super(AnnotationPackage.Literals.REPLICATION_BOUNDS,
AnnotationPackage.Literals.REPLICATION_BOUNDS__MIN_REPLICATION);
}
/** {@inheritDoc} */
@Override
public String getAnnotationName(ReplicationBounds specification) {
return "Min Replication";
}
}
Opt4JDseBackend.java 02ad3770ed32b70bd97cd6e5407c5b5988d6347c RED
Opt4JDseBackend.java 2d4b0c96fcda02bf428fb5a6c02a48bbef74374b RED
......@@ -89,7 +89,7 @@ public class Opt4JDseBackend implements IDseBackend {
Collection<IExplorationFeature> explorationModules, IProgressMonitor monitor,
int timeoutMS) throws Exception {
ExplorationSolutionSet explorationSolutionSet;
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter;
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter;
// TODO: Find a cleaner way to extract the model context.
TaskArchitecture taskArchitecture =
getArchModel(superSets, TaskArchitecture.class, Task.class);
......
CompositeExplorationSolution.java 528283a3dd57500539b2e11dd3d3eb35512de9b8 RED
DSEFactory.java d8163c2b1df1b9cc690367140096e4b29d4dd2ae RED
Explorer.java c4a8aa9673bb84df89971775c4b0ea1697e725e8 RED
ImplicitExplorationTargetFactory.java 897d89b5d5beb580da9007290acc835ff15e1e7c RED
DSEFactory.java 069d001586ce88cb320537b1411b1a3b8649003b RED
Explorer.java c857d21f603d09447953d3e4929aedb76b1b1bfd RED
ImplicitExplorationTargetFactory.java 0b10dc4e8385bbdee0217dac783203080eb723f0 RED
SolutionQuantification.java efd31f192c3adbf1a4434452a19eb836a17390e2 RED
TaskMappingFactory.java 87cfb7ec5e24acb167fa4ffd7210b093fa5b5b4d RED
TaskMappingFactory.java eb8e4a8b70f9465b849dd5700f603f55aa26363e RED
......@@ -107,7 +107,8 @@ public class DSEFactory {
@SuppressWarnings("unchecked")
public <C, S extends InstantiatedTaskMappingEntry, T extends InstantiatedTaskMappingEncoding<S>>
void createSubProblems(ArchitectureExplorationProblemModule archExpProblemModule,
DseSpecification dse, SystemModelAdapter<C, ?, ?, ?, ?, ?> systemModelAdapter,
DseSpecification dse,
SystemModelAdapter<C, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) throws Exception {
// Java-limitation: it is not possible to pass the generic to the static methods.
TaskMappingFactory<S, T> tmFactory =
......@@ -147,7 +148,7 @@ public class DSEFactory {
@SuppressWarnings("unchecked")
private <C, T extends SafetyFunctionArchEncoding<C>> void createSafetyFunctionArchProblem(
ArchitectureExplorationProblemModule archExpProblemModule,
SystemModelAdapter<C, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<C, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) throws Exception {
// These suppress warnings are required since type erasure in Java does not allow to pass
// XY<Z>.class.
......@@ -195,7 +196,7 @@ public class DSEFactory {
@SuppressWarnings("unchecked")
private void createPartitionMappingProblem(
ArchitectureExplorationProblemModule archExpProblemModule, DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) throws CycleFoundException {
Class<PartitionMappingEncoding> pmEnodingClass = PartitionMappingEncoding.class;
PartitionMappingCreator pmCreator =
......@@ -219,7 +220,7 @@ public class DSEFactory {
@SuppressWarnings("unchecked")
private void createPlatformCommunicationGraphProblem(
ArchitectureExplorationProblemModule archExpProblemModule,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) throws CycleFoundException {
Class<PlatformCommunicationGraphEncoding> pmEnodingClass =
PlatformCommunicationGraphEncoding.class;
......@@ -256,7 +257,7 @@ public class DSEFactory {
private <S extends InstantiatedTaskMappingEntry, T extends InstantiatedTaskMappingEncoding<S>>
void createAbstractTaskMappingProblem(TaskMappingFactory<S, T> tmFactory,
ArchitectureExplorationProblemModule archExpProblemModule, DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) throws Exception {
Class<AbstractTaskMappingEncoding> tmEnodingClass = AbstractTaskMappingEncoding.class;
AbstractTaskMappingCreator tmCreator =
......@@ -299,7 +300,7 @@ public class DSEFactory {
private <S extends InstantiatedTaskMappingEntry, T extends InstantiatedTaskMappingEncoding<S>>
void createTaskMappingInstantiationProblem(TaskMappingFactory<S, T> tmFactory,
ArchitectureExplorationProblemModule archExpProblemModule, DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) throws Exception {
// These suppress warnings are required since type erasure in Java does not allow to pass
// XY<Z>.class.
......@@ -329,7 +330,7 @@ public class DSEFactory {
* calls the creators of the genotypes composing the architecture exploration problem.
*/
public ArchitectureExplorationCreator createArchitectureExplorationCreator(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
return new ArchitectureExplorationCreator(dse, systemModelAdapter);
}
......@@ -366,7 +367,7 @@ public class DSEFactory {
* It delegates the subproblems to sub decoders, e.g. a decoder for the task mapping problem.
*/
public ArchitectureDecoder createArchitectureDecoder(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execdepGraph) {
return new ArchitectureDecoder(systemModelAdapter, execdepGraph);
}
......@@ -377,8 +378,8 @@ public class DSEFactory {
* It delegates the evaluation of the overall problem to sub-decoders, e.g. an evaluator of the
* power consumption of a TT-schedule.
*/
public ArchitectureEvaluator
createArchitectureEvaluator(SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
public ArchitectureEvaluator createArchitectureEvaluator(
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
return new ArchitectureEvaluator(systemModelAdapter);
}
}
......@@ -55,7 +55,7 @@ public class Explorer {
* @throws Exception
*/
public CompositeExplorationSolution<?> explore(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
Set<Class<? extends IExplorationEncoding>> requestedSolutions,
boolean generateImplicitConstraints) throws Exception {
return explore(dse, systemModelAdapter, requestedSolutions, null,
......@@ -67,7 +67,7 @@ public class Explorer {
* system model (represented by a {@link SystemModelAdapter}).
*/
public CompositeExplorationSolution<?> explore(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
Set<Class<? extends IExplorationEncoding>> requestedSolutions,
IProgressMonitor progressMonitor, boolean generateImplicitConstraints)
throws Exception {
......@@ -191,8 +191,8 @@ public class Explorer {
// TODO: Port validation of system model to model validation framework that creates markers
// in the problem view
/** Validation of system model */
private void validateSystemModelAdapter(SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter)
throws Exception {
private void validateSystemModelAdapter(
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
if(systemModelAdapter == null) {
createSystemModelAdapterConfigurationException(
......@@ -231,7 +231,7 @@ public class Explorer {
private Opt4JExplorerBackend createExplorerBackend(DseSpecification dse,
ExplorationSpecification expSpec,
Map<ExplorationTarget<?>, ExplorationTarget<?>> targetAssocMap,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
Set<Class<? extends IExplorationEncoding>> requestedSolutions,
IProgressMonitor progressMonitor) throws Exception {
if(dse.getOptimizer() instanceof EAOptimizer) {
......
......@@ -69,7 +69,7 @@ public class ImplicitExplorationTargetFactory {
* if any of the constraint generators fails.
*/
public Collection<ExplorationConstraint<?>> createImplicitExplorationTargets(
DseSpecification dse, SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter)
DseSpecification dse, SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter)
throws Exception {
Collection<ExplorationConstraint<?>> constraints = new ArrayList<>();
constraints.addAll(createPeriodConstraints(systemModelAdapter));
......@@ -93,7 +93,7 @@ public class ImplicitExplorationTargetFactory {
* if the generation of any {@link PeriodConstraint} fails.
*/
private static Collection<ExplorationConstraint<?>>
createPeriodConstraints(SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter)
createPeriodConstraints(SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter)
throws ConstraintGenerationException {
Collection<ExplorationConstraint<?>> constraints = new ArrayList<>();
for(TaskGraph tg : systemModelAdapter.getTaskGraphs()) {
......
......@@ -103,7 +103,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return instance of an {@link AbstractTaskMappingCreator}.
*/
public AbstractTaskMappingCreator createAbstractTaskMappingCreator(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) {
return new AbstractTaskMappingCreator(dse, systemModelAdapter, execDepGraph);
}
......@@ -121,7 +121,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
*/
// TODO: document execDepGraph param.
public TaskMappingCreator<S, T> createTaskMappingCreator(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DecoderDependencyGraph execDepGraph) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -140,7 +140,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
*/
// TODO: update doc
public TaskMappingCreator<S, T> createTaskMappingCreator(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
AbstractTaskMappingEncoding abstractEnc) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -156,7 +156,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
*/
public MutateAllocation<? extends TaskMappingEntry<?, ?>, ? extends TaskMappingEncoding<?, ?>>
createMutateAllocationOperator(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -168,7 +168,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return Mutation operator that decreases the redundant instances of tasks.
*/
public MutateRedundancyDecrement<?, ?> createMutateRedundancyDecrementOperator(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -180,7 +180,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return Mutation operator that increases the redundant instances of tasks.
*/
public MutateRedundancyIncrement<?, ?> createMutateRedundancyIncrementOperator(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -195,7 +195,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* another.
*/
public CrossoverRandManyAllocation<?, ?> createCrossoverRandManyAllocationOperator(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter, double rate) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter, double rate) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -209,7 +209,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return Crossover operator that swaps a single allocation from one resource with another.
*/
public CrossoverSingleAllocation<?, ?> createCrossoverSingleAllocationOperator(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter, double rate) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter, double rate) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -228,7 +228,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return instance of an {@link AbstractTaskMappingDecoder}.
*/
public AbstractTaskMappingDecoder<?, ?> createAbstractTaskMappingDecoder(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DseSpecification explorationDefinition) {
throw new UnsupportedOperationException(
"The Decoder to instantiate an \"abstract\" Task Mapping has not been defined for current Execution Model.");
......@@ -245,7 +245,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
@SuppressWarnings({"rawtypes", "unchecked"})
public InstantiatedTaskMappingDecoder<S, InstantiatedTaskGraphEncoding>
createInstantiatedTaskMappingDecoder(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
return new InstantiatedTaskMappingDecoder(systemModelAdapter);
}
......@@ -257,7 +257,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return An instance on an {@link InstantiatedTaskMappingDecoderAcyclic}.
*/
public InstantiatedTaskMappingDecoderAcyclic<S, ?> createAbstractToAcyclicTaskGraphDecoder(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
throw new UnsupportedOperationException(
"The Decoder to instantiate an \"abstract\" and acyclic Task Graph has not been defined for current Execution Model.");
}
......@@ -270,7 +270,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return An instance of a {@link MessageDecoder}.
*/
public MessageDecoder<S, T>
createMessageDecoder(SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
createMessageDecoder(SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
throw new UnsupportedOperationException(
"The Decoder which generates messages from task mappings has not been defined for current Execution Model.");
}
......@@ -287,7 +287,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return instance of a {@link StrictTTDecoder}
*/
public StrictTTDecoder<S, T> createStrictTTDecoder(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
DseSpecification explorationDefinition) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -298,7 +298,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* instantiations of an {@link ITaskAdapter} for a given platform.
*/
public IMessageRouter
createShortestPathRouter(SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
createShortestPathRouter(SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
return new ShortestPathRouter(systemModelAdapter);
}
......@@ -313,7 +313,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
* @return instance of the EDF schedule decoder.
*/
public EDFSchedulerBase<?, ?> createEDFScheduler(
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
ExplorationSpecification expSpec) {
throw new UnsupportedOperationException(SCHED_NOT_IMPL_MSG);
}
......@@ -328,7 +328,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
@SuppressWarnings("unchecked")
public <RT, ET extends ExplorationTarget<RT>> EvaluatorWrapper<?, RT, ET>
createEvaluatorWrapper(ExplorationTarget<?> goal, int priority,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
ExplorationEvaluationService<?> evalService = ExplorationEvaluationService.getInstance();
EvaluatorWrapper<?, RT, ET> evaluatorWrapper = (EvaluatorWrapper<?, RT, ET>)evalService
.createEvalWrapperFor(systemModelAdapter, goal);
......@@ -389,7 +389,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
protected <RT, ET extends ExplorationTarget<RT>>
EvaluatorWrapper<?, Double, FailureMinObjective>
createFailureMinObjectiveWrapper(ExplorationTarget<?> optGoal, int priority,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
throw new UnsupportedOperationException(GOAL_NOT_IMPL_MSG);
}
......@@ -409,7 +409,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
*/
protected <RT, ET extends ExplorationTarget<RT>> EvaluatorWrapper<?, Double, DeadlineConstraint>
createDeadlineConstraintWrapper(ExplorationTarget<?> optGoal, int priority,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
throw new UnsupportedOperationException(GOAL_NOT_IMPL_MSG);
}
......@@ -429,7 +429,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
*/
protected <RT, ET extends ExplorationTarget<RT>> EvaluatorWrapper<?, Double, PeriodConstraint>
createPeriodConstraintWrapper(ExplorationTarget<?> optGoal, int priority,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
throw new UnsupportedOperationException(GOAL_NOT_IMPL_MSG);
}
......@@ -450,7 +450,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
protected <RT, ET extends ExplorationTarget<RT>>
EvaluatorWrapper<?, Boolean, ComponentMultiAllocationConstraint>
createComponentMultiAllocationConstraintWrapper(ExplorationTarget<?> optGoal,
int priority, SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter)
int priority, SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter)
throws Exception {
throw new UnsupportedOperationException(GOAL_NOT_IMPL_MSG);
}
......@@ -472,7 +472,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
protected <RT, ET extends ExplorationTarget<RT>>
EvaluatorWrapper<?, Boolean, ComponentMultiDislocationConstraint>
createComponentMultiDislocationConstraintWrapper(ExplorationTarget<?> optGoal,
int priority, SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter)
int priority, SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter)
throws Exception {
throw new UnsupportedOperationException(GOAL_NOT_IMPL_MSG);
}
......@@ -494,7 +494,7 @@ public abstract class TaskMappingFactory<S extends InstantiatedTaskMappingEntry,
protected <RT, ET extends ExplorationTarget<RT>>
EvaluatorWrapper<?, SIL, SafetyIntegrityLevelConstraint>
createSafetyIntegrityLevelConstraintWrapper(ExplorationTarget<?> optGoal, int priority,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) throws Exception {
throw new UnsupportedOperationException(GOAL_NOT_IMPL_MSG);
}
}
ExplorerBackendBase.java 2e86b95490d6b278ad1c4e9a777b04a5a0552b5d RED
ExplorerBackendBase.java ed85fa4a1638a3e50df5dc2f9d8bfc09f158452c RED
IExplorerBackend.java 92b54d5179ebb9fe969664a215e1fb701ed98d15 RED
SolutionCandidateBase.java d4b54cf5ec00fc62028d75c44068c99261af3a3c RED
......@@ -60,7 +60,7 @@ public abstract class ExplorerBackendBase<O extends IOptimizer> implements IExpl
protected Map<ExplorationTarget<?>, ExplorationTarget<?>> targetAssocMap;
/** Representation of system model (=input) that is evaluated during this DSE run */
protected SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter;
protected SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter;
/** Set of requested {@link ComposablePhenotype}s that form the solution set. */
protected Set<Class<? extends IExplorationEncoding>> requestedSolutions;
......@@ -83,7 +83,7 @@ public abstract class ExplorerBackendBase<O extends IOptimizer> implements IExpl
*/
protected ExplorerBackendBase(DseSpecification dse, ExplorationSpecification expSpec,
Map<ExplorationTarget<?>, ExplorationTarget<?>> targetAssocMap,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
Set<Class<? extends IExplorationEncoding>> requestedSolutions,
IProgressMonitor progressMonitor) {
this.dse = dse;
......@@ -97,8 +97,8 @@ public abstract class ExplorerBackendBase<O extends IOptimizer> implements IExpl
// instantiation of the Evaluators by the goals. Those are generified, and hence, the
// instance must exist already.
try {
DSEFactory.getInstance().createTaskMappingFactory(
dse.getParameters().getExecutionModel());
DSEFactory.getInstance()
.createTaskMappingFactory(dse.getParameters().getExecutionModel());
} catch(UnsupportedDataTypeException e) {
// See todo above
e.printStackTrace();
......@@ -168,8 +168,10 @@ public abstract class ExplorerBackendBase<O extends IOptimizer> implements IExpl
Collection<EvaluatorWrapper<?, ?, ?>> evalWrappers) {
EvaluatorWrapper<?, ?, ?> evalWrapper = getEvaluatorOf(target, evalWrappers);
assert (evalWrapper.getEvaluator() instanceof IConstraintEvaluator) : "The evaluator for the exploration constraint " +
target.getName() + " has an evaluator which is not an IConstraintEvaluator.";
assert (evalWrapper
.getEvaluator() instanceof IConstraintEvaluator) : "The evaluator for the exploration constraint " +
target.getName() +
" has an evaluator which is not an IConstraintEvaluator.";
@SuppressWarnings("unchecked") Class<M> phenoClass =
(Class<M>)evalWrapper.getTargetPhenotypeType();
......
Opt4JExplorationSolutionSet.java fd1ca946198990604ea7a521e9d0335bef4ad8e1 RED
Opt4JExplorerBackend.java 1cbe89233576aa55d6705b92fc31934a5f4eb584 RED
Opt4JExplorerBackend.java 387e63ad7ae0f98836c2f6cfa5a89f63966619c0 RED
Opt4JSingleExplorationSolution.java 5b9e6ccdb887605faaa4d2a8b17b8fa1350fbafd RED
......@@ -100,7 +100,7 @@ public class Opt4JExplorerBackend extends ExplorerBackendBase<EAOptimizer> {
*/
public Opt4JExplorerBackend(DseSpecification dse, ExplorationSpecification expSpec,
Map<ExplorationTarget<?>, ExplorationTarget<?>> targetAssocMap,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter,
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter,
Set<Class<? extends IExplorationEncoding>> requestedSolutions,
IProgressMonitor progressMonitor) throws Exception {
// Optimizer independent configuration
......
ArchitectureExplorationCreator.java b549845e58fe36bc77e08e7585343d079b802b24 RED
ArchitectureExplorationCreator.java 5bbd448f433da0e455e026f9452b7bccf67e4905 RED
......@@ -31,8 +31,8 @@ import com.google.inject.Inject;
*
* @author diewald
*/
public class ArchitectureExplorationCreator extends
CompositeCreatorBase<ArchitectureExplorationEncoding> {
public class ArchitectureExplorationCreator
extends CompositeCreatorBase<ArchitectureExplorationEncoding> {
/** DSE specification */
protected DseSpecification dse;
......@@ -40,7 +40,7 @@ public class ArchitectureExplorationCreator extends
/** Constructor. */
@Inject
public ArchitectureExplorationCreator(DseSpecification dse,
SystemModelAdapter<?, ?, ?, ?, ?, ?> systemModelAdapter) {
SystemModelAdapter<?, ?, ?, ?, ?, ?, ?> systemModelAdapter) {
super(systemModelAdapter);
this.dse = dse;
}
......
PartitionMappingCreator.java dd76847eaeb119609c58ea7412cd9ae4330d7a7e RED
PartitionMappingCreator.java c5536fccefbe437360efe9fe8a60409991192243 RED
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment