Skip to content

Commit be40ff5

Browse files
committed
Update documentation of max_nondet_tree_depth object factory parameter
1 parent a9bcc3d commit be40ff5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/util/object_factory_parameters.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)