Declarative Programming
A.Y. 2025/2026
Learning objectives
The aim of the course is to provide the students with a solid understanding of declarative programming, in the functional and logic flavor. The peculiarity of the course is to see the latter as an extension of the former. We will apply the paradigm to several areas, including automated theorem proving and the semantics of programming
languages.
languages.
Expected learning outcomes
Students will be able to write programs of medium complexity in both paradigms and appreciate their complementary features
Lesson period: Second semester
Assessment methods: Esame
Assessment result: voto verbalizzato in trentesimi
Single course
This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.
Course syllabus and organization
Single session
Responsible
Lesson period
Second semester
Course syllabus
Part 1: the functional paradigm (F#)
- recursion and iteration
- typing and polymorphism
- algebraic data types
- property based testing
- higher-order functions
- lazy evaluation
- abstract data types
- monads and continuations
--------------------------------------------
Second part: "correct-by-construction" programming using F*
- Contracts & refinement types (RT)
- RT & partial functions
- proving programs terminating
- model based reasoning
- notions of SMT's logic
- equality types, definitional equality
- abstract data types & equational reasoning
- recursion and iteration
- typing and polymorphism
- algebraic data types
- property based testing
- higher-order functions
- lazy evaluation
- abstract data types
- monads and continuations
--------------------------------------------
Second part: "correct-by-construction" programming using F*
- Contracts & refinement types (RT)
- RT & partial functions
- proving programs terminating
- model based reasoning
- notions of SMT's logic
- equality types, definitional equality
- abstract data types & equational reasoning
Prerequisites for admission
None. We suggest you have taken Logic, Programming 1 & 2 and Algorithms
Teaching methods
Lectures and labs.
Teaching Resources
Web page:
https://myariel.unimi.it/mod/folder/view.php?id=38751
References:
Part 1: Functional Programming using F# , Michael R. Hansen and Hans Rischel.
Part 2: online book Proof-oriented Programming In F*
https://fstar-lang.org/tutorial/proof-oriented-programming-in-fstar.pdf
https://myariel.unimi.it/mod/folder/view.php?id=38751
References:
Part 1: Functional Programming using F# , Michael R. Hansen and Hans Rischel.
Part 2: online book Proof-oriented Programming In F*
https://fstar-lang.org/tutorial/proof-oriented-programming-in-fstar.pdf
Assessment methods and Criteria
The exam (three hours long) takes place in the lab and consists of writing short programs on topics covered in the course. The grade on a 1-30 scale will depend on the correctness and elegance of the given solutions. Grades will be communicated on the course home page in an anonymous way
INF/01 - INFORMATICS - University credits: 6
Lessons: 48 hours
Professors:
Fiorentini Camillo, Momigliano Alberto Davide Adolfo
Professor(s)