Skip to content

Commit

Permalink
Fix tests of unsat cores (#6593)
Browse files Browse the repository at this point in the history
This updates all regressions that pass check-unsat-cores to enable check-unsat-cores. This includes any incremental benchmark, which was disabled in run_regression.py previously.

It adds --no-check-unsat-cores to a few corner benchmarks that were previously disabled based on --incremental.

It also reverts a change to when proofs are disabled: options like sygus-inference should not permit proofs (or unsat cores).
  • Loading branch information
ajreynol committed May 21, 2021
1 parent 8829c2c commit 0e9fed3
Show file tree
Hide file tree
Showing 45 changed files with 57 additions and 56 deletions.
1 change: 1 addition & 0 deletions src/smt/set_defaults.cpp
Expand Up @@ -350,6 +350,7 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver)
|| options::sygusInference() || options::sygusRewSynthInput())
{
// since we are trying to recast as sygus, we assume the input is sygus
isSygus = true;
usesSygus = true;
}
else if (options::sygusInst())
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/ackermann.real.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_UFNRA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/arith-eq.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LRA)

Expand Down
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LIRA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/arith-mixed-types-tighten.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LIRA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/arith-strict-relaxed.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LRA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/arith-strict.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LRA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/arith-tighten-1.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LIRA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/arith-tighten-2.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LIA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/integers/ackermann1.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_UFLIA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/integers/ackermann2.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_UFLIA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/integers/ackermann3.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: sat
(set-logic QF_UFLIA)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arith/integers/ackermann6.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_UFLIA)
(set-info :smt-lib-version 2.6)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/arrays/bug4957.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_ALIA)
(declare-fun a () (Array Int Int))
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bug528a.smt2
@@ -1,5 +1,5 @@
; EXPECT: unsat
; COMMAND-LINE: --incremental --repeat-simp
; COMMAND-LINE: --incremental --repeat-simp --no-check-unsat-cores
(set-logic QF_LIA)
(declare-fun i () Int)
(assert (ite (= i 0) false true))
Expand Down
4 changes: 2 additions & 2 deletions test/regress/regress0/bv/ackermann1.smt2
@@ -1,5 +1,5 @@
; COMMAND-LINE: --bitblast=eager --no-check-models --no-check-unsat-cores
; COMMAND-LINE: --bitblast=eager --bv-solver=simple --no-check-models --no-check-unsat-cores
; COMMAND-LINE: --bitblast=eager --no-check-models
; COMMAND-LINE: --bitblast=eager --bv-solver=simple --no-check-models
; EXPECT: sat
(set-logic QF_UFBV)
(set-info :smt-lib-version 2.6)
Expand Down
4 changes: 2 additions & 2 deletions test/regress/regress0/bv/ackermann2.smt2
@@ -1,6 +1,6 @@
; COMMAND-LINE: --bitblast=eager --no-check-unsat-cores
; COMMAND-LINE: --bitblast=eager
; REQUIRES: cryptominisat
; COMMAND-LINE: --bitblast=eager --bv-sat-solver=cryptominisat --no-check-unsat-cores
; COMMAND-LINE: --bitblast=eager --bv-sat-solver=cryptominisat
; EXPECT: unsat
(set-logic QF_UFBV)
(set-info :smt-lib-version 2.6)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/ackermann4.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --bitblast=eager --no-check-models --no-check-unsat-cores
; COMMAND-LINE: --bitblast=eager --no-check-models
; EXPECT: sat
(set-logic QF_UFBV)
(set-info :smt-lib-version 2.6)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/ackermann5.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: sat
(set-logic QF_UFBV)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/ackermann6.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_UFBV)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/ackermann7.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: sat
(set-logic QF_UFBV)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/ackermann8.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --ackermann --no-check-unsat-cores
; COMMAND-LINE: --ackermann
; EXPECT: unsat
(set-logic QF_UFBV)

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/bv-int-collapse1.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic ALL_SUPPORTED)
(set-info :status unsat)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/bv-int-collapse2.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic ALL_SUPPORTED)
(set-info :status unsat)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/core/slice-12.smtv1.smt2
@@ -1,5 +1,5 @@
; REQUIRES: cryptominisat
; COMMAND-LINE: --bitblast=eager --bv-sat-solver=cryptominisat --no-check-unsat-cores
; COMMAND-LINE: --bitblast=eager --bv-sat-solver=cryptominisat
; EXPECT: unsat
(set-option :incremental false)
(set-info :status unsat)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/bv/pr4993-bvugt-bvurem-a.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
(set-logic QF_BV)
(set-info :status unsat)
(declare-const x (_ BitVec 4))
Expand Down
4 changes: 2 additions & 2 deletions test/regress/regress0/bv/pr4993-bvugt-bvurem-b.smt2
@@ -1,5 +1,5 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE: --bv-solver=simple --no-check-unsat-cores
; COMMAND-LINE:
; COMMAND-LINE: --bv-solver=simple
(set-logic QF_BV)
(set-info :status unsat)
(declare-const x (_ BitVec 4))
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/datatypes/empty_tuprec.cvc
@@ -1,4 +1,4 @@
% COMMAND-LINE: --no-check-unsat-cores
% COMMAND-LINE:
%
OPTION "incremental";

Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress0/quantifiers/mix-match.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic ALL_SUPPORTED)
(set-info :status unsat)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/bv/bv2nat-ground.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_BVLIA)
(set-info :status unsat)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/fmf/PUZ001+1.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --finite-model-find --no-check-unsat-cores
; COMMAND-LINE: --finite-model-find
; EXPECT: unsat
;%------------------------------------------------------------------------------
;% File : PUZ001+1 : TPTP v5.4.0. Released v2.0.0.
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/model-blocker-values.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --incremental --produce-models --block-models=values
; COMMAND-LINE: --incremental --produce-models --block-models=values --no-check-unsat-cores
; EXPECT: sat
; EXPECT: sat
; if we only block models restricted to (a,b), then there are only 2 models
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/nl/nl_uf_lalt.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores --decision=justification
; COMMAND-LINE: --decision=justification
(set-logic QF_UFNIA)
(set-info :status unsat)
(declare-fun c (Int) Int)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/push-pop/quant-fun-proc.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --incremental --fmf-fun --macros-quant --macros-quant-mode=ground --no-check-models
; COMMAND-LINE: --incremental --fmf-fun --macros-quant --macros-quant-mode=ground --no-check-models --no-check-unsat-cores
(set-logic UFLIA)

(define-fun f ((x Int)) Int x)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/quantifiers/dump-inst-proof.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --dump-instantiations --produce-proofs --print-inst-full --no-check-unsat-cores
; COMMAND-LINE: --dump-instantiations --produce-proofs --print-inst-full
; EXPECT: unsat
; EXPECT: (instantiations (forall ((x Int)) (or (P x) (Q x)))
; EXPECT: ( 2 )
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress1/sygus/issue4009-qep.smt2
@@ -1,5 +1,5 @@
; EXPECT: unsat
; COMMAND-LINE: --sygus-inference --sygus-qe-preproc --no-check-unsat-cores -q
; COMMAND-LINE: --sygus-inference --sygus-qe-preproc -q
(set-logic ALL)
(declare-fun a () Real)
(declare-fun b () Real)
Expand Down
10 changes: 5 additions & 5 deletions test/regress/regress2/bv_to_int_bitwise.smt2
@@ -1,8 +1,8 @@
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=1 --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=5 --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=value --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=sum --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=bv --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=1
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=5
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=value
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=sum
; COMMAND-LINE: --solve-bv-as-int=bv
; EXPECT: unsat
(set-logic QF_BV)
(declare-fun s () (_ BitVec 4))
Expand Down
8 changes: 4 additions & 4 deletions test/regress/regress2/bv_to_int_mask_array_1.smt2
@@ -1,7 +1,7 @@
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=1 --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=value --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=sum --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=bv --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=1
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=value
; COMMAND-LINE: --solve-bv-as-int=iand --iand-mode=sum
; COMMAND-LINE: --solve-bv-as-int=bv
; EXPECT: unsat
(set-logic ALL)
(declare-fun A () (Array Int Int))
Expand Down
@@ -1,4 +1,4 @@
% COMMAND-LINE: --uf-ho --full-saturate-quant --ho-elim --no-check-unsat-cores
% COMMAND-LINE: --uf-ho --full-saturate-quant --ho-elim
% EXPECT: % SZS status Theorem for partial_app_interpreted_SWW474^2

%------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress3/arith_prp-13-24.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --no-check-unsat-cores
; COMMAND-LINE:
; EXPECT: unsat
(set-logic QF_LIA)
(set-option :ite-simp true)
Expand Down
4 changes: 2 additions & 2 deletions test/regress/regress3/bv_to_int_and_or.smt2
@@ -1,5 +1,5 @@
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=1 --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=2 --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=1
; COMMAND-LINE: --solve-bv-as-int=sum --bvand-integer-granularity=2
; EXPECT: unsat
(set-logic QF_BV)
(declare-fun a () (_ BitVec 4))
Expand Down
@@ -1,5 +1,5 @@
; COMMAND-LINE: --solve-bv-as-int=bv --no-check-unsat-cores
; COMMAND-LINE: --cegqi-all --full-saturate-quant --bvand-integer-granularity=1 --solve-bv-as-int=sum --no-check-unsat-cores
; COMMAND-LINE: --solve-bv-as-int=bv
; COMMAND-LINE: --cegqi-all --full-saturate-quant --bvand-integer-granularity=1 --solve-bv-as-int=sum
; EXPECT: unsat
(set-logic BV)
(declare-fun s () (_ BitVec 4))
Expand Down
2 changes: 1 addition & 1 deletion test/regress/regress3/bv_to_int_quant1.smt2
@@ -1,4 +1,4 @@
; COMMAND-LINE: --cegqi-all --full-saturate-quant --bvand-integer-granularity=1 --solve-bv-as-int=sum --no-check-unsat-cores
; COMMAND-LINE: --cegqi-all --full-saturate-quant --bvand-integer-granularity=1 --solve-bv-as-int=sum
; EXPECT: unsat
(set-logic BV)
(declare-fun s () (_ BitVec 4))
Expand Down
@@ -1,4 +1,4 @@
; COMMAND-LINE: --sygus-inst --no-check-unsat-cores
; COMMAND-LINE: --sygus-inst

; times out during unsat core checking since 6b673474
(set-info :smt-lib-version 2.6)
Expand Down
2 changes: 1 addition & 1 deletion test/regress/run_regression.py
Expand Up @@ -343,7 +343,7 @@ def run_regression(check_unsat_cores, check_proofs, dump, use_skip_return_code,
'--no-produce-unsat-cores' not in all_args and \
'--no-check-unsat-cores' not in all_args and \
'--check-unsat-cores' not in all_args and \
'--incremental' not in all_args and \
'sygus-inference' not in benchmark_content and \
'--unconstrained-simp' not in all_args:
extra_command_line_args += ['--check-unsat-cores']
if check_proofs and \
Expand Down

0 comments on commit 0e9fed3

Please sign in to comment.