314-CSCE Programming Languages
|Course||CSCE 314 – Programming Languages, MWF 09:10 am – 10:00 am, RICH 101|
|Office hours||By appointment (my office is 416)|
|Teaching Assistant||Xiaolong Tang (firstname.lastname@example.org), office hours: MWF 10:10 am – 11:00 am, 414D HRBB|
|Peer Teacher||Chirs Harris (email@example.com)|
[Thu Dec 2 11:45:14 2010] :: Assignment 9 is out.
[Thu Nov 18 17:32:21 2010] :: Assignment 8 is out.
[Thu Nov 11 23:30:22 2010] :: Assignment 7 is out.
[Tue Nov 2 23:53:26 2010] :: Assignment 6 is out.
[Sun Oct 24 13:50:06 2010] :: Assignment 5 is out.
[Thu Sep 23 19:26:14 2010] :: Midterm will be on Wed, Oct 13th.
[Thu Sep 23 17:23:36 2010] :: Assignment 3 is out.
[Mon Sep 20 13:38:21 2010] :: Assignment 2 deadline postponed to Tuesday, Sep 21st. (and fixed to be in September, not in October, as most guessed)
[Sun Sep 12 21:53:02 2010] :: Assignment 2 is out
[Sun Sep 12 21:33:40 2010] :: Assignment 1 deadline was extended until Monday night.
[Sun Sep 5 22:08:57 2010] :: Assignment 1 is out
In a nutshell
Explores the design space of programming languages via an in-depth study of two programming languages, one object-oriented (Java), one functional (Haskell); focuses on idiomatic uses of each language, and on features characteristic for each language.
20% of your course grade will be based on assignments and quizzes 40% on the mid-term and 40% on the final exam. Participation, or more accurately, lack of it, can influence your grade you achieve otherwise, from assignments and on 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.
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.
Americans with Disabilities Act (ADA) Policy: 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 the Department of Student Life, Services for Students with Disabilities, in Room 126 of the Koldus Building or call 845-1637.
We use the following Haskell book:
Graham Hutton: Programming in Haskell, Cambridge University Press.
In addition, you will need some Java book (regarded as more of reference material), such as:
Java(TM) Programming Language, by James Gosling, Ken Arnold and David Holmes; 4th edition, Prentice Hall, 2006.
Other recent books about Java are suitable as well. Not all of the books will be covered, and other material is used as well.
The course aims to deepen understanding on the concepts and features of programming languages, and how programming languages work. After a general overview of language processing, we study the features of Haskell, focusing on what constitutes a functional programming language. Non-exhaustive list of what follows is:
- Types, static typing and type inference
- Parametric polymorphism
- Higher-order functions, closures
- Recursive types and functions
- Algebraic data types
- Abstract data types and modules
- Type classes
- Effects in a ``pure'' language
Along the way, we cover the basic ingredients of a programming language implementation, including:
- Grammars, lexing and parsing
- Abstract syntax, internal representations
- Types and type checking
- Interpretation, optimization, code generation
We use Haskell to implement a small imperative programming language as course assignments.
The Java portion of the class focuses on the major features of a modern object-oriented programming language, and focuses on interesting language features and the language infrastructure of Java, including:
- Subtyping and inheritance
- Subtype polymorphism
- Exception handling
- Generics, wildcards
Programming languages are a very large area. The course aims at providing an understanding of the use, efficiency considerations, and implementation approaches of common abstraction mechanisms and language constructs in modern programming languages. I hope that the course will allow you to more effectively use the languages of today, make it easier for you to learn new programming languages in the future, and possibly get excited about contributing to research and development in the area of programming languages in the future. Even though we use and study two specific programming languages, Haskell and Java, learning more of these languages should be considered as a nice side benefit of the course, not the main goal.
|Mon, Aug 30||Introduction||Slides 1 Slides 2|
|Wed, Sep 1||Haskell & Functional Programming Basics||Slides 3|
|Fri, Sep 3||Haskell & Functional Programming Basics|
|Mon, Sep 6||Haskell & Functional Programming Basics|
|Wed, Sep 8||Haskell & Functional Programming Basics||Slides 4|
|Fri, Sep 10||Pattern Matching|
|Mon, Sep 13||List Comprehensions, higher-order functions||simple_io.hs|
|Wed, Sep 15||Higher-order functions, data types||Slides 5|
|Fri, Sep 17||Defining Data types, simple io|
|Mon, Sep 20||Data types, Type classes|
|Wed, Sep 22||Syntactic Analysis||Slides 6|
|Fri, Sep 24||Syntactic Analysis, Haskell Modules||Slides 7|
|Mon, Sep 27||Functional Parsers||Slides 08|
|Wed, Sep 29||Functional Parsers, Monads||ExprParser.hs ExprParserDo.hs|
|Fri, Oct 1||Functional Parsers, Monads||Slides 9|
|Mon, Oct 4||IO, Monads||io.hs|
|Wed, Oct 6||IO, Monads|
|Fri, Oct 8||Monads|
|Mon, Oct 11||Review||Review slides|
|Wed, Oct 13||Midterm|
|Fri, Oct 15||Parsing, assignment 4|
|Mon, Oct 18||Types and type-checking||Slides 10|
|Wed, Oct 20||Types and type-checking|
|Fri, Oct 22||Implementing a type checker|
|Mon, Oct 25||Implementing a type checker||Writer.hs Reader.hs Error.hs State.hs|
|Wed, Oct 27||Operational semantics||Slides 11|
|Fri, Oct 29||Object-oriented programming||Slides J1|
|Mon, Nov 1||Object-oriented programming|
|Wed, Nov 3||Object-oriented programming|
|Fri, Nov 5||Object-oriented programming|
|Mon, Nov 8||Java Generics||Slides J2|
|Wed, Nov 10||Java Generics|
|Fri, Nov 12||Java Generics|
|Mon, Nov 15||Co/contravariance, wildcards|
|Wed, Nov 17||Type Erasure. Concurrency in Java|
|Fri, Nov 19||Concurrency in Java||Slides J5|
|Mon, Nov 22||Concurrency in Java||Example code|
|Wed, Nov 24||Concurrency|
|Fri, Nov 26||Thanksgiving: no class|
|Mon, Nov 29||Reflection in Java||Slides J3|
|Wed, Dec 1||Java virtual machine||Slides J6|
|Fri, Dec 3||Review, misc.|
|Mon, Dec 6||Java virtual machine|
- Torgesen et al.: Adding Wildcards to the Java Programming Language, http://www.jot.fm/issues/issue_2004_12/article5/
- Bracha: Generics in the Java Programming Language, http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
- Brian Goetz: Java theory and practice: Going atomic, http://www.ibm.com/developerworks/java/library/j-jtp11234/
- Sun's ``Concurrency tutorial'' http://java.sun.com/docs/books/tutorial/essential/concurrency/
- Sun's ``The Reflection API'' tutorial: http://java.sun.com/docs/books/tutorial/reflect/index.html
|Assignment 1 example answer||Due on Monday, 13th of September|
|Assignment 2 example answer||Due on Tuesday, 21th of September|
|Assignment 3 a3.tar||Due on Friday, 1st of October|
|Assignment 4 a4.tar||Due on Thursday, 21st of October|
|Assignment 5 a5.tar||Due on Sunday, 31st of October|
|Assignment 6 a6.tar||Due on Wednesday, 10th of November|
|Assignment 7||Due on Wednesday, 17th of November|
|Assignment 8||Due on Wednesday, 24th of November (no extensions!!!)|
|Assignment 9||Due on Friday, 10th of December|
There will be two exams, Midterm and Final. The midterm focuses on the Haskell portion of the class, the final exam on the Java portion. More information will be provided later.
The first exam will be on Wedesday, Oct 13th, during regular class hours. Exam is based on lectures and discussions in class, all slides, assignments 1–4, and chapters 1–10 and 12 from the Haskell book.
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,
Foo.hs in your favourite editor (== Emacs, with haskell-mode),
and invoke the GHC interpreter in a shell window:
The most commonly used commands are
:l Footo load the module
Foo(from your file
:rto re-load the previously loaded module
:i xto inspect the value, type, …
:qto quit the interpreter
The compiler is invoked, for example as:
ghci -fglasgow-exts --make
--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,
GHC and Emacs in linux.cs.tamu.edu
To set up ghc with Emacs, follow the directions below:
- Create a .emacs file (if you don't have one)
- 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"))
Launch emacs, start editing some Haskell file, such as
C-c llaunches the interpreter and loads the current file.
Date: 2010-12-07 17:30:00 CST
HTML generated by org-mode 7.01trans in emacs 23