STORM_LOG_TRACE("Ignore functional dependency "<<child<<" in gate "<<gate->name());
if(!childElement->isDependency()){
if(!childElement->isDependency()){
gate->pushBackChild(childElement);
gate->pushBackChild(childElement);
childElement->addParent(gate);
childElement->addParent(gate);
}else{
STORM_LOG_TRACE("Ignore functional dependency "<<child<<" in gate "<<gate->name());
}
}
}else{
}else{
// Child not found -> find first dependent event to assure that child is dependency
// Child not found -> find first dependent event to assure that child is dependency
@ -40,18 +42,20 @@ namespace storm {
}
}
}
}
}
}
// Build connections for restrictions
for(auto&elem:mRestrictionChildNames){
for(auto&elem:mRestrictionChildNames){
for(autoconst&childName:elem.second){
for(autoconst&childName:elem.second){
autoitFind=mElements.find(childName);
autoitFind=mElements.find(childName);
STORM_LOG_ASSERT(itFind!=mElements.end(),"Child not found.");
STORM_LOG_ASSERT(itFind!=mElements.end(),"Child not found.");
DFTElementPointerchildElement=itFind->second;
DFTElementPointerchildElement=itFind->second;
STORM_LOG_ASSERT(!childElement->isDependency()&&!childElement->isRestriction(),"Child '"<<childElement->name()<<"' has invalid type.");
STORM_LOG_THROW(childElement->isGate()||childElement->isBasicElement(),storm::exceptions::WrongFormatException,"Child '"<<childElement->name()<<"' of restriction '"<<elem.first->name()<<"' must be gate or BE.");
STORM_LOG_ASSERT(itFind!=mElements.end(),"Child '"<<childName<<"' not found");
STORM_LOG_ASSERT(itFind!=mElements.end(),"Child '"<<childName<<"' not found");
DFTElementPointerchildElement=itFind->second;
DFTElementPointerchildElement=itFind->second;
if(!first){
if(!first){
STORM_LOG_ASSERT(childElement->isBasicElement(),"Child '"<<childName<<"' of dependency '"<<elem.first->name()<<"' must be BE.");
STORM_LOG_THROW(childElement->isBasicElement(),storm::exceptions::WrongFormatException,"Child '"<<childName<<"' of dependency '"<<elem.first->name()<<"' must be BE.");
STORM_LOG_THROW(childElement->isGate()||childElement->isBasicElement(),storm::exceptions::WrongFormatException,"Child '"<<childName<<"' of dependency '"<<elem.first->name()<<"' must be gate or BE.");
STORM_LOG_THROW(spareReprs->isGate()||spareReprs->isBasicElement(),storm::exceptions::WrongFormatException,"Child '"<<spareReprs->name()<<"' of spare '"<<elem->name()<<"' must be gate or BE.");
STORM_LOG_THROW(false,storm::exceptions::WrongFormatException,"Spare modules of '"<<getElement(module1->first)->name()<<"' and '"<<getElement(module2->first)->name()<<"' should not overlap.");
}
}
}
// For the top module, we assume, contrary to [Jun15], that we have all spare gates and basic elements which are not in another module.
// For the top module, we assume, contrary to [Jun15], that we have all spare gates and basic elements which are not in another module.
std::set<size_t>topModuleSet;
std::set<size_t>topModuleSet;
// Initialize with all ids.
// Initialize with all ids.
@ -64,10 +76,13 @@ namespace storm {
// Extend top module and insert those elements which are part of the top module and a spare module
// Extend top module and insert those elements which are part of the top module and a spare module
STORM_LOG_WARN("Elements of spare module '"<<getElement(module.first)->name()<<"' also contained in top module. All elements of this spare module will be activated from the beginning on.");