Skip to the content.

Course Information

Instructor

Jedidiah McClurg, Assistant Professor of CS

Teaching Assistants (TA)

Christopher (Chris) Muller

Jacob McBee

Jordan Schmerge

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 prerequisites are CSCI-306 Software Engineering and CSCI-358 Discrete Math. As long as you have some programming experience and basic mathematical knowledge, that should be sufficient.

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/ksp8kjp7orn3s4

The instructors 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, 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. Note that the participation component is a qualitative score, based on the instructor’s assessment of your overall participation in the course.

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

Lab Topics

There will be 6 labs. Lab 1 will be individual, and Labs 2-6 will be completed in groups of 2-3 students. You will have approximately 2 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 7 homeworks, which will be completed individually. These are designed to help encourage you to keep up-to-date on the course material. You will have approximately 2 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.