Compiler Design

                                                                       Compiler Design

2170701

Importanat Questions for GTU Exam

UNIT -1-INTRODUCTION TO COMPILERS

  1. Explain the phases of compiler? And how the following statement will be translated into every phase. Position := initial + rate * 60.
  2. (i).Discuss in detail about the role of Lexical and syntax analyzer with the possible error recovery actions. (ii).Discuss in detail about role of lexical analysis?
  3. (i).Tell the various phases of the compiler and examine with programs segment(ii).Discuss in detail about symbol table.
  4. Describe the following expressions after each phases a:= b*c-d how various phases could be combined as pass in a compiler.
  5. (i).Explain in detail about the compiler construction tools. (ii).Explain in detail about the language processing system.
  6. (i).Describe the errors encountered in different phases of compiler. (ii).Explain the functions of Preprocessor.
  7. Define compiler? State various phases of complier and describe in detail.
  8. i).How to solve the source program to target machine code by using language processing system. (ii).Write in detail about the cousins of the compiler.
  9. Generalize the important terminologies used  in programming language basics
  10. i). Analyze the given expressions 4:*+=cba with different phases of the compiler(ii). Classify the concepts of compiler and Interpreter.

 

UNIT -2-LEXICAL ANALYSIS

  1. Convert the following NFA into DFA. Describe the sequence of moves made by each in processing the input string ababba.
  2. (i).Discuss in detail about the role of Lexical analyzer with the possible error recovery actions. (ii).What are the issues in lexical analysis?
  3. (i).Describe the Input buffering techniques in detail. (ii).Elaborate in detail the recognition of tokens.
  4. (i).Solve the following regular expression into minimized DFA. (a/b)*baa(ii).Comparison between NFA and DFA.
  5. (i).Define Lex and Lex specifications? How lexical analyzer is constructed using lex?(ii).Write a lex program that recognizer the tokens.
  6. Solve the given regular expression (a/b)* abb (a/b)* into NFA using Thompson construction and then to minimized DFA.
  7. Write an algorithm for constructing a DFA from a regular expression. Discuss with an example.
  8. How to converting a Regular Expression directly to a DFA. explain with one example.

 

UNIT -3,4 -SYNTAX ANALYSIS

  1. Write  the  rule  to  eliminate  left  recursion  in  a grammar. Prepare and Eliminate the left   recursion for the grammar S Aa | b A Ac | Sd |ε
  2. Consider the following grammar S AS|b  ASA|a. construct the SLR parse table for the grammar. Show the actions of the parser for the input string “abab”.
  3. (i). What is an ambiguous and un ambiguous grammar? Create  the  following  grammar  is  ambiguous  or  not. EE+E | E*E | (E) |id. (ii). Prepare the following grammar is LL(1) but not SLR(1). S→AaAb | BbBa A→€ B→€
  4. (i).Define YACC parser generator? List out the Error recovery actions in YACC?
  5. (ii).What are the Error recovery techniques used in Predictive parsing?
  6. (i).What are the different kinds of syntax error phased by a program? (ii).List out different error recovery strategies.expalin them.

 

UNIT-5,6 -SYNTAX DIRECTED TRANSLATION & RUNTIME ENVIRONMENT

 

  1. (i).Discuss in detail about the Syntax Directed Definitions. (ii).Discuss in detail about the specification of  simple type checker.
  2. (i).Evaluate the expressions for the SDD annotated parse tree for the following expressions. a) 3 * 5 + 4n b) 3 * 5.
  3. (i). How to a design a calling sequences and analyze the principles of activation records. (ii). Construct the unification algorithm by apply the type checking concepts.
  4. (i).Describe the concepts of Storage allocation in FORTAN. (ii).Describe in detail about dynamic storage allocation.
  5. (i).Describe the source language issues in detail. (ii).Describe in detail about storage organization.

UNIT-7,8-CODE OPTIMIZATION AND CODE Generation

  1. (i).Generalize the process of optimization of basic blocks. Give an example. (ii). Generalize the concept of register allocation and assignment.
  2. Define a DAG. Construct a DAG and Discover the sequence of instructions for a+a*(b-c)+(b-c)*d.
  3. (i).Explain in detail about the various issues in code generation with examples. (ii).Explain the data flow analysis of structured programs.
  4. (i).Discuss the code generation phase with simple code generation algorithm. (ii).Discuss the various peephole optimization in detail
  5. Describe the common examples of function preserving transformations and loop optimization process?
  6. (i).Describe the efficient data flow algorithms in detail. (ii).Describe in detail about code improving transformations

No comments:

Post a Comment