10af03de4e050fb4e4bfdfbbf19199214eb35d30
[model-checker.git] / README
1 ****************************************
2 CDSChecker Readme
3 ****************************************
4
5 This is an evaluation-only version of CDSChecker. Please do not distribute.
6
7 CDSChecker compiles as a dynamically-linked shared library by simply running
8 'make'. It should compile on Linux and Mac OSX, and has been tested with LLVM
9 (clang/clang++) and GCC.
10
11 Test programs should use the standard C11/C++11 library headers
12 (<atomic>/<stdatomic.h>, <mutex>, <condition_variable>, <thread.h>) and must
13 name their main routine as user_main(int, char**) rather than main(int, char**).
14 We only support C11 thread syntax (thrd_t, etc. from <thread.h>).
15
16 Test programs may also use our included happens-before race detector by
17 including <librace.h> and utilizing the appropriate functions
18 (store_{8,16,32,64}() and load_{8,16,32,64}()) for loading/storing data from/to
19 from non-atomic shared memory.
20
21 Test programs should be compiled against our shared library (libmodel.so) using
22 the headers in the include/ directory. Then the shared library must be made
23 available to the dynamic linker, using the LD_LIBRARY_PATH environment
24 variable, for instance.
25
26 Sample run instructions:
27
28   make
29   export LD_LIBRARY_PATH=.
30   # run test program
31
32 Note that we also provide a series of benchmarks, placed under the benchmarks/
33 directory. After building CDSChecker, you can build and run the benchmarks as
34 follows:
35
36   cd benchmarks
37   make
38   ./run.sh barrier/barrier -f 10 -m 2  # runs barrier test with fairness/memory liveness
39   ./bench.sh <dir>                     # run all benchmarks twice, with timing results; all logged to <dir>