Você está na página 1de 18

RECENT JOURNALS IN COMPILER DESIGN

S.NO
1

TOPICS
COMPILER BASIC
DESIGN AND
CONSTRUCTION

A New Approach of
Complier Design in
Context of Lexical
Analyzer and Parser
Generation for NextGen
Languages

3
Development of Compiler
Design Techniques for
Effective
Code Optimisation and
Code Generation

A compiler design for IEC


1161-3 standard languages
of programmable logic
controllers

Language and Compiler


Design
for Streaming Applications

JOURNAL URL
http://www.academia.edu/9036974/COMPILER_BASI
C_DESIGN_AND_CONSTRUCTION

http://www.ijcaonline.org/archives/volume6/number11/1
116-1462

http://www.ijetae.com/files/Volume4Issue3/IJETAE_03
14_87.pdf

http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?
arnumber=788716&abstractAccess=no&userType=inst

http://download.springer.com/static/pdf/621/

S.NO
1

MISD Compiler for


Feature Vector
Computation in Serial
Input Images

TOPICS
New Trends in the
Optimization of C-Code

Compiler Analysis and


Optimizations: What is
New?

3
Lexical Analysis:
Comparison

Application of semantic
and lexical analysis to
technology forecasting by
trend analysis

Parsing and Compiler


design Techniques for
Compiler Applications

http://scientificjournals.org/archive/vol1no3/vol1no3_5.pdf

JOURNAL URL
http://www.verifysoft.com/C-Code_Optimization.pdf

http://citeseerx.ist.psu.edu/viewdoc/download?
doi=10.1.1.78.2542&rep=rep1&type=pdf

http://inspire.pnnl.gov/Help/Content/LexAnalysis_Distribution.htm

http://www.academia.edu/16428626/Application_of_semanti
c_and_lexical_analysis_to_technology_forecasting_by_trend
_analysis

http://www.ijritcc.org/download/1427436031.pdf

Syntactic and Semantic


Analysis

http://download.springer.com/static/pd

RECENT TRENDS IN COMPILER DESIGN

BEYOND THE SYLLABUS

S.NO

TOPICS

Introduction to Optimizing Compilers

Using Program Analysis for Optimization

The HiPE Compiler: An Overview


Lab with HiPE internals

ROLE PLAY TOPICS

S.NO

UNIT

UNIT 1

Phases Of Compiler

UNIT 2

Expressing Tokens by Regular Expressions

UNIT 3

TOPICS

Error Handling and Recovery in Syntax Analyzer

UNIT 4

Storage Allocation in FORTAN.

UNIT 5

A Simple Code Generator Algorithm.

ANIMATION TOPICS
S.NO

Animation TOPICS

url

Interpreters and
Compilers

https://www.youtube.com/watch?v=ZkpipIcompilers, interpreters, IJmk


assemblers.

https://www.youtube.com/watch?
v=_C5AHaS1mOA

https://www.youtube.com/watch?v=F_Et0vQXGcc
Intermediate Code
Generator

RECURSIVE
DESCENT PARSER

https://www.youtube.com/watch?v=HC8lXSJ8Kzo

ASSIGNMENT - 1

Subject: COMPILER DESIGN


Subject Code: CS6660

Branch: IT
Semester: VII

1. Describe different phases of a compiler with the help of a neat diagram.


2. What are syntax trees? How these can be constructed?
3. Differentiate between phase and pass of a compiler.
4. Briefly explain the term Compiler writing tools.
5. What do you mean by cross compilation? Briefly explain.
6. What are assembler, compiler and interpreter? How these are related to each
other?
7. Discuss the lexical analysis phase of the compiler with the help of an example.
8. What do you mean by a translator? Explain any three categories of translator.
9. Discuss any two problems which are encountered during code generation.
10.What are the characteristics of a good translator?

ASSIGNMENT - 2

Subject: COMPILER DESIGN


Subject Code: CS6660

Branch: IT
Semester: VI

1. Describe algorithm to convert NDFA into DFA.


2. Construct a finite automaton accepting the set of all strings of zeros and ones;
with at most one pair of consecutive zeros and at most one pair of consecutive
ones.
3. What is the importance of lexical analyzer in a compiler?
4. What sets to strings do the following R.E 2s describe.
i)

{a b} {b/a}

ii)

digit {digit}/ (0/2/4/6/8) where digit represents 0/1/2/ /9.

5. What is meant by input buffering? How is it useful in design of lexical analyzer?


6. Write the algorithm to minimize the number of states in a DFA. Apply this algo to
minimize the states of the following DFA:

State

Start

Accept

Inputs
a

7. What are Regular expressions? Discuss the procedure with example conversion of
regular expression into finite automata and vice-versa. Also discuss how to
minimize the number of states of a DFA.
8. Explain the syntax directed translation scheme for desk calculator. Also show the
sequence of moves by parser for the input string 30/5+4$.
9. Explain the syntax directed translation scheme for desk calculator which performs
+, * operations of simple data type. Also compute 23+5*45$.
10.Give a parse tree for the input string:
i + i (i * i)#

ASSIGNMENT - 3

Subject: COMPILER DESIGN


Subject Code: CS6660

Branch: IT
Semester: VII

1. What do you mean by a parse tree? How is it drawn? Explain with some example.
2. Define operator precedence grammar? How operator precedence relations are
defined for a pair of terminals a and b.

3. What is a Top-Down parser? Consider the grammar S -> aSa/aa. By tracing


through the steps of a top-down parser, which tries alternate aSa before aa, show
that S succeeds on 2,4 or 8 as but fails on 6 as.
4. What do you understand by ambiguous grammar? How ambiguity can be
removed? Explain with example.
5. What is intermediate code? What intermediate codes are used in compilers?
Explain.
6. What do you understand by a handle? Explain the stack implementation of shift
reduce parser with the help of example.
7. What is a context free grammar? Augmented grammar? What are the problems
that may occur during parsing of these? Discuss the detail with an example.
8. Explain predictive parser. Also explain shift reduce parsing.
9. What are quadruples, triples and indirect triples? Give examples.
10.Explain recursive-descent and predictive parsing.

ASSIGNMENT - 4

Subject: COMPILER DESIGN


Subject Code: CS6660

Branch: IT
Semester: VI

1. Write the algorithm for construction of SLR parsing table. Write the sets of LR(0)
items for the grammar
EE+T|T
TT*F|F

F (E)
T id

2. Show that the following grammar


S Aa/bAc/dc/bda
Ad
Is LALR(1) but not SLR (1).

3. Convert the regular expression (a+b)*aba(a+b)* into the corresponding DFA.


4. Consider the grammar
S (L) | a
L L, S | S
a)

What are the terminals, non-terminals and start symbol?

b)

Find parse tree for the following sentences:

c)

i)

(a,a)

ii)

(a, ((a,a),(a,a)))

Construct a leftmost derivation for each of the sentences in (b)


above.

5. Explain the function of LR parsers. Give algorithm for constructing SLR parsing
table. Also construct the SLR table for grammar:
+T
T
T T*F
T F
F ()

F id

6. Write quadruples, triples and indirect triples for the expression:


-(a + b) * (c + d) (a + b + c)

7. Consider the grammar


S a | ^ | (T)
T T, S | S
Find the right most derivation for (a,(a,a)).

8. Consider the grammar


S a | ^ | (T)
T T, S | S
Show the steps of a shift-reduce parser for the rightmost derivation.

9. Consider the grammar


E TE
E + T | E
T FT
T * FT | E
F (E) | id
Compute FIRST and FOLLOW for each non-terminal of above grammar.

10. Construct a parsing table for above.

ASSIGNMENT - 5

Subject: COMPILER DESIGN


Subject Code: CS6660

Branch: IT
Semester: VI

Submitted
to:Mr.K.Dipu

Assignment giving
date

Assignment Collection
date

Assignment
check/discussion date

Nov 18, 16

Nov 25, 16

Nov 01, 16

1. Explain in detail labeling algorithm used in code generation.


2. What are the contents of a symbol table? Give a brief description of each.
3. How symbol table space can be re-used. Give some example.
4. What are symbol tables? Explain their significance.
5. Write a detailed note on error detection and recovery.
6. Write about code optimization.
7. What is meant by register allocation? Why is considered to be important?
8. What do you mean by peephole optimization? What are the areas where it can be
applied?
9. What is three address code? Write any five common kind of three address statements
found in programs.
10.Write short notes on the following:
a)

Problems in code generation

b)

Register allocation and register assignment

ASSIGNMENT - 6

Subject: COMPILER DESIGN


Subject Code: CS6660

Branch: IT
Semester: VI

1. Explain Backpatching, Bootstrapping and translation of assignment statement.

2. Write the algorithm for construction of SLR parsing table. Construct the SLR
parsing table for the grammar.
EW+T|T
TT*F|F
F (E)/id

3. What is difference between error repair and error recovery? What of the
advantages of error repair over error recovery do you consider mmost important:
i)

to you personally.

ii)

to experienced programmers.

iii)

to novice programming details.

Explain why?

3. Explain Instruction variables and forms of object code.


4. Construct a DAG for the following basic block:
D := B * C
E := A + B
B := B * C
A := E D

5. What are the different types of errors that can occur: What remedial action
does a compiler take in each?

6. Write a SCANNER for FORTRAN that uses look ahead to determine the
next token. Use an input buffer.

7. Compare the capabilities of context free grammars and regular expressions.


8. Write a top-down translation scheme to produce quadruples for Boolean
Expressions.
9. Discuss error recovery in operator precedence parsing.
10.What do you mean by induction variable? Explain the process of induction
variable elimination.

SEMINAR DETAILS
Subject: COMPILER DESIGN

Branch: IT

Subject Code: CS6660

Semester: VI

S. No.

Topic

Group [Rollno wise]

Compiler and translators

1-4

Lexical analysis

5-8

Syntax analysis and parsing techniques

9-12

Different varieties of parsers

Implementation of syntax directed translation 17-20

Symbol table implementation

21-24

Error detection and recovery

25-29

Code optimization

30-34

Case study of C language compiler

35-upto last rollno.

13-16

CS6660 COMPILER DESIGN

LTPC
3003

OBJECTIVES:
The student should be made to:
Learn the design principles of a Compiler.
Learn the various parsing techniques and different levels of translation
Learn how to optimize and effectively generate machine codes
UNIT I INTRODUCTION TO COMPILERS

Translators-Compilation and Interpretation-Language processors -The Phases of


Compiler-Errors Encountered in Different Phases-The Grouping of PhasesCompiler Construction Tools - Programming Language basics.

UNIT II LEXICAL ANALYSIS

Need and Role of Lexical Analyzer-Lexical Errors-Expressing Tokens by Regular


Expressions- Converting Regular Expression to DFA- Minimization of DFALanguage for Specifying Lexical Analyzers-LEX-Design of Lexical Analyzer for a
sample Language.
UNIT III SYNTAX ANALYSIS

10

Need and Role of the Parser-Context Free Grammars -Top Down Parsing General
Strategies- Recursive Descent Parser Predictive Parser-LL(1) Parser-Shift Reduce
Parser-LR Parser-LR (0)Item- Construction of SLR Parsing Table -Introduction to
LALR Parser - Error Handling and Recovery in Syntax Analyzer-YACC-Design of a
syntax Analyzer for a Sample Language .
UNIT IV SYNTAX DIRECTED TRANSLATION & RUN TIME ENVIRONMENT 12
Syntax directed Definitions-Construction of Syntax Tree-Bottom-up Evaluation of
SAttribute Definitions- Design of predictive translator - Type Systems-Specification
of a simple type checker- Equivalence of Type Expressions-Type Conversions.
RUN-TIME ENVIRONMENT: Source Language Issues-Storage Organization-Storage
Allocation- Parameter Passing-Symbol Tables-Dynamic Storage Allocation-Storage
Allocation in FORTAN.
UNIT V CODE OPTIMIZATION AND CODE GENERATION

Principal Sources of Optimization-DAG- Optimization of Basic Blocks-Global Data


Flow Analysis- Efficient Data Flow Algorithms-Issues in Design of a Code
Generator A Simple Code Generator Algorithm.
TOTAL: 45 PERIODS
OUTCOMES:

At the end of the course, the student should be able to:


Design and implement a prototype compiler.
Apply the various optimization techniques.
Use the different compiler construction tools.
TEXTBOOK:
1. Alfred V Aho, Monica S. Lam, Ravi Sethi and Jeffrey D Ullman, Compilers
Principles, Techniques and Tools, 2nd Edition, Pearson Education, 2007.
REFERENCES:
1. Randy Allen, Ken Kennedy, Optimizing Compilers for Modern Architectures: A
Dependence-based Approach, Morgan Kaufmann Publishers, 2002.
2. Steven S. Muchnick, Advanced Compiler Design and Implementation, Morgan
Kaufmann Publishers - Elsevier Science, India, Indian Reprint 2003.
3. Keith D Cooper and Linda Torczon, Engineering a Compiler, Morgan Kaufmann
Publishers Elsevier Science, 2004.
4. Charles N. Fischer, Richard. J. LeBlanc, Crafting a Compiler with C, Pearson
Education,2008.

Você também pode gostar