diff --git a/src/core/core.cpp b/src/core/core.cpp index d5f03be..63a6107 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -58,14 +58,27 @@ std::shared_ptr buildSparseModel(storm::storage::Symbo } } +// Thin wrapper for model building using one formula as argument +template +std::shared_ptr buildSparseModelWithOptions(storm::storage::SymbolicModelDescription const& modelDescription, storm::builder::BuilderOptions const& options, bool jit = false, bool doctor = false) { + return storm::api::buildSparseModel(modelDescription, options, jit, doctor); + +} + void define_build(py::module& m) { // Build model m.def("_build_sparse_model_from_prism_program", &buildSparseModel, "Build the model", py::arg("model_description"), py::arg("formulas") = std::vector>(), py::arg("use_jit") = false, py::arg("doctor") = false); m.def("_build_sparse_parametric_model_from_prism_program", &buildSparseModel, "Build the parametric model", py::arg("model_description"), py::arg("formulas") = std::vector>(), py::arg("use_jit") = false, py::arg("doctor") = false); + m.def("build_sparse_model_with_options", &buildSparseModelWithOptions, "Build the model", py::arg("model_description"), py::arg("options"), py::arg("use_jit") = false, py::arg("doctor") = false); m.def("_build_sparse_model_from_drn", &storm::api::buildExplicitDRNModel, "Build the model from DRN", py::arg("file")); m.def("_build_sparse_parametric_model_from_drn", &storm::api::buildExplicitDRNModel, "Build the parametric model from DRN", py::arg("file")); m.def("build_sparse_model_from_explicit", &storm::api::buildExplicitModel, "Build the model model from explicit input", py::arg("transition_file"), py::arg("labeling_file"), py::arg("state_reward_file") = "", py::arg("transition_reward_file") = "", py::arg("choice_labeling_file") = ""); + + py::class_(m, "BuilderOptions", "Options for building process") + .def(py::init> const&>(), "Initialise with formulae to preserve", py::arg("formulae")) + .def(py::init(), "Initialise without formulae", py::arg("build_all_reward_models"), py::arg("build_all_labels")) + .def("set_build_with_choice_origins", &storm::builder::BuilderOptions::setBuildChoiceOrigins, "Build choice origins", py::arg("new_value")); } // Thin wrapper for exporting model