RHODES UNIVERSITY

Department of Computer Science

Programming Language Translation - Computer Science 301

Welcome to the "Translators" module for Computer Science 301 in 2001. 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; there are also 8 weeks in which formal practical sessions are held (the first practical sessions start in the first week).


Objectives

There are several intertwined objectives in the Translators course.


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:


Course textbook

The prescribed text is Pat Terry's "Compilers and Compiler Generators: an introduction using C++". This was published by International Thomson in 1997, but has now gone out of print. Since I hold the copyright, I have been able to produce copies locally. You should please sign for and obtain a copy from the Departmental Office as soon as possible. The locally produced copy is as close to a verbatim copy of the "official" one as possible (it possible has fewer misprints, actually). The published book came out with a diskette containing all the sources for the programs in the book. These are now all available on the Departmental Server for copying, if you want them.

The book is also freely available on the Web in various formats for reading or downloading.


DP Requirements

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

Although registers may be taken from time to time 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:


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 in the short term 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 three or four - please note that 3 or 4 means that, and not some small number less than 10. By the time the first practical begins you should please have decided on these 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.

Listings of your programs, properly headed, must be placed in the hand-in box in the Secretaries' Office before the start of your next practical session on Thursday/Friday, packaged in plastic sleeves, cover sheets ....

I also want copies of your programs - source and executables, where appropriate - in the root directory of a stiffy diskette. Please make sure that all files and listings have your names imbedded in them (in comments).

Printing of files to be submitted should please be done by using the LPRINT or DPRINT utilities in the Braae lab. These will print listings of the files with line numbers added, in a small font that allows for wide lines to be read easily.

As the one who has to read your submissions, I stress that it makes an enormous difference to get nice readable solutions. 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 two 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. Of the 180 marks allotted to this examination, something like 70 - 80 will be devoted to a single, practically oriented question which is revealed to the class 24 hours before the examination proper. During this 24 hour period you are allowed and encouraged to cooperate in developing a quality solution to the question; however you are not allowed to take any notes into the examination itself. During the examination you are allowed access to computers and to most of the software used during the course. This will be explained in more detail closer to the time.

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 at the top of all programs finally submitted and on the cover slip.

You are warned that cheating is easily detected, and will be severely punished. At best all parties will simply get a mark of zero, and be marked as having missed the practical in question. If you are caught at it again, then disciplinary action will follow.


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:


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).

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 "DOS prompt" level. The recommended way of compiling your C++ projects will be to use a "make file".

You have a choice of doing most of the prac work in C++, or, if you are happier with those languages, Pascal or even Modula-2.

Please take note of the following: