13TEST(SparseDtmcEliminationModelCheckerTest, Die) {
15 STORM_TEST_RESOURCES_DIR
"/tra/die.tra", STORM_TEST_RESOURCES_DIR
"/lab/die.lab",
"", STORM_TEST_RESOURCES_DIR
"/rew/die.coin_flips.trans.rew");
24 ASSERT_EQ(dtmc->getNumberOfStates(), 13ull);
25 ASSERT_EQ(dtmc->getNumberOfTransitions(), 20ull);
31 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.
check(*formula);
34 EXPECT_NEAR(1.0 / 6.0, quantitativeResult1[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
38 result = checker.
check(*formula);
41 EXPECT_NEAR(1.0 / 6.0, quantitativeResult2[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
45 result = checker.
check(*formula);
48 EXPECT_NEAR(1.0 / 6.0, quantitativeResult3[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
52 result = checker.
check(*formula);
55 EXPECT_NEAR(11.0 / 3.0, quantitativeResult4[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
58TEST(SparseDtmcEliminationModelCheckerTest, Crowds) {
59 std::shared_ptr<storm::models::sparse::Model<double>> abstractModel =
69 ASSERT_EQ(8607ull, dtmc->getNumberOfStates());
70 ASSERT_EQ(15113ull, dtmc->getNumberOfTransitions());
76 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.
check(*formula);
79 EXPECT_NEAR(0.3328800375801578281, quantitativeResult1[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
83 result = checker.
check(*formula);
86 EXPECT_NEAR(0.1522194965, quantitativeResult2[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
90 result = checker.
check(*formula);
93 EXPECT_NEAR(0.32153724292835045, quantitativeResult3[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
100 EXPECT_NEAR(0.15330064292476167, quantitativeResult4[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
107 EXPECT_NEAR(0.96592521978041668, quantitativeResult5[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
110TEST(SparseDtmcEliminationModelCheckerTest, SynchronousLeader) {
111 std::shared_ptr<storm::models::sparse::Model<double>> abstractModel =
113 STORM_TEST_RESOURCES_DIR
"/rew/leader4_8.pick.trans.rew");
121 ASSERT_EQ(12400ull, dtmc->getNumberOfStates());
122 ASSERT_EQ(16495ull, dtmc->getNumberOfTransitions());
128 std::unique_ptr<storm::modelchecker::CheckResult> result = checker.
check(*formula);
131 EXPECT_NEAR(1.0, quantitativeResult1[0], storm::settings::getModule<storm::settings::modules::GeneralSettings>().getPrecision());
135 result = checker.
check(*formula);
138 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.