diff --git a/src/storm/modelchecker/parametric/RegionChecker.cpp b/src/storm/modelchecker/parametric/RegionChecker.cpp index 78eccbccc..3ded35806 100644 --- a/src/storm/modelchecker/parametric/RegionChecker.cpp +++ b/src/storm/modelchecker/parametric/RegionChecker.cpp @@ -30,7 +30,7 @@ namespace storm { } template - RegionChecker::RegionChecker(SparseModelType const& parametricModel) : parametricModel(parametricModel) { + RegionChecker::RegionChecker(SparseModelType const& parametricModel) : parametricModel(parametricModel), numOfCorrectedRegions(0) { initializationStopwatch.start(); STORM_LOG_THROW(parametricModel.getInitialStates().getNumberOfSetBits() == 1, storm::exceptions::NotSupportedException, "Parameter lifting requires models with only one initial state"); initializationStopwatch.stop(); @@ -130,6 +130,7 @@ namespace storm { if(!exactParameterLiftingChecker->check(region, this->currentCheckTask->getOptimizationDirection())->asExplicitQualitativeCheckResult()[*getConsideredParametricModel().getInitialStates().begin()]) { // Numerical result is wrong; Check whether the region is AllViolated! STORM_LOG_INFO("Numerical result was wrong for one region... Applying exact methods to obtain the actual result..."); + ++numOfCorrectedRegions; if(!exactParameterLiftingChecker->check(region, storm::solver::invert(this->currentCheckTask->getOptimizationDirection()))->asExplicitQualitativeCheckResult()[*getConsideredParametricModel().getInitialStates().begin()]) { parameterLiftingCheckerStopwatch.stop(); return RegionCheckResult::AllViolated; @@ -142,6 +143,7 @@ namespace storm { if(exactParameterLiftingChecker->check(region, storm::solver::invert(this->currentCheckTask->getOptimizationDirection()))->asExplicitQualitativeCheckResult()[*getConsideredParametricModel().getInitialStates().begin()]) { // Numerical result is wrong; Check whether the region is AllSat! STORM_LOG_INFO("Numerical result was wrong for one region... Applying exact methods to obtain the actual result..."); + ++numOfCorrectedRegions; if(exactParameterLiftingChecker->check(region, this->currentCheckTask->getOptimizationDirection())->asExplicitQualitativeCheckResult()[*getConsideredParametricModel().getInitialStates().begin()]) { parameterLiftingCheckerStopwatch.stop(); return RegionCheckResult::AllSat; @@ -169,6 +171,7 @@ namespace storm { std::vector, RegionCheckResult>> result; unprocessedRegions.emplace(region, RegionCheckResult::Unknown); uint_fast64_t numOfAnalyzedRegions = 0; + numOfCorrectedRegions = 0; CoefficientType displayedProgress = storm::utility::zero(); if (storm::settings::getModule().isShowStatisticsSet()) { STORM_PRINT_AND_LOG("Progress (solved fraction) :" << std::endl << "0% ["); @@ -235,6 +238,9 @@ namespace storm { STORM_PRINT_AND_LOG("Parameter Lifting Statistics:" << std::endl); STORM_PRINT_AND_LOG(" Analyzed a total of " << numOfAnalyzedRegions << " regions." << std::endl); + if (settings.applyExactValidation) { + STORM_PRINT_AND_LOG(" Exact validation corrected " << numOfCorrectedRegions << " regions." << std::endl); + } STORM_PRINT_AND_LOG(" Initialization took " << initializationStopwatch << " seconds." << std::endl); STORM_PRINT_AND_LOG(" Checking sampled models took " << instantiationCheckerStopwatch << " seconds." << std::endl); STORM_PRINT_AND_LOG(" Checking lifted models took " << parameterLiftingCheckerStopwatch << " seconds." << std::endl); diff --git a/src/storm/modelchecker/parametric/RegionChecker.h b/src/storm/modelchecker/parametric/RegionChecker.h index 680ab361c..64bdcd580 100644 --- a/src/storm/modelchecker/parametric/RegionChecker.h +++ b/src/storm/modelchecker/parametric/RegionChecker.h @@ -72,11 +72,12 @@ namespace storm { std::unique_ptr> parameterLiftingChecker; - std::unique_ptr> exactParameterLiftingChecker; // todo: use template argument instead of rational number - //std::unique_ptr> exactParameterLiftingChecker; + std::unique_ptr> exactParameterLiftingChecker; std::unique_ptr> instantiationChecker; + // Information for statistics mutable storm::utility::Stopwatch initializationStopwatch, instantiationCheckerStopwatch, parameterLiftingCheckerStopwatch; + mutable uint_fast64_t numOfCorrectedRegions; }; } //namespace parametric