<aside> 🔑 Key Points

I. Pointer Analysis: Rules


1. Domain and Notations

$x,y\in V$

$f,g \in F$

$o_i,o_j\in O$

$o_i.f,o_j.g\in O\times F$

$\text{Pointer}=V\cup(O\times F)$

$pt=\text{Pointer}\rightarrow P(O)$

2. Rules

$$ \rm \frac{Premises}{Conclusion} $$

Untitled

Untitled

Untitled

Untitled

3. Extended Rules

$$ \frac{o_i\in pt(y)}{o_i \in pt(T.f)} $$

$$ \frac{o_i \in pt(T.f)}{o_i \in pt(y)} $$

$o_u[*]$: the pointer which points to all elements that are stored in any indexes of the array

$$ \frac{o_u\in pt(x),~o_v\in pt(y)}{o_v\in pt(o_u[*])} $$

$$ \frac{o_u\in pt(x),~o_v\in pt(o_u[*])}{o_v\in pt(y)} $$

II. How to Implement Pointer Analysis