Repository navigation
state_exec: parser.max_depth 100000; the last recursive walks over parsed data - #678
Merged
Merged
Conversation
…rsed data Nothing in libcvc walks parsed data on the native stack any more, so the parser's nesting limit no longer guards the stack. Its default rises from 256 to 100000, the depth every walker is tested at on a 64 KiB stack (the user's choice). - Ariadne channel lint: collect_channel_refs keeps its open lists on a heap stack. The 256-level cutoff is gone, so a msg-* reference at any depth is checked. - stream-capture-audio: a built tone/gain/mix graph pulls each chunk through one native call per level on the producer thread, and frees itself the same way. A graph nesting mix/gain more than 64 levels deep is refused with an error instead of built. - state-set of a list or dict prints it as a data job, a slice per step when the process slices deep data. The node is written once the whole string is ready. - The test-only tree-walking evaluators' macro substitute runs the stackless evaluator's walk whole, instead of recursing per template level. Tests: ParsedDataAtTheDefaultDepthLimit (parse, compare, print and free a script at the default limit on the small stack), StateSetOfADeepValueSlices, a channel lint test 1000 levels deep, the audio graph cap in cvcgl_media_audio, and the default's asserts.
This was referenced Oct 18, 2026
transfix
added a commit
that referenced
this pull request
Oct 18, 2026
…it is reported (#680) PredicateMaterializerIsCutByTheEvalBudget (from #665) runs a one-node-a-step collections.range 120000 in a predicate and expects it cut. On the Linux Debug lane the time cap fired inside the job's own deadline poll, which reports "collections.range: evaluation exceeded time budget" through the job's error rather than the evaluator's "exceeded the eval budget" (seen on #678, job 117587719214). Both are the predicate being cut; the test now accepts either.
transfix
enabled auto-merge (squash)
October 18, 2026 06:34
…p-finish Conflicts: STATE_EXEC_GRAMMAR.md's native-calls list (state-json/state-from-json from #681, state-set here: both kept), and the tests #681/#682 and this branch each added to state_exec_data_steps_test.cpp and state_exec_deep_data_test.cpp (all kept). #675's pycvc tests asserted the old parser.max_depth default of 256; they now compare with pycvc.parse_options().max_depth, as agreed with the parity session.
transfix
added a commit
that referenced
this pull request
Oct 18, 2026
No conflicts: #678's tests and grammar-doc edits sit next to this branch's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes what #657 and #658 left over parsed data. Nothing in libcvc walks parsed data on the native stack any more, so
parser.max_depthstops being a stack guard and its default rises from 256 to 100000 (the user's choice). 100000 is the depth every walker is tested at on a 64 KiB stack.What changes
collect_channel_refs(loader.cpp) keeps its open lists on a heap stack. The old cutoff at 256 levels is gone, so amsg-*reference at any depth is checked.stream-capture-audiographs. A built tone/gain/mix graph pulls each chunk through one native call per level on the producer thread, and frees itself the same way. A builder loop would not help, so depth is capped instead: a SPEC nesting mix/gain more than 64 levels deep is refused with an error ("... more than 64 levels deep") instead of built.state-setof a list or dict prints it as a data job (run_data_job(make_print_job(...))). Withdata.step_nodes> 0 the printing runs a slice per step likestr, and the node is written once the whole string is ready. Scalars are unchanged.evaluator,async_evaluator). Their macrosubstituteruns the stackless evaluator's walk whole instead of recursing per template level.parser.max_depthdefaults to 100000. The header comment, the grammar doc ("Nesting", "Parser settings", the P1b row) and the pycvc comment/README say why. Values crossing into Python go through pycvc's converter, which has its own depth limit (pycvc: state_exec parity part 1 (values, parsing, parse_error, value codec) #661).Not in this PR
PR B, on top of #665's
call_function:apply/sendon a self-containing list, class constructor/initcycles);defclassmethods without nested evaluators;The pycvc converter (
value_to_py/py_to_value) is left to the parity stack (#661 and its follow-up), which replaces it.Tests
StateExecDeepData.ParsedDataAtTheDefaultDepthLimit: on the small stack, a script at the default limit parses, compares, prints and frees, and one level more is aparse_error. It passes at 256 KiB and 64 KiB (CVC_DEEP_DATA_STACK_KIB=64).DataStepsScheduler.StateSetOfADeepValueSlices: a 300-deep list takes data steps, the node is empty mid-walk, and it ends holding the printed list.AriadneChannelLint.SeesChannelsNestedAnyDepth: an undeclared channel 1000 levels down fails a strict load.cvcgl_media_audio: a 64-level gain chain is built, and a 65-level one is refused with the cap's error.NestingLimitStopsRunawayInputBeforeTheStackDoesfeeds a million(and checks the error is at column 100001.Local results (MSVC 14.38 Release, Windows)
state_exec_deep_data_testalso at 64 KiB; pycvctest_pycvc_exec.pyandtest_pycvc_ari.py23 passed.cvcgl_media_audiopassed in a cvcGL build (CVC_BUILD_CVCGL=ON, SDL and imgui on).