|
|
@ -56,4 +56,50 @@ namespace { |
|
|
|
EXPECT_EQ(smtChecker.getLeastFailureBound(30), uint64_t(1)); |
|
|
|
EXPECT_EQ(smtChecker.getAlwaysFailedBound(30), uint64_t(5)); |
|
|
|
} |
|
|
|
|
|
|
|
TEST(DftSmtTest, FDEPConflictTest) { |
|
|
|
std::shared_ptr<storm::storage::DFT<double>> dft = |
|
|
|
storm::api::loadDFTGalileoFile<double>(STORM_TEST_RESOURCES_DIR "/dft/spare_conflict_test.dft"); |
|
|
|
EXPECT_TRUE(storm::api::isWellFormed(*dft)); |
|
|
|
std::vector<bool> true_vector(10, true); |
|
|
|
|
|
|
|
dft->setDynamicBehaviorInfo(); |
|
|
|
EXPECT_EQ(dft->getDynamicBehavior(), true_vector); |
|
|
|
storm::modelchecker::DFTASFChecker smtChecker(*dft); |
|
|
|
smtChecker.convert(); |
|
|
|
smtChecker.toSolver(); |
|
|
|
|
|
|
|
EXPECT_TRUE(smtChecker.getDependencyConflicts().empty()); |
|
|
|
} |
|
|
|
|
|
|
|
TEST(DftSmtTest, FDEPConflictSPARETest) { |
|
|
|
std::shared_ptr<storm::storage::DFT<double>> dft = |
|
|
|
storm::api::loadDFTGalileoFile<double>(STORM_TEST_RESOURCES_DIR "/dft/spare_conflict_test.dft"); |
|
|
|
EXPECT_TRUE(storm::api::isWellFormed(*dft)); |
|
|
|
std::vector<bool> true_vector(10, true); |
|
|
|
|
|
|
|
dft->setDynamicBehaviorInfo(); |
|
|
|
EXPECT_EQ(dft->getDynamicBehavior(), true_vector); |
|
|
|
storm::modelchecker::DFTASFChecker smtChecker(*dft); |
|
|
|
smtChecker.convert(); |
|
|
|
smtChecker.toSolver(); |
|
|
|
|
|
|
|
EXPECT_TRUE(smtChecker.getDependencyConflicts().empty()); |
|
|
|
} |
|
|
|
|
|
|
|
TEST(DftSmtTest, FDEPConflictSEQTest) { |
|
|
|
std::shared_ptr<storm::storage::DFT<double>> dft = |
|
|
|
storm::api::loadDFTGalileoFile<double>(STORM_TEST_RESOURCES_DIR "/dft/seq_conflict_test.dft"); |
|
|
|
EXPECT_TRUE(storm::api::isWellFormed(*dft)); |
|
|
|
std::vector<bool> expected_dynamic_vector(dft->nrElements(), true); |
|
|
|
expected_dynamic_vector.at(dft->getTopLevelIndex()) = false; |
|
|
|
|
|
|
|
dft->setDynamicBehaviorInfo(); |
|
|
|
EXPECT_EQ(dft->getDynamicBehavior(), expected_dynamic_vector); |
|
|
|
storm::modelchecker::DFTASFChecker smtChecker(*dft); |
|
|
|
smtChecker.convert(); |
|
|
|
smtChecker.toSolver(); |
|
|
|
|
|
|
|
EXPECT_EQ(smtChecker.getDependencyConflicts().size(), uint64_t(3)); |
|
|
|
} |
|
|
|
} |