CIS-3030 (Programming Languages) Home Page
This is the home page for Peter Chapin's CIS-3030 course notes for the Fall 2013 semester. Here
you will find class slides, homework assignments, program samples, and links to other references
of interest.
Adobe Connect
What follows is a list of topics covered in the lectures during this edition of CIS-3030.
The Adobe Connect recordings are no longer available.
- — Topics below are subject to change —
- Introduction to the course and the tools we will use. First look at Haskell via the
interactive environment.
- Demonstration of writing simple functions using tuples, lists, and various other features.
Introduction to list comprehensions.
- More on list comprehensions and an introduction to pattern matching.
- Introduction to curried functions
and higher order functions.
- Preparation for Homework #2. First look at PNG files. Development of the checkCRC function.
- Some discussion on setting up Git and Eclipse for Homework #2. A further look at the PNG
chunk manipulation functions.
- Further discussion of using recursion to implement repeated execution of code (loops).
Refactored the PNG CRC checksum function to consolidate its parts into a single definition.
- Answered questions about Homework #2. Discussed "point free" style and tail recursion.
Introduced the concept of type classes.
- Introduced how to define algebraic data types. Implemented a few basic tree handling
functions.
- Reviewed the solution to Homework #2. Introduced the basic concept of logic programming and
went over my first Mercury program.
- Introduction to the theory of formal languages and context-free grammars.
- More detailed discussion of DFAs and regular languages.
- Reviewed Haskell function for simulating a DFA. Introduced Turing machines.
- Continued discussion of Turing machines.
- Reviewed defining algebraic data types. Introduced type constructors and record syntax.
- Value constructors as functions. Introduced the
Maybe
and Either
type constructors.
- Using user-defined data types to improve the PNG manipulation module. Practical
demonstration of the
Either
type.
- Introduced doing I/O with Haskell. Discussion of I/O actions and basic filtering and file
handling.
- More I/O with Haskell. Discussion of the improved PNG program that reads and writes PNG
files and uses ByteStrings.
- Discussion about subtyping and variance (covariance of arrays in Java). Introduction to
function subtyping.
- Discussed dynamic languages. Started discussing calling conventions.
- Completed the discussion of calling conventions and started discussion about nesC.
- Completed the discussion of nesC and component-oriented languages.
- First round of presentations.
- Second round of presentations.
- Final round of presentations.
Homework
If you need to edit the samples I provide, I recommend making a branch in the code sandbox repository for each assignment.
All homework assignments should be submitted electronically via Moodle by midnight on the due
date. Remember to include your name on each submission. Late submissions are not
accepted!
- Homework #1. Due: Wednesday, August 28, 2013.
- Homework #2. Due: Wednesday, September 18, 2013.
- Homework #3. Due: Friday, November 1, 2013.
- Homework #4. Due: Friday, November 22, 2013.
Samples
The following links reference some of the samples discussed in class (with supporting notes in
many cases). Read over the source files and be sure to experiment with the code!
- — Samples below are subject to change —
- Sample #1. This sample shows off some basic functions. Tuples,
lists, and list comprehensions are briefly demonstrated along with some other details.
- Sample #2. This sample demonstrates some basic pattern matching
constructs. Pattern matching is an essential technique in Haskell programming that you will
see again and again.
- Sample #3. This sample demonstrates curried functions and a few
higher order functions. Using higher order functions is another essential Haskell programming
technique.
- Sample #4. This sample demonstrates the basic concept of point
free style, tail recursive functions, and an introduction to type classes.
- Sample #5. This sample demonstrates defining your own algebraic
data types and using pattern matching to define functions over those types.
- Sample #6. This sample illustrates using the Maybe and
Either
type constructors for indicating errors.
Haskell Function of the Day
The following documents each showcase a single function (or sometimes a few related functions)
in the Haskell libraries.
Slides
Articles
Videos
Links
Last Revised: 2024-12-17
© Copyright 2024 by Peter Chapin <peter.chapin@vermontstate.edu>