Browse Source

add assertion for module indices in second

tempestpy_adaptions
Stefan Pranger 4 years ago
parent
commit
de38996b4e
  1. 4
      src/storm-parsers/parser/PrismParser.cpp

4
src/storm-parsers/parser/PrismParser.cpp

@ -869,7 +869,7 @@ namespace storm {
if (!this->secondRun) { if (!this->secondRun) {
// Add a mapping from the new module name to its (future) index. // Add a mapping from the new module name to its (future) index.
globalProgramInformation.moduleToIndexMap[newModuleName] = globalProgramInformation.modules.size(); globalProgramInformation.moduleToIndexMap[newModuleName] = globalProgramInformation.modules.size();
// Register all (renamed) variables for later use. // Register all (renamed) variables for later use.
// We already checked before, whether the renaiming is valid. // We already checked before, whether the renaiming is valid.
for (auto const& variable : moduleToRename.getBooleanVariables()) { for (auto const& variable : moduleToRename.getBooleanVariables()) {
@ -921,7 +921,7 @@ namespace storm {
// Assert that the module name is already known and has the expected index. // Assert that the module name is already known and has the expected index.
STORM_LOG_ASSERT(globalProgramInformation.moduleToIndexMap.count(newModuleName) > 0, "Module name '" << newModuleName << "' was not found."); STORM_LOG_ASSERT(globalProgramInformation.moduleToIndexMap.count(newModuleName) > 0, "Module name '" << newModuleName << "' was not found.");
STORM_LOG_ASSERT(globalProgramInformation.moduleToIndexMap[newModuleName] == globalProgramInformation.modules.size(), "The index for module " << newModuleName << " does not match the index from the first parsing run."); STORM_LOG_ASSERT(globalProgramInformation.moduleToIndexMap[newModuleName] == globalProgramInformation.modules.size(), "The index for module " << newModuleName << " does not match the index from the first parsing run.");
// Create a mapping from identifiers to the expressions they need to be replaced with. // Create a mapping from identifiers to the expressions they need to be replaced with.
std::map<storm::expressions::Variable, storm::expressions::Expression> expressionRenaming; std::map<storm::expressions::Variable, storm::expressions::Expression> expressionRenaming;
for (auto const& namePair : renaming) { for (auto const& namePair : renaming) {

Loading…
Cancel
Save