Object sensitivity is widely used as a context abstraction for computing the points-to information context-sensitively for object-oriented programming languages such as Java. Due to the combinatorial explosion of contexts in large object-oriented programs,
k
-object-sensitive pointer analysis (under
k
-limiting), denoted
k
-obj
, is often inefficient even when it is scalable for small values of
k
, where
k
⩽ 2 holds typically. A recent popular approach for accelerating
k
-obj
trades precision for efficiency by instructing
k
-obj
to analyze only some methods in a program context-sensitively, determined heuristically by a pre-analysis. In this article, we investigate how to develop a fundamentally different approach,
Eagle
, for designing a pre-analysis that can make
k
-obj
run significantly faster while maintaining its precision. The novelty of
Eagle
is to enable
k
-obj
to analyze a method with partial context sensitivity (i.e., context-sensitively for only some of its selected variables/allocation sites) by solving a context-free-language (CFL) reachability problem based on a new CFL-reachability formulation of
k
-obj
. By regularizing one CFL for specifying field accesses and using another CFL for specifying method calls, we have formulated
Eagle
as a fully context-sensitive taint analysis (without
k
-limiting) that is both effective (by selecting the variables/allocation sites to be analyzed by
k
-obj
context-insensitively so as to reduce the number of context-sensitive facts inferred by
k
-obj
in the program) and efficient (by running linearly in terms of the number of pointer assignment edges in the program). As
Eagle
represents the first precision-preserving pre-analysis, our evaluation focuses on demonstrating its significant performance benefits in accelerating
k
-obj
for a set of popular Java benchmarks and applications, with call graph construction, may-fail-casting, and polymorphic call detection as three important client analyses.