You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
778 B

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