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.

28 lines
776 B

  1. import stormpy
  2. import stormpy.core
  3. import stormpy.pars
  4. import pycarl
  5. import pycarl.cln
  6. import pycarl.core
  7. import stormpy.examples
  8. import stormpy.examples.files
  9. def example_getting_started_05():
  10. path = stormpy.examples.files.prism_dtmc_die
  11. prism_program = stormpy.parse_prism_program(path)
  12. formula_str = "P=? [F s=7 & d=2]"
  13. properties = stormpy.parse_properties_for_prism_program(formula_str, prism_program)
  14. model = stormpy.build_model(prism_program, properties)
  15. for state in model.states:
  16. for action in state.actions:
  17. for transition in action.transitions:
  18. print("from {} with prob {} go to {}".format(state, transition.value(), transition.column))
  19. if __name__ == '__main__':
  20. example_getting_started_05()