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.

40 lines
803 B

  1. ****************************
  2. Getting Started
  3. ****************************
  4. High-level API
  5. ======================
  6. We start with a selection of high-level constructs in stormpy.
  7. In order to do this, we import stormpy::
  8. import stormpy
  9. import stormpy.core
  10. Building models
  11. -----------------------
  12. There are several ways to create a Markov chain.
  13. One of the easiest is to parse a description of such a Markov chain and to let storm build the chain.
  14. Here, we build a Markov chain from a prism program.
  15. Stormpy comes with a small set of examples, which we use here::
  16. import stormpy.examples
  17. With this, we can now import the path of our prism file::
  18. path = stormpy.examples.knuth_yao
  19. prism_program = stormpy.parse_prism_program(path)
  20. The `prism_program` can be translated into