Last updated: 2026-11-15

U
Undergraduate level

PatLang Branch Coverage

PatLang version. The PatLang commands on this page, such as pat --ir-run, are those of the toolchain before version 2.0. In 2.0 a program runs on v2_interp.exe or compiles with v2.exe; what changed since v1 lists every change.

Overview & Architecture

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 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).

Interactive Demonstration