| |
A Simple Pointer Language
The language consists of
- Elementary data types (integers and reals) requiring one word each
- Array of these types
- Pointer is used as cursor to run through an array
- Pointer p points to an element of an array
- Variables that could be used as pointers are those declared to be pointers and temporaries that received a value that is pointer plus or minus a constant
- If there is a statement s: p:=&a then after s, p points to a
- If there is a statement s: p:= q ± c where c is an integer, and p and q are pointers then after s, p points to an array that q could point to before s
- If there is a statement s: p:=q then after s, p points to whatever q could point to before s
- In[B] is a set of pairs (p,a) where p is a pointer and a is a variable
- Out[B] is defined in a similar manner for set of values after a block B
Transfer Function
|