This page gives highlights of past lectures and provides lecture notes, reading assignments, and exercises.
Dates | Topics and Readings | Exercises |
---|---|---|
Aug 24 Aug 26 |
Course introduction and administration. Introduction to Formal Methods. What are formal methods and how they help in software development. Required Readings: Recommended Readings: |
|
Aug 31 Sep 2 |
Introduction to sets and relations. Recap of basic notions in set theory. Relations and relational operators. Modeling general software systems. Introduction to the Alloy modeling language. Alloy's foundations. Signatures, fields and multiplicity constraints. Modeling simple domains in Alloy. Generating and analyzing model instances with the Alloy Analyzer. Required Readings:
|
All exercises in set and relations notes |
Sep 7 Sep 9 |
Relations and operations on them. Formulas, Boolean operators and quantifiers. Expressing constraints on relations using Alloy formulas. Examples of constraints. Exercises. Required Readings:
|
Exercises in lecture notes |
Sep 14 Sep 16 |
More Alloy operators. Operator precedence and parsing. Facts and assertions. Checking models and assertions with the Alloy Analyzer. Signature scopes. Functions and predicates. Examples and exercises. Practice with modeling in Alloy: the Academia domain. Required Readings:
|
All exercises in the Part 2 and 3 lecture notes |
Sep 21 Sep 23 |
More practice with modeling in Alloy: the Academia domain. Examples and exercises. Alloy's module system. Motivations and uses. Parametric modules. An example: the predefined Ordering module. Modeling dynamic systems in Alloy. Example: making the family model dynamic. Required Readings:
|
- All exercises in the Academia Model notes - First exercise in Dynamic Models notes |
Sep 28 Sep 30 |
More on dynamic models. Explicit time modeling and implicit time modelling in Alloy 5 (Electrum Alloy). General approach: dynamic systems as state transition systems. Operators. Preconditions, postconditions and frame conditions. Examples of operators for the family model.
Introduction to Electrum Alloy (Alloy 5).
Modeling dynamic systems in Alloy 5.
Examples.
Group exercises.
|
All exercises in Dynamic Models notes |
Oct 5 Oct 7 |
Introduction to reactive systems.
Introduction to the Lustre specification language. Required Readings:
|
Exercises in Lustre notes |
Oct 12 Oct 14 |
Practice with writing Lustre models and expressing their properties.
Simulating and checking Lustre models with Kind 2 (online examples).
Required Readings: Recommended Readings: |
Exercises in Lustre notes |
Oct 19 |
Midterm exam |
|
Oct 21 |
More practice with writing Lustre models and expressing their properties. Using counterexamples to debug the model. Traffic light examples. Required Readings:
|
Simulate and verify in Kind 2 all Lustre examples in the readings |
Oct 26 Oct 28 |
Contract-based specification and compositional verification. Motivation and uses. Extending Lustre with contracts. Contract basics: assumptions, guarantees and execution modes. Examples of contracts. Required Readings:
|
Simulate and verify in Kind 2 the Lustre examples in the readings |
Nov 2 |
More on contract-based specification. Specifying system modes in Kind 2's contract language. Modular and compositional analysis in Kind 2. Motivation and examples. Required Readings:
|
|
Nov 4 |
Specifying and verifying programs in high-level programming languages. Introduction to Dafny. Method contracts in Dafny. Specifying pre and post-conditions. Compositional verification of methods through the use of contracts. Required Readings:
|
Exercises in lecture notes |
Nov 9 Nov 11 |
Introduction to Floyd-Hoare logic.
Formalizing program behavior with Hoare triples.
Strongest postconditions and weakest preconditions.
The WP and SP operators.
Computing WPs and SPs for assignments, sequential compositions,
conditional statements, and methods calls.
Assert and assume statements.
Method vs function calls in Dafny.
Partial expressions.
Required Readings:
|
Exercises in lecture notes |
Nov 16 Nov 18 |
Dafny in action. Various examples.
Required Readings:
|
Exercises in lecture notes |
Nov 23 Nov 25 |
No class (Thanksgiving recess) |
|
Nov 30 Dec 2 |
More on arrays. Binary search. Reading and writing frames for reference variables. Methods that modify arrays. Examples. Classes and Objects in Dafny. Specifying classes as abstract data types to separate observable behavior from internal implementation. Examples: counters and alternative implementations of FIFO queues. Required Readings: |
|
Dec 7 Dec 9 |
The use of dynamic frames in Dafny to specify and verify programs using objects. Motivation and uses. Queue, counter, bank account and linked list examples. Required Readings:
|
|
Dec 13 |
Final Exam |
|