Define Activation Records.
Ans. The information needed by a single execution or a single activation of a procedure is managed using a contiguous block of storage called an “activation record” or “activation frame” consisting of the collection of fields.
When does a dangling reference occur? Give its impact on programs.
Ans – Whenever storage can be deallocated, the problem of dangling references arises. A dangling reference occurs when there is a reference to storage that has been deallocated. It is a logical error to use dangling references since the value of deallocated storage is undefined according to the semantics of most languages. Worse, since that storage may later be allocated to another datum, mysterious bugs can appear in programs with dangling references.
When Call by name is preferred than other parameter passing techniques.
Ans. Call by name was used in the early programming language ALGOL60. It requires that the callee execute as if the actual parameter were substituted literally for the formal parameter in the code of the callee as if the formal parameter were a macro standing for the actual parameter.
Justify the best-suited data structure for the symbol table.
Ans. They are following three principal data structures that can be used to implement symbol tables:
(i) Linear Lists,
(ii) Trees,
(iii) Hash Tables.
Define activation trees.
Stack allocation would not be feasible if procedure calls, or activations of procedures, did not nest in time. We therefore can represent the activations of procedures during the running of an entire program by a tree, called an activation tree. Inactivation tree each node corresponds to one activation and the root is the activation of the main procedure that initiates the execution of the program.
What do mean by a lifetime of an activation of a procedure?
Ans. Lite time of an activation of a procedure means that the existence of the procedure at a particular time. If a procedure is non-recursive, then there exists only one activation procedure at any one time. Whereas its pt endures are recursive, several activations of that procedure may Ito active at the same time.