San José State University

College of Science/Department of Computer Science

CS152, Programming Language Concepts and Paradigms, Sections 1, 2, 3, and 4

Spring Semester, 2022

 

Course and Contact Information

 

Instructor:                           Jon Pearce

 

·        Office Location:               411 MacQuarrie Hall

·        Telephone:                        (408) 924-5065

·        Email:                                  jon.pearce@sjsu.edu

 

Office Hours

·        MWTR 1:30 – 2:30 in MH 411

Lectures

·        Section 1, MW 10:30 – 11:45 in DH 450

·        Section 2, TR 10:30 – 11:45 in DH 450

·        Section 3, TR 12:00 – 1:15 in DH 450

·        Section 4, MW 12:00 – 1:15 in DH 450

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 a brief history lesson the Scala language will be covered in depth. Scala 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, each students will write a reference interpreter 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

 

Textbook

 

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

 

   http://www.cs.sjsu.edu/faculty/pearce/modules/courses/Spring22/CS152/index.htm

 

 

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, 3rd ed; Addisson-Wesley, 202?.

Professor Horstmann has generously given us access to the manuscript of the 3rd edition of his book. (User name and password will be supplied in class.)

 

Other equipment / material requirements

 

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

 

·       IntelliJ IDEA (the Edu version) with the Java 11 VM and the Scala 3 Extension

 

  Note that Eclipse has stopped supporting Scala.

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 http://www.sjsu.edu/senate/docs/S12-3.pdf.

 

Grading Scheme

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

 

Assignments

50%

Midterm

20%

Final

30%

TOTAL

100%

 

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:

A

94% - 100%

A-

90% - 93%

B+

87% - 89%

B

84% - 86%

B-

80% - 83%

C+

77% - 79%

C

74% - 76%

C-

70% - 73%

D+

67% - 69%

D

64% -66%

D-

60% - 63%

F

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.

 

During Zoom sessions students should be muted with cameras on.

 

Covid Training

All students registered for a College of Science (CoS) class with an in-person component must view the CoS COVID-19 Training slides and the SJSU Phased Adapt Plan website and acknowledge reading them according to their instructor’s directions.  By working together to follow these county and SJSU safety practices, we can keep our college safer.  Students who do not follow COVID-19 Safety practice(s) outlined in the training, the SJSU Phased Adapt Plan, or instructions from their instructors, TAs or CoS Safety Staff may be dismissed from CoS buildings, facilities or field sites.  Please review this training as needed throughout the semester, as updates will be implemented as changes occur (and posted to the same links).

 

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 http://www.sjsu.edu/gup/syllabusinfo/

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).

Week

Dates

Topics

1

Jan 26,27

Introduction

2

Jan 31, Feb 1/ Feb 2, 3

Scala: Functions

3

Feb 7, 8 / Feb 9, 10

Scala: Recursion

4

Feb 14, 15 / Feb 16, 17

Scala: Combinators

5

Feb 21, 22 / Feb 23, 24

Scala: Collections

6

Feb 28, Mar 1 /Mar 2, 3

Scala: Objects

7

Mar 7, 8 / Mar 9, 10

Scala: Objects, Jedi 0.0

8

Mar 14, 15 / Mar 16, 17

Midterm Review, Midterm

9

Mar 21, 22 / Mar 23, 24

Scala: Parsing

Spring Break

10

Apr 4, 5 / Apr 6, 7

Jedi 1.0: Context

11

Apr 11, 12 / Apr 13, 14

Jedi 1.0: Special Forms

12

Apr 18, 19 / Apr 20, 21

Jedi 2.0: Functions and Blocks

13

Apr 23, 24 / Apr 25, 26

Jedi 3.0: Variables and Iteration

14

May 2, 3 / May 4, 5

TBA

15

May 9, 10 / May 11, 12

Final Exam Review (secs 2 & 3)

16

May 16

Final Exam Review (secs 1 & 4)

Assignment details can be found at:

·        Assignments