FSMSADF::ScenarioGraph Class Reference
#include <graph.h>
Detailed Description
ScenarioGraph Container for FSM-based SADF scenario graph.
Constructor & Destructor Documentation
FSMSADF::ScenarioGraph::ScenarioGraph | ( | GraphComponent | c | ) |
ScenarioGraph () Constructor.
Referenced by create().
FSMSADF::ScenarioGraph::~ScenarioGraph | ( | ) |
Member Function Documentation
void FSMSADF::ScenarioGraph::addActor | ( | Actor * | a | ) |
void FSMSADF::ScenarioGraph::addChannel | ( | Channel * | c | ) |
addChannel () Add a channel to a graph.
References channels.
Referenced by clone(), and createChannel().
ScenarioGraph * FSMSADF::ScenarioGraph::clone | ( | GraphComponent | c | ) | const |
clone () The function returns a pointer to a newly allocated graph object. All properties, actors and channels of the graph are cloned.
References a, actors, addActor(), addChannel(), channels, component, createCopy(), g, getGraph(), FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::GraphComponent(), persistentTokenMap, setStorageDistributionsOfScenario(), and storageDistributions.
Referenced by FSMSADF::Graph::isolateScenarios().
void FSMSADF::ScenarioGraph::constructFromXML | ( | const CNodePtr | scenarioGraphNode | ) |
constructFromXML () The function initializes all actor properties based on the XML data.
References a, c, CGetAttribute(), CGetChildNode(), CHasAttribute(), CNextNode(), FSMSADF::Channel::constructFromXML(), FSMSADF::Actor::constructFromXML(), createActor(), createChannel(), getActors(), getChannels(), FSMSADF::Channel::getInitialTokens(), FSMSADF::Channel::getPersistentTokenNames(), FSMSADF::GraphComponent::GraphComponent(), persistentTokenMap, FSMSADF::GraphComponent::setName(), and setType().
Referenced by FSMSADF::Graph::constructFromXML().
void FSMSADF::ScenarioGraph::constructPropertiesFromXML | ( | Scenario * | s, | |
const CNodePtr | scenarioNode | |||
) |
constructPropertiesFromXML () The function initializes all actor properties based on the XML data.
References a, c, CGetAttribute(), CGetChildNode(), CHasAttribute(), CIsNode(), CNextNode(), FSMSADF::StorageDistributions::constructFromXML(), FSMSADF::Channel::constructPropertiesFromXML(), FSMSADF::Actor::constructPropertiesFromXML(), getActor(), getChannel(), hasActor(), hasChannel(), and setStorageDistributionsOfScenario().
Referenced by FSMSADF::Scenario::constructFromXML(), and FSMSADF::Graph::constructFromXML().
convertPropertiesToXML () The function converts the graph properties to XML data.
References actors, CAddNode(), channels, FSMSADF::StorageDistributions::convertToXML(), getStorageDistributionsOfScenario(), and hasStorageDistributionsInScenario().
Referenced by FSMSADF::Scenario::convertToXML().
void FSMSADF::ScenarioGraph::convertToXML | ( | const CNodePtr | scenarioGraphNode | ) |
convertToXML () The function converts the graph to XML data.
References actors, CAddAttribute(), CAddNode(), channels, FSMSADF::GraphComponent::getName(), and getType().
Referenced by FSMSADF::Graph::convertToXML().
ScenarioGraph * FSMSADF::ScenarioGraph::create | ( | GraphComponent | c | ) | const |
create () The function returns a pointer to a newly allocated graph object.
References ScenarioGraph().
Referenced by createCopy().
Actor * FSMSADF::ScenarioGraph::createActor | ( | ) |
createActor () Create a new actor on the graph.
References a, addActor(), c, getActors(), FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::GraphComponent(), and FSMSADF::GraphComponent::setName().
Referenced by constructFromXML(), FSMSADF::RandomGraph::createActor(), FSMSADF::BindingAwareGraph::createMappedChannelToConnectionNSoC(), and FSMSADF::GraphConversion::ensureStronglyBounded().
Actor * FSMSADF::ScenarioGraph::createActor | ( | GraphComponent | c | ) |
createActor () Create a new actor on the graph.
References a, and addActor().
Channel * FSMSADF::ScenarioGraph::createChannel | ( | GraphComponent | c | ) |
createChannel () Create a new channel on the graph.
References addChannel().
Referenced by constructFromXML(), createChannel(), FSMSADF::RandomGraph::createChannel(), FSMSADF::BindingAwareGraph::createMappedActorNSoC(), FSMSADF::BindingAwareGraph::createMappedChannelToConnectionNSoC(), FSMSADF::BindingAwareGraph::createMappedChannelToTileNSoC(), and FSMSADF::GraphConversion::ensureStronglyBounded().
createChannel () The function creates a channel between the source and destination actor. Ports with the supplied rates are added to these actors.
References c, FSMSADF::Channel::connectDst(), FSMSADF::Channel::connectSrc(), createChannel(), FSMSADF::Actor::createPort(), getChannels(), FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::GraphComponent(), FSMSADF::Port::In, FSMSADF::Port::Out, and FSMSADF::GraphComponent::setName().
ScenarioGraph * FSMSADF::ScenarioGraph::createCopy | ( | GraphComponent | c | ) | const |
createCopy () The function returns a pointer to a newly allocated graph object. All properties of the graph are copied.
References create(), g, FSMSADF::GraphComponent::getName(), getType(), FSMSADF::GraphComponent::setName(), and setType().
Referenced by clone().
TimedSDFgraph * FSMSADF::ScenarioGraph::extractSDFgraph | ( | Scenario * | s | ) | const |
extractSDFgraph() The function converts the scenario graph of scenario s to a timed SDF graph.
References a, actors, TimedSDFactor::addProcessor(), c, channels, component, TimedSDFgraph::createActor(), TimedSDFgraph::createChannel(), TimedSDFactor::_Processor::execTime, g, SDFgraph::getActor(), FSMSADF::Actor::getDefaultProcessorType(), FSMSADF::Channel::getDstActor(), SDFchannel::getDstPort(), FSMSADF::Channel::getDstPort(), FSMSADF::Actor::getExecutionTimeOfScenario(), FSMSADF::Channel::getInitialTokens(), FSMSADF::GraphComponent::getName(), FSMSADF::Port::getRateOfScenario(), FSMSADF::Channel::getSrcActor(), SDFchannel::getSrcPort(), FSMSADF::Channel::getSrcPort(), FSMSADF::Actor::getType(), getType(), TimedSDFactor::setDefaultProcessor(), SDFcomponent::setName(), SDFactor::setType(), SDFgraph::setType(), and TimedSDFactor::_Processor::type.
Referenced by FSMSADF::MemoryDimAlgo::computeStorageDist(), and FSMSADF::Graph::extractSDFgraph().
getActor () The function returns a reference to an actor with the given id.
References a, actors, FSMSADF::GraphComponent::getId(), and FSMSADF::GraphComponent::getName().
Referenced by FSMSADF::StaticOrderSchedule::changeActorAssociations(), FSMSADF::Channel::clone(), FSMSADF::StaticOrderSchedule::constructFromXML(), FSMSADF::ProcessorBinding::constructFromXML(), FSMSADF::MemoryBinding::constructFromXML(), FSMSADF::Channel::constructFromXML(), constructPropertiesFromXML(), and FSMSADF::BindingAwareGraph::extractActorMapping().
getActor () The function returns a reference to an actor with the given name.
References a, actors, and FSMSADF::GraphComponent::getName().
Actors& FSMSADF::ScenarioGraph::getActors | ( | ) | [inline] |
References actors.
Referenced by FSMSADF::RandomGraph::assignProperties(), FSMSADF::RandomGraph::assignRatesAndInitialTokens(), constructFromXML(), FSMSADF::OutputHTML::convertPlatformBindingToPNG(), FSMSADF::OutputHTML::convertScenarioGraphToPNG(), FSMSADF::Graph::convertToXML(), createActor(), FSMSADF::RandomGraph::createScenarioGraph(), FSMSADF::MPExplore::Exploration::exploreDelayForSchedule(), FSMSADF::MPExplore::Exploration::exploreEigen(), FSMSADF::RandomGraph::isStronglyConnected(), FSMSADF::mapApplicationGraphToArchitectureGraph(), FSMSADF::BindingAwareGraph::modelBindingInNSoCFlow(), FSMSADF::PrecedenceGraph::PrecedenceGraph(), FSMSADF::OutputHTML::printPlatformBinding(), FSMSADF::OutputHTML::printScenario(), FSMSADF::RandomGraph::selectInitialTokenChannels(), FSMSADF::MPExploreBindingAware::SGraph::SGraph(), and FSMSADF::MPExplore::SGraph::SGraph().
getChannel () The function returns a reference to a channel with the given id.
References c, channels, FSMSADF::GraphComponent::getId(), and FSMSADF::GraphComponent::getName().
Referenced by FSMSADF::ScenarioBindingConstraints::clone(), FSMSADF::NetworkInterfaceBinding::constructFromXML(), FSMSADF::MemoryBinding::constructFromXML(), FSMSADF::ScenarioBindingConstraints::constructFromXML(), FSMSADF::ConnectionBinding::constructFromXML(), constructPropertiesFromXML(), and FSMSADF::BindingAwareGraph::extractChannelMapping().
getChannel () The function returns a reference to a channel with the given name.
References c, channels, and FSMSADF::GraphComponent::getName().
Channels& FSMSADF::ScenarioGraph::getChannels | ( | ) | [inline] |
References channels.
Referenced by FSMSADF::RandomGraph::assignProperties(), FSMSADF::RandomGraph::assignRatesToPorts(), FSMSADF::MemoryDimAlgo::computeStorageDist(), constructFromXML(), FSMSADF::MPExplore::Exploration::convertEigenvector(), FSMSADF::OutputHTML::convertPlatformBindingToPNG(), FSMSADF::OutputHTML::convertScenarioGraphToPNG(), FSMSADF::Graph::convertToXML(), createChannel(), FSMSADF::RandomGraph::createChannel(), FSMSADF::GraphConversion::ensureStronglyBounded(), FSMSADF::MemoryDimAlgo::estimateStorageDist(), FSMSADF::MPExplore::State::fromVector(), FSMSADF::BindingAwareGraph::modelBindingInNSoCFlow(), FSMSADF::PrecedenceGraph::PrecedenceGraph(), FSMSADF::OutputHTML::printPlatformBinding(), FSMSADF::OutputHTML::printScenario(), FSMSADF::RandomGraph::selectInitialTokenChannels(), FSMSADF::MPExploreBindingAware::SGraph::SGraph(), FSMSADF::MPExplore::SGraph::SGraph(), FSMSADF::MPExploreBindingAware::State::State(), FSMSADF::MPExplore::State::State(), FSMSADF::MPExplore::State::zeroScheduleState(), and FSMSADF::MPExplore::State::zeroState().
Scenario * FSMSADF::ScenarioGraph::getDefaultScenario | ( | ) | const [private] |
getDefaultScenario () The function returns a pointer to the default scenario.
References FSMSADF::Graph::getDefaultScenario(), and getGraph().
Referenced by getStorageDistributionsOfScenario(), and hasStorageDistributionsInScenario().
Graph* FSMSADF::ScenarioGraph::getGraph | ( | ) | const [inline] |
References FSMSADF::GraphComponent::getParent().
Referenced by clone(), FSMSADF::findAllScenariosOfActor(), FSMSADF::Port::getDefaultScenario(), getDefaultScenario(), FSMSADF::Channel::getDefaultScenario(), FSMSADF::Actor::getDefaultScenario(), FSMSADF::BindingAwareGraph::getScenarioOfScenarioGraph(), FSMSADF::Actor::setProcessorTypes(), FSMSADF::Port::setRate(), and FSMSADF::Channel::setTokenSize().
const PersistentTokenMap FSMSADF::ScenarioGraph::getPersistentTokenMap | ( | ) | [inline] |
References persistentTokenMap.
const map<Scenario*, StorageDistributions>& FSMSADF::ScenarioGraph::getStorageDistributions | ( | ) | const [inline] |
References storageDistributions.
StorageDistributions & FSMSADF::ScenarioGraph::getStorageDistributionsOfScenario | ( | Scenario * | s | ) |
getStorageDistributionsOfScenario () The function returns the storage distributions of this scenario graph in scenario s, or when scenario s is not specified it returns the storage distributions in the default scenario. When also no default scenario exists, an exception is thrown.
References getDefaultScenario(), FSMSADF::GraphComponent::getName(), and storageDistributions.
Referenced by FSMSADF::MemoryDimAlgo::computeStorageDist(), convertPropertiesToXML(), FSMSADF::MemoryDimAlgo::estimateStorageDist(), isolateScenario(), and FSMSADF::MemoryDimAlgo::selectStorageDist().
CString FSMSADF::ScenarioGraph::getType | ( | ) | const [inline] |
References type.
Referenced by convertToXML(), createCopy(), extractSDFgraph(), and print().
bool FSMSADF::ScenarioGraph::hasActor | ( | const CString & | name | ) |
hasActor () The function returns a true when an actor with the given name exists. Otherwise the function returns false.
References a, actors, and FSMSADF::GraphComponent::getName().
Referenced by constructPropertiesFromXML().
bool FSMSADF::ScenarioGraph::hasChannel | ( | const CString & | name | ) |
hasChannel () The function returns a true when a channel with the given name exists. Otherwise the function returns false.
References c, channels, and FSMSADF::GraphComponent::getName().
Referenced by constructPropertiesFromXML().
bool FSMSADF::ScenarioGraph::hasStorageDistributionsInScenario | ( | Scenario * | s | ) | const |
hasStorageDistributionsInScenario () The function returns true when storage distributions have been specified for scenario s or through a default scenario. Otherwise the function returns false.
References getDefaultScenario(), and storageDistributions.
Referenced by convertPropertiesToXML(), and isolateScenario().
void FSMSADF::ScenarioGraph::isolateScenario | ( | Scenario * | s | ) |
isolateScenario() The function removes all scenario except scenario s from the graph.
References a, actors, c, channels, getStorageDistributionsOfScenario(), hasStorageDistributionsInScenario(), FSMSADF::Channel::isolateScenario(), FSMSADF::Actor::isolateScenario(), setStorageDistributionsOfScenario(), and storageDistributions.
Referenced by FSMSADF::Graph::isolateScenarios().
ostream & FSMSADF::ScenarioGraph::print | ( | ostream & | out | ) |
print () Print the graph to the supplied output stream.
References a, actors, c, channels, FSMSADF::GraphComponent::getId(), FSMSADF::GraphComponent::getName(), getType(), FSMSADF::Channel::print(), and FSMSADF::Actor::print().
void FSMSADF::ScenarioGraph::removeActor | ( | const CString & | name | ) |
removeActor () Remove an actor from a graph.
References a, actors, and FSMSADF::GraphComponent::getName().
void FSMSADF::ScenarioGraph::removeChannel | ( | const CString & | name | ) |
removeChannel () Remove a channel from a graph.
References c, channels, and FSMSADF::GraphComponent::getName().
void FSMSADF::ScenarioGraph::setStorageDistributions | ( | const map< Scenario *, StorageDistributions > & | d | ) | [inline] |
References storageDistributions.
void FSMSADF::ScenarioGraph::setStorageDistributionsOfScenario | ( | Scenario * | s, | |
const StorageDistributions | d | |||
) |
setStorageDistributionsOfScenario () Set the storage distributions of this scenario graph in scenario s.
References storageDistributions.
Referenced by clone(), FSMSADF::MemoryDimAlgo::computeStorageDist(), constructPropertiesFromXML(), and isolateScenario().
void FSMSADF::ScenarioGraph::setType | ( | const CString & | t | ) | [inline] |
References type.
Referenced by constructFromXML(), createCopy(), and FSMSADF::RandomGraph::createScenarioGraph().
Friends And Related Function Documentation
ostream& operator<< | ( | ostream & | out, | |
ScenarioGraph & | g | |||
) | [friend] |
Member Data Documentation
Actors FSMSADF::ScenarioGraph::actors [private] |
Referenced by addActor(), clone(), convertPropertiesToXML(), convertToXML(), extractSDFgraph(), getActor(), getActors(), hasActor(), isolateScenario(), print(), removeActor(), and ~ScenarioGraph().
Channels FSMSADF::ScenarioGraph::channels [private] |
Referenced by clone(), constructFromXML(), and getPersistentTokenMap().
map<Scenario*, StorageDistributions> FSMSADF::ScenarioGraph::storageDistributions [private] |
CString FSMSADF::ScenarioGraph::type [private] |
The documentation for this class was generated from the following files: