RHODES UNIVERSITY

Department of Computer Science

Programming Language Translation - Computer Science 301

Welcome to the "Translators" module for Computer Science 301 in 2006. This course seems to have a reputation for being quite "heavy", but at the same time many (most?) people who have taken it in recent years will tell you that it is quite a lot of fun, and that you will learn a lot.

The course will be offered by Pat Terry over eight weeks. That means that there are just under 40 lectures, and 8 practicals. The first practical will be held in the first week.


Objectives

There are several intertwined objectives in the Translators course. You can read all about these in "SAQA-speak" on the course web-site. Essentially:


Course Overview

The following are the main topics to be discussed in the course. These may not mean a lot at this stage, but hopefully will do so very soon:

Systems programs and translators - an overview
General structure of translators
Interpretive translation
Bootstrapping - getting the process started
Machine emulation and interpreters
Formal syntax of programming languages
Grammars
Parsing techniques
Parsers and Scanners
Syntax directed translation
Compiler generators
Attribute grammars
Translating simple high level languages
Block structure, functions and parameters


Course textbook

The prescribed text is Pat Terry's "Compiling with C# and Java", a completely revised version of "Compilers and Compiler Generators: an introduction using C++", which was used some years back. The new book is expected to have reached the shelves of UPB by now.

The "Resource Kit" referred to in the book is on the web at http://www.scifac.ru.ac.za/resourcekit/ You are welcome to browse this, of course, but the necessary components will be made available in the form of "prac kits" as the course proceeds.

A small reward (R1) is being offered for the detection of each hitherto undetected silly typographical error, and a larger reward (up to R10) for the detection of more serious errors. Please keep on the lookout for errors (it's hard to get a book 100% accurate) and claim your rewards from the author. The list of known errata is maintained at http://www.scifac.ru.ac.za/resourcekit/errata/


DP Requirements

We draw your attention at the outset to the DP requirements for the course.

Although registers will be taken during lectures, there is no formal requirement that you attend a minimum number of lectures. There is, however, a formal requirement that to earn a DP for Computer Science 301 you should reach a measurable level of performance. In particular:

Regular attendance at lectures will certainly help your chances of success in the course. And "borderline" students who just miss firsts, or just fail, but who have attended regularly will be treated more sympathetically than those who have stayed away. You have paid a lot of hard money in fees - come and get your money's worth!


Leave of absence

You are reminded that the Department does not grant "leave of absence" for sporting or social events, or for people whose travel arrangements at the start and end of term tempt them to miss classes. Since we do not have a formal requirement that you attend lectures, this gives you quite a lot of freedom. However we stress again that we require tests to be attended at the scheduled times (we do not offer "make up" tests at a student's convenience), and we require that all pracs are submitted at the due date - so if you are ill for a day or two and miss a formal practical session you are still required to make up the work by the due date. Leave of absence for medical or compassionate reasons is accommodated as discussed in the departmental handbook.


Practical arrangements

In the Translators module, practical work is done on a group basis. Students must work in groups of two or three - please note that 2 or 3 means that, and not some small number between 1 and 10. This year a group size of three (3) is favoured, and by the time the first practical begins you should please have decided on your groups. Take some care over this, because of the obvious problems that will arise if you choose to work with people whom you don't know, or dislike. Please resist the obvious temptation to form a group of three and then let each person try to solve one part of each prac in isolation. You must try to master all of the material in this course, not just one third of it. The group experience is an important "side-effect" of the course objectives.

IMPORTANT - ignore these rules at your peril!

If you are ever required to hand in mini-essays or discussions, these must be typed - simple ASCII will suffice for me; I do not expect glitzy word-processed documents.

The practical exercises are designed to be done over a period of a few days. Properly done like that, you should find that they reinforce the material in lectures considerably. If you don't do them properly I guarantee that the whole course will rapidly turn into a nightmare, instead of an enjoyable experience.

By this stage of your university career you should be starting to take pride in the quality of your coding - after all, in a year or two many of you may well be professional programmers. It should not be necessary to remind you to set out your code neatly, to insert proper comments, to include your name and a description of the program, and to use meaningful variable names.


Tests and Examinations

Besides formal full-period tests there will be short tests at the start of most practicals on the work covered during the previous practical exercises. Thus it is important that you make an effort really to understand your practicals.

There is a final three-hour examination for this course, which counts for 2/3 of the CSC 301 credit. Traditionally - over the last twelve years - of the 180 marks allotted to this examination, something like 80 - 90 have been devoted to a single, practically oriented question which has been revealed to the class 24 hours before the examination proper. During this 24 hour period students have been allowed and encouraged to cooperate in developing a quality solution to the question. However, they have not been allowed to take any notes into the examination itself. During the formal examination they have been allowed access to computers and to most software used in the course.

There is currently some debate how best to use this form of examination, because in recent years there has been too much syndication of solutions. So this year things may be presented somewhat differently, but you will be kept informed as the course proceeds.

You are reminded that there are no supplementary examinations for Computer Science 3 courses. If you fail either CSC 301 or CSC 302, but achieve an average mark over 50%, then provided you have achieved at least 40% for the semester that you failed, you can obtain an "aggregated" pass. Note that this concession only applies when both CSC 301 and CSC 302 are taken in the course of one calendar year.


Cheating

Unfortunately, every year there are students stupid enough to try to cheat, steal other students' practicals, and so on. In the worst cases I have even seen stolen copies of my own model solutions submitted, but if there is one thing I can recognise it is my own work! In this course you are encouraged - even required - to work together. However, all names of people who have contributed to a prac submission solution must appear in proper comments at the top of all programs finally submitted, and appear on the cover page.

You are hereby warned that cheating is easily detected, and will be severely punished. A first offence will mean that all parties will simply get a mark of zero, be marked as having missed the practical in question and reported to the Senate Committee on plagiarism. If you are caught cheating again either in this course or in another, then the Department is require in terms of the official plagiarism policy to take the matter up with a committee who can impose really severe penalties such as exclusion, loss of DP and so on. Just don't be stupid!


Backup and support

As mentioned earlier, this is known as a "heavy" course. It is important that you establish good work patterns early. I have tried to provide as much backup as I can. In particular:

However, you will not find


Web pages

We shall make a lot of use of the Departmental and Course WWW pages. Here are the URLS you should make a note of, and probably bookmark (we have internal links between these, of course).

CSC 301 Course page: http://www.cs.ru.ac.za/CSc301
Translators course page http://www.cs.ru.ac.za/CSc301/Translators/trans.htm
These rules: http://www.cs.ru.ac.za/CSc301/Translators/rules.htm
Plagiarism policy http://www.scifac.ru.ac.za/plag.htm
QA course description: http://www.cs.ru.ac.za/CSc301/Translators/QA.htm

We also have course-specific news groups. The one of interest is the CSC 3 News Group ru.cs.cs3. Please scan it regularly.


Software

Unlike some other courses in Computer Science, the emphasis in this one is very much dictated by the maxim "keep it as simple as possible, but no simpler". To this end, although the practical work is quite intensive, it does not stress glitzy GUI interfaces, trendy visual programming, mastery of zillions of libraries, and so on. The work is probably best done largely using simple editors, simple compiling techniques, simple ASCII files, and so on - that is, it is adequately done at a "command prompt" level. The recommended way of doing some projects will be to set up simple "batch files" of commands; this will be explained as we proceed.

Most of the prac work will be done in Java. Please take note of the following:


Home  © P.D. Terry