COMPUTATIONAL PARADIGMS FOR PROBLEM SOLVING

Mario VENTO COMPUTATIONAL PARADIGMS FOR PROBLEM SOLVING

8860500004
DEPARTMENT OF INFORMATION AND ELECTRICAL ENGINEERING AND APPLIED MATHEMATICS
Corso di Dottorato (D.M.226/2021)
INFORMATION ENGINEERING
2024/2025

OBBLIGATORIO
YEAR OF COURSE 1
YEAR OF DIDACTIC SYSTEM 2024
SPRING SEMESTER
CFUHOURSACTIVITY
318LESSONS
Objectives
To understand the main computational paradigms (a.k.a. computational styles): imperative,
functional, logic, object-oriented, event-driven, concurrent. To be able to analyze and solve practical problems by recurring to the most suitable computational paradigm.
Prerequisites
The activity requires the previous knowledge of fundamental algorithms (like searching, sorting, iteration etc.) and data structures (like linked lists and trees), and of recursion.
It is assumed that the student is already able, given a problem, to design and implement a recursive algorithm, possibly using a dynamic data structure, in a programming language.
Contents
Introduction to Computational Paradigms. Imperative paradigms and their limitations. Declarative paradigms: the functional paradigm and the logic programming paradigm. (Lectures: 2 hours)
Logic programming with Prolog: facts, queries, rules. Logic variables and their quantification. Unification. (Lectures: 1 Hours; Lab: 1 Hour)
Recursive predicates. Recursive data structures: lists. (Lectures: 1 Hour; Lab: 2 Hours)
Examples of problem solving using logic programming (Lab: 3 Hours)
Functional programming with Scheme: atoms and forms; quoting; lists. (Lectures: 1 Hour; Lab: 1 Hour)
High order functions, delayed evaluation and streams (Lectures: 1 Hour; Lab: 2 Hours)
Example of problem solving using functional programming (Lab: 3 Hours)
Teaching Methods
The course includes 6 hours of lectures and 12 hours of laboratory. Lectures are aimed at acquiring knowledge about computational paradigms, especially non-imperative ones (logic and functional). Laboratory is aimed at acquiring applied knowledge and skills about solving problems using the logic or functional paradigms.
Attendance to the lectures and laboratory is mandatory; in order to be admitted to the exam, the student must participate to at least 70% of the hours.
Verification of learning
The exam consists in a programming test, composed of two exercises aimed at verifying the ability to solve programming problems using respectively the logic programming paradigm and the functional programming paradigm. The student will be given a description of the problems and will be required to design and implement a solution, using both the theoretical knowledge of the logic and functional paradigms and the applied skills on Prolog and Scheme acquired in the course.

Texts
References
[1] H. Abelson, G. J. Sussman with J. Sussman, "Structure and Interpretation of Computer Programs" (MIT Press, 1996)
[2] L. Sterling, E. Shapiro, "The Art of Prolog: Advanced Techniques" (MIT Press, 1994)
  BETA VERSION Data source ESSE3 [Ultima Sincronizzazione: 2024-12-13]