hash table comment fix.
[urcu.git] / formal-model / urcu-controldataflow / Makefile
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 #for multi-core verif, 15.5GB shared mem, use files if full
21 #CFLAGS=-DHASH64 -DMEMLIM=15500 -DNCORE=2
22 #CFLAGS=-DHASH64 -DCOLLAPSE -DMA=88 -DMEMLIM=15500 -DNCORE=8
23
24 #liveness
25 #CFLAGS=-DHASH64 -DCOLLAPSE -DMA=88
26 CFLAGS=-DHASH64
27
28 SPINFILE=urcu.spin
29
30 default:
31 make urcu_free | tee urcu_free.log
32 make urcu_free_no_mb | tee urcu_free_no_mb.log
33 make urcu_free_no_rmb | tee urcu_free_no_rmb.log
34 make urcu_free_no_wmb | tee urcu_free_no_wmb.log
35 make urcu_free_single_flip | tee urcu_free_single_flip.log
36 make urcu_progress_writer | tee urcu_progress_writer.log
37 make urcu_progress_reader | tee urcu_progress_reader.log
38 make urcu_progress_writer_error | tee urcu_progress_writer_error.log
39 make asserts | tee asserts.log
40 make summary
41
42 #show trail : spin -v -t -N pan.ltl input.spin
43 # after each individual make.
44
45 summary:
46 @echo
47 @echo "Verification summary"
48 @grep errors: *.log
49
50 asserts: clean
51 cat DEFINES > .input.spin
52 cat ${SPINFILE} >> .input.spin
53 rm -f .input.spin.trail
54 spin -a -X .input.spin
55 gcc -O2 -w ${CFLAGS} -DSAFETY -o pan pan.c
56 ./pan -v -c1 -X -m10000000 -w20
57 cp .input.spin $@.spin.input
58 -cp .input.spin.trail $@.spin.input.trail
59
60 urcu_free: clean urcu_free_ltl run
61 cp .input.spin $@.spin.input
62 -cp .input.spin.trail $@.spin.input.trail
63
64 urcu_free_nested: clean urcu_free_ltl urcu_free_nested_define run
65 cp .input.spin $@.spin.input
66 -cp .input.spin.trail $@.spin.input.trail
67
68 urcu_free_nested_define:
69 cp urcu_free_nested.define .input.define
70
71 urcu_free_no_rmb: clean urcu_free_ltl urcu_free_no_rmb_define run
72 cp .input.spin $@.spin.input
73 -cp .input.spin.trail $@.spin.input.trail
74
75 urcu_free_no_rmb_define:
76 cp urcu_free_no_rmb.define .input.define
77
78 urcu_free_no_wmb: clean urcu_free_ltl urcu_free_no_wmb_define run
79 cp .input.spin $@.spin.input
80 -cp .input.spin.trail $@.spin.input.trail
81
82 urcu_free_no_wmb_define:
83 cp urcu_free_no_wmb.define .input.define
84
85 urcu_free_no_mb: clean urcu_free_ltl urcu_free_no_mb_define run
86 cp .input.spin $@.spin.input
87 -cp .input.spin.trail $@.spin.input.trail
88
89 urcu_free_no_mb_define:
90 cp urcu_free_no_mb.define .input.define
91
92 urcu_free_single_flip: clean urcu_free_ltl urcu_free_single_flip_define run
93 cp .input.spin $@.spin.input
94 -cp .input.spin.trail $@.spin.input.trail
95
96 urcu_free_single_flip_define:
97 cp urcu_free_single_flip.define .input.define
98
99 urcu_free_ltl:
100 touch .input.define
101 cat .input.define >> pan.ltl
102 cat DEFINES >> pan.ltl
103 spin -f "!(`cat urcu_free.ltl | grep -v ^//`)" >> pan.ltl
104
105 # Progress checks
106
107 urcu_progress_writer: clean urcu_progress_writer_ltl \
108 urcu_progress_writer_define run_weak_fair
109 cp .input.spin $@.spin.input
110 -cp .input.spin.trail $@.spin.input.trail
111
112 urcu_progress_writer_define:
113 cp urcu_progress_writer.define .input.define
114
115 urcu_progress_writer_ltl:
116 touch .input.define
117 cat .input.define > pan.ltl
118 cat DEFINES >> pan.ltl
119 spin -f "!(`cat urcu_progress.ltl | grep -v ^//`)" >> pan.ltl
120
121 urcu_progress_reader: clean urcu_progress_reader_ltl \
122 urcu_progress_reader_define run_weak_fair
123 cp .input.spin $@.spin.input
124 -cp .input.spin.trail $@.spin.input.trail
125
126 urcu_progress_reader_define:
127 cp urcu_progress_reader.define .input.define
128
129 urcu_progress_reader_ltl:
130 touch .input.define
131 cat .input.define > pan.ltl
132 cat DEFINES >> pan.ltl
133 spin -f "!(`cat urcu_progress.ltl | grep -v ^//`)" >> pan.ltl
134
135 urcu_progress_writer_error: clean urcu_progress_writer_error_ltl \
136 urcu_progress_writer_error_define run_weak_fair
137 cp .input.spin $@.spin.input
138 -cp .input.spin.trail $@.spin.input.trail
139
140 urcu_progress_writer_error_define:
141 cp urcu_progress_writer_error.define .input.define
142
143 urcu_progress_writer_error_ltl:
144 touch .input.define
145 cat .input.define > pan.ltl
146 cat DEFINES >> pan.ltl
147 spin -f "!(`cat urcu_progress.ltl | grep -v ^//`)" >> pan.ltl
148
149
150 run_weak_fair: pan
151 ./pan -a -f -v -c1 -X -m10000000 -w20
152
153 run: pan
154 ./pan -a -v -c1 -X -m10000000 -w20
155
156 pan: pan.c
157 gcc -O2 -w ${CFLAGS} -o pan pan.c
158
159 pan.c: pan.ltl ${SPINFILE}
160 cat .input.define > .input.spin
161 cat DEFINES >> .input.spin
162 cat ${SPINFILE} >> .input.spin
163 rm -f .input.spin.trail
164 spin -a -X -N pan.ltl .input.spin
165
166 .PHONY: clean default distclean summary
167 clean:
168 rm -f pan* trail.out .input.spin* *.spin.trail .input.define
169 distclean:
170 rm -f *.trail *.input *.log
This page took 0.031615 seconds and 4 git commands to generate.