Skip to main content

Course Info

Check here for lecture and dicussion section, time, place, and instructor.

Be sure to regularly check the course announcements.

CS 3110 is the third programming course in the Computer Science curriculum, following CS 1110/1112 and CS 2110. One goal is to teach the functional programming paradigm using a modern richly typed functional language. Theoretical and practical aspects of typed functional programming are covered. Types are used for specification and correctness reasoning. Some current themes in computer science are covered with simple programming assignments from areas such as cyber physical systems and distributed systems.

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

Here is a diagram showing the course material and the dependencies among different parts of the course.

Course Prerequisites/Corequisites

Prerequisite: CS 2110 or equivalent programming experience. Prerequisite or corequisite: CS 2800. Should not be taken concurrently with CS 3410 or CS 3420.

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.


Robert L. Constable Instructor Turn on JavaScript to view email address 320 Gates TBA
Alex Chen Consultant Turn on JavaScript to view email address Surge 106 See Below
Andrew Sikowitz Consultant Turn on JavaScript to view email address Surge 106 See Below
Austin Liu Consultant Turn on JavaScript to view email address Surge 106 See Below
Alex Libman Consultant Turn on JavaScript to view email address Surge 106 See Below
Eric Wu Consultant Turn on JavaScript to view email address Surge 106 See Below
James Cramer Consultant Turn on JavaScript to view email address Surge 106 See Below
Jenny Wang Consultant Turn on JavaScript to view email address Surge 106 See Below
Liane Longpre Consultant Turn on JavaScript to view email address Surge 106 See Below
Matthew Hsu Consultant Turn on JavaScript to view email address Surge 106 See Below
Rebekah Hess Consultant Turn on JavaScript to view email address Surge 106 See Below
Nancy Gu Consultant Turn on JavaScript to view email address Surge 106 See Below
Zhao Shen Consultant Turn on JavaScript to view email address Surge 106 See Below

Staff Responsibilities

The teaching assistants (TAs) teach recitation sections and assist with homework and exams. All TAs hold regular office hours, and we encourage you to attend them if you have difficulties. The consultants are undergraduates who have excelled in their coursework and are employed as graders and tutors. They also hold regular office hours. The course administrator provides clerical and logistical support for the course. Please notify the course administrator of any errors or discrepancies in the website.

Consulting runs only when Cornell is in session. Consulting hours end at 6pm on a day following an assignment due date and 7pm on a prelim day. There are no consulting hours during official breaks. Consulting ends on the last shift on the last week of classes.

Course Administration


The course website is Announcements will be posted on the home page. Check periodically for new announcements.

Discussion Forum



The textbook for the course is online: Real World OCaml

Additional Resources

Some useful resources:

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


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.

For viewing pdf files, we recommend Adobe Reader, available free of charge from Adobe.
Get Adobe Reader

Lectures and Sections

In the table below, LEC=lecture, HOL=Hollister, GH = Bill and Melinda Gates Hall, T=Tuesday, R=Thursday.

Time and Place

LEC 001 TR 10:10AM - 11:00AM GH G01 Constable
201 MW 10:10-11:00AM HOL 320 TBA
202 MW 2:30-3:20PM HOL 401 Alex Libman
204 TR 3:35-4:25PM HOL 306 TBA
205 MW 3:35-4:25PM HOL 401 TBA
207 TR 1:25-2:15PM HOL 320 James Cramer


Attendance at lecture and section is highly recommended. 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.

Occasionally section instructors temporarily move their section to a computer lab. Pay attention to announcements to keep track of any room changes.


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

Programming Assignments

There will be 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 try to get started on assignments early. The best use of your time and the machine's time is to think about the problems before typing anything at the computer.

Karma Problems

Assignments may include optional problems called karma problems. These problems exist to provide an extra challenge for those who are up to it. Karma problems will be graded, but will not affect your score—they mostly just give good karma. Students who do karma problems will be noticed, and doing them may be taken into account when assigning the final grade, for example if you are right on the line between a B+ and an A–. However, spending your time on regular problems is almost always a more effective way to improve your overall score. Tackle karma problems only after you are sure you have the rest of the assignment well in hand.

Joint Work

Some assignments will be done individually, others in pairs. We will let you know which in the assignment writeup. For assignments done in pairs, you will submit a single joint assignment with both 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.

You may upload as many times as you wish, and only the latest version will be graded. Note however that if you upload both before and after the deadline, the one after the deadline will be taken, and you will be subject to a late penalty.

If you are working with a partner, you should coordinate with your partner well in advance of the due date and time. You must register the partnership in CMS for each problem set. One of the partners must invite the other, and the other must accept the invitation. See the CMS online help for details. Only one of the partners need submit the 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).

Please include the names and netIds (not your Cornell student id!) of you and your partner in all submitted files.

Late Policy

Submit your assignments on time. CMS tends to lag right near the deadline because too many students wait until the last minute to submit, so make sure to finalize your submission approximately 15 minutes before the deadline.

Additionally, make certain that your code compiles. We use an automated test harness to thoroughly grade submissions. Code which does not compile cannot go through the harness and will receive an automatic zero.

Extensions will be granted only in exceptional circumstances, such as documented illness, and are handled exclusively by the professor.

Unless otherwise specified, assignments may be turned in after the deadline with the following penalty applied to the score received:

  • 1 day late (i.e., immediately after the deadline up to 24 hours later): −10%
  • 2 days late: −25%
  • 3 days late: −50%
  • > 3 days late: −100% (we won't grade it)

Weekends (Saturday and Sunday) count as a single day for the purpose of calculating late penalties. So turning your assignment in on Sunday night is no worse than turning it in on Saturday morning.

Here are a few words of caution about CMS and late submissions:

  • The deadline for an assignment is not the time by which you must finish writing a solution; rather, the deadline is the time by which you must successfully upload your solution files to CMS and confirm that CMS has recorded the correct versions of those files. CMS might lag near the deadline as many students attempt to upload their submissions at the last minute, perhaps even causing your submission to be marked as late. That is your problem. Requests to have a penalty removed because CMS lagged near the deadline will be denied. We recommend that you upload your files at least one hour before the deadline.
  • In this course, there might or might not be a grace period configured in CMS. We won't say more than that. Do not (re)submit after the deadline unless you are comfortable with the fact that you might receive a late penalty. We won't respond to questions about whether you got in during the grace period (if in fact it exists)—if you have to ask, just assume the answer is that you got the late penalty.
  • You must submit your work through CMS; email submissions, whether late or on time, will be deleted without response.
  • CMS enables you to upload as many times as you wish before submissions are closed. Only the most recent version, with the appropriate late penalty, will be graded. Requests to have the course staff grade earlier versions (with or without a penalty) will be denied.
  • It is your responsibility to verify before the deadline that you have submitted the intended versions of your files. Requests to substitute another version (e.g., "I accidentally submitted the wrong files") will be denied.

We sincerely regret having to enforce these policies, but the administrative overhead associated with late submissions has become too great. And sorting out whether students are unfairly trying to work past the deadline (while unjustly blaming CMS) is not feasible.


Practice Exams

Academic Integrity

The utmost level of academic integrity is expected of all students. Please read the following carefully.

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 partner. (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.

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


Students are being approached by commercial vendors and encouraged to sell course materials, including exams, notes, and papers, which are then posted for resale on internet sites. Students have removed materials, even exams, from course Blackboard sites and sold them to commercial vendors. Some commercial vendors falsely convey that the instructor has approved the sale of course materials. Cornell's Blackboard site contains a new notice: "Course materials posted on Blackboard are intellectual property belonging to the author. Students are not permitted to buy or sell any course materials without the express permission of the instructor. Such unauthorized behavior constitutes academic misconduct."

Any such behavior of buying or selling course materials constitutes academic misconduct. Any suspected materials will be tested for plagiarism and due action will follow.

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.

Consulting Hours