INF220 - Program Specification

INF220 - Programspesifikasjon

Autumn 2015

Contents on this web page

Course outline and curriculum

The course couples theory to practical programming in Magnolia. Magnolia is a new programming language tightly integrating specifications and code with a foundation in institution theory. It supports high integrity programming (reliable, robust, secure) by validating correctness and guarding every operation. The course will cover topics like the following.
  1. Algebraic specifications as a means of defining API (application programmer interface) contracts.
  2. Institutions as a means of understanding modularisation, reuse and testing.
  3. Data invariants and congruences as a means for data abstraction.
  4. Assertions as a means of understanding algorithms.
  5. Pre-/post-conditions as a means of understanding methods.

Reading Material

The curriculum consists of all lectures, notes, handouts, exercises, and related course material. 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.


Lecturer and course responsible: Magne Haveraaen
Teaching assistant: TBD

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

Schedule for lectures and seminar groups

Teaching starts Tuesday August 18 2015 (week 34), Teaching will be in the form of lectures, exercises and time off for self studies.

Semester plan

The following teaching plan is very tentative and guaranteed to change.
  1. Introduction: Magnolia overview (language and library)
    Algebraic specifications: Interface, Algebra (theory)
    Algebraic specifications: Expressions (theory)
  2. Exercise set 1 (Set theory)
    Algebraic specifications: Evaluation, Equational Specifications (theory)
    Exercise set 2 (Installing Magnolia)
  3. Algebraic specifications: module reuse (theory, Magnolia)
    Magnolia specifications: Semigroup, Monoid, Group.
    Exercise set 3 (Magnolia Tutorial)
  4. Algebraic specifications (expressiveness): API vs logic (theory)
    Magnolia specifications: preorders, lattices.
    Exercise set 4
  5. Algebraic specifications: institutions (theory, Magnolia)
    Ralf Lämmel: 101 companies
  6. Hackathon/Exercise set 5 (2 full days): 101 companies in Magnolia
  7. Student presentations: 101 companies solved
  8. Data invariants and congruences
  9. TBD
  10. Assertions
  11. TBD
  12. Software development
  13. Pre-/post conditions
  14. TBD
  15. Data abstraction
The exam is planned for the end of November/beginning of December.


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


The course will probably be evaluated by an oral exam.
Sist oppdatert 2015-07-02 by Magne Haveraaen