dbueno / funsat

An efficient, embeddable DPLL SAT solver in Haskell

This URL has Read+Write access

funsat / test.sh
100755 27 lines (18 sloc) 0.866 kb
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
#!/bin/bash
 
DSAT="./dist/build/funsat/funsat"
 
# record feature set
echo "SAT solver features under test:"
$DSAT --print-features
 
ABORT="error, exiting without completing tests"
FAILURE="test failure"
 
echo "Testing quick check properties"
time $DSAT --verify 2>&1
 
NSAT=1000
echo "Testing $NSAT satisfiable problems (20 vars)"
time ls -1 ./tests/problems/uf20/*.cnf | head -$NSAT | while read F; do $DSAT $F; done 2>&1 | grep -1 -i "unsatisfiable\\|assertion"
 
NSAT=1000
echo "Testing $NSAT satisfiable problems (50 vars)"
time ls -1 ./tests/problems/uf50/*.cnf | head -$NSAT | while read F; do $DSAT $F; done 2>&1 | grep -1 -i "unsatisfiable\\|assertion"
 
NUNSAT=1000
echo "Testing $NUNSAT unsatisfiable problems (50 vars)"
time ls -1 ./tests/problems/uuf50/*.cnf | head -$NUNSAT | while read F; do $DSAT $F; done 2>&1 | grep -1 -i "satisfiable[:]\\|assertion"