15TEST(SparseDtmcEliminationModelCheckerTest, Die) {
17 STORM_TEST_RESOURCES_DIR
"/tra/die.tra", STORM_TEST_RESOURCES_DIR
"/lab/die.lab",
"", STORM_TEST_RESOURCES_DIR
"/rew/die.coin_flips.trans.rew");
26 ASSERT_EQ(dtmc->getNumberOfStates(), 13ull);
27 ASSERT_EQ(dtmc->getNumberOfTransitions(), 20ull);
33 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.
check(*formula);
36 EXPECT_NEAR(1.0 / 6.0, quantitativeResult1[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
40 result = checker.
check(*formula);
43 EXPECT_NEAR(1.0 / 6.0, quantitativeResult2[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
47 result = checker.
check(*formula);
50 EXPECT_NEAR(1.0 / 6.0, quantitativeResult3[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
54 result = checker.
check(*formula);
57 EXPECT_NEAR(11.0 / 3.0, quantitativeResult4[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
60TEST(SparseDtmcEliminationModelCheckerTest, Crowds) {
61 std::shared_ptr<storm::models::sparse::Model<double>> abstractModel =
71 ASSERT_EQ(8607ull, dtmc->getNumberOfStates());
72 ASSERT_EQ(15113ull, dtmc->getNumberOfTransitions());
78 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.
check(*formula);
81 EXPECT_NEAR(0.3328800375801578281, quantitativeResult1[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
85 result = checker.
check(*formula);
88 EXPECT_NEAR(0.1522194965, quantitativeResult2[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
92 result = checker.
check(*formula);
95 EXPECT_NEAR(0.32153724292835045, quantitativeResult3[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
102 EXPECT_NEAR(0.15330064292476167, quantitativeResult4[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
109 EXPECT_NEAR(0.96592521978041668, quantitativeResult5[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
112TEST(SparseDtmcEliminationModelCheckerTest, SynchronousLeader) {
113 std::shared_ptr<storm::models::sparse::Model<double>> abstractModel =
115 STORM_TEST_RESOURCES_DIR
"/rew/leader4_8.pick.trans.rew");
123 ASSERT_EQ(12400ull, dtmc->getNumberOfStates());
124 ASSERT_EQ(16495ull, dtmc->getNumberOfTransitions());
130 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.
check(*formula);
133 EXPECT_NEAR(1.0, quantitativeResult1[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
137 result = checker.
check(*formula);
140 EXPECT_NEAR(1.0448979, quantitativeResult2[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
static std::shared_ptr< storm::models::sparse::Model< ValueType, storm::models::sparse::StandardRewardModel< RewardValueType > > > parseModel(std::string const &transitionsFilename, std::string const &labelingFilename, std::string const &stateRewardFilename="", std::string const &transitionRewardFilename="", std::string const &choiceLabelingFilename="")
Checks the given files and parses the model within these files.