#!/bin/bash # Boolector: Satisfiablity Modulo Theories (SMT) solver. # # Copyright (C) 2007-2021 by the authors listed in the AUTHORS file. # # This file is part of Boolector. # See COPYING for more information on using this software. # readonly CONTRIBDIR=$(dirname "$(readlink -f $0)") readonly THREAD_TMP_FILE="/tmp/runparbtormbt$$_" readonly MAX_THREADS=$(grep -c processor /proc/cpuinfo) BTORMBTDIR=$CONTRIBDIR/../bin die () { echo "*** $(basename $0): $*" 1>&2 usage exit 1 } delete-tmp-files () { for file in ${files[@]}; do echo -e "\n$file" cat $file rm -f $file done } collect-stats () { num_rounds=0 num_bugs=0 for file in ${files[@]}; do ((num_bugs += $(grep bugs $file | awk '{print $2}'))) rounds=$(grep rounds $file | awk '{print $2}') ((num_rounds += rounds)) done echo "host: $(hostname)" echo "threads: $threads" echo "bugs found: $num_bugs" echo "total rounds: $num_rounds" } cleanup-and-exit () { kill $(jobs -p) 2> /dev/null wait $(jobs -p) collect-stats delete-tmp-files exit } usage () { echo -n "usage: $(basename $0) " echo -en "[