From c99ca64f863088c019b8f999f1864f2bc05ec7e8 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Wed, 23 Nov 2016 15:49:28 +0100 Subject: [PATCH] (Python) some simple methods on expressions --- stormpy/src/mod_expressions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stormpy/src/mod_expressions.cpp b/stormpy/src/mod_expressions.cpp index 7ca054be9..ef89106c8 100644 --- a/stormpy/src/mod_expressions.cpp +++ b/stormpy/src/mod_expressions.cpp @@ -9,6 +9,12 @@ PYBIND11_PLUGIN(expressions) { ; py::class_(m, "Expression", "Holds an expression") + .def("__str__", &storm::expressions::Expression::toString) + .def_property_readonly("contains_variables", &storm::expressions::Expression::containsVariables) + .def_property_readonly("has_boolean_type", &storm::expressions::Expression::hasBooleanType) + .def_property_readonly("has_integer_type", &storm::expressions::Expression::hasIntegerType) + .def_property_readonly("has_rational_type", &storm::expressions::Expression::hasRationalType) + ; return m.ptr();