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
666 B

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