High-level system diagram of Herbie.
It highlights Herbie's core architecture,
key external libraries (egg and Rival), and user input/output.
Basic flow: Herbie passes user input (specification, precondition, etc.)
to a sampler which computes the exact output
for uniformly random input points.
Herbie uses these exact outputs to compute
the accuracy of candidate programs.
The mainloop (scheduler) then alternates between generate and prune phases,
maintaining and improving a set of accurate expressions at each iteration.
Once the generate-and-prune loop is complete,
Herbie extracts either output expressions using regime inference,
which combines multiple candidate programs using conditionals.
The resulting programs are summarized in a report.