CMPT 384 D1
Course Synopsis
This course considers modelling and programming techniques appropriate for symbolic data domains such as mathematical expressions, logical formulas, grammars and programming languages. Topics include recursive and functional programming style, grammar-based data abstraction, simplification and reduction transformations, conversions to canonical form, environment data structures and interpreters, metaprogramming, pattern matching and theorem proving.
Instructor's Objectives
Computer programs, English text, algebraic equations, musical scores and logical formulas are all examples of symbolic data domains. Programs that address many problems involving these domains carry out their tasks primarily by manipulating expressions in special purpose languages. This course will focus on one of the most important programming paradigms that provides convenient support for such programming applications: functional programming. In particular, the Haskell programming language designed to support this paradigm will be introduced to support the techniques used in addressing symbolic computing problems.
Prerequisites
CMPT 225, and (MACM 101 or ENSC 251 and ENSC 252)).
Topics
- Languages: expressions and grammars.
- Symbolic data: atoms, lists, structures.
- Principles of functional programming.
- Recursive programming and structural induction.
- Programs and grammars as data objects: metaprogramming.
- Algebraic expressions as data objects: symbolic math.
- Logical formulas as data objects: theorem proving and the basis of logic programming.
- Lexical analysis and parsing: interpreters
Contact Info and Office Hours
- Professor
- Rob Cameron
- email @sfu.ca: cameron
- Burnaby office: TASC1 room 8225
- Office hours (Burnaby): Monday 1030-1130, Wednesday 1430-1530
- Surrey office: Galleria 4178
- Surrey lab: Galleria 4120
- Open lab hours (Surrey): Tuesday/Thursday 1100-1230, 1300-1430
- TA
- Nigel Medforth
- email @sfu.ca: nmedfort
- Surrey lab: Galleria 4120
- Open lab hours (Surrey): Tuesday/Thursday 1100-1230, 1300-1430
Grading
- Assignments, 35%; Midterm, 20%; Final Exam, 45%.
- Assignments and midterms are learning opportunities with feedback.
- If you study your mistakes and demonstrate improved knowledge
on the midterm or final, you can improve your mark:
- The midterm percentage replaces any lower assignment 1 or 2 mark.
- The final exam percentage replaces any lower assignment or midterm mark.
- Timeliness is important, but good work is even more important.
- Late policy for assignment 3: 2% per day, max 6 days.
- Late policy for assignment 4: 2% per day, max 4 days.
- Final Exam: Sat. Apr 21 @ 12:00 noon - 3:00 pm, SWH 10041
Notes
Introduction
- January 3
The Regular Expression Domain and Simple Regular Expression Matching
- January 5
- January 8
- January 10
- January 12
- January 15
- January 17
- January 19
- Review of Simpleton RE Tool and Assignment 1 Discussion
- January 22
- January 24
The Algebraic Expression Domain and Symbolic Differentation
- January 26
- January 29
- February 1
- February 5
- Modules in Haskell
- Generalizing
map
: The Functor Class
- February 7
- February 19
- Assignment 2 Solutions (file: deriv.hs)
Midterm Review
- February 21: Midterm Review
The Domain of Small Lisp Programs and a Lisp Interpreter
- February 7
- February 9
- February 28
- March 7
- March 26
Symbolic Logic Formulas, Theorem Proving
- March 14
- March 19-21
- March 21
- April 6
Final Review
- April 9: Final Review