Skip to main content


CS 3110 (formerly CS 312) is the third programming course in the Computer Science curriculum, following CS 1110/1112 and CS 2110. The goal of the course is to help students become excellent programmers and software designers who can design and implement software that is elegant, efficient, and correct, and whose code can be maintained and reused.

CS 3110 covers a broad range of topics, including:

  • Alternative programming paradigms, especially functional and concurrent programming
  • Writing and using specifications
  • Modular programming and data abstraction
  • Reasoning about program correctness
  • Reasoning about system performance
  • Useful and efficient data structures

A complete listing of topics will evolve throughout the semester on the lecture notes page. Here is a (somewhat dated) diagram showing the course material and the dependencies among different parts of the course.

Functional Programming in Objective Caml (OCaml)

We use a programming language from the ML family of programming languages throughout the course: Objective Caml (OCaml). OCaml is a modern functional programming language with advanced type and module systems. However, the course is not about the OCaml language; rather, OCaml 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 OCaml 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 OCaml type and module systems provide frameworks for ensuring code is modular, correct, re-usable, and elegant. In fact, OCaml does support objects, but we will focus more on other aspects of the language. By studying alternatives to object-oriented programming, 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 OCaml is that it has a relatively clean and simple evaluation model that makes it easier to reason about the correctness of programs. 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.

Course Administration


The course website is

Announcements and Discussion Forum

We will be using Piazza for announcements and class discussion. Piazza is a web-based discussion forum for communication with classmates and the course staff. You can sign up at

You are responsible for familiarizing yourself with all announcements made on Piazza.

The staff continuously monitor the forum and will respond to questions in a timely manner. This is the most efficient method of getting help and has the added advantage that others can benefit from your question.

If you know the answer to a question, feel free to post a reply yourself, but avoid giving away any hints on the homework or posting any part of a solution. This will be considered a violation of Academic Integrity. Generally, rough algorithms or non-solution-specific code fragments are ok if you need them to illustrate a point.

Email Policy

Refrain from emailing the course staff directly. Instead, post either a public or a private question to Piazza. This is the most effective way for the course staff to manage communication in such a large course.

If you do need to contact the instructors for something confidential, send email to Please note that email is not an appropriate channel for discussion of grades—such discussions should occur in person.


We are using the course management system, CMS. Everyone who preregistered for the course is entered, but if you did not preregister, you are probably missing. Please login to and check whether you exist. There will be a list of courses you are registered for, and CS 3110 should be one of them. If not, please send your full name and Cornell NetID to the Course Administrator so that you can be registered.

You can check your grades and submit homework in CMS. There is a help page with instructions.



There is no official textbook for the course. However, here are some useful resources:

The last link contains many other resources on the Web for OCaml, including other tutorials, free compilers, libraries, etc.

If you want to buy a book, Real World OCaml (Yaron Minsky, Anil Madhavapeddy, and Jason Hickey, O'Reilly, 2013, ISBN 978-1-449-32391-2) is a good choice. Two of the three authors are Cornellians.


All handouts will be available either on the course web site or in CMS in pdf, html, or plain text format. Check often for new postings.


You are required to have an i>clicker and to bring it to class every day. You can buy an i>clicker at The Cornell Store. Cornell CIT provides technical support for i>clicker. You will need to register your i>clicker with CIT. i>clicker GO will not be enabled in this course.

Use of someone else's i>clicker, either because you forgot yours or because they cannot be there and asked you to click theirs, is a violation of the Code of Academic Integrity and will be prosecuted.

You will never be graded on whether the answers you submit by i>clicker are correct; it is part of your attendance grade.

Lectures and Sections

In the table below, LEC=lecture, DIS=recitation section, MW=Monday & Wednesday, TR=Tuesday & Thursday.

Time and Place

11218 LEC 001 TR 10:10AM - 11:00AM Olin 155 Clarkson & George
11219 DIS 201 MW 10:10AM - 11:00AM Hollister 320 Yang
11220 DIS 202 MW 2:30PM - 3:20PM Hollister 320 Biddanda & Khan
11221 DIS 203 MW 2:30PM - 3:20PM Upson 109 Han & Meng
12294 DIS 204 TR 3:35PM - 4:25PM Upson 211 Hoffecker & Tan
12694 DIS 205 MW 3:35PM - 4:25PM Hollister 320 Recto & Zhang
12695 DIS 206 MW 7:30PM - 8:20PM Hollister 320 Hanggi & Weiss
12696 DIS 207 TR 1:25PM - 2:15PM Hollister 320 Nguyen
12697 DIS 208 TR 3:35PM - 4:25PM Hollister 206 Beightol & Cheng


Attendance at lecture and section is mandatory. Attendance at lecture will be recorded by i>clickers. Section will cover new material not covered in lecture and provide an opportunity for questions on recent material, assignments, and exams. You must register for a section, but you may attend any section. However, we prefer that you select one and stay with it.


Lecture and section notes will be available on the lecture notes page.

Programming Assignments

There will be approximately six problem sets. Each problem set will involve a programming assignment and may include written exercises and optional karma problems. Posted due dates are subject to change. Assignments are due at 11:59pm on the due date.

You should start assignments early. The best use of your time is to think about the problems before typing anything at the computer.

Joint Work

Some assignments will be done in pairs or in small groups. For those assignments, you will submit a single joint assignment with all your names on it. You must form a group in CMS to do this.

Under no circumstances may you collaborate on the homework with anyone except your partner or misrepresent the authorship of your submitted work. Please see the section on Academic Integrity below.


You must submit your work online via CMS. Follow the online instructions for submitting files.

If you are working with a group, you should coordinate with your partners well in advance of the due date and time. You must register the group in CMS for each problem set. See the CMS online help for details. Only one of the partners need submit the files.

Please include the names and NetIDs (not your Cornell student id!) of all partners in all submitted files.

Please be careful to submit the correct versions of your files. We will view the excuse "I accidentally submitted the wrong version" with extreme skepticism—we have heard it countless times. We typically accept corrected versions of files only if your git repo (which will be required in all problems sets starting with PS2 PS3 [updated 2/23/15]) shows evidence of the correct version existing at the time of the deadline. To discourage abuse of this policy, we typically apply a small to moderate penalty to the problems that involve corrected files.

Late Policy

Most assignments will have a soft deadline and a hard deadline. If you submit after the soft deadline and before the hard deadline, you will automatically receive a 25% late penalty on the assignment. (An equivalent way of understanding this policy is that submitting before the soft deadline earns a bonus.) We encourage you to use this policy as a way to deal with high workloads once or twice in the semester, rather than repeatedly submitting late assignments.

CMS enables you to upload as many times as you wish before the hard deadline. Only the latest version will be graded. Note that if you upload both before and after the soft deadline, the one after the deadline will be taken, so you will be subject to the late penalty. You will not be able to submit after the hard deadline.

It is therefore critical that you submit your assignments on time. CMS tends to lag right near the deadline because so many submissions are made at the last minute, so we recommend submitting at least 15 minutes before the deadline. In this course, CMS will be configured with no grace period, so that you can best predict exactly when the deadline occurs.

Extensions will be granted only in exceptional circumstances, such as documented illness, and are handled exclusively by the instructor. Extensions will not be granted for job interviews or large workloads in other courses.


There will be two preliminary exams and a final exam. Exams will cover material from lectures, recitations, online notes, and problem sets.

The exam schedule can be found here. Makeup prelim exams are offered for students with conflicts. The makeup for a prelim is held on the same day as the prelim itself, but at 5:30–7:00 pm. No other makeup exams will be offered.

If you cannot attend a prelim because of health or family crises, or similar life events, you may ask the instructor for permission to be excused from the exam. If you miss an exam, and we excused you, we modify the grading formula to compute your grade with just the two other exams. You must ask us for permission in advance: don't just skip exams and assume you can be excused retroactively. If you miss an exam and we didn't excuse you, you get a zero for the missing score.


The breakdown for the overall course grade is as follows:

  • Problem sets: 40%
  • Preliminary exams: 30%
  • Final exam: 25%
  • Other factors: 5%

Problems sets are weighted equally. Graders' comments will be posted on CMS.

Preliminary exams are also weighted equally.

Other factors include attendance (as measured by i>clickers), participation on Piazza, appearance at office hours, submission of course evaluations, and any means by which you have demonstrated mastery of course content. This portion of the grade typically affects only a handful of students, raising or lowering their final course grade by 1/3 letter grade.


We recommend that you double check with the original grader before submitting a regrade request. You will find the grader's NetID on CMS (for problem sets) or written on the exam. The grader can typically clarify the grading for you more quickly than a regrade request would.

Regrade requests may be made only with CMS. Do not submit paper regrade requests to the Gates Hall homework handback room.

Regrade requests should be submitted only when you believe that an error was made in the grading. The burden is on you to demonstrate that error. Requests of the form "we think we should get more points for the work we did" are not valid.

There is a deadline for submitting regrade requests, normally one week after grades have been posted. The course staff typically does not begin processing those requests until after the submission deadline has passed, and regrades receive lower priority than any other active grading, so please be patient.

Academic Integrity

Absolute integrity is expected of every Cornell student in all academic undertakings. The instructor will prosecute violations aggressively. The course staff uses automated tools to detect plagiarism. You have been warned.

You are responsible for understanding every word of these policies:

The protocol for prosecution of violations is described here: Explanation of AI Proceedings.

Under no circumstances may you hand in work done with or by someone else under your own name or share code with anyone else except your partners. (You would be amazed at how easy it is to tell when code has been shared.) You may discuss general questions regarding the OCaml language or the requirements of the assignment with others, but it must never go down to the level of program design or coding.

All exams are closed book. You may not give nor receive assistance from anyone else during an exam.

You may not give away any hints or post any code that might be part of a solution on Piazza. Rough algorithms or non-solution-specific code fragments are ok if you need them to illustrate a point.

If you are unsure about what is permissible and what is not, please ask.

Special Needs

We provide appropriate academic accommodations for students with special needs and/or disabilities. Requests for academic accommodations are to be made during the first three weeks of the semester and must be accompanied by official documentation. Please register with Student Disability Services in 420 CCC to document your eligibility.


Staff Responsibilities

The teaching assistants and consultants hold regular consulting hours, and we encourage you to attend them if you have difficulties. The course administrator provides clerical and logistical support for the course.

Consulting and Office Hours

The schedule of consulting hours and instructor office hours will be posted on Piazza. Consulting runs only when Cornell is in session. Consulting hours end at 5 pm on a prelim day. There are no consulting hours during official breaks. Consulting ends on the last shift on the last day of classes.

Staff List

Michael Clarkson Instructor
Michael George Instructor
Remy Jette ( Course Administrator / TA
Junghyun (Jason) Eun ( GRAD TA
Arjun Biddanda TA
Alan Cheng TA
Alice Meng TA
Daniel Hanggi TA
Grant Hoffecker TA
Giang Nguyen TA
Muhammad Khan TA
Michael Yang TA
Quinn Beightol TA
Ralph Recto TA
Richard Zhang TA
Seung Hee Han TA
Yuxiao Tan TA
Amber Hillhouse Consultant
Adi Bodas Consultant
Anna Yesypenko Consultant
Emmett Kotlikoff Consultant
Jonathan Chen Consultant
Joshua Reichler Consultant
Jake Chen Consultant
Kavan Bhavin Consultant
Linda Pei Consultant
Michael Whittaker Consultant
Patrick Cao Consultant
Spencer Weiss Consultant
Victoria Yang Consultant