When I use Scala^Z3 (Z3 3.2 and according Scala^Z3 java library) and get a parser error like:
(error "line 21 column 41: invalid command, '(' expected")
Error: parser error
The executed Thread is killed and I cannot stop this by surrounding
the code with try/catch or anything.
Is there any way to stop this behaviour?
I am afraid there is not much to do: there is supposedly a call to
exitin the Z3 library, and that is what causes this behavior.As far as I understand the Java Native Interface, I cannot prevent the native function from terminating the process. The best I could do is add an exit hook to the JVM that could warn the user that the program is terminating due to external reasons, but that won’t let you resume where you were in the control flow.
The ideal solution is of course that Z3 is updated so that no function in the public interface ever calls
exit.