Sheaf-Cohomological Program Analysis: Unifying Bug Finding, Equivalence, and Verification via \v{C}ech Cohomology
Halley Young

TL;DR
This paper introduces a cohomological framework for program analysis that unifies bug detection, type checking, and verification, demonstrating its effectiveness with a Python analysis tool outperforming existing solutions.
Contribution
It formulates program analysis as computing Čech cohomology of a semantic presheaf, providing new methods for bug fixing, equivalence, and compositional analysis.
Findings
100% bug-detection recall on benchmarks
99% accuracy in behavioral equivalence detection
98% correctness in specification satisfaction
Abstract
We present a framework in which program analysis -- type checking, bug finding, and equivalence verification -- is organized as computing the \v{C}ech cohomology of a semantic presheaf over a program's site category. The presheaf assigns refinement-type information to observation sites and restricts it along data-flow morphisms. The cohomology group is the space of globally consistent typings. The first cohomology group classifies gluing obstructions -- bugs, type errors, and equivalence failures -- each localized to a specific pair of disagreeing sites. This formulation yields three concrete results unavailable in prior work: (1) the rank of over counts the minimum independent fixes; (2) is sound and complete for behavioral equivalence; (3) Mayer-Vietoris enables compositional, incremental obstruction counting. We implement the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
