Skip to main navigation Skip to search Skip to main content

A Categorical Basis for Robust Program Analysis

Research output: Contribution to journalArticlepeer-review

Abstract

Users of program analyses expect that results change predictably in response to changes in their programs, but many analyses do not ensure such robustness. This paper introduces a theoretical framework that provides a unified language to articulate robustness properties. We adopt a categorical view in which programs and their properties form a category, and robust analyses are characterized as structure-preserving functors. A diverse range of robustness properties—e.g., invariance under variable renaming and monotonicity—arise from instantiating the category's arrows accordingly. Beyond formulating the meaning of robustness, this paper provides methods for achieving it. The first is a general recipe for designing robust analyses, by lifting a sound and robust analysis from a restricted (sub-Turing) model of computation to a sound and robust analysis for general programs. This recipe demystifies the design of several existing loop summarization and termination analyses by showing they are instantiations of this general recipe, and furthermore elucidates their robustness properties. The second is a characterization of a sense in which an algebraic program analysis is robust, provided that it is comprised of robust operators. In particular, we show that such analyses behave predictably under common refactoring patterns, such as variable renaming and loop unrolling.

Original languageEnglish (US)
Article number229
JournalProceedings of the ACM on Programming Languages
Volume10
DOIs
StatePublished - Jun 2026

All Science Journal Classification (ASJC) codes

  • Software
  • Safety, Risk, Reliability and Quality

Keywords

  • Category theory
  • Program analysis
  • Program transformation
  • Robustness

Fingerprint

Dive into the research topics of 'A Categorical Basis for Robust Program Analysis'. Together they form a unique fingerprint.

Cite this