3 Symbol Table And Run Time Storage

Compiler Design and Construction · Unit 3 · 4 hrs

Symbol Table and Run-time Storage

Exam-focused notes for Symbol Table and Run-time Storage (Compiler Design and Construction, CSC376): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.

What this unit covers

  • Symbol Table Design: Function of Symbol Table
  • Information provided by Symbol Table
  • Attributes and Data Structures for symbol table
  • Run-time storage management

Information provided by Symbol Table

20815 marks

What types of information are stored in a symbol table? Discuss the activation record. [5]

A symbol table is a data structure used by compilers to hold information about source-program constructs. The information is collected incrementally by the analysis phases and used by the synthesis phases to generate target code. The following types of info...

Full solved answer →
20805 marks

What are the advantages of intermediate code? What types of information are provided by symbol table? [5]

--- Intermediate code is a machine-independent representation generated between the front-end and back-end of a compiler. Its main advantages are: 1. Machine Independence Intermediate code is not tied to any specific target machine. The same intermediate re...

Full solved answer →
20785 marks

What are the typical entries made in symbol table? Explain. [5]

A symbol table is a data structure used by compilers to hold information about source-program constructs. Information is collected incrementally by the analysis phase and used by the synthesis phase to generate target code. --- Each entry in a symbol table ...

Full solved answer →

Run-time storage management

20815 marks

How do you represent recursion in an activation tree? Generate the three-address code for the following instruction: [5]

Part 1: Conceptual question about representing recursion in an activation tree. No numeric data. Part 2: "Generate the three-address code for the following instruction." Critical issue: The actual instruction/expression to be translated into three-address c...

Full solved answer →
20805 marks

What is activation tree? Define type checking system with examples. [5]

--- An activation tree is a tree data structure used to represent the sequence and nesting of procedure/function calls during the execution of a program at runtime. - Each node in the tree represents an activation (call) of a procedure. - The root represent...

Full solved answer →
20785 marks

List out different types of run time storage management techniques. Explain any one of them. [5]

There are three main types of run-time storage management techniques: 1. Static Storage Management 2. Stack-based (Dynamic) Storage Management 3. Heap-based Storage Management --- In static storage management, memory is allocated at compile time before the ...

Full solved answer →
20756 marks

What is activation record? Discuss the different activities performed by caller and callee during procedure call and return.[6]

An activation record is a block of memory used for managing information needed by a single execution of a procedure. It is also called a stack frame. Each time a procedure is called, a new activation record is pushed onto the runtime stack, and when the pro...

Full solved answer →