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.
Fork/join concurrency, Witnesses
Path to example file
Lines of code
25 lines (comments not included)
Lines of specification
10 lines (40% of the total)
Note, verification may take a while and has a time-out of 20 seconds.