diff --git a/examples/01-getting-started.py b/examples/01-getting-started.py index 69caec5..0f9c00f 100644 --- a/examples/01-getting-started.py +++ b/examples/01-getting-started.py @@ -4,6 +4,7 @@ import stormpy.core import stormpy.examples import stormpy.examples.files + def example_getting_started_01(): path = stormpy.examples.files.prism_dtmc_die prism_program = stormpy.parse_prism_program(path) @@ -13,5 +14,6 @@ def example_getting_started_01(): print("Number of transitions: {}".format(model.nr_transitions)) print("Labels: {}".format(model.labeling.get_labels())) + if __name__ == '__main__': - example_getting_started_01() \ No newline at end of file + example_getting_started_01() diff --git a/examples/02-getting-started.py b/examples/02-getting-started.py index ff4a9bf..e547c90 100644 --- a/examples/02-getting-started.py +++ b/examples/02-getting-started.py @@ -4,11 +4,11 @@ import stormpy.core import stormpy.examples import stormpy.examples.files + def example_getting_started_02(): path = stormpy.examples.files.prism_dtmc_die prism_program = stormpy.parse_prism_program(path) - model = stormpy.build_model(prism_program) print("Number of states: {}".format(model.nr_states)) 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("Labels in the model: {}".format(model_for_formula.labeling.get_labels())) - formula_str_2 = "P=? [F s=7 & d=2]" properties_2 = stormpy.parse_properties_for_prism_program(formula_str_2, prism_program) 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("Labels in the model: {}".format(model_for_formula_2.labeling.get_labels())) + if __name__ == '__main__': - example_getting_started_02() \ No newline at end of file + example_getting_started_02() diff --git a/examples/03-getting-started.py b/examples/03-getting-started.py index 665040d..7b38cf5 100644 --- a/examples/03-getting-started.py +++ b/examples/03-getting-started.py @@ -4,11 +4,11 @@ import stormpy.core import stormpy.examples import stormpy.examples.files + def example_getting_started_03(): path = stormpy.examples.files.prism_dtmc_die prism_program = stormpy.parse_prism_program(path) - formula_str = "P=? [F s=7 & d=2]" properties = stormpy.parse_properties_for_prism_program(formula_str, prism_program) model = stormpy.build_model(prism_program, properties) @@ -20,5 +20,6 @@ def example_getting_started_03(): initial_state = model.initial_states[0] print(result.at(initial_state)) + if __name__ == '__main__': - example_getting_started_03() \ No newline at end of file + example_getting_started_03() diff --git a/examples/04-getting-started.py b/examples/04-getting-started.py index 173ed8a..f8dc826 100644 --- a/examples/04-getting-started.py +++ b/examples/04-getting-started.py @@ -8,11 +8,11 @@ import pycarl.core import stormpy.examples import stormpy.examples.files + def example_getting_started_04(): path = stormpy.examples.files.prism_pdtmc_die prism_program = stormpy.parse_prism_program(path) - formula_str = "P=? [F s=7 & d=2]" properties = stormpy.parse_properties_for_prism_program(formula_str, prism_program) model = stormpy.build_parametric_model(prism_program, properties) @@ -29,5 +29,6 @@ def example_getting_started_04(): result = stormpy.model_checking(instantiated_model, properties[0]) print(result) + if __name__ == '__main__': - example_getting_started_04() \ No newline at end of file + example_getting_started_04()