petri_net_2020 1.0.0

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 (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +12 -0
  5. data/CHANGELOG +8 -0
  6. data/Gemfile +9 -0
  7. data/LICENSE +21 -0
  8. data/README.rdoc +97 -0
  9. data/Rakefile +32 -0
  10. data/lib/petri_net/arc.rb +143 -0
  11. data/lib/petri_net/base.rb +30 -0
  12. data/lib/petri_net/coverability_graph/edge.rb +14 -0
  13. data/lib/petri_net/coverability_graph/graph.rb +52 -0
  14. data/lib/petri_net/coverability_graph/node.rb +123 -0
  15. data/lib/petri_net/coverability_graph.rb +8 -0
  16. data/lib/petri_net/graph/edge.rb +64 -0
  17. data/lib/petri_net/graph/graph.rb +324 -0
  18. data/lib/petri_net/graph/node.rb +141 -0
  19. data/lib/petri_net/graph.rb +7 -0
  20. data/lib/petri_net/marking.rb +27 -0
  21. data/lib/petri_net/net.rb +457 -0
  22. data/lib/petri_net/place.rb +131 -0
  23. data/lib/petri_net/reachability_graph/edge.rb +14 -0
  24. data/lib/petri_net/reachability_graph/graph.rb +24 -0
  25. data/lib/petri_net/reachability_graph/node.rb +14 -0
  26. data/lib/petri_net/reachability_graph.rb +8 -0
  27. data/lib/petri_net/transition.rb +135 -0
  28. data/lib/petri_net/version.rb +8 -0
  29. data/lib/petri_net.rb +36 -0
  30. data/petri_net.gemspec +23 -0
  31. data/test/create.rb +64 -0
  32. data/test/reachability_graph/tc_edge.rb +0 -0
  33. data/test/reachability_graph/tc_graph.rb +201 -0
  34. data/test/reachability_graph/tc_node.rb +65 -0
  35. data/test/tc_arc.rb +0 -0
  36. data/test/tc_petri_net.rb +371 -0
  37. data/test/tc_place.rb +0 -0
  38. data/test/tc_transition.rb +7 -0
  39. data/test/ts_all.rb +4 -0
  40. data/test/ts_petri_net.rb +6 -0
  41. data/test/ts_reachability_graph.rb +5 -0
  42. metadata +137 -0
@@ -0,0 +1,371 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubygems'
4
+ require 'logger'
5
+ require 'test/unit'
6
+ require "#{File.dirname(__FILE__)}/../lib/petri_net"
7
+
8
+ class TestPetriNet < Test::Unit::TestCase
9
+ def setup
10
+ @net = PetriNet::Net.new(name: 'Water', description: 'Creation of water from base elements.')
11
+ @net.logger = Logger.new(STDOUT)
12
+ end
13
+
14
+ def fill_net
15
+ @net << PetriNet::Place.new(name: 'testplace')
16
+ @net << PetriNet::Transition.new(name: 'testtrans')
17
+ arc = PetriNet::Arc.new do |a|
18
+ a.name = 'testarc'
19
+ a.weight = 2
20
+ a.add_source(@net.get_place('testplace'))
21
+ a.add_destination(@net.get_transition('testtrans'))
22
+ end
23
+ @net << arc
24
+ end
25
+
26
+ def complex_net
27
+ @net << PetriNet::Place.new(name: 'P1')
28
+ @net << PetriNet::Place.new(name: 'P2')
29
+ @net << PetriNet::Place.new(name: 'C1')
30
+ @net << PetriNet::Place.new(name: 'C2')
31
+ @net << PetriNet::Place.new(name: 'buffer')
32
+ @net << PetriNet::Transition.new(name: 'produce')
33
+ @net << PetriNet::Transition.new(name: 'consume')
34
+ @net << PetriNet::Transition.new(name: 'put')
35
+ @net << PetriNet::Transition.new(name: 'take')
36
+ @net << PetriNet::Arc.new do |a|
37
+ a.add_source(@net.get_place('P1'))
38
+ a.add_destination(@net.get_transition('produce'))
39
+ end
40
+ @net << PetriNet::Arc.new do |a|
41
+ a.add_source(@net.get_transition('produce'))
42
+ a.add_destination(@net.get_place('P2'))
43
+ end
44
+ @net << PetriNet::Arc.new do |a|
45
+ a.add_source(@net.get_place('P2'))
46
+ a.add_destination(@net.get_transition('put'))
47
+ end
48
+ @net << PetriNet::Arc.new do |a|
49
+ a.add_source(@net.get_transition('put'))
50
+ a.add_destination(@net.get_place('P1'))
51
+ end
52
+ @net << PetriNet::Arc.new do |a|
53
+ a.add_source(@net.get_transition('put'))
54
+ a.add_destination(@net.get_place('buffer'))
55
+ end
56
+ @net << PetriNet::Arc.new do |a|
57
+ a.add_source(@net.get_place('buffer'))
58
+ a.add_destination(@net.get_transition('take'))
59
+ end
60
+ @net << PetriNet::Arc.new do |a|
61
+ a.add_source(@net.get_transition('take'))
62
+ a.add_destination(@net.get_place('C1'))
63
+ end
64
+ @net << PetriNet::Arc.new do |a|
65
+ a.add_source(@net.get_place('C1'))
66
+ a.add_destination(@net.get_transition('consume'))
67
+ end
68
+ @net << PetriNet::Arc.new do |a|
69
+ a.add_source(@net.get_transition('consume'))
70
+ a.add_destination(@net.get_place('C2'))
71
+ end
72
+ @net << PetriNet::Arc.new do |a|
73
+ a.add_source(@net.get_place('C2'))
74
+ a.add_destination(@net.get_transition('take'))
75
+ end
76
+
77
+ @net.get_place('P1').add_marking
78
+ @net.get_place('buffer').add_marking
79
+ @net.get_place('C2').add_marking
80
+ end
81
+
82
+ def teardown
83
+ @net.reset
84
+ end
85
+
86
+ def test_create_net
87
+ net = PetriNet::Net.new(name: 'Water', description: 'Creation of water from base elements.')
88
+ assert_not_nil net
89
+ assert_equal 'Water', net.name, 'Name was not properly set'
90
+ assert_equal 'Creation of water from base elements.', net.description, 'Description was not properly set'
91
+ assert_equal 0, net.objects_size, 'There should not be any Objects in this fresh and empty net'
92
+ assert_empty net.arcs, 'There should not be any Objects in this fresh and empty net'
93
+ assert_empty net.transitions, 'There should not be any Objects in this fresh and empty net'
94
+ assert_empty net.places, 'There should not be any Objects in this fresh and empty net'
95
+ assert !net.up_to_date, 'There are no cached functions calculated'
96
+ net.update
97
+ assert net.up_to_date, 'Now we calculated all cached functions without changing anything afterwards, so this schould be up to date'
98
+ assert_empty net.get_markings, 'No Places should mean no markings...'
99
+ end
100
+
101
+ def test_complex_net
102
+ complex_net
103
+ assert_equal "Petri Net [Water]\n----------------------------\nDescription: Creation of water from base elements.\nFilename: Water\n\nPlaces\n----------------------------\n1: P1 (0) *\n2: P2 (0) \n3: C1 (0) \n4: C2 (0) *\n5: buffer (0) *\n\nTransitions\n----------------------------\n6: produce\n7: consume\n8: put\n9: take\n\nArcs\n----------------------------\n10: Arc10 (1) 1 -> 6\n11: Arc11 (1) 6 -> 2\n12: Arc12 (1) 2 -> 8\n13: Arc13 (1) 8 -> 1\n14: Arc14 (1) 8 -> 5\n15: Arc15 (1) 5 -> 9\n16: Arc16 (1) 9 -> 3\n17: Arc17 (1) 3 -> 7\n18: Arc18 (1) 7 -> 4\n19: Arc19 (1) 4 -> 9\n\n", @net.to_s
104
+ assert_equal "digraph Water {\n\t// General graph options\n\trankdir = LR;\n\tsize = \"10.5,7.5\";\n\tnode [ style = filled, fillcolor = white, fontsize = 8.0 ]\n\tedge [ arrowhead = vee, arrowsize = 0.5, fontsize = 8.0 ]\n\n\t// Places\n\tnode [ shape = circle ];\n\tP1 [ label = \"P1 1 \" ];\n\tP2 [ label = \"P2 0 \" ];\n\tP3 [ label = \"C1 0 \" ];\n\tP4 [ label = \"C2 1 \" ];\n\tP5 [ label = \"buffer 1 \" ];\n\n\t// Transitions\n\tnode [ shape = box, fillcolor = grey90 ];\n\tT6 [ label = \"produce\" ];\n\tT7 [ label = \"consume\" ];\n\tT8 [ label = \"put\" ];\n\tT9 [ label = \"take\" ];\n\n\t// Arcs\n\tP1 -> T6 [ label = \"Arc10\", headlabel = \"1\" ];\n\tT6 -> P2 [ label = \"Arc11\", headlabel = \"1\" ];\n\tP2 -> T8 [ label = \"Arc12\", headlabel = \"1\" ];\n\tT8 -> P1 [ label = \"Arc13\", headlabel = \"1\" ];\n\tT8 -> P5 [ label = \"Arc14\", headlabel = \"1\" ];\n\tP5 -> T9 [ label = \"Arc15\", headlabel = \"1\" ];\n\tT9 -> P3 [ label = \"Arc16\", headlabel = \"1\" ];\n\tP3 -> T7 [ label = \"Arc17\", headlabel = \"1\" ];\n\tT7 -> P4 [ label = \"Arc18\", headlabel = \"1\" ];\n\tP4 -> T9 [ label = \"Arc19\", headlabel = \"1\" ];\n}\n", @net.to_gv
105
+ @net.to_gv
106
+ # assert_equal "digraph Water {\n\t// General graph options\n\trankdir = LR;\n\tsize = \"10.5,7.5\";\n\tnode [ style = filled, fillcolor = white, fontsize = 8.0 ]\n\tedge [ arrowhead = vee, arrowsize = 0.5, fontsize = 8.0 ]\n\n\t// Nodes\n\tnode [ shape = circle ];\n\tN20 [ label = \"[1, 0, 0, 1, Infinity]\" ];\n\tN21 [ label = \"[0, 1, 0, 1, 1]\" ];\n\tN24 [ label = \"[0, 1, 1, 0, 0]\" ];\n\tN26 [ label = \"[0, 1, 0, 1, Infinity]\" ];\n\tN28 [ label = \"[1, 0, 0, 1, 1]\" ];\n\tN31 [ label = \"[1, 0, 1, 0, Infinity]\" ];\n\tN34 [ label = \"[1, 0, 0, 1, Infinity]\" ];\n\tN36 [ label = \"[0, 1, 0, 1, 0]\" ];\n\tN40 [ label = \"[1, 0, 1, 0, 0]\" ];\n\tN43 [ label = \"[1, 0, 0, 1, 0]\" ];\n\n\t// Edges\n\tN20 -> N21;\n\tN21 -> N24;\n\tN24 -> N26;\n\tN26 -> N28;\n\tN28 -> N31;\n\tN31 -> N34;\n\tN34 -> N36;\n\tN20 -> N40;\n\tN40 -> N43;\n}\n", @net.generate_reachability_graph.to_gv
107
+
108
+ # @net.reachability_graph.to_gv
109
+ end
110
+
111
+ def test_add_place
112
+ # Create the place
113
+ place = PetriNet::Place.new(name: 'Hydrogen')
114
+ assert_not_nil place
115
+ assert place.validate
116
+
117
+ # Add the place
118
+ id = @net.add_place(place)
119
+ assert_equal 1, @net.objects_size
120
+ assert_equal id, @net.places['Hydrogen']
121
+ assert_equal place, @net.get_place('Hydrogen')
122
+
123
+ place.add_marking
124
+ assert_equal 1, place.markings.size
125
+ place.add_marking
126
+ assert_equal 2, place.markings.size
127
+ place.remove_marking
128
+ assert_equal 1, place.markings.size
129
+ assert_raise(RuntimeError) { place.remove_marking(4) }
130
+ end
131
+
132
+ def test_add_transition
133
+ # create the transition
134
+ transition = PetriNet::Transition.new(name: 'Join', description: 'great testing transition')
135
+ assert_not_nil transition
136
+ assert transition.validate
137
+
138
+ # Add the transition
139
+ id = @net.add_transition(transition)
140
+ assert_equal 1, @net.objects_size
141
+ assert_equal @net.transitions['Join'], id
142
+ assert_equal @net.get_transition('Join'), transition
143
+ end
144
+
145
+ def test_add_object
146
+ assert_equal @net, @net << PetriNet::Place.new(name: 'testplace')
147
+ assert_equal 1, @net.places.size, 'Added only one place, this means there should only be one place'
148
+ assert_equal 1, @net.objects_size, 'Added only one place, this means there should only be one object'
149
+ @net << PetriNet::Transition.new(name: 'testtrans')
150
+ assert_equal 1, @net.transitions.size, 'Added only one transition, this means there should only be one transition'
151
+ assert_equal 2, @net.objects_size, 'Added one transition to the place, this means there should be exactly two objects'
152
+ arc = PetriNet::Arc.new do |a|
153
+ a.name = 'testarc'
154
+ a.weight = 2
155
+ a.add_source(@net.get_place('testplace'))
156
+ a.add_destination(@net.get_transition('testtrans'))
157
+ end
158
+ @net << arc
159
+ assert_equal 1, @net.arcs.size, 'Addes only one arc, this means there should only be one arc'
160
+ assert_equal 3, @net.objects_size, 'Added an arc, so there should be exactly three objects now'
161
+ assert_raise(RuntimeError, "You can't add a Hash, so this should raise an Error") { @net << ({}) }
162
+ array = [PetriNet::Place.new, PetriNet::Transition.new, PetriNet::Transition.new]
163
+ assert_equal @net, @net << array, 'Adding an array should result in the same as adding is one by one'
164
+ assert_equal 2, @net.places.size, 'Adding an array should result in the same as adding is one by one'
165
+ assert_equal 3, @net.transitions.size, 'Adding an array should result in the same as adding is one by one'
166
+ assert_equal 6, @net.objects_size, 'Adding an array should result in the same as adding is one by one'
167
+ end
168
+
169
+ def test_get_place
170
+ @net << place = PetriNet::Place.new(name: 'Test')
171
+ assert_equal place, @net.get_place('Test'), 'should be the same as the given place'
172
+ end
173
+
174
+ def test_get_transition
175
+ @net << transition = PetriNet::Transition.new(name: 'Test')
176
+ assert_equal transition, @net.get_transition('Test'), 'should be the same transition als the given one'
177
+ end
178
+
179
+ def test_add_arc
180
+ @net.add_object PetriNet::Transition.new(name: 'Join', description: 'great testing transition')
181
+ @net.add_object PetriNet::Place.new(name: 'Hydrogen')
182
+ arc = PetriNet::Arc.new do |a|
183
+ a.name = 'Hydrogen.Join'
184
+ a.weight = 2
185
+ a.add_source(@net.get_place('Hydrogen'))
186
+ a.add_destination(@net.get_transition('Join'))
187
+ end
188
+ assert_not_nil arc
189
+ assert arc.validate(@net), 'the created arc is not valid'
190
+
191
+ # add the arc
192
+ id = @net.add_arc arc
193
+ assert @net.objects_size > 1
194
+ assert_equal @net.arcs['Hydrogen.Join'], id
195
+ assert_equal @net.get_arc('Hydrogen.Join'), arc
196
+
197
+ # should not be here :-(
198
+ transition = @net.get_transition 'Join'
199
+ assert !transition.activated?, 'Transition should not be activated as there are no markings'
200
+
201
+ @net.add_object PetriNet::Place.new(name: 'Oxygen')
202
+ arc = PetriNet::Arc.new do |a|
203
+ a.name = 'Join.Oxygen'
204
+ a.weight = 1
205
+ a.add_source(@net.get_transition('Join'))
206
+ a.add_destination(@net.get_place('Oxygen'))
207
+ end
208
+ @net << arc
209
+ @net.get_place('Hydrogen').add_marking(2)
210
+ assert transition.activated?, 'Transition should be activated now'
211
+
212
+ # puts @net.generate_reachability_graph.to_gv
213
+
214
+ # puts
215
+ # puts @net.get_markings
216
+ # puts
217
+ # transition.fire
218
+ # assert_equal @net.objects[@net.places['Hydrogen']].markings.size, 0, "After firing the transituon, there should be no marking left in this place"
219
+ #
220
+ # assert_equal 0, @net.w0(4,3), "There is no arc with this IDs, so there should be 0"
221
+ # assert_equal 2, @net.w0(@net.places['Hydrogen'], @net.transitions['Join']), "There should be an arc with weight 2"
222
+ # assert_equal 0, @net.w0(@net.transitions['Join'], @net.places['Hydrogen']), "Wrong direction"
223
+ #
224
+ # puts @net.get_markings
225
+ # puts
226
+ end
227
+
228
+ def test_merge
229
+ fill_net
230
+ net2 = PetriNet::Net.new(name: 'Water2', description: ' Creation of water from base elements version2.')
231
+ net2 << PetriNet::Place.new(name: 'testplace2')
232
+ net2 << PetriNet::Transition.new(name: 'testtrans')
233
+ arc = PetriNet::Arc.new do |a|
234
+ a.name = 'testarc'
235
+ a.weight = 2
236
+ a.add_source(net2.get_place('testplace2'))
237
+ a.add_destination(net2.get_transition('testtrans'))
238
+ end
239
+ net2 << arc
240
+ assert_equal "Petri Net [Water]\n----------------------------\nDescription: Creation of water from base elements.\nFilename: Water\n\nPlaces\n----------------------------\n1: testplace (0) \n4: testplace2 (0) \n\nTransitions\n----------------------------\n2: testtrans\n\nArcs\n----------------------------\n3: testarc (2) 1 -> 2\n\n", @net.merge(net2).to_s, 'Merge failed, this is only a basic test'
241
+ end
242
+
243
+ def test_generate_reachability_graph
244
+ assert_equal "Reachability Graph [Water]
245
+ ----------------------------
246
+ Description:
247
+ Filename:
248
+
249
+ Nodes
250
+ ----------------------------
251
+ 1: Node1 ([])
252
+
253
+ Edges
254
+ ----------------------------
255
+
256
+ ", @net.generate_reachability_graph.to_s, 'Simple Reachability Graph with only one reachable state'
257
+ end
258
+
259
+ def test_w0
260
+ fill_net
261
+ assert_equal 2, @net.w0(1, 2), 'The weight of the arc between 1 aud 2 is 2'
262
+ assert_equal 0, @net.w0(2, 1), 'The other direction should be 0 because arcs are directed'
263
+ assert_equal 0, @net.w0(3, 6), 'If there is no arc, there should not be a weight, so 0'
264
+ end
265
+
266
+ def test_update
267
+ fill_net
268
+ assert !@net.up_to_date, 'At first the net should be not up to date'
269
+ @net.update
270
+ assert @net.up_to_date, 'Afterwards the net should be up to date and all cached functions should be calculated'
271
+ end
272
+
273
+ def test_generate_weight_function
274
+ fill_net
275
+ weight = { [1, 2] => 2 }
276
+ assert_equal weight, @net.generate_weight_function
277
+ end
278
+
279
+ def test_t_invariants
280
+ fill_net
281
+ assert BigDecimal('0.0') == @net.t_invariants.first
282
+ end
283
+
284
+ def test_get_markings
285
+ fill_net
286
+ @net << PetriNet::Place.new(name: 'place2')
287
+ @net.get_place('testplace').add_marking 2
288
+ @net.get_place('place2').add_marking 3
289
+
290
+ assert_equal [2, 3], @net.get_markings
291
+ end
292
+
293
+ def test_set_markings
294
+ fill_net
295
+ @net << PetriNet::Place.new(name: 'place2')
296
+ @net.set_markings [2, 3]
297
+ assert_equal [2, 3], @net.get_markings
298
+ end
299
+
300
+ def test_objects_size
301
+ fill_net
302
+ assert_equal 3, @net.objects_size
303
+ end
304
+
305
+ def test_save_and_load
306
+ fill_net
307
+ @net.save('/tmp/petrinet')
308
+ net = YAML.safe_load(File.read('/tmp/petrinet'))
309
+ assert_not_nil net
310
+ end
311
+
312
+ # def test_create_marking
313
+ # place = PetriNet::Place.new(:name => 'Hydrogen')
314
+ # marking = PetriNet::Marking.new
315
+ # place.add_marking
316
+ # assert place.markings.length > 0
317
+ # end
318
+ end
319
+ COMMENTED_OUT = <<~EOC
320
+ puts "((Create Place 1 [Hydrogen]))"
321
+ place = PetriNet::Place.new(:name => 'Hydrogen')
322
+
323
+ puts "((Add Place 1 [Hydrogen] to PetriNet))"
324
+ net.add_place(place)
325
+
326
+ puts "((Add Place 2 [Oxygen] to PetriNet))"
327
+ net.add_place(PetriNet::Place.new(:name => 'Oxygen'))
328
+
329
+ puts "((Add Place 3 [Water] to PetriNet))"
330
+ net << PetriNet::Place.new do |p|
331
+ p.name = 'Water'
332
+ end
333
+
334
+ puts "((Add Transition 1 [Join] to PetriNet))"
335
+ net.add_transition(PetriNet::Transition.new(:name => 'Join'))
336
+
337
+ puts "((Add Arc 1 [Hydrogen.Join] to PetriNet))"
338
+ net << PetriNet::Arc.new do |a|
339
+ a.name = 'Hydrogen.Join'
340
+ a.weight = 2
341
+ a.add_source(net.objects[net.places['Hydrogen']])
342
+ a.add_destination(net.objects[net.transitions['Join']])
343
+ end
344
+
345
+ puts "((Add Arc 2 [Oxygen.Join] to PetriNet))"
346
+ arc = PetriNet::Arc.new do |a|
347
+ a.name = 'Oxygen.Join'
348
+ a.add_source(net.objects[net.places['Oxygen']])
349
+ a.add_destination(net.objects[net.transitions['Join']])
350
+ end
351
+ net.add_arc(arc)
352
+
353
+ puts "((Add Arc 3 [Join.Water] to PetriNet))"
354
+ net.add_arc(PetriNet::Arc.new(
355
+ :name => 'Join.Water',
356
+ :description => "Join to Water",
357
+ :source => net.objects[net.transitions["Join"]],
358
+ :destination => net.objects[net.places["Water"]],
359
+ :weight => 1
360
+ )
361
+ )
362
+
363
+ puts
364
+ puts
365
+ puts net.inspect
366
+ puts
367
+ puts
368
+ puts net.to_s
369
+ puts
370
+ puts
371
+ EOC
data/test/tc_place.rb ADDED
File without changes
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "#{File.dirname(__FILE__)}/../lib/petri_net.rb"
4
+ require 'test/unit'
5
+
6
+ class TestTransition < Test::Unit::TestCase
7
+ end
data/test/ts_all.rb ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './ts_petri_net'
4
+ require_relative './ts_reachability_graph'
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'tc_petri_net'
4
+ require_relative 'tc_place'
5
+ require_relative 'tc_transition'
6
+ require_relative 'tc_arc'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'reachability_graph/tc_graph.rb'
4
+ require_relative 'reachability_graph/tc_node.rb'
5
+ require_relative 'reachability_graph/tc_edge.rb'
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: petri_net_2020
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - cclausen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-graphviz
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rgl
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: net-sftp
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: A Petri net modeling gem
56
+ email:
57
+ - '"cclausen@tzi.de"'
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".ruby-version"
64
+ - ".travis.yml"
65
+ - CHANGELOG
66
+ - Gemfile
67
+ - LICENSE
68
+ - README.rdoc
69
+ - Rakefile
70
+ - lib/petri_net.rb
71
+ - lib/petri_net/arc.rb
72
+ - lib/petri_net/base.rb
73
+ - lib/petri_net/coverability_graph.rb
74
+ - lib/petri_net/coverability_graph/edge.rb
75
+ - lib/petri_net/coverability_graph/graph.rb
76
+ - lib/petri_net/coverability_graph/node.rb
77
+ - lib/petri_net/graph.rb
78
+ - lib/petri_net/graph/edge.rb
79
+ - lib/petri_net/graph/graph.rb
80
+ - lib/petri_net/graph/node.rb
81
+ - lib/petri_net/marking.rb
82
+ - lib/petri_net/net.rb
83
+ - lib/petri_net/place.rb
84
+ - lib/petri_net/reachability_graph.rb
85
+ - lib/petri_net/reachability_graph/edge.rb
86
+ - lib/petri_net/reachability_graph/graph.rb
87
+ - lib/petri_net/reachability_graph/node.rb
88
+ - lib/petri_net/transition.rb
89
+ - lib/petri_net/version.rb
90
+ - petri_net.gemspec
91
+ - test/create.rb
92
+ - test/reachability_graph/tc_edge.rb
93
+ - test/reachability_graph/tc_graph.rb
94
+ - test/reachability_graph/tc_node.rb
95
+ - test/tc_arc.rb
96
+ - test/tc_petri_net.rb
97
+ - test/tc_place.rb
98
+ - test/tc_transition.rb
99
+ - test/ts_all.rb
100
+ - test/ts_petri_net.rb
101
+ - test/ts_reachability_graph.rb
102
+ homepage: https://github.com/cclausen/petri_net
103
+ licenses:
104
+ - MIT
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubygems_version: 3.0.3
122
+ signing_key:
123
+ specification_version: 4
124
+ summary: You can create Petri Nets and do some calculations with them like generating
125
+ the Reachability Graph
126
+ test_files:
127
+ - test/create.rb
128
+ - test/reachability_graph/tc_edge.rb
129
+ - test/reachability_graph/tc_graph.rb
130
+ - test/reachability_graph/tc_node.rb
131
+ - test/tc_arc.rb
132
+ - test/tc_petri_net.rb
133
+ - test/tc_place.rb
134
+ - test/tc_transition.rb
135
+ - test/ts_all.rb
136
+ - test/ts_petri_net.rb
137
+ - test/ts_reachability_graph.rb