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.

19 lines
653 B

  1. import stormpy
  2. import stormpy.dft
  3. import stormpy.logic
  4. from helpers.helper import get_example_path
  5. import math
  6. class TestBuild:
  7. def test_build_dft(self):
  8. model = stormpy.dft.build_sparse_model_from_json_dft(get_example_path("dft", "and.json"))
  9. formulas = stormpy.parse_properties("T=? [ F \"failed\" ]")
  10. assert model.nr_states == 4
  11. assert model.nr_transitions == 5
  12. assert len(model.initial_states) == 1
  13. initial_state = model.initial_states[0]
  14. assert initial_state == 1
  15. result = stormpy.model_checking(model, formulas[0])
  16. assert math.isclose(result.at(initial_state), 3)