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