Strumenti Utente

Strumenti Sito


magistraleinformatica:mpp:start

Questa è una vecchia versione del documento!


Models for Programming Paradigms

MPP 2026/27 (0077A, 9 CFU)

Lecturer: Roberto Bruni web, Filippo Bonchi

Other resources: Microsoft Teams

Office hours: Thursday 14:00-16:00


Objectives

The objective of the course is to present:

  • different models of computation,
  • their programming paradigms,
  • their mathematical descriptions, both concrete and abstract,
  • some intellectual tools/techniques for reasoning on models.

The course will cover the basic techniques for assigning meaning to programs with higher-order, concurrent and probabilistic features (e.g., domain theory, logical systems, well-founded induction, structural recursion, labelled transition systems, Markov chains, probabilistic reactive systems, stochastic process algebras) and for proving their fundamental properties, such as termination, normalisation, determinacy, behavioural equivalence and logical equivalence. Temporal and modal logics will also be studied for the specification and analysis of programs. In particular, some emphasis will be posed on modularity and compositionality, in the sense of guaranteeing some property of the whole by proving simpler properties of its parts.


Prerequisites

There are no prerequisites, but the students are expected to have some familiarity with discrete mathematics, first-order logic, context-free grammars, and code fragments in imperative and functional style.


Textbook(s)

Main text:

Other readings:

External resources:


Exam

The evaluation will be solely based on oral exams, which can involve the assignment of written exercises.

Registration to exams (mandatory): Exams registration system

During the oral exam the student must demonstrate

  • knowledge: his/her knowledge of the course material, and
  • problem solving: the ability to solve some simple exercises, and
  • understanding: the ability to discuss the reading matter thoughtfully and with propriety of expression.

Announcements

  • As the course starts:
    Each student must subscribe the Microsoft Teams channel of the course and then fill the form Students information to provide the following contact data and info about her/his background:
    1. first name
    2. last name
    3. enrolment number (numero di matricola), optional
    4. email
    5. bachelor degree (course of study and university)
    6. MSc course (if Computer Science, specify which curriculum)
  • then, fill the (optional) form about your familiarity with some of the subjects of the course: Familiar subjects

Lectures (1st part)

Microsoft Teams: Additional material is available on Teams.

N Date Time Room Lecture notes Links
1 Tue 15/09 11:00-13:00 PS4 01 - Introduction to the course
2 Wed 16/09 11:00-13:00 H 02 - Preliminaries:
from syntax to semantics, the role of formal semantics, SOS approach, small-step operational semantics, big-step operational semantics, denotational semantics, compositionality principle, normalisation, determinacy, consistency, equivalence, congruence
3 Fri 18/09 14:00-16:00 C1 Exercises

03 - Unification:
inference process, signatures, substitutions, most general than relation, unification problem, most general unifiers, unification algorithm
4 Tue 22/09 11:00-13:00 PS4 Exercises:
unification, goal-oriented derivations

04 - Logical systems:
logical systems, derivations, theorems, logic programs, goal-oriented derivations
5 Wed 23/09 11:00-13:00 H 05a - Induction:
precedence relation, infinite descending chains, well-founded relations, well-founded induction, mathematical induction, proof of induction principle, structural induction, termination of arithmetic expressions, determinacy of arithmetic expressions, many-sorted signatures, arithmetic and boolean expressions, structural induction over many-sorted signatures, termination of boolean expressions, memories, update operation, operational semantics of commands
6 Fri 25/09 14:00-16:00 C1 Exercises:
induction

05b - More induction (Structural Induction):many-sorted signatures, arithmetic and boolean expressions, structural induction over many-sorted signatures, termination of boolean expressions, memories, update operation, operational semantics of commands
7 Tue 29/09 11:00-13:00 PS4 Exercises:
induction

05c - More induction (Rule Induction):
divergence, rule for divergence, limits of structural induction, induction on derivations, rule induction, determinacy of commands
8 Wed 30/09 11:00-13:00 H 06 - Equivalence:
operational equivalence, concrete equivalences, parametric equivalences, equivalence and divergence

Exercises:
termination, determinacy, divergence

07 - Induction and recursion:
well-founded recursion, lexicographic precedence relation, Ackermann function, denotational semantics of arithmetic expressions, towards denotational semantics of commands
9 Fri 02/10 14:00-16:00 C1 Exercises:
termination, determinacy, divergence

08a - Partial orders and fixpoints:
consistency of operational and denotational semantics for arithmetic expressions, fixpoint equations, partial orders, Hasse diagrams, chains, least element, minimal element, bottom element, upper bounds, least upper bound, limits, complete partial orders, powerset completeness, prefix independence, CPO of partial functions
10 Tue 06/10 11:00-13:00 PS4 08b - Partial orders and fixpoints (Kleene's theorem):
monotonicity, continuity, Kleene's fixpoint theorem

Exercises:
well-founded recursion, posets, semantics
11 Wed 07/10 11:00-13:00 H 08c - Partial orders and fixpoints (Immediate Consequence Operator):
McCarthy's 91 function, recursive definitions of partial functions as logical systems, immediate consequences operator, set of theorems as fixpoint

09 - Denotational semantics:
lambda-notation, free variables, capture-avoiding substitutions, alpha-conversion, beta rule, conditionals, denotational semantics of commands, fixpoint computation
12 Fri 09/10 14:00-16:00 C1 10 - Consistency:
denotational equivalence, congruence, compositionality principle, consistency of commands, correctness, completeness
13 Tue 13/10 11:00-13:00 PS4 Exercises:
CPO, continuous functions, IMP
14 Wed 14/10 11:00-13:00 H 11a - Haskell:
an overview, Haskell ghci, basics, tuples, lists, list comprehension, guards, pattern matching, lambda, partial application, zip
Haskell
15 Fri 16/10 14:00-16:00 C1 11b - Haskell GHCi:
conditionals, cases, pattern matching, exercises, recursive definitions, let-in, where, map, filter, fixpoint operator, folds, application, function composition
Haskell
16 Tue 20/10 11:00-13:00 PS4 12a - HOFL:
syntax, pre-terms, types, types judgements, type system, type checking, type inference, principal type, type preservation

Exercises:
Haskell, type inference in HOFL
17 Wed 21/10 11:00-13:00 H 12b - HOFL:
canonical forms, operational semantics, lazy vs eager evaluation

Exercises:
HOFL, typing, operational semantics
18 Fri 23/10 14:00-16:00 C1 13a - Domain theory:
Integers with bottom, cartesian product, projections, switching lemma, functional domains, lifting, let notation

Exercises:
domains, HOFL denotational semantics
19 Tue 27/10 11:00-13:00 PS4 13b - Lifted Domains:
lifted domains, lifting operator, de-lifting

14 - Denotational semantics of HOFL:
definition and examples, type consistency, continuity theorems, apply, fix, curry, uncurry, substitution lemma, compositionality, only free variables matters, canonical terms are not bottom

Exercises:
HOFL, typing, denotational semantics, domains
20 Wed 28/10 11:00-13:00 H 14 - Denotational semantics of HOFL (ctd.):
continuity theorems, fix, curry, uncurry, substitution lemma, compositionality, only free variables matters, canonical terms are not bottom

15 - Consistency of HOFL:
Counterexample to completeness, correctness of the operational semantics, operational convergence, denotational convergence, operational convergence implies denotational convergence (and vice versa), operational and denotational equivalence, correspondence for type int, unlifted semantics, lifted vs unlifted semantics

Lectures (2nd part)

Microsoft Teams: Additional material is available on Teams.

N Date Time Room Lecture notes Links
21 Fri 30/10 14:00-16:00 C1 15 - Consistency of HOFL (ctd.):
unlifted semantics, lifted vs unlifted semantics

Exercises:
HOFL

16a - Erlang:
an overview, erl, numbers, atoms, tuples, lists, terms, variables, term comparison, pattern matching, list comprehension, modules, functions, guards, higher order, recursion, pids, spawn, self, send, receive, examples
Erlang
22 16b - GoogleGo:
an overview, playground, Go principles, variable declaration, type conversion, multiple assignments, type inference, imports, packages and public names, named return values, naked return, multiple results, conditionals and loops, pointers, struct, receiver arguments and methods, interfaces, goroutines, bidirectional channels, channel types, send, receive, asynchronous communication with buffering, close, select, communicating communication means, range, handling multiple senders, concurrent prime sieve
Google Go
23 17 - CCS:
Introduction to concurrency, Syntax, operational semantics, value passing, modelling imperative programs with CCS
24 18a - Towards bisimulation:
abstract semantics, graph isomorphism, trace equivalence, bisimulation game
25 18b - Bisimulation:
strong bisimulation, strong bisimilarity, strong bisimilarity is an equivalence, strong bisimilarity is a bisimulation, strong bisimilarity is the coarsest strong bisimulation, finitely branching processes, strong bisimilarity as a fixpoint, Phi operator, Phi is monotone, Phi is continuous (on finitely branching processes), guarded processes
26 18c - More on bisimulation:
some properties of guarded processes, Knaster-Tarski's fixpoint theorem, strong bisimilarity is a congruence, some laws for strong bisimilarity

19 - Hennessy-Milner logic:
modalities, HML syntax, formula satisfaction, converse of a formula, HML equivalence
27 20 - Weak Semantics:
weak transitions, weak bisimulation, weak bisimilarity, weak bisimilarity is not a congruence, weak observational congruence, Milner's tau-laws

21 - CCS at work:
playing with CCS (using CAAL), modelling and verification of mutual exclusion algorithms with CCS and CAAL
28 CCS at work:
playing with CCS (using CAAL), modelling and verification of mutual exclusion algorithms with CCS and CAAL

CAAL session (copy the text and paste it in the Edit panel)
CAAL
29 22a - Temporal logics:
linear temporal logic (LTL), linear structures models, shifting, LTL satisfaction, equivalence of formulas, automata-like models, computational tree logic (CTL* and CTL), infinite trees, infinite paths, branching structure, CTL* satisfaction, equivalence of formulas, CTL formulas, expressiveness comparison

22b - Mu-calculus:
mu-calculus syntax and semantics
30 22b - Mu-calculus:
positive normal form, least and greatest fixpoints, invariant properties, possibly properties, mu-calculus with labels

KAT:
Calculus of relations
31 KAT:
Kleene Algebras with Tests
32 KAT:
Kleene Algebras with Tests
33 KAT:
Reasoning about IMP programs
34 KAT:
Reasoning about IMP programs
End

Past courses

magistraleinformatica/mpp/start.1789029500.txt.gz · Ultima modifica: da Roberto Bruni

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki