@@ -30,18 +30,19 @@ abstract class InstanceObject extends ObjectInternal {
30
30
31
31
pragma [ noinline]
32
32
private predicate classAttribute ( string name , ObjectInternal cls_attr ) {
33
- PointsToInternal:: attributeRequired ( this , name ) and
34
- this .getClass ( ) .( ClassObjectInternal ) .lookup ( name , cls_attr , _)
33
+ PointsToInternal:: attributeRequired ( this , pragma [ only_bind_into ] ( name ) ) and
34
+ this .getClass ( ) .( ClassObjectInternal ) .lookup ( pragma [ only_bind_into ] ( name ) , cls_attr , _)
35
35
}
36
36
37
37
pragma [ noinline]
38
38
private predicate selfAttribute ( string name , ObjectInternal value , CfgOrigin origin ) {
39
- PointsToInternal:: attributeRequired ( this , name ) and
39
+ PointsToInternal:: attributeRequired ( this , pragma [ only_bind_into ] ( name ) ) and
40
40
exists ( EssaVariable self , PythonFunctionObjectInternal init , Context callee |
41
41
this .initializer ( init , callee ) and
42
42
self_variable_reaching_init_exit ( self ) and
43
43
self .getScope ( ) = init .getScope ( ) and
44
- AttributePointsTo:: variableAttributePointsTo ( self , callee , name , value , origin )
44
+ AttributePointsTo:: variableAttributePointsTo ( self , callee , pragma [ only_bind_into ] ( name ) ,
45
+ value , origin )
45
46
)
46
47
}
47
48
@@ -316,9 +317,11 @@ class UnknownInstanceInternal extends TUnknownInstance, ObjectInternal {
316
317
317
318
pragma [ noinline]
318
319
override predicate attribute ( string name , ObjectInternal value , CfgOrigin origin ) {
319
- PointsToInternal:: attributeRequired ( this , name ) and
320
+ PointsToInternal:: attributeRequired ( this , pragma [ only_bind_into ] ( name ) ) and
320
321
exists ( ObjectInternal cls_attr , CfgOrigin attr_orig |
321
- this .getClass ( ) .( ClassObjectInternal ) .lookup ( name , cls_attr , attr_orig )
322
+ this .getClass ( )
323
+ .( ClassObjectInternal )
324
+ .lookup ( pragma [ only_bind_into ] ( name ) , cls_attr , attr_orig )
322
325
|
323
326
cls_attr .isDescriptor ( ) = false and value = cls_attr and origin = attr_orig
324
327
or
@@ -456,8 +459,8 @@ class SuperInstance extends TSuperInstance, ObjectInternal {
456
459
/* Helper for `attribute` */
457
460
pragma [ noinline]
458
461
private predicate attribute_descriptor ( string name , ObjectInternal cls_attr , CfgOrigin attr_orig ) {
459
- PointsToInternal:: attributeRequired ( this , name ) and
460
- this .lookup ( name , cls_attr , attr_orig )
462
+ PointsToInternal:: attributeRequired ( this , pragma [ only_bind_into ] ( name ) ) and
463
+ this .lookup ( pragma [ only_bind_into ] ( name ) , cls_attr , attr_orig )
461
464
}
462
465
463
466
private predicate lookup ( string name , ObjectInternal value , CfgOrigin origin ) {
0 commit comments