PatLang Branch Coverage
For new readers
"Branch coverage" means tracking which sides of each if/else your program actually executed when it ran, so you can spot code paths your tests never exercise. This page is an interactive tool: paste a small PatLang program below, run it, and see per-branch results directly โ no separate explanation needed to follow along.
Paste a self-contained PatLang program (no include lines -- this instruments the text directly) and click Run. The summary table and per-function tabs below show which branches your program's own code actually took while it ran, and which it never did -- the same static-catalog-plus-dynamic-instrumentation technique as the CLI tool (pat --ir-run self_hosting/tools/coverage_main.patlang <test file>), which can report on a whole real test suite including files the browser can't read. See the Paradigms Guide and self_hosting/lib/coverage.patlang for how instrumentation works and why it's built this way (there's no execution-tracing hook anywhere in PatLang's runtime, so this regenerates the source with a small tracking call wrapped around every branch condition, rather than changing the interpreter).