CS341 Programming Languages (Fall 2009)

Pre-requisites: CS142 or equivalent
Instructor: Christino Tamon
Lecture: Science Center 354 TR 8:00-9:15pm
Office hours: TR 9:15-11am, 2:15-3pm, Science Center 373
Syllabus
This course examines the major paradigms and principles underlying modern programming languages. The course focuses on imperative, functional and logic programming paradigms. The rationale of each paradigm is discussed along with typical programming idioms used with them. Programming exercises and assignments are used to illustrate relevant concepts.
Grading: Assignments and Quizzes 40%, Midterm 20%, Final 40%

Text
Michael L. Scott, "Programming Language Pragmatics," 3rd edition, Morgan Kaufmann, 2009.

Other texts (not required):


Objective & Outcome:
The main objective of the course is to describe and compare several major paradigms of programming languages, which include the imperative, functional, and logic paradigms. The specific outcomes include:
Requirements & Policies:
Although attendance is not mandatory, students are responsible for all course materials covered in lectures and any exams given during class periods. Students that need to make up missing course work must provide the required Clarkson official exempt form. All students must submit their own work; the exchange of ideas are encouraged but ultimately the submitted work must be the student's own. Please refer to the Clarkson University Regulations for more guidelines on academic integrity and related matters.

Schedule (updated regularly)

Tuesday Thursday
August 26

Course administration.
Introduction: basic paradigms (PROC, OOP, FUNC, LOGIC).
Plan: functional paradigm; logic paradigm; (re)visit procedural paradigm and study implementation issues.

August 28

Scheme basics: numbers and recursions.
Recursive and iterative (tail recursive). Time versus space efficient recursions.
Example: exponentiation.

September 1

Scheme basics: lists and recursions.
Basic list operators: car-cdr-cons; null test; list and quote operators.
List functions: length, append, reverse.

Reading: Scheme language report.

September 3

Pattern matching on lists: prefix, subsequence, sublist, subset
Assignment 1 is out.

September 8

More list operators: select, select-at-random, any-good-fragments?

Discussion of Assignment 1.

September 10

Generic list operators: map, filter, accumulate.
Generic functions; sorting.
Lab 3 is out.

September 15

Sorting: insertion, selection.
Generic functions: templates

September 17

Quiz 1
Assignment 2 is out.

September 22

LET statements: basic LET (variables), LETREC, named LET; local scoping.
Objects in Scheme. Example: stack.

September 24

Higher-order lists: map. APPLY.
Random numbers.

September 29

Short break.

October 1

RSA demo; Files and sockets.
Assignment 3 is out.

October 6

Compilation process: lexical, syntactic, semantic, code generation.
Lexical analyzer (scanner); syntax analyzer (parser); semantic analyzer; code generator. Compiler vs Interpreter.

October 8

Regular expressions; context-free grammars.
Context-free grammar: ambiguity. Syntax (parse) trees. Derivations.
Precedence, associativity (left or right).
Left-recursion; elimination.

October 13

Recursive descent parsing: arithmetic expressions.
C implementation (scanner and parser).

October 15

Syntax-directed translation (semantics): C calculator.
Quiz 2

October 20

Recursive descent parsing: syntax tree for expressions.
C implementation (scanner, parser, and semantic tree constructor).
Remark: most of the C files are available from the course public directory at /afs/cu/class/cs341/public/f09/.

October 22


LABS
ASSIGNMENTS
Links