You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following script elicits a confusing error from Z3 with at least versions 4.7.1, 4.8.4 and 4.8.6 (the ones I happened to test)
$ cat z3bug.smt2
(set-option :global-declarations true)
(push 1)
(declare-datatypes (T1) ((Struct1 (mk-struct1 (struct1-proj0 T1)))))
(declare-fun x () (Struct1 Bool))
(pop 1)
(define-fun y () (Struct1 Bool) (mk-struct1 true))
$ z3 z3bug.smt2
(error "line 8 column 30: invalid declaration, function 'mk-struct1' (with the given signature) already declared")
$ z3 --version
Z3 version 4.8.6 - 64 bit
I expect y to be defined as a value equal to (mk-struct1 true), but instead I get the above error. This appears to be an interaction between the global-declarations option and the pop. Weirdly, the declaration of x also seems necessary to trigger the behavior.
The text was updated successfully, but these errors were encountered:
The following script elicits a confusing error from Z3 with at least versions 4.7.1, 4.8.4 and 4.8.6 (the ones I happened to test)
I expect
y
to be defined as a value equal to(mk-struct1 true)
, but instead I get the above error. This appears to be an interaction between theglobal-declarations
option and thepop
. Weirdly, the declaration ofx
also seems necessary to trigger the behavior.The text was updated successfully, but these errors were encountered: