@@ -299,30 +299,24 @@ module Flow<InputSig Input> implements OutputSig<Input> {
299
299
)
300
300
}
301
301
302
- query predicate uniqueEnclosingCallable ( BasicBlock bb , string msg ) {
303
- bb instanceof RelevantBasicBlock and
304
- (
305
- msg = "BasicBlock has no enclosing callable" and not exists ( bb .getEnclosingCallable ( ) )
306
- or
307
- msg = "BasicBlock has multiple enclosing callables" and
308
- 2 <= strictcount ( bb .getEnclosingCallable ( ) )
309
- )
302
+ query predicate uniqueEnclosingCallable ( RelevantBasicBlock bb , string msg ) {
303
+ msg = "BasicBlock has no enclosing callable" and not exists ( bb .getEnclosingCallable ( ) )
304
+ or
305
+ msg = "BasicBlock has multiple enclosing callables" and
306
+ 2 <= strictcount ( bb .getEnclosingCallable ( ) )
310
307
}
311
308
312
- query predicate uniqueDominator ( BasicBlock bb , string msg ) {
313
- bb instanceof RelevantBasicBlock and
309
+ query predicate uniqueDominator ( RelevantBasicBlock bb , string msg ) {
314
310
msg = "BasicBlock has multiple immediate dominators" and
315
311
2 <= strictcount ( getImmediateBasicBlockDominator ( bb ) )
316
312
}
317
313
318
- query predicate localDominator ( BasicBlock bb , string msg ) {
319
- bb instanceof RelevantBasicBlock and
314
+ query predicate localDominator ( RelevantBasicBlock bb , string msg ) {
320
315
msg = "BasicBlock has non-local dominator" and
321
316
bb .getEnclosingCallable ( ) != getImmediateBasicBlockDominator ( bb ) .getEnclosingCallable ( )
322
317
}
323
318
324
- query predicate localSuccessor ( BasicBlock bb , string msg ) {
325
- bb instanceof RelevantBasicBlock and
319
+ query predicate localSuccessor ( RelevantBasicBlock bb , string msg ) {
326
320
msg = "BasicBlock has non-local successor" and
327
321
bb .getEnclosingCallable ( ) != getABasicBlockSuccessor ( bb ) .getEnclosingCallable ( )
328
322
}
@@ -338,23 +332,17 @@ module Flow<InputSig Input> implements OutputSig<Input> {
338
332
not captureAccess ( v , _)
339
333
}
340
334
341
- query predicate uniqueLocation ( Expr e , string msg ) {
342
- e instanceof RelevantExpr and
343
- (
344
- msg = "Expr has no location" and not exists ( e .getLocation ( ) )
345
- or
346
- msg = "Expr has multiple locations" and 2 <= strictcount ( e .getLocation ( ) )
347
- )
335
+ query predicate uniqueLocation ( RelevantExpr e , string msg ) {
336
+ msg = "Expr has no location" and not exists ( e .getLocation ( ) )
337
+ or
338
+ msg = "Expr has multiple locations" and 2 <= strictcount ( e .getLocation ( ) )
348
339
}
349
340
350
- query predicate uniqueCfgNode ( Expr e , string msg ) {
351
- e instanceof RelevantExpr and
352
- (
353
- msg = "Expr has no cfg node" and not e .hasCfgNode ( _, _)
354
- or
355
- msg = "Expr has multiple cfg nodes" and
356
- 2 <= strictcount ( BasicBlock bb , int i | e .hasCfgNode ( bb , i ) )
357
- )
341
+ query predicate uniqueCfgNode ( RelevantExpr e , string msg ) {
342
+ msg = "Expr has no cfg node" and not e .hasCfgNode ( _, _)
343
+ or
344
+ msg = "Expr has multiple cfg nodes" and
345
+ 2 <= strictcount ( BasicBlock bb , int i | e .hasCfgNode ( bb , i ) )
358
346
}
359
347
360
348
private predicate uniqueWriteTarget ( VariableWrite vw , string msg ) {
@@ -429,13 +417,10 @@ module Flow<InputSig Input> implements OutputSig<Input> {
429
417
)
430
418
}
431
419
432
- query predicate uniqueCallableLocation ( Callable c , string msg ) {
433
- c instanceof RelevantCallable and
434
- (
435
- msg = "Callable has no location" and not exists ( c .getLocation ( ) )
436
- or
437
- msg = "Callable has multiple locations" and 2 <= strictcount ( c .getLocation ( ) )
438
- )
420
+ query predicate uniqueCallableLocation ( RelevantCallable c , string msg ) {
421
+ msg = "Callable has no location" and not exists ( c .getLocation ( ) )
422
+ or
423
+ msg = "Callable has multiple locations" and 2 <= strictcount ( c .getLocation ( ) )
439
424
}
440
425
441
426
query predicate consistencyOverview ( string msg , int n ) {
0 commit comments