Expand description
PIR-based MCMC optimization using the shared xlsynth-mcmc engine.
This crate wires the XLSynth PIR IR (xlsynth_pir::ir) into the generic
MCMC statistics and Metropolis helpers in xlsynth-mcmc. It provides a
small library API (run_pir_mcmc) that runs a single-chain MCMC over a
single PIR function.
Modules§
- driver_
cli - Shared CLI wiring for the
xlsynth-driver ir-mcmc-optentry point. - transforms
Structs§
- Accepted
Sample Msg - Message sent from the PIR MCMC engine to an optional accepted-sample writer.
- Best
- Shared best-so-far PIR function using structured feasibility-first scoring.
- Canonical
G8rScoring Input - Canonical IR package text plus selected top used for gate-level scoring.
- Checkpoint
Msg - A checkpoint writer notification, including the chain and iteration that triggered the event.
- Constraint
Limits - Optional hard caps applied to gate-level cost components during PIR MCMC.
- Constraint
Violation Score - Detailed violation information for an infeasible candidate.
- Cost
- Simple cost model for PIR MCMC.
- Eval
FnBaseline Results - Cached oracle inputs and expected baseline
eval_fnresults. - Loaded
PirMcmc Artifact - Durable PIR MCMC artifact loaded from a run directory.
- PirMcmc
Artifact - In-memory provenance artifact for minimizing a discovered MCMC witness.
- PirMcmc
Budget Frontier Options - Options for witness-guided short-witness frontier search.
- PirMcmc
Budget Frontier Point - One requested short-witness budget point.
- PirMcmc
Budget Frontier Result - Result of witness-guided short-witness frontier search.
- PirMcmc
Budget Witness - One witness on a frontier, either searched or historical-prefix baseline.
- PirMcmc
Context - Context for a PIR MCMC iteration, holding shared resources.
- PirMcmc
Prefix Minimize Options - Options for reducing winning provenance to an earliest useful prefix.
- PirMcmc
Prefix Minimize Result - Result of reducing winning provenance to an earliest useful prefix.
- PirMcmc
Result - Result of a PIR MCMC run.
- RunOptions
- Options controlling a PIR MCMC run.
- Search
Score - Ordered score used for selecting best-so-far states under optional caps.
Enums§
- Checkpoint
Kind - Message sent from the PIR MCMC engine to an optional checkpoint writer.
- Extension
Costing Mode - How PIR extension ops are projected before XLS optimization and g8r costing.
- G8rEvaluation
Mode - How PIR MCMC obtains gate-level cost data.
- Objective
- Objective used to evaluate cost improvements for PIR MCMC.
- PirMcmc
Provenance Action - One exact provenance action on the path that led to an MCMC winner.
Functions§
- canonical_
g8r_ scoring_ input_ for_ pir_ fn - Materializes the exact IR package that MCMC gate-level scoring lowers.
- constraint_
violation - Computes the active constraint violation details for the given cost.
- cost
- Calculates the cost of a PIR function.
- cost_
with_ effort_ options_ and_ toggle_ stimulus - Calculates cost with explicit load-weighting options.
- cost_
with_ effort_ options_ toggle_ stimulus_ and_ extension_ mode - Calculates cost with explicit load-weighting and extension projection options.
- cost_
with_ effort_ options_ toggle_ stimulus_ extension_ mode_ and_ evaluator - Calculates cost with explicit load-weighting, extension projection, and gate-level evaluator configuration.
- cost_
with_ effort_ options_ toggle_ stimulus_ extension_ mode_ evaluator_ and_ g8r_ options - Calculates cost with explicit evaluator and canonical g8r lowering options.
- cost_
with_ toggle_ stimulus - Calculates cost and, for toggle-based objectives, evaluates the candidate on a fixed gate-level toggle stimulus.
- lower_
toggle_ stimulus_ for_ fn - Validates tuple-valued stimulus samples against
f’s parameter signature and lowers each sample to GateFn input vectors (Vec<IrBits>). - mcmc_
iteration - Performs a single iteration of the PIR MCMC process.
- minimize_
winning_ prefix - Selects the earliest winning-provenance prefix that retains the requested fraction of the discovered objective improvement.
- parse_
irvals_ tuple_ file - parse_
irvals_ tuple_ lines - read_
pir_ mcmc_ artifact_ dir - Loads a durable winning-provenance artifact from
run_dir/winning-lineage. - run_
pir_ mcmc - Runs a single-chain MCMC optimization over a PIR function.
- run_
pir_ mcmc_ with_ artifact - Runs MCMC while retaining the exact provenance that led to the final raw winning state.
- run_
pir_ mcmc_ with_ shared_ best - search_
score - Computes the ordered search score for best-state tracking and multichain synchronization under optional area/delay caps.
- search_
winning_ budget_ frontier - Searches for best-found short witnesses at a schedule of provenance-action budgets, using the long witness to bias transform proposals.
- validate_
pir_ mcmc_ artifact_ run_ options - Validates whether a run shape can produce a provenance artifact.
- write_
pir_ mcmc_ artifact_ dir - Writes a durable winning-provenance artifact under
run_dir/winning-lineage.
Type Aliases§
- Iteration
Outcome Details - Mcmc
Iteration Output - Mcmc
Options - Mcmc
Stats - Type aliases specializing the generic MCMC helpers from
xlsynth-mcmcto the PIR world.