Java threading

Simple example verification with Java threads. A simple thread (extending from java's Thread class) is forked and later joined. The thread increments a shared integer by one, which is asserted on after joining. Note, this verification example covers more than one file; 'SimpleThreadMain.java' is merely the main file.

General information

ID76
Articlenone
Back-endSilicon
LanguageJava
FeaturesFork/join concurrency, Witnesses
Sources
Path to example fileinheritance/SimpleThreadMain.java
Date2017-06-19

Statistical information

Lines of code25 lines (comments not included)
Lines of specification10 lines (40% of the total)
Computation time25841 milliseconds

Example code

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