MSc: Models Software Systems
Models of Software Systems
- Course name: Models of Software Systems
- Course number: SE-07
Course characteristics
Key concepts of the class
- Formal Models
- Software Specification
- Software Verification
What is the purpose of this course?
Formal models and formal methods are gaining an increasing importance today - in academia and in industry - in particular due to the emerging of tool support used for modeling and analysis of systems. An important question is asked world-wide when developing academic curricula: what a software engineer should know about formal modeling? On what specific aspect a course should focus and help the perspective engineer to navigate such a complex and fast changing field? The course attempt to give a partial although consistent answer to this question by providing an introduction to the foundations and uses of formal modeling. The course can be seen as organized in three parts: the first part sets out the mathematical foundations on which the rest of the course is based. It presents the mathematical concepts, such as logics, proofs, theories, sets, functions, relations, etc., on which all modern modeling approaches build. The second part presents the concepts that allow to relate mathematics to computation and to software: state machines, invariants, pre- and post-conditions, proving properties about programs. The third part consists of particular notations and method of formal modeling showing how the general concepts of the second part can be turned into effective engineering tools.
Course Objectives Based on Bloom’s Taxonomy
- What should a student remember at the end of the course?
By the end of the course, the students should be able to recognize and define
- Define mathematical notions behind software specification and verification
- List different specification methods
- List different specification notations
- Define concurrency and related concepts
- List Popular verification tools
- What should a student be able to understand at the end of the course?
By the end of the course, the students should be able to describe and explain (with examples)
- Describe the basic mathematical machinery and how can be applied to improve software development and software quality
- Explain Strengths and weaknesses of specific models and logics
- Explain State machines and temporal logics
- Abstract formal models for certain classes of systems
- What should a student be able to apply at the end of the course?
By the end of the course, the students should be able to apply
- Formally modelling a system
- Reasoning about system properties
- Specifying a system in Z
- Coding in languages like PROMELA for model checking
- Using SPIN model checker
Course evaluation
Proposed points | ||
---|---|---|
Labs/seminar classes | 20 | 40 |
Interim performance assessment | 30 | 30 |
Exams | 50 | 30 |
If necessary, please indicate freely your course’s features in terms of students’ performance assessment: None
Grades range
Proposed range | ||
---|---|---|
A. Excellent | 90-100 | 80-100 |
B. Good | 75-89 | 65-79 |
C. Satisfactory | 60-74 | 50-64 |
D. Poor | 0-59 | 0-49 |
If necessary, please indicate freely your course’s grading features: The semester starts with the default range as proposed in the Table 1, but it may change slightly (usually reduced) depending on how the semester progresses.
Resources and reference material
- Handouts supplied by the instructor
Course Sections
The main sections of the course and approximate hour distribution between them is as follows:
Section | Section Title | Teaching Hours |
---|---|---|
1 | Mathematical Foundations | 12 |
2 | Concepts of computation and software | 8 |
3 | Formal Modelling | 32 |
Section 1
Section title:
Mathematical Foundations
Topics covered in this section:
- Propositional & Predicate Logic
- Sets, Relations, Functions
What forms of evaluation were used to test students’ performance in this section?
|a|c| & Yes/No
Development of individual parts of software product code & 0
Homework and group projects & 1
Midterm evaluation & 1
Testing (written or computer based) & 1
Reports & 1
Essays & 0
Oral polls & 0
Discussions & 1
Typical questions for ongoing performance evaluation within this section
- What is a formal system? What is a rewriting system?
- What is the difference between propositional and predicate logic?
- What is a predicate? What is a connective?
- What is a quantifier? Existential? Universal?
- Given a specific formula define the truth table?
- Check if a specific formula is a tautology or a contradiction.
- State the difference between relation and function
- Computing the intersection or union of two sets
- What are De Morgan Laws? Example of applications.
- Operators of set theory.
Typical questions for seminar classes (labs) within this section
- Check if given formulas are well-formed. For those that are not briefly explain why.
- Prove that a given statement is a theorem in a given formal system.
- Augment a given formal system so that given statements become theorems in that formal system.
- Construct a truth table for given propositions.
- For given satisfiable propositions, provide z3 code that proves their satisfiability.
- Translate given predicates into English sentences using the provided translation key.
- Translate given sentences into predicate logic, using the translation key provided.
- Identify theorems among given propositional statements using z3.
- Provide a linear/tree proof of a statement identified as a theorem.
- Prove in Isabelle proof assistant a statement identified as a theorem.
Test questions for final assessment in this section
- Given a set of different formulas define truth tables
- Given a set of different formulas define those that are tautology and/or contradiction
- Compute operations over some specific instances of sets
- Determining satisfiability of a formula
- Model natural language as propositional or predicate logic formulas
Section 2
Section title:
Concepts of computation and software
Topics covered in this section:
- Proof Techniques, Induction
- State Machines
What forms of evaluation were used to test students’ performance in this section?
|a|c| & Yes/No
Development of individual parts of software product code & 0
Homework and group projects & 1
Midterm evaluation & 1
Testing (written or computer based) & 1
Reports & 1
Essays & 0
Oral polls & 0
Discussions & 1
Typical questions for ongoing performance evaluation within this section
- What is a state machine and how it is formally defined?
- What is s state, initial state, final state?
- What is the language accepted by a machine?
- Design a state machine for some specific purpose
- Verify that a state machine performs a given goal
- How does a proof system work?
- What is natural deduction and for what it is used?
- What is an inference rule?
- Prove specific theorems in natural deduction
- What are preconditions and postconditons?
Typical questions for seminar classes (labs) within this section
- Give a 4-tuple description of a state machine.
- What are the reachable states of a state machine?
- Implement a state machine in the LTSA tool; provide your code.
- Does a state machine have any progress or safety violations? Provide the corresponding output from LTSA. .
- Given a UML class diagram, annotate its classes with class invariants in OCL.
- Given a UML class diagram, annotate its methods with preconditions in OCL.
- Given a UML class diagram, annotate its methods with postconditions in OCL.
Test questions for final assessment in this section
- Prove theorems in natural deduction
- Design a state machine for some specific purpose
- Verify that a state machine performs a given goal
- Determine the language recognized by a state machine
Section 3
Section title:
Formal Modelling
Topics covered in this section:
- UML
- Z/B/Event-B
- Model Checking
- Linear Temporal Logic
- Concurrency
- Petri Nets
- Alloy
- Process Algebra
- CSP
- Autoproof
What forms of evaluation were used to test students’ performance in this section?
|a|c| & Yes/No
Development of individual parts of software product code & 1
Homework and group projects & 1
Midterm evaluation & 0
Testing (written or computer based) & 1
Reports & 1
Essays & 1
Oral polls & 0
Discussions & 1
Typical questions for ongoing performance evaluation within this section
- What are the UML diagrams and what is their purpose?
- What is OCL and what is its purpose?
- What is Z and what is its purpose?
- What is Design-by-contract and what is its purpose?
- Design UML Use Cases diagrams for some given system
- Design UML Class Diagrams for some given system
- Define OCL constraints for some parts of some given system
- Specify system requirements for a given system in Z
- Use temporal logic and model checkers to specify and verify system properties
- Use Design-by-contract and Autoproof to specify and verify system properties
Typical questions for seminar classes (labs) within this section
- Specify a state space in Z.
- Specify initial states of a state space in Z.
- Specify CRUD operations of a state space in Z.
- Define a robust version of a Z specification.
- Provide an Alloy specification of a state space.
- Enrich an Alloy specification with axioms.
- Implement CRUD operations on an Alloy specification of a state space.
- Specify an assertion that you want to hold on an Alloy specification.
- Check an assertion in an Alloy specification using Alloy analyzer; correct the specification if the assertion does not hold.
Test questions for final assessment in this section
- Design UML Use Cases diagrams for some given system
- Design UML Class Diagrams for some given system
- Define OCL constraints for some parts of some given system
- Specify system requirements for a given system in Z
- Use temporal logic and model checkers to specify and verify system properties
- Use Design-by-contract and Autoproof to specify and verify system properties