198:314 Principles of Programming Languages - Spring 2018

General Information


Announcements
  • All lecture slides have been posted.
  • Project 2 posted.
  • Homework 1 grades released.
  • Course website online.
Instructor Zheng Zhang (zz124@scarletmail.rutgers.edu, website )
Office: CORE 310
Office hours: Wed, 5:00 pm - 6:00pm
TA (S05) Ari Hayes (arihayes@cs.rutgers.edu)
Office: CoRE 335
Office hours: Mon, 6:45 pm -- 7:45 pm
TA (S06) Qin Zhou (zq58@cs.rutgers.edu)
Office: CoRE 331
Office hours: Thu, 2:00pm -- 3:00pm
TA (S07) Qiaoying Huang (qh55@cs.rutgers.edu)
Office: CBIM (ring the bell)
Office hours: Tuesday, 8:00pm -- 9:00pm
Location
 
 
 
B120 (Lecture)
LSH-B267 LIV (Recitation-Sec05)
LSH-B115 LIV (Recitation-Sec06)
TIL-242 LIV (Recitation-Sec07)
Time Monday/Wednesday 3:20pm - 4:40pm (Lecture)
Monday 8:25 pm - 9:20pm (Recitation-Sec05)
Wednesday 10:35 am - 11:30 am (Recitation-Sec06)
Monday 12:15 pm - 1:10 pm (Recitation-Sec07)

Description


This course covers topics in programming languages and compilers such as parsing techniques with error handling; attribute grammars and their use in syntax-directed translation; type systems and polymorphism; models of programming language semantics (i.e., operational semantics through closure interpreters ); data abstraction; functional, logical, and object-oriented paradigms; intermediate representations of programs; concurrent programming models; automatic parallelization. This is the website for sections 01, 02, and 03.


Textbooks


Academic Integrity


This course requires that every student adheres to the DCS Academic Integrity Policy. DO NOT CHEAT! If you have any questions whether a particular activity is considered cheating, talk to the instructor. You have to make sure that all your project files are read protected. If you don't know how to do this in Linux, ask your TA. Leaving a project file unprotected and thereby visible to your fellow students is considered cheating.

If you need an extension to a project or homework, let the instructor know as early as possible.


Lectures


  • January 17, 2018 --- Lecture 1
  • Course overview and introduction.
    Reading: Scott: Chapter 1

  • January 22, 2018 --- Lecture 2
  • Compiler front-end, scanner, lexical analysis, regular expressions, finite state automata.
    Reading: Scott: Chapter 2.3 - 2.5;

  • January 24, 2018 --- Lecture 3
  • Compiler front-end review, scanner, regular expression, context free grammar, leftmost and rightmost derivation.
    Reading: Scott: Chapter 2.3 - 2.5;

  • January 29, 2018 --- Lecture 4
  • a Leftmost and rightmost derivation, parse tree, ambiguity,associativity and precedence.
    Reading: Scott: Chapter 2.3 - 2.5;

  • January 31, 2018 --- Lecture 5
  • Context free grammar, regular grammar, operator precedence and associativity, introduction to LL(1) parsing.
    Reading: Scott: Chapter 2.3 - 2.5;

  • February 5, 2018 --- Lecture 6
  • Predictive parsing, LL(1) grammar, first and follow sets, parse table, recursive descent parser.
    Reading: Scott: Chapter 2.3 - 2.5;

  • February 7, 2018 --- Lecture 7
  • LL(1) condition, firstplus sets, parse table construction, fixed point computation algorithm.
    Reading: Scott: Chapter 2.3 - 2.5;

  • February 12, 2018 --- Lecture 8
  • First set and follow set construction, firstplus sets, parse table, fixed point computation algorithm.
    Reading: Scott: Chapter 2.3 - 2.5;

  • February 14, 2018 --- Lecture 9
  • Follow set construction, firstplus sets, parse table, recursive descent parsing, syntax directed translation.
    Reading: Scott: Chapter 2.3 - 2.5;

  • February 19, 2018 --- Lecture 10
  • Syntax directed translation, runtime data organization.
    Reading: Scott: Chapter 2.3 - 2.5; Chapter 3.1 - 3.4

  • February 21, 2018 --- Lecture 11
  • Imperative language, "things that can go wrong".
    Reading: Scott: 3.1 - 3.4, 9.1 - 9.3; ALSU: 7.1 - 7.3, 8.3;

  • February 26, 2018 --- Lecture 12
  • Name binding, lexical scope, dynamic scope, stack frame, activation record.
    Reading: Scott: 3.1 - 3.4, 9.1 - 9.3; ALSU: 7.1 - 7.3, 8.3;

  • February 28, 2018 --- Lecture 13
  • Name binding, lexical scope, dynamic scope, access link, non-local data access.
    Reading: Scott: 3.1 - 3.4, 9.1 - 9.3; ALSU: 7.1 - 7.3, 8.3;

  • March 5, 2018 --- Lecture 14
  • Lexical scope, dynamic scope, non-local data access, parameter passing modes.
    Reading: Scott: 3.1 - 3.4, 9.1 - 9.3; ALSU: 7.1 - 7.3, 8.3;

  • March 19, 2018 --- Lecture 15
  • Parameter passing modes, introduction to functional programming.
    Reading: Scott: 9.1 - 9.3, 11.3 - 11.3;

  • March 26, 2018 --- Midterm Exam

  • April 2, 2018 --- Lecture 16
  • Referential transparency, S-expression, scheme language constructs, recursive definitions.
    Reading: Scott: 11.3 - 11.3;

  • April 4, 2018 --- Lecture 17
  • Scheme language constructs, equality checking, recursive definitions, currying, higher-order functions.
    Reading: Scott: 11.3 - 11.3;

  • April 9, 2018 --- Lecture 18
  • Functions as first-class values, higher-order functions, map and reduce, currying, let, let* and letrec scope.
    Reading: Scott: 11.3 - 11.3;

  • April 11, 2018 --- Lecture 19
  • Introduction to lambda calculus, lambda-term, church numerals, logical constants, function application and abstraction.
    Reading: Scott: 11.3 - 11.3, 11.7;

  • April 16, 2018 --- In-class Discussion for Midterm Exam Questions (No Slides)

  • April 18, 2018 --- Lecture 20
  • Church numerals, logical constants, free and bound variables, Y-combinator.
    Reading: Scott: 11.7;

  • April 23, 2018 --- Lecture 21
  • Dependence definition, directed acyclic graph (DAG), scheduling DAG, critical path, simple loop dependence testing.
    Reading: ALSU: 11.1 - 11.3;

  • April 25, 2018 --- Lecture 22
  • Dependence definition, single induction variable dependence testing, lexicographical order, synchronization free parallelism.
    Reading: ALSU: 11.1 - 11.7;

  • April 25, 2018 --- Lecture 23
  • Affine half space, dependence hyperplane, affine processor schedule, synchronization-free parallelism.
    Reading: ALSU: 11.1 - 11.7;

Homework Sets


Please check Sakai for homework sets.

Projects


You will need an ilab account since all projects will require code to run on the ilab machines. You should know how to create and edit files in the Linux environment. All projects have to compile and compile on the ilab machines. It is your responsibility to make sure that your code works correctly on the ilab machines. Code that does not compile and/or run on the ilab cluster will not receive any credit.

Project 1 to Project 3 will be released on Sakai.

Useful Links



  • LCSR Computing Facility
    This home page includes documentation for both Macs and Unix. Documents cover topics such as "Getting Started", "Basic Unix Commands", "Using the X Window System", "Programming in C Under Unix", "Electronic Mail", and "Working at Home".

  • ilab
    ilab cluster at Rutgers