public class TBAA
extends java.lang.Object
TBAA uses the FieldTypeDecl relation to determine whether or not two access paths may refer to the same memory location.
| AP1 | AP2 | FieldTypeDecl(AP1, Ap2) |
| p | p | true |
| p.f | q.g | (f = g) && FieldTypeDecl(p, q) |
| p.f | q[i] | false |
| p[i] | q[j] | FieldTypeDecl(p, q) |
| p | q | TypeDecl(p, q) |
The TypeDecl(AP1, AP2) relation is defined as:
Subtypes(Type(AP1)) INTERSECT Subtypes(Type(AP2)) != EMPTY
The subtype relationships are determined by the ClassHierarchy.ClassHierarchy,
MemRefExpr,
FieldExpr,
StaticFieldExpr,
ArrayRefExpr| Constructor and Description |
|---|
TBAA() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canAlias(EditorContext context,
Expr a,
Expr b)
Returns true, if expression a can alias expression b.
|
public static boolean canAlias(EditorContext context, Expr a, Expr b)