Single-threaded counting

This example shows a single-threaded Counter class with several methods (both static and dynamic) to increase the counter. We verify that the different ways to increase `val` are functionally correct and do not have races.

General information

ID121
Articlenone
Back-endChalice
LanguageJava
FeaturesLoop invariants
Sources
Path to example filepermissions/Counter.java
Date2017-06-20

Statistical information

Lines of code43 lines (comments not included)
Lines of specification10 lines (23.26% of the total)
Computation time8775 milliseconds

Example code

Note, verification may take a while and has a time-out of 20 seconds.