diff --git a/stormpy/core/__init__.py b/stormpy/core/__init__.py index ab88a96bd..977c7f2c8 100644 --- a/stormpy/core/__init__.py +++ b/stormpy/core/__init__.py @@ -1 +1,20 @@ -from stormpy.core._core import * \ No newline at end of file +from stormpy.core._core import * + +def _build_model(program, formulae): + intermediate = _core.build_model(program, formulae) + if intermediate.parametric: + if intermediate.model_type == ModelType.DTMC: + return intermediate.as_pdtmc() + elif intermediate.model_type == ModelType.MDP: + return intermediate.as_pmdp() + else: + raise RuntimeError("Not supported parametric model constructed") + else: + if intermediate.model_type == ModelType.DTMC: + return intermediate.as_pdtmc() + elif intermediate.model_type == ModelType.MDP: + return intermediate.as_pmdp() + else: + raise RuntimeError("Not supported non-parametric model constructed") + +build_model = _build_model \ No newline at end of file