A Relational Approach to Interprocedural Shape Analysis

被引:18
作者
Jeannet, Bertrand [1 ]
Loginov, Alexey
Reps, Thomas [2 ]
Sagiv, Mooly [3 ]
机构
[1] INRIA, Sophia Antipolis, France
[2] Univ Wisconsin, Dept Comp Sci, Madison, WI 53706 USA
[3] Tel Aviv Univ, Sch Comp Sci, Tel Aviv, Israel
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2010年 / 32卷 / 02期
关键词
Algorithms; Languages; Theory; Verification; Abstract interpretation; context-sensitive analysis; interprocedural dataflow analysis; destructive updating; pointer analysis; shape analysis; static analysis; 3-valued logic;
D O I
10.1145/1667048.1667050
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This article addresses the verification of properties of imperative programs with recursive procedure calls, heap-allocated storage, and destructive updating of pointer-valued fields, that is, interprocedural shape analysis. The article makes three contributions. -It introduces a new method for abstracting relations over memory configurations for use in abstract interpretation. -It shows how this method furnishes the elements needed for a compositional approach to shape analysis. In particular, abstracted relations are used to represent the shape transformation performed by a sequence of operations, and an overapproximation to relational composition can be performed using the meet operation of the domain of abstracted relations. -It applies these ideas in a new algorithm for context-sensitive interprocedural shape analysis. The algorithm creates procedure summaries using abstracted relations over memory configurations, and the meet-based composition operation provides a way to apply the summary transformer for a procedure P at each call site from which P is called. The algorithm has been applied successfully to establish properties of both (i) recursive programs that manipulate lists and (ii) recursive programs that manipulate binary trees.
引用
收藏
页数:52
相关论文
共 50 条
[31]   Precise Interprocedural Analysis in the Presence of Pointers to the Stack [J].
Sotin, Pascal ;
Jeannet, Bertrand .
PROGRAMMING LANGUAGES AND SYSTEMS, 2011, 6602 :459-479
[32]   Demand-driven interprocedural analysis for map-based abstract domains [J].
Apinis, Kalmer ;
Vene, Varmo ;
Vojdani, Vesal .
JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2018, 100 :57-70
[33]   A new image shape analysis approach and its application to flower shape analysis [J].
Miao, Zhenjiang ;
Gandelin, M. -H. ;
Yuan, Baozong .
IMAGE AND VISION COMPUTING, 2006, 24 (10) :1115-1122
[34]   Weighted pushdown systems and their application to interprocedural dataflow analysis [J].
Reps, T ;
Schwoon, S ;
Jha, S ;
Melski, D .
SCIENCE OF COMPUTER PROGRAMMING, 2005, 58 (1-2) :206-263
[35]   A Static Analysis Approach for Detecting Array Shape Errors in Python']Python [J].
Zhuang, Yungyu ;
Kao, Chien-Wen ;
Yen, Wei-hsin .
JOURNAL OF INFORMATION SCIENCE AND ENGINEERING, 2025, 41 (01) :97-119
[36]   Thread-Modular Shape Analysis [J].
Gotsman, Alexey ;
Berdine, Josh ;
Cook, Byron ;
Sagiv, Mooly .
PLDI'07: PROCEEDINGS OF THE 2007 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2007, :266-277
[37]   Thread-modular shape analysis [J].
Gotsman, Alexey ;
Berdine, Josh ;
Cook, Byron ;
Sagiv, Mooly .
ACM SIGPLAN NOTICES, 2007, 42 (06) :266-277
[38]   A Relational Approach to Functional Decomposition of Logic Circuits [J].
Lee, Tony T. ;
Ye, Tong .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 2011, 36 (02)
[39]   Connection analysis: A practical interprocedural heap analysis for C-1 [J].
Ghiya, R ;
Hendren, LJ .
INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 1996, 24 (06) :547-578
[40]   SVF: Interprocedural Static Value-Flow Analysis in LLVM [J].
Sui, Yulei ;
Xue, Jingling .
PROCEEDINGS OF THE 25TH INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION (CC 2016), 2016, :265-266