CS312 Overview

 

What is CS312 About?

CS312 is the third programming course in the Computer Science curriculum, following CS100 and CS211.  The primary goal of the course is to give students a firm foundation in the fundamental principles of programming and computer science.   Consequently, CS312 covers a broad set of topics including (1) alternative programming paradigms (beyond imperative and object-oriented programming), (2) key data structures and algorithms, (3) reasoning about program behavior and complexity, (4) type systems and data abstraction, and (5) the design and implementation of programming languages.  

A major goal in CS312 is to teach you how to program well.  Just about anyone can learn how to program, but it takes a deep understanding of the principles of computer science to write truly elegant and efficient programs.

We use the Standard ML (SML) programming language throughout the course.  SML is a modern functional programming language with an advanced type and module system.   The course is not about programming in SML.  Rather, SML provides a convenient framework in which we can achieve the objectives of the course.  Like the object-oriented model of Java, the functional paradigm of SML is an important programming model with which all students should be familiar, as it underlies the core of almost any high-level programming language. In addition the SML type and module systems provide frameworks for ensuring code is modular, correct, re-usable, and elegant.  Other languages, such as Java, also provide facilities to achieve these goals, but the mechanisms of SML are largely orthogonal to those of object-oriented languages.  By studying alternatives, students will be better equipped to use, implement or even design future programming environments that combine the best features of both worlds. 

Another important reason we use SML is that it has a relatively clean and simple model that makes it easier to reason about the correctness of programs.  Indeed, SML was one of the first major programming languages to have a formal semantic definition.   In our studies, we will reason not only about the functional correctness of code, but also the space, time, and other resources used in a computation.  The relatively simple evaluation model for SML makes it easy to do this.

Reaching Us

The best way to reach the course staff is by posting questions or comments to the CS312 newsgroup cornell.class.cs312. We will try to respond to questions within one working day. You should read the course policies for the newsgroup, which also provides more information about logging into the newsgroup. Students must follow these policies to receive assistance from the course staff.

You can also reach the course staff by sending email to cs312@cs.cornell.edu.  Read these guidelines before emailing.

Who We Are

When We Meet

Lectures: Tuesdays and Thursdays

10:10-11:00 in Upson B17

Sections: Mondays and Wednesdays, you need not attend the same timeslot on both days; nor do you need to add/drop to attend the section of your choice.

12:20pm-1:10pm in Hollister B14  (Brandon)
2:30pm-3:20pm in Hollister 306    (Jeff and Emmanuel)
3:35pm-4:25pm in Hollister 306    (Jeff and Emmanuel on Monday, Brandon on Wednesday)
7:30pm-8:20pm in Hollister 306    (Dan and Yanling)

Office Hours

Office hours are held in Upson 304A from 7-10pm, unless otherwise noted. The night before every project is due, we will hold extended consulting hours from 7pm to 12 midnight. Office hours will not be held the day the problem sets are due, nor the day after. The schedule is as follows:

Sunday 7-10pm
Monday 7-10pm
Tuesday 7-10pm
Wednesday 7-10pm
Thursday 7-10pm

Greg Monday 3:00pm-5:00pm in Upson 4133
Brandon TBA
Daniel TBA
Jeff TBA
Tomi TBA
Yanling TBA
Clive Sunday Consulting
Hubert Sunday Consulting
Ben Monday Consulting
Dave Monday Consulting
Pete Tuesday Consulting
Carson Tuesday Consulting
Emmanuel Wednesday Consulting
Jed Wednesday Consulting
Niranjan Thursday Consulting
Walter Thursday Consulting
DLN TBA

Course Materials

The textbook for the course is:

Though we won't be working from the book directly, it is an invaluable reference for SML.  A convenient online source that we will be using from time to time is:

The campus bookstore should have copies of the book.  In addition, there are many resources on the Web for Standard ML, including tutorials, free compilers, libraries, etc.

We will be using the Standard ML of New Jersey (SML/NJ version 110) compiler, interactive system, libraries, and tools for all examples and homeworks.  SML/NJ is a freely available (open source) development system brought to you from Lucent's Bell Labs -- the same place that developed C, Unix, Plan9, etc.   SML/NJ runs under Win32 systems and just about any flavor of Unix.   Sadly, there is no support for the Macintosh.  There are other SML compilers freely available, such as MoscowML which do run on the Macintosh.  However, there are subtle differences between systems, so we recommend that you use SML/NJ if possible.  In particular, we will be using SML/NJ's make system (called the Compilation Manager or CM for short) which provides a convenient way to organize programming projects and to build large systems. 

Course Requirements

Students are responsible for all material in the assigned readings, as well as material covered in lectures and in recitations. There will be six problem sets, two preliminary exams, and a final exam.  Each problem set will include written exercises and a programming assignment.  Exams will cover material in class and will require you to do some heavy thinking on your feet.  All will contribute to your final grade as follows:

Problem Set 1 Due 30 January Learning ML - Part I 5%
Problem Set 2 Due 6 February Learning ML - Part II 10%
Problem Set 3 Due 20 February Big Numbers and RSA Encryption 10%
Problem Set 4 Due 13 March Graph Algorithms and Web Crawling 15%
Problem Set 5 Due 10 April Compilation and Garbage Collection 15%
Problem Set 6 Due 3 May LZ Compression 15%
Preliminary Exam I 8 March 7:30pm-9:00pm (Kimball B11/Thurston 203) 10%
Preliminary Exam II 17 April 7:30pm-9:00pm (Kimball B11/Thurston 203) 10%
Final Exam 18 May 12:00pm-2:30pm (Plant Science 233) 10%

No late assignments will be accepted, but we will generally grade assignments and return them immediately.  Assignments are submitted online.  You should try to complete the programming assignments early, as we will not accept late work. The best use of your time and the machine's time is to think about the problems before typing anything at the computer. (No matter how many times we say this, it takes a long time to sink in: think before typing.)

Make ups for the Preliminary or Final exams must be scheduled within two weeks of the start of class.  Check now to see if you have a conflict with another class and contact Professor Morrisett immediately to reschedule.  Make-up exams in CS312 will be oral.

Policy on Joint Work

Short answer: You must pair up for problem sets when required, otherwise assignments are to be done individually.

Much of the learning in this course comes from doing the programming problems. You may (and in fact we encourage you to) work jointly with one other person on the problem sets. No more than two people should work together. If you work with someone else, you must submit a single joint assignment with both names on it. Under no circumstances may you hand in work done with (or by) someone else under your own name. If in doubt, credit the person(s) from whom you got help. Your code should never be shared with anyone other than your partner. You would be amazed at how easy it is to tell when people work together on problem sets (we have automated tools to do this), so please don't make life unpleasant for all of us by breaking these rules. The penalties for cheating at Cornell are severe, and include expulsion; see the CS Department's Code of Academic Integrity. If you are unsure about anything, please ask.

Public Lab Facilities

CIT and various colleges on campus provide public Macintosh and PC facilities. We have only installed SML/NJ on the Windows machines. You may use your own machine or the public ones. If you are interested in installing SML/NJ or MoscowML on your own machine, then see the course software page for details. The CS department does not provide computer facilities for this course.  This means that students from other courses have priority in the CSUG lab.