San José State University

College of Science/Department of Computer Science

CS152, Programming Paradigms, Sections 1 & 2

Fall Semester, 2019


Course and Contact Information


Instructor:                                  Jon Pearce


Office Location:                         416 MacQuarrie Hall


Telephone:                                  (408) 924-5065




Office Hours:                             TR 1:30 – 3:00                                             


Class Days/Time:                       Sec 1: TR 10:30 – 11:45
                                                     Sec 2: TR 12:00 – 1:15


Classroom:                                 MH 222


Prerequisites:                             C- or better in CS 46B and CS 151


Course Description:


Programming language syntax and semantics. Data types and type checking. Scope, bindings, and environments. Functional and logic programming paradigms, and comparison to other paradigms. Extensive coverage of a functional language.

Section Description:

After an overview of the major concepts of programming language syntax and semantics, the Scala language will be covered in depth. Scala is growing in popularity; it provides a nice introduction to the Functional Programming Paradigm as well as a 21st Century look at the Object-Oriented Paradigm. The second half of the course introduces Jedi, a simple but powerful experimental language. Using Scala as a meta-language, students will write a and reference interpreters for various subsets of Jedi. If time permits, Prolog will also be introduced as an example of the logic programming paradigm.


Course Learning Outcomes:


Upon successful completion of this course, students will be able to:


1.   Have a basic knowledge of the history of programming languages


2.   Have a basic knowledge of the procedural, object-oriented, functional, and logic programming paradigms


3.   Understand the roles of interpreters, compilers, and virtual machines


4.   Critique the design of a programming language


5.   Read and produce context-free grammars


6.   Write recursive-descent parsers for simple languages, by hand or with a parser generator


7.   Understand variable scoping and lifetimes


8.   Write interpreters for simple languages that involve arithmetic expressions, bindings of values to names, and function calls


9.   Understand type systems


10. Understand the implementation of procedure calls and stack frames


11. Produce programs in a functional programming language in excess of 200 LOC

Required Texts/Readings




Lecture note and other materials will be posted at CS152 Course Website:


Other Readings


·       David Watt, Programming Language Concepts and Paradigms, Prentice Hall, 1990


·       Friedman, Wand and Haynes, Essentials of Programming Languages, 2nd ed., MIT Press 2001


·       Lohr, Go To: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Maverick Scientists and Iconoclasts--The Programmers Who Created the Software Revolution.


·       Horstmann, Scala for the Impatient, 2 ed; Addisson-Wesley, 2016.


Other equipment / material requirements


Students should bring laptops to class. The following software should be installed:


·       Scala Eclipse

·       SWI Prolog


Course Requirements and Assignments


Pre-midterm students will be asked to complete several Scala labs. These labs are intended to bring students up to speed on the knowledge of Scala that will be needed to complete the post-midterm Jedi project. These assignments enable the following CLOs: 2, 3, 5, 6, 7, 8, 9, 10, and 11. The actual assignments and their tentative due dates are posted below.


SJSU classes are designed such that in order to be successful, it is expected that students will spend a minimum of forty-five hours for each unit of credit (normally three hours per unit per week), including preparing for class, participating in course activities, completing assignments, and so on. More details about student workload can be found in University Policy S12-3 at


Grading Scheme

Course grades will be determined by computing a weighted average of all submitted work using the following weights:











Weights of individual assignments appear on the course web page.

The averages appearing in Canvas are not weighted and do not correspond to your course grade.

Assuming a normal distribution of weighted averages, I will use the following scheme for computing letter grades:


94% - 100%


90% - 93%


87% - 89%


84% - 86%


80% - 83%


77% - 79%


74% - 76%


70% - 73%


67% - 69%


64% -66%


60% - 63%


0% - 59%

Classroom Protocol


To be clear: students are expected to do their own work on assignments and exams. Students will receive a 0 on any exam or assignment that contains any plagiarized material.


Students should bring laptops to class and be prepared to work together on in-class labs.


Academic Dishonesty Policy


Students are expected to do their own work on assignments and exams. Students will receive a 0 on any exam or assignment that contains plagiarized material. Cheating on the final exam may also result in failing the course. Students should not consult work from previous semesters as there will be subtle changes designed to prevent reusing old work.


University Policies


Per University Policy S16-9, university-wide policy information relevant to all courses, such as academic integrity, accommodations, etc. will be available on Office of Graduate and Undergraduate Programs’ Syllabus Information web page at

Course Schedule


Below is a tentative schedule of topics and activities. The instructor reserves the right to make changes to the schedule with fair warning. Exact due dates of assignments are given on the Assignments Page (see below).



Topics & Activities




History, Paradigms



8/27, 8/29

Intro to Scala, Scala Functions



9/3, 9/5

Scala Functions, Recursion

Lab 1


9/10, 9/12

Scala Functions, Combinators

Lab 2


9/17, 9/19

Scala Collections

Lab 3


9/24, 9/26

Scala Collections

Lab 4


10/1, 10/3

Scala Objects



10/8, 10/10

Scala Objects

Lab 5


10/15, 10/17

MT Review, MT



10/22, 10/24

Parser Combinators



10/29, 10/31

Jedi Expressions & Values

Jedi 0


11/5, 11/7

Jedi Expressions & Values



11/12, 11/14

Jedi Functions and Blocks

Jedi 1


11/19, 11/21

Jedi Variables



11/26, 11/28

Jedi Types, Thanksgiving

Jed 2 & 3


12/3, 12/5

OOP in Jedi, Final Review





Assignment details can be found at:

·       Assignments