Closed albertZhangTJ closed 1 month ago
Ok I realized where the issue is. It's again with the depth calculation.
Here is the rub: the minimal expansion depth should be determined using the MAXIMUM child for regular nodes, MINIMUM should ONLY be used for AlternationNode
. How come I missed that ...
Fixed with 1f6f0ce27a5aaf494362a6e317353f43440ef28a
Got a stack overflow despite the max_depth is set and I am confident to say that the minimal expansion depth is way smaller than the limit.
Which indicates that there must be some bug in the implementation resulting the mechanism to expand the AST following the minimal depth path when the depth limit is insufficient to fail.