FUNCTIONAL PROGRAMMING
- Overview
- Assessment methods
- Learning objectives
- Contents
- Delivery method
- Teaching methods
- Contacts/Info
The prerequisites for a profitable learning and for achieving the objectives of the course include the knowledge of the Java Programming Language presented in the fundamental teaching of Programmazione, which is therefore a pre-requisite. Moreover, the student is expected to have a good knowledge of discrete mathematics and basic data structures provided in the courses of Algebra e geometria and Algoritmi e strutture dati.
The exam aims to verify the acquisition and the correct understanding of the contents of the course. The exam is written, last 90 minutes and it is structured as follows: (part A) three questions concerning the theoretical aspects of functional programming languages; (part B) three exercises of the kind discussed during class exercises.
The final grade will be determined as follows: 50% from the knowledge of definitions and examples of the concepts dealt during the course (part A); 50% from the proper conduct of the exercises.
The final grade is expressed in a score out of 30, where 18 represents the minimum and 30 the maximum.
This course provides an introduction to functional programming and the related programming techniques. The primary goal is to provide students with the necessary knowledge to understand and to develop programs in the functional programming languages using Scala as case study. The course is thus formed by lessons that illustrate the fundamentals of functional programming and the related programming techniques and programming exercises using the Scala programming language.
Expected learning outcomes. Students will be able to.
(1) demonstrate their understanding of the basic principle of functional programming languages and their computational model;
(2) demonstrate their understanding of the principal programming techniques and data-structure in the functional programming setting;
(3) formulate and solve problems proposing the most suitable abstractions for their formalization in a functional programming setting;
(4) recognize and use the proper terminology of functional languages and functional programming.
• Fundamentals concepts of imperative, object-oriented and functional programming languages. (4h, goal 1)
• Fundamentals of functional programming languages: recursion and tail-recursion. (6h, goal 2)
• Substitution model, evaluation strategies (call-by-name and call-by-value). (4h, goals 1,3,4)
• Higher-order functions and currying. (6h, goals 1,4)
• Functional programming and objects. Type hierarchy, type parameters, polymorphism and constraints. Implementation in Scala. (6h, goals 2,4)
• The decomposition problem and pattern matching. (4h, goals 3,4)
• Mutable and immutable data structures. List, Vector, Trees, Maps. (8h, goal 2)
• Map, reduce and filter. (6h, goals 2,3)
• Correctness. (4h, goal 1)
The teaching activities consists of lectures (48h). The arguments presented during lectures are applied through class exercises; students are expected to actively participate in exercises discussion. The presented exercises have an essential role in preparing the final exam.
Office hours: by appointment via email.