Abstract

Object sensitivity analysis is a well-known form of context-sensitive points-to analysis. This analysis is parameterized by a bound on the names of symbolic objects associated with each allocation site. In this paper, we propose a novel approach based on object sensitivity analysis that takes as input a set of client queries, and tries to answer them using an initial round of inexpensive object sensitivity analysis that uses a low object-name length bound at all allocation sites. For the queries that are answered unsatisfactorily, the approach then pin points "bad" points-to facts, which are the ones that are responsible for the imprecision. It then employs a form of program slicing to identify allocation sites that are potentially causing these bad points-to facts to be generated. The approach then runs object sensitivity analysis once again, this time using longer names for just these allocation sites, with the objective of resolving the imprecision in this round. We describe our approach formally, prove its completeness, and describe a Datalog-based implementation of it on top of the Petablox framework. Our evaluation of our approach on a set of large Java benchmarks, using two separate clients, reveals that our approach is more precise than the baseline object sensitivity approach, by around 29% for one of the clients and by around 19% for the other client. Our approach is also more precise on most large benchmarks than a recently proposed approach that uses SAT solvers to identify allocation sites to refine.

Highlights

  • Points-to analysis is a fundamental problem in static program analysis, and involves the use of static abstractions to determine the memory locations that each variable or each field of an object can point to

  • Recall from the introduction that we had given to this analysis in Section 1.2, that in this analysis symbolic objects serve as contexts

  • If we have a fact of the form (c, v) → o, it means the following: (a) c and o are symbolic objects, (b) when the method mj within which v is declared is invoked with c as the receiver object, v may point to o

Read more

Summary

Introduction

Points-to analysis is a fundamental problem in static program analysis, and involves the use of static abstractions to determine the memory locations that each variable or each field of an object can point to. We use the symbol S to denote the set of all statements in the given program P, and the symbol F to denote the set of points-to facts that is being currently inferred. If we have a fact of the form (c, v) → o, it means the following: (a) c and o are symbolic objects, (b) when the method mj within which v is declared is invoked with c as the receiver object, v may point to o. There is another kind of fact used in the analysis, namely, of the form o1.f → o2

Methods
Results
Conclusion
Full Text
Published version (Free)

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