You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

294 lines
22 KiB

  1. #include "gtest/gtest.h"
  2. #include "storm-config.h"
  3. #include "src/settings/SettingMemento.h"
  4. #include "src/parser/PrismParser.h"
  5. #include "src/parser/FormulaParser.h"
  6. #include "src/logic/Formulas.h"
  7. #include "src/builder/DdPrismModelBuilder.h"
  8. #include "src/storage/dd/DdType.h"
  9. #include "src/utility/solver.h"
  10. #include "src/modelchecker/csl/HybridCtmcCslModelChecker.h"
  11. #include "src/modelchecker/results/HybridQuantitativeCheckResult.h"
  12. #include "src/modelchecker/results/SymbolicQualitativeCheckResult.h"
  13. #include "src/modelchecker/results/SymbolicQuantitativeCheckResult.h"
  14. #include "src/settings/SettingsManager.h"
  15. #include "src/settings/modules/GeneralSettings.h"
  16. #include "src/settings/modules/NativeEquationSolverSettings.h"
  17. TEST(NativeHybridCtmcCslModelCheckerTest, Cluster) {
  18. // Set the PRISM compatibility mode temporarily. It is set to its old value once the returned object is destructed.
  19. std::unique_ptr<storm::settings::SettingMemento> enablePrismCompatibility = storm::settings::mutableGeneralSettings().overridePrismCompatibilityMode(true);
  20. // Parse the model description.
  21. storm::prism::Program program = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/builder/cluster2.sm");
  22. storm::parser::FormulaParser formulaParser(program.getManager().getSharedPointer());
  23. std::shared_ptr<storm::logic::Formula> formula(nullptr);
  24. // Build the model.
  25. #ifdef WINDOWS
  26. storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::Options options;
  27. #else
  28. typename storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::Options options;
  29. #endif
  30. options.buildRewards = true;
  31. options.rewardModelName = "num_repairs";
  32. std::shared_ptr<storm::models::symbolic::Model<storm::dd::DdType::CUDD>> model = storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::translateProgram(program, options);
  33. ASSERT_EQ(storm::models::ModelType::Ctmc, model->getType());
  34. std::shared_ptr<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>> ctmc = model->as<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>>();
  35. // Create model checker.
  36. storm::modelchecker::HybridCtmcCslModelChecker<storm::dd::DdType::CUDD, double> modelchecker(*ctmc, std::unique_ptr<storm::utility::solver::LinearEquationSolverFactory<double>>(new storm::utility::solver::NativeLinearEquationSolverFactory<double>()));
  37. // Start checking properties.
  38. formula = formulaParser.parseFromString("P=? [ F<=100 !\"minimum\"]");
  39. std::unique_ptr<storm::modelchecker::CheckResult> checkResult = modelchecker.check(*formula);
  40. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  41. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  42. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult1 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  43. EXPECT_NEAR(5.5461254704419085E-5, quantitativeCheckResult1.getMin(), storm::settings::generalSettings().getPrecision());
  44. EXPECT_NEAR(5.5461254704419085E-5, quantitativeCheckResult1.getMax(), storm::settings::generalSettings().getPrecision());
  45. formula = formulaParser.parseFromString("P=? [ F[100,100] !\"minimum\"]");
  46. checkResult = modelchecker.check(*formula);
  47. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  48. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  49. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult2 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  50. EXPECT_NEAR(2.3397873548343415E-6, quantitativeCheckResult2.getMin(), storm::settings::generalSettings().getPrecision());
  51. EXPECT_NEAR(2.3397873548343415E-6, quantitativeCheckResult2.getMax(), storm::settings::generalSettings().getPrecision());
  52. formula = formulaParser.parseFromString("P=? [ F[100,2000] !\"minimum\"]");
  53. checkResult = modelchecker.check(*formula);
  54. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  55. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  56. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult3 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  57. EXPECT_NEAR(0.001105335651670241, quantitativeCheckResult3.getMin(), storm::settings::generalSettings().getPrecision());
  58. EXPECT_NEAR(0.001105335651670241, quantitativeCheckResult3.getMax(), storm::settings::generalSettings().getPrecision());
  59. formula = formulaParser.parseFromString("P=? [ \"minimum\" U<=10 \"premium\"]");
  60. checkResult = modelchecker.check(*formula);
  61. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  62. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  63. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult4 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  64. EXPECT_NEAR(1, quantitativeCheckResult4.getMin(), storm::settings::generalSettings().getPrecision());
  65. EXPECT_NEAR(1, quantitativeCheckResult4.getMax(), storm::settings::generalSettings().getPrecision());
  66. formula = formulaParser.parseFromString("P=? [ !\"minimum\" U[1,inf] \"minimum\"]");
  67. checkResult = modelchecker.check(*formula);
  68. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  69. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  70. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult5 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  71. EXPECT_NEAR(0, quantitativeCheckResult5.getMin(), storm::settings::generalSettings().getPrecision());
  72. EXPECT_NEAR(0, quantitativeCheckResult5.getMax(), storm::settings::generalSettings().getPrecision());
  73. formula = formulaParser.parseFromString("P=? [ \"minimum\" U[1,inf] !\"minimum\"]");
  74. checkResult = modelchecker.check(*formula);
  75. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  76. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  77. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult6 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  78. EXPECT_NEAR(0.9999999033633374, quantitativeCheckResult6.getMin(), storm::settings::generalSettings().getPrecision());
  79. EXPECT_NEAR(0.9999999033633374, quantitativeCheckResult6.getMax(), storm::settings::generalSettings().getPrecision());
  80. formula = formulaParser.parseFromString("R=? [C<=100]");
  81. checkResult = modelchecker.check(*formula);
  82. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  83. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  84. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult7 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  85. EXPECT_NEAR(0.8602815057967503, quantitativeCheckResult7.getMin(), storm::settings::generalSettings().getPrecision());
  86. EXPECT_NEAR(0.8602815057967503, quantitativeCheckResult7.getMax(), storm::settings::generalSettings().getPrecision());
  87. }
  88. TEST(NativeHybridCtmcCslModelCheckerTest, Embedded) {
  89. // Set the PRISM compatibility mode temporarily. It is set to its old value once the returned object is destructed.
  90. std::unique_ptr<storm::settings::SettingMemento> enablePrismCompatibility = storm::settings::mutableGeneralSettings().overridePrismCompatibilityMode(true);
  91. // Parse the model description.
  92. storm::prism::Program program = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/builder/embedded2.sm");
  93. storm::parser::FormulaParser formulaParser(program.getManager().getSharedPointer());
  94. std::shared_ptr<storm::logic::Formula> formula(nullptr);
  95. // Build the model.
  96. #ifdef WINDOWS
  97. storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::Options options;
  98. #else
  99. typename storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::Options options;
  100. #endif
  101. options.buildRewards = true;
  102. options.rewardModelName = "up";
  103. std::shared_ptr<storm::models::symbolic::Model<storm::dd::DdType::CUDD>> model = storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::translateProgram(program, options);
  104. ASSERT_EQ(storm::models::ModelType::Ctmc, model->getType());
  105. std::shared_ptr<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>> ctmc = model->as<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>>();
  106. // Create model checker.
  107. storm::modelchecker::HybridCtmcCslModelChecker<storm::dd::DdType::CUDD, double> modelchecker(*ctmc, std::unique_ptr<storm::utility::solver::LinearEquationSolverFactory<double>>(new storm::utility::solver::NativeLinearEquationSolverFactory<double>()));
  108. // Start checking properties.
  109. formula = formulaParser.parseFromString("P=? [ F<=10000 \"down\"]");
  110. std::unique_ptr<storm::modelchecker::CheckResult> checkResult = modelchecker.check(*formula);
  111. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  112. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  113. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult1 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  114. EXPECT_NEAR(0.0019216435246119591, quantitativeCheckResult1.getMin(), storm::settings::generalSettings().getPrecision());
  115. EXPECT_NEAR(0.0019216435246119591, quantitativeCheckResult1.getMax(), storm::settings::generalSettings().getPrecision());
  116. formula = formulaParser.parseFromString("P=? [ !\"down\" U<=10000 \"fail_actuators\"]");
  117. checkResult = modelchecker.check(*formula);
  118. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  119. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  120. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult2 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  121. EXPECT_NEAR(3.7079151806696567E-6, quantitativeCheckResult2.getMin(), storm::settings::generalSettings().getPrecision());
  122. EXPECT_NEAR(3.7079151806696567E-6, quantitativeCheckResult2.getMax(), storm::settings::generalSettings().getPrecision());
  123. formula = formulaParser.parseFromString("P=? [ !\"down\" U<=10000 \"fail_io\"]");
  124. checkResult = modelchecker.check(*formula);
  125. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  126. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  127. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult3 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  128. EXPECT_NEAR(0.001556839327673734, quantitativeCheckResult3.getMin(), storm::settings::generalSettings().getPrecision());
  129. EXPECT_NEAR(0.001556839327673734, quantitativeCheckResult3.getMax(), storm::settings::generalSettings().getPrecision());
  130. formula = formulaParser.parseFromString("P=? [ !\"down\" U<=10000 \"fail_sensors\"]");
  131. checkResult = modelchecker.check(*formula);
  132. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  133. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  134. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult4 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  135. EXPECT_NEAR(4.429620626755424E-5, quantitativeCheckResult4.getMin(), storm::settings::generalSettings().getPrecision());
  136. EXPECT_NEAR(4.429620626755424E-5, quantitativeCheckResult4.getMax(), storm::settings::generalSettings().getPrecision());
  137. formula = formulaParser.parseFromString("R=? [C<=10000]");
  138. checkResult = modelchecker.check(*formula);
  139. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  140. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  141. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult5 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  142. EXPECT_NEAR(2.7745274082080154, quantitativeCheckResult5.getMin(), storm::settings::generalSettings().getPrecision());
  143. EXPECT_NEAR(2.7745274082080154, quantitativeCheckResult5.getMax(), storm::settings::generalSettings().getPrecision());
  144. }
  145. TEST(NativeHybridCtmcCslModelCheckerTest, Polling) {
  146. // Set the PRISM compatibility mode temporarily. It is set to its old value once the returned object is destructed.
  147. std::unique_ptr<storm::settings::SettingMemento> enablePrismCompatibility = storm::settings::mutableGeneralSettings().overridePrismCompatibilityMode(true);
  148. // Parse the model description.
  149. storm::prism::Program program = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/builder/polling2.sm");
  150. storm::parser::FormulaParser formulaParser(program.getManager().getSharedPointer());
  151. std::shared_ptr<storm::logic::Formula> formula(nullptr);
  152. // Build the model.
  153. std::shared_ptr<storm::models::symbolic::Model<storm::dd::DdType::CUDD>> model = storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::translateProgram(program);
  154. ASSERT_EQ(storm::models::ModelType::Ctmc, model->getType());
  155. std::shared_ptr<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>> ctmc = model->as<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>>();
  156. // Create model checker.
  157. storm::modelchecker::HybridCtmcCslModelChecker<storm::dd::DdType::CUDD, double> modelchecker(*ctmc, std::unique_ptr<storm::utility::solver::LinearEquationSolverFactory<double>>(new storm::utility::solver::NativeLinearEquationSolverFactory<double>()));
  158. // Start checking properties.
  159. formula = formulaParser.parseFromString("P=?[ F<=10 \"target\"]");
  160. std::unique_ptr<storm::modelchecker::CheckResult> checkResult = modelchecker.check(*formula);
  161. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  162. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  163. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult1 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  164. EXPECT_NEAR(1, quantitativeCheckResult1.getMin(), storm::settings::generalSettings().getPrecision());
  165. EXPECT_NEAR(1, quantitativeCheckResult1.getMax(), storm::settings::generalSettings().getPrecision());
  166. }
  167. TEST(NativeHybridCtmcCslModelCheckerTest, Fms) {
  168. // Set the PRISM compatibility mode temporarily. It is set to its old value once the returned object is destructed.
  169. std::unique_ptr<storm::settings::SettingMemento> enablePrismCompatibility = storm::settings::mutableGeneralSettings().overridePrismCompatibilityMode(true);
  170. // No properties to check at this point.
  171. }
  172. TEST(NativeHybridCtmcCslModelCheckerTest, Tandem) {
  173. // Set the PRISM compatibility mode temporarily. It is set to its old value once the returned object is destructed.
  174. std::unique_ptr<storm::settings::SettingMemento> enablePrismCompatibility = storm::settings::mutableGeneralSettings().overridePrismCompatibilityMode(true);
  175. // Parse the model description.
  176. storm::prism::Program program = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/builder/tandem5.sm");
  177. storm::parser::FormulaParser formulaParser(program.getManager().getSharedPointer());
  178. std::shared_ptr<storm::logic::Formula> formula(nullptr);
  179. // Build the model with the customers reward structure.
  180. #ifdef WINDOWS
  181. storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::Options options;
  182. #else
  183. typename storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::Options options;
  184. #endif
  185. options.buildRewards = true;
  186. options.rewardModelName = "customers";
  187. std::shared_ptr<storm::models::symbolic::Model<storm::dd::DdType::CUDD>> model = storm::builder::DdPrismModelBuilder<storm::dd::DdType::CUDD>::translateProgram(program, options);
  188. ASSERT_EQ(storm::models::ModelType::Ctmc, model->getType());
  189. std::shared_ptr<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>> ctmc = model->as<storm::models::symbolic::Ctmc<storm::dd::DdType::CUDD>>();
  190. // Create model checker.
  191. storm::modelchecker::HybridCtmcCslModelChecker<storm::dd::DdType::CUDD, double> modelchecker(*ctmc, std::unique_ptr<storm::utility::solver::LinearEquationSolverFactory<double>>(new storm::utility::solver::NativeLinearEquationSolverFactory<double>()));
  192. // Start checking properties.
  193. formula = formulaParser.parseFromString("P=? [ F<=10 \"network_full\" ]");
  194. std::unique_ptr<storm::modelchecker::CheckResult> checkResult = modelchecker.check(*formula);
  195. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  196. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  197. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult1 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  198. EXPECT_NEAR(0.015446370562428037, quantitativeCheckResult1.getMin(), storm::settings::generalSettings().getPrecision());
  199. EXPECT_NEAR(0.015446370562428037, quantitativeCheckResult1.getMax(), storm::settings::generalSettings().getPrecision());
  200. formula = formulaParser.parseFromString("P=? [ F<=10 \"first_queue_full\" ]");
  201. checkResult = modelchecker.check(*formula);
  202. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  203. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  204. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult2 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  205. EXPECT_NEAR(0.999999837225515, quantitativeCheckResult2.getMin(), storm::settings::generalSettings().getPrecision());
  206. EXPECT_NEAR(0.999999837225515, quantitativeCheckResult2.getMax(), storm::settings::generalSettings().getPrecision());
  207. formula = formulaParser.parseFromString("P=? [\"second_queue_full\" U<=1 !\"second_queue_full\"]");
  208. checkResult = modelchecker.check(*formula);
  209. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  210. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  211. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult3 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  212. EXPECT_NEAR(1, quantitativeCheckResult3.getMin(), storm::settings::generalSettings().getPrecision());
  213. EXPECT_NEAR(1, quantitativeCheckResult3.getMax(), storm::settings::generalSettings().getPrecision());
  214. formula = formulaParser.parseFromString("R=? [I=10]");
  215. checkResult = modelchecker.check(*formula);
  216. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  217. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  218. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult4 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  219. EXPECT_NEAR(5.679243850315877, quantitativeCheckResult4.getMin(), storm::settings::generalSettings().getPrecision());
  220. EXPECT_NEAR(5.679243850315877, quantitativeCheckResult4.getMax(), storm::settings::generalSettings().getPrecision());
  221. formula = formulaParser.parseFromString("R=? [C<=10]");
  222. checkResult = modelchecker.check(*formula);
  223. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  224. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  225. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult5 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  226. EXPECT_NEAR(55.44792186036232, quantitativeCheckResult5.getMin(), storm::settings::generalSettings().getPrecision());
  227. EXPECT_NEAR(55.44792186036232, quantitativeCheckResult5.getMax(), storm::settings::generalSettings().getPrecision());
  228. formula = formulaParser.parseFromString("R=? [F \"first_queue_full\"&\"second_queue_full\"]");
  229. checkResult = modelchecker.check(*formula);
  230. ASSERT_TRUE(checkResult->isHybridQuantitativeCheckResult());
  231. checkResult->filter(storm::modelchecker::SymbolicQualitativeCheckResult<storm::dd::DdType::CUDD>(ctmc->getReachableStates(), ctmc->getInitialStates()));
  232. storm::modelchecker::HybridQuantitativeCheckResult<storm::dd::DdType::CUDD> quantitativeCheckResult6 = checkResult->asHybridQuantitativeCheckResult<storm::dd::DdType::CUDD>();
  233. EXPECT_NEAR(262.78571505691389, quantitativeCheckResult6.getMin(), storm::settings::generalSettings().getPrecision());
  234. EXPECT_NEAR(262.78571505691389, quantitativeCheckResult6.getMax(), storm::settings::generalSettings().getPrecision());
  235. }