Monotonicity and the Precision of Program Analysis

被引:0
作者
Campion, Marco [1 ]
Preda, Mila Dalla [2 ]
Giacobazzi, Roberto [3 ]
Urban, Caterina [1 ]
机构
[1] Univ PSL, ENS, INRIA, Paris, France
[2] Univ Verona, Verona, Italy
[3] Univ Arizona, Tucson, AZ USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2024年 / 8卷 / POPL期
关键词
Abstract Interpretation; Program Analysis; Complete-Analyzability; Completeness; Program Monotonicity; STATIC ANALYSIS;
D O I
10.1145/3632897
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
It is widely known that the precision of a program analyzer is closely related to intensional program properties, namely, properties concerning how the program is written. This explains, for instance, the interest in code obfuscation techniques, namely, tools explicitly designed to degrade the results of program analysis by operating syntactic program transformations. Less is known about a possible relation between what the program extensionally computes, namely, its input-output relation, and the precision of a program analyzer. In this paper we explore this potential connection in an effort to isolate program fragments that can be precisely analyzed by abstract interpretation, namely, programs for which there exists a complete abstract interpretation. In the field of static inference of numeric invariants, this happens for programs, or parts of programs, that manifest a monotone (either non-decreasing or non-increasing) behavior. We first formalize the notion of program monotonicity with respect to a given input and a set of numerical variables of interest. A sound proof system is then introduced with judgments specifying whether a program is monotone relatively to a set of variables and a set of inputs. The interest in monotonicity is justified because we prove that the family of monotone programs admits a complete abstract interpretation over a specific class of non-trivial numerical abstractions and inputs. This class includes all non-relational abstract domains that refine interval analysis (i.e., at least as precise as the intervals abstraction) and that satisfy a topological convexity hypothesis.
引用
收藏
页码:1629 / 1662
页数:34
相关论文
共 79 条
[1]   A Simple Differentiable Programming Language [J].
Abadi, Martin ;
Plotkin, Gordon D. .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (POPL)
[2]  
Ahman D, 2018, P ACM PROGRAM LANG, V2, DOI 10.1145/3158153
[3]  
Albarghouthi A., 2021, TrendsProgram. Lang., V7, DOI 10.1561/2500000051
[4]   Deciding ω-Regular Properties on Linear Recurrence Sequences [J].
Almagor, Shaull ;
Karimov, Toghrul ;
Kelmendi, Edon ;
Ouaknine, Joel ;
Worrell, James .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2021, 5 (POPL)
[5]  
Alvaro Peter, 2011, CIDR, P249
[6]  
Amodei D, 2016, Arxiv, DOI [arXiv:1606.06565, DOI 10.48550/ARXIV.1606.06565]
[7]  
[Anonymous], 2013, Faculty Authored and Edited Books & CDs
[8]   Datafun: A Functional Datalog [J].
Arntzenius, Michael ;
Krishnaswami, Neelakantan R. .
ACM SIGPLAN NOTICES, 2016, 51 (09) :214-227
[9]  
Ascari Flavio, 2023, Lecture Notes in Computer Science, V13990, P1, DOI [10.1007/978-3-031-30044-8_1, DOI 10.1007/978-3-031-30044-8_1]
[10]  
Baader M., 2020, 8th International Conference on Learning Representations, ICLR 2020