unsafe fn execute_raw(
        env: &ExecEnv<F, Diffusion>,
        program: &RawProgram<Instruction<F>>,
        root_program: &Arc<RecursionProgram<F>>,
        mut witness_stream: Option<&mut VecDeque<Block<F>>>,
    ) -> Result<ExecutionRecord<F>, RuntimeError<F, EF>> {
        let fresh_record =
            || ExecutionRecord { program: Arc::clone(root_program), ..Default::default() };

        let mut state = ExecState {
            env: env.clone(),
            record: fresh_record(),
            #[cfg(feature = "debug")]
            last_trace: None,
        };

        for block in &program.seq_blocks {
            match block {
                SeqBlock::Basic(basic_block) => {
                    for instruction in &basic_block.instrs {
                        unsafe {
                            Self::execute_one(
                                &mut state,
                                witness_stream.as_deref_mut(),
                                instruction.clone(),
                            )
                        }?;
                    }
                }
                SeqBlock::Parallel(vec) => {
                    state.record.append(
                        &mut vec
                            .par_iter()
                            .map(|subprogram| {
                                // Witness stream may not be called inside parallel contexts to
                                // avoid nondeterminism.
                                Self::execute_raw(env, subprogram, root_program, None)
                            })
                            .try_reduce(fresh_record, |mut record, mut res| {
                                record.append(&mut res);
                                Ok(record)
                            })?,
                    );
                }
            }
        }
        Ok(state.record)
    }
# Safety

This function makes the same safety assumptions as [`RecursionProgram::new_unchecked`].
crates/recursion/core/src/runtime/mod.rs