Programming Languages

Course Description

Till now, you have learned how to program and how to design applications using object-oriented PLs. In this course you learn more about underling layers of a programming language. In the end of this course you will be able to compare a functional PL with an object-oriented PL according to design and implementation parameters. Typed and untyped language is another interesting concept which helps us to improve our knowledge about PL behavior and structure. We will have a series of assignments, projects, activities and evaluations.

Grading & policy

"Download Grade List of Spring 2015"

  • Assignments= 20 points

  • Projects= 30 points

  • Midterm = 40 points

  • Final = 110 points

  • Class Activities = +10 Points

Topics & Scheduling

Part I : Basic Concepts (3 weeks)

  • Introduction

  • Basic data types (slide) (note)

  • Encapsulation (slide)

  • Control of Execution (slide)

  • Control of Subprograms (slide)

  • Complementary Topics (slide)

Part II : Functional PLs (3 weeks)

  • Syntax vs. semantics vs. idioms vs. libraries vs. tools (slide) (video 1) (video 2)

  • ML basics (bindings, shadowing, functions) (slide) (video 3) (Function vs Method)

  • Pairs, Tuples, Lists (slide)

  • Benefits of no mutation vs mutation (slide)

  • Record & Type Binding (slide)

  • First-class vs higher-level vs anonymous functions (slide)

  • Function Closures & Lexical scope (slide)

  • Type inference & Orthogonality (slide)

  • Abstract types and modules (slide)

  • Racket: Basics & Let Expressions (slide)

  • Racket: Advanced Topics (slide)

  • Haskell Basics

Part III : Object-Oriented PLs (2 weeks)

  • Ruby basics, Classes & Objects, Object States (slide) (Static vs Dynamic Typing)

  • OOP vs. functional decomposition, Extensibility, and implementation (slide)

  • Sample JAVA code for implementation matrix (code)

  • Sample ML code for implementation matrix (code)

  • Sample Ruby code for implementation matrix (code)

Part VI : Foundations and Logic of PLs (4 weeks)

  • Lambda Calculus (Slide)

  • An Introduction to Type Systems (Slide)

  • Formalization of Type Systems (Slide)

  • First Order Type Systems (Slide) (Type Systems by L. Cardelli)

Midterm, Assignments, Programming Projects and Grades

  • Midterm (1 Azar)

  • Final (15 Dey)

List of Programming Projects (2)

  • Project (Phase 1): Name Substitution (Using Functions)

Problem Sample File

  • Project (Phase 2): Implementation of a very small PL

Problem

List of PL Assignments (4)

  • Assignment I: (Basic DT & Encapsulation) (Guideline for 3D Array)

  • Assignment II: (Functional PLs) (Answer)

  • Assignment III: (Object Oriented PLs)

  • Assignment IV: (Lambda Calculus & PL Logic)

Textbooks and Other Resources

Main References for Basic Concepts:

  • Concepts in Programming Languages by John C. Mitchell, Cambridge University Press, 2004. (link in google book)

  • Programming languages: design and implementation by Terrence W. Pratt nad Marvin V. Zelkowitz, Prentice Hall, 4th edition, 2001. (link in google book)

Main References for Type System and Foundations:

  • Foundations for Programming Languages by John C. Mitchell, MIT Press, Last edition, 2009. (link in google book)

  • Types and Programming Languages by Benjamin C. Pierce, MIT Press, 2002. (link in google book)

  • Type Systems by Luca Cardelli, Microsoft Research, CRC Handbook of Computer Science and Engineering, 2nd Edition, Ch. 97, Wednesday, February 25, 2004. (PDF)

Other Resources:

Programming Tools