Home▸Computer Science▸Program Synthesis & Verification: Counterexample-Guided Search (2D)

Program Synthesis & Verification: Counterexample-Guided Search (2D)

A flat, radial view of the same CEGIS loop as the 3D version: candidate programs orbit a jagged specification boundary and get steered toward it by counterexample distance, or wander blindly for comparison.

Computer Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-program-synthesis-verification-counterexample-guided-search ↗ Open standalone

This 2D companion strips the CEGIS search visualiser down to a flat radial plot: the specification becomes a jagged closed curve around a center point, and each candidate program is a dot at some angle and radius. Guided refinement pulls a dot's radius toward the boundary using the signed distance as its counterexample signal, while random search jitters blindly — the same loop as the 3D version, easier to read because everything sits on one plane instead of orbiting in space. Watch the color shift from red (far from verified) through amber (close) to green (verified) as the population converges, and compare how much faster CEGIS closes the gap than blind search on the same specification.

⚙ Under the hood

Flat radial CEGIS visualiser: a jagged specification boundary drawn from an angle-dependent radius function, candidates steered toward it by signed-distance counterexample feedback versus unguided random search, with population, search-step and specification-complexity controls.

program synthesisformal verificationCEGIScounterexample-guidedcanvas 2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)