Abstract

In this paper, we challenge the commonly-accepted wisdom in static analysis that object sensitivity is superior to call-site sensitivity for object-oriented programs. In static analysis of object-oriented programs, object sensitivity has been established as the dominant flavor of context sensitivity thanks to its outstanding precision. On the other hand, call-site sensitivity has been regarded as unsuitable and its use in practice has been constantly discouraged for object-oriented programs. In this paper, however, we claim that call-site sensitivity is generally a superior context abstraction because it is practically possible to transform object sensitivity into more precise call-site sensitivity. Our key insight is that the previously known superiority of object sensitivity holds only in the traditional k -limited setting, where the analysis is enforced to keep the most recent k context elements. However, it no longer holds in a recently-proposed, more general setting with context tunneling. With context tunneling, where the analysis is free to choose an arbitrary k -length subsequence of context strings, we show that call-site sensitivity can simulate object sensitivity almost completely, but not vice versa. To support the claim, we present a technique, called Obj2CFA, for transforming arbitrary context-tunneled object sensitivity into more precise, context-tunneled call-site-sensitivity. We implemented Obj2CFA in Doop and used it to derive a new call-site-sensitive analysis from a state-of-the-art object-sensitive pointer analysis. Experimental results confirm that the resulting call-site sensitivity outperforms object sensitivity in precision and scalability for real-world Java programs. Remarkably, our results show that even 1-call-site sensitivity can be more precise than the conventional 3-object-sensitive analysis.

Highlights

  • ŁSince its introduction, object sensitivity has emerged as the dominant flavor of context sensitivity for object-oriented languages.žÐSmaragdakis and Balatsouras [2015] Context sensitivity is critically important for static program analysis of object-oriented programs

  • We show that call-site sensitivity is able to simulate object sensitivity, but object sensitivity is not powerful enough to simulate call-site sensitivity

  • Does our claim hold in the real-world? Can call-site sensitivity be significantly superior to object sensitivity for real-world programs? How precise and scalable can the context-tunneled call-site-sensitive analysis be in practice?

Read more

Summary

Introduction

ŁSince its introduction, object sensitivity has emerged as the dominant flavor of context sensitivity for object-oriented languages.ž. ÐSmaragdakis and Balatsouras [2015] Context sensitivity is critically important for static program analysis of object-oriented programs. A context-sensitive analysis associates local variables and heap objects with context information of method calls, computing analysis results separately for different contexts. This way, context sensitivity prevents analysis information from being merged along different call chains. For objectoriented and higher-order languages, it is well-known that context sensitivity is the primary means. Lang., Vol 6, No POPL, Article 58.

Objectives
Results
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call