-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompiled_bot
3003 lines (2786 loc) · 92.5 KB
/
compiled_bot
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
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Module(body=[
ImportFrom(module='python_stl', names=[
alias(name='*', asname=None),
], level=0),
Import(names=[
alias(name='random', asname=None),
]),
Import(names=[
alias(name='math', asname=None),
]),
FunctionDef(name='get_location', args=arguments(args=[
Name(id='xy', ctx=Param()),
Name(id='direction', ctx=Param()),
], vararg=None, kwarg=None, defaults=[]), body=[
Assign(targets=[
Name(id='moves', ctx=Store()),
], value=Tuple(elts=[
Tuple(elts=[
Num(n=-1),
Num(n=0),
], ctx=Load()),
Tuple(elts=[
Num(n=0),
Num(n=1),
], ctx=Load()),
Tuple(elts=[
Num(n=1),
Num(n=0),
], ctx=Load()),
Tuple(elts=[
Num(n=0),
Num(n=-1),
], ctx=Load()),
Tuple(elts=[
Num(n=0),
Num(n=0),
], ctx=Load()),
], ctx=Load())),
Assign(targets=[
Name(id='move', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='moves', ctx=Load()),
Name(id='direction', ctx=Load()),
], keywords=[], starargs=None, kwargs=None)),
Return(value=Tuple(elts=[
BinOp(left=Call(func=Name(id='FIRST', ctx=Load()), args=[
Name(id='xy', ctx=Load()),
], keywords=[], starargs=None, kwargs=None), op=Add(), right=Call(func=Name(id='FIRST', ctx=Load()), args=[
Name(id='move', ctx=Load()),
], keywords=[], starargs=None, kwargs=None)),
BinOp(left=Call(func=Name(id='SECOND', ctx=Load()), args=[
Name(id='xy', ctx=Load()),
], keywords=[], starargs=None, kwargs=None), op=Add(), right=Call(func=Name(id='SECOND', ctx=Load()), args=[
Name(id='move', ctx=Load()),
], keywords=[], starargs=None, kwargs=None)),
], ctx=Load())),
], decorator_list=[]),
FunctionDef(name='valid_location', args=arguments(args=[
Name(id='world', ctx=Param()),
Name(id='xy', ctx=Param()),
], vararg=None, kwarg=None, defaults=[]), body=[
Return(value=UnaryOp(op=Not(), operand=Compare(left=Call(func=Name(id='GET_ARRAY', ctx=Load()), args=[
Name(id='world', ctx=Load()),
Name(id='xy', ctx=Load()),
], keywords=[], starargs=None, kwargs=None), ops=[
Eq(),
], comparators=[
Name(id='WALL', ctx=Load()),
]))),
], decorator_list=[]),
FunctionDef(name='next_direction', args=arguments(args=[
Name(id='direction', ctx=Param()),
], vararg=None, kwarg=None, defaults=[]), body=[
Assign(targets=[
Name(id='direction', ctx=Store()),
], value=BinOp(left=Name(id='direction', ctx=Load()), op=Add(), right=Num(n=1))),
If(test=Compare(left=Name(id='direction', ctx=Load()), ops=[
Eq(),
], comparators=[
Num(n=4),
]), body=[
Assign(targets=[
Name(id='direction', ctx=Store()),
], value=Num(n=0)),
], orelse=[]),
Return(value=Name(id='direction', ctx=Load())),
], decorator_list=[]),
FunctionDef(name='main', args=arguments(args=[
Name(id='ai_state', ctx=Param()),
Name(id='world_state', ctx=Param()),
], vararg=None, kwarg=None, defaults=[]), body=[
Assign(targets=[
Name(id='world', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='world_state', ctx=Load()),
Num(n=0),
], keywords=[], starargs=None, kwargs=None)),
Assign(targets=[
Name(id='man', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='world_state', ctx=Load()),
Num(n=1),
], keywords=[], starargs=None, kwargs=None)),
Assign(targets=[
Name(id='man_location', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='man', ctx=Load()),
Num(n=1),
], keywords=[], starargs=None, kwargs=None)),
Assign(targets=[
Name(id='man_direction', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='man', ctx=Load()),
Num(n=2),
], keywords=[], starargs=None, kwargs=None)),
Assign(targets=[
Name(id='ghosts', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='world_state', ctx=Load()),
Num(n=2),
], keywords=[], starargs=None, kwargs=None)),
Assign(targets=[
Name(id='fruit', ctx=Store()),
], value=Call(func=Name(id='GET_VALUE', ctx=Load()), args=[
Name(id='world_state', ctx=Load()),
Num(n=3),
], keywords=[], starargs=None, kwargs=None)),
Assign(targets=[
Name(id='final_direction', ctx=Store()),
], value=Name(id='man_direction', ctx=Load())),
Assign(targets=[
Name(id='valid_directions', ctx=Store()),
], value=Num(n=0)),
Assign(targets=[
Name(id='iteration', ctx=Store()),
], value=Num(n=0)),
While(test=Compare(left=Name(id='iteration', ctx=Load()), ops=[
Lt(),
], comparators=[
Num(n=4),
]), body=[
Assign(targets=[
Name(id='new_location', ctx=Store()),
], value=Call(func=Name(id='get_location', ctx=Load()), args=[
Name(id='man_location', ctx=Load()),
Name(id='iteration', ctx=Load()),
], keywords=[], starargs=None, kwargs=None)),
If(test=Call(func=Name(id='valid_location', ctx=Load()), args=[
Name(id='world', ctx=Load()),
Name(id='new_location', ctx=Load()),
], keywords=[], starargs=None, kwargs=None), body=[
Assign(targets=[
Name(id='valid_directions', ctx=Store()),
], value=BinOp(left=Name(id='valid_directions', ctx=Load()), op=Add(), right=Num(n=1))),
], orelse=[]),
Assign(targets=[
Name(id='iteration', ctx=Store()),
], value=BinOp(left=Name(id='iteration', ctx=Load()), op=Add(), right=Num(n=1))),
], orelse=[]),
While(test=UnaryOp(op=Not(), operand=Call(func=Name(id='valid_location', ctx=Load()), args=[
Name(id='world', ctx=Load()),
Call(func=Name(id='get_location', ctx=Load()), args=[
Name(id='man_location', ctx=Load()),
Name(id='final_direction', ctx=Load()),
], keywords=[], starargs=None, kwargs=None),
], keywords=[], starargs=None, kwargs=None)), body=[
Assign(targets=[
Name(id='final_direction', ctx=Store()),
], value=Call(func=Name(id='next_direction', ctx=Load()), args=[
Name(id='final_direction', ctx=Load()),
], keywords=[], starargs=None, kwargs=None)),
], orelse=[]),
Return(value=Name(id='final_direction', ctx=Load())),
], decorator_list=[]),
Expr(value=Call(func=Name(id='main', ctx=Load()), args=[
Num(n=0),
Tuple(elts=[
Num(n=0),
Num(n=0),
], ctx=Load()),
], keywords=[], starargs=None, kwargs=None)),
])
Visiting <_ast.Module object at 0x100a6ea10>
Visiting <_ast.Assign object at 0x100a7fa50>
Visiting <_ast.Num object at 0x100a7fad0>
Visited <_ast.Num object at 0x100a7fad0>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Need to alocate WALL
Visited <_ast.Assign object at 0x100a7fa50>
<__main__.ByteCode instance at 0x1009d3440>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visiting <_ast.Assign object at 0x100a7fb10>
Visiting <_ast.Num object at 0x100a7fb90>
Visited <_ast.Num object at 0x100a7fb90>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Need to alocate EMPTY
Visited <_ast.Assign object at 0x100a7fb10>
<__main__.ByteCode instance at 0x1009d3560>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Visiting <_ast.Assign object at 0x100a7fbd0>
Visiting <_ast.Num object at 0x100a7fc50>
Visited <_ast.Num object at 0x100a7fc50>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(2)
Need to alocate PILL
Visited <_ast.Assign object at 0x100a7fbd0>
<__main__.ByteCode instance at 0x1009d37a0>
ByteCode output of size 1:
0: instructions.LoadConstant(2)
Visiting <_ast.Assign object at 0x100a7fc90>
Visiting <_ast.Num object at 0x100a7fd90>
Visited <_ast.Num object at 0x100a7fd90>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(3)
Need to alocate POWER_PILL
Visited <_ast.Assign object at 0x100a7fc90>
<__main__.ByteCode instance at 0x1009d37e8>
ByteCode output of size 1:
0: instructions.LoadConstant(3)
Visiting <_ast.Assign object at 0x100a7fdd0>
Visiting <_ast.Num object at 0x100a7fe50>
Visited <_ast.Num object at 0x100a7fe50>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(4)
Need to alocate FRUIT
Visited <_ast.Assign object at 0x100a7fdd0>
<__main__.ByteCode instance at 0x1009d3710>
ByteCode output of size 1:
0: instructions.LoadConstant(4)
Visiting <_ast.Assign object at 0x100a7fe90>
Visiting <_ast.Num object at 0x100a7ff10>
Visited <_ast.Num object at 0x100a7ff10>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(5)
Need to alocate MAN_START
Visited <_ast.Assign object at 0x100a7fe90>
<__main__.ByteCode instance at 0x1009d36c8>
ByteCode output of size 1:
0: instructions.LoadConstant(5)
Visiting <_ast.Assign object at 0x100a7ff50>
Visiting <_ast.Num object at 0x100a7ffd0>
Visited <_ast.Num object at 0x100a7ffd0>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(6)
Need to alocate GHOST_START
Visited <_ast.Assign object at 0x100a7ff50>
<__main__.ByteCode instance at 0x1009d3878>
ByteCode output of size 1:
0: instructions.LoadConstant(6)
Visiting <_ast.Assign object at 0x100a7fcd0>
Visiting <_ast.Num object at 0x100a88050>
Visited <_ast.Num object at 0x100a88050>
<__main__.ByteCode instance at 0x1009d33f8>
ByteCode output of size 1:
0: instructions.LoadConstant(1000000)
Need to alocate INF
Visited <_ast.Assign object at 0x100a7fcd0>
<__main__.ByteCode instance at 0x1009d3908>
ByteCode output of size 1:
0: instructions.LoadConstant(1000000)
Visited <_ast.Module object at 0x100a6ea10>
<__main__.ByteCode instance at 0x1009d3488>
ByteCode output of size 9:
0: instructions.LoadConstant(0)
1: instructions.LoadConstant(1)
2: instructions.LoadConstant(2)
3: instructions.LoadConstant(3)
4: instructions.LoadConstant(4)
5: instructions.LoadConstant(5)
6: instructions.LoadConstant(6)
7: instructions.LoadConstant(1000000)
8: instructions.ReturnFromFunction()
Visiting <_ast.Module object at 0x100a7fa50>
Visiting <_ast.FunctionDef object at 0x100a7fad0>
Visiting <_ast.While object at 0x100a7fb50>
Visiting <_ast.Compare object at 0x100a7fbd0>
Visiting <_ast.Name object at 0x100a7fc50>
Visited <_ast.Name object at 0x100a7fc50>
<__main__.ByteCode instance at 0x100a8d440>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 1)
Visiting <_ast.Num object at 0x100a7fc10>
Visited <_ast.Num object at 0x100a7fc10>
<__main__.ByteCode instance at 0x100a8d560>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visited <_ast.Compare object at 0x100a7fbd0>
<__main__.ByteCode instance at 0x100a8d680>
ByteCode output of size 3:
0: instructions.LoadEnv(0, 1)
1: instructions.LoadConstant(0)
2: instructions.CompareGreater()
Visiting <_ast.Assign object at 0x100a7fc90>
Visiting <_ast.Call object at 0x100a7fd50>
At function call SECOND
Visiting <_ast.Name object at 0x100a7fe50>
Visited <_ast.Name object at 0x100a7fe50>
<__main__.ByteCode instance at 0x100a8d7a0>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 0)
Found SECOND in built-in
Visited <_ast.Call object at 0x100a7fd50>
<__main__.ByteCode instance at 0x100a8d440>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractSecond()
Visited <_ast.Assign object at 0x100a7fc90>
<__main__.ByteCode instance at 0x100a8d7a0>
ByteCode output of size 3:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractSecond()
2: instructions.StoreToEnv(0, 0)
Visiting <_ast.Assign object at 0x100a7fe10>
Visiting <_ast.BinOp object at 0x100a7ff10>
At BinOp <_ast.Sub object at 0x100a6a3d0>
Visiting <_ast.Name object at 0x100a7fed0>
Visited <_ast.Name object at 0x100a7fed0>
<__main__.ByteCode instance at 0x100a8d950>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 1)
Visiting <_ast.Num object at 0x100a7ff50>
Visited <_ast.Num object at 0x100a7ff50>
<__main__.ByteCode instance at 0x100a8da70>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Visited <_ast.BinOp object at 0x100a7ff10>
<__main__.ByteCode instance at 0x100a8d440>
ByteCode output of size 3:
0: instructions.LoadEnv(0, 1)
1: instructions.LoadConstant(1)
2: instructions.IntSubtraction()
Visited <_ast.Assign object at 0x100a7fe10>
<__main__.ByteCode instance at 0x100a8da70>
ByteCode output of size 4:
0: instructions.LoadEnv(0, 1)
1: instructions.LoadConstant(1)
2: instructions.IntSubtraction()
3: instructions.StoreToEnv(0, 1)
Visited <_ast.While object at 0x100a7fb50>
<__main__.ByteCode instance at 0x100a8da70>
ByteCode output of size 16:
0: __while_start_0__:
1: instructions.LoadEnv(0, 1)
2: instructions.LoadConstant(0)
3: instructions.CompareGreater()
4: __main__.TailCallBranchLabel (__while_body_1__, __while_finish_2__)
5: __while_body_1__:
6: instructions.LoadEnv(0, 0)
7: instructions.ExtractSecond()
8: instructions.StoreToEnv(0, 0)
9: instructions.LoadEnv(0, 1)
10: instructions.LoadConstant(1)
11: instructions.IntSubtraction()
12: instructions.StoreToEnv(0, 1)
13: instructions.LoadConstant(0)
14: __main__.JumpLabel (__while_start_0__)
15: __while_finish_2__:
Visiting <_ast.Expr object at 0x100a7ffd0>
Visiting <_ast.Call object at 0x100a7ff90>
At function call FIRST
Visiting <_ast.Name object at 0x100a7fd10>
Visited <_ast.Name object at 0x100a7fd10>
<__main__.ByteCode instance at 0x100a8d680>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 0)
Found FIRST in built-in
Visited <_ast.Call object at 0x100a7ff90>
<__main__.ByteCode instance at 0x100a8d560>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractFirst()
Visited <_ast.Expr object at 0x100a7ffd0>
<__main__.ByteCode instance at 0x100a8d560>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractFirst()
Function body:
ByteCode output of size 19:
0: __while_start_0__:
1: instructions.LoadEnv(0, 1)
2: instructions.LoadConstant(0)
3: instructions.CompareGreater()
4: __main__.TailCallBranchLabel (__while_body_1__, __while_finish_2__)
5: __while_body_1__:
6: instructions.LoadEnv(0, 0)
7: instructions.ExtractSecond()
8: instructions.StoreToEnv(0, 0)
9: instructions.LoadEnv(0, 1)
10: instructions.LoadConstant(1)
11: instructions.IntSubtraction()
12: instructions.StoreToEnv(0, 1)
13: instructions.LoadConstant(0)
14: __main__.JumpLabel (__while_start_0__)
15: __while_finish_2__:
16: instructions.LoadEnv(0, 0)
17: instructions.ExtractFirst()
18: instructions.ReturnFromFunction()
Visited <_ast.FunctionDef object at 0x100a7fad0>
<__main__.ByteCode instance at 0x100a8d680>
ByteCode output of size 0:
Visiting <_ast.FunctionDef object at 0x100a6ea10>
Visiting <_ast.Return object at 0x100a880d0>
Visiting <_ast.Call object at 0x100a88350>
At function call GET_VALUE
Visiting <_ast.Call object at 0x100a88290>
At function call GET_VALUE
Visiting <_ast.Name object at 0x100a88310>
Visited <_ast.Name object at 0x100a88310>
<__main__.ByteCode instance at 0x100a8def0>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 0)
Visiting <_ast.Call object at 0x100a88490>
At function call FIRST
Visiting <_ast.Name object at 0x100a88510>
Visited <_ast.Name object at 0x100a88510>
<__main__.ByteCode instance at 0x100a8f0e0>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 1)
Found FIRST in built-in
Visited <_ast.Call object at 0x100a88490>
<__main__.ByteCode instance at 0x100a8f050>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 1)
1: instructions.ExtractFirst()
Visited <_ast.Call object at 0x100a88290>
<__main__.ByteCode instance at 0x100a8de60>
ByteCode output of size 4:
0: instructions.LoadEnv(0, 0)
1: instructions.LoadEnv(0, 1)
2: instructions.ExtractFirst()
3: ApplyFunction(2) GET_VALUE (locals = 0)
Visiting <_ast.Call object at 0x100a88550>
At function call SECOND
Visiting <_ast.Name object at 0x100a885d0>
Visited <_ast.Name object at 0x100a885d0>
<__main__.ByteCode instance at 0x100a8f0e0>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 1)
Found SECOND in built-in
Visited <_ast.Call object at 0x100a88550>
<__main__.ByteCode instance at 0x100a8f050>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 1)
1: instructions.ExtractSecond()
Visited <_ast.Call object at 0x100a88350>
<__main__.ByteCode instance at 0x100a8ddd0>
ByteCode output of size 7:
0: instructions.LoadEnv(0, 0)
1: instructions.LoadEnv(0, 1)
2: instructions.ExtractFirst()
3: ApplyFunction(2) GET_VALUE (locals = 0)
4: instructions.LoadEnv(0, 1)
5: instructions.ExtractSecond()
6: ApplyFunction(2) GET_VALUE (locals = 0)
Visited <_ast.Return object at 0x100a880d0>
<__main__.ByteCode instance at 0x100a8ddd0>
ByteCode output of size 7:
0: instructions.LoadEnv(0, 0)
1: instructions.LoadEnv(0, 1)
2: instructions.ExtractFirst()
3: ApplyFunction(2) GET_VALUE (locals = 0)
4: instructions.LoadEnv(0, 1)
5: instructions.ExtractSecond()
6: ApplyFunction(2) GET_VALUE (locals = 0)
Function body:
ByteCode output of size 8:
0: instructions.LoadEnv(0, 0)
1: instructions.LoadEnv(0, 1)
2: instructions.ExtractFirst()
3: ApplyFunction(2) GET_VALUE (locals = 0)
4: instructions.LoadEnv(0, 1)
5: instructions.ExtractSecond()
6: ApplyFunction(2) GET_VALUE (locals = 0)
7: instructions.ReturnFromFunction()
Visited <_ast.FunctionDef object at 0x100a6ea10>
<__main__.ByteCode instance at 0x100a8f0e0>
ByteCode output of size 0:
Visiting <_ast.FunctionDef object at 0x100a88610>
Visiting <_ast.Assign object at 0x100a88750>
Visiting <_ast.Tuple object at 0x100a88910>
Visiting <_ast.Tuple object at 0x100a887d0>
Visiting <_ast.Num object at 0x100a88810>
Visited <_ast.Num object at 0x100a88810>
<__main__.ByteCode instance at 0x100a8f2d8>
ByteCode output of size 1:
0: instructions.LoadConstant(-1)
Visiting <_ast.Num object at 0x100a88850>
Visited <_ast.Num object at 0x100a88850>
<__main__.ByteCode instance at 0x100a8f3f8>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visited <_ast.Tuple object at 0x100a887d0>
<__main__.ByteCode instance at 0x100a8f290>
ByteCode output of size 5:
0: instructions.LoadConstant(-1)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visiting <_ast.Tuple object at 0x100a88990>
Visiting <_ast.Num object at 0x100a88950>
Visited <_ast.Num object at 0x100a88950>
<__main__.ByteCode instance at 0x100a8f638>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visiting <_ast.Num object at 0x100a888d0>
Visited <_ast.Num object at 0x100a888d0>
<__main__.ByteCode instance at 0x100a8f758>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Visited <_ast.Tuple object at 0x100a88990>
<__main__.ByteCode instance at 0x100a8f3f8>
ByteCode output of size 5:
0: instructions.LoadConstant(0)
1: instructions.LoadConstant(1)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visiting <_ast.Tuple object at 0x100a88890>
Visiting <_ast.Num object at 0x100a88a10>
Visited <_ast.Num object at 0x100a88a10>
<__main__.ByteCode instance at 0x100a8f758>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Visiting <_ast.Num object at 0x100a889d0>
Visited <_ast.Num object at 0x100a889d0>
<__main__.ByteCode instance at 0x100a8fa28>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visited <_ast.Tuple object at 0x100a88890>
<__main__.ByteCode instance at 0x100a8f290>
ByteCode output of size 5:
0: instructions.LoadConstant(1)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visiting <_ast.Tuple object at 0x100a88a50>
Visiting <_ast.Num object at 0x100a88a90>
Visited <_ast.Num object at 0x100a88a90>
<__main__.ByteCode instance at 0x100a8fa28>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visiting <_ast.Num object at 0x100a88ad0>
Visited <_ast.Num object at 0x100a88ad0>
<__main__.ByteCode instance at 0x100a8fcf8>
ByteCode output of size 1:
0: instructions.LoadConstant(-1)
Visited <_ast.Tuple object at 0x100a88a50>
<__main__.ByteCode instance at 0x100a8f3f8>
ByteCode output of size 5:
0: instructions.LoadConstant(0)
1: instructions.LoadConstant(-1)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visiting <_ast.Tuple object at 0x100a88b50>
Visiting <_ast.Num object at 0x100a88b90>
Visited <_ast.Num object at 0x100a88b90>
<__main__.ByteCode instance at 0x100a8fcf8>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visiting <_ast.Num object at 0x100a88bd0>
Visited <_ast.Num object at 0x100a88bd0>
<__main__.ByteCode instance at 0x100a8ffc8>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visited <_ast.Tuple object at 0x100a88b50>
<__main__.ByteCode instance at 0x100a8f290>
ByteCode output of size 5:
0: instructions.LoadConstant(0)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visited <_ast.Tuple object at 0x100a88910>
<__main__.ByteCode instance at 0x100a8f248>
ByteCode output of size 31:
0: instructions.LoadConstant(-1)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
5: instructions.LoadConstant(0)
6: instructions.LoadConstant(1)
7: instructions.LoadConstant(0)
8: instructions.AllocateCons()
9: instructions.AllocateCons()
10: instructions.LoadConstant(1)
11: instructions.LoadConstant(0)
12: instructions.LoadConstant(0)
13: instructions.AllocateCons()
14: instructions.AllocateCons()
15: instructions.LoadConstant(0)
16: instructions.LoadConstant(-1)
17: instructions.LoadConstant(0)
18: instructions.AllocateCons()
19: instructions.AllocateCons()
20: instructions.LoadConstant(0)
21: instructions.LoadConstant(0)
22: instructions.LoadConstant(0)
23: instructions.AllocateCons()
24: instructions.AllocateCons()
25: instructions.LoadConstant(0)
26: instructions.AllocateCons()
27: instructions.AllocateCons()
28: instructions.AllocateCons()
29: instructions.AllocateCons()
30: instructions.AllocateCons()
Need to alocate moves
Visited <_ast.Assign object at 0x100a88750>
<__main__.ByteCode instance at 0x100a8f290>
ByteCode output of size 32:
0: instructions.LoadConstant(-1)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
5: instructions.LoadConstant(0)
6: instructions.LoadConstant(1)
7: instructions.LoadConstant(0)
8: instructions.AllocateCons()
9: instructions.AllocateCons()
10: instructions.LoadConstant(1)
11: instructions.LoadConstant(0)
12: instructions.LoadConstant(0)
13: instructions.AllocateCons()
14: instructions.AllocateCons()
15: instructions.LoadConstant(0)
16: instructions.LoadConstant(-1)
17: instructions.LoadConstant(0)
18: instructions.AllocateCons()
19: instructions.AllocateCons()
20: instructions.LoadConstant(0)
21: instructions.LoadConstant(0)
22: instructions.LoadConstant(0)
23: instructions.AllocateCons()
24: instructions.AllocateCons()
25: instructions.LoadConstant(0)
26: instructions.AllocateCons()
27: instructions.AllocateCons()
28: instructions.AllocateCons()
29: instructions.AllocateCons()
30: instructions.AllocateCons()
31: instructions.StoreToEnv(0, 2)
Visiting <_ast.Assign object at 0x100a88b10>
Visiting <_ast.Call object at 0x100a88d10>
At function call GET_VALUE
Visiting <_ast.Name object at 0x100a88d50>
Visited <_ast.Name object at 0x100a88d50>
<__main__.ByteCode instance at 0x100a90518>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 2)
Visiting <_ast.Name object at 0x100a88c50>
Visited <_ast.Name object at 0x100a88c50>
<__main__.ByteCode instance at 0x100a90638>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 1)
Visited <_ast.Call object at 0x100a88d10>
<__main__.ByteCode instance at 0x100a8f248>
ByteCode output of size 3:
0: instructions.LoadEnv(0, 2)
1: instructions.LoadEnv(0, 1)
2: ApplyFunction(2) GET_VALUE (locals = 0)
Need to alocate move
Visited <_ast.Assign object at 0x100a88b10>
<__main__.ByteCode instance at 0x100a90638>
ByteCode output of size 4:
0: instructions.LoadEnv(0, 2)
1: instructions.LoadEnv(0, 1)
2: ApplyFunction(2) GET_VALUE (locals = 0)
3: instructions.StoreToEnv(0, 3)
Visiting <_ast.Return object at 0x100a88c90>
Visiting <_ast.Tuple object at 0x100a88cd0>
Visiting <_ast.BinOp object at 0x100a88dd0>
At BinOp <_ast.Add object at 0x100a6a350>
Visiting <_ast.Call object at 0x100a88e10>
At function call FIRST
Visiting <_ast.Name object at 0x100a88e90>
Visited <_ast.Name object at 0x100a88e90>
<__main__.ByteCode instance at 0x100a90830>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 0)
Found FIRST in built-in
Visited <_ast.Call object at 0x100a88e10>
<__main__.ByteCode instance at 0x100a907a0>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractFirst()
Visiting <_ast.Call object at 0x100a88ed0>
At function call FIRST
Visiting <_ast.Name object at 0x100a88f50>
Visited <_ast.Name object at 0x100a88f50>
<__main__.ByteCode instance at 0x100a90950>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 3)
Found FIRST in built-in
Visited <_ast.Call object at 0x100a88ed0>
<__main__.ByteCode instance at 0x100a90830>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 3)
1: instructions.ExtractFirst()
Visited <_ast.BinOp object at 0x100a88dd0>
<__main__.ByteCode instance at 0x100a8f248>
ByteCode output of size 5:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractFirst()
2: instructions.LoadEnv(0, 3)
3: instructions.ExtractFirst()
4: instructions.IntAddition()
Visiting <_ast.BinOp object at 0x100a88fd0>
At BinOp <_ast.Add object at 0x100a6a350>
Visiting <_ast.Call object at 0x100a88f90>
At function call SECOND
Visiting <_ast.Name object at 0x100a890d0>
Visited <_ast.Name object at 0x100a890d0>
<__main__.ByteCode instance at 0x100a90a70>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 0)
Found SECOND in built-in
Visited <_ast.Call object at 0x100a88f90>
<__main__.ByteCode instance at 0x100a907a0>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractSecond()
Visiting <_ast.Call object at 0x100a89110>
At function call SECOND
Visiting <_ast.Name object at 0x100a89150>
Visited <_ast.Name object at 0x100a89150>
<__main__.ByteCode instance at 0x100a90b90>
ByteCode output of size 1:
0: instructions.LoadEnv(0, 3)
Found SECOND in built-in
Visited <_ast.Call object at 0x100a89110>
<__main__.ByteCode instance at 0x100a90a70>
ByteCode output of size 2:
0: instructions.LoadEnv(0, 3)
1: instructions.ExtractSecond()
Visited <_ast.BinOp object at 0x100a88fd0>
<__main__.ByteCode instance at 0x100a90830>
ByteCode output of size 5:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractSecond()
2: instructions.LoadEnv(0, 3)
3: instructions.ExtractSecond()
4: instructions.IntAddition()
Visited <_ast.Tuple object at 0x100a88cd0>
<__main__.ByteCode instance at 0x100a8f290>
ByteCode output of size 13:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractFirst()
2: instructions.LoadEnv(0, 3)
3: instructions.ExtractFirst()
4: instructions.IntAddition()
5: instructions.LoadEnv(0, 0)
6: instructions.ExtractSecond()
7: instructions.LoadEnv(0, 3)
8: instructions.ExtractSecond()
9: instructions.IntAddition()
10: instructions.LoadConstant(0)
11: instructions.AllocateCons()
12: instructions.AllocateCons()
Visited <_ast.Return object at 0x100a88c90>
<__main__.ByteCode instance at 0x100a8f290>
ByteCode output of size 13:
0: instructions.LoadEnv(0, 0)
1: instructions.ExtractFirst()
2: instructions.LoadEnv(0, 3)
3: instructions.ExtractFirst()
4: instructions.IntAddition()
5: instructions.LoadEnv(0, 0)
6: instructions.ExtractSecond()
7: instructions.LoadEnv(0, 3)
8: instructions.ExtractSecond()
9: instructions.IntAddition()
10: instructions.LoadConstant(0)
11: instructions.AllocateCons()
12: instructions.AllocateCons()
Function body:
ByteCode output of size 50:
0: instructions.LoadConstant(-1)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
5: instructions.LoadConstant(0)
6: instructions.LoadConstant(1)
7: instructions.LoadConstant(0)
8: instructions.AllocateCons()
9: instructions.AllocateCons()
10: instructions.LoadConstant(1)
11: instructions.LoadConstant(0)
12: instructions.LoadConstant(0)
13: instructions.AllocateCons()
14: instructions.AllocateCons()
15: instructions.LoadConstant(0)
16: instructions.LoadConstant(-1)
17: instructions.LoadConstant(0)
18: instructions.AllocateCons()
19: instructions.AllocateCons()
20: instructions.LoadConstant(0)
21: instructions.LoadConstant(0)
22: instructions.LoadConstant(0)
23: instructions.AllocateCons()
24: instructions.AllocateCons()
25: instructions.LoadConstant(0)
26: instructions.AllocateCons()
27: instructions.AllocateCons()
28: instructions.AllocateCons()
29: instructions.AllocateCons()
30: instructions.AllocateCons()
31: instructions.StoreToEnv(0, 2)
32: instructions.LoadEnv(0, 2)
33: instructions.LoadEnv(0, 1)
34: ApplyFunction(2) GET_VALUE (locals = 0)
35: instructions.StoreToEnv(0, 3)
36: instructions.LoadEnv(0, 0)
37: instructions.ExtractFirst()
38: instructions.LoadEnv(0, 3)
39: instructions.ExtractFirst()
40: instructions.IntAddition()
41: instructions.LoadEnv(0, 0)
42: instructions.ExtractSecond()
43: instructions.LoadEnv(0, 3)
44: instructions.ExtractSecond()
45: instructions.IntAddition()
46: instructions.LoadConstant(0)
47: instructions.AllocateCons()
48: instructions.AllocateCons()
49: instructions.ReturnFromFunction()
Visited <_ast.FunctionDef object at 0x100a88610>
<__main__.ByteCode instance at 0x100a90830>
ByteCode output of size 0:
Visiting <_ast.ImportFrom object at 0x100a89390>
Visited <_ast.ImportFrom object at 0x100a89390>
<__main__.EmptyByteCode instance at 0x100a8f0e0>
ByteCode output of size 0:
Visiting <_ast.Import object at 0x100a89450>
Visited <_ast.Import object at 0x100a89450>
<__main__.EmptyByteCode instance at 0x100a90830>
ByteCode output of size 0:
Visiting <_ast.Import object at 0x100a893d0>
Visited <_ast.Import object at 0x100a893d0>
<__main__.EmptyByteCode instance at 0x100a8f0e0>
ByteCode output of size 0:
Visiting <_ast.FunctionDef object at 0x100a891d0>
Visiting <_ast.Assign object at 0x100a892d0>
Visiting <_ast.Tuple object at 0x100a89350>
Visiting <_ast.Tuple object at 0x100a894d0>
Visiting <_ast.Num object at 0x100a89510>
Visited <_ast.Num object at 0x100a89510>
<__main__.ByteCode instance at 0x100a90d88>
ByteCode output of size 1:
0: instructions.LoadConstant(-1)
Visiting <_ast.Num object at 0x100a89550>
Visited <_ast.Num object at 0x100a89550>
<__main__.ByteCode instance at 0x100a90ea8>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visited <_ast.Tuple object at 0x100a894d0>
<__main__.ByteCode instance at 0x100a90cf8>
ByteCode output of size 5:
0: instructions.LoadConstant(-1)
1: instructions.LoadConstant(0)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visiting <_ast.Tuple object at 0x100a89590>
Visiting <_ast.Num object at 0x100a895d0>
Visited <_ast.Num object at 0x100a895d0>
<__main__.ByteCode instance at 0x100a95128>
ByteCode output of size 1:
0: instructions.LoadConstant(0)
Visiting <_ast.Num object at 0x100a89610>
Visited <_ast.Num object at 0x100a89610>
<__main__.ByteCode instance at 0x100a95248>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Visited <_ast.Tuple object at 0x100a89590>
<__main__.ByteCode instance at 0x100a90ea8>
ByteCode output of size 5:
0: instructions.LoadConstant(0)
1: instructions.LoadConstant(1)
2: instructions.LoadConstant(0)
3: instructions.AllocateCons()
4: instructions.AllocateCons()
Visiting <_ast.Tuple object at 0x100a89650>
Visiting <_ast.Num object at 0x100a89690>
Visited <_ast.Num object at 0x100a89690>
<__main__.ByteCode instance at 0x100a95248>
ByteCode output of size 1:
0: instructions.LoadConstant(1)
Visiting <_ast.Num object at 0x100a896d0>