|
|
@ -172,10 +172,8 @@ namespace storm { |
|
|
|
#endif |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
void verifySparseModel(std::shared_ptr<storm::models::sparse::Model<ValueType>> model, std::vector<std::shared_ptr<storm::logic::Formula>> const& formulas) { |
|
|
|
for (auto const& formula : formulas) { |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> verifySparseModel(std::shared_ptr<storm::models::sparse::Model<ValueType>> model, std::shared_ptr<storm::logic::Formula> const& formula) { |
|
|
|
|
|
|
|
std::cout << std::endl << "Model checking property: " << *formula << " ..."; |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> result; |
|
|
|
if (model->getType() == storm::models::ModelType::Dtmc) { |
|
|
|
std::shared_ptr<storm::models::sparse::Dtmc<ValueType>> dtmc = model->template as<storm::models::sparse::Dtmc<ValueType>>(); |
|
|
@ -208,7 +206,15 @@ namespace storm { |
|
|
|
storm::modelchecker::SparseCtmcCslModelChecker<storm::models::sparse::Ctmc<ValueType>> modelchecker(*ctmc); |
|
|
|
result = modelchecker.check(*formula); |
|
|
|
} |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|
void verifySparseModel(std::shared_ptr<storm::models::sparse::Model<ValueType>> model, std::vector<std::shared_ptr<storm::logic::Formula>> const& formulas) { |
|
|
|
for (auto const& formula : formulas) { |
|
|
|
std::cout << std::endl << "Model checking property: " << *formula << " ..."; |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> result(verifySparseModel(model, formula)); |
|
|
|
if (result) { |
|
|
|
std::cout << " done." << std::endl; |
|
|
|
std::cout << "Result (initial states): "; |
|
|
@ -272,9 +278,7 @@ namespace storm { |
|
|
|
#endif |
|
|
|
|
|
|
|
template<storm::dd::DdType DdType> |
|
|
|
void verifySymbolicModelWithHybridEngine(std::shared_ptr<storm::models::symbolic::Model<DdType>> model, std::vector<std::shared_ptr<storm::logic::Formula>> const& formulas) { |
|
|
|
for (auto const& formula : formulas) { |
|
|
|
std::cout << std::endl << "Model checking property: " << *formula << " ..."; |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> verifySymbolicModelWithHybridEngine(std::shared_ptr<storm::models::symbolic::Model<DdType>> model, std::shared_ptr<storm::logic::Formula> const& formula) { |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> result; |
|
|
|
if (model->getType() == storm::models::ModelType::Dtmc) { |
|
|
|
std::shared_ptr<storm::models::symbolic::Dtmc<DdType>> dtmc = model->template as<storm::models::symbolic::Dtmc<DdType>>(); |
|
|
@ -297,6 +301,14 @@ namespace storm { |
|
|
|
} else { |
|
|
|
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "This functionality is not yet implemented."); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
template<storm::dd::DdType DdType> |
|
|
|
void verifySymbolicModelWithHybridEngine(std::shared_ptr<storm::models::symbolic::Model<DdType>> model, std::vector<std::shared_ptr<storm::logic::Formula>> const& formulas) { |
|
|
|
for (auto const& formula : formulas) { |
|
|
|
std::cout << std::endl << "Model checking property: " << *formula << " ..."; |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> result(verifySymbolicModelWithHybridEngine(model, formula)); |
|
|
|
|
|
|
|
if (result) { |
|
|
|
std::cout << " done." << std::endl; |
|
|
@ -310,9 +322,7 @@ namespace storm { |
|
|
|
} |
|
|
|
|
|
|
|
template<storm::dd::DdType DdType> |
|
|
|
void verifySymbolicModelWithSymbolicEngine(std::shared_ptr<storm::models::symbolic::Model<DdType>> model, std::vector<std::shared_ptr<storm::logic::Formula>> const& formulas) { |
|
|
|
for (auto const& formula : formulas) { |
|
|
|
std::cout << std::endl << "Model checking property: " << *formula << " ..."; |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> verifySymbolicModelWithDdEngine(std::shared_ptr<storm::models::symbolic::Model<DdType>> model, std::shared_ptr<storm::logic::Formula> const& formula) { |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> result; |
|
|
|
if (model->getType() == storm::models::ModelType::Dtmc) { |
|
|
|
std::shared_ptr<storm::models::symbolic::Dtmc<DdType>> dtmc = model->template as<storm::models::symbolic::Dtmc<DdType>>(); |
|
|
@ -329,7 +339,14 @@ namespace storm { |
|
|
|
} else { |
|
|
|
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "This functionality is not yet implemented."); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
template<storm::dd::DdType DdType> |
|
|
|
void verifySymbolicModelWithSymbolicEngine(std::shared_ptr<storm::models::symbolic::Model<DdType>> model, std::vector<std::shared_ptr<storm::logic::Formula>> const& formulas) { |
|
|
|
for (auto const& formula : formulas) { |
|
|
|
std::cout << std::endl << "Model checking property: " << *formula << " ..."; |
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> result(verifySymbolicModelWithDdEngine(model, formula)); |
|
|
|
if (result) { |
|
|
|
std::cout << " done." << std::endl; |
|
|
|
std::cout << "Result (initial states): "; |
|
|
|