Memory and model size
Probabilistic model checking can need a lot of memory. This page describes how PRISM uses memory, and how to give it more. See also the "Memory problems" section of the FAQ.
CUDD memory
CUDD, the underlying BDD and MTBDD library used in PRISM's symbolic engines, has an upper memory limit.
By default, this limit is 1 GB. If you are working on a machine with significantly more memory than this and PRISM runs out of memory when model checking, it may help to change this. To set the limit, from the command-line, use the -cuddmaxmem switch. For example:
prism -cuddmaxmem 2g big_model.prism
Above, g denotes GB. You can also use m for MB.
You can also change the CUDD maximum memory setting from the options panel in the GUI, but you will need to close and restart the GUI (saving the settings as you do) for this to take effect.
Java memory
The Java virtual machine (JVM) used to execute PRISM also has upper memory limits.
This is more likely to impact the explicit engine.
Sometimes this limit will be exceeded and you will see an error of the form java.lang.OutOfMemoryError. To resolve this problem, you can increase this memory limit. On Unix, Linux or macOS platforms, this can be done by using the -javamaxmem switch, passed either to the command-line script prism or the GUI launcher xprism. For example:
prism -javamaxmem 4g big_model.prism
xprism -javamaxmem 4g big_model.prism
each set the limit to 4 GB. Alternatively, you can set the environment variable PRISM_JAVAMAXMEM before running PRISM. For example, under a bash shell:
PRISM_JAVAMAXMEM=4g
export PRISM_JAVAMAXMEM
prism big_model.prism
If you get an error of the form java.lang.StackOverflowError, then you can try increasing the stack size of the JVM.
On Unix, Linux or macOS platforms, this can be done by using the -javastack switch or the PRISM_JAVASTACKSIZE environment variable.
Examples are:
prism -javastack 1g big_model.prism
xprism -javastack 1g big_model.prism
or:
PRISM_JAVASTACKSIZE=1g
export PRISM_JAVASTACKSIZE
prism big_model.prism
If you are running PRISM on Windows you will have to make adjustments to Java memory manually, by modifying the prism.bat or xprism.bat scripts.
To set the memory to 4 GB, for example, add -Xmx4g to the list of arguments in the call to java or javaw at the end of the file.
To change the stack size to 1 GB, add -Xss1g.
Other Java options
If you want to pass additional switches to the JVM used to run PRISM, you can use the -javaparams switch.
For example:
prism -javaparams "-XX:AutoBoxCacheMax=100000000 -Xmn2g" -javamaxmem 12g big_model.prism
Alternatively (or in conjunction with -javaparams), the PRISM_JAVA_PARAMS environment variable passes switches to the JVM.
Finally, the PRISM_JAVA environment variable can be used to specify the java executable to use (by default, it is the one on your path).