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

Set default behaviour to exit on error in CLI mode #7529

Closed

Conversation

Timmmm
Copy link

@Timmmm Timmmm commented Jan 26, 2025

This changes the default error-behaviour to immediate-exit for smtlib2 when running in CLI mode. This makes it fail-safe. There's no reason to ignore errors in CLI mode and it may lead to accidentally "verified" proofs if the user makes an easy mistake.

This does not change the default when used via an API because immediate-exit calls _Exit(1) and that isn't a good thing for a library to do.

Fixes #7528

This changes the default `error-behaviour` to `immediate-exit` for smtlib2 when running in CLI mode. This makes it fail-safe. There's no reason to ignore errors in CLI mode and it may lead to accidentally "verified" proofs if the user makes an easy mistake.

This does not change the default when used via an API because `immediate-exit` calls `_Exit(1)` and that isn't a good thing for a library to do.
@NikolajBjorner
Copy link
Contributor

Sorry if I was unclear.
There is already an option to force z3 to exit on error by setting a configuration.
Use this for your application.

I am going to get support calls to revert your change.

@Timmmm
Copy link
Author

Timmmm commented Jan 26, 2025

Sorry I didn't quite get what you meant about interactive text mode. I'll try again.

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

Successfully merging this pull request may close these issues.

Z3 ignores errors
2 participants