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 violation ../src/ast/ast.cpp line 432 #4977

Closed
deut-erium opened this issue Jan 26, 2021 · 1 comment
Closed

Assertion violation ../src/ast/ast.cpp line 432 #4977

deut-erium opened this issue Jan 26, 2021 · 1 comment

Comments

@deut-erium
Copy link

Following code crashes on z3py, I crashed it unintentionally

ASSERTION VIOLATION
File: ../src/ast/ast.cpp
Line: 432
UNREACHABLE CODE WAS REACHED.
Z3 4.8.9.0
from z3 import *
s = Optimize()
f = Function('f',IntSort(),IntSort())
s.maximize(f)
NikolajBjorner added a commit that referenced this issue Jan 26, 2021
@NikolajBjorner
Copy link
Contributor

the argument to maximize should be an expression, not a function. For example

from z3 import *
s = Optimize()
f = Function('f',IntSort(),IntSort())
s.maximize(f(1))

I have added checks in the front-end so it now throws a more informative 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

No branches or pull requests

2 participants