Testing concurrent data structures

209 views
Skip to first unread message

maneesh t s v

unread,
Jul 2, 2015, 8:48:18 AM7/2/15
to art-of-multiproc...@googlegroups.com
How do you test concurrent data structures for correctness? 
I mean how to generate test cases for concurrent data structures to show that they are correct without actually giving proofs?
Appreciate any effort to answer.
Thanks, everyone

kedar mhaswade

unread,
Jul 2, 2015, 11:35:39 PM7/2/15
to art-of-multiproc...@googlegroups.com
If you are looking to do it in Java, one way is to look at how the JDK's java.util.concurrent constructs are tested using the TCK developed by Doug Lea et. al.

Hope that helps.

Regards,
Kedar

Gavin Lowe

unread,
Jul 3, 2015, 11:13:43 AM7/3/15
to art-of-multiproc...@googlegroups.com
If by "correctness" you mean linearizability, you might want to look at http://www.cs.ox.ac.uk/people/gavin.lowe/LinearizabiltyTesting/.  There I present a testing framework that allows you to perform random operations on a concurrent datatype, record the history, and then check that the history is linearizable.  My experience is that it's pretty good for finding bugs, an it's easy to use.  My framework uses Scala; you should also be able to use it for testing Java.

Hope that helps.

Gavin
Reply all
Reply to author
Forward
0 new messages