Computer Science
Language Implementation
COMPSCI 330 S1 C
Click on the appropriate entry for information
Lectures Tue 8, Wed 8, Fri 9 (PLT2).
Test Date
Thursday 5th April 18:20-20:00
MLT1 | Surname A-Z |
---|
Enter 18:20, Start Writing 18:30
Regular Tutorials
Wed 9 GTL (Ground floor tutorial laboratory)
Special Examination Preparation Tutorials
1pm Mon 18th June, 1pm Tue 19th June, 1pm Wed 20th June, 1pm Thu 21st June, GTL (Ground floor tutorial laboratory)
Assignment due dates and bonus/penalty information is available in the introductory handout (pdf, word)
Reasons for taking Computer Science 330
Computer languages provide the main way in which computer programmers tell the computer what tasks to perform. Having an understanding how computer languages are specified, what they mean, and how they are implemented, is fundamental to computer science.
As a programmer, you spend a lot of time interacting with compilers. Understanding how a compiler works means you have a much better understanding of what the compiler error messages mean. You can debug your programs more rapidly.
Having an accurate model for the compile time and run time data structures gives you a much better understanding of the computer language you use to write your programs. Your understanding of such topics as scope, mapping of identifiers to declarations, recursion, extending classes, overriding and overloading of methods, etc, becomes much clearer, with a corresponding increase in productivity.
Many programs involve the processing of input, and building of data structures to represent the input. For example, a spreadsheet program has to lexically analyse and parse the input in each cell. Simple programs are often generated by software, rather than people. The output from one program might need to be processed by another program. For example, a user might respond to an HTML web page, and generate a request that gets converted into an SQL query, and the reply from this might need to be converted back into HTML. Similarly, many programs involve the reformatting of text. The tools used by compiler writers to implement lexical analysis and parsing can also be used in the development of such programs. Knowing how to use these tools can have an enormous effect on your productivity - perhaps a program can be developed in 10% of the time it would take without the use of these tools. I often use JLex and CUP to extract or reformat data from text files, that have nothing to do with computer languages. The generation of programs by treewalking data structures also has a lot in common with the generation of code by a compiler.
If you intend to be a programmer, you find most of your time is spent making small changes to large programs written by others. You have to make the changes in a manner that is consistent with the existing program. You have to design and build sophisticated data structures, and perform recursive treewalks of the data structures, to analyse and collect information. You have to create symbol tables, and search for information based on various keys and environments. All of these tasks are performed when writing compilers. The assignments in this course give you good practice in these tasks. The material in this course thus has direct practical application.
-
Related Programmes