-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix strategy for datatypes solver involving acyclicity (cvc5#11094)
This fixes model soundness issues in the quantifier-free datatypes solver. cvc5 could fail to recognize there is a conflict due to an acyclicity inference. The issue occurs as early as cvc5 0.0.2. The issue was caused by the strategy for the datatypes theory solver using 2 separate loops for checking for cycles and instantiate (i.e. inferring an equality based on a tester). The latter could introduce a fact that should then lead to us checking need to check for cycles again. However, we could terminate with "sat" if there was nothing else to do. The solver has always had this structure, I suspect that a change to the fact vs lemma policy made this design incorrect. Adds a regression exhibiting the issue that is fixed now.
- Loading branch information
Showing
3 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; EXPECT: unsat | ||
(set-logic ALL) | ||
|
||
(declare-datatypes ((T1 0)(T2 0)) | ||
(((cons1 (id1 Int) (tail1 T2))) | ||
((Nil) (cons2 (id2 Int) (tail2 T1)))) | ||
) | ||
|
||
(declare-const x T1) | ||
(declare-const y T2) | ||
|
||
(assert (= x (tail2 y))) | ||
(assert (= y (tail1 x))) | ||
(assert (not (= Nil y))) | ||
|
||
(check-sat) |