pub fn reduce_epistemic_program_to_ordinary(program: &Program) -> ProgramExpand description
Return the ordinary runtime program produced after epistemic GPU planning.
Epistemic literals are removed only for the reduced production runtime dispatch; callers must still plan and validate the explicit epistemic GPU contract before using this reduced program.
The augmenting positive-modal resolve is gated on INVARIANT targets only (see the
body comment): for an invariant R, know R/possible R ranges exactly over
R’s extension, so resolving the modal into an ordinary join binds the augmented
output column WITHOUT leaking — and the GPU membership filter re-gates
post hoc. A determined-but-not-invariant target (an epistemic-derived head like a
multi-column r) is NOT resolved here, so its augmenting output variable stays
unbound and the reduced program fails closed at this strict (execution) entry
point. See reduce_epistemic_program_to_ordinary_for_stratified_schema for the
schema-only relaxation used by the stratified driver.