A recursive procedure p need not call itself directly; p may call another procedure q, which may then call p through some sequence of procedure calls. We can use a tree called an activation tree, to depict the way control enters and leaves activation. In an activation tree
a) Each node represents an activation of a procedure,
b) The root represents the activation of the main program
c) The node for a is the parent of the node for b if an only if control flows from activation a to b, and
d) The node for a is to the left of the node for b if an only if the lifetime of a occurs before the lifetime of b.
Define activation trees
- Post author:Educate
- Post published:September 5, 2023
- Post category:Compliler Design
- Post comments:0 Comments