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.

27 lines
775 B

  1. import stormpy
  2. import stormpy.core
  3. import pycarl
  4. import pycarl.core
  5. import stormpy.examples
  6. import stormpy.examples.files
  7. path = stormpy.examples.files.prism_pdtmc_die
  8. prism_program = stormpy.parse_prism_program(path)
  9. formula_str = "P=? [F s=7 & d=2]"
  10. properties = stormpy.parse_properties_for_prism_program(formula_str, prism_program)
  11. model = stormpy.build_parametric_model(prism_program, properties)
  12. print("Model supports parameters: {}".format(model.supports_parameters))
  13. instantiator = stormpy.PdtmcInstantiator(model)
  14. point = dict()
  15. parameters = model.collect_probability_parameters()
  16. for x in parameters:
  17. print(x.name)
  18. point[x] = 0.4
  19. instantiated_model = instantiator.instantiate(point)
  20. result = stormpy.model_checking(instantiated_model, properties[0])