From cddaf4ca2a8d7b3b21463016d6468ac1c8319f2e Mon Sep 17 00:00:00 2001 From: sjunges Date: Wed, 27 Jan 2016 11:36:28 +0100 Subject: [PATCH] python for const formulae Former-commit-id: 06cbf7386a40f2dfe6395c1114f8f43880e107b5 --- src/python/storm-core.cpp | 12 ++++++------ src/python/storm-logic.cpp | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/python/storm-core.cpp b/src/python/storm-core.cpp index 60504d93e..7b740bf1a 100644 --- a/src/python/storm-core.cpp +++ b/src/python/storm-core.cpp @@ -17,12 +17,12 @@ public: }; // Thin wrapper for model building -std::shared_ptr buildModel(storm::prism::Program const& program, std::shared_ptr const& formula) { - return storm::buildSymbolicModel(program, std::vector>(1,formula)).model; +std::shared_ptr buildModel(storm::prism::Program const& program, std::shared_ptr const& formula) { + return storm::buildSymbolicModel(program, std::vector>(1,formula)).model; } // Thin wrapper for parametric state elimination -std::shared_ptr performStateElimination(std::shared_ptr> model, std::shared_ptr const& formula) { +std::shared_ptr performStateElimination(std::shared_ptr> model, std::shared_ptr const& formula) { std::unique_ptr checkResult = storm::verifySparseModel(model, formula); std::shared_ptr result = std::make_shared(); result->resultFunction = (checkResult->asExplicitQuantitativeCheckResult()[*model->getInitialStates().begin()]); @@ -98,8 +98,8 @@ BOOST_PYTHON_MODULE(_core) defineClass, storm::models::sparse::Model>("SparseParametricDtmc", ""); defineClass, storm::models::sparse::Model>("SparseParametricMdp", ""); - defineClass>, void, void>("FormulaVec", "Vector of formulas") - .def(vector_indexing_suite>, true>()) + defineClass>, void, void>("FormulaVec", "Vector of formulas") + .def(vector_indexing_suite>, true>()) ; //////////////////////////////////////////// @@ -109,7 +109,7 @@ BOOST_PYTHON_MODULE(_core) .value("STRONG", storm::storage::BisimulationType::Strong) .value("WEAK", storm::storage::BisimulationType::Weak) ; - def("perform_bisimulation_parametric", static_cast> (*)(std::shared_ptr> const&, std::shared_ptr const&, storm::storage::BisimulationType)>(&storm::performBisimulationMinimization>)); + def("perform_bisimulation_parametric", static_cast> (*)(std::shared_ptr> const&, std::shared_ptr const&, storm::storage::BisimulationType)>(&storm::performBisimulationMinimization>)); diff --git a/src/python/storm-logic.cpp b/src/python/storm-logic.cpp index a6da9725f..bdf4954df 100644 --- a/src/python/storm-logic.cpp +++ b/src/python/storm-logic.cpp @@ -72,7 +72,9 @@ BOOST_PYTHON_MODULE(_logic) defineClass("UnaryBooleanStateFormula", ""); defineClass("OperatorFormula", - ""); + "") + .add_property("has_bound", &storm::logic::OperatorFormula::hasBound) + .add_property("bound", &storm::logic::OperatorFormula::getBound) defineClass("ExpectedTimeOperator", "The expected time between two events"); defineClass("LongRunAvarageOperator",