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
=mem-progress.spin
29 make refcount | tee refcount.log
30 make refcount_4_bits_per_byte | tee refcount_4_bits_per_byte.log
31 make lock_progress | tee lock_progress.log
32 make lock_progress_4_bits_per_byte | tee lock_progress_4_bits_per_byte.log
33 make asserts | tee asserts.log
36 #show trail : spin -v -t -N pan.ltl input.spin
37 # after each individual make.
41 @echo
"Verification summary"
45 cat DEFINES
> .input.spin
46 cat
${SPINFILE} >> .input.spin
47 rm -f .input.spin.trail
48 spin
-a
-X .input.spin
49 gcc
-w
${CFLAGS} -DSAFETY
-o pan pan.c
50 .
/pan
-v
-c1
-X
-m10000000
-w19
51 cp .input.spin
$@.spin.input
52 -cp .input.spin.trail
$@.spin.input.trail
54 refcount
: clean refcount_ltl run
55 cp .input.spin
$@.spin.input
56 -cp .input.spin.trail
$@.spin.input.trail
61 cat .input.
define >> pan.ltl
62 spin
-f
"!(`cat refcount.ltl | grep -v ^//`)" >> pan.ltl
64 refcount_4_bits_per_byte
: clean refcount_ltl config_4_bits_per_byte_define run
66 lock_progress
: clean lock_progress_ltl run_weak_fair
67 cp .input.spin
$@.spin.input
68 -cp .input.spin.trail
$@.spin.input.trail
72 cat .input.
define > pan.ltl
73 cat DEFINES
>> pan.ltl
74 spin
-f
"!(`cat lock_progress.ltl | grep -v ^//`)" >> pan.ltl
76 lock_progress_4_bits_per_byte
: clean lock_progress_ltl config_4_bits_per_byte_define run
78 config_4_bits_per_byte_define
:
79 cp config_4_bits_per_byte.
define .input.
define
82 .
/pan
-a
-v
-c1
-X
-m1000000
-w19
84 run_weak_fair
: pan_fair
85 .
/pan_fair
-a
-v
-c1
-X
-m1000000
-w20
87 #./pan_fair -a -f -v -c1 -X -m1000000 -w20
90 gcc
-w
${CFLAGS} -DNFAIR
=4 -o pan_fair pan_fair.c
93 gcc
-w
${CFLAGS} -o pan pan.c
95 pan_fair.c
: pan.ltl
${SPINFILE_FAIR}
96 cat DEFINES
> .input.spin
97 cat .input.
define >> .input.spin
98 cat
${SPINFILE_FAIR} >> .input.spin
99 rm -f .input.spin.trail
100 spin
-a
-X
-N pan.ltl .input.spin
103 pan.c
: pan.ltl
${SPINFILE}
104 cat DEFINES
> .input.spin
105 cat .input.
define >> .input.spin
106 cat
${SPINFILE} >> .input.spin
107 rm -f .input.spin.trail
108 spin
-a
-X
-N pan.ltl .input.spin
110 .PHONY
: clean default
distclean summary
112 rm -f pan
* trail.out .input.spin
* *.spin.trail .input.
define
114 rm -f
*.trail
*.input
*.log