1 # This program is free software; you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 # Copyright (C) Mathieu Desnoyers, 2009
17 # Authors: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
20 #CFLAGS=-DHASH64 -DREACH
23 #try pan -i to get the smallest trace.
26 SPINFILE_FAIR
=futex.spin
29 make futex_progress | tee futex_progress.log
30 make futex_progress_no_wake | tee futex_progress_no_wake.log
31 make futex_progress_late_dec | tee futex_progress_late_dec.log
32 make asserts | tee asserts.log
35 #show trail : spin -v -t -N pan.ltl input.spin
36 # after each individual make.
40 @echo
"Verification summary"
44 cat DEFINES
> .input.spin
45 cat
${SPINFILE} >> .input.spin
46 rm -f .input.spin.trail
47 spin
-a
-X .input.spin
48 gcc
-w
${CFLAGS} -DSAFETY
-o pan pan.c
49 .
/pan
-v
-c1
-X
-m10000000
-w19
50 cp .input.spin
$@.spin.input
51 -cp .input.spin.trail
$@.spin.input.trail
53 futex_progress
: clean futex_ltl run_weak_fair
54 cp .input.spin
$@.spin.input
55 -cp .input.spin.trail
$@.spin.input.trail
57 futex_progress_no_wake
: clean futex_ltl futex_progress_no_wake_define run_weak_fair
58 cp .input.spin
$@.spin.input
59 -cp .input.spin.trail
$@.spin.input.trail
61 futex_progress_no_wake_define
:
62 cp futex_progress_no_wake.
define .input.
define
64 futex_progress_late_dec
: clean futex_ltl futex_progress_late_dec_define run_weak_fair
65 cp .input.spin
$@.spin.input
66 -cp .input.spin.trail
$@.spin.input.trail
68 futex_progress_late_dec_define
:
69 cp futex_progress_late_dec.
define .input.
define
74 cat .input.
define >> pan.ltl
75 spin
-f
"!(`cat futex.ltl | grep -v ^//`)" >> pan.ltl
78 .
/pan
-a
-v
-c1
-X
-m10000000
-w19
81 gcc
-w
${CFLAGS} -o pan pan.c
83 pan.c
: pan.ltl
${SPINFILE}
84 cat DEFINES
> .input.spin
85 cat .input.
define >> .input.spin
86 cat
${SPINFILE} >> .input.spin
87 rm -f .input.spin.trail
88 spin
-a
-X
-N pan.ltl .input.spin
90 run_weak_fair
: pan_fair
91 .
/pan_fair
-a
-f
-v
-c1
-X
-m10000000
-w20
94 gcc
-w
${CFLAGS} -o pan_fair pan_fair.c
96 pan_fair.c
: pan.ltl
${SPINFILE_FAIR}
97 cat DEFINES
> .input.spin
98 cat .input.
define >> .input.spin
99 cat
${SPINFILE_FAIR} >> .input.spin
100 rm -f .input.spin.trail
101 spin
-a
-X
-N pan.ltl .input.spin
104 .PHONY
: clean default
distclean summary
106 rm -f pan
* trail.out .input.spin
* *.spin.trail .input.
define
108 rm -f
*.trail
*.input
*.log