Commit 6f7d22eb authored by Simon Barner's avatar Simon Barner
Browse files

Make interface of allocation service more compact

* Introduce addAllocationTableType() to group setSourceModelType() and
  setTargetModelType(). There is an additional override of the method
  set allows to specify if an allocation table type is "internal"
  (e.g., not shown in the model navigator)
* addAllocationEntryType(): Add parameters to directly set target
  and source model entity.
  * Keep addSourceEntityType() and
    addTargetEntityType() in order to enable registration of additional
    entity types.
  * There is an additional override that allows to directly set the
    parent entry type (in favor of addParentAllocationEntryType()).

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

Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent 6989a554
AF3AllocationActivator.java fa98bbdbd34d9d3c76f7f2827f2f456105c90fa6 GREEN
IAllocationService.java 09de51c417e5cb184ab1092274204878967786ac GREEN
IAllocationService.java 9f099734eb339a3fadd601e65ec5821b6e5afb31 YELLOW
......@@ -42,13 +42,46 @@ public interface IAllocationService {
/** Initializes the service. */
public void initializeService();
/**
* Registers the given public (non-internal; see
* {@link #addAllocationTableType(Class, Class, Class, boolean)} ){@link AllocationTable}
* specialization based on the given source and target model type.
*/
public void addAllocationTableType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType,
Class<? extends IProjectRootElement> targetModelType);
/**
* Registers the given {@link AllocationTable} specialization based on the given source and
* target model type.
*/
public void addAllocationTableType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType,
Class<? extends IProjectRootElement> targetModelType, boolean isInternal);
/**
* Registers an {@link AllocationEntry} specialization with a given {@link AllocationTable}
* specialization.
* specialization and registers one source and and target entity type. Further source (target)
* entity types may be added using {@link #addSourceEntityType(Class, Class)}
* ({@link #addTargetEntityType(Class, Class)}).
*/
public <T extends AllocationTable & IAllocationType, E extends AllocationEntry & IAllocationType>
void addAllocationEntryType(Class<? extends T> allocationTableType,
Class<? extends E> allocationEntryType,
Class<? extends IModelElement> sourceEntityType,
Class<? extends IModelElement> targetEntityType);
/**
* Like {@link #addAllocationEntryType(Class, Class, Class, Class)}, but also allows to add a
* {@code parentAllocationEntryType} for the given {@code allocationEntryType} (see
* {@link #getParentEntryType(Class)}).
*/
public <T extends AllocationTable & IAllocationType, E extends AllocationEntry & IAllocationType>
void addAllocationEntryType(Class<? extends T> allocationTableType,
Class<? extends E> allocationEntryType);
Class<? extends E> allocationEntryType,
Class<? extends IModelElement> sourceEntityType,
Class<? extends IModelElement> targetEntityType,
Class<? extends E> parentAllocationEntryType);
/**
* Returns the {@link AllocationEntry} types of the given {@code allocationType} that are
......@@ -67,13 +100,15 @@ public interface IAllocationService {
@SuppressWarnings("unchecked") Class<? extends A>... allocationTypes);
/**
* Registers a source model entity type with the given {@link AllocationEntry} specialization.
* Registers an additional source model entity type with the given {@link AllocationEntry}
* specialization (see {@link #addAllocationEntryType(Class, Class, Class, Class, Class)}).
*/
public void addSourceEntityType(Class<? extends AllocationEntry> allocationEntryType,
Class<? extends IModelElement> sourceEntityType);
/**
* Registers a target model entity type with the given {@link AllocationEntry} specialization.
* Registers an additional target model entity type with the given {@link AllocationEntry}
* specialization (see {@link #addAllocationEntryType(Class, Class, Class, Class, Class)})).
*/
public void addTargetEntityType(Class<? extends AllocationEntry> allocationEntryType,
Class<? extends IModelElement> targetEntityType);
......@@ -92,14 +127,6 @@ public interface IAllocationService {
Collection<Class<? extends IModelElement>>
getTargetEntityTypes(Class<? extends AllocationEntry> allocationEntryType);
/** Registers the source model type with the given {@link AllocationTable} specialization. */
public void setSourceModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType);
/** Registers the target model type with the given {@link AllocationTable} specialization. */
public void setTargetModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> targetModelType);
/**
* Returns the source model type that has been registered with the given {@link AllocationTable}
* specialization ({@code null} if none has been registered yet).
......@@ -115,14 +142,14 @@ public interface IAllocationService {
getTargetModelType(Class<? extends AllocationTable> allocationTableType);
/**
* Registers a target model type that is covered by the given {@link AllocationTable}
* specialization (in addition to its source/target model type.
* Registers a model type that is covered by the given {@link AllocationTable}
* specialization (in addition to its source/target model type).
*/
public void addCoveredModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> targetModelType);
/**
* Returns the target model types that are covered by the given {@link AllocationTable}
* Returns the model types that are covered by the given {@link AllocationTable}
* specialization (in addition to its source/target model type).
*/
public Collection<Class<? extends IProjectRootElement>>
......@@ -142,22 +169,12 @@ public interface IAllocationService {
public Collection<Class<? extends AllocationTable>>
getAdmissibleAllocationTables(Class<? extends AllocationTable> allocationTableType);
/** Method to mark an {@link AllocationTable} type as internal (e.g., to hide it some views). */
public void setInternalAllocationTable(Class<? extends AllocationTable> allocationTableType);
/**
* Predicate if a given {@link AllocationTable} type is internal (and therefore e.g. not visible
* in some views).
*/
public boolean isAllocationTableInternal(Class<? extends AllocationTable> allocationTableType);
/**
* Registers a {@code parentEntryType} with the given {@code childEntryType} (see
* {@link #getParentEntryType(Class)}).
*/
public void addParentAllocationEntryType(Class<? extends AllocationEntry> childEntryType,
Class<? extends AllocationEntry> parentEntryType);
/**
* For the given {@code childEntryType}, returns the "parent" {@link AllocationEntry}, i.e. the
* allocation mapping the of the entities that own the entries whose allocation is described by
......
AllocationService.java b196524b59b1baa064aeb7b76480be2b96b7477c GREEN
AllocationService.java 61c2e101e27142cfad8d710b87cf41de7fd6bfa9 YELLOW
......@@ -179,19 +179,80 @@ public final class AllocationService implements IAllocationService, IIntrospecti
// nothing to do here
}
/** {@inheritDoc} */
@Override
public void addAllocationTableType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType,
Class<? extends IProjectRootElement> targetModelType) {
addAllocationTableType(allocationTableType, sourceModelType, targetModelType, false);
}
/** {@inheritDoc} */
@Override
public void addAllocationTableType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType,
Class<? extends IProjectRootElement> targetModelType, boolean isInternal) {
setSourceModelType(allocationTableType, sourceModelType);
setTargetModelType(allocationTableType, targetModelType);
if(isInternal) {
internalAllocationTableTypeMap.put(allocationTableType, null);
}
}
/** Registers the source model type with the given {@link AllocationTable} specialization. */
private void setSourceModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType) {
if(getSourceModelType(allocationTableType) != null) {
throw new RuntimeException("Duplicated source model type registration for " +
allocationTableType.getName() + ".");
}
sourceModelTypeMap.put(allocationTableType, sourceModelType);
}
/** Registers the target model type with the given {@link AllocationTable} specialization. */
private void setTargetModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> targetModelType) {
if(getTargetModelType(allocationTableType) != null) {
throw new RuntimeException("Duplicated target model type registration for " +
allocationTableType.getName() + ".");
}
targetModelTypeMap.put(allocationTableType, targetModelType);
}
/** {@inheritDoc} */
@Override
public <T extends AllocationTable & IAllocationType, E extends AllocationEntry & IAllocationType>
void addAllocationEntryType(Class<? extends T> allocationTableType,
Class<? extends E> allocationEntryType) {
Class<? extends E> allocationEntryType,
Class<? extends IModelElement> sourceEntityType,
Class<? extends IModelElement> targetEntityType) {
TypeSet<AllocationEntry> allocationEntryTypes =
allocationTableEntryTypeMap.get(allocationTableType);
if(allocationEntryTypes == null) {
allocationEntryTypes = new TypeSet<AllocationEntry>();
allocationTableEntryTypeMap.put(allocationTableType, allocationEntryTypes);
}
allocationEntryTypes.add(allocationEntryType);
addSourceEntityType(allocationEntryType, sourceEntityType);
addTargetEntityType(allocationEntryType, targetEntityType);
}
/** {@inheritDoc} */
@Override
public <T extends AllocationTable & IAllocationType, E extends AllocationEntry & IAllocationType>
void addAllocationEntryType(Class<? extends T> allocationTableType,
Class<? extends E> allocationEntryType,
Class<? extends IModelElement> sourceEntityType,
Class<? extends IModelElement> targetEntityType,
Class<? extends E> parentAllocationEntryType) {
addAllocationEntryType(allocationTableType, allocationEntryType, sourceEntityType,
targetEntityType);
addParentAllocationEntryType(allocationEntryType, parentAllocationEntryType);
}
/** {@inheritDoc} */
......@@ -256,30 +317,6 @@ public final class AllocationService implements IAllocationService, IIntrospecti
return rval != null ? rval : emptyList();
}
/** {@inheritDoc} */
@Override
public void setSourceModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> sourceModelType) {
if(getSourceModelType(allocationTableType) != null) {
throw new RuntimeException("Duplicated source model type registration for " +
allocationTableType.getName() + ".");
}
sourceModelTypeMap.put(allocationTableType, sourceModelType);
}
/** {@inheritDoc} */
@Override
public void setTargetModelType(Class<? extends AllocationTable> allocationTableType,
Class<? extends IProjectRootElement> targetModelType) {
if(getTargetModelType(allocationTableType) != null) {
throw new RuntimeException("Duplicated target model type registration for " +
allocationTableType.getName() + ".");
}
targetModelTypeMap.put(allocationTableType, targetModelType);
}
/** {@inheritDoc} */
@Override
public Class<? extends IProjectRootElement>
......@@ -390,21 +427,17 @@ public final class AllocationService implements IAllocationService, IIntrospecti
return emptyList();
}
/** {@inheritDoc} */
@Override
public void setInternalAllocationTable(Class<? extends AllocationTable> allocationTableType) {
internalAllocationTableTypeMap.put(allocationTableType, null);
}
/** {@inheritDoc} */
@Override
public boolean isAllocationTableInternal(Class<? extends AllocationTable> allocationTableType) {
return internalAllocationTableTypeMap.containsKey(allocationTableType);
}
/** {@inheritDoc} */
@Override
public void addParentAllocationEntryType(Class<? extends AllocationEntry> childEntryType,
/**
* Registers the given {@code parentEntryType} with the given {@code childEntryType} (see
* {@link #getParentEntryType(Class)}).
*/
private void addParentAllocationEntryType(Class<? extends AllocationEntry> childEntryType,
Class<? extends AllocationEntry> parentEntryType) {
TypeSet<AllocationEntry> childEntryTypes = parentChildEntryTypeMap.get(parentEntryType);
......
AF3PartitionActivator.java cfea5c321536eb8895b3da894e364ad8d028cb26 GREEN
AF3PartitionActivator.java d1cef11138826db4cfc77fc944e75fa97870e439 YELLOW
......@@ -79,79 +79,43 @@ public class AF3PartitionActivator extends Plugin {
// TODO(#3556): Add more structure to allocation service registrations.
final IAllocationService as = IAllocationService.getInstance();
as.addAllocationTableType(ComponentToPartitionAllocationTable.class,
ComponentArchitecture.class, PartitionArchitecture.class);
as.addAllocationEntryType(ComponentToPartitionAllocationTable.class,
ComponentToPartitionAllocationEntry.class);
ComponentToPartitionAllocationEntry.class, Component.class, Partition.class);
as.addAllocationEntryType(ComponentToPartitionAllocationTable.class,
InputPortToPartitionInputPortAllocationEntry.class);
InputPortToPartitionInputPortAllocationEntry.class, InputPort.class,
PartitionInputPort.class, ComponentToPartitionAllocationEntry.class);
as.addAllocationEntryType(ComponentToPartitionAllocationTable.class,
OutputPortToPartitionOutputPortAllocationEntry.class);
as.setSourceModelType(ComponentToPartitionAllocationTable.class,
ComponentArchitecture.class);
as.setTargetModelType(ComponentToPartitionAllocationTable.class,
PartitionArchitecture.class);
OutputPortToPartitionOutputPortAllocationEntry.class, OutputPort.class,
PartitionOutputPort.class, ComponentToPartitionAllocationEntry.class);
as.addCoveredModelType(ComponentToPartitionAllocationTable.class, TaskArchitecture.class);
as.addSourceEntityType(ComponentToPartitionAllocationEntry.class, Component.class);
as.addTargetEntityType(ComponentToPartitionAllocationEntry.class, Partition.class);
as.addSourceEntityType(InputPortToPartitionInputPortAllocationEntry.class, InputPort.class);
as.addTargetEntityType(InputPortToPartitionInputPortAllocationEntry.class,
PartitionInputPort.class);
as.addSourceEntityType(OutputPortToPartitionOutputPortAllocationEntry.class,
OutputPort.class);
as.addTargetEntityType(OutputPortToPartitionOutputPortAllocationEntry.class,
PartitionOutputPort.class);
as.addParentAllocationEntryType(InputPortToPartitionInputPortAllocationEntry.class,
ComponentToPartitionAllocationEntry.class);
as.addParentAllocationEntryType(OutputPortToPartitionOutputPortAllocationEntry.class,
ComponentToPartitionAllocationEntry.class);
as.addAllocationTableType(TaskToPartitionAllocationTable.class, TaskArchitecture.class,
PartitionArchitecture.class);
as.addAllocationEntryType(TaskToPartitionAllocationTable.class,
TaskToPartitionAllocationEntry.class);
as.setSourceModelType(TaskToPartitionAllocationTable.class, TaskArchitecture.class);
as.setTargetModelType(TaskToPartitionAllocationTable.class, PartitionArchitecture.class);
as.addSourceEntityType(TaskToPartitionAllocationEntry.class, Task.class);
as.addTargetEntityType(TaskToPartitionAllocationEntry.class, Partition.class);
TaskToPartitionAllocationEntry.class, Task.class, Partition.class);
as.addAllocationEntryType(TaskToPartitionAllocationTable.class,
TaskInputPortToPartitionInputPortAllocationEntry.class);
as.addSourceEntityType(TaskInputPortToPartitionInputPortAllocationEntry.class,
TaskInputPort.class);
as.addTargetEntityType(TaskInputPortToPartitionInputPortAllocationEntry.class,
PartitionInputPort.class);
TaskInputPortToPartitionInputPortAllocationEntry.class, TaskInputPort.class,
PartitionInputPort.class, TaskToPartitionAllocationEntry.class);
as.addAllocationEntryType(TaskToPartitionAllocationTable.class,
TaskOutputPortToPartitionOutputPortAllocationEntry.class);
as.addSourceEntityType(TaskOutputPortToPartitionOutputPortAllocationEntry.class,
TaskOutputPort.class);
as.addTargetEntityType(TaskOutputPortToPartitionOutputPortAllocationEntry.class,
PartitionOutputPort.class);
as.addParentAllocationEntryType(TaskInputPortToPartitionInputPortAllocationEntry.class,
TaskToPartitionAllocationEntry.class);
as.addParentAllocationEntryType(TaskOutputPortToPartitionOutputPortAllocationEntry.class,
TaskToPartitionAllocationEntry.class);
TaskOutputPortToPartitionOutputPortAllocationEntry.class, TaskOutputPort.class,
PartitionInputPort.class, TaskToPartitionAllocationEntry.class);
as.addAllocationTableType(PartitionToExecutionUnitAllocationTable.class,
PartitionArchitecture.class, PlatformArchitecture.class);
as.addAllocationEntryType(PartitionToExecutionUnitAllocationTable.class,
PartitionToExecutionUnitAllocationEntry.class);
as.setSourceModelType(PartitionToExecutionUnitAllocationTable.class,
PartitionArchitecture.class);
as.setTargetModelType(PartitionToExecutionUnitAllocationTable.class,
PlatformArchitecture.class);
as.addSourceEntityType(PartitionToExecutionUnitAllocationEntry.class, Partition.class);
as.addTargetEntityType(PartitionToExecutionUnitAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class, Partition.class,
GenericExecutionUnit.class);
as.addSourceEntityType(PartitionInputPortToReceiverAllocationEntry.class,
PartitionInputPort.class);
as.addTargetEntityType(PartitionInputPortToReceiverAllocationEntry.class, Receiver.class);
as.addSourceEntityType(PartitionOutputPortToTransmitterAllocationEntry.class,
PartitionOutputPort.class);
as.addTargetEntityType(PartitionOutputPortToTransmitterAllocationEntry.class,
Transmitter.class);
as.addSourceEntityType(PartitionPortToTransceiverAllocationEntry.class,
PartitionPort.class);
as.addTargetEntityType(PartitionPortToTransceiverAllocationEntry.class, Transceiver.class);
as.addParentAllocationEntryType(PartitionInputPortToReceiverAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(PartitionOutputPortToTransmitterAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(PartitionPortToTransceiverAllocationEntry.class,
PartitionToExecutionUnitAllocationEntry.class);
as.addAllocationEntryType(PartitionToExecutionUnitAllocationTable.class,
PartitionInputPortToReceiverAllocationEntry.class, PartitionInputPort.class,
Receiver.class, PartitionToExecutionUnitAllocationEntry.class);
as.addAllocationEntryType(PartitionToExecutionUnitAllocationTable.class,
PartitionOutputPortToTransmitterAllocationEntry.class, PartitionOutputPort.class,
Transmitter.class, PartitionToExecutionUnitAllocationEntry.class);
as.addAllocationEntryType(PartitionToExecutionUnitAllocationTable.class,
PartitionPortToTransceiverAllocationEntry.class, PartitionPort.class,
Transceiver.class, PartitionToExecutionUnitAllocationEntry.class);
as.addCoveredModelType(ComponentToExecutionUnitAllocationTable.class,
PartitionArchitecture.class);
......
AF3PlatformBeagleActivator.java 7eb7ac780511746a24a522cf73971c32d32aeda0 GREEN
AF3PlatformBeagleActivator.java b682778277d209241776712b7e2cc00160066ebd YELLOW
......@@ -32,6 +32,7 @@ public class AF3PlatformBeagleActivator extends Plugin {
super.start(context);
plugin = this;
// Contribute additional admissible target entities
final IAllocationService as = IAllocationService.getInstance();
as.addTargetEntityType(ComponentToExecutionUnitAllocationEntry.class,
BeagleBoneExecutionUnit.class);
......
HierarchicPlatformActivator.java 55a0fdfcd36a15304679d2b87fc94ecb327e2ee2 GREEN
HierarchicPlatformActivator.java c32033034ac87f3a44d5e27da82ce06c8c210b56 YELLOW
......@@ -41,6 +41,7 @@ public class HierarchicPlatformActivator extends Plugin {
super.start(context);
plugin = this;
// Contribute additional admissible target entities
final IAllocationService as = IAllocationService.getInstance();
as.addTargetEntityType(PartitionToExecutionUnitAllocationEntry.class, Core.class);
as.addTargetEntityType(TaskToExecutionUnitAllocationEntry.class, Core.class);
......
AF3PlatformActivator.java dfb8917bfabd989d42093c98ee98d34fa5ad8ee7 GREEN
AF3PlatformActivator.java b88bf5d20b3506f87cfbefbc18591da9ddd1829a YELLOW
......@@ -55,30 +55,23 @@ public class AF3PlatformActivator extends Plugin {
// TODO(#3556): Add more structure to allocation service registrations.
final IAllocationService as = IAllocationService.getInstance();
as.addAllocationTableType(ComponentToExecutionUnitAllocationTable.class,
ComponentArchitecture.class, PlatformArchitecture.class);
as.addAllocationEntryType(ComponentToExecutionUnitAllocationTable.class,
ComponentToExecutionUnitAllocationEntry.class, Component.class,
GenericExecutionUnit.class);
as.addAllocationEntryType(ComponentToExecutionUnitAllocationTable.class,
InputPortToReceiverAllocationEntry.class, InputPort.class, Receiver.class,
ComponentToExecutionUnitAllocationEntry.class);
as.setSourceModelType(ComponentToExecutionUnitAllocationTable.class,
ComponentArchitecture.class);
as.setTargetModelType(ComponentToExecutionUnitAllocationTable.class,
PlatformArchitecture.class);
as.addParentAllocationEntryType(InputPortToReceiverAllocationEntry.class,
ComponentToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(OutputPortToTransmitterAllocationEntry.class,
as.addAllocationEntryType(ComponentToExecutionUnitAllocationTable.class,
OutputPortToTransmitterAllocationEntry.class, OutputPort.class, Transmitter.class,
ComponentToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(PortToTransceiverAllocationEntry.class,
as.addAllocationEntryType(ComponentToExecutionUnitAllocationTable.class,
PortToTransceiverAllocationEntry.class, Port.class, Transceiver.class,
ComponentToExecutionUnitAllocationEntry.class);
// In af3.partition: as.addCoveredModelType(ComponentToExecutionUnitAllocationTable.class,
// PartitionArchitecture.class);
as.addSourceEntityType(ComponentToExecutionUnitAllocationEntry.class, Component.class);
as.addTargetEntityType(ComponentToExecutionUnitAllocationEntry.class,
GenericExecutionUnit.class);
as.addSourceEntityType(InputPortToReceiverAllocationEntry.class, InputPort.class);
as.addTargetEntityType(InputPortToReceiverAllocationEntry.class, Receiver.class);
as.addSourceEntityType(OutputPortToTransmitterAllocationEntry.class, OutputPort.class);
as.addTargetEntityType(OutputPortToTransmitterAllocationEntry.class, Transmitter.class);
as.addSourceEntityType(PortToTransceiverAllocationEntry.class, Port.class);
as.addTargetEntityType(PortToTransceiverAllocationEntry.class, Transceiver.class);
}
/** {@inheritDoc} */
......
AF3TaskActivator.java 96722887a1f8f926d9589762b8cf3b36904ac3a5 GREEN
AF3TaskActivator.java b302ef0f13f9bec0f0f4a3bf2484f1be31de7afe YELLOW
......@@ -71,59 +71,40 @@ public class AF3TaskActivator extends Plugin {
// TODO(#3556): Add more structure to allocation service registrations.
final IAllocationService as = IAllocationService.getInstance();
as.addAllocationTableType(ComponentToTaskAllocationTable.class, ComponentArchitecture.class,
TaskArchitecture.class);
as.addAllocationEntryType(ComponentToTaskAllocationTable.class,
ComponentToTaskAllocationEntry.class);
as.addAllocationEntryType(ComponentToTaskAllocationTable.class,
InputPortToTaskInputPortAllocationEntry.class);
ComponentToTaskAllocationEntry.class, Component.class, Task.class);
as.addAllocationEntryType(ComponentToTaskAllocationTable.class,
OutputPortToTaskOutputPortAllocationEntry.class);
as.setSourceModelType(ComponentToTaskAllocationTable.class, ComponentArchitecture.class);
as.setTargetModelType(ComponentToTaskAllocationTable.class, TaskArchitecture.class);
as.addSourceEntityType(ComponentToTaskAllocationEntry.class, Component.class);
as.addTargetEntityType(ComponentToTaskAllocationEntry.class, Task.class);
as.addSourceEntityType(InputPortToTaskInputPortAllocationEntry.class, InputPort.class);
as.addTargetEntityType(InputPortToTaskInputPortAllocationEntry.class, TaskInputPort.class);
as.addSourceEntityType(OutputPortToTaskOutputPortAllocationEntry.class, OutputPort.class);
as.addTargetEntityType(OutputPortToTaskOutputPortAllocationEntry.class,
TaskOutputPort.class);
as.addParentAllocationEntryType(InputPortToTaskInputPortAllocationEntry.class,
ComponentToTaskAllocationEntry.class);
as.addParentAllocationEntryType(OutputPortToTaskOutputPortAllocationEntry.class,
InputPortToTaskInputPortAllocationEntry.class, InputPort.class, TaskInputPort.class,
ComponentToTaskAllocationEntry.class);
as.addAllocationEntryType(ComponentToTaskAllocationTable.class,
OutputPortToTaskOutputPortAllocationEntry.class, OutputPort.class,
TaskOutputPort.class, ComponentToTaskAllocationEntry.class);
as.addAllocationTableType(TaskToExecutionUnitAllocationTable.class, TaskArchitecture.class,
PlatformArchitecture.class);
as.addAllocationEntryType(TaskToExecutionUnitAllocationTable.class,
TaskToExecutionUnitAllocationEntry.class, Task.class, GenericExecutionUnit.class);
as.addAllocationEntryType(TaskToExecutionUnitAllocationTable.class,
TaskInputPortToReceiverAllocationEntry.class, TaskInputPort.class, Receiver.class,
TaskToExecutionUnitAllocationEntry.class);
as.addAllocationEntryType(TaskToExecutionUnitAllocationTable.class,
TaskOutputPortToTransmitterAllocationEntry.class, TaskOutputPort.class,
Transmitter.class, TaskToExecutionUnitAllocationEntry.class);
as.addAllocationEntryType(TaskToExecutionUnitAllocationTable.class,
TaskPortToTransceiverAllocationEntry.class, TaskPort.class, Transceiver.class,
TaskToExecutionUnitAllocationEntry.class);
as.setSourceModelType(TaskToExecutionUnitAllocationTable.class, TaskArchitecture.class);
as.setTargetModelType(TaskToExecutionUnitAllocationTable.class, PlatformArchitecture.class);
// In af3.partition: as.addCoveredModelType(TaskToExecutionUnitAllocationTable.class,
// PartitionArchitecture.class);
as.addSourceEntityType(TaskToExecutionUnitAllocationEntry.class, Task.class);
as.addTargetEntityType(TaskToExecutionUnitAllocationEntry.class,
GenericExecutionUnit.class);
as.addSourceEntityType(TaskInputPortToReceiverAllocationEntry.class, TaskInputPort.class);
as.addTargetEntityType(TaskInputPortToReceiverAllocationEntry.class, Receiver.class);
as.addSourceEntityType(TaskOutputPortToTransmitterAllocationEntry.class,
TaskOutputPort.class);
as.addTargetEntityType(TaskOutputPortToTransmitterAllocationEntry.class, Transmitter.class);
as.addSourceEntityType(TaskPortToTransceiverAllocationEntry.class, TaskPort.class);
as.addTargetEntityType(TaskPortToTransceiverAllocationEntry.class, Transceiver.class);
as.addParentAllocationEntryType(TaskInputPortToReceiverAllocationEntry.class,
TaskToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(TaskOutputPortToTransmitterAllocationEntry.class,
TaskToExecutionUnitAllocationEntry.class);
as.addParentAllocationEntryType(TaskPortToTransceiverAllocationEntry.class,
TaskToExecutionUnitAllocationEntry.class);
as.addAllocationEntryType(TaskWcetTable.class, TaskWcetEntry.class);
as.setSourceModelType(TaskWcetTable.class, TaskArchitecture.class);
as.setTargetModelType(TaskWcetTable.class, PlatformArchitecture.class);
as.addSourceEntityType(TaskWcetEntry.class, Task.class);
as.addTargetEntityType(TaskWcetEntry.class, GenericExecutionUnit.class);
as.setInternalAllocationTable(TaskWcetTable.class);
as.addAllocationTableType(TaskWcetTable.class, TaskArchitecture.class,
PlatformArchitecture.class, true);
as.addAllocationEntryType(TaskWcetTable.class, TaskWcetEntry.class, Task.class,
GenericExecutionUnit.class);
as.addAdmissibleAllocationTablePair(TaskWcetTable.class,
TaskToExecutionUnitAllocationTable.class);
as.addCoveredModelType(ComponentToExecutionUnitAllocationTable.class,
TaskArchitecture.class);
}
......
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