Browse Source

Began correcting performance tests.

tempestpy_adaptions
dehnert 12 years ago
parent
commit
8c329933ec
  1. 21
      test/performance/modelchecker/GmmxxDtmcPrctModelCheckerTest.cpp
  2. 33
      test/performance/modelchecker/GmmxxMdpPrctModelCheckerTest.cpp

21
test/performance/modelchecker/GmmxxDtmcPrctModelCheckerTest.cpp

@ -14,8 +14,8 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) {
std::shared_ptr<storm::models::Dtmc<double>> dtmc = parser.getModel<storm::models::Dtmc<double>>();
ASSERT_EQ(dtmc->getNumberOfStates(), 8607u);
ASSERT_EQ(dtmc->getNumberOfTransitions(), 22460u);
ASSERT_EQ(dtmc->getNumberOfStates(), 2036647u);
ASSERT_EQ(dtmc->getNumberOfTransitions(), 8973900u);
storm::modelchecker::GmmxxDtmcPrctlModelChecker<double> mc(*dtmc);
@ -27,7 +27,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.3328800375801578281), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.2296803699), s->get<double>("precision"));
delete probFormula;
delete result;
@ -40,7 +40,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.1522173670950556501), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.05072232915), s->get<double>("precision"));
delete probFormula;
delete result;
@ -53,13 +53,13 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.32153724292835045), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.2274230551), s->get<double>("precision"));
delete probFormula;
delete result;
}
/*
TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) {
storm::settings::Settings* s = storm::settings::instance();
s->set("fix-deadlocks");
@ -69,8 +69,8 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) {
std::shared_ptr<storm::models::Dtmc<double>> dtmc = parser.getModel<storm::models::Dtmc<double>>();
ASSERT_EQ(dtmc->getNumberOfStates(), 12400u);
ASSERT_EQ(dtmc->getNumberOfTransitions(), 28894u);
ASSERT_EQ(dtmc->getNumberOfStates(), 1312334u);
ASSERT_EQ(dtmc->getNumberOfTransitions(), 2886810u);
storm::modelchecker::GmmxxDtmcPrctlModelChecker<double> mc(*dtmc);
@ -95,7 +95,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.9999965911265462636), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.9999996339), s->get<double>("precision"));
delete probFormula;
delete result;
@ -108,9 +108,8 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 1.0448979591835938496), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 1.025217446), s->get<double>("precision"));
delete rewardFormula;
delete result;
}
*/

33
test/performance/modelchecker/GmmxxMdpPrctModelCheckerTest.cpp

@ -13,8 +13,8 @@ TEST(GmmxxMdpPrctModelCheckerTest, AsynchronousLeader) {
std::shared_ptr<storm::models::Mdp<double>> mdp = parser.getModel<storm::models::Mdp<double>>();
ASSERT_EQ(mdp->getNumberOfStates(), 3172u);
ASSERT_EQ(mdp->getNumberOfTransitions(), 7144u);
ASSERT_EQ(mdp->getNumberOfStates(), 2095783u);
ASSERT_EQ(mdp->getNumberOfTransitions(), 7714385u);
storm::modelchecker::GmmxxMdpPrctlModelChecker<double> mc(*mdp);
@ -52,7 +52,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, AsynchronousLeader) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.0625), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0), s->get<double>("precision"));
delete probFormula;
delete result;
@ -65,7 +65,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, AsynchronousLeader) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.0625), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0), s->get<double>("precision"));
delete probFormula;
delete result;
@ -76,7 +76,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, AsynchronousLeader) {
result = mc.checkNoBoundOperator(*rewardFormula);
ASSERT_LT(std::abs((*result)[0] - 4.28568908480604982), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 6.172433512), s->get<double>("precision"));
delete rewardFormula;
delete result;
@ -89,7 +89,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, AsynchronousLeader) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 4.2856904354441400784), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 6.1724344), s->get<double>("precision"));
delete rewardFormula;
delete result;
@ -97,12 +97,15 @@ TEST(GmmxxMdpPrctModelCheckerTest, AsynchronousLeader) {
TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
storm::settings::Settings* s = storm::settings::instance();
storm::parser::AutoParser<double> parser(STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_6.tra", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_6.lab", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin6_6.steps.state.rew", "");
storm::parser::AutoParser<double> parser(STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.tra", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.lab", STORM_CPP_BASE_PATH "/examples/mdp/consensus/coin4_6.steps.state.rew", "");
ASSERT_EQ(parser.getType(), storm::models::MDP);
std::shared_ptr<storm::models::Mdp<double>> mdp = parser.getModel<storm::models::Mdp<double>>();
ASSERT_EQ(mdp->getNumberOfStates(), 63616u);
ASSERT_EQ(mdp->getNumberOfTransitions(), 213472u);
storm::modelchecker::GmmxxMdpPrctlModelChecker<double> mc(*mdp);
storm::property::prctl::Ap<double>* apFormula = new storm::property::prctl::Ap<double>("finished");
@ -128,7 +131,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 1), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.4370098592), s->get<double>("precision"));
delete probFormula;
delete result;
@ -137,13 +140,13 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
apFormula2 = new storm::property::prctl::Ap<double>("all_coins_equal_1");
andFormula = new storm::property::prctl::And<double>(apFormula, apFormula2);
eventuallyFormula = new storm::property::prctl::Eventually<double>(andFormula);
probFormula = new storm::property::prctl::ProbabilisticNoBoundOperator<double>(eventuallyFormula, true);
probFormula = new storm::property::prctl::ProbabilisticNoBoundOperator<double>(eventuallyFormula, false);
result = mc.checkNoBoundOperator(*probFormula);
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 1), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.4370098592), s->get<double>("precision"));
delete probFormula;
delete result;
@ -159,7 +162,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 1), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0.1034345104), s->get<double>("precision"));
delete probFormula;
delete result;
@ -172,7 +175,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.0625), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0), s->get<double>("precision"));
delete probFormula;
delete result;
@ -185,7 +188,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 0.0625), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 0), s->get<double>("precision"));
delete probFormula;
delete result;
@ -196,7 +199,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
result = mc.checkNoBoundOperator(*rewardFormula);
ASSERT_LT(std::abs((*result)[0] - 4.28568908480604982), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 1725.593313), s->get<double>("precision"));
delete rewardFormula;
delete result;
@ -209,7 +212,7 @@ TEST(GmmxxMdpPrctModelCheckerTest, Consensus) {
ASSERT_NE(nullptr, result);
ASSERT_LT(std::abs((*result)[0] - 4.2856904354441400784), s->get<double>("precision"));
ASSERT_LT(std::abs((*result)[0] - 2179.014847), s->get<double>("precision"));
delete rewardFormula;
delete result;

Loading…
Cancel
Save