Skip to content

Commit 5fbcded

Browse files
Merge pull request #49 from tautschnig/readme
Include a README in the zip archive
2 parents affdbcd + 3890316 commit 5fbcded

File tree

2 files changed

+108
-9
lines changed

2 files changed

+108
-9
lines changed

Makefile

+12-9
Original file line numberDiff line numberDiff line change
@@ -20,52 +20,55 @@ jbmc: jbmc.zip
2020
cat $*.inc tool-wrapper.inc >> $@
2121
chmod 755 $@
2222

23-
cbmc-path.zip: cbmc.inc tool-wrapper.inc $(CBMC)/LICENSE $(CBMC)/src/cbmc/cbmc $(CBMC)/src/goto-cc/goto-cc README.cbmc-path.txt
23+
cbmc-path.zip: cbmc.inc tool-wrapper.inc $(CBMC)/LICENSE $(CBMC)/src/cbmc/cbmc $(CBMC)/src/goto-cc/goto-cc sv-comp-readme.sh
2424
mkdir -p $(basename $@)
2525
$(MAKE) cbmc-wrapper
2626
mv cbmc-wrapper $(basename $@)/cbmc
2727
sed -i 's/^.\/cbmc-binary --graphml-witness/.\/cbmc-binary --paths fifo --graphml-witness/' $(basename $@)/cbmc
28+
./sv-comp-readme.sh $(basename $@) > $(basename $@)/README
2829
cp -L $(CBMC)/LICENSE $(basename $@)/
2930
cp -L $(CBMC)/src/cbmc/cbmc $(basename $@)/cbmc-binary
3031
cp -L $(CBMC)/src/goto-cc/goto-cc $(basename $@)/
31-
cp -L README.cbmc-path.txt $(basename $@)/README.txt
3232
chmod a+rX $(basename $@)/*
3333
zip -r $@ $(basename $@)
34-
cd $(basename $@) && rm cbmc cbmc-binary goto-cc LICENSE README.txt
34+
cd $(basename $@) && rm cbmc cbmc-binary goto-cc LICENSE README
3535
rmdir $(basename $@)
3636

37-
cbmc.zip: cbmc.inc tool-wrapper.inc $(CBMC)/LICENSE $(CBMC)/src/cbmc/cbmc $(CBMC)/src/goto-cc/goto-cc
37+
cbmc.zip: cbmc.inc tool-wrapper.inc $(CBMC)/LICENSE $(CBMC)/src/cbmc/cbmc $(CBMC)/src/goto-cc/goto-cc sv-comp-readme.sh
3838
mkdir -p $(basename $@)
3939
$(MAKE) cbmc-wrapper
4040
mv cbmc-wrapper $(basename $@)/cbmc
41+
./sv-comp-readme.sh $(basename $@) > $(basename $@)/README
4142
cp -L $(CBMC)/LICENSE $(basename $@)/
4243
cp -L $(CBMC)/src/cbmc/cbmc $(basename $@)/cbmc-binary
4344
cp -L $(CBMC)/src/goto-cc/goto-cc $(basename $@)/
4445
chmod a+rX $(basename $@)/*
4546
zip -r $@ $(basename $@)
46-
cd $(basename $@) && rm cbmc cbmc-binary goto-cc LICENSE
47+
cd $(basename $@) && rm cbmc cbmc-binary goto-cc LICENSE README
4748
rmdir $(basename $@)
4849

49-
2ls.zip: 2ls.inc tool-wrapper.inc $(2LS)/LICENSE $(2LS)/src/2ls/2ls $(2LS)/cbmc/src/goto-cc/goto-cc
50+
2ls.zip: 2ls.inc tool-wrapper.inc $(2LS)/LICENSE $(2LS)/src/2ls/2ls $(2LS)/cbmc/src/goto-cc/goto-cc sv-comp-readme.sh
5051
mkdir -p $(basename $@)
5152
$(MAKE) 2ls-wrapper
5253
mv 2ls-wrapper $(basename $@)/2ls
54+
./sv-comp-readme.sh $(basename $@) > $(basename $@)/README
5355
cp -L $(2LS)/LICENSE $(basename $@)/
5456
cp -L $(2LS)/src/2ls/2ls $(basename $@)/2ls-binary
5557
cp -L $(2LS)/cbmc/src/goto-cc/goto-cc $(basename $@)/
5658
chmod a+rX $(basename $@)/*
5759
zip -r $@ $(basename $@)
58-
cd $(basename $@) && rm 2ls 2ls-binary goto-cc LICENSE
60+
cd $(basename $@) && rm 2ls 2ls-binary goto-cc LICENSE README
5961
rmdir $(basename $@)
6062

61-
jbmc.zip: jbmc.inc tool-wrapper.inc $(JBMC)/LICENSE $(JBMC)/jbmc/src/jbmc/jbmc $(JBMC)/jbmc/lib/java-models-library/target/core-models.jar
63+
jbmc.zip: jbmc.inc tool-wrapper.inc $(JBMC)/LICENSE $(JBMC)/jbmc/src/jbmc/jbmc $(JBMC)/jbmc/lib/java-models-library/target/core-models.jar sv-comp-readme.sh
6264
mkdir -p $(basename $@)
6365
$(MAKE) jbmc-wrapper
6466
mv jbmc-wrapper $(basename $@)/jbmc
67+
./sv-comp-readme.sh $(basename $@) > $(basename $@)/README
6568
cp -L $(JBMC)/LICENSE $(basename $@)/
6669
cp -L $(JBMC)/jbmc/src/jbmc/jbmc $(basename $@)/jbmc-binary
6770
cp -L $(JBMC)/jbmc/lib/java-models-library/target/core-models.jar $(basename $@)/
6871
chmod a+rX $(basename $@)/*
6972
zip -r $@ $(basename $@)
70-
cd $(basename $@) && rm jbmc jbmc-binary core-models.jar LICENSE
73+
cd $(basename $@) && rm jbmc jbmc-binary core-models.jar LICENSE README
7174
rmdir $(basename $@)

sv-comp-readme.sh

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#!/bin/bash
2+
3+
CONFIG=$1
4+
5+
case $CONFIG in
6+
2ls)
7+
TOOL=2ls
8+
REPO=2ls
9+
;;
10+
cbmc|cbmc-path)
11+
TOOL=cbmc
12+
REPO=cbmc
13+
;;
14+
jbmc)
15+
TOOL=jbmc
16+
REPO=cbmc
17+
;;
18+
*)
19+
echo "Unknown configuration $CONFIG" 1>&2
20+
exit 1
21+
;;
22+
esac
23+
24+
cat <<EOF
25+
CPROVER is a framework of software analysis tools. See https://www.cprover.org/
26+
for further information about the tools, publications, and the pointers to
27+
source code.
28+
29+
This archive contains the following files:
30+
31+
EOF
32+
33+
if [ x$TOOL != xjbmc ]
34+
then
35+
cat <<EOF
36+
- goto-cc: this C compiler transforms input files into so-called
37+
"goto-binaries," which are encoded in CBMC's intermediate representation.
38+
39+
- $TOOL-binary: this is the actual verification tool. It takes a goto-binary or
40+
source code as input and checks the properties specified by command-line
41+
flags.
42+
43+
- $TOOL: this wrapper script invokes $TOOL-binary and goto-cc, parsing the
44+
property file to pass the correct flags to $TOOL-binary and returning the
45+
correct return codes for SV-COMP.
46+
EOF
47+
else
48+
cat <<EOF
49+
- jbmc-binary: this is the actual verification tool. It takes Java bytecode
50+
(class files) as input and checks the properties specified by command-line
51+
flags.
52+
53+
- jbmc: this wrapper script invokes jbmc-binary, parsing the property file to
54+
pass the correct flags to jbmc-binary and returning the correct return codes
55+
for SV-COMP.
56+
EOF
57+
fi
58+
59+
cat <<EOF
60+
61+
The binaries were compiled on $(lsb_release -d -s); the binaries
62+
should be self-hosting on similar operating systems. The upstream URL, if
63+
you wish to compile it yourself, is https://github.com/diffblue/$REPO
64+
EOF
65+
66+
if [ x$CONFIG = xcbmc-path ]
67+
then
68+
cat <<EOF
69+
70+
To run CBMC Path manually, you need to invoke the tool as
71+
72+
cbmc-binary --paths fifo ...
73+
74+
which activates CBMC's path-exploration mode. Note that the tool will not
75+
terminate for input programs that contain loops unless you specify an
76+
unwinding limit using --unwind N. For other flags, see `cbmc-binary -h`.
77+
78+
EOF
79+
else
80+
cat <<EOF
81+
82+
To use the tool, run the tool passing a source file as argument. For C source
83+
code, and as only installation requirement, make sure a C compiler (such as GCC)
84+
is installed.
85+
EOF
86+
fi
87+
88+
cat <<EOF
89+
90+
For SV-COMP, use the wrapper script provided in this distribution, which takes
91+
the following options:
92+
93+
--32 or --64: set the bit width
94+
--propertyfile <file>: read SV-COMP property specification from <file>
95+
--graphml-witness <file>: write SV-COMP witness to <file>
96+
EOF

0 commit comments

Comments
 (0)