arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.11029cs.PL
收藏

面向鲁棒程序分析的范畴基础

A Categorical Basis for Robust Program Analysis

Princeton University(普林斯顿大学)

Zachary Kincaid, Shaowei Zhu

AI总结:

本文提出一个范畴框架,用于统一描述程序分析的鲁棒性,通过将程序和属性建模为范畴中的对象,将不同鲁棒性概念表示为结构保持的函子,并提供实现鲁棒性的方法。

摘要:

程序分析用户期望结果随程序变化而可预测变化,但许多分析缺乏这种鲁棒性。本文介绍了一个理论框架,提供统一语言来表达鲁棒性属性。通过将程序及其属性建模为范畴中的对象,各种鲁棒性概念——从变量重命名到语义细化和结构转换——可以表示为结构保持的函子。除了阐述鲁棒性的意义,本文还提供了实现鲁棒性的方法。第一种方法是一种通用的鲁棒分析设计食谱,通过将在受限(子图灵)计算模型中声纳且鲁棒的分析提升到一般程序的声纳且鲁棒的分析。该食谱揭示了现有循环汇总和终止分析的设计,显示它们是该通用食谱的实例,并进一步阐明了它们的鲁棒性属性。第二种方法是对代数程序分析鲁棒性的刻画,前提是它由鲁棒操作符组成。特别是,我们展示了此类分析在常见重构模式下,如变量重命名和循环展开下行为可预测。

英文摘要:

Users of program analyses expect that results change predictably in response to changes in their programs, but many analyses fail to provide such robustness. This paper introduces a theoretical framework that provides a unified language to articulate robustness properties. By modeling programs and their properties as objects in a category, diverse notions of robustness-from variable renaming to semantic refinement and structural transformation-can be characterized as structure-preserving functors. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑