Understanding formal specifications through good examples
Paper i proceeding, 2018

Formal specifications of software applications are hard to understand, even for domain experts. Because a formal specification is abstract, reading it does not immediately convey the expected behaviour of the software. Carefully chosen examples of the software’s behaviour, on the other hand, are concrete and easy to understand—but poorly-chosen examples are more confusing than helpful. In order to understand formal specifications, software developers need good examples.

We have created a method that automatically derives a suite of good examples from a formal specification. Each example is judged by our method to illustrate one feature of the specification. The generated examples give users a good understanding of the behaviour of the software. We evaluated our method by measuring how well students understood an API when given different sets of examples; the students given our examples showed significantly better understanding.


property-based testing


Formal specification


Alex Gerdes

Göteborgs universitet

John Hughes

Chalmers, Data- och informationsteknik, Funktionell programmering

Nicholas Smallbone

Chalmers, Data- och informationsteknik, Funktionell programmering

Stefan Hanenberg

Universität Duisburg-Essen

Sebastian Ivarsson

Meng Wang

University Of Kent

Erlang 2018 Proceedings of the 17th ACM SIGPLAN International Workshop on Erlang

978-1-4503-5824-8 (ISBN)

17th ACM SIGPLAN International Workshop on Erlang
St Louis, USA,

Systematisk testning av cyberfysiska system (SyTeC)

Vetenskapsrådet (VR) (2016-06204), 2017-01-01 -- 2022-12-31.

Verktyg för snabb analys av globala system med hjälp av språk för funktionell och villkors-programmering

Europeiska kommissionen (EU) (EC/H2020/640954), 2015-02-01 -- 2018-01-31.

Property-based testing of Web services (PROWESS)

Europeiska kommissionen (EU) (EC/FP7/317820), 2012-10-01 -- 2015-09-30.


Annan data- och informationsvetenskap


Datavetenskap (datalogi)


Informations- och kommunikationsteknik



Mer information

Senast uppdaterat