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.

70 lines
2.9 KiB

  1. """
  2. It looks like you want to know about 'stormpy'.
  3. _.-;:q=._
  4. .' j=""^k;:\.
  5. ; .F ";`Y
  6. ,;.J_ ;'j
  7. ,-;"^7F : .F _________________
  8. ,-'-_<. ;gj. _.,---""'' .'
  9. ; _,._`\. : `T"5, ;
  10. : `?8w7 `J ,-'" -^q. ` ;
  11. \;._ _,=' ; n58L Y. .'
  12. F;"; .' k_ `^' j' ;
  13. J;:: ; "y:-=' ;
  14. L;;== |:; jT\ ;
  15. L;:;J J:L 7:;' _ ;
  16. I;|:.L |:k J:.' , ' . ;
  17. |;J:.| ;.I F.: . :
  18. ;J;:L:: |.| |.J , ' ` ; ;
  19. .' J:`J.`. :.J |. L . ; ;
  20. ; L :k:`._ ,',j J; | ` , ; ;
  21. .' I :`=.:."_".' L J `.'
  22. .' |.: `"-=-' |.J ;
  23. _.-' `: : ;:; _ ;
  24. _.-'" J: : /.;' ; ;
  25. ='_ k;.\. _.;:Y' , .'
  26. `"---..__ `Y;."-=';:=' , .'
  27. `""--..__ `"==="' - .'
  28. ``""---...__ itz .-'
  29. ``""---'
  30. """
  31. from . import core
  32. from .core import *
  33. from . import storage
  34. from .storage import *
  35. core.set_up("")
  36. def build_model(program, formulae):
  37. intermediate = core._build_model(program, formulae)
  38. assert not intermediate.supports_parameters
  39. if intermediate.model_type == ModelType.DTMC:
  40. return intermediate.as_dtmc()
  41. elif intermediate.model_type == ModelType.MDP:
  42. return intermediate.as_mdp()
  43. else:
  44. raise RuntimeError("Not supported non-parametric model constructed")
  45. def build_parametric_model(program, formulae):
  46. intermediate = core._build_parametric_model(program, formulae)
  47. assert intermediate.supports_parameters
  48. if intermediate.model_type == ModelType.DTMC:
  49. return intermediate.as_pdtmc()
  50. elif intermediate.model_type == ModelType.MDP:
  51. return intermediate.as_pmdp()
  52. else:
  53. raise RuntimeError("Not supported parametric model constructed")
  54. def perform_bisimulation(model, formula, bisimulation_type):
  55. if model.supports_parameters:
  56. return core._perform_parametric_bisimulation(model, formula, bisimulation_type)
  57. else:
  58. return core._perform_bisimulation(model, formula, bisimulation_type)
  59. def model_checking(model, formula):
  60. if model.supports_parameters:
  61. return core._parametric_model_checking(model, formula)
  62. else:
  63. return core._model_checking(model, formula)