• Home
  • About
  • Mobile
  • Open Content
  • Search

Module Overview


  • Description
  • Facilitators
  • Weblinks
  • Timetable
CS4212 

COMPILER DESIGN
   2012/2013, Semester 1
   School of Computing (Computer Science)
Modular Credits: 4
  Tags: --

Description

TopThe objective of this module is to introduce the principal ideas behind program compilation, and discuss various techniques for program parsing, program analysis, program optimization, and run-time organization required for program execution. Topics covered include regular expressions, context-free grammars, lexical analysis, syntax analysis; different algorithms for parsing, such as top-down parsing, and bottom-up parsing; translation to abstract syntax using modern parser generator technology, intermediate representation, semantic analysis, type system, code generation, code optimization, data-flow analysis, and instruction scheduling.

Prerequisites: cs2104 - Programming Languages Concepts

Workload

TopLecture : 2 h/week

Tutorial: 1 h/week

Homework: 3 h/week (unscheduled)

Preparatory work: 3 h/week (indpendent work)

Schedule and Materials

TopAll scheduling of weekly lectures and tutorials, and the corresponding materials, shall be available via the "Lesson Plan" link.

All materials will be available in the course workbin, and will be mirrored at http://www.comp.nus.edu.sg/~razvan/cs4212.

Homework submission will be handled via the IVLE workbin.

Assessment

TopThree Layers of Skill and Knowledge

Each topic in this module will be annotated as either Basic [B], Core [C], or Advanced [A], roughly indicating the level of difficulty in comprehending the respective topic. This categorization is meant to help students plan their efforts in achieving their grade objective. This annotation scheme will also be applied to final exam questions, with the following guidelines:
  • Answering perfectly all  the questions marked as Basic [B], without answering any core or advanced questions will guarantee a grade of B-.
  • Answering perfectly all the questions marked as Basic [B] and Core [C], without answering any advanced questions, will guarantee a grade of A-.
  • Answering perfectly all questions will guarantee a grade of A+.
In general, students should make sure that they understand basic topics very well before progressing to the core ones, which should be a further stepping stone towards the understanding of advanced topics. In studying for the exam, the difficulty level information could be used as a guideliine on what to spend more time focussing on.
  • For instance, suppose your grade objective is B+. Then, you should feel free to skip some of the advanced topics, but focus more thoroughly on the basic and core ones.
  • Or, let's say that your grade objective is B-. Then, you should feel free to skip all advanced topics, and maybe some of the core ones, but focus thoroughly on the basic topics.

Assessment has two components: Effort and Knowledge.


Effort: 50%
  • Homework: capped at 40%
  • Wiki participation: capped at 20%
  • Overall cap: 50%

This category of assessment rewards the effort spent in acquiring knowledge, giving learners who prefer a slower pace a fair chance to attain a grade that is ultimately reflective of their knowledge. There will be 6 homework sets, each with several problems that students may attempt. The total weightage of all the problems will be 80 marks. However, the homework marks are capped at 40. Students may choose how many solutions they want to submit. While all marks shall be recorded, in the final calculation of the continual assessment, marks in excess of 40 shall be forfeited.
Moreover, we shall build together a wiki of the module, with materials that will help you revise for the final exam. Each of you will be required to build several wiki pages about the module, and will collaborate in improving them, receiving grades on the quality of the contributed material., The lecturer will take an active role in supervising the whole process, offering feedback, and contributing material of his own. New assignments may be dished out for any student who wants to improve his score. All marks in excess of 20 will be forfeited, and entered into the contest (see below). 
On top of all individual forfeitures, there is yet another general one, at 50%, for all the continual assessment items.


Contest: Since the more hardworking students are likely to have more marks forfeited, and all forfeited marks are still recorded, we shall have the following contest: " who has most marks forfeited wins!". In the last lecture, we shall publish the hierarchy of forfeited marks and the winner and the first 5 runner-ups will receive chocolate prizes!!!



Knowledge: 50%   (reward quality of knowledge acquired, rather than effort spent in acquiring it)
  • Final exam: 50% (30 NOV 2012 Morning)

The exam is open book. 

Collaboration on homework exercises

TopYou are allowed to solve your homework exercises in teams of at most 2 students. Each of the team members will earn 75% of the score awarded to their submitted solution.

Late submission policy

TopAll late submissions will incur a penalty of 1% of awarded marks for each hour or part thereof that has elapsed since the submission deadline, up to a maximum of 50 hours, after which no late submission will be accepted.

Example: if your solution deserves 5 marks, but you submitted 10 hours late, then your final marks for that submission will be 5*(1-10*0.01) = 4.5

Penalties will be computed automatically at the end of the semester, and will not be reflected in the individual homework scores reported back to students.

Software

Top
  • Prolog interpreter: http://eclipseclp.org

  • C compilers:
    • GCC (gcc.gnu.org)
    • Microsoft C compiler (available from Visual C++ Express Edition package)

  • Compiler tools:
    • yacc, lex, objdump (from GNU's binutils package)


Contact

  • IVLE Webmaster

Social Media

Latest Alerts

  • IVLE scheduled maintenance every Tuesday 0300 hrs - 0700 hrs

Centre for Instructional Technology

Legal  |  Acceptable Use Policy

Copyright © 2015, National University of Singapore. All rights reserved.