|
|
@ -87,10 +87,12 @@ void define_prism(py::module& m) { |
|
|
|
; |
|
|
|
|
|
|
|
py::class_<Update> update(m, "PrismUpdate", "An update in a Prism command"); |
|
|
|
update.def_property_readonly("assignments", [](Update const& update) { |
|
|
|
update.def(py::init<uint_fast64_t, storm::expressions::Expression const&, std::vector<storm::prism::Assignment> const&>()) |
|
|
|
.def_property_readonly("assignments", [](Update const& update) { |
|
|
|
return update.getAssignments(); |
|
|
|
}, "Assignments in the update") |
|
|
|
.def_property_readonly("probability_expression", &Update::getLikelihoodExpression, "The probability expression for this update") |
|
|
|
.def_property_readonly("global_index", &Update::getGlobalIndex, "Retrieves the global index of the update, that is, a unique index over all modules") |
|
|
|
.def("substitute", &Update::substitute, "Substitutes all identifiers in the update according to the given map") |
|
|
|
.def("simplify", &Update::simplify, "Simplifies the update in various ways (also removes identity assignments)") |
|
|
|
.def("get_assignment", &Update::getAssignment, py::arg("variable_name"), "Retrieves a reference to the assignment for the variable with the given name") |
|
|
@ -99,7 +101,8 @@ void define_prism(py::module& m) { |
|
|
|
; |
|
|
|
|
|
|
|
py::class_<Assignment> assignment(m, "PrismAssignment", "An assignment in prism"); |
|
|
|
assignment.def_property_readonly("variable", &Assignment::getVariable, "Variable that is updated") |
|
|
|
assignment.def(py::init<storm::expressions::Variable const&, storm::expressions::Expression const&>()) |
|
|
|
.def_property_readonly("variable", &Assignment::getVariable, "Variable that is updated") |
|
|
|
.def_property_readonly("expression", &Assignment::getExpression, "Expression for the update") |
|
|
|
.def("__str__", &streamToString<Assignment>) |
|
|
|
; |
|
|
|