Expand description
Approximate probabilistic inference via Monte Carlo sampling.
This engine samples probabilistic facts / annotated disjunction decisions on the GPU and evaluates the deterministic core in each sampled world.
For programs with non-monotone recursion (cycles through not and/or aggregates),
Monte Carlo evaluation requires the user to opt into the approximate probabilistic
engine. The deterministic evaluation uses a bounded, cycle-aware semantics:
- If an SCC reaches a fixpoint under synchronous iteration, that fixpoint is used.
- If the SCC enters a cycle, the interpretation is the intersection of all states in the cycle (skeptical, invariant tuples only). This avoids parity/oscillation dependence on iteration count while remaining fully deterministic and explicit.
Structs§
- Evidence
Forcing - Compiled evidence forcing for the MC sampler.
- McDevice
Result - Device-resident Monte Carlo result counts.
- McEval
Config - Configuration for Monte Carlo probabilistic inference.
- McHot
Loop Transfers - Legacy back-compat surface — tracked (data-plane) host<->device transfer deltas measured around the MC measured region.
- McNo
Host Stats - No-host-interaction instrumentation for the measured engine region.
- McProgram
- McQuery
Estimate - McResident
Result - Device-resident result of a GPU-resident MC run. Counts stay on device; the caller decides whether/when to download them (after the measured region).
- McResult
- McTiming
Breakdown - Breakdown of time spent in each phase of MC evaluation.
Gate with
XLOG_MC_PROFILE=1to print at the end of evaluation. - Resident
Plan - Compiled, device-uploadable plan for the resident engine.
- Resident
Rejection - A typed fail-closed rejection: which rule was violated, the offending construct, and the surrounding context (for diagnostics).
Enums§
- Forceability
Reason - Why evidence may or may not be forceable to root Bernoulli variables.
- McCount
Strategy - Strategy for counting evidence-satisfied samples in the MC loop.
- McEngine
- Which engine produced an
McResult. - McSampling
Method - Sampling method for Monte Carlo inference.
- Resident
Reject Kind - Kind of a fail-closed rejection of an MC program by the resident engine.
Constants§
- NONMONOTONE_
SEMANTICS - Bounded semantics for non-monotone SCC evaluation inside MC sampling.
Functions§
- compile_
resident_ plan - Compile an
McPrograminto a resident-engine plan, or return a typed fail-closed rejection for anything outside the supported fragment.