@@ -40,12 +40,18 @@ struct object_factory_parameterst
4040 // / Minimum value for the non-deterministically-chosen length of a string.
4141 size_t min_nondet_string_length = 0 ;
4242
43- // / Maximum depth for object hierarchy on input.
44- // / Used to prevent object factory to loop infinitely during the
45- // / generation of code that allocates/initializes data structures of recursive
46- // / data types or unbounded depth. We bound the maximum number of times we
47- // / dereference a pointer using a 'depth counter'. We set a pointer to null if
48- // / such depth becomes >= than this maximum value.
43+ // / Maximum depth of pointer chains (that contain recursion) in the nondet
44+ // / generated input objects.
45+ // /
46+ // / Used to prevent the object factory from looping infinitely during the
47+ // / generation of code that allocates/initializes recursive data structures
48+ // / (such as a linked list). The object factory tracks the number of times a
49+ // / pointer has been dereferenced in a 'depth' counter variable. If a pointer
50+ // / to be initialized points to an object of a type that already occured on
51+ // / the current pointer chain, and if 'depth' is larger than
52+ // / 'max_nondet_tree_depth`, then the pointer is set to null. The parameter
53+ // / does not affect non-recursive data structures, which are always
54+ // / initialized to their full depth.
4955 size_t max_nondet_tree_depth = 5 ;
5056
5157 // / To force a certain depth of non-null objects.
0 commit comments