McMaster University
Functional Programming

Comp Sci / Sfwr Eng 3FP3, Term 2 2019/20


Lectures

Term 2: Tuesday, Thursday, Friday 11:30-12:20, ABB 164

Tutorials

Friday 3:30-4:30, BSB 119

Instructor

Dr. J. Carette, ITB-168 , ext 26869, email: carette@mcmaster.ca.

I can be reached most easily via the class Discord (see Avenue for details), email, or right after class. Please make an appointment to see me if you have specific questions.

Teaching Assistant

Nhan Thai (thain1) and Habib Ghaffari-Hadigheh (ghaffh1)

Course Objectives

The calendar description says: Functional programming; lists and algebraic data types, pattern matching, parametric polymorphism, higher-order functions, reasoning about programs; lazy and strict evaluation; programming with monads; domain-specific languages.

textbookThe Craft of Functional Programming by Simon Thompson. The course content will generally follow the textbook. There will be few ``lectures'' per se; most classes will consist of either live coding or in-class exercises.

Preconditions

Will be posted soon. But generally, all the material from 2DM3 and 2FA3 will be assumed, as well as a certain 'programming maturity'.
  1. Students should know and understand:
    1. Logical Formalism
    2. Calculational Proofs in Propositional and Predicate Logic
    3. Induction, Recursion
    4. Discrete Structures: Sets, Functions, Relations
    5. Abstract data types
  2. Students should be able to
    1. Write programs in imperative and OO languages
    2. Debug programs
    3. Use the command line to call compilers and other tools

Learning Objectives

  1. Students should know and understand
    1. The basic types in functional languages
    2. What parametric polymorphism is
    3. The difference between lazy and strict evaluation
    4. Understand overloading (type classes)
  2. Students should be able to
    1. Use lists and other algebraic data types to solve problems
    2. Use pattern-matching on ADTs
    3. Give general types for their functions
    4. Use and create higher-order functions
    5. Reason about the correctness of their functions
    6. Write properties that their functions should satisfy
    7. Use randomized testing
    8. Use monads (and do notation) for encapsulating effects
    9. Build small DSLs and interpreters for them

Note that not all objectives will be measured for marks.

Graduate Attributes

Some of the graduate attributes below will be measured (probably most), in some fashion. These are measurements for the purposes of understanding your overall state in terms of the attributes which the CEAB deems important for engineers (and will be done whether you are in CS or SE). Some will be measured through assignments, presentations and deliverables (and worth marks), while others will be done via other means not directly tied to course marks.

Rubrics

Section to be completed.

Electronic Materials

The latest version of this outline and the most "up-to date" information as well as hand-outs can be found on the course web page. http://www.cas.mcmaster.ca/~carette/CS3FP3/W2020/index.html. (Or go to my home page and then to the course page). Avenue will be used for handing in assignments. Either Discord or Slack will be used for further coordination (TBD).

Grading

The assignments will be worth 50%, two midterms (each 15%) and a final worth 20%. More specifically, there will be 5 assignments, each worth 10%. The final exam covers the whole course.

As usual, there will be (significant) bonus parts on the assignments.

Marking schemes will be strict: code that does not compile will be worth very few marks (if any). You will be better off submiting a partial implementation that compiles that one that is 'almost done' but doesn't typecheck.

Each assignment will have a rubric with more details on how it will be graded. If grades need to be adjusted, most commonly the denominator will be reduced, i.e. some questions will be made 'bonus'.

MSAF on assignments will always be a 4 day extension from the original due date regardless of when it is submitted. MSAFs on midterms will be handled on a case-by-case basis. Late assignments are not accepted (without an MSAF).

Notes:

Discrimination

The Faculty of Engineering is concerned with ensuring an environment that is free of all adverse discrimination. If there is a problem that cannot be resolved by discussion among the persons concerned individuals are reminded that they should contact their Chair, the Sexual Harassment Office or the Human Rights Consultant, as soon as possible.

Course modifications

The instructor and university reserve the right to modify elements of the course during the term. The university may change the dates and deadlines for any or all courses in extreme circumstances. If either type of modification becomes necessary, reasonable notice and communication with the students will be given with explanation and the opportunity to comment on changes. It is the responsibility of the student to check their McMaster email and course websites weekly during the term and to note any changes.

Academic Integrity

You are expected to exhibit honesty and use ethical behaviour in all aspects of the learning process. Academic credentials you earn are rooted in principles of honesty and academic integrity.

Academic dishonesty is to knowingly act or fail to act in a way that results or could result in unearned academic credit or advantage. This behaviour can result in serious consequences, e.g. the grade of zero on an assignment, loss of credit with a notation on the transcript (notation reads: Grade of F assigned for academic dishonesty), and/or suspension or expulsion from the university.

It is your responsibility to understand what constitutes academic dishonesty. For information on the various types of academic dishonesty please refer to the Academic Integrity Policy [http://www.mcmaster.ca/academicintegrity].

The following illustrates only three forms of academic dishonesty:

  1. Plagiarism, e.g. the submission of work that is not one’s own or for which other credit has been obtained.
  2. Improper collaboration in group work.
  3. Copying or using unauthorized aids in tests and examinations.

Individual assignments have to be solved by one person only, any outside source, this includes asking other people, or using any books or information found on the web has to be documented. In complience with the senate regulations on academic integrity I remind you that: People who let other people copy are as guilty as the ones who copy. You are allowed to consult outside sources, meaning textbooks or the web, but any use of an outside source must be documented. Similarly, group assignments must be solved by members of that group only, and the above policies apply as well.

In the case the instructor or a TA has the impression that an assignment is copied, the instructor can ask the corresponding students to explain exactly how the assignment was prepared and take appropriate actions.

Online Component

In this course we will be using some online components. Students should be aware that, when they access the electronic components of this course, private information such as first and last names, user names for McMaster e-mail accounts, and program affiliation may become apparent to all other students in the same course. The available information is dependent on the technology used. Continuation in this course will be deemed consent to this disclosure. If you have any questions or concerns about such disclosure please discuss this with the course instructor.

ACADEMIC ACCOMMODATION OF STUDENTS WITH DISABILITIES

Students with disabilities who require academic accommodation must contact Student Accessibility Services (SAS) to make arrangements with a Program Coordinator. Student Accessibility Services can be contacted by phone 905-525-9140 ext. 28652 or e-mail sas@mcmaster.ca. For further information, consult McMaster University's Academic Accommodation of Students with Disabilities policy.

REQUESTS FOR RELIEF FOR MISSED ACADEMIC TERM WORK McMaster Student Absence Form (MSAF)

In the event of an absence for medical or other reasons, students should review and follow the Academic Regulation in the Undergraduate Calendar "Requests for Relief for Missed Academic Term Work".

ACADEMIC ACCOMMODATION FOR RELIGIOUS, INDIGENOUS OR SPIRITUAL OBSERVANCES (RISO)

Students requiring academic accommodation based on religious, indigenous or spiritual observances should follow the procedures set out in the RISO policy. Students requiring a RISO accommodation should submit their request to their Faculty Office normally within 10 working days of the beginning of term in which they anticipate a need for accommodation or to the Registrar's Office prior to their examinations. Students should also contact their instructors as soon as possible to make alternative arrangements for classes, assignments, and tests.

EXTREME CIRCUMSTANCES

The University reserves the right to change the dates and deadlines for any or all courses in extreme circumstances (e.g., severe weather, labour disruptions, etc.). Changes will be communicated through regular McMaster communication channels, such as McMaster Daily News, A2L and/or McMaster email.

January 2020