COMP 3031 - Fall 2012
Mo 15:00-15:50, Rm 4214 (Lift 19)
Lab 2B Tu 17:00-17:50, Rm 4214 (Lift 19)
Lab 2C M 12:00-12:50, Rm 4214 (Lift 19)
The TAs are Ms Shirley JIANG Xiaonan, Ms LI Zhaohua, and Mr Karteek
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/.
2012.10.06 The due date for A2
will be Oct 21. If you've already finished A1, you can go ahead and
2012.09.19 The due date for A1 is extended to Sep 30 (or, for students who registered at lecture on Sep 28, is extended to Oct 7).
2012.09.12 Welcome to COMP3031! Labs will begin 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.
Course home page is at http://www.cs.ust.hk/~dekai/3031/.
Lab info is at http://course.cs.ust.hk/comp3031/L2/.
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
- Thinking in C++, Volume One: Introduction to Standard C++ (2nd Edition), by Bruce ECKEL. Prentice-Hall, 2000. ISBN: 0-13-979809-9.
- Thinking in C++, Volume Two: Practical Programming, by Bruce ECKEL and Chuck ALLISON. Prentice-Hall, 2004. ISBN: 0-13-035313-2.
- Structure and Interpretation of Computer Programs (2nd
edition), by Harold ABELSON and Gerald Jay
SUSSMAN, with Julie SUSSMAN. MIT Press,
1984. ISBN: 0-262-01077-1.
Full text and code are available online at no cost for both Thinking in C++ volumes at http://www.BruceEckel.com.
An official Hong Kong mirror site for fast downloading is at http://www.cs.ust.hk/~dekai/library/ECKEL_Bruce/.
Full text and code are available online at no cost for the Scheme book (Structure and Interpretation of Computer Programs) at http://mitpress.mit.edu/sicp/.
- Programming in C++: Lessons and Applications, by Timothy B. D'ORAZIO . McGraw Hill, 2003. ISBN: 978-0072424126. Your COMP 104 textbook.
- The C++ Programming Language (3rd Edition), by Bjarne STROUSTRUP. Addison-Wesley, 1997. ISBN: 0-201-88954-4. This classic reference (by the designer of C++) is a must-have for every serious C++ programmer, covering details often omitted in textbooks.
- C++ Primer (4th Edition), by Stanley B. LIPPMAN and Josee LaJOIE. Addison-Wesley, 2005. ISBN: 978-0201721485. This traditional text can be used as a first book for learning C++ but assumes that the reader is familiar with programming, and more insightful textbooks have now appeared since it was first written.
- Problem Solving with C++: The Object of Programming (6th Edition), Walter SAVITCH. Addison-Wesley, 2006. ISBN: 978-0321412690. This book gives an introduction to C++ and introduces basic programming techniques.
- C++: Effective Object-Oriented Software Construction: Concepts, Principles, Industrial Strategies, and Practices (2nd Edition), by Kayshav DATTATRI. Prentice Hall, 1999. ISBN: 978-0130867698. This book is good provided that you are fluent with C++ and it emphasizes more on the design, programming techniques, and why C++ is designed as it is now.
- Programming Languages: Concepts and Constructs (2nd Edition), by Ravi SETHI. Addison-Wesley, 1996.
- Elements of ML Programming (2nd Edition), by Jeffrey D. ULLMAN. Prentice-Hall, 1998. ISBN: 0-13-790387-1.
- Programming in Prolog (5th Edition), by William F. CLOCKSIN and Christopher S. MELLISH. Springer-Verlag, 2003. ISBN: 3-54-000678-8.
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.
Warning: sophisticated plagiarism detection systems are in operation!
CollaborationYou 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.
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.|
Your grade will be determined by a combination of factors:
ExaminationsNo 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%.
Software engineering is about communication between people. Good participation in class and/or the online forum will count for approximately 5%.
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%.
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%.
|Date||Wk||Event||Paradigm||Topic Notes||Additional Reading||Assignments||Optional
||Tool users vs. tool builders: How
programming languages differ
Administrivia (honor statement, HKUST classroom conduct)
Perils of JavaSchools, Bjarne
Stroustrup on Educating Software Developers [extra/review:
||Scheme||Review on References, Const||Due date extended to Sep 30 (or, for students who
registered at lecture Sep 28, extended to Oct 7)
||Functional / SwEngr
||Scheme: s-expressions, cons pairs & linked lists, proper encapsulation|
||Functional / SwEngr||Scheme: parsing
of expressions, evaluation
||Functional / SwEngr||Scheme: cons cells / tagged unions|
||Functional / SwEngr||Scheme:
Intensive coding session, recursion for printing &
||Due date Oct 21
||Dynamic OO / SwEngr
||Dynamic OO / SwEngr||Polymorphism|
||Scheme: functions as values / currying / lambda calculus|
||Functional / Dynamic OO
||Review on Virtual
||Scheme: map & reduce / let||Due date Oct 28
||Functional / Procedural
||Scheme: equality / side
||Due date Nov 7
||Scheme: Scope / implementing lambda, Designing functional programs using recursion||Due date Nov 1
||Functional / Procedural||Scope and parameter passing, activation records|
||Functional / Procedural
||Scope and parameter passing, activation records|
||Midterm 19:00-21:00, LTJ|
||(rescheduled to Nov 2 eve midterm)
||Language Description: Syntax and Grammars|
||Language Description: Syntax and Grammars||Due date Nov 27
||Lex (GNU Flex)||Bison user manual, FLEX and BISON on WIN32 platform|
||Yacc (GNU Bison)|
|2011.11.28||12||Lecture||Parsing||Yacc (GNU Bison)|
||ML and Type Inference|
||ML and Type Inference|
||ML and Type Inference||The
Stupidity of Computers, International
Workshop on Spoken Language Translation
||Final 12:30-15:30, Sports Hall Lobby
Last updated: 2012.12.07