|
4 | 4 | % ============================================================================================
|
5 | 5 |
|
6 | 6 | :- table haveGround/0 as opaque.
|
| 7 | +:- multifile groundTruth/9. |
7 | 8 | haveGround :- groundTruth(_, _, _, _, _, _, _, _, _), !.
|
8 | 9 |
|
9 | 10 | % If we have ground truth, did we merge two different classes together?
|
|
24 | 25 | logwarnln('Consistency checks failed.~n~Q (~Q::~Q) and ~Q (~Q::~Q) are on the same class, but ground truth says they are on ~Q and ~Q.', [M1, C1, Mname1, M2, C2, Mname2, C1, C2])
|
25 | 26 | ).
|
26 | 27 |
|
| 28 | +% If we have ground truth, is VFTableBelongsToClass correct? |
| 29 | +:- table insanityVFTableDoesntBelong/1 as incremental. |
| 30 | +insanityVFTableDoesntBelong(Out) :- |
| 31 | + reasonVFTableBelongsToClass(VFTable, Offset, Class, Rule, VFTableWrite), |
| 32 | + groundTruth(VFTable, GVFTableClass, 'vftable', table, vftable, _, _, _, _), |
| 33 | + groundTruth(Class, GClass, Method, _, _, _, _, _, _), |
| 34 | + iso_dif(GVFTableClass, GClass), |
| 35 | + |
| 36 | + Out = ( |
| 37 | + logwarnln('Consistency checks failed.~n~Q but ground truth says ~Q is on ~Q and ~Q is on ~Q.', [reasonVFTableBelongsToClass(VFTable, Offset, Class, Rule, VFTableWrite), VFTable, GVFTableClass, Class, GClass]) |
| 38 | + ). |
| 39 | + |
27 | 40 |
|
28 | 41 | % If we say we have no base classes, we have no base classes :-)
|
29 | 42 | :- table insanityNoBaseConsistency/1 as incremental.
|
|
374 | 387 | groundSanityChecks(Out) :-
|
375 | 388 | haveGround,
|
376 | 389 |
|
| 390 | + insanityVFTableDoesntBelong(Out), |
377 | 391 | insanityGroundBadMerge(Out).
|
378 | 392 |
|
379 | 393 | sanityChecks :-
|
|
0 commit comments