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.
- Functional programming with Haskell.
- Recursive programming and structural induction.
- Lexical analysis and parsing.
- Programs and grammars as data objects: metaprogramming, interpreters.
- Algebraic expressions as data objects: symbolic math.
- Logical formulas as data objects: theorem proving and the basis of logic programming.
Schedule
- Tuesdays: 11:30-13:20, SUR 5240, Jan. 3 - Apr. 2, 2019
- Thursdays: 11:30-12:20, SUR 5240, Jan. 8 - Apr. 4, 2019
- Final Exam: Tuesday, Apr. 16, 2019, 12:00-15:00, SUR 3090
Contact Info and Office Hours
- Professor
- Rob Cameron
- email @sfu.ca: cameron
- Burnaby office: TASC 9215
- Surrey office: Galleria 4178
- Surrey lab: Galleria 4120
- Open lab hours (Surrey): MWF 11:00-12:00
- TA
- Nigel Medforth
- email @sfu.ca: nmedfort
- Surrey lab: Galleria 4120
- Open lab hours (Surrey): TR 1:30-3:00
Grading
- Assignments, 40%; Midterm, 20%; Final Exam, 40%.
- 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.
adjusted_mark (mark, out_of) final_percentage =
((max (mark/out_of) (final_percentage/100)) * out_of, out_of)
- Timeliness is important, but good work is even more important.
- Late policy for assignments: 5% per day, max 4 days.
- Final Exam: Tues. Apr 16 @ 12:00 noon - 3:00 pm, Room TBD.
- Alternative Project-Based Evaluation: Parabix/icgrep
- Start with the Parabix Familiarity Exercise
- Requires completion of Parabix assignment with > 80% mark.
- Requires > 80% on midterm exam.
- Requires an instructor-approved project proposal
- Grading basis: 20% assignments, 20% midterm, 60% final project.
Notes
Introduction
- Jan. 3, 2019
- Course Intro
- What is Symbolic Computing?
- Symbolic Computing Case Study: icgrep
- Haskell Notes and Resources
The Regular Expression Domain and Simple Regular Expression Matching
- Jan. 8, 2019
- Jan. 15, 2019
- Jan. 22, 2019
- Jan. 24, 2019
- Jan. 29, 2019
- Haskell Type Classes
- Modules in Haskell
- Generalizing
map
: The Functor Class - Regular Expressions and Functors
- Haskell IO
- Haskell Command Line Processing
The Algebraic Expression Domain and Symbolic Differentation
- Jan. 31, 2019
- Feb. 5, 2019
Symbolic Computing for Programming Languages
- Feb. 7, 2019
- Feb. 14, 2019
- Feb. 26, 2019
- Building a Small Lisp interpreter in Haskell
- Example program: Symbolic Differentiation in Small Lisp
- Components of the Haskell Interpreter
- Feb. 28, 2019
- Mar. 5, 2019
- Midterm
- Mar. 7, 2019
- Small Lisp interpreter
- Mar 12, 2019
- A Lisp-in-Lisp interpreter
- March 14, 2019
- Updated: Haskell IO
- Small Lisp Source Files
- Symbolic Logic
- March 19, 2019
- March 21, 2019
- March 28, 2019
- April 2, 2019
- April 4, 2019