Skip to content
New issue

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

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

Already on GitHub? # to your account

Optimization combined with a timeout. #4821

Closed
mjp41 opened this issue Nov 26, 2020 · 2 comments
Closed

Optimization combined with a timeout. #4821

mjp41 opened this issue Nov 26, 2020 · 2 comments

Comments

@mjp41
Copy link
Contributor

mjp41 commented Nov 26, 2020

I have been experimenting with the Optimisation feature through a .NET interface. I have added a timeout and it seems to cause issues. The most serious I have experienced is:

ASSERTION VIOLATION
File: ..\..\src\math\lp\int_solver.cpp
Line: 525
Failed to verify: get_freedom_interval_for_column(j, inf_l, l, inf_u, u, m)

Z3 4.8.9.0
Please file an issue with this message and more detail about how you encountered it at https://github.com/Z3Prover/z3/issues/new

But I have also had

Unhandled exception. Microsoft.Z3.Z3Exception: maximization suspended
   at Microsoft.Z3.Native.Z3_optimize_check(IntPtr a0, IntPtr a1, UInt32 a2, IntPtr[] a3)
   at Microsoft.Z3.Optimize.Check(Expr[] assumptions)
   at LayoutEngine.Program.process_program(IEnumerable`1 prog, UInt32 timeout_ms) in C:\src\LayoutEngine\Program.cs:line 76
   at LayoutEngine.Program.Main(String[] args) in C:\src\LayoutEngine\Program.cs:line 150

C:\src\LayoutEngine\bin\Debug\netcoreapp3.1\LayoutEngine.exe (process 26208) exited with code 0.

and

Unhandled exception. Microsoft.Z3.Z3Exception: push canceled
   at Microsoft.Z3.Native.Z3_optimize_check(IntPtr a0, IntPtr a1, UInt32 a2, IntPtr[] a3)
   at Microsoft.Z3.Optimize.Check(Expr[] assumptions)
   at LayoutEngine.Program.process_program(IEnumerable`1 prog, UInt32 timeout_ms) in C:\src\LayoutEngine\Program.cs:line 76
   at LayoutEngine.Program.Main(String[] args) in C:\src\LayoutEngine\Program.cs:line 149

Failure is non-deterministic between these errors and success.

I have uploaded the complete program that causes the issues:
https://github.com/mjp41/verona_bigtable_test/tree/master

I have not attempted to minimise the program to localise the error, I can do this, if that would be helpful.

@NikolajBjorner
Copy link
Contributor

I tested the update on your snippet. It does not crash any longer.

@mjp41
Copy link
Contributor Author

mjp41 commented Nov 30, 2020

Thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants