Skip to content

Commit

Permalink
Add more abduction regressions (#7461)
Browse files Browse the repository at this point in the history
Fixes #5848.

This also fixes an issue leftover from #6605 where a spurious assertion failure was thrown.

Also introduces subfolder regress/regress1/abduction.
  • Loading branch information
ajreynol committed Oct 22, 2021
1 parent b3774c9 commit 4929b5d
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/theory/builtin/theory_builtin_type_rules.cpp
Expand Up @@ -42,7 +42,8 @@ typedef expr::Attribute<GroundTermAttributeId, Node> GroundTermAttribute;

Node SortProperties::mkGroundTerm(TypeNode type)
{
Assert(type.getKind() == kind::SORT_TYPE);
// we typically use this method for sorts, although there are other types
// where it is used as well, e.g. arrays that are not closed enumerable.
GroundTermAttribute gta;
if (type.hasAttribute(gta))
{
Expand Down
27 changes: 16 additions & 11 deletions test/regress/CMakeLists.txt
Expand Up @@ -1489,7 +1489,22 @@ set(regress_0_tests
# Regression level 1 tests

set(regress_1_tests
regress1/abduct-dt.smt2
regress1/abduction/sygus-abduct-test-user.smt2
regress1/abduction/issue5848-4.smt2
regress1/abduction/issue5848-2.smt2
regress1/abduction/issue5848.smt2
regress1/abduction/issue6605-1.smt2
regress1/abduction/abduct-dt.smt2
regress1/abduction/sygus-abduct-test-ccore.smt2
regress1/abduction/sygus-abduct-test.smt2
regress1/abduction/abd-simple-conj-4.smt2
regress1/abduction/abduction_streq.readable.smt2
regress1/abduction/yoni-true-sol.smt2
regress1/abduction/uf-abduct.smt2
regress1/abduction/abduction_1255.corecstrs.readable.smt2
regress1/abduction/abduction-no-pbe-sym-break.smt2
regress1/abduction/issue5848-3-trivial-no-abduct.smt2
regress1/abduction/sygus-abduct-ex1-grammar.smt2
regress1/arith/arith-brab-test.smt2
regress1/arith/arith-int-004.cvc.smt2
regress1/arith/arith-int-011.cvc.smt2
Expand Down Expand Up @@ -2322,15 +2337,7 @@ set(regress_1_tests
regress1/strings/update-ex1.smt2
regress1/strings/update-ex2.smt2
regress1/strings/username_checker_min.smt2
regress1/sygus-abduct-ex1-grammar.smt2
regress1/sygus-abduct-test.smt2
regress1/sygus-abduct-test-ccore.smt2
regress1/sygus-abduct-test-user.smt2
regress1/sygus/VC22_a.sy
regress1/sygus/abd-simple-conj-4.smt2
regress1/sygus/abduction_1255.corecstrs.readable.smt2
regress1/sygus/abduction_streq.readable.smt2
regress1/sygus/abduction-no-pbe-sym-break.smt2
regress1/sygus/abv.sy
regress1/sygus/array-grammar-store.sy
regress1/sygus/array_search_5-Q-easy.sy
Expand Down Expand Up @@ -2476,10 +2483,8 @@ set(regress_1_tests
regress1/sygus/trivial-stream.sy
regress1/sygus/twolets1.sy
regress1/sygus/twolets2-orig.sy
regress1/sygus/uf-abduct.smt2
regress1/sygus/unbdd_inv_gen_winf1.sy
regress1/sygus/univ_2-long-repeat.sy
regress1/sygus/yoni-true-sol.smt2
regress1/sym/q-constant.smt2
regress1/sym/q-function.smt2
regress1/sym/qf-function.smt2
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions test/regress/regress1/abduction/issue5848-2.smt2
@@ -0,0 +1,6 @@
; COMMAND-LINE: --produce-abducts
; SCRUBBER: grep -v -E '(\(define-fun)'
; EXIT: 0
(set-logic ALL)
(declare-fun v9 () Bool)
(get-abduct A (or true v9))
8 changes: 8 additions & 0 deletions test/regress/regress1/abduction/issue5848-4.smt2
@@ -0,0 +1,8 @@
; COMMAND-LINE: --produce-abducts
; EXPECT: none
(set-logic UFLRA)
(declare-sort S0 0)
(declare-fun S0-0 () S0)
(declare-fun S0-1 () S0)
(declare-fun v87 () Bool)
(get-abduct A (and false (exists ((q117 S0)) (or v87 (and (= S0-1 q117) (= q117 S0-0))))))
7 changes: 7 additions & 0 deletions test/regress/regress1/abduction/issue5848.smt2
@@ -0,0 +1,7 @@
; COMMAND-LINE: --produce-abducts
; SCRUBBER: grep -v -E '(\(define-fun)'
; EXIT: 0
(set-logic ALL)
(declare-fun a () Int)
(assert (= (mod 0 a) 0))
(get-abduct A (= a 1))
11 changes: 11 additions & 0 deletions test/regress/regress1/abduction/issue6605-1.smt2
@@ -0,0 +1,11 @@
; COMMAND-LINE: --produce-abducts
; SCRUBBER: grep -v -E '(\(define-fun)'
; EXIT: 0
(set-logic ALL)
(set-option :produce-abducts true)
(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun c () Int)
(assert (= (>= b c) (>= 0 a)))
(assert (= c a))
(get-abduct d (<= a b))
File renamed without changes.

0 comments on commit 4929b5d

Please sign in to comment.