@ -146,7 +146,7 @@ namespace storm {
formulas ( formulas ) , formulaToIndexMap ( ) , players ( players ) , modules ( modules ) , moduleToIndexMap ( ) ,
rewardModels ( rewardModels ) , rewardModelToIndexMap ( ) , systemCompositionConstruct ( compositionConstruct ) ,
labels ( labels ) , labelToIndexMap ( ) , observationLabels ( observationLabels ) , actionToIndexMap ( actionToIndexMap ) , indexToActionMap ( ) , actions ( ) ,
synchronizingActionIndices ( ) , actionIndicesToModuleIndexMap ( ) , variableToModuleIndexMap ( ) , prismCompatibility ( prismCompatibility )
synchronizingActionIndices ( ) , actionIndicesToModuleIndexMap ( ) , variableToModuleIndexMap ( ) , possiblySynchronizingCommands ( ) , p rismCompatibility ( prismCompatibility )
{
// Start by creating the necessary mappings from the given ones.
@ -163,6 +163,24 @@ namespace storm {
}
}
possiblySynchronizingCommands = storage : : BitVector ( this - > getNumberOfCommands ( ) ) ;
std : : set < uint64_t > possiblySynchronizingActionIndices ;
for ( uint64_t syncAction : synchronizingActionIndices ) {
if ( getModuleIndicesByActionIndex ( syncAction ) . size ( ) > 1 ) {
std : : cout < < " syncAction " < < syncAction < < std : : endl ;
possiblySynchronizingActionIndices . insert ( syncAction ) ;
}
}
for ( auto const & module : getModules ( ) ) {
for ( auto const & command : module . getCommands ( ) ) {
if ( command . isLabeled ( ) ) {
if ( possiblySynchronizingActionIndices . count ( command . getActionIndex ( ) ) ) {
possiblySynchronizingCommands . set ( command . getGlobalIndex ( ) ) ;
}
}
}
}
if ( finalModel ) {
// If the model is supposed to be a CTMC, but contains probabilistic commands, we transform them to Markovian
// commands and issue a warning.
@ -816,6 +834,10 @@ namespace storm {
return this - > observationLabels . size ( ) ;
}
storm : : storage : : BitVector const & Program : : getPossiblySynchronizingCommands ( ) const {
return possiblySynchronizingCommands ;
}
Program Program : : restrictCommands ( storm : : storage : : FlatSet < uint_fast64_t > const & indexSet ) const {
std : : vector < storm : : prism : : Module > newModules ;
newModules . reserve ( this - > getNumberOfModules ( ) ) ;