We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 218013f commit 75c3387Copy full SHA for 75c3387
1 file changed
ns_vfs/verification.py
@@ -0,0 +1,22 @@
1
+import numpy as np
2
+import stormpy
3
+
4
5
+def build_trans_matrix(transitions, states):
6
+ matrix = np.zeros((len(states), len(states)))
7
+ for t in transitions:
8
+ matrix[t[0], t[1]] = t[2]
9
+ trans_matrix = stormpy.build_sparse_matrix(matrix, list(range(len(states))))
10
+ return trans_matrix
11
12
13
+def build_label_func(states, props):
14
+ state_labeling = stormpy.storage.StateLabeling(len(states))
15
+ for label in props:
16
+ state_labeling.add_label(label)
17
+ for state in states:
18
+ state_labeling.add_label_to_state(
19
+ state.current_proposition_combination, state.state_index
20
+ )
21
22
+ state_labeling
0 commit comments