CSE3322 Programming Languages and Implementation
Handbook entry
1.1. Prerequisite knowledge
- Advanced C programming including recursion
- Elementary data structures including lists and binary trees
- Familiarity with an object-oriented programming language
- Deterministic and non-determinstic finite state automata
- Context-free grammars
Completion of CSE2303 or CSC2030, CSE2304 or CSC2040, and CSE2305 or CSC2050 or equivalent subjects.
1.2. Relationship to following subjects
Not available
.
1.3.Prescribed texts and software
There are no prescribed texts. Students will need to use SML/NJ,
flex and bison.
You can download SML from the
SML/NJ website
1.4. Recommended references
- J.D. Ullman. Elements of ML Programming (2nd Ed.).
Prentice Hall, 1998.
- D. Watt. Programming Language Concepts and Paradigms.
Prentice Hall, 1990.
- A. Aho, R. Sethi and J. Ullman. Compilers: Principles,
Techniques and Tools. Addison-Wesley, 1986.
Additional reading
- M. Felleisen and D. Friedman. The Little MLer.. MIT Press,
1997.
- L.C. Paulson. ML for the Working Programmer (2nd Ed.). Cambridge
University Press, 1996.
- T.W.Pratt and M.V. Zelkowitz. Programming Languages: Design and
Implementation (4th Ed). Prentice Hall, 2001.
- J.C. Mitchell. Concepts in Programming Languages. Cambridge
University Press, 2003.
- R. Sethi. Programming Languages: Concepts and Constructs.
Addison-Wesley, 1989.
- R. Wilhelm and D. Maurer. Compiler Design.
Addison-Wesley, 1995.
1.5. Computing and Laboratory Requirements for the
Subject
Students need access to a laboratory running SML/NJ, flex and bison
1.6. Subject structure and organisation
Clayton Campus
There are two lectures each week which will present the main topics in
the unit. They are held in S-7 on Tuesday at 4:00pm and on Friday at 2:00pm in S-3.
There are also non-compulsory tutorial classes. These
are held every fortnight starting in the second week of semester.
- Tuesday 12:00 noon Rm 109 Blg 19
- Thursday 1:00 pm Rm G13 Blg 19
- Friday 12:00 noon Rm G13 Blg 19
These will review lecture material and provide answers to selected homework
questions.
Malaysia Campus
To be completed.
1.6.1. Subject structure by Topic
We will:
Overview the programming language landscape and
the four major language paradigms
--procedural, object-oriented, functional and logic--
and examine functional programming in detail;
Discuss implementation of programming languages
and compiler-generation
tools, such as flex and bison, which facilitate this process.
1.6.1.
Subject structure by Lecture
Lectures will cover the following:
- Programming language history, concepts and issues (5 lectures);
- Overview and motivation for unit; Brief history of programming
languages.
- Variables: Lifetime; Garbage Collection; Binding mechanisms; Scope
- Types and type systems: Subtypes; Kinds of Polymorphism; Coercion; Checking
and Inference
- Abstraction mechanisms: Procedural abstraction including parameter passing
mechanisms; Abstract data types; Modules; Objects
- Main programming paradigms: Imperative,
Object-oriented; Functional; Logic; Possible new
paradigms--DNA computing.
- The functional programming language, ML (9 lectures)
- Introduction to ML; Arithmetic and Boolean types; Functions
- Characters and strings; Built-in coercion functions; Lists
- Tuples; Pattern-matching
- Matches; Simple Output; Exceptions; Polymorphism
- Type definitions; Datatype definitions
- Higher-order functions; Currying
- Records; Structures; Signatures; Functors; Abstract types
- Built-in libraries; Input/Output; Destructive update of value bindings;
Review the functional programming paradigm.
- Review of ML: Homework answers and assignments
- Implementation of programming languages (10 lectures).
- Overview of programming language implementation: Interpretation vs
compilation; Main phases in a compiler; Virtual/abstract machines.
- Lexical analysis: Regular expressions; Converting NFA to DFA; DFA minimisation;
flex.
- Syntax analysis I: Context-free grammars; Top down vs bottom up
parsing; Recursive descent
parsing; Left-recursion removal and left-factoring
- Syntax analysis II: Table-driven predictive parsing; First and
Follow sets; Construction of table; LL(1) grammars
- Syntax analysis III: Table-driven bottom-up parsing; LR parsing;
bison
- Syntax analysis IV: Construction of SLR parsing table;
Understanding conflicts in bison
- Syntax analysis V: Generic bottom-up parsing--The CKY algorithm;
Chomsky Normal Form (CNF); Conversion into CNF; Assignment
- Semantic analysis I: Attribute grammars
- Semantic analysis II: Type inference; Common program optimisations
- Code generation: Run-time system; Intermediate code; Abstract
machine; Code selection Register allocation; Compilation of object-oriented languages.
In addition there will be two revision lectures.
1.7. Study materials
We provide:
Lecture notes are also available:
1.8. Assessment
The assignments (30% weighting) and a
three hour examination (70% weighting)
will be used to assess whether you have achieved the
objectives of this subject.
-
Three assignments (total
assessment value 30%)
Assignment 1, Value 5%,
Due 12 noon Saturday 16 August, (Basic ML Programming)
Assignment 2, Value 10%,
Due 12 noon Friday 12 September, (Advanced ML Programming)
Assignment 3, Value 15%,
Due 12 noon Friday 17 October, (Writing a compiler for a small
language).
Assignments should be received on or before the due
date and time. Late submissions will be penalised at the rate of
5% per day penalty rate. They will not be accepted more than one week after the due date. If you believe that
your assignment will be delayed because of circumstances
beyond your control such as illness you should apply for
an extension before the due date. Medical
certificates or certification supporting your
application may be required.
-
A "closed book" examination, 3 hours, (assessment
value 70%).
It is perhaps necessary to point out what should be
obvious, namely that the examination will test to see
whether you have met the objectives listed at the start of
each of the Study Guides.
1.9. Plagiarism
It is important that your solutions to the assignment
questions be your own work. It is perfectly acceptable to seek
help and advice when completing the assignments, but this must
not be taken to the point where what is submitted is in part
someone else's work.
Please note that, since the assignments are used in assessing
your final grade in this subject, the following Faculty policy applies.
"Students should note that cheating is regarded as a very
serious offence which is likely to lead not only to failure
in the subject concerned but also to additional penalties
including exclusion. Students should carefully note that
the taking of any unauthorised material into examinations
such as notes and unauthorised dictionaries will be regarded
as cheating. Students should also note that essays,
assignments and other work are generally understood to be
the student's own work and where such work is identical
with, or similar to, another student's work, an assumption
of cheating may arise. Where students wish to undertake work
in conjunction with other students, it is suggested that the
matter be discussed with the lecturer concerned."
Faculty of Computing and Information Technology Handbook
1.10. Communication
Clayton Campus
Your lecturer for this subject is:
Kim Marriott
If direct communication with your lecturer is needed
you may contact Kim Marriott at:
Email: Kim.Marriott@infotech.monash.edu.au
Phone: (03) 9905 5525
Fax: (03) 9905 5146
Room 147Building 75, Clayton Campus
Consultation times for this subject are
3-5pm Friday. Since Kim Marriott is part-time he will probably not be available at other times unless an
appointment has been previously arranged by email or telephone.
Consultation times for the exam are: Tuesday
28 October2-3pm, Monday 3rd November 4-5pm, Tuesday 4th November 3-5pm
For help with the programming aspects of this subject, students
are advised to attend the non-compulsory tutorial classes.
Malaysia Campus
Your lecturer for this subject is:
Tong-Ming Lim
All email communication to you from your subject
adviser assumes your student email address is read
regularly. Please arrange for your email to be forwarded
to your main address if this is not the case.
1.11. Assignment Preparation Guide
Important: Unless otherwise advised your assignment marks for CSE3322 are to be
listed on the 3rd year notice board next to your student ID. Of course
your name will not be on the list, only your ID and assignment mark. If you do not wish your
mark and student ID to appear on this list please contact your
lecturer for the subject by Tuesday 2nd September to make alternative
arrangements.
1.11.1.
Assessment assignment 1: <Basic ML Programming>
Total marks: 5
Assessment value : 5%
Due date: 12 noon Saturday 16th August
Please get your assignment marked in one of the optional tutorial
classes
or if this is not possible, use /cs/cc/bin/submit to electronically submit your
assignment.
Assignment 1 Handout
1.11.2.
Assessment assignment 2: <Advanced ML Programming>
Total marks: 10
Assessment value : 10%
Due date: 12 noon Friday 12 September
Please use /cs/cc/bin/submit to electronically submit your
assignment.
Your submission must include the following declaration at the top of
submitted file. If it does not your assignment will not be marked
and you will receive 0 for the
assignment.
(* MONASH UNIVERSITY, School of Computer Science and Software Engineering
Student Declaration for CSE3322 Submission
I #YOUR NAME#, ID: #YOUR ID NUMBER# declare that this submission is
my own work and has not been copied from any other source without attribution.
I acknowledge that severe penalties exist for any copying of code without
attribution, including a mark of 0 for this assessment.
*)
Assignment 2 Handout
1.11.3.
Assessment assignment 3: <Compiler Construction>
Total marks: 10
Assessment value : 15%
Due date: 12 noon Friday 17 October
Please use /cs/cc/bin/submit to electronically submit your
assignment.
Your submission must include the following declaration at the top of
submitted file. If it does not your assignment will not be marked
and you will receive 0 for the
assignment.
(* MONASH UNIVERSITY, School of Computer Science and Software Engineering
Student Declaration for CSE3322 Submission
We #YOUR NAMES#, ID: #YOUR ID NUMBERS# declare that this submission is
our own work and has not been copied from any other source without attribution.
We acknowledge that severe penalties exist for any copying of code without
attribution, including a mark of 0 for this assessment.
*)
Assignment 3 Handout
Copyright 1999 Monash University - All Rights Reserved - Disclaimer
First published: 17/7/01,
Last Updated:
10/7/03 by
Kim Marriott
Maintained by
marriott@mail.csse.monash.edu.au