3 votes 3 votes Can anybody explain me access link and control link in activation record?I am confused what is different between them IF POSSIBLE GIVE EXAMPLE ALSO THANKS A LOT Compiler Design compiler-design runtime-environment + – Himanshu Goyal asked Aug 3, 2017 Himanshu Goyal 3.5k views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Akash Mishra commented Jan 29, 2018 i edited by Akash Mishra Jan 2, 2019 reply Follow Share @Himanshu Goyal, main() { int x, y; #Calling a function fun(); } fun() { #Function called from main() return; } During the function call fun(), if the function wants to access the variables x, y (statically scoped) of it's calling function i.e main(), it makes the use of access link. Now when this function fun() terminates/returns, it's activation record is popped from the stack and the control is given back to the main() function. This is done using the control link. Please correct me if I'm wrong anywhere. 2 votes 2 votes `JEET commented Jan 1, 2019 reply Follow Share @Akash Mishra Your first line is completely wrong. Access link is defined for the static and not dynamic. Read @joshi_nitish comment. 0 votes 0 votes Akash Mishra commented Jan 2, 2019 reply Follow Share @`JEET, yes, thank you. I'll correct it. 0 votes 0 votes Please log in or register to add a comment.
3 votes 3 votes A control link from record A points to the previous record on the stack. The chain of control links traces the dynamic execution of the program. An access link from record A points to the record of the closest enclosing block in the program. The chain of access links traces the static structure (think: scopes) of the program. Source: https://www.cs.hmc.edu/~benw/teaching/notes/activation.html smsubham answered Dec 25, 2019 smsubham comment Share Follow See all 0 reply Please log in or register to add a comment.