Skip to main content

Module interp

Module interp 

Source
Expand description

The world-set interpreter.

Every statement maps a set of worlds to a set of worlds. All the worlds in a set are at the same point of the program, so control flow is shared and only the data differs. Splitting happens in statements; expressions are evaluated in one world at a time. See docs/semantics.md for the rules this implements.

Structs§

Batch
What a batch of sampled runs produced, to be combined with the other batches in order.
CallResult
The distribution of a function’s return value, unnormalized.
Config
How the engine runs, with the host’s limits already applied.
Engine
SampleTotals
The final weights of all the runs, when sampling.
Stats
Updates
How often a variable’s draws were delayed and updated exactly (docs/semantics.md, section 14), counted over all runs.

Constants§

BATCH
Runs are executed this many at a time, and each batch has a random stream of its own. The size is fixed: changing it changes the output for a given seed.

Functions§

fmt_weight
A weight as a percentage, even when it’s too small for an f64.
too_much_output
The error when print at span goes over the output limit.

Type Aliases§

Printed
Lines printed by print(…), with where.