I developed a model using Z3 .Net API. The program runs well. But when I increase the input size (i.e., the model size), the program runs for a long time and then it ends giving the following message:
"Unhandled Exception: OutOfMemoryException."
I am wonderding is there any way I can increase the memory size for the program.
If you’re compiling to
x86platform, you’re hitting 2GB memory limit of 32-bit processes. If you’re targetingx64, there is also 2GB limit of .NET objects which you cannot bypass. In my experience, this 2GB limit is enough under normal circumstances.You have a choice of running Z3 executable using .NET and redirecting output string to handle it by yourself. As a last resort, you can rewrite the memory-critical part in your program using Z3 C API to bypass above restrictions, which I think you may not want to do.