-
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.
Implement evaluation of semi-evaluated kinds in model (cvc5#11093)
This revises how APPLY_SELECTOR terms are evaluated in models. Previously, APPLY_SELECTOR was marked "unevaluated" and hence a term `(s x)` would only evaluate if `(s x)` could be rewritten or if `(s x)` appeared syntactically in the model. This updates `TheoryModel` so that APPLY_SELECTOR is marked "semi-evaluated". It adds a further method to check whether the evaluation of such a term is entailed by congruence, or else can be assigned arbitrarily. A similar change is made for `SEQ_NTH`, which had similar issues. Fixes cvc5#10770.
- Loading branch information
Showing
8 changed files
with
148 additions
and
12 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
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,13 @@ | ||
; COMMAND-LINE: --produce-models | ||
; EXPECT: sat | ||
; EXPECT: (((head (node (- x 1))) 4)) | ||
(set-logic ALL) | ||
(declare-datatype list ((node (data Int)) (cons (head Int) (tail list)))) | ||
(declare-fun x () Int) | ||
(declare-fun y () Int) | ||
(assert (> y 100)) | ||
(assert (= (head (node y)) 4)) | ||
(assert (<= y x (+ y 1))) | ||
(assert (not (= x y))) | ||
(check-sat) | ||
(get-value ((head (node (- x 1))))) |
10 changes: 10 additions & 0 deletions
10
test/regress/cli/regress0/quantifiers/dd_german169_semi_eval.smt2
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,10 @@ | ||
; COMMAND-LINE: --finite-model-find | ||
; EXPECT: sat | ||
(set-logic ALL) | ||
(declare-datatypes ((B 0)) (((T) (F)))) | ||
(declare-sort U 0) | ||
(declare-datatypes ((s 0)) (((i) (t)))) | ||
(declare-datatypes ((m 0)) (((d (m s))))) | ||
(declare-fun c () (Array U m)) | ||
(assert (not (= T (ite (or (forall ((n U)) (not (= t (m (select c n)))))) T F)))) | ||
(check-sat) |
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,14 @@ | ||
; COMMAND-LINE: --produce-models | ||
; EXPECT: sat | ||
; EXPECT: (((seq.nth (seq.unit (- x 1)) z) 4)) | ||
(set-logic ALL) | ||
(declare-fun x () Int) | ||
(declare-fun y () Int) | ||
(declare-fun z () Int) | ||
(assert (> y 100)) | ||
(assert (= (seq.nth (seq.unit y) 10) 4)) | ||
(assert (<= y x (+ y 1))) | ||
(assert (not (= x y))) | ||
(assert (< 9 z 11)) | ||
(check-sat) | ||
(get-value ((seq.nth (seq.unit (- x 1)) z))) |