Skip to content

z3 reports unknown result on String formula #2390

@muchang

Description

@muchang
(declare-fun a () Int)
(declare-fun d () Int) 
(declare-fun k () Int)
(declare-fun b () String) 
(declare-fun ae () String) 
(declare-fun c () String)  
(declare-fun af () String) 
(declare-fun i () String)
(declare-fun j () String) 
(declare-fun ah () String) 
(declare-fun m () String) 
(declare-fun l () String)
(declare-fun q () String)   
(declare-fun n () String) 
(declare-fun s () String) 
(declare-fun r () String) 
(declare-fun aj () String) 
(declare-fun e () Bool) 
(declare-fun f () Bool)  
(declare-fun g () Bool)  
(declare-fun h () Bool) 
(declare-fun o () Bool) 
(declare-fun p () Bool) 
(assert (= e (not (= (/ a d) (- 1))) (= "" ( str.substr i 0 (str.len q)))(= f (not (= e o)))))    
(assert (ite (not (= h e)) (and (= k 0 (str.len ( str.substr b 0 (str.len j)))) (= ( str.substr ae 0 (str.len ah)) "" ( str.substr c 0 (str.len m)) l)) (and (=  0 (str.len ( str.substr b 0 (str.len j)))) (not ( str.in.re ae (str.to.re "=")))))) 
(assert (= (= g p) (not (= (/ a d)  1))(not (= h p)) (and  (= b ( str.++ (str.substr c (str.len m) (str.len n)) b )( str.++ s (str.substr b (str.len j) (str.len ( str.substr af 0 (str.len r))))))(not (= aj "")))))
(check-sat)

z3 reports unknown for this formula which is satisfiable, while cvc4 reports sat just in a second.
The stable version of z3 (4.8.5) reports sat on this case. I tried my best to reduce the case, but it cannot be reduced further.

OS: Ubuntu 18.04
Revision: 88aa689

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions