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

ast_manager leak for LIA instance (horn tactic + proof) #3828

Closed
rainoftime opened this issue Apr 7, 2020 · 2 comments
Closed

ast_manager leak for LIA instance (horn tactic + proof) #3828

rainoftime opened this issue Apr 7, 2020 · 2 comments

Comments

@rainoftime
Copy link
Contributor

rainoftime commented Apr 7, 2020

Hi, for the following formula

(set-logic LIA)
(set-option :proof true)
(declare-const v0 Bool)
(declare-const i1 Int)
(declare-const i2 Int)
(declare-const i4 Int)
(declare-const i6 Int)
(declare-const i7 Int)
(declare-const i11 Int)
(declare-const v1 Bool)
(declare-const v2 Bool)
(assert (not (forall ((q2 Bool) (q3 Bool)) (and v2 v2 v0 (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v2 v0 v0 (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v0))))
(assert (not (forall ((q4 Bool) (q5 Int)) (and v2 v2 v0 (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v2 v0 v0 (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v0))))
(declare-const v4 Bool)
(declare-const v5 Bool)
(declare-const v6 Bool)
(declare-const i14 Int)
(assert (not (forall ((q6 Int) (q7 Int) (q8 Int)) (distinct 26 36 36 1 58))))
(declare-const v8 Bool)
(assert (exists ((q9 Int) (q10 Bool)) (not (and q10 (not v2) q10))))
(declare-const v9 Bool)
(assert (not (exists ((q11 Int) (q12 Int)) (> (abs 36) 6 76 36))))
(assert (not (forall ((q13 Bool)) (not (or q13 (not v0) q13 q13 (not v2) q13 (distinct i4 i7 (abs i2) 29 (abs 36)) (and (and v2 v2 v0 (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v2 v0 v0 (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v0) v4))))))
(declare-const v10 Bool)
(assert (or (= (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v8 v0 v0) (= (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v8 v0 v0) (= (or (distinct 26 36 36 1 58) v1 v0 (distinct 26 36 36 1 58) v0 (distinct 26 36 36 1 58) v0) v8 v0 v0)))
(check-sat-using (then simplify horn))

z3 cb13641 throws a ast_manager leak

ast_manager LEAKED: 56
Leaked: decl query!0 :: Bool
decl v4 :: Bool
decl v1 :: Bool
decl v0 :: Bool
#41 := (or v0 v1)
decl v2 :: Bool
#200 := (and v2 v0 #41 v4)
decl i2 :: Int
#182 := (* -1 i2)
#160 := (>= i2 0)
#185 := (if #160 i2 #182)
decl i7 :: Int
decl i4 :: Int
#194 := (distinct i4 i7 #185 29 36)
#107 := (not v0)
#87 := (not v2)
#86 := (:var 0 Bool)
#208 := (or #86 #87 #107 #194 #200)
#213 := (not #208)
#216 := (forall (vars (q13 Bool)) #213)
#269 := (=> #216 query!0)
#322 := (~ #269 #269)
#311 := (= #269 #269)
#312 := [rewrite]: #311
[iff~ #312]: #322
id: 323
@rainoftime
Copy link
Contributor Author

rainoftime commented Apr 7, 2020

The leak does not occur upon timeout (which is more often )

@NikolajBjorner
Copy link
Contributor

fixed

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

No branches or pull requests

2 participants