A demand-driven adaptive type analysis

被引:3
|
作者
Dubé, D [1 ]
Feeley, M [1 ]
机构
[1] Univ Montreal, Dept Informat & Rech Operat, Montreal, PQ H3C 3J7, Canada
关键词
languages; demand-driven analysis; static analysis; type analysis;
D O I
10.1145/583852.581487
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Compilers for dynamically and statically typed languages ensure safe execution by verifying that all operations are performed on appropriate values. An operation as simple as car in Scheme and hd in SML will include a run time check unless the compiler can prove that the argument is always a non-empty list using some type analysis. We present a demand-driven type analysis that can adapt. the precision of the analysis to various parts of the program being compiled. This approach has the advantage that the analysis effort can be spent where it is justified by the possibility of removing a run time check, and where added precision is needed to accurately analyze complex parts of the program. Like the k-cfa our approach is based on abstract interpretation but it can analyze some important programs more accurately than the k-cfa for any value of k. We have built a prototype of our type analysis and tested it on various programs with higher order functions. It can remove all run time type checks in some nontrivial programs which use map and the Y combinator.
引用
收藏
页码:84 / 97
页数:14
相关论文
共 50 条
  • [1] Demand-driven pointer analysis
    Heintze, N
    Tardieu, O
    ACM SIGPLAN NOTICES, 2001, 36 (05) : 24 - 34
  • [2] Demand-Driven Alias Analysis for C
    Zheng, Xin
    Rugina, Radu
    POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, : 197 - 208
  • [3] Demand-driven alias analysis for C
    Zheng, Xin
    Rugina, Radu
    ACM SIGPLAN NOTICES, 2008, 43 (01) : 197 - 208
  • [4] Demand-driven less-than analysis
    da Silva, Junio Cezar R.
    Pereira, Fernando Magno Q.
    PROCEEDINGS OF THE 21ST BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES (SBLP 2017), 2017,
  • [5] Static Analysis with Demand-Driven Value Refinement
    Stein, Benno
    Nielsen, Benjamin Barslev
    Chang, Bor-Yuh Evan
    Moller, Anders
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [6] Demand-Driven Refinement of Points-to Analysis
    Sun, Chenguang
    Midkiff, Samuel
    2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2019), 2019, : 264 - 265
  • [7] Demand-driven register allocation
    Proebsting, TA
    Fischer, CN
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1996, 18 (06): : 683 - 710
  • [8] Demand-Driven Land Evaluation
    Bacic, I. L. Z.
    DIGITAL SOIL MAPPING WITH LIMITED DATA, 2008, : 151 - +
  • [9] Demand-driven points-to analysis for Java']Java
    Sridharan, M
    Gopan, D
    Shan, L
    Bodík, R
    ACM SIGPLAN NOTICES, 2005, 40 (10) : 59 - 76
  • [10] Bidirectionality in flow-sensitive demand-driven analysis
    Jaiswal, Swati
    Khedker, Uday P.
    Chakraborty, Supratik
    SCIENCE OF COMPUTER PROGRAMMING, 2020, 190