diff --git a/src/storm/modelchecker/parametric/ParameterLifting.cpp b/src/storm/modelchecker/parametric/RegionChecker.cpp similarity index 88% rename from src/storm/modelchecker/parametric/ParameterLifting.cpp rename to src/storm/modelchecker/parametric/RegionChecker.cpp index 0633c8cce..7a37266be 100644 --- a/src/storm/modelchecker/parametric/ParameterLifting.cpp +++ b/src/storm/modelchecker/parametric/RegionChecker.cpp @@ -1,7 +1,7 @@ #include #include -#include "storm/modelchecker/parametric/ParameterLifting.h" +#include "storm/modelchecker/parametric/RegionChecker.h" #include "storm/adapters/CarlAdapter.h" @@ -25,29 +25,29 @@ namespace storm { namespace modelchecker { namespace parametric { - ParameterLiftingSettings::ParameterLiftingSettings() { + RegionCheckerSettings::RegionCheckerSettings() { this->applyExactValidation = storm::settings::getModule().isExactValidationSet(); } template - ParameterLifting::ParameterLifting(SparseModelType const& parametricModel) : parametricModel(parametricModel) { + RegionChecker::RegionChecker(SparseModelType const& parametricModel) : parametricModel(parametricModel) { initializationStopwatch.start(); STORM_LOG_THROW(parametricModel.getInitialStates().getNumberOfSetBits() == 1, storm::exceptions::NotSupportedException, "Parameter lifting requires models with only one initial state"); initializationStopwatch.stop(); } template - ParameterLiftingSettings const& ParameterLifting::getSettings() const { + RegionCheckerSettings const& RegionChecker::getSettings() const { return settings; } template - void ParameterLifting::setSettings(ParameterLiftingSettings const& newSettings) { + void RegionChecker::setSettings(RegionCheckerSettings const& newSettings) { settings = newSettings; } template - void ParameterLifting::specifyFormula(CheckTask const& checkTask) { + void RegionChecker::specifyFormula(CheckTask const& checkTask) { initializationStopwatch.start(); STORM_LOG_THROW(checkTask.isOnlyInitialStatesRelevantSet(), storm::exceptions::NotSupportedException, "Parameter lifting requires a property where only the value in the initial states is relevant."); STORM_LOG_THROW(checkTask.isBoundSet(), storm::exceptions::NotSupportedException, "Parameter lifting requires a bounded property."); @@ -68,7 +68,7 @@ namespace storm { } template - RegionCheckResult ParameterLifting::analyzeRegion(storm::storage::ParameterRegion const& region, RegionCheckResult const& initialResult, bool sampleVerticesOfRegion) { + RegionCheckResult RegionChecker::analyzeRegion(storm::storage::ParameterRegion const& region, RegionCheckResult const& initialResult, bool sampleVerticesOfRegion) { RegionCheckResult result = initialResult; // Check if we need to check the formula on one point to decide whether to show AllSat or AllViolated @@ -120,7 +120,7 @@ namespace storm { } template - RegionCheckResult ParameterLifting::analyzeRegionExactValidation(storm::storage::ParameterRegion const& region, RegionCheckResult const& initialResult) { + RegionCheckResult RegionChecker::analyzeRegionExactValidation(storm::storage::ParameterRegion const& region, RegionCheckResult const& initialResult) { RegionCheckResult numericResult = analyzeRegion(region, initialResult, false); parameterLiftingCheckerStopwatch.start(); if (numericResult == RegionCheckResult::AllSat || numericResult == RegionCheckResult::AllViolated) { @@ -157,7 +157,7 @@ namespace storm { template - std::vector, RegionCheckResult>> ParameterLifting::performRegionRefinement(storm::storage::ParameterRegion const& region, CoefficientType const& threshold) { + std::vector, RegionCheckResult>> RegionChecker::performRegionRefinement(storm::storage::ParameterRegion const& region, CoefficientType const& threshold) { STORM_LOG_INFO("Applying refinement on region: " << region.toString(true) << " ."); auto areaOfParameterSpace = region.area(); @@ -243,7 +243,7 @@ namespace storm { } template - SparseModelType const& ParameterLifting::getConsideredParametricModel() const { + SparseModelType const& RegionChecker::getConsideredParametricModel() const { if (simplifiedModel) { return *simplifiedModel; } else { @@ -252,7 +252,7 @@ namespace storm { } template - std::string ParameterLifting::visualizeResult(std::vector, RegionCheckResult>> const& result, storm::storage::ParameterRegion const& parameterSpace, typename storm::storage::ParameterRegion::VariableType const& x, typename storm::storage::ParameterRegion::VariableType const& y) { + std::string RegionChecker::visualizeResult(std::vector, RegionCheckResult>> const& result, storm::storage::ParameterRegion const& parameterSpace, typename storm::storage::ParameterRegion::VariableType const& x, typename storm::storage::ParameterRegion::VariableType const& y) { std::stringstream stream; @@ -306,10 +306,10 @@ namespace storm { } #ifdef STORM_HAVE_CARL - template class ParameterLifting, double>; - template class ParameterLifting, double>; - template class ParameterLifting, storm::RationalNumber>; - template class ParameterLifting, storm::RationalNumber>; + template class RegionChecker, double>; + template class RegionChecker, double>; + template class RegionChecker, storm::RationalNumber>; + template class RegionChecker, storm::RationalNumber>; #endif } // namespace parametric } //namespace modelchecker diff --git a/src/storm/modelchecker/parametric/ParameterLifting.h b/src/storm/modelchecker/parametric/RegionChecker.h similarity index 91% rename from src/storm/modelchecker/parametric/ParameterLifting.h rename to src/storm/modelchecker/parametric/RegionChecker.h index bb0e9f111..f057106e8 100644 --- a/src/storm/modelchecker/parametric/ParameterLifting.h +++ b/src/storm/modelchecker/parametric/RegionChecker.h @@ -13,24 +13,24 @@ namespace storm { namespace modelchecker{ namespace parametric{ - struct ParameterLiftingSettings { - ParameterLiftingSettings(); + struct RegionCheckerSettings { + RegionCheckerSettings(); bool applyExactValidation; }; template - class ParameterLifting { + class RegionChecker { public: typedef typename storm::storage::ParameterRegion::CoefficientType CoefficientType; - ParameterLifting(SparseModelType const& parametricModel); - virtual ~ParameterLifting() = default; + RegionChecker(SparseModelType const& parametricModel); + virtual ~RegionChecker() = default; - ParameterLiftingSettings const& getSettings() const; - void setSettings(ParameterLiftingSettings const& newSettings); + RegionCheckerSettings const& getSettings() const; + void setSettings(RegionCheckerSettings const& newSettings); void specifyFormula(CheckTask const& checkTask); @@ -63,7 +63,7 @@ namespace storm { virtual void applyHintsToExactChecker() = 0; SparseModelType const& parametricModel; - ParameterLiftingSettings settings; + RegionCheckerSettings settings; std::unique_ptr> currentCheckTask; std::shared_ptr currentFormula; std::shared_ptr simplifiedModel; diff --git a/src/storm/modelchecker/parametric/SparseDtmcParameterLifting.cpp b/src/storm/modelchecker/parametric/SparseDtmcRegionChecker.cpp similarity index 70% rename from src/storm/modelchecker/parametric/SparseDtmcParameterLifting.cpp rename to src/storm/modelchecker/parametric/SparseDtmcRegionChecker.cpp index d1b35d374..28c4b7f40 100644 --- a/src/storm/modelchecker/parametric/SparseDtmcParameterLifting.cpp +++ b/src/storm/modelchecker/parametric/SparseDtmcRegionChecker.cpp @@ -1,4 +1,4 @@ -#include "storm/modelchecker/parametric/SparseDtmcParameterLifting.h" +#include "storm/modelchecker/parametric/SparseDtmcRegionChecker.h" #include "storm/adapters/CarlAdapter.h" @@ -7,19 +7,19 @@ #include "storm/transformer/SparseParametricDtmcSimplifier.h" #include "storm/models/sparse/StandardRewardModel.h" #include "storm/models/sparse/Dtmc.h" -#include "SparseMdpParameterLifting.h" +#include "SparseMdpRegionChecker.h" namespace storm { namespace modelchecker { namespace parametric { template - SparseDtmcParameterLifting::SparseDtmcParameterLifting(SparseModelType const& parametricModel) : ParameterLifting(parametricModel) { + SparseDtmcRegionChecker::SparseDtmcRegionChecker(SparseModelType const& parametricModel) : RegionChecker(parametricModel) { // Intentionally left empty } template - void SparseDtmcParameterLifting::simplifyParametricModel(CheckTask const& checkTask) { + void SparseDtmcRegionChecker::simplifyParametricModel(CheckTask const& checkTask) { storm::transformer::SparseParametricDtmcSimplifier simplifier(this->parametricModel); if(simplifier.simplify(checkTask.getFormula())) { this->simplifiedModel = simplifier.getSimplifiedModel(); @@ -31,11 +31,11 @@ namespace storm { } template - void SparseDtmcParameterLifting::initializeUnderlyingCheckers() { + void SparseDtmcRegionChecker::initializeUnderlyingCheckers() { if (this->settings.applyExactValidation) { - //STORM_LOG_WARN_COND(!(std::is_same::CoefficientType) , "Exact validation is not necessarry if the original computation is already exact"); + //STORM_LOG_WARN_COND(!(std::is_same::CoefficientType) , "Exact validation is not necessarry if the original computation is already exact"); STORM_LOG_WARN_COND(!(std::is_same::value) , "Exact validation is not necessarry if the original computation is already exact"); - //this->exactParameterLiftingChecker = std::make_unique::CoefficientType>>(this->getConsideredParametricModel()); // todo: use template argument instead of storm::Rational + //this->exactParameterLiftingChecker = std::make_unique::CoefficientType>>(this->getConsideredParametricModel()); // todo: use template argument instead of storm::Rational this->exactParameterLiftingChecker = std::make_unique>(this->getConsideredParametricModel()); } this->parameterLiftingChecker = std::make_unique>(this->getConsideredParametricModel()); @@ -44,11 +44,11 @@ namespace storm { } template - void SparseDtmcParameterLifting::applyHintsToExactChecker() { + void SparseDtmcRegionChecker::applyHintsToExactChecker() { auto dtmcPLChecker = dynamic_cast*>(this->parameterLiftingChecker.get()); STORM_LOG_ASSERT(dtmcPLChecker, "Underlying Parameter lifting checker has unexpected type"); auto exactDtmcPLChecker = dynamic_cast*>(this->exactParameterLiftingChecker.get()); - //auto exactDtmcPLChecker = dynamic_cast::CoefficientType>*>(this->exactParameterLiftingChecker.get()); // todo: use template argument instead of storm::Rational + //auto exactDtmcPLChecker = dynamic_cast::CoefficientType>*>(this->exactParameterLiftingChecker.get()); // todo: use template argument instead of storm::Rational STORM_LOG_ASSERT(exactDtmcPLChecker, "Underlying exact parameter lifting checker has unexpected type"); exactDtmcPLChecker->getCurrentMaxScheduler() = dtmcPLChecker->getCurrentMaxScheduler(); exactDtmcPLChecker->getCurrentMinScheduler() = dtmcPLChecker->getCurrentMinScheduler(); @@ -56,8 +56,8 @@ namespace storm { #ifdef STORM_HAVE_CARL - template class SparseDtmcParameterLifting, double>; - template class SparseDtmcParameterLifting, storm::RationalNumber>; + template class SparseDtmcRegionChecker, double>; + template class SparseDtmcRegionChecker, storm::RationalNumber>; #endif } // namespace parametric } //namespace modelchecker diff --git a/src/storm/modelchecker/parametric/SparseDtmcParameterLifting.h b/src/storm/modelchecker/parametric/SparseDtmcRegionChecker.h similarity index 72% rename from src/storm/modelchecker/parametric/SparseDtmcParameterLifting.h rename to src/storm/modelchecker/parametric/SparseDtmcRegionChecker.h index 3d3e66603..4e0919144 100644 --- a/src/storm/modelchecker/parametric/SparseDtmcParameterLifting.h +++ b/src/storm/modelchecker/parametric/SparseDtmcRegionChecker.h @@ -2,7 +2,7 @@ #include -#include "storm/modelchecker/parametric/ParameterLifting.h" +#include "storm/modelchecker/parametric/RegionChecker.h" namespace storm { namespace modelchecker{ @@ -10,10 +10,10 @@ namespace storm { template - class SparseDtmcParameterLifting : public ParameterLifting { + class SparseDtmcRegionChecker : public RegionChecker { public: - SparseDtmcParameterLifting(SparseModelType const& parametricModel); + SparseDtmcRegionChecker(SparseModelType const& parametricModel); protected: virtual void simplifyParametricModel(CheckTask const& checkTask) override; diff --git a/src/storm/modelchecker/parametric/SparseMdpParameterLifting.cpp b/src/storm/modelchecker/parametric/SparseMdpRegionChecker.cpp similarity index 69% rename from src/storm/modelchecker/parametric/SparseMdpParameterLifting.cpp rename to src/storm/modelchecker/parametric/SparseMdpRegionChecker.cpp index 67fa06d25..e35366024 100644 --- a/src/storm/modelchecker/parametric/SparseMdpParameterLifting.cpp +++ b/src/storm/modelchecker/parametric/SparseMdpRegionChecker.cpp @@ -1,4 +1,4 @@ -#include "storm/modelchecker/parametric/SparseMdpParameterLifting.h" +#include "storm/modelchecker/parametric/SparseMdpRegionChecker.h" #include "storm/adapters/CarlAdapter.h" @@ -7,19 +7,19 @@ #include "storm/transformer/SparseParametricMdpSimplifier.h" #include "storm/models/sparse/StandardRewardModel.h" #include "storm/models/sparse/Mdp.h" -#include "SparseMdpParameterLifting.h" +#include "SparseMdpRegionChecker.h" namespace storm { namespace modelchecker { namespace parametric { template - SparseMdpParameterLifting::SparseMdpParameterLifting(SparseModelType const& parametricModel) : ParameterLifting(parametricModel) { + SparseMdpRegionChecker::SparseMdpRegionChecker(SparseModelType const& parametricModel) : RegionChecker(parametricModel) { // Intentionally left empty } template - void SparseMdpParameterLifting::simplifyParametricModel(CheckTask const& checkTask) { + void SparseMdpRegionChecker::simplifyParametricModel(CheckTask const& checkTask) { storm::transformer::SparseParametricMdpSimplifier simplifier(this->parametricModel); if(simplifier.simplify(checkTask.getFormula())) { this->simplifiedModel = simplifier.getSimplifiedModel(); @@ -31,11 +31,11 @@ namespace storm { } template - void SparseMdpParameterLifting::initializeUnderlyingCheckers() { + void SparseMdpRegionChecker::initializeUnderlyingCheckers() { if (this->settings.applyExactValidation) { - //STORM_LOG_WARN_COND(!(std::is_same::CoefficientType>::value), "Exact validation is not necessarry if the original computation is already exact"); // todo: use templated argument instead of storm::RationalNumber + //STORM_LOG_WARN_COND(!(std::is_same::CoefficientType>::value), "Exact validation is not necessarry if the original computation is already exact"); // todo: use templated argument instead of storm::RationalNumber STORM_LOG_WARN_COND(!(std::is_same::value), "Exact validation is not necessarry if the original computation is already exact"); - //this->exactParameterLiftingChecker = std::make_unique::CoefficientType>>(this->getConsideredParametricModel()); // todo: use templated argument instead of storm::RationalNumber + //this->exactParameterLiftingChecker = std::make_unique::CoefficientType>>(this->getConsideredParametricModel()); // todo: use templated argument instead of storm::RationalNumber this->exactParameterLiftingChecker = std::make_unique>(this->getConsideredParametricModel()); } this->parameterLiftingChecker = std::make_unique>(this->getConsideredParametricModel()); @@ -44,11 +44,11 @@ namespace storm { } template - void SparseMdpParameterLifting::applyHintsToExactChecker() { + void SparseMdpRegionChecker::applyHintsToExactChecker() { auto MdpPLChecker = dynamic_cast*>(this->parameterLiftingChecker.get()); STORM_LOG_ASSERT(MdpPLChecker, "Underlying Parameter lifting checker has unexpected type"); auto exactMdpPLChecker = dynamic_cast*>(this->exactParameterLiftingChecker.get()); -// auto exactMdpPLChecker = dynamic_cast::CoefficientType>*>(this->exactParameterLiftingChecker.get()); // todo: use template argument instead of storm::RationalNumber +// auto exactMdpPLChecker = dynamic_cast::CoefficientType>*>(this->exactParameterLiftingChecker.get()); // todo: use template argument instead of storm::RationalNumber STORM_LOG_ASSERT(exactMdpPLChecker, "Underlying exact parameter lifting checker has unexpected type"); exactMdpPLChecker->getCurrentMaxScheduler() = MdpPLChecker->getCurrentMaxScheduler(); exactMdpPLChecker->getCurrentMinScheduler() = MdpPLChecker->getCurrentMinScheduler(); @@ -57,8 +57,8 @@ namespace storm { #ifdef STORM_HAVE_CARL - template class SparseMdpParameterLifting, double>; - template class SparseMdpParameterLifting, storm::RationalNumber>; + template class SparseMdpRegionChecker, double>; + template class SparseMdpRegionChecker, storm::RationalNumber>; #endif } // namespace parametric } //namespace modelchecker diff --git a/src/storm/modelchecker/parametric/SparseMdpParameterLifting.h b/src/storm/modelchecker/parametric/SparseMdpRegionChecker.h similarity index 73% rename from src/storm/modelchecker/parametric/SparseMdpParameterLifting.h rename to src/storm/modelchecker/parametric/SparseMdpRegionChecker.h index 36ee94d85..1776a3866 100644 --- a/src/storm/modelchecker/parametric/SparseMdpParameterLifting.h +++ b/src/storm/modelchecker/parametric/SparseMdpRegionChecker.h @@ -2,7 +2,7 @@ #include -#include "storm/modelchecker/parametric/ParameterLifting.h" +#include "storm/modelchecker/parametric/RegionChecker.h" namespace storm { namespace modelchecker{ @@ -10,10 +10,10 @@ namespace storm { template - class SparseMdpParameterLifting : public ParameterLifting { + class SparseMdpRegionChecker : public RegionChecker { public: - SparseMdpParameterLifting(SparseModelType const& parametricModel); + SparseMdpRegionChecker(SparseModelType const& parametricModel); protected: diff --git a/src/storm/utility/storm.h b/src/storm/utility/storm.h index fcc9e54c3..6f5d2b5c1 100644 --- a/src/storm/utility/storm.h +++ b/src/storm/utility/storm.h @@ -68,8 +68,8 @@ #include "storm/modelchecker/reachability/SparseDtmcEliminationModelChecker.h" #include "storm/modelchecker/abstraction/GameBasedMdpModelChecker.h" #include "storm/modelchecker/exploration/SparseExplorationModelChecker.h" -#include "storm/modelchecker/parametric/SparseDtmcParameterLifting.h" -#include "storm/modelchecker/parametric/SparseMdpParameterLifting.h" +#include "storm/modelchecker/parametric/SparseDtmcRegionChecker.h" +#include "storm/modelchecker/parametric/SparseMdpRegionChecker.h" #include "storm/utility/parameterlifting.h" #include "storm/modelchecker/csl/SparseCtmcCslModelChecker.h" @@ -352,38 +352,38 @@ namespace storm { if (markovModel->isOfType(storm::models::ModelType::Dtmc)) { if (storm::settings::getModule().isExactSet()) { - storm::modelchecker::parametric::SparseDtmcParameterLifting , storm::RationalNumber> parameterLiftingContext(*markovModel->template as>()); - parameterLiftingContext.specifyFormula(task); - result = parameterLiftingContext.performRegionRefinement(parameterSpace, refinementThreshold); + storm::modelchecker::parametric::SparseDtmcRegionChecker , storm::RationalNumber> regionChecker(*markovModel->template as>()); + regionChecker.specifyFormula(task); + result = regionChecker.performRegionRefinement(parameterSpace, refinementThreshold); parameterLiftingStopWatch.stop(); if (modelParameters.size() == 2) { - resultVisualization = parameterLiftingContext.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); + resultVisualization = regionChecker.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); } } else { - storm::modelchecker::parametric::SparseDtmcParameterLifting , double> parameterLiftingContext(*markovModel->template as>()); - parameterLiftingContext.specifyFormula(task); - result = parameterLiftingContext.performRegionRefinement(parameterSpace, refinementThreshold); + storm::modelchecker::parametric::SparseDtmcRegionChecker , double> regionChecker(*markovModel->template as>()); + regionChecker.specifyFormula(task); + result = regionChecker.performRegionRefinement(parameterSpace, refinementThreshold); parameterLiftingStopWatch.stop(); if (modelParameters.size() == 2) { - resultVisualization = parameterLiftingContext.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); + resultVisualization = regionChecker.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); } } } else if (markovModel->isOfType(storm::models::ModelType::Mdp)) { if (storm::settings::getModule().isExactSet()) { - storm::modelchecker::parametric::SparseMdpParameterLifting, storm::RationalNumber> parameterLiftingContext(*markovModel->template as>()); - parameterLiftingContext.specifyFormula(task); - result = parameterLiftingContext.performRegionRefinement(parameterSpace, refinementThreshold); + storm::modelchecker::parametric::SparseMdpRegionChecker, storm::RationalNumber> regionChecker(*markovModel->template as>()); + regionChecker.specifyFormula(task); + result = regionChecker.performRegionRefinement(parameterSpace, refinementThreshold); parameterLiftingStopWatch.stop(); if (modelParameters.size() == 2) { - resultVisualization = parameterLiftingContext.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); + resultVisualization = regionChecker.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); } } else { - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*markovModel->template as>()); - parameterLiftingContext.specifyFormula(task); - result = parameterLiftingContext.performRegionRefinement(parameterSpace, refinementThreshold); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*markovModel->template as>()); + regionChecker.specifyFormula(task); + result = regionChecker.performRegionRefinement(parameterSpace, refinementThreshold); parameterLiftingStopWatch.stop(); if (modelParameters.size() == 2) { - resultVisualization = parameterLiftingContext.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); + resultVisualization = regionChecker.visualizeResult(result, parameterSpace, *modelParameters.begin(), *(modelParameters.rbegin())); } } } else { diff --git a/src/test/modelchecker/SparseDtmcParameterLiftingTest.cpp b/src/test/modelchecker/SparseDtmcParameterLiftingTest.cpp index a23730974..ddffd4f06 100644 --- a/src/test/modelchecker/SparseDtmcParameterLiftingTest.cpp +++ b/src/test/modelchecker/SparseDtmcParameterLiftingTest.cpp @@ -7,7 +7,7 @@ #include "utility/storm.h" #include "storm/models/sparse/Model.h" -#include "modelchecker/parametric/SparseDtmcParameterLifting.h" +#include "modelchecker/parametric/SparseDtmcRegionChecker.h" TEST(SparseDtmcParameterLiftingTest, Brp_Prob) { @@ -25,17 +25,17 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Prob) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pL<=0.9,0.75<=pK<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.4<=pL<=0.65,0.75<=pK<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pL<=0.73,0.2<=pK<=0.715", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -55,17 +55,17 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Rew) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.875,0.75<=TOMsg<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.6<=pK<=0.9,0.5<=TOMsg<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.3,0.2<=TOMsg<=0.3", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -85,17 +85,17 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Rew_Bounded) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.875,0.75<=TOMsg<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.6<=pK<=0.9,0.5<=TOMsg<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.3,0.2<=TOMsg<=0.3", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -116,20 +116,20 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Prob_exactValidation) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - auto settings = parameterLiftingContext.getSettings(); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + auto settings = regionChecker.getSettings(); settings.applyExactValidation = true; - parameterLiftingContext.setSettings(settings); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + regionChecker.setSettings(settings); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pL<=0.9,0.75<=pK<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.4<=pL<=0.65,0.75<=pK<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pL<=0.73,0.2<=pK<=0.715", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -149,20 +149,20 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Rew_exactValidation) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - auto settings = parameterLiftingContext.getSettings(); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + auto settings = regionChecker.getSettings(); settings.applyExactValidation = true; - parameterLiftingContext.setSettings(settings); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + regionChecker.setSettings(settings); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.875,0.75<=TOMsg<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.6<=pK<=0.9,0.5<=TOMsg<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.3,0.2<=TOMsg<=0.3", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -182,20 +182,20 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Rew_Bounded_exactValidation) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - auto settings = parameterLiftingContext.getSettings(); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + auto settings = regionChecker.getSettings(); settings.applyExactValidation = true; - parameterLiftingContext.setSettings(settings); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + regionChecker.setSettings(settings); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.875,0.75<=TOMsg<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.6<=pK<=0.9,0.5<=TOMsg<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.3,0.2<=TOMsg<=0.3", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -215,13 +215,13 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Rew_Infty) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.9,0.6<=pL<=0.85,0.9<=TOMsg<=0.95,0.85<=TOAck<=0.9", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -241,17 +241,17 @@ TEST(SparseDtmcParameterLiftingTest, Brp_Rew_4Par) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.9,0.6<=pL<=0.85,0.9<=TOMsg<=0.95,0.85<=TOAck<=0.9", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.7,0.2<=pL<=0.8,0.15<=TOMsg<=0.65,0.3<=TOAck<=0.9", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.4,0.2<=pL<=0.3,0.15<=TOMsg<=0.3,0.1<=TOAck<=0.2", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -272,8 +272,8 @@ TEST(SparseDtmcParameterLiftingTest, Crowds_Prob) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.1<=PF<=0.75,0.15<=badC<=0.2", modelParameters); @@ -281,10 +281,10 @@ TEST(SparseDtmcParameterLiftingTest, Crowds_Prob) { auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.8<=PF<=0.95,0.2<=badC<=0.2", modelParameters); auto allVioHardRegion=storm::storage::ParameterRegion::parseRegion("0.8<=PF<=0.95,0.2<=badC<=0.9", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::CenterViolated, parameterLiftingContext.analyzeRegion(allVioHardRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::CenterViolated, regionChecker.analyzeRegion(allVioHardRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -305,8 +305,8 @@ TEST(SparseDtmcParameterLiftingTest, Crowds_Prob_stepBounded) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.1<=PF<=0.75,0.15<=badC<=0.2", modelParameters); @@ -314,10 +314,10 @@ TEST(SparseDtmcParameterLiftingTest, Crowds_Prob_stepBounded) { auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.8<=PF<=0.95,0.2<=badC<=0.2", modelParameters); auto allVioHardRegion=storm::storage::ParameterRegion::parseRegion("0.8<=PF<=0.95,0.2<=badC<=0.9", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::CenterViolated, parameterLiftingContext.analyzeRegion(allVioHardRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::CenterViolated, regionChecker.analyzeRegion(allVioHardRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -339,17 +339,17 @@ TEST(SparseDtmcParameterLiftingTest, Crowds_Prob_1Par) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.9<=PF<=0.99", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.8<=PF<=0.9", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.01<=PF<=0.8", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -370,13 +370,13 @@ TEST(SparseDtmcParameterLiftingTest, Crowds_Prob_Const) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseDtmcParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseDtmcRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } diff --git a/src/test/modelchecker/SparseMdpParameterLiftingTest.cpp b/src/test/modelchecker/SparseMdpParameterLiftingTest.cpp index fbff0646a..cb15b9aaf 100644 --- a/src/test/modelchecker/SparseMdpParameterLiftingTest.cpp +++ b/src/test/modelchecker/SparseMdpParameterLiftingTest.cpp @@ -7,7 +7,7 @@ #include "utility/storm.h" #include "storm/models/sparse/Model.h" -#include "storm/modelchecker/parametric/SparseMdpParameterLifting.h" +#include "storm/modelchecker/parametric/SparseMdpRegionChecker.h" TEST(SparseMdpParameterLiftingTest, two_dice_Prob) { @@ -24,17 +24,17 @@ TEST(SparseMdpParameterLiftingTest, two_dice_Prob) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); auto allSatRegion = storm::storage::ParameterRegion::parseRegion("0.495<=p1<=0.5,0.5<=p2<=0.505", modelParameters); auto exBothRegion = storm::storage::ParameterRegion::parseRegion("0.45<=p1<=0.55,0.45<=p2<=0.55", modelParameters); auto allVioRegion = storm::storage::ParameterRegion::parseRegion("0.6<=p1<=0.7,0.6<=p2<=0.6", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -54,17 +54,17 @@ TEST(SparseMdpParameterLiftingTest, two_dice_Prob_bounded) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); auto allSatRegion = storm::storage::ParameterRegion::parseRegion("0.495<=p1<=0.5,0.5<=p2<=0.505", modelParameters); auto exBothRegion = storm::storage::ParameterRegion::parseRegion("0.45<=p1<=0.55,0.45<=p2<=0.55", modelParameters); auto allVioRegion = storm::storage::ParameterRegion::parseRegion("0.6<=p1<=0.7,0.6<=p2<=0.6", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -84,17 +84,17 @@ TEST(SparseMdpParameterLiftingTest, two_dice_Prob_exactValidation) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); auto allSatRegion = storm::storage::ParameterRegion::parseRegion("0.495<=p1<=0.5,0.5<=p2<=0.505", modelParameters); auto exBothRegion = storm::storage::ParameterRegion::parseRegion("0.45<=p1<=0.55,0.45<=p2<=0.55", modelParameters); auto allVioRegion = storm::storage::ParameterRegion::parseRegion("0.6<=p1<=0.7,0.6<=p2<=0.6", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -114,17 +114,17 @@ TEST(SparseMdpParameterLiftingTest, two_dice_Prob_bounded_exactValidation) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); auto allSatRegion = storm::storage::ParameterRegion::parseRegion("0.495<=p1<=0.5,0.5<=p2<=0.505", modelParameters); auto exBothRegion = storm::storage::ParameterRegion::parseRegion("0.45<=p1<=0.55,0.45<=p2<=0.55", modelParameters); auto allVioRegion = storm::storage::ParameterRegion::parseRegion("0.6<=p1<=0.7,0.6<=p2<=0.6", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -142,17 +142,17 @@ TEST(SparseMdpParameterLiftingTest, coin_Prob) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion = storm::storage::ParameterRegion::parseRegion("0.3<=p1<=0.45,0.2<=p2<=0.54", modelParameters); auto exBothRegion = storm::storage::ParameterRegion::parseRegion("0.4<=p1<=0.65,0.5<=p2<=0.7", modelParameters); auto allVioRegion = storm::storage::ParameterRegion::parseRegion("0.4<=p1<=0.7,0.55<=p2<=0.6", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -172,17 +172,17 @@ TEST(SparseMdpParameterLiftingTest, brp_Prop) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pL<=0.9,0.75<=pK<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.4<=pL<=0.65,0.75<=pK<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pL<=0.73,0.2<=pK<=0.715", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -203,17 +203,17 @@ TEST(SparseMdpParameterLiftingTest, brp_Rew) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.875,0.75<=TOMsg<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.6<=pK<=0.9,0.5<=TOMsg<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.3,0.2<=TOMsg<=0.3", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -233,17 +233,17 @@ TEST(SparseMdpParameterLiftingTest, brp_Rew_bounded) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.875,0.75<=TOMsg<=0.95", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.6<=pK<=0.9,0.5<=TOMsg<=0.95", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.3,0.2<=TOMsg<=0.3", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -264,13 +264,13 @@ TEST(SparseMdpParameterLiftingTest, Brp_Rew_Infty) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.9,0.6<=pL<=0.85,0.9<=TOMsg<=0.95,0.85<=TOAck<=0.9", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); } @@ -290,17 +290,17 @@ TEST(SparseMdpParameterLiftingTest, Brp_Rew_4Par) { auto rewParameters = storm::models::sparse::getRewardParameters(*model); modelParameters.insert(rewParameters.begin(), rewParameters.end()); - storm::modelchecker::parametric::SparseMdpParameterLifting, double> parameterLiftingContext(*model); - parameterLiftingContext.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); + storm::modelchecker::parametric::SparseMdpRegionChecker, double> regionChecker(*model); + regionChecker.specifyFormula(storm::modelchecker::CheckTask(*formulas[0], true)); //start testing auto allSatRegion=storm::storage::ParameterRegion::parseRegion("0.7<=pK<=0.9,0.6<=pL<=0.85,0.9<=TOMsg<=0.95,0.85<=TOAck<=0.9", modelParameters); auto exBothRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.7,0.2<=pL<=0.8,0.15<=TOMsg<=0.65,0.3<=TOAck<=0.9", modelParameters); auto allVioRegion=storm::storage::ParameterRegion::parseRegion("0.1<=pK<=0.4,0.2<=pL<=0.3,0.15<=TOMsg<=0.3,0.1<=TOAck<=0.2", modelParameters); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, parameterLiftingContext.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, parameterLiftingContext.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); - EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, parameterLiftingContext.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllSat, regionChecker.analyzeRegion(allSatRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::ExistsBoth, regionChecker.analyzeRegion(exBothRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); + EXPECT_EQ(storm::modelchecker::parametric::RegionCheckResult::AllViolated, regionChecker.analyzeRegion(allVioRegion, storm::modelchecker::parametric::RegionCheckResult::Unknown, true)); carl::VariablePool::getInstance().clear(); }