1 # JPF configuration for "jpf-core" component
3 # path elements can either be relative to the property file location, or
4 # use the JPF component name (e.g. "jpf-core") as a variable prefix
5 # (e.g. "jpf-core.sourcepath=${jpf-core}/src/examples").
6 # If a jpf.properties is to be used within NB, it has to use the variable prefix
7 # (prepending the project root is only done during JPF init)
9 # we use the ';' separator here because it is recognized by NetBeans (as opposed
12 # 'config_path' is set automatically by gov.nasa.jpf.Config during JPF init.
13 # If used from within an Ant build system, 'jpf-core' has to be set explicitly
14 # (ant does ${..} property expansion, but ignores property redefinition, so the
15 # following line will be ignored)
17 jpf-core = ${config_path}
19 jpf-core.native_classpath=\
20 ${jpf-core}/build/jpf.jar;\
21 ${jpf-core}/build/jpf-annotations.jar
24 ${jpf-core}/build/jpf-classes.jar;\
25 ${jpf-core}/build/examples
28 ${jpf-core}/src/examples
30 jpf-core.test_classpath=\
31 ${jpf-core}/build/tests
33 jpf-core.peer_packages = gov.nasa.jpf.vm,<model>,<default>
37 # the default jpf-core properties file with keys for which we need mandatory defaults
39 ########################### 0. global part ###############################
41 # instances that are both search and VM listeners
44 # do we want JPF exceptions to print their stack traces (that's only for
46 jpf.print_exception_stack = true
49 # this is where we can specify additional classpath entries that are
50 # not in the system property class.path (e.g. when running JPF from
51 # an environment that uses it's own loaders, like Eclipse plugins etc.)
52 #jpf.native_classpath = ..
55 ########################### 1. Search part ###############################
56 search.class = gov.nasa.jpf.search.DFSearch
59 # This flag indicates whether state matching will only be done when a state
60 # is revisited at a lower depth. By default this is false. If it is set to
61 # true and no error is found in a limited-depth search then it is guaranteed
62 # not to have such error below that depth. Note that for traditional
63 # depth limited search this does not hold
64 search.match_depth = false
66 # This flag indicates whether JPF should produce more than one error
67 # or stop at the first one
68 search.multiple_errors = false
70 # the minimum free memory bounds. If we fall below that threshold, we
74 # name of the file in which we store error paths. If not set, we don't store
75 #search.error_path = error.xml
77 # the standard properties we want to check for
79 gov.nasa.jpf.vm.NotDeadlockedProperty,\
80 gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
83 # various heuristic parameters
85 # This number specifies the maximum number of states to keep on the queue
86 # during a heuristic search. By default it is set to -1
87 search.heuristic.queue_limit = -1
89 # This flag indicates whether branches with counts less than branch-start
90 # are to be ranked according to how many times they have been taken.
91 # It is set to true by default. If it is set to false, they are all valued
93 search.heuristic.branch.count_early = true
95 # This number determines at what point branches are heuristically valued as worse
96 # than non-branching transitions. By default this value is 1.
100 # This number if greater than 0 is returned as the heuristic value for
101 # non-branching transitions. By default it is set to -1 in which case the
102 # value of branch-start is returned instead
103 search.heuristic.branch.no_branch_return = -1
105 # exclusive search listeners
109 ############################### 2. VM part ###############################
112 # this is an ordered list of packages from which we try to locate native peers.
113 # "<model>" means JPF tries the same package like the model class
114 # "<default>" means no package at all
115 # (this is going to be extended by jpf.properties files)
116 #peer_packages = <model>,<default>
119 vm.class = gov.nasa.jpf.vm.SingleProcessVM
121 # the ClassLoaderInfo class used for startup
122 vm.classloader.class = gov.nasa.jpf.jvm.JVMSystemClassLoaderInfo
124 # class used to hash/store states (if not set, states are not matched)
125 vm.storage.class = gov.nasa.jpf.vm.JenkinsStateSet
127 # class used to maintain the backtrack stack
128 vm.backtracker.class = gov.nasa.jpf.vm.DefaultBacktracker
130 # serializer to be used by state set (vm.storage.class)
131 vm.serializer.class = gov.nasa.jpf.vm.serialize.CFSerializer
132 #vm.serializer.class = gov.nasa.jpf.vm.serialize.AdaptiveSerializer
133 #vm.serializer.class = gov.nasa.jpf.vm.serialize.FilteringSerializer
134 filter.class = gov.nasa.jpf.vm.serialize.SmartThingsFilterConfiguration
136 # the class that models static fields and classes
137 vm.statics.class = gov.nasa.jpf.vm.OVStatics
139 # the class that models the heap
140 #vm.heap.class = gov.nasa.jpf.vm.PSIMHeap
141 vm.heap.class = gov.nasa.jpf.vm.OVHeap
143 # the class representing the list of all threads
144 vm.threadlist.class = gov.nasa.jpf.vm.ThreadList
146 # restorer to be used by backtracker such as DefaultBacktracker UNLESS a
147 # serializer that is also a restorer (such as CollapsingSerializer) is used.
148 # I.e. this is only read if serializer is not used or it's not a StateRestorer
149 vm.restorer.class = .vm.DefaultMementoRestorer
151 # where do we get the standard libraries from?
152 # "<system>" is replaced by the host VM sun.boot.class.path setting
153 vm.boot_classpath = <system>
155 # instruction factory
156 jvm.insn_factory.class = gov.nasa.jpf.jvm.bytecode.InstructionFactory
159 vm.fields_factory.class = gov.nasa.jpf.vm.DefaultFieldsFactory
161 # pattern list for assertion enabled/disabled classes
162 #vm.enable_assertions = *
163 #vm.disable_assertions=
165 # do we support the Verify.ignorePath() API (to imperatively ignore paths in modeled/instrumented programs)?
166 vm.verify.ignore_path = true
169 vm.scheduler.class = gov.nasa.jpf.vm.DelegatingScheduler
170 vm.scheduler.sync.class = gov.nasa.jpf.vm.AllRunnablesSyncPolicy
171 vm.scheduler.sharedness.class = gov.nasa.jpf.vm.PathSharednessPolicy
173 # the following properties can be used to set filters for GenericSharednessPolicy instances
175 # never break on exposure or shared field access from matching methods.
176 # NOTE - this is transitive and hence should only include a minimal set of trusted methods
177 vm.shared.never_break_methods=\
178 java.util.concurrent.ThreadPoolExecutor.processWorkerExit,\
179 java.util.concurrent.locks.Abstract*Synchronizer.*,\
180 java.util.concurrent.ThreadPoolExecutor.getTask,\
181 java.util.concurrent.atomic.Atomic*.*,\
182 java.util.concurrent.Exchanger.doExchange,\
183 java.util.concurrent.ThreadPoolExecutor.interruptIdleWorkers,\
184 java.util.concurrent.TimeUnit.*
186 vm.shared.never_break_types=\
187 java.util.concurrent.TimeUnit
189 # never break on shared access of the following fields. While this is less prone to
190 # masking defects than never_break_methods, it should also be used sparingly.
191 # NOTE - java.lang.Thread* fields should not be excluded if the SUT explicitly uses
192 # Thread or ThreadGroup objects
193 vm.shared.never_break_fields=\
194 java.lang.Thread*.*,\
196 java.lang.Runtime.*,\
197 java.lang.Boolean.*,\
200 java.util.HashMap.EMPTY_TABLE,\
201 java.util.HashSet.PRESENT,\
202 java.util.concurrent.ThreadPoolExecutor*.*,\
203 java.util.concurrent.ThreadPoolExecutor*.*,\
204 java.util.concurrent.TimeUnit.*,\
205 java.util.concurrent.Exchanger.CANCEL,\
206 java.util.concurrent.Exchanger.NULL_ITEM,\
207 java.util.concurrent.Executors$DefaultThreadFactory.*,\
209 sun.misc.SharedSecrets.*,\
210 sun.misc.Unsafe.theUnsafe,\
211 gov.nasa.jpf.util.test.TestJPF.*
214 # do we also break transitions on reference field puts that could make the
215 # referenced objects shared
216 vm.shared.break_on_exposure = true
218 # do we try to deduce if a field is supposed to be protected by a lock? In this
219 # case, we stop to treat this field as a boundary step, but only if we see the lock
220 vm.shared.sync_detection = true
222 # do we assume final fields to be race-safe (not really true, esp. for
223 # instance fields with references leaking from a ctor, but a good starting point)
224 vm.shared.skip_finals=true
226 # ClassLoaders synchronize the loading of a class.
227 # Thus, static final fields can never be included in a race condition since only 1 thread is allowed to access the class while it is loading.
228 # Defaulted to false to maintain backward compatibility in JPF
229 vm.shared.skip_static_finals=false
231 # When an object's constructor has returned, then the final fields can not be changed.
232 # Thus, instance final fields can never be included in a race condition (unless the this reference is leaked from a constructor)
233 # Defaulted to false to maintain backward compatibility in JPF
234 vm.shared.skip_constructed_finals=false
237 # do we ignore explicitly set Thread.UncaughtHandlers
238 vm.ignore_uncaught_handler=false
240 # do we treat returned Thread.UncaughtHandler.uncaughtException() calls as normal thread termination
241 vm.pass_uncaught_handler=true
243 # do we reclaim unused memory (run garbage collection)
246 # threshold after which number of allocations to perform a garbage collection
247 # (even within the same transition, to avoid lots of short living objects)
251 # do we run finalizers on collected objects (only makes sense with garbage collection)
254 # this is a preemption boundary specifying the max number of instructions after which we
255 # break the current transition if there are other runnable threads
256 vm.max_transition_length = 2000000000
258 # are thread ids of terminated threads with recycled thread objects reused when creating new
259 # threads. This is required for programs that sequentially create many short living threads
262 # do we want to halt execution on each throw of an exception that matches
263 # one of the given classname wildcard patterns w/o looking for exception handlers?
264 # (useful for empty handler blocks, over-permissive catches or generally
265 # misused exceptions)
266 #vm.halt_on_throw = *
268 # class that is used to create scheduling relevant choice generators.
269 # this will replace the scheduler
270 vm.scheduler_factory.class = gov.nasa.jpf.vm.DefaultSchedulerFactory
272 # print output as it is generated during the search (for all paths)
273 vm.tree_output = true
275 # collect output inside the stored path (to create program trace outout)
276 vm.path_output = false
278 # do we want to store the whole path no matter if we report them
284 # from where do we initialize the system properties
285 # SELECTED - keys specified as vm.system.properties, values from host
286 # FILE - Java properties file (key=value pairs)
287 # HOST - all system properties from underlying host VM
288 vm.sysprop.source = SELECTED
290 # pathname of property file with system properties
293 # list of key names to load from host VM
296 # class we use to model execution time
297 vm.time.class = gov.nasa.jpf.vm.ConstantTime
299 # if this is set to true, we throw an exception if we encounter any orphan native peer methods
300 vm.no_orphan_methods = false
302 # if this is set to true, overriden finalize() methods execute upon objects garbage collections
303 vm.process_finalizers = false
308 # di=o we model nested locks during class init (to detect possible hotspot dealocks during init)
309 # (off by default since it can cause state explosion)
310 jvm.nested_init=false
312 # if so, for which classes (default is to exclude system classes)
313 jvm.nested_init.exclude=java.*,javax.*,sun.misc.*
316 ############################### 3. CG part ###############################
318 # choice randomization policy in effect:
319 # "NONE" - choice sets are not randomized
320 # "FIXED_SEED" - choice sets are randomized using a fixed seed for each JPF run (reproducible)
321 # "VAR_SEED" - choice sets are randomized using a variable seed for each JPF run
322 cg.randomize_choices = NONE
324 # the standard seed value used for the FIXED_SEED policy
328 # if this is set, we create choice generators even if there is only a single
329 # choice. This is to ensure state storage/matching at all locations where a
330 # choice generator *could* be created. The default should be to turn it off though,
331 # since this can produce a lot of additional states (esp. with threads)
332 cg.break_single_choice = false
335 # default BooleanChoiceGenerator sequence: do we start with 'false'
336 cg.boolean.false_first = true
338 # do we want java.util.Random. nextXX() enumerate choices, or just return a single value?
339 # (isn't implemented for all types yet)
340 cg.enumerate_random=false
342 # maximum number of processors returned by Runtime.availableProcessors(). If this is
343 # greater than 1, the call represents a ChoiceGenerator
346 # creates a CG upon Thread.start, i.e. breaks the starting transition. Note this is
347 # required for data race detection (which depends on detecting access of shared objects)
348 cg.threads.break_start=true
350 # if this option is set we break the transition on Thread.yield()
351 cg.threads.break_yield=true
353 # if this option is set we break the transition on Thread.sleep()
354 cg.threads.break_sleep=true
356 # set if we shold also break on array instructions, e.g. to detect races
357 # for array elements. This is off by default because it can cause serious
359 cg.threads.break_arrays=false
361 # do we support atomic sections. If set to false, Verify.beginAtomic()/endAtomic()
362 # will not do anything
363 cg.enable_atomic=true
365 ############################### 3. Report Part ###############################
366 log.handler.class=gov.nasa.jpf.util.LogHandler
368 # Windows seem to have a different default
371 report.class=gov.nasa.jpf.report.Reporter
372 report.publisher=console
374 report.console.class=gov.nasa.jpf.report.ConsolePublisher
376 # this prints out repository information if the 'jpf' topic is set (for debugging)
377 #jpf.report.show_repository=true
379 #property violation reporting is configured separately
380 report.console.start=jpf,sut
382 report.console.transition=
383 report.console.constraint=constraint,snapshot
385 report.console.probe=statistics
387 report.console.property_violation=error,snapshot
388 report.console.show_steps=true
389 report.console.show_method=true
390 report.console.show_code=false
392 report.console.finished=result,statistics
394 #jpf.report.console.show_steps=true
395 #jpf.report.console.show_method=true
396 #jpf.report.console.show_code=true
398 report.xml.class=gov.nasa.jpf.report.XMLPublisher
400 report.html.class=gov.nasa.jpf.report.HTMLPublisher
401 report.html.start=jpf,sut,platform,user,dtg,config
402 report.html.constraint=constraint
403 report.html.property_violation=
404 report.html.finished=result,statistics,error,snapshot,output
407 ############################### 4. Listener part #############################
409 # imperative list of listeners
413 gov.nasa.jpf.NonNull,\
416 listener.gov.nasa.jpf.NonNull=gov.nasa.jpf.tools.NonNullChecker
417 listener.gov.nasa.jpf.Const=gov.nasa.jpf.tools.ConstChecker
420 ### PreciseRaceDetector
422 # we don't check for races in standard libraries
423 race.exclude=java.*,javax.*
426 ############################### 5. test part #############################
428 test.report.console.finished=result