Skip to main content

Module simplify

Module simplify 

Source
Expand description

Staged global simplification.

plan.md §4.1 calls for “stage-wise simplification” — running a lightweight local simplifier every N rounds during a long-running computation rather than only at the end. Per parallel_review §1 the SimplifyConfig knob existed but had no implementation; run_staged_simplification supplies it.

The loop is intentionally simple:

  1. Caller passes a DagBuilder and a root DagNodeId.
  2. We invoke the heuristic engine once per round, threading the rewritten root through.
  3. Each round goes through the full dedup-aware engine, so even aggressive multi-round configurations cannot leak duplicates.

Structs§

SimplifyConfig
Staged simplification configuration parameters.
ThreadLocalState
Per-thread telemetry for staged simplification.

Functions§

run_staged_simplification
Runs the heuristic engine cfg.intermediate_rounds times against root, threading each round’s output back into the next.