Course Information

Instructor

Jedidiah McClurg, Assistant Professor of CS

Teaching Assistants (TA)

Jensen Eicher

Justin McGowen

Course Overview

In previous courses, you have examined how to write programs in individual languages such as Java or C. In this class, we will take a broader view of programming languages, and study the key concepts and techniques that allow developers to implement languages such as Java or C. This will be a project-based course, and we will develop significant experience in this area, by learning how to use functional programming (specifically the OCaml language) to build (over the course of the semester) a working interpreter for a non-trivial subset of JavaScript. Ultimately, the course will improve your skill as a programmer, and will deepen your understanding of how programming languages are designed and implemented.

Prerequisites

The prerequisite is CSCI-306 Software Engineering. As long as you have some programming experience, that should be sufficient. CSCI-358 Discrete Math is strongly recommended.

WARNING

This is a difficult class, for several reasons:

  1. We will take a formal approach to the topics, i.e., we will carefully develop the mathematical/logical underpinnings of programming languages design and implementation. You may not have seen this level of formality in any other CS class so far.
  2. The class is project-based, meaning you should expect to devote a significant portion of your effort for this class towards writing code.
  3. Virtually all of the code you write will be in a functional programming language like OCaml. This may be your first exposure to functional programming.
  4. Programming languages textbooks are often highly technical. We have tried to collect some of the most easily-digestible materials for your reference, but you may find it difficult to master the material without being actively engaged in the class. Class attendance and participation are essential.

Online Community and Communication

In Homework 1, you will be asked to introduce yourself to the instructor. This includes sending a passport-style photo of yourself to the instructor. The photo must be clear, with your face un-obstructed. If you are not comfortable providing a photo, then you will need to contact the instructor to set up a brief Zoom meeting to introduce yourself. Failure to meet this requirement on Homework 1 will result in a 0 (zero) for the Participation component of the grade.

We will use Piazza in the class. This is a great way to ask questions and communicate with the instructor and your classmates. Participation on Piazza is required, and will factor into the Participation component of the grade.

The class Piazza link is: https://piazza.com/class/ke7zken8i6n58f

The instructor will use Piazza to communicate with the class. If you have questions about the course, you should first do a quick search on the Piazza page, to make sure your question has not already been answered there. If not, please go ahead and post your question on Piazza so that the instructor, the TA, or another student can answer it publicly. This will help to streamline the communication.

NOTE #1: neither the instructors nor the TAs will debug your code for you! If you are having difficulty with a certain piece of code, take the time to identify what specific operation(s) is causing unexpected behavior, and ask for help about that. In other words, posting/emailing your source code is not allowed, but asking questions about language features or generic code snippets is welcomed.

NOTE #2: if you have a question you do not wish to publicize (e.g., about your grades, etc.), please create a “private post” on Piazza. Email should only be used in rare instances where use of Piazza would not be feasible.

Textbook and Other Reading Materials

NOTE: the following resources are recommended, but NOT REQUIRED. I will assign readings from these sources to supplement the lectures, but you are only responsible for the information presented in lecture.

The above links will take you to free versions of the materials.

Class Notes

Class notes will be posted 1-2 days after the lecture. Posted notes are not guaranteed to provide all information discussed in lecture (class attendance is highly recommended).

There is a Github organization for the class: https://github.com/mines-csci400 All of your individual/team repositories will show up there.

Grading

The following percentages show how final grades will be calculated. I will not perform any rounding on the scores (e.g., a score of 92.999 will not be rounded up to 93). I may or may not curve the overall grades, depending on how well the class performs overall, however, I expect each student to work hard, and not rely on the curve!

Many of us are facing exceptional difficulties due to the pandemic, remote learning, etc., so I am starting everyone’s overall grade at 56%. If your goal is to pass the class, that should be attainable with minimal effort. If your goal is to obtain an “A”, you will still need to take the class seriously, and put in effort on each assignment/exam, as well as actively participate.

item percentage
baseline grade 56%
labs 28%
homeworks 4.5%
exam 1 4.5%
exam 2 4.5%
participation 2.5%

Late policy: late submissions are accepted up to 5 days after the deadline, with a penalty of -20% per day applied.

Letter grades will be calculated based on the following intervals:

range grade
[93,100] A
[90,93) A-
[87,90) B+
[83,87) B
[80,83) B-
[77,80) C+
[73,77) C
[70,73) C-
[67,70) D+
[63,67) D
[60,63) D-
[0,60) F

Attendance

Class attendance is not required, but is highly recommended (see above info about Class Notes).

Collaboration

We will use GitHub for collaboration. We will use private individual and team-specific repositories to submit assignments. Your repositories will show up here: https://github.com/mines-csci400

Respectfulness and Academic Honesty

Every student is expected to show respect to the instructors and the rest of the class. This course is preparation for your future career, so make sure you are behaving with the same level of professionalism that would be expected at a future full-time position. The general rule of thumb is: informal is okay, but disrespectful is not.

Plagiarism/cheating is NOT acceptable, and will be met with the maximum available penalty. Sophisticated plagiarism-detection software will be used on every submitted assignment, and all confirmed instances of cheating will be immediately reported to the Computer Science department. Please ensure that you do not engage in or facilitate academic dishonesty in this class!

Accommodation

The Colorado School of Mines is committed to ensuring the full participation of all students in its programs, including students with disabilities. If you anticipate or experience any barriers to learning in this course, please feel welcome to discuss your concerns with me. Students with disabilities may also wish to contact Disability Support Services (DSS) to discuss options to removing barriers in this course, including how to register and request official accommodations. Please visit their website at https://disabilities.mines.edu for contact and additional information. If you have already been approved for accommodations through DSS, please meet with me at your earliest convenience so we can discuss your needs in this course.

Schedule

This schedule is tentative, and is subject to change. Deadlines are at 11:59pm (Mountain Time) on the corresponding date.

week date topic lecture notes supplemental reading homework lab
1 Aug 25 PL and functional programming course intro, overview lecture01   hw 1 assigned  
  Aug 27 PL and functional programming PL building blocks, JavaScript intro lecture02 JavaScript Standard, Semantics of PL ch 1.1, 2.1-2.3    
2 Sep 1 PL and functional programming functional programming (simple functional language) lecture03 Semantics of PL ch 3 hw 1 due  
  Sep 3 PL and functional programming crash course on Linux, OCaml, OPAM, Git lecture04 OCaml Online REPL, Git Cheat Sheet , OCaml Exercises    
3 Sep 8 PL and functional programming crash course on Linux, OCaml, OPAM, Git lecture05 Learn OCaml, OCaml Spec, Ocaml Module Reference hw 2 assigned  
  Sep 10 expressions and evaluation algebraic data types (ADTs), pattern matching lecture06 Data Types    
4 Sep 15 no class (career day)         lab 1 assigned
  Sep 17 expressions and evaluation algebraic data types (ADTs), pattern matching lecture07 Data Types hw 2 due  
5 Sep 22 expressions and evaluation syntax, grammars lecture08 Semantics of PL ch 1.2 hw 3 assigned  
  Sep 24 syntax and semantics lexing, parsing lecture09 Lexing, Parsing, Lexing & Parsing    
6 Sep 29 syntax and semantics OCaml parser generators lecture10 Ocaml Parser Generators    
  Oct 1 syntax and semantics induction and recursion lecture11 Semantics of PL ch 1.3   lab 1 due
7 Oct 6 syntax and semantics inductive definitions, structural induction lecture12 Semantics of PL ch 1.4-1.5   lab 2 assigned
  Oct 8 syntax and semantics big-step operational semantics lecture13 Environment Model, Semantics of PL ch 4 hw 3 due  
8 Oct 13 higher-order functions (exam review) lecture14 Higher-order Programming hw 4 assigned  
  Oct 15 take-home midterm          
9 Oct 20 no class (holiday)          
  Oct 22 higher-order functions recursive higher-order functions lecture15 Evaluating Lambdas   lab 2 due
10 Oct 27 higher-order functions static/dynamic scoping lecture16 Evaluating Lambdas   lab 3 assigned
  Oct 29 higher-order functions closures lecture17 Implementing Closures hw 4 due  
11 Nov 3 higher-order functions OCaml standard libraries lecture18 JavaScript Data Types, JavaScript Type Conversions hw 5 assigned  
  Nov 5 higher-order functions small-step operational semantics lecture19 Type Checking    
12 Nov 10 type checking static/dynamic typing lecture20 Hindley-Milner    
  Nov 12 type checking type inference lecture21 Semantics of PL ch 5.1-5.2   lab 3 due
13 Nov 17 mutable variables and objects objects, references lecture22 Semantics of PL ch 5.3   lab 4 assigned
  Nov 19 mutable variables and objects garbage collection lecture23 Mutability hw 5 due  
14 Nov 24 no class          
  Nov 26 no class (holiday)          
15 Dec 1 advanced topics   lecture24 Mutable Fields    
  Dec 3   (exam review) lecture25 Currying   lab 4 due
16 Dec 8 take-home final          
  Dec 10 no class (study for finals)          
17 Dec 15 no class (final exam week)          
  Dec 17 no class (final exam week)          

Lab Topics

There will be 4 labs. Lab 1 will be individual, and Labs 2-4 will be completed in groups of 2-3 students. Your lowest lab score will be discarded before the final grade is calculated! You will have approximately 3 weeks to work on each lab. The labs build on each other, and lab solutions will NOT be provided, meaning you will need to pay special attention to building a collection of test cases, to ensure that bugs in earlier lab submissions do not propagate into later labs.

You will be given several test cases to check basic code functionality, but you are responsible for adding sufficient test cases to ensure that all corner cases have been covered. In most cases, you will also be able to use a “black-box” implementation such as the Node.js JavaScript interpreter to compare with your implementation’s behavior. Buggy behavior will be identified by our own comprehensive set of test cases, and will result in lost points. Programs which fail to compile will result in a 0 (zero) for the assignment – no exceptions! You are responsible for ensuring that your code is properly submitted and properly compiling using the toolchain discussed in class.

Homework

There will be approximately 5 homeworks, which will be completed individually. Your lowest homework score will be discarded before the final grade is calculated! These are designed to help encourage you to keep up-to-date on the course material. You will have approximately 3 weeks to work on each homework.

Acknowledgements

This course is inspired by Bor-Yuh Evan Chang’s fantastic Programming Languages course. Special thanks to Evan for his advice and assistance.