openprocess 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. cpnpy/__init__.py +46 -0
  2. openprocess/__init__.py +57 -0
  3. openprocess/analysis/__init__.py +0 -0
  4. openprocess/analysis/state_space.py +521 -0
  5. openprocess/analysis/state_space_process.py +251 -0
  6. openprocess/cli.py +742 -0
  7. openprocess/exercises/1 Petri nets/Exercise 1.1 Order handling/answer.pnml +31 -0
  8. openprocess/exercises/1 Petri nets/Exercise 1.1 Order handling/question.md +38 -0
  9. openprocess/exercises/2 Soundness/Exercise 2.1 Spot the flaw/answer.pnml +27 -0
  10. openprocess/exercises/2 Soundness/Exercise 2.1 Spot the flaw/net.pnml +29 -0
  11. openprocess/exercises/2 Soundness/Exercise 2.1 Spot the flaw/question.md +65 -0
  12. openprocess/exercises/3 Discovery/Exercise 3.1 The alpha-algorithm/log.txt +1 -0
  13. openprocess/exercises/3 Discovery/Exercise 3.1 The alpha-algorithm/question.md +67 -0
  14. openprocess/exercises/4 Regions/Exercise 4.1 Regions of a transition system/question.md +75 -0
  15. openprocess/exercises/4 Regions/Exercise 4.1 Regions of a transition system/ts.txt +5 -0
  16. openprocess/exercises/5 Markings/Exercise 5.1 Markings and matrices/net.pnml +27 -0
  17. openprocess/exercises/5 Markings/Exercise 5.1 Markings and matrices/question.md +65 -0
  18. openprocess/exercises/6 Inductive Miner/Exercise 6.1 Cuts and trees/log.txt +1 -0
  19. openprocess/exercises/6 Inductive Miner/Exercise 6.1 Cuts and trees/question.md +62 -0
  20. openprocess/exercises/7 Conformance/Exercise 7.1 Replay, alignments and workflows/log.txt +1 -0
  21. openprocess/exercises/7 Conformance/Exercise 7.1 Replay, alignments and workflows/m1.pnml +36 -0
  22. openprocess/exercises/7 Conformance/Exercise 7.1 Replay, alignments and workflows/m2.pnml +28 -0
  23. openprocess/exercises/7 Conformance/Exercise 7.1 Replay, alignments and workflows/m3.pnml +30 -0
  24. openprocess/exercises/7 Conformance/Exercise 7.1 Replay, alignments and workflows/net.pnml +36 -0
  25. openprocess/exercises/7 Conformance/Exercise 7.1 Replay, alignments and workflows/question.md +69 -0
  26. openprocess/exercises/pack.md +14 -0
  27. openprocess/flow/__init__.py +50 -0
  28. openprocess/flow/box.py +466 -0
  29. openprocess/flow/boxes/__init__.py +7 -0
  30. openprocess/flow/boxes/check.py +119 -0
  31. openprocess/flow/boxes/compare.py +16 -0
  32. openprocess/flow/boxes/cpn.py +53 -0
  33. openprocess/flow/boxes/discover.py +124 -0
  34. openprocess/flow/boxes/filter.py +80 -0
  35. openprocess/flow/boxes/input.py +124 -0
  36. openprocess/flow/boxes/output.py +52 -0
  37. openprocess/flow/boxes/predict.py +186 -0
  38. openprocess/flow/boxes/science.py +159 -0
  39. openprocess/flow/boxes/sweeps.py +18 -0
  40. openprocess/flow/convert.py +187 -0
  41. openprocess/flow/datasets.py +198 -0
  42. openprocess/flow/explain.py +115 -0
  43. openprocess/flow/library.py +222 -0
  44. openprocess/flow/record.py +385 -0
  45. openprocess/flow/runner.py +357 -0
  46. openprocess/flow/sweep.py +92 -0
  47. openprocess/flow/types.py +290 -0
  48. openprocess/flow/workflow.py +628 -0
  49. openprocess/gui/__init__.py +0 -0
  50. openprocess/gui/app.py +90 -0
  51. openprocess/gui/arc_editing.py +295 -0
  52. openprocess/gui/canvas.py +1414 -0
  53. openprocess/gui/flow/__init__.py +8 -0
  54. openprocess/gui/flow/canvas.py +854 -0
  55. openprocess/gui/flow/page.py +972 -0
  56. openprocess/gui/flow/templates.py +131 -0
  57. openprocess/gui/flow/viewers.py +665 -0
  58. openprocess/gui/items.py +1275 -0
  59. openprocess/gui/learn/answer_boxes.py +978 -0
  60. openprocess/gui/learn/concealment.py +91 -0
  61. openprocess/gui/learn/mode.py +1181 -0
  62. openprocess/gui/panning.py +241 -0
  63. openprocess/gui/resources/openprocess-icon.png +0 -0
  64. openprocess/gui/studio/__init__.py +1 -0
  65. openprocess/gui/studio/__main__.py +3 -0
  66. openprocess/gui/studio/app.py +4031 -0
  67. openprocess/gui/studio/charts.py +115 -0
  68. openprocess/gui/studio/compare_page.py +487 -0
  69. openprocess/gui/studio/cpn_page.py +1858 -0
  70. openprocess/gui/studio/definition_view.py +284 -0
  71. openprocess/gui/studio/derivation_view.py +421 -0
  72. openprocess/gui/studio/documents.py +152 -0
  73. openprocess/gui/studio/dotted_chart.py +1401 -0
  74. openprocess/gui/studio/file_dialogs.py +143 -0
  75. openprocess/gui/studio/filter_dialog.py +247 -0
  76. openprocess/gui/studio/graph_builders.py +176 -0
  77. openprocess/gui/studio/graph_view.py +682 -0
  78. openprocess/gui/studio/instances.py +413 -0
  79. openprocess/gui/studio/log_editor.py +675 -0
  80. openprocess/gui/studio/log_page.py +800 -0
  81. openprocess/gui/studio/markdown_view.py +127 -0
  82. openprocess/gui/studio/mathtext.py +260 -0
  83. openprocess/gui/studio/ml_highlighter.py +75 -0
  84. openprocess/gui/studio/model_page.py +760 -0
  85. openprocess/gui/studio/net_comparison.py +124 -0
  86. openprocess/gui/studio/notes_overlay.py +275 -0
  87. openprocess/gui/studio/petri_page.py +844 -0
  88. openprocess/gui/studio/regions_view.py +502 -0
  89. openprocess/gui/studio/sidebar.py +149 -0
  90. openprocess/gui/studio/style.py +503 -0
  91. openprocess/gui/studio/tool_icons.py +134 -0
  92. openprocess/gui/studio/updates.py +439 -0
  93. openprocess/gui/studio/widgets.py +899 -0
  94. openprocess/gui/studio/workers.py +60 -0
  95. openprocess/gui/studio/workspace.py +447 -0
  96. openprocess/gui/theme.py +394 -0
  97. openprocess/gui/tidy.py +86 -0
  98. openprocess/io/__init__.py +0 -0
  99. openprocess/io/cpn_reader.py +389 -0
  100. openprocess/io/cpn_writer.py +357 -0
  101. openprocess/learn/__init__.py +23 -0
  102. openprocess/learn/answers.py +188 -0
  103. openprocess/learn/checks.py +953 -0
  104. openprocess/learn/computed.py +1180 -0
  105. openprocess/learn/context.py +145 -0
  106. openprocess/learn/exam.py +169 -0
  107. openprocess/learn/exercise-packs.md +325 -0
  108. openprocess/learn/importer.py +216 -0
  109. openprocess/learn/notation.py +474 -0
  110. openprocess/learn/pack.py +511 -0
  111. openprocess/learn/sheet.py +296 -0
  112. openprocess/mining/__init__.py +73 -0
  113. openprocess/mining/analysis.py +689 -0
  114. openprocess/mining/columns.py +282 -0
  115. openprocess/mining/compare_nets.py +246 -0
  116. openprocess/mining/conformance/__init__.py +0 -0
  117. openprocess/mining/conformance/alignments.py +263 -0
  118. openprocess/mining/conformance/quality.py +145 -0
  119. openprocess/mining/conformance/token_replay.py +252 -0
  120. openprocess/mining/csv_import.py +222 -0
  121. openprocess/mining/definitions.py +584 -0
  122. openprocess/mining/dfg.py +187 -0
  123. openprocess/mining/discovery/__init__.py +0 -0
  124. openprocess/mining/discovery/alpha.py +168 -0
  125. openprocess/mining/discovery/heuristics.py +332 -0
  126. openprocess/mining/discovery/inductive.py +477 -0
  127. openprocess/mining/discovery/state_regions.py +62 -0
  128. openprocess/mining/filtering.py +237 -0
  129. openprocess/mining/footprint.py +183 -0
  130. openprocess/mining/invariants.py +191 -0
  131. openprocess/mining/layout.py +279 -0
  132. openprocess/mining/log.py +364 -0
  133. openprocess/mining/petrinet.py +354 -0
  134. openprocess/mining/playout.py +75 -0
  135. openprocess/mining/pm4py_bridge.py +82 -0
  136. openprocess/mining/pnml.py +223 -0
  137. openprocess/mining/processtree.py +216 -0
  138. openprocess/mining/regions.py +476 -0
  139. openprocess/mining/stats.py +160 -0
  140. openprocess/mining/structure.py +374 -0
  141. openprocess/mining/transition_system.py +409 -0
  142. openprocess/mining/xes.py +399 -0
  143. openprocess/ml/__init__.py +0 -0
  144. openprocess/ml/ast_nodes.py +332 -0
  145. openprocess/ml/builtins.py +364 -0
  146. openprocess/ml/colorsets.py +522 -0
  147. openprocess/ml/errors.py +60 -0
  148. openprocess/ml/evaluator.py +754 -0
  149. openprocess/ml/lexer.py +277 -0
  150. openprocess/ml/multiset.py +417 -0
  151. openprocess/ml/parser.py +737 -0
  152. openprocess/ml/values.py +319 -0
  153. openprocess/model/__init__.py +0 -0
  154. openprocess/model/declarations.py +617 -0
  155. openprocess/model/examples.py +98 -0
  156. openprocess/model/net.py +701 -0
  157. openprocess/model/plain.py +192 -0
  158. openprocess/references.py +280 -0
  159. openprocess/sim/__init__.py +0 -0
  160. openprocess/sim/binding.py +620 -0
  161. openprocess/sim/export.py +66 -0
  162. openprocess/sim/simulator.py +315 -0
  163. openprocess/teaching/__init__.py +4 -0
  164. openprocess/teaching/answers.py +4 -0
  165. openprocess/teaching/checks.py +5 -0
  166. openprocess/teaching/pack.py +4 -0
  167. openprocess/teaching/sheet.py +4 -0
  168. openprocess-0.7.0.dist-info/METADATA +927 -0
  169. openprocess-0.7.0.dist-info/RECORD +173 -0
  170. openprocess-0.7.0.dist-info/WHEEL +5 -0
  171. openprocess-0.7.0.dist-info/entry_points.txt +6 -0
  172. openprocess-0.7.0.dist-info/licenses/LICENSE +21 -0
  173. openprocess-0.7.0.dist-info/top_level.txt +2 -0
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>answer</text></name>
5
+ <page id="page1">
6
+ <place id="start"><name><text>start</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="40.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="end"><name><text>end</text></name><graphics><position x="600.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="p1"><name><text>p1</text></name><graphics><position x="200.0" y="100.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="p2"><name><text>p2</text></name><graphics><position x="200.0" y="220.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <place id="p3"><name><text>p3</text></name><graphics><position x="400.0" y="100.0"/><dimension x="40" y="40"/></graphics></place>
11
+ <place id="p4"><name><text>p4</text></name><graphics><position x="400.0" y="220.0"/><dimension x="40" y="40"/></graphics></place>
12
+ <transition id="t_receive"><name><text>receive</text></name><graphics><position x="120.0" y="160.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="t_pay"><name><text>pay</text></name><graphics><position x="300.0" y="100.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <transition id="t_ship"><name><text>ship</text></name><graphics><position x="300.0" y="220.0"/><dimension x="40" y="40"/></graphics></transition>
15
+ <transition id="t_close"><name><text>close</text></name><graphics><position x="500.0" y="160.0"/><dimension x="40" y="40"/></graphics></transition>
16
+ <arc id="arc1" source="start" target="t_receive"></arc>
17
+ <arc id="arc2" source="t_receive" target="p1"></arc>
18
+ <arc id="arc3" source="t_receive" target="p2"></arc>
19
+ <arc id="arc4" source="p1" target="t_pay"></arc>
20
+ <arc id="arc5" source="p2" target="t_ship"></arc>
21
+ <arc id="arc6" source="t_pay" target="p3"></arc>
22
+ <arc id="arc7" source="t_ship" target="p4"></arc>
23
+ <arc id="arc8" source="p3" target="t_close"></arc>
24
+ <arc id="arc9" source="p4" target="t_close"></arc>
25
+ <arc id="arc10" source="t_close" target="end"></arc>
26
+ </page>
27
+ <finalmarkings><marking>
28
+ <place idref="end"><text>1</text></place>
29
+ </marking></finalmarkings>
30
+ </net>
31
+ </pnml>
@@ -0,0 +1,38 @@
1
+ # Exercise 1.1 — Order handling
2
+
3
+ A web shop handles each order as follows.
4
+
5
+ 1. The order is received (**receive**).
6
+ 2. Then the order is paid (**pay**) and shipped (**ship**). The shop does not
7
+ wait for one before starting the other: either order, and both at the same
8
+ time, are possible.
9
+ 3. When both are done, the order is closed (**close**).
10
+
11
+ **a.** Which construct models step 2?
12
+
13
+ ```answer
14
+ type: choice
15
+ - [ ] an XOR-split: after *receive*, either *pay* or *ship*
16
+ - [x] an AND-split after *receive* and an AND-join before *close*
17
+ - [ ] a loop around *pay* and *ship*
18
+ hint: Both *pay* and *ship* have to happen, in either order.
19
+ solution: An AND-split: *receive* puts a token in a place before *pay* **and**
20
+ in one before *ship*. *close* waits for both (an AND-join), so they can
21
+ happen in any order or at the same time.
22
+ ```
23
+
24
+ **b.** Draw a **WF-net** for the process in the editor on the right. Use
25
+ exactly the transition labels in bold, and make sure your net is **sound**.
26
+ The net starts with one token in its source place $i$ and should end with one
27
+ token in its sink place $o$.
28
+
29
+ ```answer
30
+ type: net
31
+ answer: answer.pnml
32
+ sound: yes
33
+ hint: Start with a place i, then receive. After receive, two places — one
34
+ for each branch.
35
+ ```
36
+
37
+ Check compares what your net *can do* with the model answer, not how it is
38
+ drawn: your layout and place names do not matter.
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>answer</text></name>
5
+ <page id="page1">
6
+ <place id="i"><name><text>i</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="40.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="o"><name><text>o</text></name><graphics><position x="680.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="c1"><name><text>c1</text></name><graphics><position x="200.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="c"><name><text>c</text></name><graphics><position x="400.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <transition id="t_register"><name><text>register</text></name><graphics><position x="120.0" y="160.0"/><dimension x="40" y="40"/></graphics></transition>
11
+ <transition id="t_send_letter"><name><text>send letter</text></name><graphics><position x="300.0" y="100.0"/><dimension x="40" y="40"/></graphics></transition>
12
+ <transition id="t_call_customer"><name><text>call customer</text></name><graphics><position x="300.0" y="220.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="t_archive"><name><text>archive</text></name><graphics><position x="520.0" y="160.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <arc id="arc1" source="i" target="t_register"></arc>
15
+ <arc id="arc2" source="t_register" target="c1"></arc>
16
+ <arc id="arc3" source="c1" target="t_send_letter"></arc>
17
+ <arc id="arc4" source="c1" target="t_call_customer"></arc>
18
+ <arc id="arc5" source="t_send_letter" target="c"></arc>
19
+ <arc id="arc6" source="t_call_customer" target="c"></arc>
20
+ <arc id="arc7" source="c" target="t_archive"></arc>
21
+ <arc id="arc8" source="t_archive" target="o"></arc>
22
+ </page>
23
+ <finalmarkings><marking>
24
+ <place idref="o"><text>1</text></place>
25
+ </marking></finalmarkings>
26
+ </net>
27
+ </pnml>
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>net</text></name>
5
+ <page id="page1">
6
+ <place id="i"><name><text>i</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="40.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="o"><name><text>o</text></name><graphics><position x="680.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="c1"><name><text>c1</text></name><graphics><position x="200.0" y="160.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="c2"><name><text>c2</text></name><graphics><position x="400.0" y="100.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <place id="c3"><name><text>c3</text></name><graphics><position x="400.0" y="220.0"/><dimension x="40" y="40"/></graphics></place>
11
+ <transition id="t_register"><name><text>register</text></name><graphics><position x="120.0" y="160.0"/><dimension x="40" y="40"/></graphics></transition>
12
+ <transition id="t_send_letter"><name><text>send letter</text></name><graphics><position x="300.0" y="100.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="t_call_customer"><name><text>call customer</text></name><graphics><position x="300.0" y="220.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <transition id="t_archive"><name><text>archive</text></name><graphics><position x="520.0" y="160.0"/><dimension x="40" y="40"/></graphics></transition>
15
+ <arc id="arc1" source="i" target="t_register"></arc>
16
+ <arc id="arc2" source="t_register" target="c1"></arc>
17
+ <arc id="arc3" source="c1" target="t_send_letter"></arc>
18
+ <arc id="arc4" source="c1" target="t_call_customer"></arc>
19
+ <arc id="arc5" source="t_send_letter" target="c2"></arc>
20
+ <arc id="arc6" source="t_call_customer" target="c3"></arc>
21
+ <arc id="arc7" source="c2" target="t_archive"></arc>
22
+ <arc id="arc8" source="c3" target="t_archive"></arc>
23
+ <arc id="arc9" source="t_archive" target="o"></arc>
24
+ </page>
25
+ <finalmarkings><marking>
26
+ <place idref="o"><text>1</text></place>
27
+ </marking></finalmarkings>
28
+ </net>
29
+ </pnml>
@@ -0,0 +1,65 @@
1
+ # Exercise 2.1 — Spot the flaw
2
+
3
+ The net on the right shows how an insurer handles a complaint: it is
4
+ **register**ed, then the customer is contacted either by **send letter** or
5
+ by **call customer**, and finally the complaint is **archive**d.
6
+
7
+ **a.** Is the net a WF-net?
8
+
9
+ ```answer
10
+ type: yesno
11
+ compute: wf-net
12
+ solution: Yes. It has one source place $i$, one sink place $o$, and every
13
+ node lies on a path from $i$ to $o$.
14
+ ```
15
+
16
+ **b.** Is it **sound**?
17
+
18
+ ```answer
19
+ type: yesno
20
+ compute: sound
21
+ ```
22
+
23
+ Which of the three conditions of soundness **fail**?
24
+
25
+ ```answer
26
+ type: choice
27
+ - [x] (i) option to complete
28
+ - [ ] (ii) proper completion
29
+ - [x] (iii) no dead transitions
30
+ hint: Can *archive* ever fire? Its two input places are marked by two
31
+ different branches of a choice.
32
+ solution: After *register*, *send letter* and *call customer* compete for
33
+ the token in $c_1$ (an XOR-split), but *archive* needs a token in **both**
34
+ $c_2$ and $c_3$ (an AND-join). So *archive* is dead and $[o]$ can never be
35
+ reached. Proper completion holds, because no marking ever puts a token in $o$.
36
+ ```
37
+
38
+ **c.** Give a firing sequence that ends in a **deadlock**: a marking where
39
+ nothing is enabled, though the case has not completed. Write the transitions
40
+ separated by commas.
41
+
42
+ ```answer
43
+ type: trace
44
+ ends: deadlock
45
+ hint: Start with register. What can happen after that, and what then?
46
+ solution: ⟨register, send letter⟩ ends in $[c_2]$, where nothing is enabled;
47
+ ⟨register, call customer⟩ gets stuck in $[c_3]$ the same way.
48
+ ```
49
+
50
+ **d.** Change the net so that it is sound and still models the description.
51
+ Your changes are saved as *my answer.pnml*; the given net stays as it was.
52
+
53
+ ```answer
54
+ type: net
55
+ start: net.pnml
56
+ answer: answer.pnml
57
+ sound: yes
58
+ hint: Make the join match the split.
59
+ solution: Replace $c_2$ and $c_3$ by one place $c$ that both *send letter*
60
+ and *call customer* put a token in, and that *archive* takes from. (The
61
+ structural reason for the flaw: a PT-handle from $c_1$ to *archive*, so the
62
+ net is not well-structured.)
63
+ ```
64
+
65
+ Results in the net's Analysis tab are hidden until you reveal them.
@@ -0,0 +1 @@
1
+ [<a,b,c,e>^4, <a,c,b,e>, <a,d,e>^2]
@@ -0,0 +1,67 @@
1
+ # Exercise 3.1 — The α-algorithm
2
+
3
+ Consider the event log (also open on the right)
4
+
5
+ $$L = [\langle a,b,c,e \rangle^4, \langle a,c,b,e \rangle, \langle a,d,e \rangle^2]$$
6
+
7
+ **a.** Fill in the footprint matrix of $L$. Click a cell to change it; each
8
+ row is the first activity, each column the second.
9
+
10
+ ```answer
11
+ type: footprint
12
+ hint: a → b when b directly follows a somewhere but never the other way
13
+ round; ‖ when both happen; # when neither does.
14
+ ```
15
+
16
+ **b.** Apply the α-algorithm. Give $T_L$, $T_I$ and $T_O$.
17
+
18
+ $T_L$ (all activities):
19
+
20
+ ```answer
21
+ type: set
22
+ compute: alpha.T_L
23
+ ```
24
+
25
+ $T_I$ (start activities):
26
+
27
+ ```answer
28
+ type: set
29
+ compute: alpha.T_I
30
+ ```
31
+
32
+ $T_O$ (end activities):
33
+
34
+ ```answer
35
+ type: set
36
+ compute: alpha.T_O
37
+ ```
38
+
39
+ $Y_L$, the maximal pairs $(A, B)$. Write each pair as `({a}, {b,d})`,
40
+ separated by commas.
41
+
42
+ ```answer
43
+ type: set
44
+ compute: alpha.Y_L
45
+ hint: Start from X_L: pairs (A, B) with a → b for every a in A and b in B,
46
+ and A and B each internally #. Then keep only the pairs that are not
47
+ contained in a bigger one.
48
+ ```
49
+
50
+ **c.** Draw the discovered net $\alpha(L)$ in the editor on the right: the
51
+ places $i_L$, $o_L$ and one place per pair in $Y_L$.
52
+
53
+ ```answer
54
+ type: net
55
+ answer: alpha
56
+ hint: b and c are in parallel, and d is an alternative to both.
57
+ ```
58
+
59
+ Can $\alpha(L)$ replay every trace of $L$?
60
+
61
+ ```answer
62
+ type: yesno
63
+ answer: yes
64
+ solution: Yes: the net is sound and every trace of L fits (fitness 1).
65
+ ```
66
+
67
+ The log's Footprint tab and the Discover tab are hidden until you reveal them.
@@ -0,0 +1,75 @@
1
+ # Exercise 4.1 — Regions of a transition system
2
+
3
+ The transition system (open on the right) has the transitions
4
+
5
+ $s_0 \xrightarrow{a} s_1$, $s_0 \xrightarrow{b} s_2$, $s_1 \xrightarrow{b} s_3$,
6
+ $s_2 \xrightarrow{a} s_3$, $s_3 \xrightarrow{c} s_4$, $s_3 \xrightarrow{d} s_5$,
7
+ $s_4 \xrightarrow{e} s_6$, $s_5 \xrightarrow{e} s_6$, with initial state $s_0$.
8
+
9
+ **a.** Is $\{s_1, s_3\}$ a region?
10
+
11
+ ```answer
12
+ type: yesno
13
+ compute: region({s1, s3})
14
+ solution: Yes: a enters it (both a-steps), c and d exit it, b and e do not
15
+ cross it.
16
+ ```
17
+
18
+ Is $\{s_3, s_4\}$ a region?
19
+
20
+ ```answer
21
+ type: yesno
22
+ compute: region({s3, s4})
23
+ solution: No: $s_0 \xrightarrow{a} s_1$ stays outside, but
24
+ $s_2 \xrightarrow{a} s_3$ enters.
25
+ ```
26
+
27
+ **b.** Give the minimal pre-regions of $c$, as sets of states separated by
28
+ commas, e.g. `{s0, s1}, {s0, s2}`.
29
+
30
+ ```answer
31
+ type: set
32
+ compute: pre-regions(c)
33
+ hint: A pre-region of c is a region that c exits.
34
+ ```
35
+
36
+ And the minimal pre-regions of $e$:
37
+
38
+ ```answer
39
+ type: set
40
+ compute: pre-regions(e)
41
+ ```
42
+
43
+ **c.** Does **forward closure** hold?
44
+
45
+ ```answer
46
+ type: yesno
47
+ compute: forward closure
48
+ solution: Yes: for every event the pre-regions meet exactly in its GER.
49
+ ```
50
+
51
+ Does **state separation** hold?
52
+
53
+ ```answer
54
+ type: yesno
55
+ compute: state separation
56
+ solution: No: $s_4$ and $s_5$ cannot be separated, because
57
+ $s_4 \xrightarrow{e} s_6$ and $s_5 \xrightarrow{e} s_6$ would cross a region
58
+ containing only one of them differently.
59
+ ```
60
+
61
+ **d.** Synthesise the Petri net from the minimal regions. Does its
62
+ reachability graph equal (is it isomorphic to) the transition system?
63
+
64
+ ```answer
65
+ type: yesno
66
+ answer: no
67
+ solution: No. The six minimal regions become places; a and b are concurrent,
68
+ c and d are a choice, and both lead to the same place {s4, s5}. The
69
+ reachability graph has one state for $s_4$ and $s_5$ together. Splitting
70
+ the label e (into e1 after c and e2 after d) would make the system
71
+ elementary.
72
+ ```
73
+
74
+ Use *Is this a region?* on the right to test your own sets of states; the
75
+ region lists and verdicts are hidden until you reveal them.
@@ -0,0 +1,5 @@
1
+ s0 -a-> s1, s0 -b-> s2
2
+ s1 -b-> s3, s2 -a-> s3
3
+ s3 -c-> s4, s3 -d-> s5
4
+ s4 -e-> s6, s5 -e-> s6
5
+ initial: s0
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>Complaints</text></name>
5
+ <page id="page1">
6
+ <place id="i"><name><text>i</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="0.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="c1"><name><text>c1</text></name><graphics><position x="240.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="c2"><name><text>c2</text></name><graphics><position x="480.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="o"><name><text>o</text></name><graphics><position x="720.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <transition id="register"><name><text>register</text></name><graphics><position x="120.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
11
+ <transition id="send letter"><name><text>send letter</text></name><graphics><position x="360.0" y="0.0"/><dimension x="40" y="40"/></graphics></transition>
12
+ <transition id="call customer"><name><text>call customer</text></name><graphics><position x="360.0" y="180.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="archive"><name><text>archive</text></name><graphics><position x="600.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <arc id="arc1" source="i" target="register"></arc>
15
+ <arc id="arc2" source="register" target="c1"></arc>
16
+ <arc id="arc3" source="c1" target="send letter"></arc>
17
+ <arc id="arc4" source="c1" target="call customer"></arc>
18
+ <arc id="arc5" source="send letter" target="c2"></arc>
19
+ <arc id="arc6" source="call customer" target="c2"></arc>
20
+ <arc id="arc7" source="c2" target="archive"></arc>
21
+ <arc id="arc8" source="archive" target="o"></arc>
22
+ </page>
23
+ <finalmarkings><marking>
24
+ <place idref="o"><text>1</text></place>
25
+ </marking></finalmarkings>
26
+ </net>
27
+ </pnml>
@@ -0,0 +1,65 @@
1
+ # Exercise 5.1 — Markings and matrices
2
+
3
+ The net on the right is the repaired complaint-handling net of Exercise 2.1:
4
+ a complaint is **register**ed, the customer is contacted by **send letter**
5
+ *or* **call customer**, and the complaint is **archive**d.
6
+
7
+ **a.** Write the net down as a tuple $(P, T, F, m_0)$: its places, its
8
+ transitions, its arcs as pairs, and its initial marking. (4 points)
9
+
10
+ ```answer
11
+ type: tuple
12
+ points: 4
13
+ hint: An arc from a place to a transition is the pair (place, transition);
14
+ from a transition to a place it is (transition, place).
15
+ ```
16
+
17
+ **b.** Which marking is reached by firing *register* in $[i]$?
18
+
19
+ ```answer
20
+ type: marking
21
+ compute: fire(register, [i])
22
+ hint: Firing removes a token from every input place and puts one in every
23
+ output place.
24
+ ```
25
+
26
+ **c.** Give the set of **all reachable markings** of the net.
27
+
28
+ ```answer
29
+ type: markings
30
+ compute: reachable
31
+ hint: Start from [i] and fire whatever is enabled, until nothing new appears.
32
+ ```
33
+
34
+ **d.** Fill in the **incidence matrix** $C$: one row per place, one column per
35
+ transition, and in each cell the tokens the transition *adds* to the place
36
+ (produced minus consumed). (2 points)
37
+
38
+ ```answer
39
+ type: matrix
40
+ compute: incidence
41
+ points: 2
42
+ hint: register takes the token from i (−1) and puts one in c1 (+1); every
43
+ other cell of its column is 0.
44
+ ```
45
+
46
+ **e.** Write down the **reachability graph** as a transition system: one line
47
+ per arc, `[i] -register-> [c1]`, and a line `initial: [i]`. Any state names
48
+ will do, as long as the shape is the same.
49
+
50
+ ```answer
51
+ type: ts
52
+ compute: reachability graph
53
+ hint: Its states are the markings of c.; its arcs are the firings between
54
+ them.
55
+ ```
56
+
57
+ **f.** Is the net **safe** (never more than one token in a place)?
58
+
59
+ ```answer
60
+ type: yesno
61
+ compute: safe
62
+ solution: Yes: every reachable marking of c. has exactly one token.
63
+ ```
64
+
65
+ Everything in the net's Analysis tab is hidden until you reveal it.
@@ -0,0 +1 @@
1
+ [<a,b,c,d>^3, <a,c,b,d>^2, <a,e,d>]
@@ -0,0 +1,62 @@
1
+ # Exercise 6.1 — Cuts and trees
2
+
3
+ Consider the event log (also open on the right)
4
+
5
+ $$L = [\langle a,b,c,d \rangle^3, \langle a,c,b,d \rangle^2, \langle a,e,d \rangle]$$
6
+
7
+ The **Inductive Miner** looks at the directly-follows graph of a log, finds a
8
+ *cut* (an operator and a partition of the activities), splits the log
9
+ accordingly, and goes on with each part until a part has one activity.
10
+
11
+ **a.** Which cut does the Inductive Miner find first for $L$? Write the
12
+ operator, then the groups in order: `→ {a} {b, c} {d}`.
13
+
14
+ ```answer
15
+ type: cut
16
+ compute: im.cut
17
+ hint: Is there an activity every trace starts with, and one every trace ends
18
+ with? Then a sequence cut separates them from the middle.
19
+ ```
20
+
21
+ **b.** Give the sublog of the **second** group of that cut (the middle part),
22
+ in the course's notation.
23
+
24
+ ```answer
25
+ type: log
26
+ compute: im.split(2)
27
+ hint: Project every trace on the group's activities; keep the counts.
28
+ ```
29
+
30
+ **c.** Which cut does the Inductive Miner find for that sublog?
31
+
32
+ ```answer
33
+ type: cut
34
+ compute: im.cut(2)
35
+ hint: In the sublog, do b and c ever occur in the same trace as e?
36
+ ```
37
+
38
+ **d.** Write down the complete **process tree** the Inductive Miner
39
+ discovers, as `→(a, ×(b, c), d)` (operators →, ×, ∧, ↺; or seq, xor, and,
40
+ loop). (2 points)
41
+
42
+ ```answer
43
+ type: tree
44
+ compute: im.tree
45
+ points: 2
46
+ hint: Continue cutting: b and c in the sublog are in parallel.
47
+ ```
48
+
49
+ **e.** Before running it: which **transitions** will the α-algorithm's net for
50
+ $L$ have? Then run the α-algorithm box in a workflow (File ▸ New Workflow)
51
+ and compare.
52
+
53
+ ```answer
54
+ type: predict
55
+ box: alpha_miner
56
+ value: net.transitions
57
+ as: set
58
+ solution: One transition per activity: {a, b, c, d, e}. The α-algorithm never
59
+ adds silent transitions; the Inductive Miner's net may.
60
+ ```
61
+
62
+ The log's Discover tab is hidden until you reveal it.
@@ -0,0 +1 @@
1
+ [<a,b,c,d>^3, <a,c,b,d>^2, <a,e,d>]
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>m1</text></name>
5
+ <page id="page1">
6
+ <place id="i"><name><text>i</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="0.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="p1"><name><text>p1</text></name><graphics><position x="240.0" y="0.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="p2"><name><text>p2</text></name><graphics><position x="240.0" y="180.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="p3"><name><text>p3</text></name><graphics><position x="480.0" y="0.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <place id="p4"><name><text>p4</text></name><graphics><position x="480.0" y="180.0"/><dimension x="40" y="40"/></graphics></place>
11
+ <place id="o"><name><text>o</text></name><graphics><position x="720.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
12
+ <transition id="a"><name><text>a</text></name><graphics><position x="120.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="b"><name><text>b</text></name><graphics><position x="360.0" y="0.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <transition id="c"><name><text>c</text></name><graphics><position x="360.0" y="180.0"/><dimension x="40" y="40"/></graphics></transition>
15
+ <transition id="d"><name><text>d</text></name><graphics><position x="600.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
16
+ <transition id="e"><name><text>e</text></name><graphics><position x="360.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
17
+ <arc id="arc1" source="i" target="a"></arc>
18
+ <arc id="arc2" source="a" target="p1"></arc>
19
+ <arc id="arc3" source="a" target="p2"></arc>
20
+ <arc id="arc4" source="p1" target="b"></arc>
21
+ <arc id="arc5" source="p2" target="c"></arc>
22
+ <arc id="arc6" source="b" target="p3"></arc>
23
+ <arc id="arc7" source="c" target="p4"></arc>
24
+ <arc id="arc8" source="p3" target="d"></arc>
25
+ <arc id="arc9" source="p4" target="d"></arc>
26
+ <arc id="arc10" source="d" target="o"></arc>
27
+ <arc id="arc11" source="p1" target="e"></arc>
28
+ <arc id="arc12" source="p2" target="e"></arc>
29
+ <arc id="arc13" source="e" target="p3"></arc>
30
+ <arc id="arc14" source="e" target="p4"></arc>
31
+ </page>
32
+ <finalmarkings><marking>
33
+ <place idref="o"><text>1</text></place>
34
+ </marking></finalmarkings>
35
+ </net>
36
+ </pnml>
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>m2</text></name>
5
+ <page id="page1">
6
+ <place id="i"><name><text>i</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="0.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="p1"><name><text>p1</text></name><graphics><position x="240.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="p2"><name><text>p2</text></name><graphics><position x="480.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="p3"><name><text>p3</text></name><graphics><position x="720.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <place id="o"><name><text>o</text></name><graphics><position x="960.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
11
+ <transition id="a"><name><text>a</text></name><graphics><position x="120.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
12
+ <transition id="b"><name><text>b</text></name><graphics><position x="360.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="c"><name><text>c</text></name><graphics><position x="600.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <transition id="d"><name><text>d</text></name><graphics><position x="840.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
15
+ <arc id="arc1" source="i" target="a"></arc>
16
+ <arc id="arc2" source="a" target="p1"></arc>
17
+ <arc id="arc3" source="p1" target="b"></arc>
18
+ <arc id="arc4" source="b" target="p2"></arc>
19
+ <arc id="arc5" source="p2" target="c"></arc>
20
+ <arc id="arc6" source="c" target="p3"></arc>
21
+ <arc id="arc7" source="p3" target="d"></arc>
22
+ <arc id="arc8" source="d" target="o"></arc>
23
+ </page>
24
+ <finalmarkings><marking>
25
+ <place idref="o"><text>1</text></place>
26
+ </marking></finalmarkings>
27
+ </net>
28
+ </pnml>
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <pnml>
3
+ <net id="net1" type="http://www.pnml.org/version-2009/grammar/pnmlcoremodel">
4
+ <name><text>m3</text></name>
5
+ <page id="page1">
6
+ <place id="i"><name><text>i</text></name><initialMarking><text>1</text></initialMarking><graphics><position x="0.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
7
+ <place id="p1"><name><text>p1</text></name><graphics><position x="240.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
8
+ <place id="p2"><name><text>p2</text></name><graphics><position x="480.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
9
+ <place id="o"><name><text>o</text></name><graphics><position x="720.0" y="90.0"/><dimension x="40" y="40"/></graphics></place>
10
+ <transition id="a"><name><text>a</text></name><graphics><position x="120.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
11
+ <transition id="b"><name><text>b</text></name><graphics><position x="360.0" y="0.0"/><dimension x="40" y="40"/></graphics></transition>
12
+ <transition id="c"><name><text>c</text></name><graphics><position x="360.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
13
+ <transition id="d"><name><text>d</text></name><graphics><position x="600.0" y="90.0"/><dimension x="40" y="40"/></graphics></transition>
14
+ <transition id="e"><name><text>e</text></name><graphics><position x="360.0" y="180.0"/><dimension x="40" y="40"/></graphics></transition>
15
+ <arc id="arc1" source="i" target="a"></arc>
16
+ <arc id="arc2" source="a" target="p1"></arc>
17
+ <arc id="arc3" source="p1" target="b"></arc>
18
+ <arc id="arc4" source="b" target="p2"></arc>
19
+ <arc id="arc5" source="p1" target="c"></arc>
20
+ <arc id="arc6" source="c" target="p2"></arc>
21
+ <arc id="arc7" source="p1" target="e"></arc>
22
+ <arc id="arc8" source="e" target="p2"></arc>
23
+ <arc id="arc9" source="p2" target="d"></arc>
24
+ <arc id="arc10" source="d" target="o"></arc>
25
+ </page>
26
+ <finalmarkings><marking>
27
+ <place idref="o"><text>1</text></place>
28
+ </marking></finalmarkings>
29
+ </net>
30
+ </pnml>