Professional Documents
Culture Documents
Maasai Mara University: Regular University Examinations 2017/2018 ACADEMIC YEAR Third Year Second Semester
Maasai Mara University: Regular University Examinations 2017/2018 ACADEMIC YEAR Third Year Second Semester
Maasai Mara University: Regular University Examinations 2017/2018 ACADEMIC YEAR Third Year Second Semester
UNIVERSITY
INSTRUCTIONS
1|Page
SECTION A
QUESTION ONE (COMPULSORY 30 MARKS)
SECTION B
QUESTION TWO
a. Discuss five components of finite automata [5 Marks]
b. Convert the following regular grammar to finite automata
A aB/bA/b
B aC/bB
C aA/bC/a [10 Marks]
c. discuss the differences between compilers and interpreters[5 Marks]
QUESTION THREE
a. Draw parse tree of the following derivation
i. E → E+E
id + E
id + E*E
id + id*E
id + id*id [10 Marks]
QUESTION FOUR
a. Discuss the following categories of code optimization
i. Machine independent optimizations:
ii. Machine dependent optimization [10 Marks]
b. Discuss the following types of basic block optimizations.
i. Structure-Preserving Transformations
ii. Algebraic Transformations [10 Marks]
2|Page
END//
3|Page