Add recursively productive imperative Mesopy synthesizer - #50
Draft
sileod wants to merge 5 commits into
Draft
Conversation
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.
Replaces the initial finite phenomenon composer in this PR with a task-agnostic, recursively productive Python AST synthesizer under
reasoning_core/resources.Design:
binary, ternary, safe indexing, helper calls)if,for,while) under explicit depth budgetsRecursionErrorusing the same recursive helper for failing runnability casesMesopyComplexity: statements, expression depth, control depth, functions, call depth, dataflow depth, loop boundast_nodes, AST depth, control depth, call depth, loops, branches, calls, dataflow depth) for profiling/complexity tasksRunnability anti-shortcut behavior:
IndexError,ZeroDivisionError,ValueError,KeyError, andRecursionErrorsafe_hazard_rate, so suspicious syntax is not itself a labelProductivity tests compare complexity levels 0, 3, and 6 and require increasing median AST size plus increased AST/control/call/dataflow depth. The generator is therefore not just concatenating from a finite segment catalogue; expression and control-flow constructors recurse as budget increases.
Local stress/benchmark results on this implementation:
CI tests use deliberately loose performance limits (
100executable samples < 3 s,50paired samples < 3 s) to detect regressions without encoding machine-specific benchmark numbers.This PR intentionally only adds the reusable resource and its tests. Migrating
controlled_code_execution,code_execution, runnability, and profiling tasks can be reviewed separately against this common generator distribution.