-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
40 lines (33 loc) · 897 Bytes
/
run.sh
File metadata and controls
40 lines (33 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
BIN=target/debug/sat_solver
cargo build
export RUST_LOG=info
test_unsat () {
mkdir -p output/${1}/unsatisfiable
for FILE in $2/*
do
($BIN $FILE --heuristics $1 --check || return 1) >> output/${1}/unsatisfiable/$(basename ${2}) 2>&1
done
}
test_sat () {
mkdir -p output/${1}/satisfiable
for FILE in $2/*
do
($BIN $FILE --heuristics $1 --check --satisfiable || return 1) >> output/${1}/satisfiable/$(basename ${2}) 2>&1
done
}
for HEUR in "ascending" "dlis" "vsids"
do
for FOLDER in input/unsatisfiable/*
do
test_unsat $HEUR $FOLDER &
done
for FOLDER in input/satisfiable/*
do
test_sat $HEUR $FOLDER &
done
done
wait
echo "All variable assignments for satisfiable expressions were valid"
echo "All expressions were correctly identified as satisfiable or unsatisfiable"
echo "Test is completed"