Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion error at src/theory/theory_model_builder.cpp:886 (sep models) #5515

Closed
rainoftime opened this issue Nov 23, 2020 · 1 comment · Fixed by #7422
Closed

Assertion error at src/theory/theory_model_builder.cpp:886 (sep models) #5515

rainoftime opened this issue Nov 23, 2020 · 1 comment · Fixed by #7422
Assignees

Comments

@rainoftime
Copy link

rainoftime commented Nov 23, 2020

Hi, for the following instance,
cvc4 2b4d699

(set-logic QF_ALL_SUPPORTED)
(set-info :status unsat)
(declare-sort Loc 0)
(declare-const loc0 Loc)
(declare-datatypes ((Node 0)) (((node (data Int) (left Loc) (right Loc)))))
(declare-heap (Loc Node))
(declare-fun data0 () Node)
(declare-const dv Int)
(declare-const v Loc)
(declare-const dl Int)
(declare-const l Loc)
(declare-const dr Int)
(declare-const r Loc)
(define-fun ten-tree0 ((x Loc) (d Int)) Bool 
(or (and (_ emp Loc Node) (= x (as sep.nil Loc))) (and (sep (pto x (node d l r)) (and (_ emp Loc Node) (= l (as sep.nil Loc))) (and (_ emp Loc Node) (= r (as sep.nil Loc)))) (= dl (- d 10)) (= dr (+ d 10)))))
(declare-const dy Int)
(declare-const y Loc)
(declare-const dz Int)
(declare-const z Loc)
(define-fun ord-tree0 ((x Loc) (d Int)) Bool 
(or (and (_ emp Loc Node) (= x (as sep.nil Loc))) (and (sep (pto x (node d y z)) (and (_ emp Loc Node) (= y (as sep.nil Loc))) (and (_ emp Loc Node) (= z (as sep.nil Loc)))) (<= dy d) (<= d dz))))

;------- f -------
(assert (= y (as sep.nil Loc)))
(assert (distinct z (as sep.nil Loc)))

(assert (= dy dv))
(assert (= dz (+ dv 10)))
;-----------------

(assert (not (= v (as sep.nil Loc))))

(assert (ten-tree0 v dv))
(assert (not (ord-tree0 v dv)))

(check-sat)
./cvc4 xx.smt2 
Fatal failure within bool CVC4::theory::TheoryEngineModelBuilder::buildModel(CVC4::theory::TheoryModel*) at /home//CVC4/src/theory/theory_model_builder.cpp:886
Check failure

 false

Aborted
@ajreynol ajreynol self-assigned this Nov 23, 2020
@ajreynol ajreynol changed the title Assertion error at src/theory/theory_model_builder.cpp:886 Assertion error at src/theory/theory_model_builder.cpp:886 (sep models) Nov 23, 2020
@nafur
Copy link
Member

nafur commented Nov 26, 2020

(declare-sort Loc 0)
(declare-datatypes ((Node 0)) (((node (data Int) (left Loc) (right Loc)))))
(declare-heap (Loc Node))
(declare-const v Loc)
(declare-const l Loc)
(assert (sep (pto v (node 0 l v)) (and (_ emp Loc Node) (= l (as sep.nil Loc)))))
(check-sat)

4tXJ7f pushed a commit that referenced this issue Oct 20, 2021
Fixes #5515.

It is currently not possible to check-model with separation logic. Checking models requires either additional bookkeeping (heap per formula position) or otherwise is expensive to check.

This makes us give a recoverable exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants