Check double write read order
[urcu.git] / formal-model / ooomem-double-update / Makefile
CommitLineData
82158610
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
20CFLAGS=-DHASH64 -DREACH
21
22#try pan -i to get the smallest trace.
23
24SPINFILE=mem.spin
25
26default:
27 make read_order | tee read_order.log
28 make read_order_no_wmb | tee read_order_no_wmb.log
29 make read_order_no_rmb | tee read_order_no_rmb.log
30 make asserts | tee asserts.log
31 make summary
32
33#show trail : spin -v -t -N pan.ltl input.spin
34# after each individual make.
35
36summary:
37 @echo
38 @echo "Verification summary"
39 @grep error *.log
40
41asserts: clean
42 cat DEFINES > .input.spin
43 cat ${SPINFILE} >> .input.spin
44 rm -f .input.spin.trail
45 spin -a -X .input.spin
46 gcc -w ${CFLAGS} -DSAFETY -o pan pan.c
47 ./pan -i -v -c1 -X -m10000 -w19
48 cp .input.spin $@.spin.input
49 -cp .input.spin.trail $@.spin.input.trail
50
51read_order: clean read_order_ltl run
52 cp .input.spin $@.spin.input
53 -cp .input.spin.trail $@.spin.input.trail
54
55read_order_no_rmb: clean read_order_ltl read_order_no_rmb_define run
56 cp .input.spin $@.spin.input
57 -cp .input.spin.trail $@.spin.input.trail
58
59read_order_no_rmb_define:
60 cp read_order_no_rmb.define .input.define
61
62read_order_no_wmb: clean read_order_ltl read_order_no_wmb_define run
63 cp .input.spin $@.spin.input
64 -cp .input.spin.trail $@.spin.input.trail
65
66read_order_no_wmb_define:
67 cp read_order_no_wmb.define .input.define
68
69read_order_ltl:
70 touch .input.define
71 cat DEFINES > pan.ltl
72 cat .input.define >> pan.ltl
73 spin -f "!(`cat read_order.ltl | grep -v ^//`)" >> pan.ltl
74
75run: pan
76 ./pan -a -i -v -c1 -X -m10000 -w19
77
78pan: pan.c
79 gcc -w ${CFLAGS} -o pan pan.c
80
81pan.c: pan.ltl ${SPINFILE}
82 cat DEFINES > .input.spin
83 cat .input.define >> .input.spin
84 cat ${SPINFILE} >> .input.spin
85 rm -f .input.spin.trail
86 spin -a -X -N pan.ltl .input.spin
87
88.PHONY: clean default distclean summary
89clean:
90 rm -f pan* trail.out .input.spin* *.spin.trail .input.define
91distclean:
92 rm -f *.trail *.input *.log
This page took 0.024764 seconds and 4 git commands to generate.