@@ -371,12 +371,14 @@ module EntityFramework {
371
371
}
372
372
373
373
pragma [ nomagic]
374
- string getInputSynthetic ( SummaryComponentStack output , DbContextClassSetProperty p ) {
375
- exists ( SummaryComponentStack synthetic , Property mapped |
376
- this = p .getDbContextClass ( ) and
377
- input ( this , synthetic , mapped ) and
378
- output ( this , output , mapped , p ) and
379
- result = getFullSyntheticName ( p .getSyntheticName ( ) , synthetic , output )
374
+ string getSyntheticNames (
375
+ SummaryComponentStack input , SummaryComponentStack output , DbContextClassSetProperty dbSet
376
+ ) {
377
+ exists ( Property mapped |
378
+ this = dbSet .getDbContextClass ( ) and
379
+ input ( this , input , mapped ) and
380
+ output ( this , output , mapped , dbSet ) and
381
+ result = dbSet .getSyntheticName ( ) + "#" + SummaryComponentStack:: getComponentStack ( output )
380
382
)
381
383
}
382
384
}
@@ -433,16 +435,6 @@ module EntityFramework {
433
435
)
434
436
}
435
437
436
- bindingset [ prop, stack1, stack2]
437
- private string getFullSyntheticName (
438
- string prop , SummaryComponentStack stack1 , SummaryComponentStack stack2
439
- ) {
440
- result =
441
- prop + "#" //
442
- + SummaryComponentStack:: getComponentStack ( stack1 ) + "#" //
443
- + SummaryComponentStack:: getComponentStack ( stack2 )
444
- }
445
-
446
438
private class DbContextClassSetPropertySynthetic extends EFSummarizedCallable {
447
439
private DbContextClassSetProperty p ;
448
440
@@ -453,7 +445,7 @@ module EntityFramework {
453
445
) {
454
446
exists ( string name , DbContextClass c |
455
447
preservesValue = true and
456
- name = c .getInputSynthetic ( output , p ) and
448
+ name = c .getSyntheticNames ( _ , output , p ) and
457
449
input = SummaryComponentStack:: syntheticGlobal ( name )
458
450
)
459
451
}
@@ -464,21 +456,12 @@ module EntityFramework {
464
456
465
457
DbContextSaveChanges ( ) { this = c .getASaveChanges ( ) }
466
458
467
- pragma [ nomagic]
468
- string getOutputSynthetic ( SummaryComponentStack input ) {
469
- exists ( SummaryComponentStack synthetic , Property mapped , DbContextClassSetProperty dbSet |
470
- input ( c , input , mapped ) and
471
- output ( c , synthetic , mapped , dbSet ) and
472
- result = getFullSyntheticName ( dbSet .getSyntheticName ( ) , input , synthetic )
473
- )
474
- }
475
-
476
459
override predicate propagatesFlow (
477
460
SummaryComponentStack input , SummaryComponentStack output , boolean preservesValue
478
461
) {
479
462
exists ( string name |
480
463
preservesValue = true and
481
- name = this . getOutputSynthetic ( input ) and
464
+ name = c . getSyntheticNames ( input , _ , _ ) and
482
465
output = SummaryComponentStack:: syntheticGlobal ( name )
483
466
)
484
467
}
@@ -489,8 +472,7 @@ module EntityFramework {
489
472
*/
490
473
private class EFSummarizedCallableSyntheticGlobal extends SummaryComponent:: SyntheticGlobal {
491
474
EFSummarizedCallableSyntheticGlobal ( ) {
492
- this = any ( DbContextClass c ) .getInputSynthetic ( _, _) or
493
- this = any ( DbContextSaveChanges c ) .getOutputSynthetic ( _)
475
+ this = any ( DbContextClass c ) .getSyntheticNames ( _, _, _)
494
476
}
495
477
}
496
478
0 commit comments