INF220 - Software Specification

INF220 - Programvarespesifikasjon

Autumn 2021

Contents on this web page

Course outline and curriculum

The course is about the design and reuse of software components. For this we use the framework of institutioni theory and algebraic specifications. The theory is illustrated with practical programming in Magnolia. Magnolia is an experimental programming language tightly integrating specifications and code. Its semantical model can map directly to hardware, allowing usi, e.g., to program GPUs. Compiled code can be run as command line applications or microservices. The language design supports high integrity programming (reliable, robust, safe, secure) by validating correctness and guarding every operation. The course will cover topics like the following.
  1. Algebraic specifications for discovering and defining API contracts. This process is called Domain Engineering.
    Good API design is central for domain specific languages, software product lines, microservices and web services in general.
  2. Institutions as a framework for modularisation, reuse, specification and testing.
  3. Semantic models: mathematical abstractions, bit patterns from hardware, abstract syntax trees and free constructions.
    (Partial) evaluators for free.
  4. Generic programming for code reuse and remodelling of axioms.
  5. Cheap verification of generic code: free theorems, axiom inheritance, proof by testing.
  6. Guarding (preconditions) against partiality.
    Free Constructions for error recovery.
  7. Extended reuse by Syntactic Theory Functors (STFs) and Syntactic Model Functors (SMFs).

Reading Material

The curriculum consists of all lectures, notes, handouts, exercises, and related course material, most of it will be covered in the following handout (to be made available later — check mittuib) and text book.

The following supplementary reading material gives an idea about the course contents.

Additional Reading Material

For those especially interested in reading up on the background material, the following (classical) books are recommended.

Teachers

Lecturer and course responsible: Magne Haveraaen
Teaching assistant: TBD
Guest appearance: Dines Bjørner on Domain Engineering

The participants are adviced to organise study groups for discussing the topics of the course and assist each other in solving the exercises.

Covid-19

UiB guidelines for keeping safe.

Please also keep me informed if you cannot make it to a lecture.

I will try to stream the lectures for those who are in quarantine. See MittUiB for details.

Schedule for lectures and seminar groups

See the official schedule, subject to change: Teaching starts Tuesday 24 August 2021 (week 34), Teaching will be in the form of lectures, exercises and time off for self studies. The HiB building (Høyteknologisenteret i Bergen) is Thormøhlensgt 55, 5008 Bergen. The room is in datablokken, the taller of the two towers (to the right of the main entrance).

Semester plan

The following teaching plan is very tentative and guaranteed to change.
  1. Domain engineering beginnings
  2. Algebraic specification: interface, expression, model, assignment, evaluation, property specification, homomorphism (theory)
  3. Exercise set 1 (Set theory)
    Exercise set 2 (Axiom based testing)
  4. Monday: Exercises
    Algebraic specification: reuse (interface morphisms), satisfaction, institutions (theory)
  5. Algebraic specifications: procedures, predicates, composition of homomorphisms/interface morphisms, generated/free/initial algebras, evaluation homomorphism (theory)
    Thursday: Exercise set 1 & 2
  6. Introduction: Magnolia overview (language and library)
    Magnolia specifications: semigroup, monoid, group, lattice (pointless topology), sheaf, preorder.
    Domain engineering (API, microservices, software product lines)
    Algebraic specifications: constructing algebras (products, subalgebras, quotients), specification expressiveness (theory)
    Thursday: Exercise set 3 (Algebraic theory)
    Exercise set 4
  7. Generic programming (theory, Magnolia)
    Data structures: products, powers, data invariants, congruences
    Cheap verification
    Presentation of three domain engineering problems to be solved using Magnolia (compulsory assignment)
    Exercise set 5 (Installing Magnolia, Magnolia tutorial)
  8. Hackathon/Exercise set 6 (preferably several full days): solving the domain engineering problems in Magnolia
  9. TBD
  10. Student presentations: solution to the problems (compulsory)
  11. Assertions, pre-/post conditions
  12. Software development
  13. Data abstraction
  14. TBD
The exam is planned for the end of November/beginning of December.

Exercises

The exercises will be provided as the course evolves, check mittuib.

Exam

The course will be evaluated by an oral exam.
Last updated 2021-08-20 by Magne Haveraaen