Understanding formal specifications through good examples
Paper in proceedings, 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.

Formal specification

QuickCheck

examples

property-based testing

Author

Alex Gerdes

Chalmers, Computer Science and Engineering (Chalmers), Functional Programming

Stefan Hanenberg

University of Duisburg-Essen

Sebastian Ivarsson

John Hughes

Chalmers, Computer Science and Engineering (Chalmers), Functional Programming

Nicholas Smallbone

Chalmers, Computer Science and Engineering (Chalmers), Functional Programming

Meng Wang

University Of Kent

13-24

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

Global systems Rapid Assessment tools through Constraint FUnctional Languages (GRACeFUL)

European Commission (Horizon 2020), 2015-02-01 -- 2018-01-31.

Systematic testing of cyber-physical systems (SyTeC)

Swedish Research Council (VR), 2017-01-01 -- 2022-12-31.

Property-based testing of Web services (PROWESS)

European Commission (FP7), 2012-10-01 -- 2015-09-30.

Subject Categories

Other Computer and Information Science

Software Engineering

Computer Science

Areas of Advance

Information and Communication Technology

DOI

10.1145/3239332.3242763

More information

Latest update

1/18/2019