CSCE-604 Programming Language Design (Spring 2011)

Course Essentials

CourseCSCE 604 – Programming Language Design, TR 3:55 pm – 5:10 pm, ZACH 105B
InstructorJaakko Järvi
Course pageshttp://courses.cse.tamu.edu/jarvi/2011/CSCE-604
Contactjarvi@cse.tamu.edu
Office hoursBy appointment (my office is 416)

News

  • Fill in your project topic here: https://jottit.com/h9pgd

    "CSCE604" is useful information.

  • Assignment 4 is out [Tue Mar 1 14:13:46 2011]
  • Assignment 3 is out [Sat Feb 26 17:27:46 2011]
  • Assignment 2 is out [Wed Feb 9 13:07:43 2011]
  • Assignment 1 is out [Thu Jan 27 15:46:37 2011]

In a nutshell

Study in the design space of programming languages, covering language processing, formalisms to describe semantics of programming languages, important concepts found in current programming languages, and programming paradigms.

Note to a prospective student

Programming languages are an active research area, the goals of which include ever safer, more efficient, and expressive languages and programming environments. Results from recent programming language research are finding their way to main stream languages, both C# and Java have recently been extended with generics, Java with wildcards, C# with LINQ. C++ is changing significantly with several new language features. Furthermore, new interesting languages, such as Scala with advanced type systems are being introduced, Spec# combines a theorem prover with a mainstream language, built-in support for representing XML data is being added to several languages. New languages aimed primarily to concurrent programming, and new abstractions to existing languages to better support concurrent programming are being introduced. The list goes on. For a motivated student, this class is an opportunity to get involved in this exciting research area.

Administrativia

Grading

20% of your course grade will be based on assignments and quizzes, 80% on a research project and/or exams. Participation, or more accurately, lack of it, can influence your grade you achieve otherwise from assignments and your project or exams, negatively, up to 10%. A grade of 90% or above guarantees an A, 80% or above a B, 70% or above a C, and 60% or above a D.

All grade assignments are final—unless there was a mistake made in recording your semester grades or in computing your final grade. If all numbers are correctly recorded and computed, I will not discuss changing the resulting letter grades.

There are situations that may warrant regrading a particular assignment. For example, making addition errors in computing your score, not seeing an answer that you gave, or not understanding an answer that you gave. Requests for regrading of assignments must be made within one week after the graded work has been handed back.

Policies

Academic Integrity Policy: An Aggie does not lie, cheat, or steal or tolerate those who do. The Honor Council Rules and Procedures are available on the web http://www.tamu.edu/aggiehonor.

The Americans with Disabilities Act (ADA) is a federal anti-discrimination statute that provides comprehensive civil rights protection for persons with disabilities. Among other things, this legislation requires that all students with disabilities be guaranteed a learning environment that provides for reasonable accommodation of their disabilities. If you believe you have a disability requiring an accommodation, please contact Disability Services, in Cain Hall, Room B118, or call 845-1637. For additional information visit http://disability.tamu.edu.

Topics

The primary text for the course is:

Benjamin C. Pierce: Types and Programming Languages

Not all of the book will be covered, and other material is used as well, but this book will be necessary to have.

The course aims to deepen understanding on the concepts and features of programming languages, and provide means to (formally) reason about languages and language features, to the extent to become able to appreciate current research and developments in the area of programming languages. Programming languages are a very large research area. Consequently, the course focus is on fundamental mechanisms rather than broadness. Not everything can be covered: the emphasis of the text is on static typing, type systems etc., which will comprise the main body of this course as well.

We start from Lambda calculus as the simplest model of a programming language, and gradually extend it with language features. The basics that are covered include

  • Specifying semantics of programming languages
  • Necessary proof techniques for programming language research
  • Lambda calculus
  • Specifying type systems
  • Formal study of properties of type systems and languages (such as type safety)

Equipped with this basic skill set, we'll study more ambitious language constructs, such as:

  • Subtyping
  • Polymorphism and generics
  • Constrained generics (bounded quantification)
  • Other recent advances/questions in programming languages/type systems

A likely class project will be an in-depth study of some interesting language feature, type system, etc. that has had some recent interest in the programming language research community.

Projects

Information on projects found here.

Schedule and material

DateTopicMaterial
Tue, Jan 18Introduction, Specifying SyntaxIntroduction: pdf, Specifying Syntax and Semantics: pdf
Thu, Jan 20Specifying PL Semantics, Induction
Tue, Jan 25Structural Induction. Small step semanticspdf
Thu, Jan 27Small step semantics, simple typespdf
Tue, Feb 1Simple types, Intro to Haskellpdf
Thu, Feb 3Intro to Haskell
Tue, Feb 8Intro to Haskell, Implementing interpreters
Thu, Feb 10No class.
Tue, Feb 15Lambda calculuspdf, Fix.hs
Thu, Feb 17Lambda calculuspdf
Tue, Feb 22Simple extensions to lambda calculus
Thu, Feb 24Monadspdf
Tue, Mar 1Monads, functional parserspdf
Thu, Mar 3Subtypingpdf
Tue, Mar 8Subtyping
Thu, Mar 10Store and referencespdf
Tue, Mar 15No class: Spring break
Thu, Mar 17No class: Spring break
Tue, Mar 22Guest Lecture: Dr. Dos Reis
Thu, Mar 24Midterm
Tue, Mar 29About Projects / System-Fpdf
Thu, Mar 31Guest Lecture: Dr. Stroustrup
Tue, Apr 5System-F
Thu, Apr 7Bounded Polymorphismpdf
Tue, Apr 12FGJ
Thu, Apr 14
Tue, Apr 19Project Presentations
Thu, Apr 21No class
Tue, Apr 26Project Presentations
Thu, Apr 28Project Presentations

Assignments

Assignment 1. This LaTeX file may be useful, and this package is to build it.Due on Thursday, Feb 3rd
Assignment 2. This Haskell script may be useful.Due on Thursday, Feb 17th
Assignment 3.Due on Friday, Mar 4th
Assignment 4. This skeleton implementation may be useful.Due on Thursday, Mar 10th

Exams

Midterm exam is on Thursday, Mar 24th, during normal class hours. Reading for the exam:

  • All slides
  • All assignments
  • From Pierce:
    • Section 1
    • Section 2 if you feel you need that
    • Sections 3, 5, 8
    • Subsections 9.1–9.3
    • Subsections 11.1–11.4, 11.6–11.8
    • Subsections 15.1–15.5

Resources

Software

Many programming assignments will be done with Haskell, here are a few pointers to get you started:

Material useful for specific assignments:

Using GHC

A few other compilers exist, but we will use the Glasgow Haskell Compiler. An easy way to interact with GHC is to edit your document, say, Foo.hs in your favourite editor (== Emacs, with haskell-mode), and invoke the GHC interpreter in a shell window:

ghci -fglasgow-exts

The most commonly used commands are

  • :l Foo to load the module Foo (from your file Foo.hs)
  • :r to re-load the previously loaded module
  • :i x to inspect the value, type, … x
  • :q to quit the interpreter

The compiler is invoked, for example as:

ghci -fglasgow-exts --make

The --make option chases automatically which modules need to be recompiled, so you don't have to write a Makefile yourself. (Also GHC's analysis of what need to be recompiled is more fine grained, thus faster).

GHC and Emacs in linux.cs.tamu.edu

To set up GHC with Emacs, follow the directions below:

  1. Create a .emacs file (if you don't have one)
  2. Add the following to your .emacs
(load "/home/faculty/jarvi/lib/emacs/haskell-mode/haskell-site-file")

(add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
(add-hook 'haskell-mode-hook 'turn-on-font-lock)

(add-hook 'haskell-mode-hook 
          (function
           (lambda ()
             (setq haskell-program-name "ghci"))))

(setq haskell-ghci-program-args '("-fglasgow-exts"))
  1. Launch emacs, start editing some Haskell file, such as a1.hs.
  2. C-c C-l launches the interpreter and loads the current file.

Author: Jaakko Jarvi <jarvi@cse.tamu.edu>

Date: 2011-04-05 22:59:24 CDT

HTML generated by org-mode 6.33x in emacs 23