Week |
Date |
Topic |
Read |
Exercises |
35 |
1. Sept. |
Course introduction
Intro. to functional programming and F#
Lists (brief introduction)
|
HR 1,
HR 2.1-2.6,
HR 4.1-4.3
|
Installation of F# and first programs
See Material folder on DTU Learn
|
36 |
8. Sept. |
Functions, Basic types, Tuples and Lists
|
HR 2, HR 3.1-3.3, 3.5, 3.6
HR 4.1 - 4.4
|
- HR 1.5, HR 2.2, 2.8, HR 4.7
- Mini-project on polynomials: Part 1
See Material folder on DTU Learn
|
37 |
15. Sept. |
Lecture slot: Recap of fundamental concepts
Selected old exam questions will be handed out (on Learn).
- Should be solved using paper and pencil only
- A TA will be available for answering questions
- Solutions will be presented.
|
|
- HR 2.1, 4.3, 4.8, 4.9, 4.12
- Consider your solution to 4.7 and make an evaluation of 'multiplicity 2 [1; 2; 8; 2]'
- Exercise on polynomials: Part 2. You may also consider/start on Part 3
- Paper and pencil exercises: HR 4.16, 4.17
- Write F#-programs having the types (1) bool -> bool, (2) int -> int -> int, (3) 'a -> 'b -> 'a and (4) 'a -> ('a -> 'b) -> 'b
- Merge sort. A program to generate random lists is here
|
38 |
22. Sept. |
Programming as a model-based activity
Property-based testing - Briefly
|
HR 3.4-3.7, HR 4
|
- Paper and pencil exercises:
- HR 4.18. Give an argument for the type of f.
- Problem 2 from Summer Exam in 2015. You find some old exams here
- HR 4.11
- Exercise on polynomials: Part 3.
|
39 |
29. Sept. |
Disjoint union (Tagged values)
Higher-order list functions
|
HR 3.8-3.11, HR 5.1
|
- SimpleCompanyClub
- Week5.pdf
- Exercise on polynomials: Start on Part 5 (invariant checking).
Properties concerning degrees should be considered next week.
|
40 |
6. Oct. |
Collections: Sets and Maps
|
HR 5.2-5.3
|
- HR 5.3
- Make a revised version of the Cash register example in Section 4.6 where:
- The function findArticle is replaced by an application of List.tryFind
- The function makeBill is declared using List.foldBack
You can find programs from the textbook here
- Solve last week's Luggage and Flight problem using functions from the List-library, whenever that is appropriate.
- Map coloring: validation of properties
- Polynomial exercise: Part 4. Thereafter, you can complete Part 5.
|
41 |
13. Oct. |
Modules
|
HR 7
|
- Revise your solution of the simple company club problem (Week 39) using sets and maps whenever that is appropriate.
- Problem 1 from Exam, Fall 2013.
- Problem 1 from Exam, Fall 2015.
Old exams can be found here
|
42 |
20. Oct. |
Autumn vacation
|
|
|
43 |
27. Oct. |
Finite trees (I)
Type inference shortly
|
HR 6
|
- Part 6 of exercise on polynomials
- Week8.pdf
|
44 |
3. Nov. |
Finite trees (II)
Functional and structural test shortly
|
HR 6
|
- File System
- Part 2 from Mini-project 2: Simple Compiler. See Material folder on DTU Learn.
- Thereafter you can continue with Part 1, Part 3 and Part 4 of Mini-project 2.
|
45 |
10. Nov. |
Tail recursion
|
HR 9
|
- Week10.pdf
- You may complete the simple-compiler miniproject.
- You may start on the mini-project on propositional logic
|
46 |
17. Nov. |
Sequences
From 11:10 - 12:00: Functional Programming in the Wild
Guest lecture by Torben Hoffmann
VP, Business Unit Lead for Erlang Solutions London, a Trifork company
|
HR 11 |
- Summer exam 02157-2014, Problem 1(1,2,3) -- available here
- Fall exam 02157-2014, Problem 2(4,5) -- available here
- Week11.pdf
Continue with mini-project on propositional logic.
|
47 |
24. Nov. |
Verification: A short lecture
Work on old exam questions for Week 12 in the auditorium
-- uploaded to Material folder on Learn.
|
|
11.1 and 11.9
CollatzConjecture.pdf
Week12.pdf
Summer exam 2014, Problem 1(4,5) -- available here
Fall exam 2014, Problem 2(1,2,3) -- available here
|
48 |
1. Dec. |
From 10:15 - 12:00 in the auditorium
- Brief discussion of Course Evaluation
- Work on exam set from Fall 2016.
See Material folder on Learn.
A TA will be available in the auditorium from 10:15 - 12:00
A solution will be uploaded to Learn.
|
|
From 8:15 - 10:00 in the exercise class:
- Work on exam set from Fall 2016. See Material folder on Learn.
|