Commit | Line | Data |
---|---|---|
60a1db9d MD |
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. | |
5 | # | |
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. | |
10 | # | |
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. | |
14 | # | |
15 | # Copyright (C) Mathieu Desnoyers, 2009 | |
16 | # | |
17 | # Authors: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | |
18 | ||
19 | #CFLAGS=-DSAFETY | |
20 | CFLAGS=-DHASH64 | |
21 | ||
22 | SPINFILE=urcu.spin | |
23 | ||
24 | default: | |
25 | make urcu_free | tee urcu_free.log | |
26 | make urcu_free_no_rmb | tee urcu_free_no_rmb.log | |
27 | make urcu_free_no_wmb | tee urcu_free_no_wmb.log | |
28 | make urcu_free_no_mb | tee urcu_free_no_mb.log | |
29 | make asserts | tee asserts.log | |
30 | make summary | |
31 | ||
32 | #show trail : spin -v -t -N pan.ltl input.spin | |
33 | # after each individual make. | |
34 | ||
35 | summary: | |
36 | @echo | |
37 | @echo "Verification summary" | |
38 | @grep error *.log | |
39 | ||
40 | asserts: clean | |
41 | cat DEFINES > .input.spin | |
42 | cat ${SPINFILE} >> .input.spin | |
43 | rm -f .input.spin.trail | |
44 | spin -a -X .input.spin | |
45 | gcc -w ${CFLAGS} -DSAFETY -o pan pan.c | |
46 | ./pan -v -c1 -X -m10000 -w19 | |
47 | cp .input.spin $@.spin.input | |
48 | -cp .input.spin.trail $@.spin.input.trail | |
49 | ||
50 | urcu_free: clean urcu_free_ltl run | |
51 | cp .input.spin $@.spin.input | |
52 | -cp .input.spin.trail $@.spin.input.trail | |
53 | ||
54 | urcu_free_no_rmb: clean urcu_free_ltl urcu_free_no_rmb_define run | |
55 | cp .input.spin $@.spin.input | |
56 | -cp .input.spin.trail $@.spin.input.trail | |
57 | ||
58 | urcu_free_no_rmb_define: | |
59 | cp urcu_free_no_rmb.define .input.define | |
60 | ||
61 | urcu_free_no_wmb: clean urcu_free_ltl urcu_free_no_wmb_define run | |
62 | cp .input.spin $@.spin.input | |
63 | -cp .input.spin.trail $@.spin.input.trail | |
64 | ||
65 | urcu_free_no_wmb_define: | |
66 | cp urcu_free_no_wmb.define .input.define | |
67 | ||
68 | urcu_free_no_mb: clean urcu_free_ltl urcu_free_no_mb_define run | |
69 | cp .input.spin $@.spin.input | |
70 | -cp .input.spin.trail $@.spin.input.trail | |
71 | ||
72 | urcu_free_no_mb_define: | |
73 | cp urcu_free_no_mb.define .input.define | |
74 | ||
75 | urcu_free_ltl: | |
76 | touch .input.define | |
77 | cat DEFINES > pan.ltl | |
78 | cat .input.define >> pan.ltl | |
79 | spin -f "!(`cat urcu_free.ltl | grep -v ^//`)" >> pan.ltl | |
80 | ||
81 | run: pan | |
82 | ./pan -a -v -c1 -X -m10000 -w19 | |
83 | ||
84 | pan: pan.c | |
85 | gcc -w ${CFLAGS} -o pan pan.c | |
86 | ||
87 | pan.c: pan.ltl ${SPINFILE} | |
88 | cat DEFINES > .input.spin | |
89 | cat .input.define >> .input.spin | |
90 | cat ${SPINFILE} >> .input.spin | |
91 | rm -f .input.spin.trail | |
92 | spin -a -X -N pan.ltl .input.spin | |
93 | ||
94 | .PHONY: clean default distclean summary | |
95 | clean: | |
96 | rm -f pan* trail.out .input.spin* *.spin.trail .input.define | |
97 | distclean: | |
98 | rm -f *.trail *.input *.log |