Formal languages and Compilers 2011
Projects for the exam
Final date of project delivery:
- For the exam on 13 September 2011: projects must be sent not later than 12:00 on 1 September 2011
- For the exam in January 2012: projects must be sent not later than 12:00 on 16 January 2012
Note:
- Project report and all the comments must be written in English
- My server filters the attachments that contain executable files (.exe, .bat, ...).
So it is better to rename the attachment when you send it to me, for example: project.zip --> project.zigzag, project.tar.gz --> project.tar.gazelle
- When I receive your project, I will reply to your email confirming the project receival. In case you do not receive any reply within two days,
contact me again (this time without attachments to avoid possible problems with the filters).
How to compile the sources on Windows
Lectures:
-
Lecture 1: Revisiting OCaml
Sides of the lecture
(printable version)
Proposed exsercises
(solutions)
-
Lecture 2: Revisiting OCaml, Compiler vs. Interpreter
Sides of the lecture
(printable version)
Solutions to exercises at the lecture: Recursive functions,
Filtering the list
-
Lecture 3: Lexer and Parser generators
Sides of the lecture
(printable version)
Example: Calculator
(solutions: exercises 1-4,
ex.5,
ex.6)
-
Lecture 4: Memory management
Sides of the lecture
(printable version)
Slides for example of mark-sweep process
-
Lecture 5: Interpreter for a simple imperative language
Slides of the lecture
(printable version),
abstract syntax tree for the example
Code of the interpreter
(solutions)
-
Lecture 6-7: Data types, vectors and matrices in the interpreter
Slides of the lecture
(printable version)
Code of the interpreter
(solution with array,
solution with array and without warnings)
-
Lecture 8: Scope and subprograms
Slides of the lecture
(printable version)
-
Lecture 9: Scope and subprograms in the interpreter
Slides of the lecture
(printable version)
Code of the interpreter
-
Lecture 10: Compiler
Slides of the lecture
(printable version)
Code of the compiler
- Lecture 11: Intermediate code and array in compiler
Slides of the lecture
(printable version)
Code of the compiler with checked semantics of the write command.
- Lecture 12: Subprograms in compiler, Exercises on the extension of compiler
Slides of the lecture
(printable version)
Code of the compiler
- Lecture 13: Target code
Slides of the lecture
(printable version)
Code of the compiler
- Lecture 14: Exercises on the extension of compiler
Slides of the lecture
(printable version)
- Lecture 15: Exercises on the extension of compiler, Revisit Interpreter
Slides of the lecture
(printable version)
Code of the compiler with readInt, readFloat commands
- Lecture 16: Exercises on the extension of interpreter and compiler
Slides of the lecture
(printable version)
Code of the interpreter with "for each" command
Useful tutorials:
Contact info:
Nataliia Bielova