CS 345 Programming Language Paradigms

Course Website:

We have a class mailing list: cs345
Send messages to:

Lecture: LM 141B TR 12:45pm-2:30pm

Final: Thursday, May 16th at 12:30pm-2:30pm


Instructor: Greg Benson
Phone: 415.422.5066
Office: Harney 533

Course Objectives and Topics

Programming languages allow us to write software. Since the beginning of computing programming languages have evolved to improve the way we write software. Some programming languages have evolved from formal mathematical principles, while others have been born from pragmatic means. Still other languages have been developed by large committees.  To be useful, a programming must have an implementation, which requires translation or interpretation.  In this course we will survey different types of programming languages, programming language theory, and key aspects of parsing, code generation, and virtual machines.  In particular, we will investigate imperative, functional, object oriented, logical and declarative languages.

You will complete projects in representative languages.  Tentatively, we will explore Python, JavaScript, Lisp, Haskell, Scala, and Prolog.  We will be using Python as our main implementation language for exploring translation and interpretation.

Learning Outcomes

On completion of this course the student should be able to accomplish the following:
  • Implement recursive decent parsers
  • Implement a code generator
  • Implement a virtual machine
  • Write programs in a functional programming language
  • Evaluate programming language semantics


  • CS 112 Introduction to Computer Science II with a grade of C or better.
  • CS 245 Data Structures and Algorithms is highly recommended.

Course Materials

I will be providing required course materials.  However, here is an optional book that might be helpful:

Programming Language Pragmatics, 3rd Edition
Michael L. Scott
Morgan Kaufmann
ISBN-10: 0123745144
ISBN-13: 978-0123745149

Assignments and Exams

Tentatively, there will 5 programming projects.  For the projects you will need to submit you solutions to your a git repository.  Please create a project directory called cs345.  You should name project submission as follows: prj0, pr1, etc.

There will be one midterm and a final.  The purpose of the exams will be to assess your understanding of the topics covered in class and in the assignments.  The material covered on the exams will be based on the assigned reading, information presented in lecture, and what you learn by doing the assignments.  The exams will be open book and open notes.  Sharing of materials with your neighbor will not be permitted.  Be sure to come prepared to the exams with your book and notes.



 Projects (5)  50%
 Midterms (1)  20%
 Final  30%


All assignments will be worth 100 points.  Grading will be done on an absolute scale:

 Min A-
 Min B-
 Min C-
 Min D-

If you score 90% or higher will be guaranteed an A-.

Due Dates and Attendance

Assignments must be turned in on time to receive credit.  Except in the most extreme situations, late assignments will not be accepted.  If you cannot complete an assignment by the due date, hand in whatever you have done in order to receive partial credit.

Class attendance is not required, but it is highly recommended.  Please show up on time to class.

Missed Exams

Make-up or early exams will not be given except in the most extreme situations.  If you must miss an exam due to extreme illness, etc. contact the instructor (email is fine) or leave a message with the Department of Computer Science office (415.422.6530) before the exam.

Laptop Usage in Class

You may use your laptop during class as long as you are using it in order to take notes, to look up information regarding the lecture content, and to work on in class programming problems.  Please do not user your laptop for any other activity such as to read or compose email, to use instant messaging software, or to play games.  This is very disruptive to me and the other students in the class, not to mention that it will distract you from learning the material.  If I have reason to believe you are not using your laptop in a productive way I will ask you not to use it in class.

Cheating and Plagiarism

Each student is to do his or her own work for the paper evaluations and projects.  Group projects are an exception.  For the paper evaluations you will need to write original documents.  Do not try to obtain text from the Internet or other sources.  It is easy to spot and easy to find with modern search engines.  If you are caught cheating or plagiarizing (e.g., collaboration, copying on exams, cutting and pasting text) I will assign you a F for the course and you will be reported to the Dean.


When you email the instructor, TA, or the mailing list, be sure to email from an account to which we can directly reply.

Clarifications, changes, etc. regarding the class and assignments will be posted to the cs345 mailing list.  Also check the class website frequently.