hash table comment fix.
[urcu.git] / formal-model / ticketlock / Makefile
CommitLineData
656c7dc1
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 -DREACH
21CFLAGS=-DHASH64
22
23#try pan -i to get the smallest trace.
24
25SPINFILE=mem.spin
26SPINFILE_FAIR=mem-progress.spin
27
28default:
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
34 make summary
35
36#show trail : spin -v -t -N pan.ltl input.spin
37# after each individual make.
38
39summary:
40 @echo
41 @echo "Verification summary"
42 @grep error *.log
43
44asserts: clean
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
53
54refcount: clean refcount_ltl run
55 cp .input.spin $@.spin.input
56 -cp .input.spin.trail $@.spin.input.trail
57
58refcount_ltl:
59 touch .input.define
60 cat DEFINES > pan.ltl
61 cat .input.define >> pan.ltl
62 spin -f "!(`cat refcount.ltl | grep -v ^//`)" >> pan.ltl
63
64refcount_4_bits_per_byte: clean refcount_ltl config_4_bits_per_byte_define run
65
66lock_progress: clean lock_progress_ltl run_weak_fair
67 cp .input.spin $@.spin.input
68 -cp .input.spin.trail $@.spin.input.trail
69
70lock_progress_ltl:
71 touch .input.define
72 cat .input.define > pan.ltl
73 cat DEFINES >> pan.ltl
74 spin -f "!(`cat lock_progress.ltl | grep -v ^//`)" >> pan.ltl
75
76lock_progress_4_bits_per_byte: clean lock_progress_ltl config_4_bits_per_byte_define run
77
78config_4_bits_per_byte_define:
79 cp config_4_bits_per_byte.define .input.define
80
81run: pan
82 ./pan -a -v -c1 -X -m1000000 -w19
83
84run_weak_fair: pan_fair
85 ./pan_fair -a -f -v -c1 -X -m1000000 -w20
86
87pan_fair: pan_fair.c
88 gcc -w ${CFLAGS} -DNFAIR=4 -o pan_fair pan_fair.c
89
90pan: pan.c
91 gcc -w ${CFLAGS} -o pan pan.c
92
93pan_fair.c: pan.ltl ${SPINFILE_FAIR}
94 cat DEFINES > .input.spin
95 cat .input.define >> .input.spin
96 cat ${SPINFILE_FAIR} >> .input.spin
97 rm -f .input.spin.trail
98 spin -a -X -N pan.ltl .input.spin
99 mv pan.c pan_fair.c
100
101pan.c: pan.ltl ${SPINFILE}
102 cat DEFINES > .input.spin
103 cat .input.define >> .input.spin
104 cat ${SPINFILE} >> .input.spin
105 rm -f .input.spin.trail
106 spin -a -X -N pan.ltl .input.spin
107
108.PHONY: clean default distclean summary
109clean:
110 rm -f pan* trail.out .input.spin* *.spin.trail .input.define
111distclean:
112 rm -f *.trail *.input *.log
This page took 0.025578 seconds and 4 git commands to generate.