-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpts3o3h_mahjong.dl
3107 lines (3107 loc) · 166 KB
/
pts3o3h_mahjong.dl
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
.type NumConstant
.decl isNumConstant(?n:NumConstant)
.type Modifier
.decl isModifier(?m:Modifier)
.decl Modifier_abstract(?mod:Modifier)
.decl Modifier_final(?mod:Modifier)
.decl Modifier_public(?mod:Modifier)
.decl Modifier_private(?mod:Modifier)
.decl Modifier_static(?mod:Modifier)
.type Type
.type PrimitiveType = Type
.type ReferenceType = Type
.type NullType = ReferenceType
.type ArrayType = ReferenceType
.type ClassType = ReferenceType
.type InterfaceType = ReferenceType
.decl isType(?t:Type)
.decl isPrimitiveType(?t:PrimitiveType)
.decl isReferenceType(?t:ReferenceType)
.decl isNullType(?t:NullType)
.decl isArrayType(?t:ArrayType)
.decl isClassType(?t:ClassType)
.decl isInterfaceType(?t:InterfaceType)
.decl DirectSuperclass(?class:ClassType, ?superclass:ClassType)
.decl DirectSuperinterface(?ref:ReferenceType, ?interface:InterfaceType)
.decl ApplicationClass(?ref:ReferenceType)
.decl ConcreteClass(?ref:ReferenceType)
.decl MainClass(?class:ClassType)
.decl Type_boolean(?t:PrimitiveType)
.decl Type_byte(?t:PrimitiveType)
.decl Type_char(?t:PrimitiveType)
.decl Type_short(?t:PrimitiveType)
.decl Type_int(?t:PrimitiveType)
.decl Type_long(?t:PrimitiveType)
.decl Type_float(?t:PrimitiveType)
.decl Type_double(?t:PrimitiveType)
.decl Type_void(?t:PrimitiveType)
.decl Type_null(?t:PrimitiveType)
.decl Type_object(?t:PrimitiveType)
.decl ClassModifier(?mod:Modifier, ?class:ReferenceType)
.type Field
.decl isField(?field:Field)
.decl Field_DeclaringType(?field:Field, ?declaringClass:ReferenceType)
.decl Field_SimpleName(?field:Field, ?simpleName:symbol)
.decl Field_Type(?field:Field, ?type:Type)
.decl Field_Modifier(?mod:Modifier, ?field:Field)
.type MethodDescriptor
.decl isMethodDescriptor(?md:MethodDescriptor)
.type Method
.decl isMethod(?m:Method)
.decl Method_DeclaringType(?method:Method, ?declaringType:ReferenceType)
.decl Method_ReturnType(?method:Method, ?returnType:Type)
.decl Method_SimpleName(?method:Method, ?simpleName:symbol)
.decl Method_Descriptor(?method:Method, ?descriptor:MethodDescriptor)
.type JVMDescriptor
.decl isJVMDescriptor(?jvmd:JVMDescriptor)
.decl Method_JVMDescriptor(?method:Method, ?descriptor:JVMDescriptor)
.decl Method_Modifier(?mod:Modifier, ?method:Method)
.decl Method_DeclaresException(?exceptionType:ReferenceType, ?method:Method)
.decl FormalParam(?index:number, ?method:Method, ?var:Var)
.decl ThisVar(?method:Method, ?var:Var)
.type Var
.decl isVar(v:Var)
.decl Var_Type(?var:Var, ?type:Type)
.decl Var_DeclaringMethod(?var:Var, ?method:Method)
.decl ApplicationVar(?var:Var)
.type HeapAllocation
.type NormalHeap = HeapAllocation
.type StringConstant = HeapAllocation
.type ClassHeap = HeapAllocation
.type MethodHandleConstant = HeapAllocation
.decl isHeapAllocation(?h:HeapAllocation)
.decl isNormalHeap(?h:NormalHeap)
.decl isStringConstant(?h:StringConstant)
.decl isClassHeap(?h:ClassHeap)
.decl isMethodHandleConstant(?h:MethodHandleConstant)
.decl isStringRaw(?id:symbol)
.decl HeapAllocation_Type(?heap:HeapAllocation, ?type:Type)
.decl HeapAllocation_EmptyArray(?heap:HeapAllocation)
.decl HeapAllocation_Null(?null:HeapAllocation)
.decl MainMethodArgArray(?heap:HeapAllocation)
.decl MainMethodArgArrayContent(?heap:HeapAllocation)
.decl ClassHeap_InstanceType(?classHeap:ClassHeap, ?instanceType:Type)
.decl MethodHandleConstant_InstanceType(?classHeap:MethodHandleConstant, ?instanceType:Type)
.type Instruction
.decl isInstruction(?insn:Instruction)
.decl Instruction_Index(?insn:Instruction, ?index:number)
.decl Instruction_Method(?insn:Instruction, ?inMethod:Method)
.type Throw_Insn = Instruction
.type ThrowNull_Insn = Throw_Insn
.type Goto_Insn = Instruction
.type If_Insn = Instruction
.type Switch_Insn = Instruction
.type TableSwitch_Insn = Switch_Insn
.type LookupSwitch_Insn = Switch_Insn
.type MonitorInstruction = Instruction
.type EnterMonitor_Insn = MonitorInstruction
.type ExitMonitor_Insn = MonitorInstruction
.type FieldInstruction = Instruction
.type LoadInstanceField_Insn = FieldInstruction
.type StoreInstanceField_Insn = FieldInstruction
.type LoadStaticField_Insn = FieldInstruction
.type StoreStaticField_Insn = FieldInstruction
.type ArrayInstruction = Instruction
.type LoadArrayIndex_Insn = ArrayInstruction
.type StoreArrayIndex_Insn = ArrayInstruction
.decl isThrow_Insn(?insn:Throw_Insn)
.decl isThrowNull_Insn(?insn:ThrowNull_Insn)
.decl isGoto_Insn(?insn:Goto_Insn)
.decl isIf_Insn(?insn:If_Insn)
.decl isSwitch_Insn(?insn:Switch_Insn)
.decl isTableSwitch_Insn(?insn:TableSwitch_Insn)
.decl isLookupSwitch_Insn(?insn:LookupSwitch_Insn)
.decl isMonitorInstruction(?insn:MonitorInstruction)
.decl isEnterMonitor_Insn(?insn:EnterMonitor_Insn)
.decl isExitMonitor_Insn(?insn:ExitMonitor_Insn)
.decl isFieldInstruction(?insn:FieldInstruction)
.decl isLoadInstanceField_Insn(?insn:LoadInstanceField_Insn)
.decl isStoreInstanceField_Insn(?insn:StoreInstanceField_Insn)
.decl isLoadStaticField_Insn(?insn:LoadStaticField_Insn)
.decl isStoreStaticField_Insn(?insn:StoreStaticField_Insn)
.decl isArrayInstruction(?insn:ArrayInstruction)
.decl isLoadArrayIndex_Insn(?insn:LoadArrayIndex_Insn)
.decl isStoreArrayIndex_Insn(?insn:StoreArrayIndex_Insn)
.type AssignInstruction = Instruction
.type AssignOper_Insn = AssignInstruction
.type AssignBinop_Insn = AssignOper_Insn
.type AssignUnop_Insn = AssignOper_Insn
.type AssignLocal_Insn = AssignOper_Insn
.type AssignInstanceOf_Insn = AssignInstruction
.type AssignNull_Insn = AssignInstruction
.type AssignNumConstant_Insn = AssignInstruction
.type AssignCast_Insn = AssignInstruction
.type AssignCastNull_Insn = AssignCast_Insn
.type AssignCastNumConstant_Insn = AssignCast_Insn
.type AssignHeapAllocation_Insn = AssignInstruction
.type ReturnInstruction = Instruction
.type ReturnVoid_Insn = ReturnInstruction
.type ReturnNonvoid_Insn = ReturnInstruction
.decl isAssignInstruction(?insn:AssignInstruction)
.decl isAssignOper_Insn(?insn:AssignOper_Insn)
.decl isAssignBinop_Insn(?insn:AssignBinop_Insn)
.decl isAssignUnop_Insn(?insn:AssignUnop_Insn)
.decl isAssignLocal_Insn(?insn:AssignLocal_Insn)
.decl isAssignInstanceOf_Insn(?insn:AssignInstanceOf_Insn)
.decl isAssignNull_Insn(?insn:AssignNull_Insn)
.decl isAssignNumConstant_Insn(?insn:AssignNumConstant_Insn)
.decl isAssignCast_Insn(?insn:AssignCast_Insn)
.decl isAssignCastNull_Insn(?insn:AssignCastNull_Insn)
.decl isAssignCastNumConstant_Insn(?insn:AssignCastNumConstant_Insn)
.decl isAssignHeapAllocation_Insn(?insn:AssignHeapAllocation_Insn)
.decl isReturnInstruction(?insn:ReturnInstruction)
.decl isReturnVoid_Insn(?insn:ReturnVoid_Insn)
.decl isReturnNonvoid_Insn(?insn:ReturnNonvoid_Insn)
.type MethodInvocation = Instruction
.type VirtualMethodInvocation_Insn = MethodInvocation
.type SpecialMethodInvocation_Insn = MethodInvocation
.type StaticMethodInvocation_Insn = MethodInvocation
.type DynamicMethodInvocation_Insn = MethodInvocation
.decl isMethodInvocation(?insn:MethodInvocation)
.decl isVirtualMethodInvocation_Insn(?insn:VirtualMethodInvocation_Insn)
.decl isSpecialMethodInvocation_Insn(?insn:SpecialMethodInvocation_Insn)
.decl isStaticMethodInvocation_Insn(?insn:StaticMethodInvocation_Insn)
.decl isDynamicMethodInvocation_Insn(?insn:DynamicMethodInvocation_Insn)
.type UnsupportedInstruction = Instruction
.type AssignPhantomInvoke = UnsupportedInstruction
.type PhantomInvoke = UnsupportedInstruction
.type BreakpointStmt = UnsupportedInstruction
.decl isUnsupportedInstruction(?insn:UnsupportedInstruction)
.decl isAssignPhantomInvoke(?insn:AssignPhantomInvoke)
.decl isPhantomInvoke(?insn:PhantomInvoke)
.decl isBreakpointStmt(?insn:BreakpointStmt)
.decl If_Var(?insn:If_Insn, ?var:Var)
.decl Throw_Var(?insn:Throw_Insn, ?var:Var)
.decl Goto_Target(?insn:Goto_Insn, ?index:number)
.decl If_Target(?insn:If_Insn, ?index:number)
.decl Switch_Key(?insn:Switch_Insn, ?key:Var)
.decl Switch_Target(?insn:Switch_Insn, ?value:number, ?index:number)
.decl Switch_DefaultTarget(?insn:Switch_Insn, ?index:number)
.decl EnterMonitor_Var(?insn:EnterMonitor_Insn, ?var:Var)
.decl ExitMonitor_Var(?insn:ExitMonitor_Insn, ?var:Var)
.decl FieldInstruction_Signature(?insn:FieldInstruction, ?sign:Field)
.decl LoadInstanceField_Base(?insn:LoadInstanceField_Insn, ?var:Var)
.decl LoadInstanceField_To(?insn:LoadInstanceField_Insn, ?var:Var)
.decl StoreInstanceField_From(?insn:StoreInstanceField_Insn, ?var:Var)
.decl StoreInstanceField_Base(?insn:StoreInstanceField_Insn, ?var:Var)
.decl LoadStaticField_To(?insn:LoadStaticField_Insn, ?var:Var)
.decl StoreStaticField_From(?insn:StoreStaticField_Insn, ?var:Var)
.decl ArrayInsnIndex(?insn:Instruction, ?index:Var)
.decl ComponentType(?arrayType:ArrayType, ?componentType:Type)
.decl LoadArrayIndex_Base(?insn:LoadArrayIndex_Insn, ?var:Var)
.decl LoadArrayIndex_To(?insn:LoadArrayIndex_Insn, var:Var)
.decl StoreArrayIndex_From(?insn:StoreArrayIndex_Insn, ?var:Var)
.decl StoreArrayIndex_Base(?insn:StoreArrayIndex_Insn, ?var:Var)
.decl AssignInstruction_To(?insn:AssignInstruction, ?to:Var)
.decl AssignNumConstant_Id(?insn:AssignNumConstant_Insn, ?const:NumConstant)
.decl AssignCast_From(?insn:AssignCast_Insn, ?from:Var)
.decl AssignCast_Type(?insn:AssignCast_Insn, ?type:Type)
.decl AssignCastNumConstant_Id(?insn:AssignCastNumConstant_Insn, ?const:NumConstant)
.decl AssignLocal_From(?insn:AssignLocal_Insn, ?from:Var)
.decl AssignInstanceOf_From(?insn:AssignInstanceOf_Insn, ?from:Var)
.decl AssignInstanceOf_Type(?insn:AssignInstanceOf_Insn, ?type:Type)
.decl AssignOper_From(?insn:AssignOper_Insn, ?from:Var)
.decl AssignOper_Type(?insn:AssignOper_Insn, ?type:symbol)
.decl AssignHeapAllocation_Heap(?insn:AssignHeapAllocation_Insn, ?heap:HeapAllocation)
.decl ReturnNonvoid_Var(?return:ReturnNonvoid_Insn, ?var:Var)
.decl MethodInvocation_Line(?invocation:MethodInvocation, ?line:number)
.decl MethodInvocation_Method(?invocation:MethodInvocation, ?signature:Method)
.decl ApplicationMethod(?method:Method)
.output ApplicationMethod(IO="file",filename="ApplicationMethod.csv",delimiter="\t")
.decl AssignReturnValue(?invocation:MethodInvocation, ?to:Var)
.decl ActualParam(?index:number, ?invocation:MethodInvocation, ?var:Var)
.decl VirtualMethodInvocation_Base(?invocation:VirtualMethodInvocation_Insn, ?base:Var)
.decl VirtualMethodInvocation_SimpleName(?invocation:MethodInvocation, ?simplename:symbol)
.decl VirtualMethodInvocation_Descriptor(?invocation:MethodInvocation, ?descriptor:MethodDescriptor)
.decl DynamicMethodInvocation_Bootstrap(?invocation:DynamicMethodInvocation_Insn, ?bootSignature:Method)
.decl DynamicMethodInvocation_DynMethod(?invocation:DynamicMethodInvocation_Insn, ?dynName:symbol)
.decl BootstrapParam(?index:number, ?invocation:DynamicMethodInvocation_Insn, ?var:Var)
.decl StaticMethodInvocation_SimpleName(?invocation:MethodInvocation, ?simplename:symbol)
.decl StaticMethodInvocation_Descriptor(?invocation:MethodInvocation, ?descriptor:MethodDescriptor)
.decl SpecialMethodInvocation_Base(?invocation:SpecialMethodInvocation_Insn, ?base:Var)
.decl SpecialMethodInvocation_SimpleName(?invocation:MethodInvocation, ?simplename:symbol)
.decl SpecialMethodInvocation_Descriptor(?invocation:MethodInvocation, ?descriptor:MethodDescriptor)
.type ExceptionHandler
.decl isExceptionHandler(?handler:ExceptionHandler)
.decl ExceptionHandler_Method(?handler:ExceptionHandler, ?inmethod:Method)
.decl ExceptionHandler_Index(?handler:ExceptionHandler, ?index:number)
.decl ExceptionHandler_Type(?handler:ExceptionHandler, ?type:Type)
.decl ExceptionHandler_FormalParam(?handler:ExceptionHandler, ?var:Var)
.decl ExceptionHandler_Begin(?handler:ExceptionHandler, ?index:number)
.decl ExceptionHandler_End(?handler:ExceptionHandler, ?index:number)
.decl ExceptionHandler_Previous(?handler:ExceptionHandler, ?previous:ExceptionHandler)
.decl Properties(?path:StringConstant, ?key:StringConstant, ?value:StringConstant)
.decl NativeReturnVar(?var:Var, ?method:Method)
.decl Config_DynamicClass(?class:ReferenceType, ?invocation:MethodInvocation)
.decl Stats_Metrics(order:symbol, msg:symbol, c:number)
.decl Activity(?x:Type)
.decl Service(?x:Type)
.decl ContentProvider(?x:Type)
.decl BroadcastReceiver(?x:Type)
.decl CallbackMethod(?x:Method)
.decl LayoutControl(?id:NumConstant, ?type:Type, ?parent:symbol)
.decl LayoutControl0(?id:NumConstant, ?typename:symbol, ?parent:symbol)
.decl FieldInitialValue(?fld:Field, ?valueString:symbol)
.decl AndroidEntryPoint(?m:Method)
.decl Throw(?insn:Throw_Insn, ?var:Var)
.decl LoadInstanceField(?base:Var, ?sig:Field, ?to:Var, ?inmethod:Method)
.decl StoreInstanceField(?from:Var, ?base:Var, ?signature:Field, ?inmethod:Method)
.decl LoadStaticField(?sig:Field, ?to:Var, ?inmethod:Method)
.decl StoreStaticField(?from:Var, ?signature:Field, ?inmethod:Method)
.decl LoadArrayIndex(?base:Var, ?to:Var, ?inmethod:Method)
.decl StoreArrayIndex(?from:Var, ?base:Var, ?inmethod:Method)
.decl AssignCast(?type:Type, ?from:Var, ?to:Var, ?inmethod:Method)
.decl AssignLocal(?from:Var, ?to:Var, ?inmethod:Method)
.decl AssignNull(?to:Var, ?inmethod:Method)
.decl AssignHeapAllocation(?heap:HeapAllocation, ?to:Var, ?inmethod:Method)
.decl ReturnVar(?var:Var, ?method:Method)
.decl VirtualMethodInvocation(?invocation:MethodInvocation, ?signature:Method, ?inmethod:Method)
.decl StaticMethodInvocation(?invocation:MethodInvocation, ?signature:Method, ?inmethod:Method)
.decl _ClassType(?class:symbol)
.input _ClassType(IO="file", filename="ClassType.facts", delimiter="\t")
isType(?class),
isReferenceType(?class),
isClassType(?class) :-
_ClassType(?class).
.decl _ArrayType(?arrayType:symbol)
.input _ArrayType(IO="file", filename="ArrayType.facts", delimiter="\t")
isType(?arrayType),
isReferenceType(?arrayType),
isArrayType(?arrayType) :-
_ArrayType(?arrayType).
.decl _InterfaceType(?interface:symbol)
.input _InterfaceType(IO="file", filename="InterfaceType.facts", delimiter="\t")
isType(?interface),
isReferenceType(?interface),
isInterfaceType(?interface) :-
_InterfaceType(?interface).
.decl _ComponentType(?arrayType:symbol, ?componentType:symbol)
.input _ComponentType(IO="file", filename="ComponentType.facts", delimiter="\t")
isType(?arrayType),
isReferenceType(?arrayType),
isArrayType(?arrayType),
isType(?componentType),
ComponentType(?arrayType, ?componentType) :-
_ComponentType(?arrayType, ?componentType).
.decl _ActualParam(?index:number, ?invocation:symbol, ?var:symbol)
.input _ActualParam(IO="file", filename="ActualParam.facts", delimiter="\t")
isInstruction(?invocation),
isMethodInvocation(?invocation),
isVar(?var),
ActualParam(?index, ?invocation, ?var) :-
_ActualParam(?index, ?invocation, ?var).
.decl _BootstrapParam(?index:number, ?invocation:symbol, ?var:symbol)
.input _BootstrapParam(IO="file", filename="BootstrapParam.facts", delimiter="\t")
isInstruction(?invocation),
isMethodInvocation(?invocation),
isDynamicMethodInvocation_Insn(?invocation),
isVar(?var),
BootstrapParam(?index, ?invocation, ?var) :-
_BootstrapParam(?index, ?invocation, ?var).
.decl _DirectSuperinterface(?class:symbol, ?interface:symbol)
.input _DirectSuperinterface(IO="file", filename="DirectSuperinterface.facts", delimiter="\t")
isType(?class),
isReferenceType(?class),
isType(?interface),
isReferenceType(?interface),
isInterfaceType(?interface),
DirectSuperinterface(?class, ?interface) :-
_DirectSuperinterface(?class, ?interface).
.decl _DirectSuperclass(?class:symbol, ?superclass:symbol)
.input _DirectSuperclass(IO="file", filename="DirectSuperclass.facts", delimiter="\t")
isType(?class),
isReferenceType(?class),
isClassType(?class),
isType(?superclass),
isReferenceType(?superclass),
isClassType(?superclass),
DirectSuperclass(?class, ?superclass) :-
_DirectSuperclass(?class, ?superclass).
.decl _Field_Modifier(?modifier:symbol, ?field:symbol)
.input _Field_Modifier(IO="file", filename="Field-Modifier.facts", delimiter="\t")
isModifier(?modifier),
isField(?field),
Field_Modifier(?modifier, ?field) :-
_Field_Modifier(?modifier, ?field).
.decl _ClassModifier(?class:symbol, ?modifier:symbol)
.input _ClassModifier(IO="file", filename="ClassModifier.facts", delimiter="\t")
ClassModifier(?class, ?modifier) :-
_ClassModifier(?class, ?modifier).
.decl _FormalParam(?index:number, ?method:symbol, ?var:symbol)
.input _FormalParam(IO="file", filename="FormalParam.facts", delimiter="\t")
isMethod(?method),
isVar(?var),
FormalParam(?index, ?method, ?var) :-
_FormalParam(?index, ?method, ?var).
.decl _Method_DeclaresException(?exceptionType:symbol, ?method:symbol)
.input _Method_DeclaresException(IO="file", filename="Method-DeclaresException.facts", delimiter="\t")
isType(?exceptionType),
isReferenceType(?exceptionType),
isMethod(?method),
Method_DeclaresException(?exceptionType, ?method) :-
_Method_DeclaresException(?exceptionType, ?method).
.decl _Method_Modifier(?mod:symbol, ?method:symbol)
.input _Method_Modifier(IO="file", filename="Method-Modifier.facts", delimiter="\t")
isModifier(?mod),
isMethod(?method),
Method_Modifier(?mod, ?method) :-
_Method_Modifier(?mod, ?method).
.decl _NativeReturnVar(?var:symbol, ?method:symbol)
.input _NativeReturnVar(IO="file", filename="NativeReturnVar.facts", delimiter="\t")
isVar(?var),
isMethod(?method),
NativeReturnVar(?var, ?method) :-
_NativeReturnVar(?var, ?method).
.decl _Var_Type(?var:symbol, ?type:symbol)
.input _Var_Type(IO="file", filename="Var-Type.facts", delimiter="\t")
isVar(?var),
isType(?type),
Var_Type(?var, ?type) :-
_Var_Type(?var, ?type).
.decl _Var_DeclaringMethod(?var:symbol, ?method:symbol)
.input _Var_DeclaringMethod(IO="file", filename="Var-DeclaringMethod.facts", delimiter="\t")
isVar(?var),
isMethod(?method),
Var_DeclaringMethod(?var, ?method) :-
_Var_DeclaringMethod(?var, ?method).
.decl _ApplicationClass(?type:symbol)
.input _ApplicationClass(IO="file", filename="ApplicationClass.facts", delimiter="\t")
isType(?type),
isReferenceType(?type),
ApplicationClass(?type) :-
_ApplicationClass(?type).
.decl _ThisVar(?method:symbol, ?var:symbol)
.input _ThisVar(IO="file", filename="ThisVar.facts", delimiter="\t")
isMethod(?method),
isVar(?var),
ThisVar(?method, ?var) :-
_ThisVar(?method, ?var).
.decl _ExceptionHandler_Previous(?handler:symbol, ?previous:symbol)
.input _ExceptionHandler_Previous(IO="file", filename="ExceptionHandler-Previous.facts", delimiter="\t")
isExceptionHandler(?handler),
isExceptionHandler(?previous),
ExceptionHandler_Previous(?handler, ?previous) :-
_ExceptionHandler_Previous(?handler, ?previous).
.decl _AssignReturnValue(?invocation:symbol, ?to:symbol)
.input _AssignReturnValue(IO="file", filename="AssignReturnValue.facts", delimiter="\t")
isInstruction(?invocation),
isMethodInvocation(?invocation),
isVar(?to),
AssignReturnValue(?invocation, ?to) :-
_AssignReturnValue(?invocation, ?to).
.decl _NormalHeap(?id:symbol, ?type:symbol)
.input _NormalHeap(IO="file", filename="NormalHeap.facts", delimiter="\t")
isType(?type),
isHeapAllocation(?id),
isNormalHeap(?id),
HeapAllocation_Type(?id, ?type) :-
_NormalHeap(?id, ?type).
isClassType("java.lang.String").
.decl _StringConstant(?id:symbol)
.input _StringConstant(IO="file", filename="StringConstant.facts", delimiter="\t")
isHeapAllocation(?id),
isStringConstant(?id),
HeapAllocation_Type(?id, "java.lang.String") :-
_StringConstant(?id).
.decl _StringRaw(?id:symbol, ?rawId:symbol)
.input _StringRaw(IO="file", filename="StringRaw.facts", delimiter="\t")
.decl String_toRaw(?id:symbol, ?rawId:symbol)
isStringRaw(?id),
String_toRaw(?id, ?rawId) :-
_StringRaw(?id, ?rawId).
.decl _ClassHeap(?id:symbol, ?instanceType:symbol)
.input _ClassHeap(IO="file", filename="ClassHeap.facts", delimiter="\t")
isType(?instanceType),
isHeapAllocation(?id),
isClassHeap(?id),
ClassHeap_InstanceType(?id, ?instanceType),
HeapAllocation_Type(?id, "java.lang.Class") :-
_ClassHeap(?id, ?instanceType).
.decl _MethodHandleConstant(?id:symbol)
.input _MethodHandleConstant(IO="file", filename="MethodHandleConstant.facts", delimiter="\t")
isType("java.lang.invoke.MethodHandle").
isReferenceType("java.lang.invoke.MethodHandle").
isClassType("java.lang.invoke.MethodHandle").
isHeapAllocation(?id),
isMethodHandleConstant(?id),
HeapAllocation_Type(?id, "java.lang.invoke.MethodHandle") :-
_MethodHandleConstant(?id).
.decl _EmptyArray(?id:symbol)
.input _EmptyArray(IO="file", filename="EmptyArray.facts", delimiter="\t")
HeapAllocation_EmptyArray(?id) :-
_EmptyArray(?id).
.decl _AssignHeapAllocation(?instruction:symbol, ?index:number, ?heap:symbol, ?to:symbol, ?inmethod:symbol)
.input _AssignHeapAllocation(IO="file", filename="AssignHeapAllocation.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignHeapAllocation_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignInstruction_To(?instruction, ?to),
AssignHeapAllocation_Heap(?instruction, ?heap) :-
_AssignHeapAllocation(?instruction, ?index, ?heap, ?to, ?method).
.decl _AndroidEntryPoint(?method:symbol)
.input _AndroidEntryPoint(IO="file", filename="AndroidEntryPoint.facts", delimiter="\t")
AndroidEntryPoint(?method) :-
_AndroidEntryPoint(?method).
.decl _AssignLocal(?instruction:symbol, ?index:number, ?from:symbol, ?to:symbol, ?inmethod:symbol)
.input _AssignLocal(IO="file", filename="AssignLocal.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignOper_Insn(?instruction),
isAssignLocal_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignLocal_From(?instruction, ?from),
AssignInstruction_To(?instruction, ?to) :-
_AssignLocal(?instruction, ?index, ?from, ?to, ?method).
.decl _AssignBinop(?instruction:symbol, ?index:number, ?to:symbol, ?inmethod:symbol)
.input _AssignBinop(IO="file", filename="AssignBinop.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignOper_Insn(?instruction),
isAssignBinop_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignInstruction_To(?instruction, ?to) :-
_AssignBinop(?instruction, ?index, ?to, ?method).
.decl _AssignUnop(?instruction:symbol, ?index:number, ?to:symbol, ?inmethod:symbol)
.input _AssignUnop(IO="file", filename="AssignUnop.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignOper_Insn(?instruction),
isAssignUnop_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignInstruction_To(?instruction, ?to) :-
_AssignUnop(?instruction, ?index, ?to, ?method).
.decl _AssignOperFrom(?instruction:symbol, ?from:symbol)
.input _AssignOperFrom(IO="file", filename="AssignOperFrom.facts", delimiter="\t")
AssignOper_From(?instruction, ?from) :-
_AssignOperFrom(?instruction, ?from).
.decl _AssignOperType(?instruction:symbol, ?type:symbol)
.input _AssignOperType(IO="file", filename="AssignOperType.facts", delimiter="\t")
AssignOper_Type(?instruction, ?type) :-
_AssignOperType(?instruction, ?type).
.decl _IfVar(?instruction:symbol, ?var:symbol)
.input _IfVar(IO="file", filename="IfVar.facts", delimiter="\t")
If_Var(?instruction, ?var) :-
_IfVar(?instruction, ?var).
.decl _AssignCast(?instruction:symbol, ?index:number, ?from:symbol, ?to:symbol, ?type:symbol, ?inmethod:symbol)
.input _AssignCast(IO="file", filename="AssignCast.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignCast_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignCast_Type(?instruction, ?type),
AssignCast_From(?instruction, ?from),
AssignInstruction_To(?instruction, ?to) :-
_AssignCast(?instruction, ?index, ?from, ?to, ?type, ?method).
.decl _AssignCastNumConstant(?instruction:symbol, ?index:number, ?const:symbol, ?to:symbol, ?type:symbol, ?inmethod:symbol)
.input _AssignCastNumConstant(IO="file", filename="AssignCastNumConstant.facts", delimiter="\t")
isNumConstant(?const),
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignCast_Insn(?instruction),
isAssignCastNumConstant_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignCast_Type(?instruction, ?type),
AssignCastNumConstant_Id(?instruction, ?const),
AssignInstruction_To(?instruction, ?to) :-
_AssignCastNumConstant(?instruction, ?index, ?const, ?to, ?type, ?method).
.decl _AssignCastNull(?instruction:symbol, ?index:number, ?to:symbol, ?type:symbol, ?method:symbol)
.input _AssignCastNull(IO="file", filename="AssignCastNull.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignCast_Insn(?instruction),
isAssignCastNull_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignCast_Type(?instruction, ?type),
AssignInstruction_To(?instruction, ?to) :-
_AssignCastNull(?instruction, ?index, ?to, ?type, ?method).
.decl _AssignNumConstant(?instruction:symbol, ?index:number, ?const:symbol, ?to:symbol, ?inmethod:symbol)
.input _AssignNumConstant(IO="file", filename="AssignNumConstant.facts", delimiter="\t")
isNumConstant(?const),
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignNumConstant_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignNumConstant_Id(?instruction, ?const),
AssignInstruction_To(?instruction, ?to) :-
_AssignNumConstant(?instruction, ?index, ?const, ?to, ?method).
.decl _AssignNull(?instruction:symbol, ?index:number, ?to:symbol, ?method:symbol)
.input _AssignNull(IO="file", filename="AssignNull.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignNull_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignInstruction_To(?instruction, ?to) :-
_AssignNull(?instruction, ?index, ?to, ?method).
.decl _AssignInstanceOf(?instruction:symbol, ?index:number, ?from:symbol, ?to:symbol, ?type:symbol, ?inmethod:symbol)
.input _AssignInstanceOf(IO="file", filename="AssignInstanceOf.facts", delimiter="\t")
isInstruction(?instruction),
isAssignInstruction(?instruction),
isAssignInstanceOf_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
AssignInstanceOf_From(?instruction, ?from),
AssignInstanceOf_Type(?instruction, ?type),
AssignInstruction_To(?instruction, ?to) :-
_AssignInstanceOf(?instruction, ?index, ?from, ?to, ?type, ?method).
.decl _Field(?signature:symbol, ?declaringClass:symbol, ?simplename:symbol, ?type:symbol)
.input _Field(IO="file", filename="Field.facts", delimiter="\t")
isField(?signature),
Field_DeclaringType(?signature, ?declaringType),
Field_SimpleName(?signature, ?simplename),
Field_Type(?signature, ?type) :-
_Field(?signature, ?declaringType, ?simplename, ?type).
.decl _EnterMonitor(?instruction:symbol, ?index:number, ?var:symbol, ?method:symbol)
.input _EnterMonitor(IO="file", filename="EnterMonitor.facts", delimiter="\t")
isInstruction(?instruction),
isMonitorInstruction(?instruction),
isEnterMonitor_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
EnterMonitor_Var(?instruction, ?var) :-
_EnterMonitor(?instruction, ?index, ?var, ?method).
.decl _ExitMonitor(?instruction:symbol, ?index:number, ?var:symbol, ?method:symbol)
.input _ExitMonitor(IO="file", filename="ExitMonitor.facts", delimiter="\t")
isInstruction(?instruction),
isMonitorInstruction(?instruction),
isExitMonitor_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
ExitMonitor_Var(?instruction, ?var) :-
_ExitMonitor(?instruction, ?index, ?var, ?method).
.decl _MethodInvocation_Line(?instruction:symbol, line:number)
.input _MethodInvocation_Line(IO="file", filename="MethodInvocation-Line.facts", delimiter="\t")
isMethodInvocation(?instruction),
MethodInvocation_Line(?instruction, ?line) :-
_MethodInvocation_Line(?instruction, ?line).
.decl _StaticMethodInvocation(?instruction:symbol, ?index:number, ?signature:symbol, ?method:symbol)
.input _StaticMethodInvocation(IO="file", filename="StaticMethodInvocation.facts", delimiter="\t")
isMethod(?signature),
isInstruction(?instruction),
isMethodInvocation(?instruction),
isStaticMethodInvocation_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
MethodInvocation_Method(?instruction, ?signature) :-
_StaticMethodInvocation(?instruction, ?index, ?signature, ?method).
.decl _SpecialMethodInvocation(?instruction:symbol, ?index:number, ?signature:symbol, ?base:symbol, ?method:symbol)
.input _SpecialMethodInvocation(IO="file", filename="SpecialMethodInvocation.facts", delimiter="\t")
isMethod(?signature),
isInstruction(?instruction),
isMethodInvocation(?instruction),
isSpecialMethodInvocation_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
SpecialMethodInvocation_Base(?instruction, ?base),
MethodInvocation_Method(?instruction, ?signature) :-
_SpecialMethodInvocation(?instruction, ?index, ?signature, ?base, ?method).
.decl _VirtualMethodInvocation(?instruction:symbol, ?index:number, ?signature:symbol, ?base:symbol, ?method:symbol)
.input _VirtualMethodInvocation(IO="file", filename="VirtualMethodInvocation.facts", delimiter="\t")
isMethod(?signature),
isInstruction(?instruction),
isMethodInvocation(?instruction),
isVirtualMethodInvocation_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
VirtualMethodInvocation_Base(?instruction, ?base),
MethodInvocation_Method(?instruction, ?signature) :-
_VirtualMethodInvocation(?instruction, ?index, ?signature, ?base, ?method).
.decl _DynamicMethodInvocation(?instruction:symbol, ?index:number, ?bootSignature:symbol, ?dynName:symbol, ?method:symbol)
.input _DynamicMethodInvocation(IO="file", filename="DynamicMethodInvocation.facts", delimiter="\t")
isInstruction(?instruction),
isMethodInvocation(?instruction),
isDynamicMethodInvocation_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
DynamicMethodInvocation_Bootstrap(?instruction, ?bootSignature),
DynamicMethodInvocation_DynMethod(?instruction, ?dynName) :-
_DynamicMethodInvocation(?instruction, ?index, ?bootSignature, ?dynName, ?method).
.decl _Throw(?instruction:symbol, ?index:number, ?var:symbol, ?method:symbol)
.input _Throw(IO="file", filename="Throw.facts", delimiter="\t")
isInstruction(?instruction),
isThrow_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
Throw(?instruction, ?var),
Throw_Var(?instruction, ?var) :-
_Throw(?instruction, ?index, ?var, ?method).
.decl _ThrowNull(?instruction:symbol, ?index:number, ?method:symbol)
.input _ThrowNull(IO="file", filename="ThrowNull.facts", delimiter="\t")
isInstruction(?instruction),
isThrow_Insn(?instruction),
isThrowNull_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method) :-
_ThrowNull(?instruction, ?index, ?method).
.decl _ExceptionHandler(?handler:symbol, ?method:symbol, ?index:number, ?type:symbol, ?var:symbol, ?begin:number, ?end:number)
.input _ExceptionHandler(IO="file", filename="ExceptionHandler.facts", delimiter="\t")
isExceptionHandler(?handler),
ExceptionHandler_Method(?handler, ?method),
ExceptionHandler_Index(?handler, ?index),
ExceptionHandler_Type(?handler, ?type),
ExceptionHandler_FormalParam(?handler, ?var),
ExceptionHandler_Begin(?handler, ?begin),
ExceptionHandler_End(?handler, ?end) :-
_ExceptionHandler(?handler, ?method, ?index, ?type, ?var, ?begin, ?end).
.decl _Method(?method:symbol, ?simplename:symbol, ?descriptor:symbol, ?declaringType:symbol, ?returnType:symbol, ?jvmDescriptor:symbol)
.input _Method(IO="file", filename="Method.facts", delimiter="\t")
isMethod(?method),
isMethodDescriptor(?descriptor),
isJVMDescriptor(?jvmDescriptor),
Method_SimpleName(?method, ?simplename),
Method_Descriptor(?method, ?descriptor),
Method_DeclaringType(?method, ?declaringType),
Method_JVMDescriptor(?method, ?jvmDescriptor),
Method_ReturnType(?method, ?returnType) :-
_Method(?method, ?simplename, ?descriptor, ?declaringType, ?returnType, ?jvmDescriptor).
.decl _StoreInstanceField(?instruction:symbol, ?index:number, ?from:symbol, ?base:symbol, ?signature:symbol, ?method:symbol)
.input _StoreInstanceField(IO="file", filename="StoreInstanceField.facts", delimiter="\t")
isInstruction(?instruction),
isFieldInstruction(?instruction),
isStoreInstanceField_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
FieldInstruction_Signature(?instruction, ?signature),
StoreInstanceField_Base(?instruction, ?base),
StoreInstanceField_From(?instruction, ?from) :-
_StoreInstanceField(?instruction, ?index, ?from, ?base, ?signature, ?method).
.decl _LoadInstanceField(?instruction:symbol, ?index:number, ?to:symbol, ?base:symbol, ?signature:symbol, ?method:symbol)
.input _LoadInstanceField(IO="file", filename="LoadInstanceField.facts", delimiter="\t")
isInstruction(?instruction),
isFieldInstruction(?instruction),
isLoadInstanceField_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
FieldInstruction_Signature(?instruction, ?signature),
LoadInstanceField_Base(?instruction, ?base),
LoadInstanceField_To(?instruction, ?to) :-
_LoadInstanceField(?instruction, ?index, ?to, ?base, ?signature, ?method).
.decl _StoreStaticField(?instruction:symbol, ?index:number, ?from:symbol, ?signature:symbol, ?method:symbol)
.input _StoreStaticField(IO="file", filename="StoreStaticField.facts", delimiter="\t")
isInstruction(?instruction),
isFieldInstruction(?instruction),
isStoreStaticField_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
FieldInstruction_Signature(?instruction, ?signature),
StoreStaticField_From(?instruction, ?from) :-
_StoreStaticField(?instruction, ?index, ?from, ?signature, ?method).
.decl _LoadStaticField(?instruction:symbol, ?index:number, ?to:symbol, ?signature:symbol, ?method:symbol)
.input _LoadStaticField(IO="file", filename="LoadStaticField.facts", delimiter="\t")
isInstruction(?instruction),
isFieldInstruction(?instruction),
isLoadStaticField_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
FieldInstruction_Signature(?instruction, ?signature),
LoadStaticField_To(?instruction, ?to) :-
_LoadStaticField(?instruction, ?index, ?to, ?signature, ?method).
.decl _StoreArrayIndex(?instruction:symbol, ?index:number, ?from:symbol, ?base:symbol, ?method:symbol)
.input _StoreArrayIndex(IO="file", filename="StoreArrayIndex.facts", delimiter="\t")
isInstruction(?instruction),
isArrayInstruction(?instruction),
isStoreArrayIndex_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
StoreArrayIndex_Base(?instruction, ?base),
StoreArrayIndex_From(?instruction, ?from) :-
_StoreArrayIndex(?instruction, ?index, ?from, ?base, ?method).
.decl _LoadArrayIndex(?instruction:symbol, ?index:number, ?to:symbol, ?base:symbol, ?method:symbol)
.input _LoadArrayIndex(IO="file", filename="LoadArrayIndex.facts", delimiter="\t")
isInstruction(?instruction),
isArrayInstruction(?instruction),
isLoadArrayIndex_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
LoadArrayIndex_Base(?instruction, ?base),
LoadArrayIndex_To(?instruction, ?to) :-
_LoadArrayIndex(?instruction, ?index, ?to, ?base, ?method).
.decl _ArrayInsnIndex(?instruction:symbol, ?index:symbol)
.input _ArrayInsnIndex(IO="file", filename="ArrayInsnIndex.facts", delimiter="\t")
ArrayInsnIndex(?instruction, ?index) :-
_ArrayInsnIndex(?instruction, ?index).
.decl _Goto(?instruction:symbol, ?index:number, ?to:number, ?method:symbol)
.input _Goto(IO="file", filename="Goto.facts", delimiter="\t")
isInstruction(?instruction),
isGoto_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
Goto_Target(?instruction, ?to) :-
_Goto(?instruction, ?index, ?to, ?method).
.decl _If(?instruction:symbol, ?index:number, ?to:number, ?method:symbol)
.input _If(IO="file", filename="If.facts", delimiter="\t")
isInstruction(?instruction),
isIf_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
If_Target(?instruction, ?to) :-
_If(?instruction, ?index, ?to, ?method).
.decl _TableSwitch(?instruction:symbol, ?index:number, ?key:symbol, ?method:symbol)
.input _TableSwitch(IO="file", filename="TableSwitch.facts", delimiter="\t")
isInstruction(?instruction),
isSwitch_Insn(?instruction),
isTableSwitch_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
Switch_Key(?instruction, ?key) :-
_TableSwitch(?instruction, ?index, ?key, ?method).
.decl _LookupSwitch(?instruction:symbol, ?index:number, ?key:symbol, ?method:symbol)
.input _LookupSwitch(IO="file", filename="LookupSwitch.facts", delimiter="\t")
isInstruction(?instruction),
isSwitch_Insn(?instruction),
isLookupSwitch_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
Switch_Key(?instruction, ?key) :-
_LookupSwitch(?instruction, ?index, ?key, ?method).
.decl _TableSwitch_Target(?instruction:symbol, ?value:number, ?target:number)
.input _TableSwitch_Target(IO="file", filename="TableSwitch-Target.facts", delimiter="\t")
Switch_Target(?instruction, ?value, ?target) :-
_TableSwitch_Target(?instruction, ?value, ?target).
.decl _LookupSwitch_Target(?instruction:symbol, ?value:number, ?target:number)
.input _LookupSwitch_Target(IO="file", filename="LookupSwitch-Target.facts", delimiter="\t")
Switch_Target(?instruction, ?value, ?target) :-
_LookupSwitch_Target(?instruction, ?value, ?target).
.decl _TableSwitch_DefaultTarget(?instruction:symbol, ?target:number)
.input _TableSwitch_DefaultTarget(IO="file", filename="TableSwitch-Default.facts", delimiter="\t")
Switch_DefaultTarget(?instruction, ?target) :-
_TableSwitch_DefaultTarget(?instruction, ?target).
.decl _LookupSwitch_DefaultTarget(?instruction:symbol, ?target:number)
.input _LookupSwitch_DefaultTarget(IO="file", filename="LookupSwitch-Default.facts", delimiter="\t")
Switch_DefaultTarget(?instruction, ?target) :-
_LookupSwitch_DefaultTarget(?instruction, ?target).
.decl _Return(?instruction:symbol, ?index:number, ?var:symbol, ?method:symbol)
.input _Return(IO="file", filename="Return.facts", delimiter="\t")
isInstruction(?instruction),
isReturnInstruction(?instruction),
isReturnNonvoid_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method),
ReturnNonvoid_Var(?instruction, ?var) :-
_Return(?instruction, ?index, ?var, ?method).
.decl _ReturnVoid(?instruction:symbol, ?index:number, ?method:symbol)
.input _ReturnVoid(IO="file", filename="ReturnVoid.facts", delimiter="\t")
isInstruction(?instruction),
isReturnInstruction(?instruction),
isReturnVoid_Insn(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method) :-
_ReturnVoid(?instruction, ?index, ?method).
.decl _AssignPhantomInvoke(?instruction:symbol, ?index:number, ?method:symbol)
.input _AssignPhantomInvoke(IO="file", filename="AssignPhantomInvoke.facts", delimiter="\t")
isInstruction(?instruction),
isUnsupportedInstruction(?instruction),
isAssignPhantomInvoke(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method) :-
_AssignPhantomInvoke(?instruction, ?index, ?method).
.decl _PhantomInvoke(?instruction:symbol, ?index:number, ?method:symbol)
.input _PhantomInvoke(IO="file", filename="PhantomInvoke.facts", delimiter="\t")
isInstruction(?instruction),
isUnsupportedInstruction(?instruction),
isPhantomInvoke(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method) :-
_PhantomInvoke(?instruction, ?index, ?method).
.decl _BreakpointStmt(?instruction:symbol, ?index:number, ?method:symbol)
.input _BreakpointStmt(IO="file", filename="BreakpointStmt.facts", delimiter="\t")
isInstruction(?instruction),
isUnsupportedInstruction(?instruction),
isBreakpointStmt(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method) :-
_BreakpointStmt(?instruction, ?index, ?method).
.decl _UnsupportedInstruction(?instruction:symbol, ?index:number, ?method:symbol)
.input _UnsupportedInstruction(IO="file", filename="UnsupportedInstruction.facts", delimiter="\t")
isInstruction(?instruction),
isUnsupportedInstruction(?instruction),
Instruction_Index(?instruction, ?index),
Instruction_Method(?instruction, ?method) :-
_UnsupportedInstruction(?instruction, ?index, ?method).
.decl _Activity(?id:symbol)
.input _Activity(IO="file", filename="Activity.facts", delimiter="\t")
isType(?id),
Activity(?id) :-
_Activity(?id).
.decl _Service(?id:symbol)
.input _Service(IO="file", filename="Service.facts", delimiter="\t")
isType(?id),
Service(?id) :-
_Service(?id).
.decl _ContentProvider(?id:symbol)
.input _ContentProvider(IO="file", filename="ContentProvider.facts", delimiter="\t")
isType(?id),
ContentProvider(?id) :-
_ContentProvider(?id).
.decl _BroadcastReceiver(?id:symbol)
.input _BroadcastReceiver(IO="file", filename="BroadcastReceiver.facts", delimiter="\t")
isType(?id),
BroadcastReceiver(?id) :-
_BroadcastReceiver(?id).
.decl _CallbackMethod(?id:symbol)
.input _CallbackMethod(IO="file", filename="CallbackMethod.facts", delimiter="\t")
isMethod(?id),
CallbackMethod(?id) :-
_CallbackMethod(?id).
.decl _LayoutControl(?id:NumConstant, ?typename:symbol, ?parent:symbol)
.input _LayoutControl(IO="file", filename="LayoutControl.facts", delimiter="\t")
LayoutControl0(?id, ?typename, ?parent) :-
_LayoutControl(?id, ?typename, ?parent).
.decl _FieldInitialValue(?fld:symbol, ?valueString:symbol)
.input _FieldInitialValue(IO="file", filename="FieldInitialValue.facts", delimiter="\t")
FieldInitialValue(?fld, ?valueString) :-
_FieldInitialValue(?fld, ?valueString).
isModifier(?x), Modifier_abstract(?x) :- ?x = "abstract".
isModifier(?x), Modifier_public(?x) :- ?x = "public".
isModifier(?x), Modifier_private(?x) :- ?x = "private".
isModifier(?x), Modifier_final(?x) :- ?x = "final".
isModifier(?x), Modifier_static(?x) :- ?x = "static".
isType(?t), isPrimitiveType(?t), Type_boolean(?t) :- ?t = "boolean".
isType(?t), isPrimitiveType(?t), Type_byte(?t) :- ?t = "byte".
isType(?t), isPrimitiveType(?t), Type_char(?t) :- ?t = "char".
isType(?t), isPrimitiveType(?t), Type_short(?t) :- ?t = "short".
isType(?t), isPrimitiveType(?t), Type_int(?t) :- ?t = "int".
isType(?t), isPrimitiveType(?t), Type_long(?t) :- ?t = "long".
isType(?t), isPrimitiveType(?t), Type_float(?t) :- ?t = "float".
isType(?t), isPrimitiveType(?t), Type_double(?t) :- ?t = "double".
isType(?t), isPrimitiveType(?t), Type_void(?t) :- ?t = "void".
isType(?t), isReferenceType(?t), isNullType(?t), Type_null(?t) :- ?t = "null_type".
isType(?t), isReferenceType(?t), isClassType(?t), Type_object(?t) :- ?t = "java.lang.Object".
.decl _Dacapo(?id:symbol, ?method:symbol)
.input _Dacapo(IO="file", filename="Dacapo.facts", delimiter="\t")
Throw(?insn, ?var) :-
isThrow_Insn(?insn),
Throw_Var(?insn, ?var).
LoadInstanceField(?base, ?sig, ?to, ?inmethod) :-
isLoadInstanceField_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
LoadInstanceField_Base(?insn, ?base),
FieldInstruction_Signature(?insn, ?sig),
LoadInstanceField_To(?insn, ?to).
StoreInstanceField(?from, ?base, ?sig, ?inmethod) :-
isStoreInstanceField_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
StoreInstanceField_From(?insn, ?from),
StoreInstanceField_Base(?insn, ?base),
FieldInstruction_Signature(?insn, ?sig).
LoadStaticField(?sig, ?to, ?inmethod) :-
isLoadStaticField_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
FieldInstruction_Signature(?insn, ?sig),
LoadStaticField_To(?insn, ?to).
StoreStaticField(?from, ?sig, ?inmethod) :-
isStoreStaticField_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
StoreStaticField_From(?insn, ?from),
FieldInstruction_Signature(?insn, ?sig).
LoadArrayIndex(?base, ?to, ?inmethod) :-
isLoadArrayIndex_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
LoadArrayIndex_Base(?insn, ?base),
LoadArrayIndex_To(?insn, ?to).
StoreArrayIndex(?from, ?base, ?inmethod) :-
isStoreArrayIndex_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
StoreArrayIndex_From(?insn, ?from),
StoreArrayIndex_Base(?insn, ?base).
AssignCast(?type, ?from, ?to, ?inmethod) :-
isAssignCast_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
AssignCast_From(?insn, ?from),
AssignInstruction_To(?insn, ?to),
AssignCast_Type(?insn, ?type).
AssignLocal(?from, ?to, ?inmethod) :-
isAssignLocal_Insn(?insn),
AssignInstruction_To(?insn, ?to),
Instruction_Method(?insn, ?inmethod),
AssignLocal_From(?insn, ?from).
AssignNull(?to, ?inmethod) :-
isAssignNull_Insn(?insn),
AssignInstruction_To(?insn, ?to),
Instruction_Method(?insn, ?inmethod).
AssignHeapAllocation(?heap, ?to, ?inmethod) :-
isAssignHeapAllocation_Insn(?insn),
Instruction_Method(?insn, ?inmethod),
AssignHeapAllocation_Heap(?insn, ?heap),
AssignInstruction_To(?insn, ?to).
ReturnVar(?var, ?method) :-
isReturnNonvoid_Insn(?insn),
Instruction_Method(?insn, ?method),
ReturnNonvoid_Var(?insn, ?var).
ReturnVar(?var, ?method) :-
NativeReturnVar(?var, ?method).
VirtualMethodInvocation(?invocation, ?signature, ?inmethod) :-
isVirtualMethodInvocation_Insn(?invocation),
Instruction_Method(?invocation, ?inmethod),
MethodInvocation_Method(?invocation, ?signature).
StaticMethodInvocation(?invocation, ?signature, ?inmethod) :-
isStaticMethodInvocation_Insn(?invocation),
Instruction_Method(?invocation, ?inmethod),
MethodInvocation_Method(?invocation, ?signature).
isHeapAllocation(?null), HeapAllocation_Type(?null, ?type),
HeapAllocation_Null(?null) :-
?null = "<<null pseudo heap>>",
Type_null(?type).
isHeapAllocation(?heap), HeapAllocation_Type(?heap, ?type),
MainMethodArgArray(?heap) :-
?heap = "<<main method array>>",
?type = "java.lang.String[]".
isHeapAllocation(?heap), HeapAllocation_Type(?heap, ?type),
MainMethodArgArrayContent(?heap) :-
?heap = "<<main method array content>>",
?type = "java.lang.String".
ApplicationMethod(?method) :-
Method_DeclaringType(?method, ?class),
ApplicationClass(?class).
ApplicationVar(?var) :-
Var_DeclaringMethod(?var, ?method),
ApplicationMethod(?method).
ConcreteClass(?class) :-
isClassType(?class),
!ClassModifier("abstract", ?class).
VirtualMethodInvocation_SimpleName(?invocation, ?simplename),
VirtualMethodInvocation_Descriptor(?invocation, ?descriptor) :-
isVirtualMethodInvocation_Insn(?invocation),
MethodInvocation_Method(?invocation, ?signature),
Method_SimpleName(?signature, ?simplename),
Method_Descriptor(?signature, ?descriptor).
StaticMethodInvocation_SimpleName(?invocation, ?simplename),
StaticMethodInvocation_Descriptor(?invocation, ?descriptor) :-
isStaticMethodInvocation_Insn(?invocation),
MethodInvocation_Method(?invocation, ?signature),
Method_SimpleName(?signature, ?simplename),
Method_Descriptor(?signature, ?descriptor).
SpecialMethodInvocation_SimpleName(?invocation, ?simplename),
SpecialMethodInvocation_Descriptor(?invocation, ?descriptor) :-
isSpecialMethodInvocation_Insn(?invocation),
MethodInvocation_Method(?invocation, ?signature),
Method_SimpleName(?signature, ?simplename),
Method_Descriptor(?signature, ?descriptor).
LayoutControl(?id, ?type, ?parent) :-
LayoutControl0(?id, ?type, ?parent),
isType(?type).
isHeapAllocation(?heap), HeapAllocation_Type(?heap, ?type) :-
?heap = "java.io.FileSystem.getFileSystem/new java.io.UnixFileSystem",
?type = "java.io.UnixFileSystem".
isHeapAllocation(?heap), HeapAllocation_Type(?heap, ?type) :-
?heap ="java.io.UnixFileSystem.list/new java.lang.String[]",
?type = "java.lang.String[]".
isHeapAllocation(?heap), HeapAllocation_Type(?heap, ?type) :-
?heap ="java.io.UnixFileSystem.list/new java.lang.String",
?type = "java.lang.String".