|
@ -4,11 +4,11 @@ import stormpy.core |
|
|
import stormpy.examples |
|
|
import stormpy.examples |
|
|
import stormpy.examples.files |
|
|
import stormpy.examples.files |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def example_getting_started_02(): |
|
|
def example_getting_started_02(): |
|
|
path = stormpy.examples.files.prism_dtmc_die |
|
|
path = stormpy.examples.files.prism_dtmc_die |
|
|
prism_program = stormpy.parse_prism_program(path) |
|
|
prism_program = stormpy.parse_prism_program(path) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model = stormpy.build_model(prism_program) |
|
|
model = stormpy.build_model(prism_program) |
|
|
print("Number of states: {}".format(model.nr_states)) |
|
|
print("Number of states: {}".format(model.nr_states)) |
|
|
print("Number of transitions: {}".format(model.nr_transitions)) |
|
|
print("Number of transitions: {}".format(model.nr_transitions)) |
|
@ -21,7 +21,6 @@ def example_getting_started_02(): |
|
|
print("Number of transitions: {}".format(model_for_formula.nr_transitions)) |
|
|
print("Number of transitions: {}".format(model_for_formula.nr_transitions)) |
|
|
print("Labels in the model: {}".format(model_for_formula.labeling.get_labels())) |
|
|
print("Labels in the model: {}".format(model_for_formula.labeling.get_labels())) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formula_str_2 = "P=? [F s=7 & d=2]" |
|
|
formula_str_2 = "P=? [F s=7 & d=2]" |
|
|
properties_2 = stormpy.parse_properties_for_prism_program(formula_str_2, prism_program) |
|
|
properties_2 = stormpy.parse_properties_for_prism_program(formula_str_2, prism_program) |
|
|
model_for_formula_2 = stormpy.build_model(prism_program, properties_2) |
|
|
model_for_formula_2 = stormpy.build_model(prism_program, properties_2) |
|
@ -29,5 +28,6 @@ def example_getting_started_02(): |
|
|
print("Number of transitions: {}".format(model_for_formula_2.nr_transitions)) |
|
|
print("Number of transitions: {}".format(model_for_formula_2.nr_transitions)) |
|
|
print("Labels in the model: {}".format(model_for_formula_2.labeling.get_labels())) |
|
|
print("Labels in the model: {}".format(model_for_formula_2.labeling.get_labels())) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
if __name__ == '__main__': |
|
|
example_getting_started_02() |
|
|
example_getting_started_02() |