-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_experiments.sh
executable file
·42 lines (38 loc) · 1.44 KB
/
run_experiments.sh
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
41
42
#!/bin/bash
table="
| Properties | Total Time | NuSMV Running Time |
| -------------------------------------------------------------------------------- | --------------------- | --------------------- |";
for filename in Examples/*.cil; do
bname="$(basename -- $filename)"
echo " ------------------------------------------------------------------------ "
echo " verifying $bname"
echo " ------------------------------------------------------------------------ "
exec 3>&1 4>&2
time=$( { time dune exec IFCILverif $filename 1>&3 2>&4; } 2>&1 )
exec 3>&- 4>&-
time="${time//[$'\r\n ']}"
user=${time%%s*}
user=${user#real }
user=${user:5}
namelen=${#bname}
timelen=${#user}
exec 3>&1 4>&2
atime=$( { time ./NuSMV NuSMVinput.tmp 1>/dev/null 2>/dev/null; } 2>&1 )
exec 3>&- 4>&-
atime="${atime//[$'\r\n ']}"
auser=${atime%%s*}
auser=${auser#real }
auser=${auser:5}
atimelen=${#auser}
let "confpadlen = 80 - $namelen"
let "timepadlen = 20 - $timelen"
let "atimepadlen = 20 - $atimelen"
ch=' '
confspaces=`printf '%*s' "$confpadlen" | tr ' ' "$ch"`
timespaces=`printf '%*s' "$timepadlen" | tr ' ' "$ch"`
atimespaces=`printf '%*s' "$atimepadlen" | tr ' ' "$ch"`
table="$table
| $bname$confspaces | "$user"s$timespaces | "$auser"s$atimespaces |"
echo ""
done
echo "$table"