“…A guidance trace 𝜎 is a finite sequence of guidance messages exchanged on a channel; each guidance message has the form val P (𝑣) (resp., dir P (𝑣)) for a sample value 𝑣 (resp., a branch selection 𝑣) from the provider to the consumer, the form val C (𝑣) (resp., dir C (𝑣)) for a sample value 𝑣 (resp., a branch selection 𝑣) from the consumer to the provider, or a procedure-call indicator fold. 1 The evaluation judgments for commands have the form 𝑉 | (a : 𝜎 𝑎 ); (b : 𝜎 𝑏 ) ⊢ 𝑚 ⇓ 𝑤 𝑣, where 𝑉 is an environment, 𝑚 is a command that consumes channel 𝑎 and provides channel 𝑏, 𝜎 𝑎 and 𝜎 𝑏 are guidance traces on the channels, 𝑣 is the evaluation result, and 𝑤 ≥ 0 is a weight that expresses how likely the guidance traces are. Intuitively, a probabilistic program specifies a probability distribution on guidance traces, and the weights represent probability densities with respect to the distribution.…”