File tree Expand file tree Collapse file tree 4 files changed +66
-3
lines changed Expand file tree Collapse file tree 4 files changed +66
-3
lines changed Original file line number Diff line number Diff line change 1
1
obj /
2
2
traces /
3
+ witness /
3
4
predictor
4
5
run_tests
5
6
.vscode /
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ SCRIPT_DIR=" $( dirname " $( realpath " $0 " ) " ) "
4
+ PROJECT_DIR=" $( dirname " $SCRIPT_DIR " ) "
5
+ TRACES_DIR=" $PROJECT_DIR /traces"
6
+ PROGRAM=" $PROJECT_DIR /predictor"
7
+
8
+ TIMEOUT=600
9
+
10
+ if [ ! -f " $PROGRAM " ]; then
11
+ echo " Error: $PROGRAM not found"
12
+ exit 1
13
+ fi
14
+
15
+ BENCHMARK_TRACES=(
16
+ # "cryptorsa"
17
+ # "linkedlist"
18
+ # "lusearch"
19
+ # "xalan"
20
+ # "bufwriter"
21
+ # "moldyn"
22
+ # "readerswriters"
23
+ # "ftpserver"
24
+ # "derby"
25
+ " jigsaw"
26
+ " account"
27
+ " airlinetickets"
28
+ " array"
29
+ " boundedbuffer"
30
+ " bubblesort"
31
+ " clean"
32
+ " critical"
33
+ " lang"
34
+ " mergesort"
35
+ " pingpong"
36
+ " producerconsumer"
37
+ " raytracer"
38
+ " twostage"
39
+ " wronglock"
40
+ )
41
+
42
+ for trace in " ${BENCHMARK_TRACES[@]} " ; do
43
+
44
+ if [ ! -f " $TRACES_DIR /$trace " ]; then
45
+ echo " Error: $trace not found"
46
+ continue
47
+ fi
48
+
49
+ echo " Running $trace "
50
+ gtimeout $TIMEOUT " $PROGRAM " -f " $TRACES_DIR /$trace " 2>&1
51
+ EXIT_CODE=$?
52
+
53
+ if [ $EXIT_CODE -eq 124 ]; then
54
+ echo " Error: $trace timed out"
55
+ continue
56
+ elif [ $EXIT_CODE -ne 0 ]; then
57
+ echo " Error: $trace failed with exit code $EXIT_CODE "
58
+ continue
59
+ fi
60
+ done
Original file line number Diff line number Diff line change @@ -253,14 +253,15 @@ uint32_t CasualModel::solve() {
253
253
z3::expr_vector race_sat (c_);
254
254
race_sat.push_back (race_con);
255
255
256
+ auto [e1 , e2 ] = filtered_cop_events_[i];
257
+
256
258
if (s_.check (race_sat) == z3::sat) {
257
259
race_count++;
258
-
259
260
if (log_witness_) {
260
- auto [e1 , e2 ] = filtered_cop_events_[i];
261
261
logger_.logWitnessPrefix (s_.get_model (), e1 , e2 );
262
262
}
263
263
}
264
+
264
265
i++;
265
266
}
266
267
Original file line number Diff line number Diff line change 4
4
#include < utility>
5
5
#include < vector>
6
6
7
+ #include " BSlogger.hpp"
7
8
#include " event.h"
8
9
#include " lockset_engine.h"
9
10
#include " trace.h"
@@ -54,7 +55,7 @@ class CasualModel {
54
55
55
56
inline bool hb (const Event& e1 , const Event& e2 ) {
56
57
return mhb_closure_.happensBefore (e1 , e2 ) ||
57
- (e1 .getTargetId () == e2 .getTargetId () &&
58
+ (e1 .getThreadId () == e2 .getThreadId () &&
58
59
e1 .getEventId () < e2 .getEventId ());
59
60
}
60
61
You can’t perform that action at this time.
0 commit comments