In this post, I will put down the details about some common JPF options one can specify in a .jpf configuration file or a the argument page of a run configuration. Below, a fully qualified name include the package, class, and inner class like "package_name.class_name$inner_class_name.method_name".
1. target = <your package>.Example
target specifies the class you want to analyze
2. classpath = <your class path>
class path tells JVM where to find the target class
3. symbolic.method = <fully qualified name>.func(sym#con)
tells JPF which method to be executed symbolically. "sym" and "con" represents the first argument should be associated with a symbolic value and the second one a concrete value. You can specify multiple methods for symbolic execution, simply separate them using ","
4. listener = gov.nasa.jpf.symbc.SymbolicListener
listener to print information such as path conditions, test cases about a symbolic run
5. vm.storage.class=nil
no state matching (???)
6. search.multiple_error=true
tell JPF not to stop when it finds the first error as a typical model checker will exit after founding one counter example.
7. symbolic.dp=choco
use Choco as the decision procedure
8. symbolic.minint=100
specify the range of a symbolic integer
9. Symbolic.debug=true
more information will be printed such as the number of path conditions, and how many of them are satisfiable
10. jpf-core.native_classpath (compare with classpath which tells JPF VM where to find classes)
this property specifies the classpath for the host JVM (when the host JVM needs to load a class, it searches in the path). In JPF, when we define our own "listener" (for observing JPF internals as JPF is implemented using "Observer" design pattern. When it is going to do something, it will notify the observer.) or "native peer" (for modeling native methods (or not restricted to native methods)), they will be executed by the host JVM, so we need to make sure the listener or native peer is in the classpath of host JVM.
11. cg.enumerate-random=true
In some part of a program, a random number may be generate (for example by using Random class). If this parameter is set to true, JPF will explore all possibilities. This is the model checking feature of JPF. If we simply run the program as a java application, each execution can only explore one possible path.
12. vm.no_orphan_methods=true (vm is optional)
If this parameter is set to true, JPF will throw exception if it finds that there are orphan methods in a native peer class (orphan methods means there are no such method in the model class, but users have modeled the methods in the native peer class). By default, the parameter is set to false.