Browse Source

Adaptions to changes in Storm

refactoring
Matthias Volk 5 years ago
parent
commit
d96249096e
  1. 2
      src/storage/expressions.cpp
  2. 8
      src/storage/prism.cpp

2
src/storage/expressions.cpp

@ -122,7 +122,7 @@ void define_expressions(py::module& m) {
py::class_<storm::parser::ExpressionParser>(m, "ExpressionParser", "Parser for storm-expressions")
.def(py::init<storm::expressions::ExpressionManager const&>(), "Expression Manager to use", py::arg("expression_manager"))
.def("set_identifier_mapping", [](storm::parser::ExpressionParser& p, std::unordered_map<std::string, storm::expressions::Expression> const& identifierMapping) {p.setIdentifierMapping(identifierMapping);}, "sets identifiers")
.def("parse", &storm::parser::ExpressionParser::parseFromString, "parse")
.def("parse", &storm::parser::ExpressionParser::parseFromString, py::arg("string"), py::arg("ignore_error") = false, "parse")
;

8
src/storage/prism.cpp

@ -57,12 +57,16 @@ void define_prism(py::module& m) {
py::class_<Command> command(m, "PrismCommand", "A command in a Prism program");
command.def_property_readonly("global_index", &Command::getGlobalIndex, "Get global index")
.def_property_readonly("guard_expression", &Command::getGuardExpression, "Get guard expression")
.def_property_readonly("updates", &Command::getUpdates, "Updates in the command")
.def_property_readonly("updates", [](Command const& command) {
return command.getUpdates();
}, "Updates in the command")
.def("__str__", &streamToString<Command>)
;
py::class_<Update> update(m, "PrismUpdate", "An update in a Prism command");
update.def_property_readonly("assignments", &Update::getAssignments, "Assignments in the update")
update.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("__str__", &streamToString<Update>)
;

Loading…
Cancel
Save