Skip to content

Commit 879c66f

Browse files
authored
Merge pull request #32 from peterschrammel/jbmc-wrapper-zip
JBMC wrapper unpacks and builds benchmark
2 parents 4a5b540 + 6fae12c commit 879c66f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

jbmc.inc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ TOOL_NAME=JBMC
77

88
run()
99
{
10+
unzip $BM -d $BM_DIR
11+
make -C $BM_DIR
12+
BM=$BM_DIR/target/task.jar
13+
14+
MORE_OPTIONS="--throw-runtime-exceptions --max-nondet-string-length 100 --classpath core-models.jar"
15+
1016
if [ "$PROP" = "termination" ] ; then
1117
PROPERTY="$PROPERTY --no-assertions --no-self-loops-to-assumptions"
1218
fi
@@ -18,11 +24,11 @@ ulimit -v 15000000 ; \
1824
EC=42 ; \
1925
for c in 2 6 12 17 21 40 200 400 1025 2049 268435456 ; do \
2026
echo "Unwind: $c" > $LOG.latest ; \
21-
./jbmc-binary --graphml-witness $LOG.witness --unwind $c --stop-on-fail --$BIT_WIDTH --object-bits $OBJ_BITS $PROPERTY --function $ENTRY $BM >> $LOG.latest 2>&1 ; \
27+
./jbmc-binary $MORE_OPTIONS --graphml-witness $LOG.witness --unwind $c --stop-on-fail --$BIT_WIDTH --object-bits $OBJ_BITS $PROPERTY --function $ENTRY $BM >> $LOG.latest 2>&1 ; \
2228
ec=$? ; \
2329
if [ $ec -eq 0 ] ; then \
2430
if ! tail -n 10 $LOG.latest | grep -q "^VERIFICATION SUCCESSFUL$" ; then ec=1 ; else \
25-
./jbmc-binary --unwinding-assertions --unwind $c --stop-on-fail --$BIT_WIDTH --object-bits $OBJ_BITS $PROPERTY --function $ENTRY $BM > /dev/null 2>&1 || ec=42 ; \
31+
./jbmc-binary $MORE_OPTIONS --unwinding-assertions --unwind $c --stop-on-fail --$BIT_WIDTH --object-bits $OBJ_BITS $PROPERTY --function $ENTRY $BM > /dev/null 2>&1 || ec=42 ; \
2632
fi ; \
2733
fi ; \
2834
if [ $ec -eq 10 ] ; then \

tool-wrapper.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ export OBJ_BITS
124124

125125
export GMON_OUT_PREFIX=`basename $BM`.gmon.out
126126

127+
export BM_DIR=`mktemp -d -t ${TOOL_NAME}-benchmark.XXXXXX`
128+
127129
export LOG=`mktemp -t ${TOOL_NAME}-log.XXXXXX`
128-
trap "rm -f $LOG $LOG.latest $LOG.ok $LOG.witness $LOG.bin" EXIT
130+
trap "rm -rf $LOG $LOG.latest $LOG.ok $LOG.witness $LOG.bin $BM_DIR" EXIT
129131

130132
run
131133

0 commit comments

Comments
 (0)