The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

23 lines
823 B

4 weeks ago
  1. import stormpy
  2. import stormpy.core
  3. import stormpy.examples
  4. import stormpy.examples.files
  5. def example_highlevel_models():
  6. path = stormpy.examples.files.prism_pdtmc_die
  7. prism_program = stormpy.parse_prism_program(path)
  8. for c in prism_program.constants:
  9. print("constant {} with type {} is {} defined".format(c.name, c.type, "" if c.defined else "not"))
  10. path = stormpy.examples.files.prism_dtmc_brp
  11. prism_program = stormpy.parse_prism_program(path)
  12. for module in prism_program.modules:
  13. for v in module.integer_variables:
  14. print(f"Variable {v.name} has bounds {v.lower_bound_expression} and {v.upper_bound_expression}")
  15. for v in module.boolean_variables:
  16. print(f"Variable {v.name} is Boolean")
  17. if __name__ == '__main__':
  18. example_highlevel_models()