CS 329 Principles of Programming Languages
Spring 2008

Department of Computer Science & Engineering
IIT Bombay

Instructor: R.K. Joshi

Question Papers

quiz 1
midsem
quiz 2
lab written test

Endsemester Exam: Friday 21 Nov. 2008, 2:30-5:30 pm,  MB-2

Introduction
    programming paradigms
    abstraction tower

Types

    Types and Values    
    Type Safety, Type checking, Typing errors
    Types as sets
    Type constructors
    Subtyping
    Subsumption
    Polymorphic Code and genericity
    Top type
    Overloading
    Typecasting

Object Oriented Programming Languages
       
    Abstract data types, abstractions
    Encapsulation
    Interfaces
    Classless OOPLs
    Prototypes, delegation, cloning
    Classes
    Shared vs. embedded implementations
    Implicit receiver
    Access to receiver at source level makes sense
    Operators as member functions, cascading
    Class Object
    Inheritance
    Extensions and reuse
    Overriding
    Overriding vs. overloading
    Dynamic binding
    Polymorphism, its purpose
    Subtyping induced by subclassing
    Covariance Vs. contravariance
    Static vs. dynamic typing and type safety issues in inheritance
    Typesafe Narrowing
    Objects on stack and objects on heap
    Self and super, method lookup
    Multiple inheritance
    Diamond inheritance problem and solutions
    Repeated vs. shared inheritance
    Classes as objects
    Class behavior and Class Variables
    Classes of classes
    Metaclasses, Construction and initialization

Midsemester Wednesday Sept 9   2:30-4:30  in MB-2

 Names, Bindings, Parameters, Scoping

     Parameter Passing Mechanisms
        by value
        by reference
        by result
        read-only passing e.g. read-only  value
        copy/restore (value/result)
        by name

    Argument expressions, evaluation order

    Lazy Evaluation of arguments

    Names and Location bindings
        primitive types, object/reference types, pointer types
        static vs. dynamic allocation
        allocation on stack vs. allocation on heap
        parameters and locals

    Static vs. dynamic scoping

     Activation records
        call stack
        return address
        environment pointer
        access links
      
        locals, temporaries
 
        Call chaining, recursion
  
  Control constructs
       various forms of control constructs
       goto statement
       revisiting implementations of subroutines, how does 'return' work
       structured programming constructs
       single entry-single exit forms and control flow charts

   Lambda Calculus
       abstraction and application
       free and bound variables
       beta reduction
       currying
       modeling boolean types
                  values of boolean type as lambda abstractions
                  logical operations as lambda abstractions
       Church numerals and arithmetic
       Recursion
       Eta reduction
       Alpha renaming
       Reduction strategies - full beta, call by value, call by name, normal order

  Logic Programming
       Horn clauses
       objects and relations, rules to derive new relations
       Resolution in Prolog
       The cut operator

More lab solutions out, visit solutions page

To come up immediately after midsem: binding, environments and
scoping, control constructus, parameter passing.

quiz 1 paper

midsem paper

quiz 2 paper

Labs


lab written test (pdf)

Lab pages

Slides

Though we worked out everything on black board, you also have this
pack of slides for your reference.
In addition, you may find these slides to be useful

Textbooks (for some of the topics)


David Watt, Programming Language Design Concepts, Wiley, 2004
Kenneth Louden, Programming Languages Principles and Practice, Thomson, 2003

Additional readings from below references

(book) Benjamin Pierce, Types and Programming Languages, 2002, MIT Press
(book) Martin Abadi and Luca Cardelli, A Theory of objects, 1996, Springer
(paper) Luca Cardelli, Peter Wegner, On Understanding Types, Data Abstraction, and Polymorphism