Skip to main content

Crate xlsynth_mcmc_pir

Crate xlsynth_mcmc_pir 

Source
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-opt entry point.
transforms

Structs§

AcceptedSampleMsg
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.
CanonicalG8rScoringInput
Canonical IR package text plus selected top used for gate-level scoring.
CheckpointMsg
A checkpoint writer notification, including the chain and iteration that triggered the event.
ConstraintLimits
Optional hard caps applied to gate-level cost components during PIR MCMC.
ConstraintViolationScore
Detailed violation information for an infeasible candidate.
Cost
Simple cost model for PIR MCMC.
EvalFnBaselineResults
Cached oracle inputs and expected baseline eval_fn results.
LoadedPirMcmcArtifact
Durable PIR MCMC artifact loaded from a run directory.
PirMcmcArtifact
In-memory provenance artifact for minimizing a discovered MCMC witness.
PirMcmcBudgetFrontierOptions
Options for witness-guided short-witness frontier search.
PirMcmcBudgetFrontierPoint
One requested short-witness budget point.
PirMcmcBudgetFrontierResult
Result of witness-guided short-witness frontier search.
PirMcmcBudgetWitness
One witness on a frontier, either searched or historical-prefix baseline.
PirMcmcContext
Context for a PIR MCMC iteration, holding shared resources.
PirMcmcPrefixMinimizeOptions
Options for reducing winning provenance to an earliest useful prefix.
PirMcmcPrefixMinimizeResult
Result of reducing winning provenance to an earliest useful prefix.
PirMcmcResult
Result of a PIR MCMC run.
RunOptions
Options controlling a PIR MCMC run.
SearchScore
Ordered score used for selecting best-so-far states under optional caps.

Enums§

CheckpointKind
Message sent from the PIR MCMC engine to an optional checkpoint writer.
ExtensionCostingMode
How PIR extension ops are projected before XLS optimization and g8r costing.
G8rEvaluationMode
How PIR MCMC obtains gate-level cost data.
Objective
Objective used to evaluate cost improvements for PIR MCMC.
PirMcmcProvenanceAction
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§

IterationOutcomeDetails
McmcIterationOutput
McmcOptions
McmcStats
Type aliases specializing the generic MCMC helpers from xlsynth-mcmc to the PIR world.