CS 340 - Programming Language Design

Spring 2007

Announcements

Information

Syllabus

Resources

Example Code

Program
Purpose
matchdiv.rb
Match all <div class="..."> tags in an HTML file
removetags.rb
Remove HTML tags from an HTML file
animals.rb
Demonstrate Ruby objects/classes

Notes

A slide presentation on regular languages by Andrew McCallum, University of Massachusetts.  Slides 22-26 are a good overview of regular languages, regular expressions, and deterministic finite automata.  Note that in some slides the pipe character ("|") is used instead of plus ("+") to describe addition (a.k.a. "disjunction").

Lecture notes on context-free languages and grammars.

Lecture notes on pushdown automata and Turing machines.

Lecture notes on decidability and the Halting Problem; intro to Lambda calculus.

Lecture notes on currying and recursion in Lambda calculus.

Lecture notes on field layout and virtual methods in object-oriented languages.

Lecture notes on generic abstraction.

Ruby and basic Scheme

Scheme functions and recursion

Links

Why's (Poignant) Guide to Ruby

Programming Ruby, First Edition

Mastering Regular Expressions, 3rd Ed. (click on "Read Online")

DrScheme (nice implementation of Scheme for various platforms)

schemers.org (lots of information and links about Scheme)

How To Design Programs (web-based introductory Scheme programming textbook)

readscheme.org - Functional Programming Resources

x86 Calling Conventions (gcc uses the "cdecl" calling convention)

X86 Assembly/GAS Syntax (good tutorial on x86 assembly using the GNU assembler)

Intel IA-32 Architecture Manuals (see the instruction set references; note that they use Intel syntax rather than AT&T syntax)

Assignments

Assignment Due Solution
Assignment 1: Regular expressions and DFAs
Tuesday, January 30th by 11:59 PM
assign1-solution.pdf
Assignment 2: Context-free languages
Thursday, February 8th by 11:59 PM
assign2-solution.pdf
Assignment 3: Turing machines, Lambda calculus, values and types
Thursday, February 22nd by 11:59 PM
assign3-solution.pdf
Assignment 4: Variables and Storage, Binding and Scope
Thursday, March 22nd by 11:59 PM
assign4-solution.pdf
Assignment 5: Procedural/Data Abstraction, Generics, Assembly Language
Monday, April 16th by 11:59 PM
assign5-solution.pdf
Assignment 6: Text Processing with Ruby
Tuesday, April 24th by 11:59 PM

Assignment 7: Scheme Programming
Thursday, May 3rd by 11:59 PM

Extra Credit Assignment: Haskell
Friday, April 27th by 11:59 PM