

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Position In Program
Var Decl proc
Ref proc
Chain offset RefSD โ DeclSD
Refrence (CS, LS)
1 (a = b + c)
a Sub1 Sub1 2 โ 2 = 0 (0,3) b Bigsub Sub1 2 โ 1 = 1 (1,4) c Bigsub Sub1 2 โ 1 = 0 (1,5) 2 (e = b + a)
e Sub3 Sub3 3 โ 3 = 0 (0,4)
b Sub2 Sub3 3 โ 2 = 1 (1,4) a Bigsub Sub3 3 โ 1 = 2 (2,3) 3 (a = d + e)
a Bigsub Sub2 2 โ 1 = 1 (1,3)
d Nil Sub2 Semantics error error e Sub2 Sub2 2 โ 2 = 0 (0,5)
Proc Record name
Local offset Big sub
a 3 b 4 c 5 Proc Record name
Local offset Sub 1
a 3 d 4
Proc Record name
Local offset Sub 3
c 3 e 4
Proc Record name
Local offset Sub 2