Activation tree
. Control flows sequentially
. Execution of a procedure starts at the beginning of body
. It returns control to place where procedure was called from
. A tree can be used, called an activation tree, to depict the way control enters and leaves activations
. The root represents the activation of main program
. Each node represents an activation of procedure
. The node a is parent of b if control flows from a to b
. The node a is to the left of node b if lifetime of a occurs before b
In our discussion we will make the following assumptions about the flow of control among procedures during the execution of the program:
1. Control flows sequentially: that is, the execution of a program consists of a sequence of steps and the control does not change arbitrarily but only on explicit calls.
2. Each execution of a procedure starts at the beginning of the procedure body and eventually returns control to the point immediately following the place where the procedure was called. A tree like data structure can be used to depict the way control enters and leaves activation this tree is called an activation tree.
3. The root represents the activation of the main program.
4. Each node represents an activation of a procedure.
5. The node for a is the parent of the node for b if and only if control flows from activation a to b .
6. The node for a is to the left of the node for b if and only if the lifetime of a occurs before the lifetime of b .
|