From d96249096e82b4b9a3449aade3d1f0858051b4f8 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 5 Nov 2019 15:04:45 +0100 Subject: [PATCH] Adaptions to changes in Storm --- src/storage/expressions.cpp | 2 +- src/storage/prism.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/storage/expressions.cpp b/src/storage/expressions.cpp index 59bfba5..d2c77b4 100644 --- a/src/storage/expressions.cpp +++ b/src/storage/expressions.cpp @@ -122,7 +122,7 @@ void define_expressions(py::module& m) { py::class_(m, "ExpressionParser", "Parser for storm-expressions") .def(py::init(), "Expression Manager to use", py::arg("expression_manager")) .def("set_identifier_mapping", [](storm::parser::ExpressionParser& p, std::unordered_map 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") ; diff --git a/src/storage/prism.cpp b/src/storage/prism.cpp index e3bab6c..d5be873 100644 --- a/src/storage/prism.cpp +++ b/src/storage/prism.cpp @@ -57,12 +57,16 @@ void define_prism(py::module& m) { py::class_ 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) ; py::class_ 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) ;