official
course description
this course description
This course is divided into three equal parts. Three parts are
taught by
three different lecturers.
1) Programming Language concepts, Twittee
MO 13:00-16:00 Eng3 418
2) Real programming languages,
Vishnu MO
13:00-16:00 Eng3 420
3) Language and implementation,
Prabhas MO
13:00-16:00 Eng3 403
Principal lecturer: Twittee
The goal of this course is to make you understand the languages you
use. To
make you appreciate diversity of ideas in programming and prepare you
for new
programming methods and paradigms. Theoretical foundations will be
presented.
You will know properties of language, not just syntax. Moreover, you
will
recognize the cost of presenting an abstract view of machine and
understand
trade-offs in programming language design.
Each part will be taught separately and independently. It is logical
that the
assessment will also be arranged according to this structure. There is
no
midterm exam (besides whatever assess by the lecturer at that time) and
the
final exam will contain all materials taught in the course.
each part
20% by
3 = 60%
final
exam
40%
the lecture schedule:
section 1: A, B, C
section 2: B, C, A
section 3: C, A, B
A) Programming Language concepts, Twittee
B) Real programming languages, Vishnu
C) Language and implementation, Prabhas
This part concerns a compiler for a programming language. To teach effectively, I choose to design and implement a new language and its compiler written in this new language. There are two aspects of learning this part: theory and practice. The theory will be given in the lectures. The practice is carried on as homework. As the whole system is avaible for inspection and experimentation, students are encouraged to play with it. In a nutshell, we will study Nut compiler (written in Nut language). I provide the tools such as Nut compiler and Nut virtual machine so students can actually program and test it.
at
Hardware
Lab floor 18, Eng Building 4. There will be the last
quiz on the topic:
Given
a
grammar, write a Nut parser for it. Quiz starts at
10:30-11:00.
27 Sept Summary
of the content of the compiler part
each week has 3 hrs,
max 5 weeks
plan for 4 weeks, with one to spare
each week has 2 sessions of 1 1/2 hrs. each.
a homework will be handed out each week.
one project will be issued on week 4.
one small project
two mini exams
homeworks, running the code
1 structure of
a compiler
Overview of the course
(from
Stanford
slide)
Compiler
(ppt)
HLL to LLL to processor architecture
2 lexical
analyser
Scanner (ppt)
Scanner in Nut (use with nvm34.exe)
automaton
actual
code
Session on how to use the tools
Overview of Nut compiler
--------------
3 parser
4
grammar
Context Free Grammar (ppt)
mini-exam1
----------------
5 recursive
descent
Parsing (ppt) we
are
interested only in top-down parsing
6 actual
parser
Parsing Nut program to N-code
-----------------
7 code
generator
Code Generation (with examples)
recursive evaluator
8 actual code
generator How to do code generation
code
generator
(gen21.txt)
generate s-code
mini-exam2
-----------------
9-10 additional topics
submit project
homework
5% 2 quizes 5+5% one
project
5% total 20%
Programming Recursion (to
familiar yourself with recursive programming)
Nut language manual
Summary of the content of the compiler part
The first one is the standard text book on compiler. It has
been used in more than 100 universities in
Prabhas Chongstitvatana
contact address: prabhas at chula dot ac dot
th
office room 18-13 Engineering Building 4, floor
18. tel 02-2186982
research lab: Intelligent Systems, floor 20.
Last update 27 Sept 2010