CSE 230: Principles of Programming Languages

Resources - Assignments - Schedule - Grading - Policies

Summary

CSE 230 is an introduction to the Semantics of Programming Languages. Unlike most engineering artifacts, programming languages and hence, programs are mathematical objects whose properties can be formalized. The goal of CSE 230 is to to introduce you to the fundamental mental and mechanical tools required to rigorously analyze languages and programs and to expose you to recent developments in and applications of these techniques.

We will study a many key concepts in programming languages including, semantics, hoare logic, and the lambda calculus.

We will study all of the above in the context of Coq, an interactive proof assistant that will help us precisely formalize and verify our intuitions about languages and their semantics.

Students will be evaluated on the basis of programming assignments, a midterm, and a final exam.

Prerequisites

Basic functional programming e.g. as taught in UCSD CSE 130 using languages like Haskell, OCaml, Scala, Rust, and undergraduate level discrete mathematics, i.e. logic, sets, relations.

Basics

Staff and Office Hours

  • Loris D'Antoni: Thu 2-3 (CSE 3214)
  • Matthew Kolosick: Tue 10-11 (online), Fri 9-10 (online)
  • Saketh Kasibatla: Mon 3-4 (CSE B275), Wed 2-4 (online)

Resources

Sample Midterms

YearMidtermSolutions
2021MidtermSolutions
2022MidtermSolutions
2023MidtermSolutions

Schedule / Assignments

In homework assignments, any problems marked "optional" and "advanced" will not be graded, and are not part of the assignment.

DateContent CoveredHomework (due at 10pm)
04/01Lecture 1: Slides, Preface, Basics
04/03Lecture 2: Basics, Basics Quiz
04/08Lecture 3: Induction, Lists, Induction Quiz, Lists Quizhw1: Basics.v
04/10Lecture 4: Lists, Poly, Poly Quiz
04/15Lecture 5: Tactics, Tactics Quiz
04/17Lecture 6: Logic
04/22Lecture 7: Logic (continued), Logic Quizhw2: Induction.v Lists.v, Poly.v,Tactics.v
04/24Lecture 8: IndProp, IndProp Quiz
04/29Midterm, covers all material up to IndProp
05/01Maps, Imp
05/06Lecture 9: Imp Auto Imp Quizhw3: Logic.v, IndProp.v
05/08Lecture 10: Hoare
05/13Lecture 13: Hoare Hoare Quiz
05/15Lecture 14: Hoare2 Weakest Precondition Covered Hoare2 Quiz
05/20Lecture 15: SmallStephw4: Maps.v, Imp.v, Hoare.v
05/22Lecture 16: Types
05/27Lecture 17: STLC
05/29Lecture 18: STLCProp
06/03Lecture 19: Sub
06/05Lecture 20: Special Topicshw5: Hoare2.v, SmallStep.v, Types.v, Stlc.v STLCProp.v Due 06/07

Grading

Your grade will be calculated from the assignments, one midterm, and one final.

  • Programming Assignments (40%): There will be a total of 5 programming assignments, distributed via Github Classroom. Submission will be done by pushing your work to your repository. It is your responsibility to make sure that you have pushed your assignments by the deadlines and that your code compiles.
  • Midterm (30%) and Final (30%): There will be two paper exams each worth 30% of the final grade. Your midterm grade will be max(midterm,final).

Comprehensive Exam: For graduate students using this course for a comprehensive exam requirement, you must have an "A" on the combined scores of the midterm and final.

Policies

All assignments are Closed collaboration assignments, where you cannot collaborate with others. Of course you can ask questions on Piazza, and come to office hours etc. In particular,

  • You cannot look at or use anyone else's code for the assignment
  • You cannot discuss the assignment with other students
  • You cannot post publicly about the assignment on the course message board (or on social media or other forums). Of course, you can still post questions about material from lecture or past assignments!

You should be familiar with the UCSD guidelines on academic integrity as well.

LLM Policy (ChatGPT/Copilot/etc.)

This course will feature two in person, written exams that make up a significant portion of your grade. As such, we highly recommend you do not use LLM assistants like ChatGPT or Copilot and instead use the assignments to gain an understanding of the Roq programming language and the concepts of this course.

That being said, you may use an LLM assistant like ChatGPT or Copilot to help you author assignments in this class. If you do, you are required to include a CREDITS.txt file in your assignment that includes:

  • The prompts you gave to the AI chat, or the context in which you used Copilot autocomplete
  • What its output was and how you changed the output after it was produced (if at all)

If you don't include a CREDITS.txt and it's clear you included code from an LLM tool, you may lose credit or get a 0 on the assignment. Repeated or severe violations can be escalated to reports of academic integrity violations.

Late Work

You have a total of six late days that you can use throughout the quarter, but no more than four late days per assignment.

  • A late day means anything between 1 second and 23 hours 59 minutes and 59 seconds past a deadline
  • If you submit past the late day limit, you get 0 points for that assignment
  • There is no penalty for submitting late but within the limit

Regrades

Mistakes occur in grading. Once grades are posted for an assignment, we will allow a short period for you to request a fix (announced along with grade release). If you don't make a request in the given period, the grade you were initially given is final.

Laptop/Device Policy in Lecture

There are lots of great reasons to have a laptop, tablet, or phone open during class. You might be taking notes, getting a photo of an important moment on the board, trying out a program that we're developing together, and so on. The main issue with screens and technology in the classroom isn't your own distraction (which is your responsibility to manage), it's the distraction of other students. Anyone sitting behind you cannot help but have your screen in their field of view. Having distracting content on your screen can really harm their learning experience.

With this in mind, the device policy for the course is that if you have a screen open, you either:

  • Have only content onscreen that's directly related to the current lecture.
  • Have unrelated content open and sit in one of the back two rows of the room to mitigate the effects on other students. I may remind you of this policy if I notice you not following it in class. Note that I really don't mind if you want to sit in the back and try to multi-task in various ways while participating in lecture (I may not recommend it, but it's your time!)

Diversity and Inclusion

We are committed to fostering a learning environment for this course that supports a diversity of thoughts, perspectives and experiences, and respects your identities (including race, ethnicity, heritage, gender, sex, class, sexuality, religion, ability, age, educational background, etc.). Our goal is to create a diverse and inclusive learning environment where all students feel comfortable and can thrive.

Our instructional staff will make a concerted effort to be welcoming and inclusive to the wide diversity of students in this course. If there is a way we can make you feel more included please let one of the course staff know, either in person, via email/discussion board, or even in a note under the door. Our learning about diverse perspectives and identities is an ongoing process, and we welcome your perspectives and input.

We also expect that you, as a student in this course, will honor and respect your classmates, abiding by the UCSD Principles of Community (https://ucsd.edu/about/principles.html). Please understand that others’ backgrounds, perspectives and experiences may be different than your own, and help us to build an environment where everyone is respected and feels comfortable.

If you experience any sort of harassment or discrimination, please contact the instructor as soon as possible. If you prefer to speak with someone outside of the course, please contact the Office of Prevention of Harassment and Discrimination: https://ophd.ucsd.edu/.