Skip to main content

Course Info

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 can be found on the lecture notes page.  Here is a 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.


Nate Foster Nate Foster Instructor Turn on JavaScript to view email address
4137 Upson Mon 4-5pm, Wed 11-12pm
Ashir Amer Ashir Amer TA Turn on JavaScript to view email address 360 Upson Thu 7-9pm
Shrutarshi Basu Shrutarshi Basu TA
Course Administrator
Turn on JavaScript to view email address 360 Upson Mon 7-9pm
Gautam Kamath Gautam "G" Kamath TA Turn on JavaScript to view email address 360 Upson Thu 9-11pm
Greg Zecchini Greg Zecchini TA Turn on JavaScript to view email address 360 Upson Thu 7-9pm
Katie Meusling Katie Meusling TA Turn on JavaScript to view email address 360 Upson Thu 5-7pm
Stuart Davis Stuart Davis TA Turn on JavaScript to view email address 360 Upson Thu 3-5pm
Sam Park Sam Park Consultant Turn on JavaScript to view email address 360 Upson Tue 7-9pm
Peter Tseng Peter Tseng Consultant Turn on JavaScript to view email address 360 Upson Tue 7-9pm
Baran Bagcilar Baran Bagcilar Consultant Turn on JavaScript to view email address 360 Upson Wed 3:30-5:30PM
Sujay Jayakar Sujay Jayakar Consultant Turn on JavaScript to view email address 360 Upson Wed 3:30-5:30PM
Juan Pablo Sarmiento Juan Pablo Sarmiento Consultant Turn on JavaScript to view email address 360 Upson Sun 7-9pm
Michael Nazario Michael Nazario Consultant Turn on JavaScript to view email address 360 Upson Wed 7-9pm
Oneek Iftikhar Oneek Iftikhar Consultant Turn on JavaScript to view email address 360 Upson Thu 5-7pm
Ranjay Krishna Ranjay Krishna Consultant Turn on JavaScript to view email address 360 Upson Sun 7-9pm
Benjamin Greenman Benjamin Greenman Consultant Turn on JavaScript to view email address 360 Upson Mon 7-9pm
Maria Witlox Course Administrator Turn on JavaScript to view email address 4146 Upson N/A

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 every day for new announcements.

Discussion Forum

We will be using Piazza for class discussion. Piazza is a web-based discussion forum for communication with classmates and the course staff. If you were preregistered, you should already have received a signup message from Piazza. If not, go here to get signed up.

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. There is a link to our Piazza class page in the navigation bar above.

If you know the answer to a question, feel free to post a reply yourself, but please 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.

Please reserve email for urgent or confidential matters only.

If you have any problems or feedback for the Piazza developers, email


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.


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.

Lectures and Sections

In the table below, LEC=lecture, DIS=recitation section, THR=Thurston, PHL=Phillips, UPS = Upson, T=Tuesday, R=Thursday.

Time and Place

10867 LEC 001 TR 10:10AM - 11:00AM HLS B14 Foster
10868 DIS 201 MW 02:30PM - 03:20PM UPS 111 Zecchini
10869 DIS 202 MW 03:35PM - 04:25PM UPS 111 Amer
10870 DIS 203 MW 7:30PM - 8:20PM Thurston 202 Katie/Kamath


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

Late submissions will be accepted with a 15% penalty per day until we start grading, which may be at any time after the deadline. No submissions will be accepted after grading has started unles you have a prior extension.

Extensions will be granted only in exceptional circumstances, such as documented illness.


There will be two preliminary exams and a final exam.  Exams will cover material presented in class and in recitation.  The exam schedule can be found here.

Makeup 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 the course staff immediately to reschedule.

By University policy, courses are not obligated to provide makeup exams for students taking concurrent courses, and we will not do so in this course. The Courses of Study states: "Students are expected to be present throughout each semester at all meetings of courses for which they are registered."

Practice Exams

Exams from previous semesters will be posted on CMS prior to the exam.


Grading is normally done the day after the due date. Grader's comments will be posted on CMS.


For all graded work, you may request a regrade if you feel we have made an error in the grading or simply to request a clarification. There is a deadline for regrade requests, normally one week after the grading guide and solutions have been posted.

Regrades for problem sets are done using CMS. Follow the online instructions.

For exams, attach a cover sheet to your exam with a description of the problem and submit it to the Course Administrator in person so that your request can be logged.

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.

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.