function trywith {
limit=$1; shift;
echo "--- Run $@ at $limit...";
- (ulimit -t "$limit";$cvc4 --no-checking --no-interactive --dump-models --produce-models "$@" $bench) 2>/dev/null |
+ (ulimit -t "$limit";$cvc4 --no-checking --no-interactive --dump-models --produce-models --force-no-limit-cpu-while-dump "$@" $bench) 2>/dev/null |
(read w1 w2 w3 result w4 w5;
case "$result" in
Satisfiable) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;;
}
function finishwith {
echo "--- Run $@...";
- $cvc4 --no-checking --no-interactive --dump-models --produce-models "$@" $bench
+ $cvc4 --no-checking --no-interactive --dump-models --produce-models --force-no-limit-cpu-while-dump "$@" $bench
}
trywith 30 --finite-model-find --sort-inference --uf-ss-fair
trywith 30 --finite-model-find --mbqi=gen-ev --uf-ss-totality --decision=internal --sort-inference --uf-ss-fair
-trywith 10 --finite-model-find --disable-uf-ss-min-model --sort-inference --uf-ss-fair
-trywith 30 --finite-model-find --mbqi=abs --pre-skolem-quant --sort-inference --uf-ss-fair
+trywith 15 --finite-model-find --disable-uf-ss-min-model --sort-inference --uf-ss-fair
+trywith 60 --finite-model-find --mbqi=abs --pre-skolem-quant --sort-inference --uf-ss-fair
finishwith --finite-model-find --mbqi=abs --pre-skolem-quant --sort-inference --uf-ss-fair --mbqi-one-inst-per-round
# echo "% SZS status" "GaveUp for $filename"
function trywith {
limit=$1; shift;
echo "--- Run $@ at $limit...";
- (ulimit -t "$limit";$cvc4 --no-checking --no-interactive --dump-instantiations --inst-format=szs "$@" $bench) 2>/dev/null |
+ (ulimit -t "$limit";$cvc4 --no-checking --no-interactive --dump-instantiations --inst-format=szs --force-no-limit-cpu-while-dump "$@" $bench) 2>/dev/null |
(read w1 w2 w3 result w4 w5;
case "$result" in
Unsatisfiable) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;;
}
function finishwith {
echo "--- Run $@...";
- $cvc4 --no-checking --no-interactive --dump-instantiations --inst-format=szs "$@" $bench
+ $cvc4 --no-checking --no-interactive --dump-instantiations --inst-format=szs --force-no-limit-cpu-while-dump "$@" $bench
}
trywith 15 --quant-cf --pre-skolem-quant --full-saturate-quant
#include "smt/options.h"
+#include <sys/resource.h>
+
namespace CVC4 {
namespace main {
+//function to set no limit on CPU time.
+//this is used for competitions while a solution (proof or model) is being dumped.
+void setNoLimitCPU(){
+ struct rlimit rlc;
+ int st = getrlimit(RLIMIT_CPU, &rlc );
+ if( st==0 ){
+ rlc.rlim_cur = rlc.rlim_max;
+ setrlimit(RLIMIT_CPU, &rlc );
+ }
+}
+
+
void printStatsIncremental(std::ostream& out, const std::string& prvsStatsString, const std::string& curStatsString);
CommandExecutor::CommandExecutor(ExprManager &exprMgr, Options &options) :
// dump the model/proof if option is set
if(status) {
+ Command * g = NULL;
if( d_options[options::produceModels] &&
d_options[options::dumpModels] &&
( res.asSatisfiabilityResult() == Result::SAT ||
(res.isUnknown() && res.whyUnknown() == Result::INCOMPLETE) ) ) {
- Command* gm = new GetModelCommand();
- status = doCommandSingleton(gm);
+ g = new GetModelCommand();
} else if( d_options[options::proof] &&
d_options[options::dumpProofs] &&
res.asSatisfiabilityResult() == Result::UNSAT ) {
- Command* gp = new GetProofCommand();
- status = doCommandSingleton(gp);
+ g = new GetProofCommand();
} else if( d_options[options::dumpInstantiations] &&
res.asSatisfiabilityResult() == Result::UNSAT ) {
- Command* gi = new GetInstantiationsCommand();
- status = doCommandSingleton(gi);
+ g = new GetInstantiationsCommand();
+ }
+ if( g ){
+ //set no time limit during dumping if applicable
+ if( d_options[options::forceNoLimitCpuWhileDump] ){
+ setNoLimitCPU();
+ }
+ status = doCommandSingleton(g);
}
}
return status;