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>
25 make urcu_free | tee urcu_free.log
26 #nested useless with signal test.
27 #make urcu_free_nested | tee urcu_free_nested.log
28 make urcu_free_no_rmb | tee urcu_free_no_rmb.log
29 make urcu_free_no_wmb | tee urcu_free_no_wmb.log
30 make urcu_free_no_mb | tee urcu_free_no_mb.log
31 make urcu_free_single_flip | tee urcu_free_single_flip.log
32 make urcu_progress_writer | tee urcu_progress_writer.log
33 make urcu_progress_reader | tee urcu_progress_reader.log
34 make urcu_progress_writer_error | tee urcu_progress_writer_error.log
35 make asserts | tee asserts.log
38 #show trail : spin -v -t -N pan.ltl input.spin
39 # after each individual make.
43 @echo
"Verification summary"
47 cat DEFINES
> .input.spin
48 cat
${SPINFILE} >> .input.spin
49 rm -f .input.spin.trail
50 spin
-a
-X .input.spin
51 gcc
-w
${CFLAGS} -DSAFETY
-o pan pan.c
52 .
/pan
-v
-c1
-X
-m10000000
-w20
53 cp .input.spin
$@.spin.input
54 -cp .input.spin.trail
$@.spin.input.trail
56 urcu_free
: clean urcu_free_ltl run
57 cp .input.spin
$@.spin.input
58 -cp .input.spin.trail
$@.spin.input.trail
60 urcu_free_nested
: clean urcu_free_ltl urcu_free_nested_define run
61 cp .input.spin
$@.spin.input
62 -cp .input.spin.trail
$@.spin.input.trail
64 urcu_free_nested_define
:
65 cp urcu_free_nested.
define .input.
define
67 urcu_free_no_rmb
: clean urcu_free_ltl urcu_free_no_rmb_define run
68 cp .input.spin
$@.spin.input
69 -cp .input.spin.trail
$@.spin.input.trail
71 urcu_free_no_rmb_define
:
72 cp urcu_free_no_rmb.
define .input.
define
74 urcu_free_no_wmb
: clean urcu_free_ltl urcu_free_no_wmb_define run
75 cp .input.spin
$@.spin.input
76 -cp .input.spin.trail
$@.spin.input.trail
78 urcu_free_no_wmb_define
:
79 cp urcu_free_no_wmb.
define .input.
define
81 urcu_free_no_mb
: clean urcu_free_ltl urcu_free_no_mb_define run
82 cp .input.spin
$@.spin.input
83 -cp .input.spin.trail
$@.spin.input.trail
85 urcu_free_no_mb_define
:
86 cp urcu_free_no_mb.
define .input.
define
88 urcu_free_single_flip
: clean urcu_free_ltl urcu_free_single_flip_define run
89 cp .input.spin
$@.spin.input
90 -cp .input.spin.trail
$@.spin.input.trail
92 urcu_free_single_flip_define
:
93 cp urcu_free_single_flip.
define .input.
define
97 cat .input.
define >> pan.ltl
98 cat DEFINES
>> pan.ltl
99 spin
-f
"!(`cat urcu_free.ltl | grep -v ^//`)" >> pan.ltl
103 urcu_progress_writer
: clean urcu_progress_writer_ltl \
104 urcu_progress_writer_define run_weak_fair
105 cp .input.spin
$@.spin.input
106 -cp .input.spin.trail
$@.spin.input.trail
108 urcu_progress_writer_define
:
109 cp urcu_progress_writer.
define .input.
define
111 urcu_progress_writer_ltl
:
113 cat .input.
define > pan.ltl
114 cat DEFINES
>> pan.ltl
115 spin
-f
"!(`cat urcu_progress.ltl | grep -v ^//`)" >> pan.ltl
117 urcu_progress_reader
: clean urcu_progress_reader_ltl \
118 urcu_progress_reader_define run_weak_fair
119 cp .input.spin
$@.spin.input
120 -cp .input.spin.trail
$@.spin.input.trail
122 urcu_progress_reader_define
:
123 cp urcu_progress_reader.
define .input.
define
125 urcu_progress_reader_ltl
:
127 cat .input.
define > pan.ltl
128 cat DEFINES
>> pan.ltl
129 spin
-f
"!(`cat urcu_progress.ltl | grep -v ^//`)" >> pan.ltl
131 urcu_progress_writer_error
: clean urcu_progress_writer_error_ltl \
132 urcu_progress_writer_error_define run_weak_fair
133 cp .input.spin
$@.spin.input
134 -cp .input.spin.trail
$@.spin.input.trail
136 urcu_progress_writer_error_define
:
137 cp urcu_progress_writer_error.
define .input.
define
139 urcu_progress_writer_error_ltl
:
141 cat .input.
define > pan.ltl
142 cat DEFINES
>> pan.ltl
143 spin
-f
"!(`cat urcu_progress.ltl | grep -v ^//`)" >> pan.ltl
147 .
/pan
-a
-f
-v
-c1
-X
-m10000000
-w20
150 .
/pan
-a
-v
-c1
-X
-m10000000
-w20
153 gcc
-w
${CFLAGS} -o pan pan.c
155 pan.c
: pan.ltl
${SPINFILE}
156 cat .input.
define > .input.spin
157 cat DEFINES
>> .input.spin
158 cat
${SPINFILE} >> .input.spin
159 rm -f .input.spin.trail
160 spin
-a
-X
-N pan.ltl .input.spin
162 .PHONY
: clean default
distclean summary
164 rm -f pan
* trail.out .input.spin
* *.spin.trail .input.
define
166 rm -f
*.trail
*.input
*.log