COMP 3031 - Fall 2011

Fall 2011, COMP 3031 Principles of Programming Languages [3 units]
Lecture 2, MW 10:30-11:50, Rm 2407 (Lift 17-18)
Prof. Dekai WU, Rm 3539, 2358-6989, dekai@cs.ust.hk

Lab 2A TA: GU Liyi, Fr 16:30-17:20, Rm 4214 (Lift 19), lgu@cs.ust.hk
Lab 2B TA: Karteek ADDANKI, W 15:00-15:50, Rm 4214 (Lift 19), vskaddanki@cs.ust.hk
Lab 2C TA: Jackie LO Chi-kiu, M 12:30-13:20, Rm 4214 (Lift 19), jackielo@cs.ust.hk

You are welcome to knock on the door of the instructor any time. The TAs' office hours are posted at http://course.cs.ust.hk/comp3031/L2/.

ANNOUNCEMENTS

Welcome to COMP3031! Labs will begin Fri 16 Feb, in Week 2.

Always check the Discussion Forum for up-to-the-minute announcements.

Discussion forum is at http://comp151.cse.ust.hk/~dekai/content/?q=forum/2. Always read before asking/posting/emailing your question. This forum is based on modern, powerful software, instead of using the old clunky ITSC newsgroup.
Course home page is at http://www.cs.ust.hk/~dekai/3031/.
Lab info is at http://course.cs.ust.hk/comp3031/L2/.

ORIENTATION

Welcome to COMP 3031, which takes over where COMP 2021 (previously 152 or 151/171) left off. This course is designed to give you the solid software engineering experience necessary to build, extend, and maintain a realistically sized non-toy program, using both traditional and up-to-date techniques that you will need on the job. Most students find that C++ and other modern languages offer a huge, confusing variety of different and often-contradictory complexities. In this sequence you will untangle the confusion by gaining an enhanced holistic theoretical perspective, comparing and contrasting the most important paradigms of programming languages.

Understand by doing. The only way to learn languages is through serious practice. The only way to appreciate software engineering is to engineer some serious software. And by far the best way to understand programming languages is to implement one.

So, through an integrated series of programming assignments, you will use C++ to gradually implement your own complete interpreter for a real programming language that is a small but fully operational version of Scheme (or Lisp).

You will learn the most important procedural, static and dynamic object-oriented, and generic programming paradigms of C++ programming, through hands-on practice with building the basic pieces of your Scheme interpreter. The Scheme programming project will help deepen the C++ concepts you have learned, by giving you a better understanding of the functional and generic programming roots and foundations that underlie the design and effective use of STL in the C++ Standard Library. We will also learn about the syntactic description and analysis of programming languages, and their runtime environments. Toward the end we will extend our learning to logic programming, which is a powerful paradigm that has yet to become widely exploited in typical C++ environments. Throughout the entire series, you will focus on developing adequate software engineering habits, so that you can continue to build, extend, and maintain the code you have built so far.

Academic Calendar Description

3031. Comparative studies of programming languages, programming language concepts and constructs. Non-imperative programming paradigms: object-oriented, functional, logic, concurrent programming. Basic concepts of program translation and interpretation. Storage allocation and run-time organization. Prerequisite: COMP 2021/2021H; or (prior to 2009-10) COMP 151/151H and COMP171/171H

TEXTBOOKS

Reference Books

HONOR POLICY

To receive a passing grade, you are required to sign an honor statement acknowledging that you understand and will uphold all policies on plagiarism and collaboration.

Plagiarism

All materials submitted for grading must be your own work. You are advised against being involved in any form of copying (either copying other people's work or allowing others to copy yours). If you are found to be involved in an incident of plagiarism, you will receive a failing grade for the course and the incident will be reported for appropriate disciplinary actions.

University policy requires that students who cheat more than once be expelled. Please review the cheating topic from your UST Student Orientation.

Warning: sophisticated plagiarism detection systems are in operation!

Collaboration

You are encouraged to collaborate in study groups. However, you must write up solutions on your own. You must also acknowledge your collaborators in the write-up for each problem, whether or not they are classmates. Other cases will be dealt with as plagiarism.

GRADING

The course will be graded on a curve, but no matter what the curve is, I guarantee you the following.

If you achieve 85% you will receive at least a A grade.
75% B
65% C
55% D

Your grade will be determined by a combination of factors:

Midterm exam ~20%
Final exam ~25%
Participation ~5%
Homework ~40%
Labs ~10%

Examinations

No reading material is allowed during the examinations. No make-ups will be given unless prior approval is granted by the instructor, or you are in unfavorable medical condition with physician's documentation on the day of the examination. In addition, being absent at the final examination results in automatic failure of the course according to university regulations, unless prior approval is obtained from the department head.

There will be one midterm worth approximately 20%, and one final exam worth approximately 25%.

Participation

Software engineering is about communication between people. Good participation in class and/or the online forum will count for approximately 5%.

Assignments

All programming assignments must be submitted by 23:00 on the due date. C++ programming assignments must be compiled using g++ on Unix and will be collected electronically using the automated CASS assignment collection system. Late assignments cannot be accepted. Sorry, in the interest of fairness, exceptions cannot be made.

Programming assignments will account for a total of approximately 40%.

Labs

All information for laboratory assignments is at http://course.cs.ust.hk/comp3031/L2/.

Laboratory assignments will be due Monday of the week after they are announced at 23:00. Laboratory/tutorial assignments must be in C++ on Unix and will be collected electronically using the automated CASS assignment collection system. Late assignments cannot be accepted. Sorry, in the interest of fairness, exceptions cannot be made.

You will also have the option to turn in your laboratory/tutorial assignments in lab by demonstrating to the TA. This will also give you an opportunity to get an early indication of whether your assignment is correct. If not, you may still decide to fix it, and then wait until the Monday 23:00 CASS collection to turn in your assignment.

There will be up to 10 laboratory/tutorial assignments, which in total will count for approximately 10%.

SCHEDULE

Date Wk Event Paradigm Topic Notes Reading Assignments
 
2011.09.05 1 Lecture Administrivia (honor statement, HKUST classroom conduct) Business Week, The Perils of JavaSchools, Bjarne Stroustrup on Educating Software Developers, V1.Ch3,
V1.Ch8
2011.09.07 1 Lecture Functional S-expressions; parsing vs. evaluating expressions
2011.09.12 2 Lecture SwEngr Doxygen
2011.09.14 2 Lecture Functional Encapsulation; cons lists
2011.09.19 3 Lecture Functional Emacs
2011.09.21 3 Lecture Procedural Review on References, Const
2011.09.26 4 Lecture Procedural Tagged unions; evaluation
2011.09.28 4 Lecture SwEngr How programming languages differ
2011.10.03 5 Lecture Procedural Assignment 1
2011.10.04 5 A1 due
2011.10.05 5 Holiday Chung Yeung Festival
2011.10.10 6 Lecture Dynamic OO Polymorphism
2011.10.12 6 Lecture Procedural Scope and parameter passing, activation records
2011.10.17 7 Lecture Functional Symbol binding A2 due
2011.10.24 8 Lecture A3 due
2011.10.25 8 Exam Midterm 19:00-21:00, LTJ
2011.10.31 9 Lecture Functional Lambda
2011.11.07 10 Lecture Functional Recursive programming in Scheme A4 due
2011.11.14 11 Lecture Functional Scheme
2011.11.16 11 Lecture Functional Scheme (cont'd)
2011.11.21 12 Lecture Syntax Language Description: Syntax and Grammars A5 due
2011.11.23 12 Lecture Syntax Language Description: Syntax and Grammars (cont'd)
2011.11.28 13 Lecture Syntax Yacc (GNU Bison) Bison user manual, FLEX and BISON on WIN32 platform
2011.12.05 14 Lecture Functional ML and Type Inference
2011.12.07 14 Lecture Functional ML and Type Inference (cont'd) A6 due
2011.12.09 14 Lecture Logic Prolog and Logic Programming
2011.12.21 15 Exam Final 08:30-11:30, Sports Hall Lobby


dekai@cs.ust.hk
Last updated: 2011.12.09