Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
exploration-alg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
exploration-alg
Commits
8c699d68
Commit
8c699d68
authored
8 years ago
by
Alexander Diewald
Browse files
Options
Downloads
Patches
Plain Diff
- Cleanup ExplorationAlgUtils.
parent
9a6891da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/util/ExplorationAlgUtils.java
+0
-118
0 additions, 118 deletions
...fortiss/af3/exploration/alg/util/ExplorationAlgUtils.java
with
0 additions
and
118 deletions
org.fortiss.af3.exploration.alg/trunk/src/org/fortiss/af3/exploration/alg/util/ExplorationAlgUtils.java
+
0
−
118
View file @
8c699d68
...
...
@@ -37,12 +37,8 @@ import java.util.Queue;
import
java.util.Set
;
import
java.util.Stack
;
import
java.util.function.Predicate
;
import
java.util.stream.Stream
;
import
org.conqat.lib.commons.reflect.ReflectionUtils
;
import
org.eclipse.core.runtime.IStatus
;
import
org.eclipse.core.runtime.MultiStatus
;
import
org.eclipse.core.runtime.Status
;
import
org.eclipse.emf.common.util.BasicEList
;
import
org.eclipse.emf.common.util.EList
;
import
org.eclipse.emf.common.util.TreeIterator
;
...
...
@@ -58,7 +54,6 @@ import org.fortiss.af3.exploration.alg.dse.backend.opt4j.solution.TimeSlot;
import
org.fortiss.af3.exploration.alg.exception.InvalidTimingModelException
;
import
org.fortiss.af3.exploration.model.ExplorationTarget
;
import
org.fortiss.af3.exploration.model.IProblemDimension
;
import
org.fortiss.af3.exploration.util.ExplorationUtils
;
import
org.fortiss.af3.platform.model.IPlatformResource
;
import
org.fortiss.af3.platform.model.IVirtualizationPlatformArchitectureElement
;
import
org.fortiss.af3.platform.model.annotation.ResourceLink
;
...
...
@@ -140,16 +135,6 @@ public class ExplorationAlgUtils {
return
classes
.
stream
().
anyMatch
(
cls
->
cls
.
isAssignableFrom
(
obj
.
getClass
()));
}
// // TODO: move to dedicated AF3 adapter class, or get the set dynamically from the adapters
// /** Contains a collection of platform elements which are connected via directed connections.
// */
// public static Collection<Class<?>> directedConnectionElements = Collections
// .unmodifiableSet(new HashSet<Class<?>>() {
// {
// add(NocRouter.class);
// }
// });
/**
* Finds the (target) {@link InputPort}s to which the given {@link OutputPort} is connected.
* 'Target Ports' are connected {@link InputPort}s of {@link Component}s from the set of
...
...
@@ -182,40 +167,6 @@ public class ExplorationAlgUtils {
return
targets
;
}
/**
* Finds the (source) {@link OutputPort}s to which the given {@link InputPort} is connected. The
* search follows all channels to input ports of deployable/atomic {@link Component}s. The
* source port must be attached to an deployable/atomic {@link Component}, otherwise this method
* returns an empty list.
*
* @param sourcePort
* The port to start the search from.
* @return The list of target ports of atomic {@link Component}s.
* @throws Exception
* if the timing specification of any traversed element is inconsistent.
*/
// FIXME: HERE
// public static List<OutputPort> findSourcePorts(InputPort sourcePort) throws Exception {
// if(getEventAnnotationOf(sourcePort) == null &&
// !isDefinedAsDeployableElement(sourcePort.getComponent())) {
// return Collections.emptyList();
// }
// List<OutputPort> sources = new ArrayList<OutputPort>();
// LinkedList<Channel> exploreChannels = new LinkedList<Channel>();
// exploreChannels.addAll(sourcePort.getIncomingChannels());
// while(!exploreChannels.isEmpty()) {
// Channel currentExploreChannel = exploreChannels.removeFirst();
// Component currentSourceComponent = currentExploreChannel.getSource().getComponent();
// if(/* getEventAnnotationOf(currentExploreChannel.getTarget()) != null || */
// isDefinedAsDeployableElement(currentSourceComponent)) {
// sources.add((OutputPort)currentExploreChannel.getSource());
// } else {
// exploreChannels.addAll(currentExploreChannel.getSource().getIncomingChannels());
// }
// }
// return sources;
// }
/**
* Returns a list of source ports within the given {@link ComponentArchitecture}. Source ports
* are defined as ports that do not have direct inputs.
...
...
@@ -410,62 +361,6 @@ public class ExplorationAlgUtils {
return
false
;
}
// /**
// * Determines whether the given element is relevant for a deployment. It examines whether the
// * given element is a sub-element of a deployment target or a sub-element of a virtualized
// * hardware element. If neither applies, the element is not part of a 'black box' and, hence,
// it
// * is 'relevant'.
// *
// * @param element
// * The platform element to be examined.
// * @param virtualizationProviders
// * The list of all present virtualization providers (hypervisors).
// * @return Boolean indicating the relevance for of the element for a deployment.
// */
// public static boolean isPlatformTargetResource(IPlatformResource element,
// Collection<IPlatformResource> deploymentTargets,
// Collection<IVirtualizationPlatformArchitectureElement> virtualizationProviders) {
// if(isPlatformTargetResource(element, deploymentTargets) &&
// (!hasVirtualizationLayer(element, virtualizationProviders)) ||
// isReferencedByNetworkDriver(element, virtualizationProviders)) {
// return true;
// }
// return false;
// }
//
// /**
// * Determines whether the given element is referenced by network driver. Useful to determine
// * {@link GatewayUnit}s that would not be considered in the communication structure, if it
// were
// * "hidden" by a parent element.
// *
// * @param element
// * The {@link IHierarchicElement} to be examined.
// * @param virtualizationProviders
// * List of {@link IVirtualizationPlatformArchitectureElement}s that contain the
// * network drivers.
// * @return Predicate if the given element is referenced by a network driver located contained
// in
// * the given virtualization providers.
// */
// private static boolean isReferencedByNetworkDriver(IPlatformResource element,
// Collection<IVirtualizationPlatformArchitectureElement> virtualizationProviders) {
// EList<GatewayUnit> allPresentNetworkDrivers =
// getAllChildrenWithType(virtualizationProviders, OnChipNetworkDriver.class);
// for(GatewayUnit currentNetworkDriver : allPresentNetworkDrivers) {
// EList<IHierarchicElement> referencedGateway =
// getReferencedElementsWithType(currentNetworkDriver, IHierarchicElement.class);
// assert (referencedGateway.size() == 1) : "The OnChipNetworkDriver " +
// currentNetworkDriver.getName() +
// " references none or more than one network interface. This is not supported.";
// if(referencedGateway.get(0) == element) {
// return true;
// }
// }
// return false;
// }
/**
* Returns a list of child elements of the given type for each parent in the given collection.
* NOTE: This operation can be very costly, if elements are contained in the list which are far
...
...
@@ -486,19 +381,6 @@ public class ExplorationAlgUtils {
return
childrenWithType
;
}
// /**
// * Predicate, if the given {@link IHierarchicElement} has direct child elements are connected
// * via directed connections.
// */
// public static boolean hasCildrenWithDirectedConnections(IHierarchicElement element) {
// for(IHierarchicElement currentElement : element.getContainedElements()) {
// if(directedConnectionElements.contains(currentElement.getClass())) {
// return true;
// }
// }
// return false;
// }
/**
* Determines whether the given hardware element is virtualized by a
* {@link IVirtualizationPlatformArchitectureElement}.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment