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.

25 lines
706 B

  1. import stormpy
  2. import stormpy.core
  3. import stormpy.examples
  4. import stormpy.examples.files
  5. def example_getting_started_03():
  6. path = stormpy.examples.files.prism_dtmc_die
  7. prism_program = stormpy.parse_prism_program(path)
  8. formula_str = "P=? [F s=7 & d=2]"
  9. properties = stormpy.parse_properties(formula_str, prism_program)
  10. model = stormpy.build_model(prism_program, properties)
  11. result = stormpy.model_checking(model, properties[0])
  12. print(result)
  13. assert result.result_for_all_states
  14. for x in result.get_values():
  15. print(x)
  16. initial_state = model.initial_states[0]
  17. print(result.at(initial_state))
  18. if __name__ == '__main__':
  19. example_getting_started_03()