CSE3322 Programming languages and implementation - Semester 2 , 2007

Unit leader :

Geoff Webb

Lecturer(s) :

Clayton

  • Geoff Webb

Malaysia

  • Loke Kar Seng

Introduction

Welcome to CSE3322 Programming Languages and Implementation. The following guide is given so that you can have a productive semester and so that you can complete the unit successfully.

Unit synopsis

The four main programming language paradigms: imperative, functional, logic and object oriented. Example languages and their applications. The implementation of programming languages by means of interpreters and translators will be discussed. This will include parsing techniques, compiler construction and implementation techniques for language features which are paradigm specific.

Learning outcomes

Ability to use a specified programming language from a paradign other than the dominant paradigm of the course. Knowledge of the features of the main paradigms of programming languages. Knowledge of, and ability to implement, features (syntactic and semantic) of languages in the main programming paradigms.

In this subject 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.

The lectures will cover the following information:

  • Overview and motivation for unit; Brief history of programming languages (1 lecture)
  • 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
  • Programming language concepts and issues (4 lectures);
    • 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.
  • 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; Lexer tools.
    • 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.
    • Syntax analysis IV: Construction of SLR parsing table; Parser generators.
    • 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 may be one or two revision lectures.

Workload

For on campus students, workload commitments are:

  • two 1-hour lectures/week and
  • one 1-hour laboratory/fortnight
  • a minimum of 2-3 hours of personal study per lecture and 5-7 hours per laboratory in order to satisfy the reading, practical and assignment expectations.

Unit relationships

Prerequisites

Before attempting this unit you must have satisfactorily completed
  • CSE2303 or CSC2030,
  • CSE2304 or CSC2040, and
  • CSE2305 or CSC2050
, or equivalent. You should have knowledge of
  • Advanced 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 and regular expressions
  • Context-free grammars

Relationships

CSE3322 is a unit in the BCS, BSE, BSci(CS) and some double degrees.

You may not study this unit and CFR3160, CSC3220, SFT2207, SFT3207 in your degree.

Continuous improvement

Monash is committed to ‘Excellence in education' and strives for the highest possible quality in teaching and learning. To monitor how successful we are in providing quality teaching and learning Monash regularly seeks feedback from students, employers and staff. Two of the formal ways that you are invited to provide feedback are through Unit Evaluations and through Monquest Teaching Evaluations.

One of the key formal ways students have to provide feedback is through Unit Evaluation Surveys. It is Monash policy for every unit offered to be evaluated each year. Students are strongly encouraged to complete the surveys as they are an important avenue for students to "have their say". The feedback is anonymous and provides the Faculty with evidence of aspects that students are satisfied and areas for improvement.

Student Evaluations

The Faculty of IT administers the Unit Evaluation surveys online through the my.monash portal, although for some smaller classes there may be alternative evaluations conducted in class.

If you wish to view how previous students rated this unit, please go to http://www.monash.edu.au/unit-evaluation-reports/

Over the past few years the Faculty of Information Technology has made a number of improvements to its courses as a result of unit evaluation feedback. Some of these include systematic analysis and planning of unit improvements, and consistent assignment return guidelines.

Monquest Teaching Evaluation surveys may be used by some of your academic staff this semester. They are administered by the Centre for Higher Education Quality (CHEQ) and may be completed in class with a facilitator or on-line through the my.monash portal. The data provided to lecturers is completely anonymous. Monquest surveys provide academic staff with evidence of the effectiveness of their teaching and identify areas for improvement. Individual Monquest reports are confidential, however, you can see the summary results of Monquest evaluations for 2006 at http://www.adm.monash.edu.au/cheq/evaluations/monquest/profiles/index.html

Unit staff - contact details

Unit leader

Professor Geoff Webb
Professor
Phone +61 3 990 53296
Fax +61 3 990 55157

Contact hours : By appointment contact Michelle.Kinsman@infotech.monash.edu.au

Lecturer(s) :

Professor Geoff Webb
Professor
Phone +61 3 990 53296
Fax +61 3 990 55157

Contact hours : By appointment contact Michelle.Kinsman@infotech.monash.edu.au

Mr Kar Loke

Teaching and learning method

  • Interactive learning questions can be raised during the lecture at any time by requesting the lecturer's attention by a raised hand and, if necessary, a discreet cough! At times the lecturer may initiate discussion and students are expected to participate. During labs, especially, students are requested to respond to attempts to engage them in participation. Difficulties encountered outside of contact hours can be resolved via the discussion boards.
  • Self study a significant component of reading and self study is required, as a lot of the material needs to be digested over a period of time. Students are not expected to accept the material presented without question, self study and reflection are required to appreciate the concepts
  • Problem solving A significant portion of the assessment will require critical thinking, problem solving and some arithmetic. It is imperative to practice these skills by staying up to date with the practical work and extra undertaking additional practice if you feel unsure about the material. The lecturer/tutor may be able to provide you with extra practice problems if you feel they are necessary
  • Independent Experimentation (advanced students) You may benefit more from the subject if you experiment with additional languages belonging to alternative paradigms, beyond those directly examined in the unit.
  • Communication, participation and feedback

    Monash aims to provide a learning environment in which students receive a range of ongoing feedback throughout their studies. You will receive feedback on your work and progress in this unit. This may take the form of group feedback, individual feedback, peer feedback, self-comparison, verbal and written feedback, discussions (on line and in class) as well as more formal feedback related to assignment marks and grades. You are encouraged to draw on a variety of feedback to enhance your learning.

    It is essential that you take action immediately if you realise that you have a problem that is affecting your study. Semesters are short, so we can help you best if you let us know as soon as problems arise. Regardless of whether the problem is related directly to your progress in the unit, if it is likely to interfere with your progress you should discuss it with your lecturer or a Community Service counsellor as soon as possible.

    Unit Schedule

    Week Topic Key dates
    1 introduction, ML1  
    2 ML2, ML3  
    3 ML4, ML5  
    4 ML6, ML7  
    5 ML8, summary.  
    6 Concepts 1, 2,  
    7 concepts 3, 4.  
    8 Implementation 1, 2  
    9 Implementation 3, 4  
    10 Implementation 5, 6  
    Mid semester break
    11 Implementation 7, 8  
    12 Implementation 9, 10  
    13 summary.  

    Unit Resources

    Prescribed text(s) and readings

    N/A

    Recommended text(s) and readings

    Recommended Texts.

    * J.D. Ullman. Elements of ML Programming (2nd Ed.). Prentice Hall, 1998.

    * D. Watt. Programming Language Design Concepts, John Wiley, 2004.

    * A.V. Aho, R. Sethi and J.D. 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.

    Required software and/or hardware

    Current versions of:
    gcc (C, http://gcc.gnu.org/), Java (http://java.sun.com/), SML, (http://www.smlnj.org/), ghc (Haskell, http://haskell.org/haskellwiki/Implementations), Pascal (http://www.gnu-pascal.de/gpc/h-index.html).

    Software may be:

    • downloaded from see 7.3
    • purchased at academic price at good software retailers

    Equipment and consumables required or provided

    Students may use the facilities available in the computing labs. Information about computer use for students is available from the ITS Student Resource Guide in the Monash University Handbook.

    Study resources

    Study resources we will provide for your study are:

    Pdf notes and example code at http://www.csse.monash.edu.au/courseware/cse3322/ under the current year.

    Library access

    The Monash University Library site contains details about borrowing rights and catalogue searching. To learn more about the library and the various resources available, please go to http://www.lib.monash.edu.au.  Be sure to obtain a copy of the Library Guide, and if necessary, the instructions for remote access from the library website.

    Monash University Studies Online (MUSO)

    All unit and lecture materials are available through the MUSO (Monash University Studies Online) site. You can access this site by going to:

    1. a) https://muso.monash.edu.au or
    2. b) via the portal (http://my.monash.edu.au).

    Click on the Study and enrolment tab, then the MUSO hyperlink.

    In order for your MUSO unit(s) to function correctly, your computer needs to be correctly configured.

    For example :

    • MUSO supported browser
    • Supported Java runtime environment

    For more information, please visit

    http://www.monash.edu.au/muso/support/students/downloadables-student.html

    You can contact the MUSO Support by: Phone: (+61 3) 9903 1268

    For further contact information including operational hours, please visit

    http://www.monash.edu.au/muso/support/students/contact.html

    Further information can be obtained from the MUSO support site:

    http://www.monash.edu.au/muso/support/index.html

    Assessment

    Unit assessment policy

    The unit is assessed with two assignments and a three hour closed book examination. To pass the unit you must achieve no less than 50% of possible marks.

    Assignment tasks

    • Assignment Task
      Title :
      a1 (ML)
      Description :
      Weighting :
      15%
      Criteria for assessment :
      Due date :
      5:00PM Monday August 27
    • Assignment Task
      Title :
      a2 (implementation)
      Description :
      Weighting :
      15%
      Criteria for assessment :
      Due date :
      5:00PM Wednesday October 17

    Examinations

    • Examination
      Weighting :
      70%
      Length :
      3 hours
      Type ( open/closed book ) :
      closed book

    Assignment submission

    MUSO online submission and/or hardcopy as specified in the assignment specification.

    Assignment coversheets

    These can be obtained online and must be attached to all hard copy submissions.

    University and Faculty policy on assessment

    Due dates and extensions

    The due dates for the submission of assignments are given in the previous section. Please make every effort to submit work by the due dates. It is your responsibility to structure your study program around assignment deadlines, family, work and other commitments. Factors such as normal work pressures, vacations, etc. are seldom regarded as appropriate reasons for granting extensions. Students are advised to NOT assume that granting of an extension is a matter of course.

    Requests for extensions must be made to the unit lecturer at your campus at least two days before the due date. You will be asked to forward original medical certificates in cases of illness, and may be asked to provide other forms of documentation where necessary. A copy of the email or other written communication of an extension must be attached to the assignment submission.

    Late assignment

    Assignments must be received on or before the due date and time. Late submissions will be penalised at a 5% penalty per day or part thereof. They will not be accepted more than one week after the due date.

    Return dates

    Students can expect assignments to be returned within two weeks of the submission date or after receipt, whichever is later.

    Assessment for the unit as a whole is in accordance with the provisions of the Monash University Education Policy at:

    http://www.policy.monash.edu/policy-bank/academic/education/assessment/

    We will aim to have assignment results made available to you within two weeks after assignment receipt.

    Plagiarism, cheating and collusion

    Plagiarism and cheating are regarded as very serious offences. In cases where cheating  has been confirmed, students have been severely penalised, from losing all marks for an assignment, to facing disciplinary action at the Faculty level. While we would wish that all our students adhere to sound ethical conduct and honesty, I will ask you to acquaint yourself with Student Rights and Responsibilities (http://www.infotech.monash.edu.au/about/committees-groups/facboard/policies/studrights.html) and the Faculty regulations that apply to students detected cheating as these will be applied in all detected cases.

    In this University, cheating means seeking to obtain an unfair advantage in any examination or any other written or practical work to be submitted or completed by a student for assessment. It includes the use, or attempted use, of any means to gain an unfair advantage for any assessable work in the unit, where the means is contrary to the instructions for such work. 

    When you submit an individual assessment item, such as a program, a report, an essay, assignment or other piece of work, under your name you are understood to be stating that this is your own work. If a submission is identical with, or similar to, someone else's work, an assumption of cheating may arise. If you are planning on working with another student, it is acceptable to undertake research together, and discuss problems, but it is not acceptable to jointly develop or share solutions unless this is specified by your lecturer. 

    Intentionally providing students with your solutions to assignments is classified as "assisting to cheat" and students who do this may be subject to disciplinary action. You should take reasonable care that your solution is not accidentally or deliberately obtained by other students. For example, do not leave copies of your work in progress on the hard drives of shared computers, and do not show your work to other students. If you believe this may have happened, please be sure to contact your lecturer as soon as possible.

    Cheating also includes taking into an examination any material contrary to the regulations, including any bilingual dictionary, whether or not with the intention of using it to obtain an advantage.

    Plagiarism involves the false representation of another person's ideas, or findings, as your own by either copying material or paraphrasing without citing sources. It is both professional and ethical to reference clearly the ideas and information that you have used from another writer. If the source is not identified, then you have plagiarised work of the other author. Plagiarism is a form of dishonesty that is insulting to the reader and grossly unfair to your student colleagues.

    Register of counselling about plagiarism

    The university requires faculties to keep a simple and confidential register to record counselling to students about plagiarism (e.g. warnings). The register is accessible to Associate Deans Teaching (or nominees) and, where requested, students concerned have access to their own details in the register. The register is to serve as a record of counselling about the nature of plagiarism, not as a record of allegations; and no provision of appeals in relation to the register is necessary or applicable.

    Non-discriminatory language

    The Faculty of Information Technology is committed to the use of non-discriminatory language in all forms of communication. Discriminatory language is that which refers in abusive terms to gender, race, age, sexual orientation, citizenship or nationality, ethnic or language background, physical or mental ability, or political or religious views, or which stereotypes groups in an adverse manner. This is not meant to preclude or inhibit legitimate academic debate on any issue; however, the language used in such debate should be non-discriminatory and sensitive to these matters. It is important to avoid the use of discriminatory language in your communications and written work. The most common form of discriminatory language in academic work tends to be in the area of gender inclusiveness. You are, therefore, requested to check for this and to ensure your work and communications are non-discriminatory in all respects.

    Students with disabilities

    Students with disabilities that may disadvantage them in assessment should seek advice from one of the following before completing assessment tasks and examinations:

    Deferred assessment and special consideration

    Deferred assessment (not to be confused with an extension for submission of an assignment) may be granted in cases of extenuating personal circumstances such as serious personal illness or bereavement. Special consideration in the awarding of grades is also possible in some circumstances. Information and forms for Special Consideration and deferred assessment applications are available at http://www.monash.edu.au/exams/special-consideration.html. Contact the Faculty's Student Services staff at your campus for further information and advice.