|
@ -40,6 +40,12 @@ double modelChecking(std::shared_ptr<storm::models::sparse::Model<double>> model |
|
|
return checkResult->asExplicitQuantitativeCheckResult<double>()[*model->getInitialStates().begin()]; |
|
|
return checkResult->asExplicitQuantitativeCheckResult<double>()[*model->getInitialStates().begin()]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Thin wrapper for model checking for all states
|
|
|
|
|
|
std::vector<double> modelCheckingAll(std::shared_ptr<storm::models::sparse::Model<double>> model, std::shared_ptr<storm::logic::Formula const> const& formula) { |
|
|
|
|
|
std::unique_ptr<storm::modelchecker::CheckResult> checkResult = storm::verifySparseModel<double>(model, formula); |
|
|
|
|
|
return checkResult->asExplicitQuantitativeCheckResult<double>().getValueVector(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Thin wrapper for parametric model checking
|
|
|
// Thin wrapper for parametric model checking
|
|
|
std::shared_ptr<PmcResult> parametricModelChecking(std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> model, std::shared_ptr<storm::logic::Formula const> const& formula) { |
|
|
std::shared_ptr<PmcResult> parametricModelChecking(std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> model, std::shared_ptr<storm::logic::Formula const> const& formula) { |
|
|
std::unique_ptr<storm::modelchecker::CheckResult> checkResult = storm::verifySparseModel<storm::RationalFunction>(model, formula); |
|
|
std::unique_ptr<storm::modelchecker::CheckResult> checkResult = storm::verifySparseModel<storm::RationalFunction>(model, formula); |
|
@ -56,6 +62,7 @@ void define_modelchecking(py::module& m) { |
|
|
|
|
|
|
|
|
// Model checking
|
|
|
// Model checking
|
|
|
m.def("_model_checking", &modelChecking, "Perform model checking", py::arg("model"), py::arg("formula")); |
|
|
m.def("_model_checking", &modelChecking, "Perform model checking", py::arg("model"), py::arg("formula")); |
|
|
|
|
|
m.def("model_checking_all", &modelCheckingAll, "Perform model checking for all states", py::arg("model"), py::arg("formula")); |
|
|
m.def("_parametric_model_checking", ¶metricModelChecking, "Perform parametric model checking", py::arg("model"), py::arg("formula")); |
|
|
m.def("_parametric_model_checking", ¶metricModelChecking, "Perform parametric model checking", py::arg("model"), py::arg("formula")); |
|
|
|
|
|
|
|
|
// PmcResult
|
|
|
// PmcResult
|
|
|