Browse Source

Default parameters for BuilderOptions

refactoring
Matthias Volk 5 years ago
parent
commit
7015a4c012
  1. 2
      src/core/core.cpp
  2. 2
      tests/storage/test_model.py

2
src/core/core.cpp

@ -113,7 +113,7 @@ void define_build(py::module& m) {
py::class_<storm::builder::BuilderOptions>(m, "BuilderOptions", "Options for building process") py::class_<storm::builder::BuilderOptions>(m, "BuilderOptions", "Options for building process")
.def(py::init<std::vector<std::shared_ptr<storm::logic::Formula const>> const&>(), "Initialise with formulae to preserve", py::arg("formulae")) .def(py::init<std::vector<std::shared_ptr<storm::logic::Formula const>> const&>(), "Initialise with formulae to preserve", py::arg("formulae"))
.def(py::init<bool, bool>(), "Initialise without formulae", py::arg("build_all_reward_models"), py::arg("build_all_labels"))
.def(py::init<bool, bool>(), "Initialise without formulae", py::arg("build_all_reward_models")=true, py::arg("build_all_labels")=true)
.def_property_readonly("preserved_label_names", &storm::builder::BuilderOptions::getLabelNames, "Labels preserved") .def_property_readonly("preserved_label_names", &storm::builder::BuilderOptions::getLabelNames, "Labels preserved")
.def("set_build_state_valuations", &storm::builder::BuilderOptions::setBuildStateValuations, "Build state valuations", py::arg("new_value")=true) .def("set_build_state_valuations", &storm::builder::BuilderOptions::setBuildStateValuations, "Build state valuations", py::arg("new_value")=true)
.def("set_build_with_choice_origins", &storm::builder::BuilderOptions::setBuildChoiceOrigins, "Build choice origins", py::arg("new_value")=true) .def("set_build_with_choice_origins", &storm::builder::BuilderOptions::setBuildChoiceOrigins, "Build choice origins", py::arg("new_value")=true)

2
tests/storage/test_model.py

@ -157,7 +157,7 @@ class TestSparseModel:
program, _ = stormpy.parse_jani_model(get_example_path("dtmc", "die.jani")) program, _ = stormpy.parse_jani_model(get_example_path("dtmc", "die.jani"))
a = stormpy.FlatSet() a = stormpy.FlatSet()
options = stormpy.BuilderOptions([])
options = stormpy.BuilderOptions()
options.set_build_with_choice_origins() options.set_build_with_choice_origins()
model = stormpy.build_sparse_model_with_options(program, options) model = stormpy.build_sparse_model_with_options(program, options)
a = model.choice_origins.get_edge_index_set(3) a = model.choice_origins.get_edge_index_set(3)

Loading…
Cancel
Save