diff --git a/src/storm-cli-utilities/model-handling.h b/src/storm-cli-utilities/model-handling.h index 82b809074..034aa9c62 100644 --- a/src/storm-cli-utilities/model-handling.h +++ b/src/storm-cli-utilities/model-handling.h @@ -220,7 +220,7 @@ namespace storm { modelBuildingWatch.stop(); if (result) { - STORM_PRINT_AND_LOG("Time for model construction: " << modelBuildingWatch << "." << std::endl << std::endl); + STORM_PRINT("Time for model construction: " << modelBuildingWatch << "." << std::endl << std::endl); } return result; @@ -332,23 +332,23 @@ namespace storm { preprocessingWatch.stop(); if (result.second) { - STORM_PRINT_AND_LOG(std::endl << "Time for model preprocessing: " << preprocessingWatch << "." << std::endl << std::endl); + STORM_PRINT(std::endl << "Time for model preprocessing: " << preprocessingWatch << "." << std::endl << std::endl); } return result; } void printComputingCounterexample(storm::jani::Property const& property) { - STORM_PRINT_AND_LOG("Computing counterexample for property " << *property.getRawFormula() << " ..." << std::endl); + STORM_PRINT("Computing counterexample for property " << *property.getRawFormula() << " ..." << std::endl); } void printCounterexample(std::shared_ptr const& counterexample, storm::utility::Stopwatch* watch = nullptr) { if (counterexample) { - STORM_PRINT_AND_LOG(*counterexample << std::endl); + STORM_PRINT(*counterexample << std::endl); if (watch) { - STORM_PRINT_AND_LOG("Time for computation: " << *watch << "." << std::endl); + STORM_PRINT("Time for computation: " << *watch << "." << std::endl); } } else { - STORM_PRINT_AND_LOG(" failed." << std::endl); + STORM_PRINT(" failed." << std::endl); } } @@ -395,19 +395,19 @@ namespace storm { if (result->isQuantitative()) { switch (ft) { case storm::modelchecker::FilterType::VALUES: - STORM_PRINT_AND_LOG(*result); + STORM_PRINT(*result); break; case storm::modelchecker::FilterType::SUM: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().sum()); + STORM_PRINT(result->asQuantitativeCheckResult().sum()); break; case storm::modelchecker::FilterType::AVG: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().average()); + STORM_PRINT(result->asQuantitativeCheckResult().average()); break; case storm::modelchecker::FilterType::MIN: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().getMin()); + STORM_PRINT(result->asQuantitativeCheckResult().getMin()); break; case storm::modelchecker::FilterType::MAX: - STORM_PRINT_AND_LOG(result->asQuantitativeCheckResult().getMax()); + STORM_PRINT(result->asQuantitativeCheckResult().getMax()); break; case storm::modelchecker::FilterType::ARGMIN: case storm::modelchecker::FilterType::ARGMAX: @@ -420,16 +420,16 @@ namespace storm { } else { switch (ft) { case storm::modelchecker::FilterType::VALUES: - STORM_PRINT_AND_LOG(*result << std::endl); + STORM_PRINT(*result << std::endl); break; case storm::modelchecker::FilterType::EXISTS: - STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().existsTrue()); + STORM_PRINT(result->asQualitativeCheckResult().existsTrue()); break; case storm::modelchecker::FilterType::FORALL: - STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().forallTrue()); + STORM_PRINT(result->asQualitativeCheckResult().forallTrue()); break; case storm::modelchecker::FilterType::COUNT: - STORM_PRINT_AND_LOG(result->asQualitativeCheckResult().count()); + STORM_PRINT(result->asQualitativeCheckResult().count()); break; case storm::modelchecker::FilterType::ARGMIN: case storm::modelchecker::FilterType::ARGMAX: @@ -441,11 +441,11 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Filter type only defined for quantitative results."); } } - STORM_PRINT_AND_LOG(std::endl); + STORM_PRINT(std::endl); } void printModelCheckingProperty(storm::jani::Property const& property) { - STORM_PRINT_AND_LOG(std::endl << "Model checking property " << *property.getRawFormula() << " ..." << std::endl); + STORM_PRINT(std::endl << "Model checking property " << *property.getRawFormula() << " ..." << std::endl); } template @@ -453,13 +453,13 @@ namespace storm { if (result) { std::stringstream ss; ss << "'" << *property.getFilter().getStatesFormula() << "'"; - STORM_PRINT_AND_LOG("Result (for " << (property.getFilter().getStatesFormula()->isInitialFormula() ? "initial" : ss.str()) << " states): "); + STORM_PRINT("Result (for " << (property.getFilter().getStatesFormula()->isInitialFormula() ? "initial" : ss.str()) << " states): "); printFilteredResult(result, property.getFilter().getFilterType()); if (watch) { - STORM_PRINT_AND_LOG("Time for model checking: " << *watch << "." << std::endl); + STORM_PRINT("Time for model checking: " << *watch << "." << std::endl); } } else { - STORM_PRINT_AND_LOG(" failed, property is unsupported by selected engine/settings." << std::endl); + STORM_PRINT(" failed, property is unsupported by selected engine/settings." << std::endl); } } diff --git a/src/storm/builder/BuilderOptions.cpp b/src/storm/builder/BuilderOptions.cpp index b0d2641bd..2ee5bf37c 100644 --- a/src/storm/builder/BuilderOptions.cpp +++ b/src/storm/builder/BuilderOptions.cpp @@ -4,6 +4,7 @@ #include "storm/settings/SettingsManager.h" #include "storm/settings/modules/IOSettings.h" +#include "storm/settings/modules/GeneralSettings.h" #include "storm/utility/macros.h" #include "storm/exceptions/InvalidSettingsException.h" @@ -35,7 +36,7 @@ namespace storm { return boost::get(labelOrExpression); } - BuilderOptions::BuilderOptions(bool buildAllRewardModels, bool buildAllLabels) : buildAllRewardModels(buildAllRewardModels), buildAllLabels(buildAllLabels), buildChoiceLabels(false), buildStateValuations(false), buildChoiceOrigins(false), explorationChecks(false), explorationShowProgress(false), explorationShowProgressDelay(0) { + BuilderOptions::BuilderOptions(bool buildAllRewardModels, bool buildAllLabels) : buildAllRewardModels(buildAllRewardModels), buildAllLabels(buildAllLabels), buildChoiceLabels(false), buildStateValuations(false), buildChoiceOrigins(false), explorationChecks(false), showProgress(false), showProgressDelay(0) { // Intentionally left empty. } @@ -54,9 +55,11 @@ namespace storm { } } - explorationChecks = storm::settings::getModule().isExplorationChecksSet(); - explorationShowProgress = storm::settings::getModule().isExplorationShowProgressSet(); - explorationShowProgressDelay = storm::settings::getModule().getExplorationShowProgressDelay(); + auto const& ioSettings = storm::settings::getModule(); + auto const& generalSettings = storm::settings::getModule(); + explorationChecks = ioSettings.isExplorationChecksSet(); + showProgress = generalSettings.isVerboseSet(); + showProgressDelay = generalSettings.getShowProgressDelay(); } void BuilderOptions::preserveFormula(storm::logic::Formula const& formula) { @@ -166,12 +169,12 @@ namespace storm { return explorationChecks; } - bool BuilderOptions::isExplorationShowProgressSet() const { - return explorationShowProgress; + bool BuilderOptions::isShowProgressSet() const { + return showProgress; } - uint64_t BuilderOptions::getExplorationShowProgressDelay() const { - return explorationShowProgressDelay; + uint64_t BuilderOptions::getShowProgressDelay() const { + return showProgressDelay; } BuilderOptions& BuilderOptions::setExplorationChecks(bool newValue) { diff --git a/src/storm/builder/BuilderOptions.h b/src/storm/builder/BuilderOptions.h index f3a6edfbf..fe56994c7 100644 --- a/src/storm/builder/BuilderOptions.h +++ b/src/storm/builder/BuilderOptions.h @@ -106,8 +106,8 @@ namespace storm { bool isBuildAllRewardModelsSet() const; bool isBuildAllLabelsSet() const; bool isExplorationChecksSet() const; - bool isExplorationShowProgressSet() const; - uint64_t getExplorationShowProgressDelay() const; + bool isShowProgressSet() const; + uint64_t getShowProgressDelay() const; /** * Should all reward models be built? If not set, only required reward models are build. @@ -190,10 +190,10 @@ namespace storm { bool explorationChecks; /// A flag that stores whether the progress of exploration is to be printed. - bool explorationShowProgress; + bool showProgress; /// The delay for printing progress information. - uint64_t explorationShowProgressDelay; + uint64_t showProgressDelay; }; } diff --git a/src/storm/builder/ExplicitModelBuilder.cpp b/src/storm/builder/ExplicitModelBuilder.cpp index 665190e6c..7a552e9bd 100644 --- a/src/storm/builder/ExplicitModelBuilder.cpp +++ b/src/storm/builder/ExplicitModelBuilder.cpp @@ -240,13 +240,13 @@ namespace storm { ++currentRowGroup; } - if (generator->getOptions().isExplorationShowProgressSet()) { + if (generator->getOptions().isShowProgressSet()) { ++numberOfExploredStatesSinceLastMessage; ++numberOfExploredStates; auto now = std::chrono::high_resolution_clock::now(); auto durationSinceLastMessage = std::chrono::duration_cast(now - timeOfLastMessage).count(); - if (static_cast(durationSinceLastMessage) >= generator->getOptions().getExplorationShowProgressDelay()) { + if (static_cast(durationSinceLastMessage) >= generator->getOptions().getShowProgressDelay()) { auto statesPerSecond = numberOfExploredStatesSinceLastMessage / durationSinceLastMessage; auto durationSinceStart = std::chrono::duration_cast(now - timeOfStart).count(); std::cout << "Explored " << numberOfExploredStates << " states in " << durationSinceStart << " seconds (currently " << statesPerSecond << " states per second)." << std::endl; diff --git a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp index a550ee130..54779b96a 100644 --- a/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp +++ b/src/storm/builder/jit/ExplicitJitJaniModelBuilder.cpp @@ -528,13 +528,13 @@ namespace storm { } modelData["exploration_checks"] = cpptempl::make_data(list); list = cpptempl::data_list(); - if (options.isExplorationShowProgressSet()) { + if (options.isShowProgressSet()) { list.push_back(cpptempl::data_map()); } modelData["expl_progress"] = cpptempl::make_data(list); std::stringstream progressDelayStream; - progressDelayStream << options.getExplorationShowProgressDelay(); + progressDelayStream << options.getShowProgressDelay(); modelData["expl_progress_interval"] = cpptempl::make_data(progressDelayStream.str()); list = cpptempl::data_list(); if (std::is_same::value) { diff --git a/src/storm/modelchecker/prctl/helper/HybridDtmcPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridDtmcPrctlHelper.cpp index f4cca554f..d7986e56d 100644 --- a/src/storm/modelchecker/prctl/helper/HybridDtmcPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridDtmcPrctlHelper.cpp @@ -31,10 +31,7 @@ namespace storm { std::pair, storm::dd::Bdd> statesWithProbability01 = storm::utility::graph::performProb01(model, transitionMatrix, phiStates, psiStates); storm::dd::Bdd maybeStates = !statesWithProbability01.first && !statesWithProbability01.second && model.getReachableStates(); - // Perform some logging. - STORM_LOG_INFO("Found " << statesWithProbability01.first.getNonZeroCount() << " 'no' states."); - STORM_LOG_INFO("Found " << statesWithProbability01.second.getNonZeroCount() << " 'yes' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); + STORM_LOG_INFO("Preprocessing: " << statesWithProbability01.first.getNonZeroCount() << " states with probability 1, " << statesWithProbability01.second.getNonZeroCount() << " with probability 0 (" << maybeStates.getNonZeroCount() << " states remaining)."); // Check whether we need to compute exact probabilities for some states. if (qualitative) { @@ -109,6 +106,8 @@ namespace storm { storm::dd::Bdd statesWithProbabilityGreater0 = storm::utility::graph::performProbGreater0(model, transitionMatrix.notZero(), phiStates, psiStates, stepBound); storm::dd::Bdd maybeStates = statesWithProbabilityGreater0 && !psiStates && model.getReachableStates(); + STORM_LOG_INFO("Preprocessing: " << statesWithProbabilityGreater0.getNonZeroCount() << " states with probability greater 0."); + // If there are maybe states, we need to perform matrix-vector multiplications. if (!maybeStates.isZero()) { // Create the ODD for the translation between symbolic and explicit storage. @@ -204,9 +203,8 @@ namespace storm { storm::dd::Bdd infinityStates = storm::utility::graph::performProb1(model, transitionMatrix.notZero(), model.getReachableStates(), targetStates); infinityStates = !infinityStates && model.getReachableStates(); storm::dd::Bdd maybeStates = (!targetStates && !infinityStates) && model.getReachableStates(); - STORM_LOG_INFO("Found " << infinityStates.getNonZeroCount() << " 'infinity' states."); - STORM_LOG_INFO("Found " << targetStates.getNonZeroCount() << " 'target' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); + + STORM_LOG_INFO("Preprocessing: " << infinityStates.getNonZeroCount() << " states with reward infinity, " << targetStates.getNonZeroCount() << " target states (" << maybeStates.getNonZeroCount() << " states remaining)."); // Check whether we need to compute exact rewards for some states. if (qualitative) { diff --git a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp index fd808cdae..d6b41030a 100644 --- a/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp @@ -68,11 +68,8 @@ namespace storm { } storm::dd::Bdd maybeStates = !statesWithProbability01.first && !statesWithProbability01.second && model.getReachableStates(); - // Perform some logging. - STORM_LOG_INFO("Found " << statesWithProbability01.first.getNonZeroCount() << " 'no' states."); - STORM_LOG_INFO("Found " << statesWithProbability01.second.getNonZeroCount() << " 'yes' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); - + STORM_LOG_INFO("Preprocessing: " << statesWithProbability01.first.getNonZeroCount() << " states with probability 1, " << statesWithProbability01.second.getNonZeroCount() << " with probability 0 (" << maybeStates.getNonZeroCount() << " states remaining)."); + // Check whether we need to compute exact probabilities for some states. if (qualitative) { // Set the values for all maybe-states to 0.5 to indicate that their probability values are neither 0 nor 1. @@ -162,6 +159,8 @@ namespace storm { } storm::dd::Bdd maybeStates = statesWithProbabilityGreater0 && !psiStates && model.getReachableStates(); + STORM_LOG_INFO("Preprocessing: " << statesWithProbabilityGreater0.getNonZeroCount() << " states with probability greater 0."); + // If there are maybe states, we need to perform matrix-vector multiplications. if (!maybeStates.isZero()) { // Create the ODD for the translation between symbolic and explicit storage. @@ -339,10 +338,9 @@ namespace storm { infinityStates = !infinityStates && model.getReachableStates(); storm::dd::Bdd maybeStatesWithTargetStates = !infinityStates && model.getReachableStates(); storm::dd::Bdd maybeStates = !targetStates && maybeStatesWithTargetStates; - STORM_LOG_INFO("Found " << infinityStates.getNonZeroCount() << " 'infinity' states."); - STORM_LOG_INFO("Found " << targetStates.getNonZeroCount() << " 'target' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); - + + STORM_LOG_INFO("Preprocessing: " << infinityStates.getNonZeroCount() << " states with reward infinity, " << targetStates.getNonZeroCount() << " target states (" << maybeStates.getNonZeroCount() << " states remaining)."); + // Check whether we need to compute exact rewards for some states. if (qualitative) { // Set the values for all maybe-states to 1 to indicate that their reward values diff --git a/src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp index 6107e3acb..67db97164 100644 --- a/src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp @@ -40,9 +40,10 @@ namespace storm { } else { maybeStates = storm::utility::graph::performProbGreater0(backwardTransitions, phiStates, psiStates, true, stepBound); maybeStates &= ~psiStates; - STORM_LOG_INFO("Found " << maybeStates.getNumberOfSetBits() << " 'maybe' states."); } + STORM_LOG_INFO("Preprocessing: " << maybeStates.getNumberOfSetBits() << " non-target states with probability greater 0."); + storm::utility::vector::setVectorValues(result, psiStates, storm::utility::one()); if (!maybeStates.empty()) { @@ -92,17 +93,17 @@ namespace storm { STORM_LOG_THROW(storm::utility::isZero(resultsForNonMaybeStates[state]), storm::exceptions::IllegalArgumentException, "Expected that the result hint specifies probabilities in {0,1} for non-maybe states"); } } + + STORM_LOG_INFO("Preprocessing: " << statesWithProbability1.getNumberOfSetBits() << " states with probability 1 (" << maybeStates.getNumberOfSetBits() << " states remaining)."); } else { // Get all states that have probability 0 and 1 of satisfying the until-formula. std::pair statesWithProbability01 = storm::utility::graph::performProb01(backwardTransitions, phiStates, psiStates); storm::storage::BitVector statesWithProbability0 = std::move(statesWithProbability01.first); statesWithProbability1 = std::move(statesWithProbability01.second); maybeStates = ~(statesWithProbability0 | statesWithProbability1); - - STORM_LOG_INFO("Found " << statesWithProbability0.getNumberOfSetBits() << " 'no' states."); - STORM_LOG_INFO("Found " << statesWithProbability1.getNumberOfSetBits() << " 'yes' states."); - STORM_LOG_INFO("Found " << maybeStates.getNumberOfSetBits() << " 'maybe' states."); - + + STORM_LOG_INFO("Preprocessing: " << statesWithProbability1.getNumberOfSetBits() << " states with probability 1, " << statesWithProbability0.getNumberOfSetBits() << " with probability 0 (" << maybeStates.getNumberOfSetBits() << " states remaining)."); + // Set values of resulting vector that are known exactly. storm::utility::vector::setVectorValues(result, statesWithProbability0, storm::utility::zero()); storm::utility::vector::setVectorValues(result, statesWithProbability1, storm::utility::one()); @@ -246,15 +247,15 @@ namespace storm { if (hint.isExplicitModelCheckerHint() && hint.template asExplicitModelCheckerHint().getComputeOnlyMaybeStates()) { maybeStates = hint.template asExplicitModelCheckerHint().getMaybeStates(); storm::utility::vector::setVectorValues(result, ~(maybeStates | targetStates), storm::utility::infinity()); + + STORM_LOG_INFO("Preprocessing: " << targetStates.getNumberOfSetBits() << " target states (" << maybeStates.getNumberOfSetBits() << " states remaining)."); } else { storm::storage::BitVector trueStates(transitionMatrix.getRowCount(), true); storm::storage::BitVector infinityStates = storm::utility::graph::performProb1(backwardTransitions, trueStates, targetStates); infinityStates.complement(); maybeStates = ~(targetStates | infinityStates); - STORM_LOG_INFO("Found " << infinityStates.getNumberOfSetBits() << " 'infinity' states."); - STORM_LOG_INFO("Found " << targetStates.getNumberOfSetBits() << " 'target' states."); - STORM_LOG_INFO("Found " << maybeStates.getNumberOfSetBits() << " 'maybe' states."); + STORM_LOG_INFO("Preprocessing: " << infinityStates.getNumberOfSetBits() << " states with reward infinity, " << targetStates.getNumberOfSetBits() << " target states (" << maybeStates.getNumberOfSetBits() << " states remaining)."); storm::utility::vector::setVectorValues(result, infinityStates, storm::utility::infinity()); } diff --git a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp index 85713333a..3d135248e 100644 --- a/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp @@ -52,9 +52,10 @@ namespace storm { maybeStates = storm::utility::graph::performProbGreater0E(backwardTransitions, phiStates, psiStates, true, stepBound); } maybeStates &= ~psiStates; - STORM_LOG_INFO("Found " << maybeStates.getNumberOfSetBits() << " 'maybe' states."); } + STORM_LOG_INFO("Preprocessing: " << maybeStates.getNumberOfSetBits() << " non-target states with probability greater 0."); + if (!maybeStates.empty()) { // We can eliminate the rows and columns from the original transition probability matrix that have probability 0. storm::storage::SparseMatrix submatrix = transitionMatrix.getSubmatrix(true, maybeStates, maybeStates, false); @@ -404,9 +405,6 @@ namespace storm { result.statesWithProbability0 = std::move(statesWithProbability01.first); result.statesWithProbability1 = std::move(statesWithProbability01.second); result.maybeStates = ~(result.statesWithProbability0 | result.statesWithProbability1); - STORM_LOG_INFO("Found " << result.statesWithProbability0.getNumberOfSetBits() << " 'no' states."); - STORM_LOG_INFO("Found " << result.statesWithProbability1.getNumberOfSetBits() << " 'yes' states."); - STORM_LOG_INFO("Found " << result.maybeStates.getNumberOfSetBits() << " 'maybe' states."); return result; } @@ -687,6 +685,8 @@ namespace storm { // that is strictly between 0 and 1) and the states that satisfy the formula with probablity 1 and 0, respectively. QualitativeStateSetsUntilProbabilities qualitativeStateSets = getQualitativeStateSetsUntilProbabilities(goal, transitionMatrix, backwardTransitions, phiStates, psiStates, hint); + STORM_LOG_INFO("Preprocessing: " << qualitativeStateSets.statesWithProbability1.getNumberOfSetBits() << " states with probability 1, " << qualitativeStateSets.statesWithProbability0.getNumberOfSetBits() << " with probability 0 (" << qualitativeStateSets.maybeStates.getNumberOfSetBits() << " states remaining)."); + // Set values of resulting vector that are known exactly. storm::utility::vector::setVectorValues(result, qualitativeStateSets.statesWithProbability1, storm::utility::one()); @@ -870,9 +870,6 @@ namespace storm { } result.infinityStates.complement(); result.maybeStates = ~(targetStates | result.infinityStates); - STORM_LOG_INFO("Found " << result.infinityStates.getNumberOfSetBits() << " 'infinity' states."); - STORM_LOG_INFO("Found " << targetStates.getNumberOfSetBits() << " 'target' states."); - STORM_LOG_INFO("Found " << result.maybeStates.getNumberOfSetBits() << " 'maybe' states."); return result; } @@ -1019,6 +1016,9 @@ namespace storm { // Determine which states have a reward that is infinity or less than infinity. QualitativeStateSetsReachabilityRewards qualitativeStateSets = getQualitativeStateSetsReachabilityRewards(goal, transitionMatrix, backwardTransitions, targetStates, hint); + + STORM_LOG_INFO("Preprocessing: " << qualitativeStateSets.infinityStates.getNumberOfSetBits() << " states with reward infinity, " << targetStates.getNumberOfSetBits() << " target states (" << qualitativeStateSets.maybeStates.getNumberOfSetBits() << " states remaining)."); + storm::utility::vector::setVectorValues(result, qualitativeStateSets.infinityStates, storm::utility::infinity()); // If requested, we will produce a scheduler. diff --git a/src/storm/modelchecker/prctl/helper/SymbolicDtmcPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SymbolicDtmcPrctlHelper.cpp index c54d15b92..cf8019aea 100644 --- a/src/storm/modelchecker/prctl/helper/SymbolicDtmcPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SymbolicDtmcPrctlHelper.cpp @@ -25,10 +25,7 @@ namespace storm { std::pair, storm::dd::Bdd> statesWithProbability01 = storm::utility::graph::performProb01(model, transitionMatrix, phiStates, psiStates); storm::dd::Bdd maybeStates = !statesWithProbability01.first && !statesWithProbability01.second && model.getReachableStates(); - // Perform some logging. - STORM_LOG_INFO("Found " << statesWithProbability01.first.getNonZeroCount() << " 'no' states."); - STORM_LOG_INFO("Found " << statesWithProbability01.second.getNonZeroCount() << " 'yes' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); + STORM_LOG_INFO("Preprocessing: " << statesWithProbability01.first.getNonZeroCount() << " states with probability 1, " << statesWithProbability01.second.getNonZeroCount() << " with probability 0 (" << maybeStates.getNonZeroCount() << " states remaining)."); // Check whether we need to compute exact probabilities for some states. if (qualitative) { @@ -146,9 +143,8 @@ namespace storm { storm::dd::Bdd infinityStates = storm::utility::graph::performProb1(model, transitionMatrix.notZero(), model.getReachableStates(), targetStates); infinityStates = !infinityStates && model.getReachableStates(); storm::dd::Bdd maybeStates = (!targetStates && !infinityStates) && model.getReachableStates(); - STORM_LOG_INFO("Found " << infinityStates.getNonZeroCount() << " 'infinity' states."); - STORM_LOG_INFO("Found " << targetStates.getNonZeroCount() << " 'target' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); + + STORM_LOG_INFO("Preprocessing: " << infinityStates.getNonZeroCount() << " states with reward infinity, " << targetStates.getNonZeroCount() << " target states (" << maybeStates.getNonZeroCount() << " states remaining)."); // Check whether we need to compute exact rewards for some states. if (qualitative) { diff --git a/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp b/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp index c6231a5eb..bca6bec0f 100644 --- a/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp +++ b/src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp @@ -49,10 +49,7 @@ namespace storm { storm::dd::Bdd maybeStates = !statesWithProbability01.first && !statesWithProbability01.second && model.getReachableStates(); - // Perform some logging. - STORM_LOG_INFO("Found " << statesWithProbability01.first.getNonZeroCount() << " 'no' states."); - STORM_LOG_INFO("Found " << statesWithProbability01.second.getNonZeroCount() << " 'yes' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); + STORM_LOG_INFO("Preprocessing: " << statesWithProbability01.first.getNonZeroCount() << " states with probability 1, " << statesWithProbability01.second.getNonZeroCount() << " with probability 0 (" << maybeStates.getNonZeroCount() << " states remaining)."); // Check whether we need to compute exact probabilities for some states. if (qualitative) { @@ -199,7 +196,6 @@ namespace storm { storm::dd::Bdd infinityStates; storm::dd::Bdd transitionMatrixBdd = transitionMatrix.notZero(); if (dir == OptimizationDirection::Minimize) { - STORM_LOG_WARN("Results of reward computation may be too low, because of zero-reward loops."); infinityStates = storm::utility::graph::performProb1E(model, transitionMatrixBdd, model.getReachableStates(), targetStates, storm::utility::graph::performProbGreater0E(model, transitionMatrixBdd, model.getReachableStates(), targetStates)); } else { infinityStates = storm::utility::graph::performProb1A(model, transitionMatrixBdd, targetStates, storm::utility::graph::performProbGreater0A(model, transitionMatrixBdd, model.getReachableStates(), targetStates)); @@ -207,10 +203,9 @@ namespace storm { infinityStates = !infinityStates && model.getReachableStates(); storm::dd::Bdd maybeStates = (!targetStates && !infinityStates) && model.getReachableStates(); - STORM_LOG_INFO("Found " << infinityStates.getNonZeroCount() << " 'infinity' states."); - STORM_LOG_INFO("Found " << targetStates.getNonZeroCount() << " 'target' states."); - STORM_LOG_INFO("Found " << maybeStates.getNonZeroCount() << " 'maybe' states."); + STORM_LOG_INFO("Preprocessing: " << infinityStates.getNonZeroCount() << " states with reward infinity, " << targetStates.getNonZeroCount() << " target states (" << maybeStates.getNonZeroCount() << " states remaining)."); + // Check whether we need to compute exact rewards for some states. if (qualitative) { // Set the values for all maybe-states to 1 to indicate that their reward values diff --git a/src/storm/settings/SettingsManager.cpp b/src/storm/settings/SettingsManager.cpp index e38c5daf2..b271ca581 100644 --- a/src/storm/settings/SettingsManager.cpp +++ b/src/storm/settings/SettingsManager.cpp @@ -61,7 +61,6 @@ namespace storm { this->executableName = executableName; } - void SettingsManager::setFromCommandLine(int const argc, char const * const argv[]) { // We convert the arguments to a vector of strings and strip off the first element since it refers to the // name of the program. @@ -289,7 +288,6 @@ namespace storm { this->addOption(option); } } - } void SettingsManager::addOption(std::shared_ptr