-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrace.txt
589 lines (456 loc) · 13.9 KB
/
trace.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
STATE 0
I(0, 0)
V(0, 0)
O(0, 0)
I: There is no water flowing in and I am not touching the tap
V: There is no water in the bathtub and the volume of water is not changing
O: There is no water flowing out and the outflow is not changing
Transitions starting from State 0:
(0 => 0)
If we let time pass, we can stay in this State with the same situation:
I(0, 0)
V(0, 0)
O(0, 0)
(0 => 1)
If we start opening the tap, then we move to State 1:
I(0, +)
V(0, 0)
O(0, 0)
_________________________________________________________________
STATE 1
I(0, +)
V(0, 0)
O(0, 0)
I: There is no water flowing in and I am opening the tap
V: There is no water in the bathtub and the volume of water is not changing
O: There is no water flowing out and the outflow is not changing
Transitions starting from State 1:
(1 => 2)
If we let time pass, the water starts flowing in, the volume and the outflow start increasing, then we move to State 2:
I(+, +)
V(0, +)
O(0, +)
_________________________________________________________________
STATE 2
I(+, +)
V(0, +)
O(0, +)
I: The water is flowing in and I am opening the tap
V: There is no water in the bathtub and the volume of water is increasing
O: There is no water flowing out and the outflow is increasing
Transitions starting from State 2:
(2 => 3)
If we let time pass, the water starts flowing into the bathtub, then we move to State 3:
I(+, +)
V(+, +)
O(+, +)
_________________________________________________________________
STATE 3
I(+, +)
V(+, +)
O(+, +)
I: The water is flowing in and I am opening the tap
V: There is water in the bathtub and the volume of water is increasing
O: There is water flowing out from the sink and the outflow is increasing
Transitions starting from State 3:
(3 => 3)
If we let time pass, we can stay in this State with the same situation:
I(+, +)
V(+, +)
O(+, +)
(3 => 4)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, the volume and the outflow stop increasing, then we move to State 4:
I(+, +)
V(max, 0)
O(max, 0)
(3 => 5)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, we close the tap, the volume and the outflow stop increasing, then we move to State 5:
I(+, 0)
V(max, 0)
O(max, 0)
(3 => 15)
If we let time pass, the volume and the outflow stop increasing, then we move to State 15:
I(+, +)
V(+, 0)
O(+, 0)
(3 => 17)
If we stop turning on the tap, then we move to State 17:
I(+, 0)
V(+, +)
O(+, +)
_________________________________________________________________
STATE 4
I(+, +)
V(max, 0)
O(max, 0)
I: The water is flowing in and I am opening the tap
V: The bathtub is full and the volume of water is not changing
O: The flow of the sink is maximum and the outflow is not changing
Transitions starting from State 4:
(4 => 4)
If we let time pass, we can stay in this State with the same situation:
I(+, +)
V(max, 0)
O(max, 0)
(4 => 5)
If we stop turning on the tap, then we move to State 5:
I(+, 0)
V(max, 0)
O(max, 0)
_________________________________________________________________
STATE 5
I(+, 0)
V(max, 0)
O(max, 0)
I: The water is flowing in and I am not touching the tap
V: The bathtub is full and the volume of water is not changing
O: The flow of the sink is maximum and the outflow is not changing
Transitions starting from State 5:
(5 => 4)
If we start opening the tap, then we move to State 4:
I(+, +)
V(max, 0)
O(max, 0)
(5 => 5)
If we let time pass, we can stay in this State with the same situation:
I(+, 0)
V(max, 0)
O(max, 0)
(5 => 6)
If we start closing the tap, then we move to State 6:
I(+, -)
V(max, 0)
O(max, 0)
_________________________________________________________________
STATE 15
I(+, +)
V(+, 0)
O(+, 0)
I: The water is flowing in and I am opening the tap
V: There is water in the bathtub and the volume of water is not changing
O: There is water flowing out from the sink and the outflow is not changing
Transitions starting from State 15:
(15 => 3)
If we let time pass, the volume and the outflow start increasing, then we move to State 3:
I(+, +)
V(+, +)
O(+, +)
(15 => 14)
If we stop turning on the tap, then we move to State 14:
I(+, 0)
V(+, 0)
O(+, 0)
_________________________________________________________________
STATE 17
I(+, 0)
V(+, +)
O(+, +)
I: The water is flowing in and I am not touching the tap
V: There is water in the bathtub and the volume of water is increasing
O: There is water flowing out from the sink and the outflow is increasing
Transitions starting from State 17:
(17 => 3)
If we start opening the tap, then we move to State 3:
I(+, +)
V(+, +)
O(+, +)
(17 => 4)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, the volume and the outflow stop increasing, then we move to State 4:
I(+, +)
V(max, 0)
O(max, 0)
(17 => 5)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, the volume and the outflow stop increasing, then we move to State 5:
I(+, 0)
V(max, 0)
O(max, 0)
(17 => 17)
If we let time pass, we can stay in this State with the same situation:
I(+, 0)
V(+, +)
O(+, +)
(17 => 6)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, we close the tap, the volume and the outflow stop increasing, then we move to State 6:
I(+, -)
V(max, 0)
O(max, 0)
(17 => 14)
If we let time pass, the volume and the outflow stop increasing, then we move to State 14:
I(+, 0)
V(+, 0)
O(+, 0)
(17 => 18)
If we start closing the tap, then we move to State 18:
I(+, -)
V(+, +)
O(+, +)
_________________________________________________________________
STATE 6
I(+, -)
V(max, 0)
O(max, 0)
I: The water is flowing in and I am closing the tap
V: The bathtub is full and the volume of water is not changing
O: The flow of the sink is maximum and the outflow is not changing
Transitions starting from State 6:
(6 => 5)
If we stop turning off the tap, then we move to State 5:
I(+, 0)
V(max, 0)
O(max, 0)
(6 => 6)
If we let time pass, we can stay in this State with the same situation:
I(+, -)
V(max, 0)
O(max, 0)
(6 => 7)
If our Inflow reaches zero , the tap is now closed, the volume and the outflow start decreasing, then we move to State 7:
I(0, 0)
V(max, -)
O(max, -)
(6 => 16)
If we let time pass, the volume and the outflow start decreasing, then we move to State 16:
I(+, -)
V(max, -)
O(max, -)
_________________________________________________________________
STATE 14
I(+, 0)
V(+, 0)
O(+, 0)
I: The water is flowing in and I am not touching the tap
V: There is water in the bathtub and the volume of water is not changing
O: There is water flowing out from the sink and the outflow is not changing
Transitions starting from State 14:
(14 => 3)
If we start opening the tap, the volume and the outflow start increasing, then we move to State 3:
I(+, +)
V(+, +)
O(+, +)
(14 => 14)
If we let time pass, we can stay in this State with the same situation:
I(+, 0)
V(+, 0)
O(+, 0)
(14 => 12)
If we start closing the tap, the volume and the outflow start decreasing, then we move to State 12:
I(+, -)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 18
I(+, -)
V(+, +)
O(+, +)
I: The water is flowing in and I am closing the tap
V: There is water in the bathtub and the volume of water is increasing
O: There is water flowing out from the sink and the outflow is increasing
Transitions starting from State 18:
(18 => 5)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, the volume and the outflow stop increasing, then we move to State 5:
I(+, 0)
V(max, 0)
O(max, 0)
(18 => 17)
If we stop turning off the tap, then we move to State 17:
I(+, 0)
V(+, +)
O(+, +)
(18 => 6)
If the water volume reaches the bathtub capacity and the outflow reaches the maximum, the volume and the outflow stop increasing, then we move to State 6:
I(+, -)
V(max, 0)
O(max, 0)
(18 => 18)
If we let time pass, we can stay in this State with the same situation:
I(+, -)
V(+, +)
O(+, +)
(18 => 13)
If we let time pass, the volume and the outflow stop increasing, then we move to State 13:
I(+, -)
V(+, 0)
O(+, 0)
_________________________________________________________________
STATE 7
I(0, 0)
V(max, -)
O(max, -)
I: There is no water flowing in and I am not touching the tap
V: The bathtub is full and the volume of water is decreasing
O: The flow of the sink is maximum and the outflow is decreasing
Transitions starting from State 7:
(7 => 8)
If we let time pass, the water is nomore overflowing, then we move to State 8:
I(0, 0)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 16
I(+, -)
V(max, -)
O(max, -)
I: The water is flowing in and I am closing the tap
V: The bathtub is full and the volume of water is decreasing
O: The flow of the sink is maximum and the outflow is decreasing
Transitions starting from State 16:
(16 => 12)
If we let time pass, the water is nomore overflowing, then we move to State 12:
I(+, -)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 8
I(0, 0)
V(+, -)
O(+, -)
I: There is no water flowing in and I am not touching the tap
V: There is water in the bathtub and the volume of water is decreasing
O: There is water flowing out from the sink and the outflow is decreasing
Transitions starting from State 8:
(8 => 0)
If the water volume reaches zero and the outflow is null, the volume and the outflow stop decreasing, then we move to State 0:
I(0, 0)
V(0, 0)
O(0, 0)
(8 => 1)
If the water volume reaches zero and the outflow is null, the volume and the outflow stop decreasing, then we move to State 1:
I(0, +)
V(0, 0)
O(0, 0)
(8 => 8)
If we let time pass, we can stay in this State with the same situation:
I(0, 0)
V(+, -)
O(+, -)
(8 => 9)
If we start opening the tap, then we move to State 9:
I(0, +)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 12
I(+, -)
V(+, -)
O(+, -)
I: The water is flowing in and I am closing the tap
V: There is water in the bathtub and the volume of water is decreasing
O: There is water flowing out from the sink and the outflow is decreasing
Transitions starting from State 12:
(12 => 0)
If our Inflow reaches zero , the tap is now closed, the volume and the outflow stop decreasing, then we move to State 0:
I(0, 0)
V(0, 0)
O(0, 0)
(12 => 8)
If our Inflow reaches zero , the tap is now closed, then we move to State 8:
I(0, 0)
V(+, -)
O(+, -)
(12 => 12)
If we let time pass, we can stay in this State with the same situation:
I(+, -)
V(+, -)
O(+, -)
(12 => 11)
If we stop turning off the tap, then we move to State 11:
I(+, 0)
V(+, -)
O(+, -)
(12 => 13)
If we let time pass, the volume and the outflow stop decreasing, then we move to State 13:
I(+, -)
V(+, 0)
O(+, 0)
_________________________________________________________________
STATE 9
I(0, +)
V(+, -)
O(+, -)
I: There is no water flowing in and I am opening the tap
V: There is water in the bathtub and the volume of water is decreasing
O: There is water flowing out from the sink and the outflow is decreasing
Transitions starting from State 9:
(9 => 10)
If we let time pass, the water starts flowing in, then we move to State 10:
I(+, +)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 10
I(+, +)
V(+, -)
O(+, -)
I: The water is flowing in and I am opening the tap
V: There is water in the bathtub and the volume of water is decreasing
O: There is water flowing out from the sink and the outflow is decreasing
Transitions starting from State 10:
(10 => 15)
If we let time pass, the volume and the outflow stop decreasing, then we move to State 15:
I(+, +)
V(+, 0)
O(+, 0)
(10 => 10)
If we let time pass, we can stay in this State with the same situation:
I(+, +)
V(+, -)
O(+, -)
(10 => 11)
If we stop turning on the tap, then we move to State 11:
I(+, 0)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 11
I(+, 0)
V(+, -)
O(+, -)
I: The water is flowing in and I am not touching the tap
V: There is water in the bathtub and the volume of water is decreasing
O: There is water flowing out from the sink and the outflow is decreasing
Transitions starting from State 11:
(11 => 14)
If we let time pass, the volume and the outflow stop decreasing, then we move to State 14:
I(+, 0)
V(+, 0)
O(+, 0)
(11 => 12)
If we start closing the tap, then we move to State 12:
I(+, -)
V(+, -)
O(+, -)
(11 => 10)
If we start opening the tap, then we move to State 10:
I(+, +)
V(+, -)
O(+, -)
(11 => 11)
If we let time pass, we can stay in this State with the same situation:
I(+, 0)
V(+, -)
O(+, -)
_________________________________________________________________
STATE 13
I(+, -)
V(+, 0)
O(+, 0)
I: The water is flowing in and I am closing the tap
V: There is water in the bathtub and the volume of water is not changing
O: There is water flowing out from the sink and the outflow is not changing
Transitions starting from State 13:
(13 => 14)
If we stop turning off the tap, then we move to State 14:
I(+, 0)
V(+, 0)
O(+, 0)
(13 => 8)
If our Inflow reaches zero , the tap is now closed, the volume and the outflow start decreasing, then we move to State 8:
I(0, 0)
V(+, -)
O(+, -)
(13 => 12)
If we let time pass, the volume and the outflow start decreasing, then we move to State 12:
I(+, -)
V(+, -)
O(+, -)
_________________________________________________________________