cvc5-cvc5-1.2.0.contrib.competitions.casc.run-script-current-tfa Maven / Gradle / Ivy
#!/bin/bash
# script is used for TFA division
# Assumes a binary $cvc5conv for converting tptp (*.p) files to *.smt2.
# cvc5 version 1.0.5 is recommended for this purpose.
here=`dirname $0`
cvc5=$here/cvc5
cvc5conv=$here/cvc5-tptp-to-smt2
bench="$1"
file=${bench##*/}
filename=${file%.*}
unsatResult="Unsatisfiable"
satResult="Satisfiable"
echo "------- convert to smt2 : $bench..."
$cvc5conv -o raw-benchmark --parse-only --output-lang=smt2 $bench > $here/$filename.smt2
echo -n "------- get file name : "
function processFileName {
read pct file colon name colon;
echo "$name"
}
tptpfilename=$(grep "% File " $bench 2>/dev/null | processFileName)
echo "TPTP file name is $tptpfilename"
echo "------- cvc5-tfa : $here/$filename.smt2..."
function processresult {
(read result;
case "$result" in
unsat)
echo "% SZS status $unsatResult for $tptpfilename";
echo "% SZS output start Proof for $tptpfilename";
cat;
echo "% SZS output end Proof for $tptpfilename";
exit 0;;
sat) echo "% SZS status $satResult for $tptpfilename";cat;exit 0;;
esac; exit 1)
}
# use: trywith [params..]
# to attempt a run. If an SZS ontology result is printed, then
# the run script terminates immediately. Otherwise, this
# function returns normally.
function trywith {
limit=$1; shift;
echo "--- Run $@ at $limit...";
(ulimit -S -t "$limit";$cvc5 --lang=smt2 --no-type-checking --no-interactive --dump-proofs --force-no-limit-cpu-while-dump -q "$@" $here/$filename.smt2) 2>/dev/null | processresult
if [ ${PIPESTATUS[1]} -eq 0 ]; then exit 0; fi
}
function finishwith {
echo "--- Run $@...";
$cvc5 --lang=smt2 --no-type-checking --no-interactive --dump-proofs --force-no-limit-cpu-while-dump -q "$@" $here/$filename.smt2 | processresult
}
# designed for 300 seconds
trywith 15 --finite-model-find --decision=internal
trywith 15 --decision=internal --simplification=none --no-inst-no-entail --no-cbqi --full-saturate-quant
trywith 15 --no-e-matching --full-saturate-quant
trywith 15 --cegqi-all --purify-triggers --full-saturate-quant
finishwith --macros-quant --macros-quant-mode=all --nl-ext-tplanes --full-saturate-quant
# echo "% SZS status" "GaveUp for $filename"
© 2015 - 2025 Weber Informatics LLC | Privacy Policy